You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
19 KiB
1 line
19 KiB
{"ast":null,"code":"import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _constants$platform;\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nimport { CodedError, NativeModulesProxy } from 'expo-modules-core';\nimport Platform from \"react-native-web/dist/exports/Platform\";\nimport NativeModules from \"react-native-web/dist/exports/NativeModules\";\nimport { AppOwnership, ExecutionEnvironment, UserInterfaceIdiom } from \"./Constants.types\";\nimport ExponentConstants from \"./ExponentConstants\";\nexport { AppOwnership, ExecutionEnvironment, UserInterfaceIdiom };\nif (!ExponentConstants) {\n console.warn(\"No native ExponentConstants module found, are you sure the expo-constants's module is linked properly?\");\n}\nvar rawManifest = null;\nif (NativeModulesProxy.ExpoUpdates) {\n var updatesManifest;\n if (NativeModulesProxy.ExpoUpdates.manifest) {\n updatesManifest = NativeModulesProxy.ExpoUpdates.manifest;\n } else if (NativeModulesProxy.ExpoUpdates.manifestString) {\n updatesManifest = JSON.parse(NativeModulesProxy.ExpoUpdates.manifestString);\n }\n if (updatesManifest && Object.keys(updatesManifest).length > 0) {\n rawManifest = updatesManifest;\n }\n}\nif (NativeModules.EXDevLauncher) {\n var devLauncherManifest;\n if (NativeModules.EXDevLauncher.manifestString) {\n devLauncherManifest = JSON.parse(NativeModules.EXDevLauncher.manifestString);\n }\n if (devLauncherManifest && Object.keys(devLauncherManifest).length > 0) {\n rawManifest = devLauncherManifest;\n }\n}\nif (!rawManifest && ExponentConstants && ExponentConstants.manifest) {\n rawManifest = ExponentConstants.manifest;\n if (typeof rawManifest === 'string') {\n rawManifest = JSON.parse(rawManifest);\n }\n}\nvar _ref = ExponentConstants || {},\n name = _ref.name,\n appOwnership = _ref.appOwnership,\n nativeConstants = _objectWithoutProperties(_ref, [\"name\", \"appOwnership\"]);\nvar warnedAboutDeviceYearClass = false;\nvar warnedAboutIosModel = false;\nvar constants = _objectSpread(_objectSpread({}, nativeConstants), {}, {\n appOwnership: appOwnership != null ? appOwnership : null\n});\nObject.defineProperties(constants, {\n deviceYearClass: {\n get: function get() {\n if (!warnedAboutDeviceYearClass) {\n console.warn(\"Constants.deviceYearClass has been deprecated in favor of expo-device's Device.deviceYearClass property. This API will be removed in SDK 45.\");\n warnedAboutDeviceYearClass = true;\n }\n return nativeConstants.deviceYearClass;\n },\n enumerable: false\n },\n installationId: {\n get: function get() {\n return nativeConstants.installationId;\n },\n enumerable: false\n },\n __unsafeNoWarnManifest: {\n get: function get() {\n var maybeManifest = getManifest(true);\n if (!maybeManifest || !isAppManifest(maybeManifest)) {\n return null;\n }\n return maybeManifest;\n },\n enumerable: false\n },\n __unsafeNoWarnManifest2: {\n get: function get() {\n var maybeManifest = getManifest(true);\n if (!maybeManifest || !isManifest(maybeManifest)) {\n return null;\n }\n return maybeManifest;\n },\n enumerable: false\n },\n manifest: {\n get: function get() {\n var maybeManifest = getManifest();\n if (!maybeManifest || !isAppManifest(maybeManifest)) {\n return null;\n }\n return maybeManifest;\n },\n enumerable: true\n },\n manifest2: {\n get: function get() {\n var maybeManifest = getManifest();\n if (!maybeManifest || !isManifest(maybeManifest)) {\n return null;\n }\n return maybeManifest;\n },\n enumerable: true\n },\n expoConfig: {\n get: function get() {\n var maybeManifest = getManifest(true);\n if (!maybeManifest) {\n return null;\n }\n if (isManifest(maybeManifest)) {\n var _maybeManifest$extra$, _maybeManifest$extra;\n return (_maybeManifest$extra$ = (_maybeManifest$extra = maybeManifest.extra) == null ? void 0 : _maybeManifest$extra.expoClient) != null ? _maybeManifest$extra$ : null;\n } else if (isAppManifest(maybeManifest)) {\n return maybeManifest;\n }\n return null;\n },\n enumerable: true\n },\n __rawManifest_TEST: {\n get: function get() {\n return rawManifest;\n },\n set: function set(value) {\n rawManifest = value;\n },\n enumerable: false\n }\n});\nif (constants != null && (_constants$platform = constants.platform) != null && _constants$platform.ios) {\n var originalModel = nativeConstants.platform.ios.model;\n Object.defineProperty(constants.platform.ios, 'model', {\n get: function get() {\n if (!warnedAboutIosModel) {\n console.warn(\"Constants.platform.ios.model has been deprecated in favor of expo-device's Device.modelName property. This API will be removed in SDK 45.\");\n warnedAboutIosModel = true;\n }\n return originalModel;\n },\n enumerable: false\n });\n}\nfunction isAppManifest(manifest) {\n return !isManifest(manifest);\n}\nfunction isManifest(manifest) {\n return 'metadata' in manifest;\n}\nfunction getManifest() {\n var suppressWarning = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n if (!rawManifest) {\n var invalidManifestType = rawManifest === null ? 'null' : 'undefined';\n if (nativeConstants.executionEnvironment === ExecutionEnvironment.Bare && Platform.OS !== 'web') {\n if (!suppressWarning) {\n console.warn(\"Constants.manifest is \" + invalidManifestType + \" because the embedded app.config could not be read. Ensure that you have installed the expo-constants build scripts if you need to read from Constants.manifest.\");\n }\n } else if (nativeConstants.executionEnvironment === ExecutionEnvironment.StoreClient || nativeConstants.executionEnvironment === ExecutionEnvironment.Standalone) {\n throw new CodedError('ERR_CONSTANTS_MANIFEST_UNAVAILABLE', \"Constants.manifest is \" + invalidManifestType + \", must be an object.\");\n }\n }\n return rawManifest;\n}\nexport default constants;","map":{"version":3,"mappings":";;;;;AACA,SAASA,UAAU,EAAEC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aAAa,CAACxB,QAAgC;EACrD,OAAO,CAAC0B,UAAU,CAAC1B,QAAQ,CAAC;AAC9B;AAEA,SAAS0B,UAAU,CAAC1B,QAAgC;EAClD,OAAO,UAAU,IAAIA,QAAQ;AAC/B;AAEA,SAASuB,WAAW,GAAwB;EAAA,IAAvBgB,eAAe,uEAAG,KAAK;EAC1C,IAAI,CAAC1C,WAAW,EAAE;IAChB,IAAM2C,mBAAmB,GAAG3C,WAAW,KAAK,IAAI,GAAG,MAAM,GAAG,WAAW;IACvE,IACEe,eAAe,CAAC6B,oBAAoB,KAAKjD,oBAAoB,CAACkD,IAAI,IAClEC,QAAQ,CAACC,EAAE,KAAK,KAAK,EACrB;MACA,IAAI,CAACL,eAAe,EAAE;QACpB5C,OAAO,CAACC,IAAI,4BACe4C,mBAAmB,sKAC7C;;KAEJ,MAAM,IACL5B,eAAe,CAAC6B,oBAAoB,KAAKjD,oBAAoB,CAACqD,WAAW,IACzEjC,eAAe,CAAC6B,oBAAoB,KAAKjD,oBAAoB,CAACsD,UAAU,EACxE;MAGA,MAAM,IAAIzD,UAAU,CAClB,oCAAoC,6BACXmD,mBAAmB,0BAC7C;;;EAGL,OAAO3C,WAAW;AACpB;AAEA,eAAekB,SAAsB","names":["CodedError","NativeModulesProxy","AppOwnership","ExecutionEnvironment","UserInterfaceIdiom","ExponentConstants","console","warn","rawManifest","ExpoUpdates","updatesManifest","manifest","manifestString","JSON","parse","Object","keys","length","NativeModules","EXDevLauncher","devLauncherManifest","name","appOwnership","nativeConstants","warnedAboutDeviceYearClass","warnedAboutIosModel","constants","defineProperties","deviceYearClass","get","enumerable","installationId","__unsafeNoWarnManifest","maybeManifest","getManifest","isAppManifest","__unsafeNoWarnManifest2","isManifest","manifest2","expoConfig","extra","expoClient","__rawManifest_TEST","set","value","platform","ios","originalModel","model","defineProperty","suppressWarning","invalidManifestType","executionEnvironment","Bare","Platform","OS","StoreClient","Standalone"],"sources":["/Users/mathildejean/Documents/BUT/LaSuperMeteo/LaSuperMeteo/iut-expo-starter/node_modules/expo-constants/src/Constants.ts"],"sourcesContent":["import { ExpoConfig } from '@expo/config-types';\nimport { CodedError, NativeModulesProxy } from 'expo-modules-core';\nimport { Platform, NativeModules } from 'react-native';\n\nimport {\n AndroidManifest,\n AppManifest,\n AppOwnership,\n Constants,\n ExecutionEnvironment,\n IOSManifest,\n Manifest,\n NativeConstants,\n PlatformManifest,\n UserInterfaceIdiom,\n WebManifest,\n} from './Constants.types';\nimport ExponentConstants from './ExponentConstants';\n\nexport {\n AndroidManifest,\n AppOwnership,\n Constants,\n ExecutionEnvironment,\n IOSManifest,\n NativeConstants,\n PlatformManifest,\n UserInterfaceIdiom,\n WebManifest,\n};\n\nif (!ExponentConstants) {\n console.warn(\n \"No native ExponentConstants module found, are you sure the expo-constants's module is linked properly?\"\n );\n}\n\nlet rawManifest: AppManifest | Manifest | null = null;\n// If expo-updates defines a non-empty manifest, prefer that one\nif (NativeModulesProxy.ExpoUpdates) {\n let updatesManifest;\n if (NativeModulesProxy.ExpoUpdates.manifest) {\n updatesManifest = NativeModulesProxy.ExpoUpdates.manifest;\n } else if (NativeModulesProxy.ExpoUpdates.manifestString) {\n updatesManifest = JSON.parse(NativeModulesProxy.ExpoUpdates.manifestString);\n }\n if (updatesManifest && Object.keys(updatesManifest).length > 0) {\n rawManifest = updatesManifest;\n }\n}\n\n// If dev-launcher defines a non-empty manifest, prefer that one\nif (NativeModules.EXDevLauncher) {\n let devLauncherManifest;\n if (NativeModules.EXDevLauncher.manifestString) {\n devLauncherManifest = JSON.parse(NativeModules.EXDevLauncher.manifestString);\n }\n\n if (devLauncherManifest && Object.keys(devLauncherManifest).length > 0) {\n rawManifest = devLauncherManifest;\n }\n}\n\n// Fall back to ExponentConstants.manifest if we don't have one from Updates\nif (!rawManifest && ExponentConstants && ExponentConstants.manifest) {\n rawManifest = ExponentConstants.manifest;\n // On Android we pass the manifest in JSON form so this step is necessary\n if (typeof rawManifest === 'string') {\n rawManifest = JSON.parse(rawManifest);\n }\n}\n\nconst { name, appOwnership, ...nativeConstants } = (ExponentConstants || {}) as any;\n\nlet warnedAboutDeviceYearClass = false;\nlet warnedAboutIosModel = false;\n\nconst constants: Constants = {\n ...nativeConstants,\n // Ensure this is null in bare workflow\n appOwnership: appOwnership ?? null,\n};\n\nObject.defineProperties(constants, {\n // Deprecated field\n deviceYearClass: {\n get() {\n if (!warnedAboutDeviceYearClass) {\n console.warn(\n `Constants.deviceYearClass has been deprecated in favor of expo-device's Device.deviceYearClass property. This API will be removed in SDK 45.`\n );\n warnedAboutDeviceYearClass = true;\n }\n return nativeConstants.deviceYearClass;\n },\n enumerable: false,\n },\n installationId: {\n get() {\n return nativeConstants.installationId;\n },\n enumerable: false,\n },\n /**\n * Use `manifest` property by default.\n * This property is only used for internal purposes.\n * It behaves similarly to the original one, but suppresses warning upon no manifest available.\n * `expo-asset` uses it to prevent users from seeing mentioned warning.\n */\n __unsafeNoWarnManifest: {\n get(): AppManifest | Manifest | null {\n const maybeManifest = getManifest(true);\n if (!maybeManifest || !isAppManifest(maybeManifest)) {\n return null;\n }\n return maybeManifest;\n },\n enumerable: false,\n },\n __unsafeNoWarnManifest2: {\n get(): Manifest | null {\n const maybeManifest = getManifest(true);\n if (!maybeManifest || !isManifest(maybeManifest)) {\n return null;\n }\n return maybeManifest;\n },\n enumerable: false,\n },\n manifest: {\n get(): AppManifest | null {\n const maybeManifest = getManifest();\n if (!maybeManifest || !isAppManifest(maybeManifest)) {\n return null;\n }\n return maybeManifest;\n },\n enumerable: true,\n },\n manifest2: {\n get(): Manifest | null {\n const maybeManifest = getManifest();\n if (!maybeManifest || !isManifest(maybeManifest)) {\n return null;\n }\n return maybeManifest;\n },\n enumerable: true,\n },\n expoConfig: {\n get(): ExpoConfig | null {\n const maybeManifest = getManifest(true);\n if (!maybeManifest) {\n return null;\n }\n\n if (isManifest(maybeManifest)) {\n return maybeManifest.extra?.expoClient ?? null;\n } else if (isAppManifest(maybeManifest)) {\n return maybeManifest;\n }\n\n return null;\n },\n enumerable: true,\n },\n __rawManifest_TEST: {\n get(): AppManifest | Manifest | null {\n return rawManifest;\n },\n set(value: AppManifest | Manifest | null) {\n rawManifest = value;\n },\n enumerable: false,\n },\n});\n\n// Add deprecation warning for `platform.ios.model`\nif (constants?.platform?.ios) {\n const originalModel = nativeConstants.platform.ios.model;\n Object.defineProperty(constants.platform.ios, 'model', {\n get() {\n if (!warnedAboutIosModel) {\n console.warn(\n `Constants.platform.ios.model has been deprecated in favor of expo-device's Device.modelName property. This API will be removed in SDK 45.`\n );\n warnedAboutIosModel = true;\n }\n return originalModel;\n },\n enumerable: false,\n });\n}\n\nfunction isAppManifest(manifest: AppManifest | Manifest): manifest is AppManifest {\n return !isManifest(manifest);\n}\n\nfunction isManifest(manifest: AppManifest | Manifest): manifest is Manifest {\n return 'metadata' in manifest;\n}\n\nfunction getManifest(suppressWarning = false): AppManifest | Manifest | null {\n if (!rawManifest) {\n const invalidManifestType = rawManifest === null ? 'null' : 'undefined';\n if (\n nativeConstants.executionEnvironment === ExecutionEnvironment.Bare &&\n Platform.OS !== 'web'\n ) {\n if (!suppressWarning) {\n console.warn(\n `Constants.manifest is ${invalidManifestType} because the embedded app.config could not be read. Ensure that you have installed the expo-constants build scripts if you need to read from Constants.manifest.`\n );\n }\n } else if (\n nativeConstants.executionEnvironment === ExecutionEnvironment.StoreClient ||\n nativeConstants.executionEnvironment === ExecutionEnvironment.Standalone\n ) {\n // If we somehow get here, this is a truly exceptional state to be in.\n // Constants.manifest should *always* be defined in those contexts.\n throw new CodedError(\n 'ERR_CONSTANTS_MANIFEST_UNAVAILABLE',\n `Constants.manifest is ${invalidManifestType}, must be an object.`\n );\n }\n }\n return rawManifest;\n}\n\nexport default constants as Constants;\n"]},"metadata":{},"sourceType":"module","externalDependencies":[]} |