@feedmepos/mf-connect 0.1.56-prod → 0.1.58-prod

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (128) hide show
  1. package/package.json +1 -1
  2. package/dist/Analytic-XUI4rZyP.js +0 -427
  3. package/dist/App-vv5J1Ebe.js +0 -4630
  4. package/dist/Bin-D4V36uXK.js +0 -166
  5. package/dist/Broadcast-BvW27G77.js +0 -233
  6. package/dist/CampaignTypeDialog.vue_vue_type_script_setup_true_lang-D2MC6Gy1.js +0 -121
  7. package/dist/Card-C7xLv1Fb.js +0 -911
  8. package/dist/ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js +0 -97
  9. package/dist/Collections-BKfS-bGL.js +0 -458
  10. package/dist/Credit-CGmWQq0t.js +0 -228
  11. package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-Du7fRSZC.js +0 -128
  12. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-C2p6_R01.js +0 -2194
  13. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-BGlaqjWp.js +0 -348
  14. package/dist/Experience-CT7Yab3W.js +0 -229
  15. package/dist/FileSaver.min-NlMItPOc.js +0 -74
  16. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +0 -129
  17. package/dist/Game-DtW4rtYQ.js +0 -284
  18. package/dist/ImageInput.vue_vue_type_script_setup_true_lang-D1KQpDGg.js +0 -144
  19. package/dist/Index-Bs5ob9Km.js +0 -259
  20. package/dist/JsonViewer-v8_C7l5N.js +0 -87
  21. package/dist/LottieAnimation.vue_vue_type_script_setup_true_lang-CyGJxUol.js +0 -18737
  22. package/dist/MainLayout-B1aJoR95.js +0 -41
  23. package/dist/Marketing-tA350rTd.js +0 -319
  24. package/dist/Member-CZoTXgKz.js +0 -279
  25. package/dist/MemberList-ChwyPtmW.js +0 -1607
  26. package/dist/MemberOverview-wL_ailso.js +0 -58
  27. package/dist/MemberTransactions-Cchtvxm9.js +0 -45
  28. package/dist/MessageInput.vue_vue_type_script_setup_true_lang-Bo0EnHBx.js +0 -60553
  29. package/dist/Mission-DDpelLqN.js +0 -302
  30. package/dist/Overview-Da3ewBat.js +0 -1079
  31. package/dist/Point-CggE8VUk.js +0 -232
  32. package/dist/Promotion-DxvbZhgQ.js +0 -289
  33. package/dist/Queue-fIxlHrMd.js +0 -260
  34. package/dist/Record-Bv90_VUG.js +0 -341
  35. package/dist/Reward-BWYLk7aC.js +0 -442
  36. package/dist/RewardGroup.vue_vue_type_script_setup_true_lang-CjYEtENe.js +0 -150
  37. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-Ak1R8Y2a.js +0 -1763
  38. package/dist/Segment-_VGdBy3a.js +0 -882
  39. package/dist/SelectItems.vue_vue_type_script_setup_true_lang-Dm4hF1n1.js +0 -181
  40. package/dist/SendCollectionSheet.vue_vue_type_script_setup_true_lang-DWDMhmNr.js +0 -188
  41. package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-Czy25PII.js +0 -147
  42. package/dist/Setting-7fTz1dJa.js +0 -1936
  43. package/dist/Store-TQHKR__B.js +0 -1842
  44. package/dist/StoreRewards-DZy1ZwiI.js +0 -423
  45. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-Cae25Vr6.js +0 -995
  46. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-BVVEzpyP.js +0 -139
  47. package/dist/Tier-CK53vdbl.js +0 -895
  48. package/dist/Title-CGWPq_FF.js +0 -566
  49. package/dist/Transaction-DjJ03PfX.js +0 -39
  50. package/dist/UserRuleGroup.vue_vue_type_script_setup_true_lang-DNSdyxrF.js +0 -130
  51. package/dist/Voucher-D6RuJjNn.js +0 -384
  52. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-D4iCOq3V.js +0 -419
  53. package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-BFz8RvY_.js +0 -56
  54. package/dist/_commonjsHelpers-BkfeUUK-.js +0 -28
  55. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
  56. package/dist/app-BLlAxdVk.js +0 -57962
  57. package/dist/app-_rmIFJ8M.js +0 -7057
  58. package/dist/app-wDQR6dpb.js +0 -39
  59. package/dist/app.js +0 -6
  60. package/dist/business-gJ9fK_2b.js +0 -82
  61. package/dist/campaign-BfznfcHc.js +0 -94
  62. package/dist/campaign-C_Yq-ffV.js +0 -1810
  63. package/dist/campaign-CpzFl8Vr.js +0 -4
  64. package/dist/campaign.enum-Dsbpz7BO.js +0 -20
  65. package/dist/campaign.fn-C6vKb-lp.js +0 -758
  66. package/dist/collectible.enum-DNpj_oyC.js +0 -19
  67. package/dist/collection.fn-Cgo0sPL2.js +0 -26
  68. package/dist/dto-CaSQ4Pp9.js +0 -216
  69. package/dist/effect-DuH74x-N.js +0 -78
  70. package/dist/email-addresses-DXr-Qqt9.js +0 -705
  71. package/dist/export-tMPFlVV0.js +0 -97
  72. package/dist/feedme.ico +0 -0
  73. package/dist/helper-CJTseW10.js +0 -71
  74. package/dist/index-8RETBwYy.js +0 -8861
  75. package/dist/index-B57kxqv7.js +0 -3
  76. package/dist/index-BNUuy_4R.js +0 -44
  77. package/dist/index-BSJ-4JYy.js +0 -146
  78. package/dist/index-BTpBLMHl.js +0 -3070
  79. package/dist/index-C6Iyn1Q6.js +0 -54
  80. package/dist/index-CWI06v9e.js +0 -31
  81. package/dist/index-CdnKwJuz.js +0 -30076
  82. package/dist/index-Cr_9Bqa1.js +0 -121
  83. package/dist/index-CuvNtC_M.js +0 -61
  84. package/dist/index-DTyfvK3U.js +0 -2130
  85. package/dist/index-Dn0gJspN.js +0 -32269
  86. package/dist/index-IHKkNyxb.js +0 -38
  87. package/dist/index-J3TDCX-5.js +0 -76
  88. package/dist/index-V9kRRAB1.js +0 -32
  89. package/dist/index-vh86FiIQ.js +0 -10
  90. package/dist/index.esm2017-P2nmohVw.js +0 -3069
  91. package/dist/loading-D5ZAAdUU.js +0 -71
  92. package/dist/lodash-B5I3zXaY.js +0 -3678
  93. package/dist/membership-xl9aKOQ_.js +0 -235
  94. package/dist/moment-D7p2TMB-.js +0 -2583
  95. package/dist/money-CIHN3jJZ.js +0 -15
  96. package/dist/number-BN4-Jdog.js +0 -12
  97. package/dist/object-qECH92oz.js +0 -26
  98. package/dist/objectId-dwaoBfJX.js +0 -7
  99. package/dist/objectid-Dh6RD0Tk.js +0 -145
  100. package/dist/plugins-CJlgzIv2.js +0 -208
  101. package/dist/reward-C8mezXzs.js +0 -36
  102. package/dist/rule-9VRIJFHZ.js +0 -1951
  103. package/dist/rule-builder-CZUgrDAw.js +0 -102
  104. package/dist/style.css +0 -4
  105. package/dist/template-aPJnNGLi.js +0 -190
  106. package/dist/tier-BJDhpH6X.js +0 -4
  107. package/dist/tiers/tier=1.png +0 -0
  108. package/dist/tiers/tier=2.png +0 -0
  109. package/dist/tiers/tier=3.png +0 -0
  110. package/dist/tiers/tier=4.png +0 -0
  111. package/dist/timezone-CpvXaiqq.js +0 -1151
  112. package/dist/titles/type=diamond.png +0 -0
  113. package/dist/titles/type=drinks.png +0 -0
  114. package/dist/titles/type=food.png +0 -0
  115. package/dist/titles/type=heart.png +0 -0
  116. package/dist/titles/type=medal.png +0 -0
  117. package/dist/titles/type=spend.png +0 -0
  118. package/dist/titles/type=thank-you.png +0 -0
  119. package/dist/titles/type=thumbs-up.png +0 -0
  120. package/dist/titles/type=years.png +0 -0
  121. package/dist/trigger-BfrtcBd-.js +0 -144
  122. package/dist/tslib.es6-BCqqvLQ_.js +0 -44
  123. package/dist/type_drinks-D6jnpvwV.js +0 -4
  124. package/dist/usePagination-Ds-cuHop.js +0 -223
  125. package/dist/user-Bt1C0yV5.js +0 -54
  126. package/dist/vue-i18n-OdHHHpEE.js +0 -2365
  127. package/dist/xlsx-BgB0dYfE.js +0 -15491
  128. package/dist/zod-Bg2FbC-D.js +0 -90
@@ -1,3069 +0,0 @@
1
- var Y = { env: { GITHUB_STATE: "/home/runner/work/_temp/_runner_file_commands/save_state_2068ca6b-d641-4d48-944e-47b66e44be63", npm_package_dependencies_zod: "3.22.4", npm_package_devDependencies__types_node: "^18.19.41", DOTNET_NOLOGO: "1", npm_package_dependencies_pinia: "^2.1.7", npm_package_dependencies_vite_plugin_vue_devtools: "^7.6.4", USER: "runner", npm_config_user_agent: "pnpm/9.15.9 npm/? node/v20.19.6 linux x64", CI: "true", npm_package_dependencies_vue: "^3.5.13", RUNNER_ENVIRONMENT: "github-hosted", GITHUB_ENV: "/home/runner/work/_temp/_runner_file_commands/set_env_2068ca6b-d641-4d48-944e-47b66e44be63", PIPX_HOME: "/opt/pipx", npm_package_devDependencies_vite: "^5.3.4", npm_node_execpath: "/opt/hostedtoolcache/node/20.19.6/x64/bin/node", JAVA_HOME_8_X64: "/usr/lib/jvm/temurin-8-jdk-amd64", SHLVL: "1", npm_package_files_0: "dist", HOME: "/home/runner", npm_package_dependencies_moment_timezone: "^0.6.0", RUNNER_TEMP: "/home/runner/work/_temp", GITHUB_EVENT_PATH: "/home/runner/work/_temp/_github_workflow/event.json", npm_package_scripts_build_mf_dev: "vite build --mode fmmf", npm_package_dependencies__types_qrcode: "^1.5.5", JAVA_HOME_11_X64: "/usr/lib/jvm/temurin-11-jdk-amd64", PIPX_BIN_DIR: "/opt/pipx_bin", GITHUB_REPOSITORY_OWNER: "feedmepos", npm_package_scripts_build_mf_prod: "vite build --mode fmmf:prod", npm_package_dependencies_change_case: "^5.4.4", NODE_OPTIONS: "--max-old-space-size=8096", GRADLE_HOME: "/usr/share/gradle-9.2.1", ANDROID_NDK_LATEST_HOME: "/usr/local/lib/android/sdk/ndk/29.0.14206865", JAVA_HOME_21_X64: "/usr/lib/jvm/temurin-21-jdk-amd64", GITHUB_RETENTION_DAYS: "90", npm_package_dependencies__feedmepos_mf_common: "1.27.2", npm_package_dependencies_fabric: "^6.4.2", npm_package_dependencies_zod_i18n_map: "2.27.0", GITHUB_REPOSITORY_OWNER_ID: "54831515", POWERSHELL_DISTRIBUTION_CHANNEL: "GitHub-Actions-ubuntu24", AZURE_EXTENSION_DIR: "/opt/az/azcliextensions", GITHUB_HEAD_REF: "", npm_package_devDependencies__types_file_saver: "^2.0.7", SYSTEMD_EXEC_PID: "1785", npm_package_dependencies__feedmepos_ui_library: "1.6.7", npm_package_dependencies_dayjs: "^1.11.12", npm_package_dependencies_dotenv: "^16.4.5", npm_package_dependencies_moment: "^2.30.1", GITHUB_GRAPHQL_URL: "https://api.github.com/graphql", npm_package_scripts_build_only_dev: "pnpm build:mf:dev", npm_package_dependencies__tailwindcss_typography: "^0.5.16", npm_package_dependencies_i18next: "24.2.1", npm_package_devDependencies_tailwindcss: "^3.4.6", npm_package_devDependencies_typescript: "^5.5.3", JAVA_HOME_25_X64: "/usr/lib/jvm/temurin-25-jdk-amd64", NVM_DIR: "/home/runner/.nvm", npm_package_scripts_build_dev: "cross-env NODE_OPTIONS=--max-old-space-size=4096 vite build --mode development", npm_package_scripts_build_only_prod: "pnpm build:mf:prod", npm_package_dependencies_xlsx: "^0.18.5", npm_package_devDependencies_vue_tsc: "^2.0.26", DOTNET_SKIP_FIRST_TIME_EXPERIENCE: "1", JAVA_HOME_17_X64: "/usr/lib/jvm/temurin-17-jdk-amd64", ImageVersion: "20251215.174.1", npm_package_scripts_dev: "vite", npm_package_scripts_build_prod: "cross-env NODE_OPTIONS=--max-old-space-size=4096 vite build --mode production", npm_package_dependencies_unplugin_auto_import: "^0.17.8", LOGNAME: "runner", RUNNER_OS: "Linux", GITHUB_API_URL: "https://api.github.com", GOROOT_1_22_X64: "/opt/hostedtoolcache/go/1.22.12/x64", STORE_PATH: "/home/runner/setup-pnpm/node_modules/.bin/store/v3", SWIFT_PATH: "/usr/share/swift/usr/bin", npm_package_type: "module", CHROMEWEBDRIVER: "/usr/local/share/chromedriver-linux64", GOROOT_1_23_X64: "/opt/hostedtoolcache/go/1.23.12/x64", JOURNAL_STREAM: "9:12872", GITHUB_WORKFLOW: "[CD:prod] connect-portal (mf-connect)", _: "/home/runner/setup-pnpm/node_modules/.bin/pnpm", npm_package_module: "./dist/app.js", npm_package_devDependencies_autoprefixer: "^10.4.19", MEMORY_PRESSURE_WATCH: "/sys/fs/cgroup/system.slice/hosted-compute-agent.service/memory.pressure", GOROOT_1_24_X64: "/opt/hostedtoolcache/go/1.24.11/x64", npm_package_devDependencies__types_uuid: "^9.0.8", npm_package_devDependencies_unlayer_types: "^1.157.0", npm_config_registry: "https://registry.npmjs.org/", ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE: "/opt/actionarchivecache", GOROOT_1_25_X64: "/opt/hostedtoolcache/go/1.25.5/x64", GITHUB_RUN_ID: "20713669803", npm_package_dependencies_bson_objectid: "^2.0.4", npm_package_devDependencies__types_lodash: "^4.17.7", GITHUB_REF_TYPE: "tag", BOOTSTRAP_HASKELL_NONINTERACTIVE: "1", GITHUB_WORKFLOW_SHA: "803586a6e9841cb3a69312417c7c978615d25d35", GITHUB_BASE_REF: "", ImageOS: "ubuntu24", npm_package_exports___import: "./dist/app.js", npm_package_dependencies__ckeditor_ckeditor5_vue: "^7.3.0", npm_package_devDependencies__vitejs_plugin_vue: "^5.0.5", GITHUB_WORKFLOW_REF: "feedmepos/marketing-services/.github/workflows/[PROD] deploy-mf-connect.yml@refs/tags/mf-connect-0.1.56-prod", GITHUB_ACTION_REPOSITORY: "", ENABLE_RUNNER_TRACING: "true", npm_package_dependencies_axios: "^1.7.2", npm_config_node_gyp: "/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/dist/node_modules/node-gyp/bin/node-gyp.js", PATH: "/home/runner/work/marketing-services/marketing-services/packages/connect/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/marketing-services/marketing-services/packages/connect/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/dist/node-gyp-bin:/home/runner/setup-pnpm/node_modules/.bin:/opt/hostedtoolcache/node/20.19.6/x64/bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin", ANT_HOME: "/usr/share/ant", DOTNET_MULTILEVEL_LOOKUP: "0", RUNNER_TRACKING_ID: "github_84868106-4b38-4122-ba90-fcebea81266e", INVOCATION_ID: "2cc6b5def6154e229a9ba4147825de1b", RUNNER_TOOL_CACHE: "/opt/hostedtoolcache", NODE: "/opt/hostedtoolcache/node/20.19.6/x64/bin/node", npm_package_name: "@feedmepos/mf-connect", npm_package_scripts_deploy_dev: "pnpm run build-only:dev && pnpm publish --no-git-checks .", npm_package_dependencies_cross_env: "^7.0.3", npm_package_dependencies_file_saver: "^2.0.5", GITHUB_ACTION: "__run_5", GITHUB_RUN_NUMBER: "38", GITHUB_TRIGGERING_ACTOR: "qaijunse", RUNNER_ARCH: "X64", XDG_RUNTIME_DIR: "/run/user/1001", AGENT_TOOLSDIRECTORY: "/opt/hostedtoolcache", npm_package_scripts_deploy_prod: "pnpm run build-only:prod && pnpm publish --no-git-checks .", npm_config_frozen_lockfile: "", LANG: "C.UTF-8", VCPKG_INSTALLATION_ROOT: "/usr/local/share/vcpkg", npm_package_dependencies__feedmepos_mf_core_ui: "1.0.21", CONDA: "/usr/share/miniconda", RUNNER_NAME: "GitHub Actions 1000036338", XDG_CONFIG_HOME: "/home/runner/.config", GITHUB_REF_NAME: "mf-connect-0.1.56-prod", GITHUB_REPOSITORY: "feedmepos/marketing-services", npm_package_scripts_build_dts: "vue-tsc --declaration --noEmit false --emitDeclarationOnly -p tsconfig.json --outDir ./dist && mv ./dist/src/* dist", npm_package_scripts_build_types: "vue-tsc --declaration --emitDeclarationOnly -p tsconfig.json --outDir dist --composite false", npm_package_dependencies__feedmepos_core: "2.14.36", npm_lifecycle_script: "vite build --mode fmmf:prod", ANDROID_NDK_ROOT: "/usr/local/lib/android/sdk/ndk/27.3.13750724", GITHUB_ACTION_REF: "", DEBIAN_FRONTEND: "noninteractive", npm_package_dependencies_rrule: "^2.8.1", npm_package_dependencies_vue3_lottie: "^3.3.0", SHELL: "/bin/bash", GITHUB_REPOSITORY_ID: "615151795", GITHUB_ACTIONS: "true", NODE_PATH: "/home/runner/work/marketing-services/marketing-services/packages/connect/node_modules/.pnpm/vite@5.3.4_@types+node@18.19.41/node_modules/vite/bin/node_modules:/home/runner/work/marketing-services/marketing-services/packages/connect/node_modules/.pnpm/vite@5.3.4_@types+node@18.19.41/node_modules/vite/node_modules:/home/runner/work/marketing-services/marketing-services/packages/connect/node_modules/.pnpm/vite@5.3.4_@types+node@18.19.41/node_modules:/home/runner/work/marketing-services/marketing-services/packages/connect/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules", npm_package_version: "0.1.56-prod", npm_package_dependencies_ckeditor5: "^44.3.0", npm_lifecycle_event: "build:mf:prod", GITHUB_REF_PROTECTED: "false", npm_package_scripts_build: "vue-tsc && vite build", npm_package_dependencies_uuid: "^10.0.0", npm_package_dependencies_vue_i18n: "10.0.5", GITHUB_WORKSPACE: "/home/runner/work/marketing-services/marketing-services", ACCEPT_EULA: "Y", GITHUB_JOB: "deploy", npm_package_dependencies_lodash: "^4.17.21", GITHUB_SHA: "803586a6e9841cb3a69312417c7c978615d25d35", GITHUB_RUN_ATTEMPT: "1", npm_package_exports___style: "./dist/style.css", npm_package_dependencies__ckeditor_ckeditor5_build_classic: "^44.3.0", npm_package_dependencies_vue_router: "^4.4.0", GITHUB_REF: "refs/tags/mf-connect-0.1.56-prod", GITHUB_ACTOR: "qaijunse", ANDROID_SDK_ROOT: "/usr/local/lib/android/sdk", npm_package_license: "UNLICENSED", npm_package_dependencies_email_addresses: "^5.0.0", npm_package_dependencies_firebase: "^10.12.4", npm_package_dependencies_qrcode: "^1.5.3", GITHUB_PATH: "/home/runner/work/_temp/_runner_file_commands/add_path_2068ca6b-d641-4d48-944e-47b66e44be63", JAVA_HOME: "/usr/lib/jvm/temurin-17-jdk-amd64", PWD: "/home/runner/work/marketing-services/marketing-services/packages/connect", GITHUB_ACTOR_ID: "39590157", RUNNER_WORKSPACE: "/home/runner/work/marketing-services", npm_execpath: "/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/bin/pnpm.cjs", HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS: "3650", GITHUB_EVENT_NAME: "push", HOMEBREW_NO_AUTO_UPDATE: "1", ANDROID_HOME: "/usr/local/lib/android/sdk", GITHUB_SERVER_URL: "https://github.com", GECKOWEBDRIVER: "/usr/local/share/gecko_driver", GHCUP_INSTALL_BASE_PREFIX: "/usr/local", GITHUB_OUTPUT: "/home/runner/work/_temp/_runner_file_commands/set_output_2068ca6b-d641-4d48-944e-47b66e44be63", npm_package_exports___types: "./dist/packages/connect/src/app.d.ts", EDGEWEBDRIVER: "/usr/local/share/edge_driver", PNPM_SCRIPT_SRC_DIR: "/home/runner/work/marketing-services/marketing-services/packages/connect", npm_package_devDependencies_postcss: "^8.4.39", npm_command: "run-script", ANDROID_NDK: "/usr/local/lib/android/sdk/ndk/27.3.13750724", SGX_AESM_ADDR: "1", CHROME_BIN: "/usr/bin/google-chrome", npm_package_scripts_preview: "vite preview", SELENIUM_JAR_PATH: "/usr/share/java/selenium-server.jar", MEMORY_PRESSURE_WRITE: "c29tZSAyMDAwMDAgMjAwMDAwMAA=", PNPM_HOME: "/home/runner/setup-pnpm/node_modules/.bin", npm_package_dependencies__feedmepos_menu: "1.0.34", ANDROID_NDK_HOME: "/usr/local/lib/android/sdk/ndk/27.3.13750724", GITHUB_STEP_SUMMARY: "/home/runner/work/_temp/_runner_file_commands/step_summary_2068ca6b-d641-4d48-944e-47b66e44be63", INIT_CWD: "/home/runner/work/marketing-services/marketing-services/packages/connect", NODE_ENV: "production", FEEDME_NAMESPACE: "prod", FIREBASE_API_KEY: "AIzaSyA_isPR1-9bX7UmRiJIhsIRNNwdn6DdmW4", FIREBASE_AUTH_DOMAIN: "feedme-253402.firebaseapp.com", FIREBASE_DATABASE_URL: "https://feedme-253402.firebaseio.com", FIREBASE_PROJECT_ID: "feedme-253402", FIREBASE_STORAGE_BUCKET: "image.feedme.cc", FIREBASE_MESSAGING_SENDER_ID: "128512026847", FIREBASE_APP_ID: "1:128512026847:web:7c5c8ab7e8b90502dc616a", FIREBASE_MEASUREMENT_ID: "G-LTKS7N2HQS", ASSET_STORAGE_BUCKET: "static.feedme.cc", IMPORT_FILES_STORAGE_BUCKET: "feedme-253402.appspot.com", AUTH_URL: "https://portal-v2.feedmeapi.com/", SLACK_WEBHOOK_URL: "https://hooks.slack.com/services/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", MEMBER_APP_URL: "feedme.vip", CRM_APP_URL: "crm.feedme.cc", MARKETING_V1_PORTAL: "https://marketing-v1.feedme.cc", CLIENT_ID: "d5f8840d63dbb758b6c4ee2a5e8b013d15dd25e242c457481326062b83962476", PAYMENT_PORTAL_URL: "https://portal.feedme.cc/payment/payout-account", LICENSE_PORTAL_URL: "https://license.feedme.cc/" } };
2
- /**
3
- * @license
4
- * Copyright 2017 Google LLC
5
- *
6
- * Licensed under the Apache License, Version 2.0 (the "License");
7
- * you may not use this file except in compliance with the License.
8
- * You may obtain a copy of the License at
9
- *
10
- * http://www.apache.org/licenses/LICENSE-2.0
11
- *
12
- * Unless required by applicable law or agreed to in writing, software
13
- * distributed under the License is distributed on an "AS IS" BASIS,
14
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
- * See the License for the specific language governing permissions and
16
- * limitations under the License.
17
- */
18
- const Ue = function(t) {
19
- const e = [];
20
- let n = 0;
21
- for (let r = 0; r < t.length; r++) {
22
- let s = t.charCodeAt(r);
23
- s < 128 ? e[n++] = s : s < 2048 ? (e[n++] = s >> 6 | 192, e[n++] = s & 63 | 128) : (s & 64512) === 55296 && r + 1 < t.length && (t.charCodeAt(r + 1) & 64512) === 56320 ? (s = 65536 + ((s & 1023) << 10) + (t.charCodeAt(++r) & 1023), e[n++] = s >> 18 | 240, e[n++] = s >> 12 & 63 | 128, e[n++] = s >> 6 & 63 | 128, e[n++] = s & 63 | 128) : (e[n++] = s >> 12 | 224, e[n++] = s >> 6 & 63 | 128, e[n++] = s & 63 | 128);
24
- }
25
- return e;
26
- }, ot = function(t) {
27
- const e = [];
28
- let n = 0, r = 0;
29
- for (; n < t.length; ) {
30
- const s = t[n++];
31
- if (s < 128)
32
- e[r++] = String.fromCharCode(s);
33
- else if (s > 191 && s < 224) {
34
- const o = t[n++];
35
- e[r++] = String.fromCharCode((s & 31) << 6 | o & 63);
36
- } else if (s > 239 && s < 365) {
37
- const o = t[n++], i = t[n++], a = t[n++], c = ((s & 7) << 18 | (o & 63) << 12 | (i & 63) << 6 | a & 63) - 65536;
38
- e[r++] = String.fromCharCode(55296 + (c >> 10)), e[r++] = String.fromCharCode(56320 + (c & 1023));
39
- } else {
40
- const o = t[n++], i = t[n++];
41
- e[r++] = String.fromCharCode((s & 15) << 12 | (o & 63) << 6 | i & 63);
42
- }
43
- }
44
- return e.join("");
45
- }, Be = {
46
- /**
47
- * Maps bytes to characters.
48
- */
49
- byteToCharMap_: null,
50
- /**
51
- * Maps characters to bytes.
52
- */
53
- charToByteMap_: null,
54
- /**
55
- * Maps bytes to websafe characters.
56
- * @private
57
- */
58
- byteToCharMapWebSafe_: null,
59
- /**
60
- * Maps websafe characters to bytes.
61
- * @private
62
- */
63
- charToByteMapWebSafe_: null,
64
- /**
65
- * Our default alphabet, shared between
66
- * ENCODED_VALS and ENCODED_VALS_WEBSAFE
67
- */
68
- ENCODED_VALS_BASE: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",
69
- /**
70
- * Our default alphabet. Value 64 (=) is special; it means "nothing."
71
- */
72
- get ENCODED_VALS() {
73
- return this.ENCODED_VALS_BASE + "+/=";
74
- },
75
- /**
76
- * Our websafe alphabet.
77
- */
78
- get ENCODED_VALS_WEBSAFE() {
79
- return this.ENCODED_VALS_BASE + "-_.";
80
- },
81
- /**
82
- * Whether this browser supports the atob and btoa functions. This extension
83
- * started at Mozilla but is now implemented by many browsers. We use the
84
- * ASSUME_* variables to avoid pulling in the full useragent detection library
85
- * but still allowing the standard per-browser compilations.
86
- *
87
- */
88
- HAS_NATIVE_SUPPORT: typeof atob == "function",
89
- /**
90
- * Base64-encode an array of bytes.
91
- *
92
- * @param input An array of bytes (numbers with
93
- * value in [0, 255]) to encode.
94
- * @param webSafe Boolean indicating we should use the
95
- * alternative alphabet.
96
- * @return The base64 encoded string.
97
- */
98
- encodeByteArray(t, e) {
99
- if (!Array.isArray(t))
100
- throw Error("encodeByteArray takes an array as a parameter");
101
- this.init_();
102
- const n = e ? this.byteToCharMapWebSafe_ : this.byteToCharMap_, r = [];
103
- for (let s = 0; s < t.length; s += 3) {
104
- const o = t[s], i = s + 1 < t.length, a = i ? t[s + 1] : 0, c = s + 2 < t.length, u = c ? t[s + 2] : 0, f = o >> 2, h = (o & 3) << 4 | a >> 4;
105
- let _ = (a & 15) << 2 | u >> 6, m = u & 63;
106
- c || (m = 64, i || (_ = 64)), r.push(n[f], n[h], n[_], n[m]);
107
- }
108
- return r.join("");
109
- },
110
- /**
111
- * Base64-encode a string.
112
- *
113
- * @param input A string to encode.
114
- * @param webSafe If true, we should use the
115
- * alternative alphabet.
116
- * @return The base64 encoded string.
117
- */
118
- encodeString(t, e) {
119
- return this.HAS_NATIVE_SUPPORT && !e ? btoa(t) : this.encodeByteArray(Ue(t), e);
120
- },
121
- /**
122
- * Base64-decode a string.
123
- *
124
- * @param input to decode.
125
- * @param webSafe True if we should use the
126
- * alternative alphabet.
127
- * @return string representing the decoded value.
128
- */
129
- decodeString(t, e) {
130
- return this.HAS_NATIVE_SUPPORT && !e ? atob(t) : ot(this.decodeStringToByteArray(t, e));
131
- },
132
- /**
133
- * Base64-decode a string.
134
- *
135
- * In base-64 decoding, groups of four characters are converted into three
136
- * bytes. If the encoder did not apply padding, the input length may not
137
- * be a multiple of 4.
138
- *
139
- * In this case, the last group will have fewer than 4 characters, and
140
- * padding will be inferred. If the group has one or two characters, it decodes
141
- * to one byte. If the group has three characters, it decodes to two bytes.
142
- *
143
- * @param input Input to decode.
144
- * @param webSafe True if we should use the web-safe alphabet.
145
- * @return bytes representing the decoded value.
146
- */
147
- decodeStringToByteArray(t, e) {
148
- this.init_();
149
- const n = e ? this.charToByteMapWebSafe_ : this.charToByteMap_, r = [];
150
- for (let s = 0; s < t.length; ) {
151
- const o = n[t.charAt(s++)], a = s < t.length ? n[t.charAt(s)] : 0;
152
- ++s;
153
- const u = s < t.length ? n[t.charAt(s)] : 64;
154
- ++s;
155
- const h = s < t.length ? n[t.charAt(s)] : 64;
156
- if (++s, o == null || a == null || u == null || h == null)
157
- throw new it();
158
- const _ = o << 2 | a >> 4;
159
- if (r.push(_), u !== 64) {
160
- const m = a << 4 & 240 | u >> 2;
161
- if (r.push(m), h !== 64) {
162
- const I = u << 6 & 192 | h;
163
- r.push(I);
164
- }
165
- }
166
- }
167
- return r;
168
- },
169
- /**
170
- * Lazy static initialization function. Called before
171
- * accessing any of the static map variables.
172
- * @private
173
- */
174
- init_() {
175
- if (!this.byteToCharMap_) {
176
- this.byteToCharMap_ = {}, this.charToByteMap_ = {}, this.byteToCharMapWebSafe_ = {}, this.charToByteMapWebSafe_ = {};
177
- for (let t = 0; t < this.ENCODED_VALS.length; t++)
178
- this.byteToCharMap_[t] = this.ENCODED_VALS.charAt(t), this.charToByteMap_[this.byteToCharMap_[t]] = t, this.byteToCharMapWebSafe_[t] = this.ENCODED_VALS_WEBSAFE.charAt(t), this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[t]] = t, t >= this.ENCODED_VALS_BASE.length && (this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(t)] = t, this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(t)] = t);
179
- }
180
- }
181
- };
182
- class it extends Error {
183
- constructor() {
184
- super(...arguments), this.name = "DecodeBase64StringError";
185
- }
186
- }
187
- const at = function(t) {
188
- const e = Ue(t);
189
- return Be.encodeByteArray(e, !0);
190
- }, W = function(t) {
191
- return at(t).replace(/\./g, "");
192
- }, ct = function(t) {
193
- try {
194
- return Be.decodeString(t, !0);
195
- } catch (e) {
196
- console.error("base64Decode failed: ", e);
197
- }
198
- return null;
199
- };
200
- /**
201
- * @license
202
- * Copyright 2022 Google LLC
203
- *
204
- * Licensed under the Apache License, Version 2.0 (the "License");
205
- * you may not use this file except in compliance with the License.
206
- * You may obtain a copy of the License at
207
- *
208
- * http://www.apache.org/licenses/LICENSE-2.0
209
- *
210
- * Unless required by applicable law or agreed to in writing, software
211
- * distributed under the License is distributed on an "AS IS" BASIS,
212
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
213
- * See the License for the specific language governing permissions and
214
- * limitations under the License.
215
- */
216
- function ut() {
217
- if (typeof self < "u")
218
- return self;
219
- if (typeof window < "u")
220
- return window;
221
- if (typeof global < "u")
222
- return global;
223
- throw new Error("Unable to locate global object.");
224
- }
225
- /**
226
- * @license
227
- * Copyright 2022 Google LLC
228
- *
229
- * Licensed under the Apache License, Version 2.0 (the "License");
230
- * you may not use this file except in compliance with the License.
231
- * You may obtain a copy of the License at
232
- *
233
- * http://www.apache.org/licenses/LICENSE-2.0
234
- *
235
- * Unless required by applicable law or agreed to in writing, software
236
- * distributed under the License is distributed on an "AS IS" BASIS,
237
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
238
- * See the License for the specific language governing permissions and
239
- * limitations under the License.
240
- */
241
- const lt = () => ut().__FIREBASE_DEFAULTS__, dt = () => {
242
- if (typeof Y > "u" || typeof Y.env > "u")
243
- return;
244
- const t = Y.env.__FIREBASE_DEFAULTS__;
245
- if (t)
246
- return JSON.parse(t);
247
- }, pt = () => {
248
- if (typeof document > "u")
249
- return;
250
- let t;
251
- try {
252
- t = document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/);
253
- } catch {
254
- return;
255
- }
256
- const e = t && ct(t[1]);
257
- return e && JSON.parse(e);
258
- }, de = () => {
259
- try {
260
- return lt() || dt() || pt();
261
- } catch (t) {
262
- console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${t}`);
263
- return;
264
- }
265
- }, ht = (t) => {
266
- var e, n;
267
- return (n = (e = de()) === null || e === void 0 ? void 0 : e.emulatorHosts) === null || n === void 0 ? void 0 : n[t];
268
- }, _t = (t) => {
269
- const e = ht(t);
270
- if (!e)
271
- return;
272
- const n = e.lastIndexOf(":");
273
- if (n <= 0 || n + 1 === e.length)
274
- throw new Error(`Invalid host ${e} with no separate hostname and port!`);
275
- const r = parseInt(e.substring(n + 1), 10);
276
- return e[0] === "[" ? [e.substring(1, n - 1), r] : [e.substring(0, n), r];
277
- }, Pe = () => {
278
- var t;
279
- return (t = de()) === null || t === void 0 ? void 0 : t.config;
280
- }, Kr = (t) => {
281
- var e;
282
- return (e = de()) === null || e === void 0 ? void 0 : e[`_${t}`];
283
- };
284
- /**
285
- * @license
286
- * Copyright 2017 Google LLC
287
- *
288
- * Licensed under the Apache License, Version 2.0 (the "License");
289
- * you may not use this file except in compliance with the License.
290
- * You may obtain a copy of the License at
291
- *
292
- * http://www.apache.org/licenses/LICENSE-2.0
293
- *
294
- * Unless required by applicable law or agreed to in writing, software
295
- * distributed under the License is distributed on an "AS IS" BASIS,
296
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
297
- * See the License for the specific language governing permissions and
298
- * limitations under the License.
299
- */
300
- class ft {
301
- constructor() {
302
- this.reject = () => {
303
- }, this.resolve = () => {
304
- }, this.promise = new Promise((e, n) => {
305
- this.resolve = e, this.reject = n;
306
- });
307
- }
308
- /**
309
- * Our API internals are not promiseified and cannot because our callback APIs have subtle expectations around
310
- * invoking promises inline, which Promises are forbidden to do. This method accepts an optional node-style callback
311
- * and returns a node-style callback which will resolve or reject the Deferred's promise.
312
- */
313
- wrapCallback(e) {
314
- return (n, r) => {
315
- n ? this.reject(n) : this.resolve(r), typeof e == "function" && (this.promise.catch(() => {
316
- }), e.length === 1 ? e(n) : e(n, r));
317
- };
318
- }
319
- }
320
- /**
321
- * @license
322
- * Copyright 2021 Google LLC
323
- *
324
- * Licensed under the Apache License, Version 2.0 (the "License");
325
- * you may not use this file except in compliance with the License.
326
- * You may obtain a copy of the License at
327
- *
328
- * http://www.apache.org/licenses/LICENSE-2.0
329
- *
330
- * Unless required by applicable law or agreed to in writing, software
331
- * distributed under the License is distributed on an "AS IS" BASIS,
332
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
333
- * See the License for the specific language governing permissions and
334
- * limitations under the License.
335
- */
336
- function mt(t, e) {
337
- if (t.uid)
338
- throw new Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.');
339
- const n = {
340
- alg: "none",
341
- type: "JWT"
342
- }, r = e || "demo-project", s = t.iat || 0, o = t.sub || t.user_id;
343
- if (!o)
344
- throw new Error("mockUserToken must contain 'sub' or 'user_id' field!");
345
- const i = Object.assign({
346
- // Set all required fields to decent defaults
347
- iss: `https://securetoken.google.com/${r}`,
348
- aud: r,
349
- iat: s,
350
- exp: s + 3600,
351
- auth_time: s,
352
- sub: o,
353
- user_id: o,
354
- firebase: {
355
- sign_in_provider: "custom",
356
- identities: {}
357
- }
358
- }, t);
359
- return [
360
- W(JSON.stringify(n)),
361
- W(JSON.stringify(i)),
362
- ""
363
- ].join(".");
364
- }
365
- /**
366
- * @license
367
- * Copyright 2017 Google LLC
368
- *
369
- * Licensed under the Apache License, Version 2.0 (the "License");
370
- * you may not use this file except in compliance with the License.
371
- * You may obtain a copy of the License at
372
- *
373
- * http://www.apache.org/licenses/LICENSE-2.0
374
- *
375
- * Unless required by applicable law or agreed to in writing, software
376
- * distributed under the License is distributed on an "AS IS" BASIS,
377
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
378
- * See the License for the specific language governing permissions and
379
- * limitations under the License.
380
- */
381
- function Le() {
382
- return typeof navigator < "u" && typeof navigator.userAgent == "string" ? navigator.userAgent : "";
383
- }
384
- function Xr() {
385
- return typeof window < "u" && // @ts-ignore Setting up an broadly applicable index signature for Window
386
- // just to deal with this case would probably be a bad idea.
387
- !!(window.cordova || window.phonegap || window.PhoneGap) && /ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(Le());
388
- }
389
- function qr() {
390
- const t = typeof chrome == "object" ? chrome.runtime : typeof browser == "object" ? browser.runtime : void 0;
391
- return typeof t == "object" && t.id !== void 0;
392
- }
393
- function Yr() {
394
- return typeof navigator == "object" && navigator.product === "ReactNative";
395
- }
396
- function Jr() {
397
- const t = Le();
398
- return t.indexOf("MSIE ") >= 0 || t.indexOf("Trident/") >= 0;
399
- }
400
- function gt() {
401
- try {
402
- return typeof indexedDB == "object";
403
- } catch {
404
- return !1;
405
- }
406
- }
407
- function bt() {
408
- return new Promise((t, e) => {
409
- try {
410
- let n = !0;
411
- const r = "validate-browser-context-for-indexeddb-analytics-module", s = self.indexedDB.open(r);
412
- s.onsuccess = () => {
413
- s.result.close(), n || self.indexedDB.deleteDatabase(r), t(!0);
414
- }, s.onupgradeneeded = () => {
415
- n = !1;
416
- }, s.onerror = () => {
417
- var o;
418
- e(((o = s.error) === null || o === void 0 ? void 0 : o.message) || "");
419
- };
420
- } catch (n) {
421
- e(n);
422
- }
423
- });
424
- }
425
- /**
426
- * @license
427
- * Copyright 2017 Google LLC
428
- *
429
- * Licensed under the Apache License, Version 2.0 (the "License");
430
- * you may not use this file except in compliance with the License.
431
- * You may obtain a copy of the License at
432
- *
433
- * http://www.apache.org/licenses/LICENSE-2.0
434
- *
435
- * Unless required by applicable law or agreed to in writing, software
436
- * distributed under the License is distributed on an "AS IS" BASIS,
437
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
438
- * See the License for the specific language governing permissions and
439
- * limitations under the License.
440
- */
441
- const Et = "FirebaseError";
442
- class B extends Error {
443
- constructor(e, n, r) {
444
- super(n), this.code = e, this.customData = r, this.name = Et, Object.setPrototypeOf(this, B.prototype), Error.captureStackTrace && Error.captureStackTrace(this, Me.prototype.create);
445
- }
446
- }
447
- class Me {
448
- constructor(e, n, r) {
449
- this.service = e, this.serviceName = n, this.errors = r;
450
- }
451
- create(e, ...n) {
452
- const r = n[0] || {}, s = `${this.service}/${e}`, o = this.errors[e], i = o ? Rt(o, r) : "Error", a = `${this.serviceName}: ${i} (${s}).`;
453
- return new B(s, a, r);
454
- }
455
- }
456
- function Rt(t, e) {
457
- return t.replace(It, (n, r) => {
458
- const s = e[r];
459
- return s != null ? String(s) : `<${r}?>`;
460
- });
461
- }
462
- const It = /\{\$([^}]+)}/g;
463
- function Zr(t) {
464
- for (const e in t)
465
- if (Object.prototype.hasOwnProperty.call(t, e))
466
- return !1;
467
- return !0;
468
- }
469
- function se(t, e) {
470
- if (t === e)
471
- return !0;
472
- const n = Object.keys(t), r = Object.keys(e);
473
- for (const s of n) {
474
- if (!r.includes(s))
475
- return !1;
476
- const o = t[s], i = e[s];
477
- if (Ee(o) && Ee(i)) {
478
- if (!se(o, i))
479
- return !1;
480
- } else if (o !== i)
481
- return !1;
482
- }
483
- for (const s of r)
484
- if (!n.includes(s))
485
- return !1;
486
- return !0;
487
- }
488
- function Ee(t) {
489
- return t !== null && typeof t == "object";
490
- }
491
- /**
492
- * @license
493
- * Copyright 2017 Google LLC
494
- *
495
- * Licensed under the Apache License, Version 2.0 (the "License");
496
- * you may not use this file except in compliance with the License.
497
- * You may obtain a copy of the License at
498
- *
499
- * http://www.apache.org/licenses/LICENSE-2.0
500
- *
501
- * Unless required by applicable law or agreed to in writing, software
502
- * distributed under the License is distributed on an "AS IS" BASIS,
503
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
504
- * See the License for the specific language governing permissions and
505
- * limitations under the License.
506
- */
507
- function Qr(t) {
508
- const e = [];
509
- for (const [n, r] of Object.entries(t))
510
- Array.isArray(r) ? r.forEach((s) => {
511
- e.push(encodeURIComponent(n) + "=" + encodeURIComponent(s));
512
- }) : e.push(encodeURIComponent(n) + "=" + encodeURIComponent(r));
513
- return e.length ? "&" + e.join("&") : "";
514
- }
515
- function es(t, e) {
516
- const n = new Tt(t, e);
517
- return n.subscribe.bind(n);
518
- }
519
- class Tt {
520
- /**
521
- * @param executor Function which can make calls to a single Observer
522
- * as a proxy.
523
- * @param onNoObservers Callback when count of Observers goes to zero.
524
- */
525
- constructor(e, n) {
526
- this.observers = [], this.unsubscribes = [], this.observerCount = 0, this.task = Promise.resolve(), this.finalized = !1, this.onNoObservers = n, this.task.then(() => {
527
- e(this);
528
- }).catch((r) => {
529
- this.error(r);
530
- });
531
- }
532
- next(e) {
533
- this.forEachObserver((n) => {
534
- n.next(e);
535
- });
536
- }
537
- error(e) {
538
- this.forEachObserver((n) => {
539
- n.error(e);
540
- }), this.close(e);
541
- }
542
- complete() {
543
- this.forEachObserver((e) => {
544
- e.complete();
545
- }), this.close();
546
- }
547
- /**
548
- * Subscribe function that can be used to add an Observer to the fan-out list.
549
- *
550
- * - We require that no event is sent to a subscriber sychronously to their
551
- * call to subscribe().
552
- */
553
- subscribe(e, n, r) {
554
- let s;
555
- if (e === void 0 && n === void 0 && r === void 0)
556
- throw new Error("Missing Observer.");
557
- vt(e, [
558
- "next",
559
- "error",
560
- "complete"
561
- ]) ? s = e : s = {
562
- next: e,
563
- error: n,
564
- complete: r
565
- }, s.next === void 0 && (s.next = J), s.error === void 0 && (s.error = J), s.complete === void 0 && (s.complete = J);
566
- const o = this.unsubscribeOne.bind(this, this.observers.length);
567
- return this.finalized && this.task.then(() => {
568
- try {
569
- this.finalError ? s.error(this.finalError) : s.complete();
570
- } catch {
571
- }
572
- }), this.observers.push(s), o;
573
- }
574
- // Unsubscribe is synchronous - we guarantee that no events are sent to
575
- // any unsubscribed Observer.
576
- unsubscribeOne(e) {
577
- this.observers === void 0 || this.observers[e] === void 0 || (delete this.observers[e], this.observerCount -= 1, this.observerCount === 0 && this.onNoObservers !== void 0 && this.onNoObservers(this));
578
- }
579
- forEachObserver(e) {
580
- if (!this.finalized)
581
- for (let n = 0; n < this.observers.length; n++)
582
- this.sendOne(n, e);
583
- }
584
- // Call the Observer via one of it's callback function. We are careful to
585
- // confirm that the observe has not been unsubscribed since this asynchronous
586
- // function had been queued.
587
- sendOne(e, n) {
588
- this.task.then(() => {
589
- if (this.observers !== void 0 && this.observers[e] !== void 0)
590
- try {
591
- n(this.observers[e]);
592
- } catch (r) {
593
- typeof console < "u" && console.error && console.error(r);
594
- }
595
- });
596
- }
597
- close(e) {
598
- this.finalized || (this.finalized = !0, e !== void 0 && (this.finalError = e), this.task.then(() => {
599
- this.observers = void 0, this.onNoObservers = void 0;
600
- }));
601
- }
602
- }
603
- function vt(t, e) {
604
- if (typeof t != "object" || t === null)
605
- return !1;
606
- for (const n of e)
607
- if (n in t && typeof t[n] == "function")
608
- return !0;
609
- return !1;
610
- }
611
- function J() {
612
- }
613
- /**
614
- * @license
615
- * Copyright 2021 Google LLC
616
- *
617
- * Licensed under the Apache License, Version 2.0 (the "License");
618
- * you may not use this file except in compliance with the License.
619
- * You may obtain a copy of the License at
620
- *
621
- * http://www.apache.org/licenses/LICENSE-2.0
622
- *
623
- * Unless required by applicable law or agreed to in writing, software
624
- * distributed under the License is distributed on an "AS IS" BASIS,
625
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
626
- * See the License for the specific language governing permissions and
627
- * limitations under the License.
628
- */
629
- function $(t) {
630
- return t && t._delegate ? t._delegate : t;
631
- }
632
- class H {
633
- /**
634
- *
635
- * @param name The public service name, e.g. app, auth, firestore, database
636
- * @param instanceFactory Service factory responsible for creating the public interface
637
- * @param type whether the service provided by the component is public or private
638
- */
639
- constructor(e, n, r) {
640
- this.name = e, this.instanceFactory = n, this.type = r, this.multipleInstances = !1, this.serviceProps = {}, this.instantiationMode = "LAZY", this.onInstanceCreated = null;
641
- }
642
- setInstantiationMode(e) {
643
- return this.instantiationMode = e, this;
644
- }
645
- setMultipleInstances(e) {
646
- return this.multipleInstances = e, this;
647
- }
648
- setServiceProps(e) {
649
- return this.serviceProps = e, this;
650
- }
651
- setInstanceCreatedCallback(e) {
652
- return this.onInstanceCreated = e, this;
653
- }
654
- }
655
- /**
656
- * @license
657
- * Copyright 2019 Google LLC
658
- *
659
- * Licensed under the Apache License, Version 2.0 (the "License");
660
- * you may not use this file except in compliance with the License.
661
- * You may obtain a copy of the License at
662
- *
663
- * http://www.apache.org/licenses/LICENSE-2.0
664
- *
665
- * Unless required by applicable law or agreed to in writing, software
666
- * distributed under the License is distributed on an "AS IS" BASIS,
667
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
668
- * See the License for the specific language governing permissions and
669
- * limitations under the License.
670
- */
671
- const D = "[DEFAULT]";
672
- /**
673
- * @license
674
- * Copyright 2019 Google LLC
675
- *
676
- * Licensed under the Apache License, Version 2.0 (the "License");
677
- * you may not use this file except in compliance with the License.
678
- * You may obtain a copy of the License at
679
- *
680
- * http://www.apache.org/licenses/LICENSE-2.0
681
- *
682
- * Unless required by applicable law or agreed to in writing, software
683
- * distributed under the License is distributed on an "AS IS" BASIS,
684
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
685
- * See the License for the specific language governing permissions and
686
- * limitations under the License.
687
- */
688
- class yt {
689
- constructor(e, n) {
690
- this.name = e, this.container = n, this.component = null, this.instances = /* @__PURE__ */ new Map(), this.instancesDeferred = /* @__PURE__ */ new Map(), this.instancesOptions = /* @__PURE__ */ new Map(), this.onInitCallbacks = /* @__PURE__ */ new Map();
691
- }
692
- /**
693
- * @param identifier A provider can provide mulitple instances of a service
694
- * if this.component.multipleInstances is true.
695
- */
696
- get(e) {
697
- const n = this.normalizeInstanceIdentifier(e);
698
- if (!this.instancesDeferred.has(n)) {
699
- const r = new ft();
700
- if (this.instancesDeferred.set(n, r), this.isInitialized(n) || this.shouldAutoInitialize())
701
- try {
702
- const s = this.getOrInitializeService({
703
- instanceIdentifier: n
704
- });
705
- s && r.resolve(s);
706
- } catch {
707
- }
708
- }
709
- return this.instancesDeferred.get(n).promise;
710
- }
711
- getImmediate(e) {
712
- var n;
713
- const r = this.normalizeInstanceIdentifier(e == null ? void 0 : e.identifier), s = (n = e == null ? void 0 : e.optional) !== null && n !== void 0 ? n : !1;
714
- if (this.isInitialized(r) || this.shouldAutoInitialize())
715
- try {
716
- return this.getOrInitializeService({
717
- instanceIdentifier: r
718
- });
719
- } catch (o) {
720
- if (s)
721
- return null;
722
- throw o;
723
- }
724
- else {
725
- if (s)
726
- return null;
727
- throw Error(`Service ${this.name} is not available`);
728
- }
729
- }
730
- getComponent() {
731
- return this.component;
732
- }
733
- setComponent(e) {
734
- if (e.name !== this.name)
735
- throw Error(`Mismatching Component ${e.name} for Provider ${this.name}.`);
736
- if (this.component)
737
- throw Error(`Component for ${this.name} has already been provided`);
738
- if (this.component = e, !!this.shouldAutoInitialize()) {
739
- if (wt(e))
740
- try {
741
- this.getOrInitializeService({ instanceIdentifier: D });
742
- } catch {
743
- }
744
- for (const [n, r] of this.instancesDeferred.entries()) {
745
- const s = this.normalizeInstanceIdentifier(n);
746
- try {
747
- const o = this.getOrInitializeService({
748
- instanceIdentifier: s
749
- });
750
- r.resolve(o);
751
- } catch {
752
- }
753
- }
754
- }
755
- }
756
- clearInstance(e = D) {
757
- this.instancesDeferred.delete(e), this.instancesOptions.delete(e), this.instances.delete(e);
758
- }
759
- // app.delete() will call this method on every provider to delete the services
760
- // TODO: should we mark the provider as deleted?
761
- async delete() {
762
- const e = Array.from(this.instances.values());
763
- await Promise.all([
764
- ...e.filter((n) => "INTERNAL" in n).map((n) => n.INTERNAL.delete()),
765
- ...e.filter((n) => "_delete" in n).map((n) => n._delete())
766
- ]);
767
- }
768
- isComponentSet() {
769
- return this.component != null;
770
- }
771
- isInitialized(e = D) {
772
- return this.instances.has(e);
773
- }
774
- getOptions(e = D) {
775
- return this.instancesOptions.get(e) || {};
776
- }
777
- initialize(e = {}) {
778
- const { options: n = {} } = e, r = this.normalizeInstanceIdentifier(e.instanceIdentifier);
779
- if (this.isInitialized(r))
780
- throw Error(`${this.name}(${r}) has already been initialized`);
781
- if (!this.isComponentSet())
782
- throw Error(`Component ${this.name} has not been registered yet`);
783
- const s = this.getOrInitializeService({
784
- instanceIdentifier: r,
785
- options: n
786
- });
787
- for (const [o, i] of this.instancesDeferred.entries()) {
788
- const a = this.normalizeInstanceIdentifier(o);
789
- r === a && i.resolve(s);
790
- }
791
- return s;
792
- }
793
- /**
794
- *
795
- * @param callback - a function that will be invoked after the provider has been initialized by calling provider.initialize().
796
- * The function is invoked SYNCHRONOUSLY, so it should not execute any longrunning tasks in order to not block the program.
797
- *
798
- * @param identifier An optional instance identifier
799
- * @returns a function to unregister the callback
800
- */
801
- onInit(e, n) {
802
- var r;
803
- const s = this.normalizeInstanceIdentifier(n), o = (r = this.onInitCallbacks.get(s)) !== null && r !== void 0 ? r : /* @__PURE__ */ new Set();
804
- o.add(e), this.onInitCallbacks.set(s, o);
805
- const i = this.instances.get(s);
806
- return i && e(i, s), () => {
807
- o.delete(e);
808
- };
809
- }
810
- /**
811
- * Invoke onInit callbacks synchronously
812
- * @param instance the service instance`
813
- */
814
- invokeOnInitCallbacks(e, n) {
815
- const r = this.onInitCallbacks.get(n);
816
- if (r)
817
- for (const s of r)
818
- try {
819
- s(e, n);
820
- } catch {
821
- }
822
- }
823
- getOrInitializeService({ instanceIdentifier: e, options: n = {} }) {
824
- let r = this.instances.get(e);
825
- if (!r && this.component && (r = this.component.instanceFactory(this.container, {
826
- instanceIdentifier: At(e),
827
- options: n
828
- }), this.instances.set(e, r), this.instancesOptions.set(e, n), this.invokeOnInitCallbacks(r, e), this.component.onInstanceCreated))
829
- try {
830
- this.component.onInstanceCreated(this.container, e, r);
831
- } catch {
832
- }
833
- return r || null;
834
- }
835
- normalizeInstanceIdentifier(e = D) {
836
- return this.component ? this.component.multipleInstances ? e : D : e;
837
- }
838
- shouldAutoInitialize() {
839
- return !!this.component && this.component.instantiationMode !== "EXPLICIT";
840
- }
841
- }
842
- function At(t) {
843
- return t === D ? void 0 : t;
844
- }
845
- function wt(t) {
846
- return t.instantiationMode === "EAGER";
847
- }
848
- /**
849
- * @license
850
- * Copyright 2019 Google LLC
851
- *
852
- * Licensed under the Apache License, Version 2.0 (the "License");
853
- * you may not use this file except in compliance with the License.
854
- * You may obtain a copy of the License at
855
- *
856
- * http://www.apache.org/licenses/LICENSE-2.0
857
- *
858
- * Unless required by applicable law or agreed to in writing, software
859
- * distributed under the License is distributed on an "AS IS" BASIS,
860
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
861
- * See the License for the specific language governing permissions and
862
- * limitations under the License.
863
- */
864
- class Ot {
865
- constructor(e) {
866
- this.name = e, this.providers = /* @__PURE__ */ new Map();
867
- }
868
- /**
869
- *
870
- * @param component Component being added
871
- * @param overwrite When a component with the same name has already been registered,
872
- * if overwrite is true: overwrite the existing component with the new component and create a new
873
- * provider with the new component. It can be useful in tests where you want to use different mocks
874
- * for different tests.
875
- * if overwrite is false: throw an exception
876
- */
877
- addComponent(e) {
878
- const n = this.getProvider(e.name);
879
- if (n.isComponentSet())
880
- throw new Error(`Component ${e.name} has already been registered with ${this.name}`);
881
- n.setComponent(e);
882
- }
883
- addOrOverwriteComponent(e) {
884
- this.getProvider(e.name).isComponentSet() && this.providers.delete(e.name), this.addComponent(e);
885
- }
886
- /**
887
- * getProvider provides a type safe interface where it can only be called with a field name
888
- * present in NameServiceMapping interface.
889
- *
890
- * Firebase SDKs providing services should extend NameServiceMapping interface to register
891
- * themselves.
892
- */
893
- getProvider(e) {
894
- if (this.providers.has(e))
895
- return this.providers.get(e);
896
- const n = new yt(e, this);
897
- return this.providers.set(e, n), n;
898
- }
899
- getProviders() {
900
- return Array.from(this.providers.values());
901
- }
902
- }
903
- /**
904
- * @license
905
- * Copyright 2017 Google LLC
906
- *
907
- * Licensed under the Apache License, Version 2.0 (the "License");
908
- * you may not use this file except in compliance with the License.
909
- * You may obtain a copy of the License at
910
- *
911
- * http://www.apache.org/licenses/LICENSE-2.0
912
- *
913
- * Unless required by applicable law or agreed to in writing, software
914
- * distributed under the License is distributed on an "AS IS" BASIS,
915
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
916
- * See the License for the specific language governing permissions and
917
- * limitations under the License.
918
- */
919
- var l;
920
- (function(t) {
921
- t[t.DEBUG = 0] = "DEBUG", t[t.VERBOSE = 1] = "VERBOSE", t[t.INFO = 2] = "INFO", t[t.WARN = 3] = "WARN", t[t.ERROR = 4] = "ERROR", t[t.SILENT = 5] = "SILENT";
922
- })(l || (l = {}));
923
- const Dt = {
924
- debug: l.DEBUG,
925
- verbose: l.VERBOSE,
926
- info: l.INFO,
927
- warn: l.WARN,
928
- error: l.ERROR,
929
- silent: l.SILENT
930
- }, kt = l.INFO, Nt = {
931
- [l.DEBUG]: "log",
932
- [l.VERBOSE]: "log",
933
- [l.INFO]: "info",
934
- [l.WARN]: "warn",
935
- [l.ERROR]: "error"
936
- }, St = (t, e, ...n) => {
937
- if (e < t.logLevel)
938
- return;
939
- const r = (/* @__PURE__ */ new Date()).toISOString(), s = Nt[e];
940
- if (s)
941
- console[s](`[${r}] ${t.name}:`, ...n);
942
- else
943
- throw new Error(`Attempted to log a message with an invalid logType (value: ${e})`);
944
- };
945
- class Ct {
946
- /**
947
- * Gives you an instance of a Logger to capture messages according to
948
- * Firebase's logging scheme.
949
- *
950
- * @param name The name that the logs will be associated with
951
- */
952
- constructor(e) {
953
- this.name = e, this._logLevel = kt, this._logHandler = St, this._userLogHandler = null;
954
- }
955
- get logLevel() {
956
- return this._logLevel;
957
- }
958
- set logLevel(e) {
959
- if (!(e in l))
960
- throw new TypeError(`Invalid value "${e}" assigned to \`logLevel\``);
961
- this._logLevel = e;
962
- }
963
- // Workaround for setter/getter having to be the same type.
964
- setLogLevel(e) {
965
- this._logLevel = typeof e == "string" ? Dt[e] : e;
966
- }
967
- get logHandler() {
968
- return this._logHandler;
969
- }
970
- set logHandler(e) {
971
- if (typeof e != "function")
972
- throw new TypeError("Value assigned to `logHandler` must be a function");
973
- this._logHandler = e;
974
- }
975
- get userLogHandler() {
976
- return this._userLogHandler;
977
- }
978
- set userLogHandler(e) {
979
- this._userLogHandler = e;
980
- }
981
- /**
982
- * The functions below are all based on the `console` interface
983
- */
984
- debug(...e) {
985
- this._userLogHandler && this._userLogHandler(this, l.DEBUG, ...e), this._logHandler(this, l.DEBUG, ...e);
986
- }
987
- log(...e) {
988
- this._userLogHandler && this._userLogHandler(this, l.VERBOSE, ...e), this._logHandler(this, l.VERBOSE, ...e);
989
- }
990
- info(...e) {
991
- this._userLogHandler && this._userLogHandler(this, l.INFO, ...e), this._logHandler(this, l.INFO, ...e);
992
- }
993
- warn(...e) {
994
- this._userLogHandler && this._userLogHandler(this, l.WARN, ...e), this._logHandler(this, l.WARN, ...e);
995
- }
996
- error(...e) {
997
- this._userLogHandler && this._userLogHandler(this, l.ERROR, ...e), this._logHandler(this, l.ERROR, ...e);
998
- }
999
- }
1000
- const Ut = (t, e) => e.some((n) => t instanceof n);
1001
- let Re, Ie;
1002
- function Bt() {
1003
- return Re || (Re = [
1004
- IDBDatabase,
1005
- IDBObjectStore,
1006
- IDBIndex,
1007
- IDBCursor,
1008
- IDBTransaction
1009
- ]);
1010
- }
1011
- function Pt() {
1012
- return Ie || (Ie = [
1013
- IDBCursor.prototype.advance,
1014
- IDBCursor.prototype.continue,
1015
- IDBCursor.prototype.continuePrimaryKey
1016
- ]);
1017
- }
1018
- const He = /* @__PURE__ */ new WeakMap(), oe = /* @__PURE__ */ new WeakMap(), xe = /* @__PURE__ */ new WeakMap(), Z = /* @__PURE__ */ new WeakMap(), pe = /* @__PURE__ */ new WeakMap();
1019
- function Lt(t) {
1020
- const e = new Promise((n, r) => {
1021
- const s = () => {
1022
- t.removeEventListener("success", o), t.removeEventListener("error", i);
1023
- }, o = () => {
1024
- n(A(t.result)), s();
1025
- }, i = () => {
1026
- r(t.error), s();
1027
- };
1028
- t.addEventListener("success", o), t.addEventListener("error", i);
1029
- });
1030
- return e.then((n) => {
1031
- n instanceof IDBCursor && He.set(n, t);
1032
- }).catch(() => {
1033
- }), pe.set(e, t), e;
1034
- }
1035
- function Mt(t) {
1036
- if (oe.has(t))
1037
- return;
1038
- const e = new Promise((n, r) => {
1039
- const s = () => {
1040
- t.removeEventListener("complete", o), t.removeEventListener("error", i), t.removeEventListener("abort", i);
1041
- }, o = () => {
1042
- n(), s();
1043
- }, i = () => {
1044
- r(t.error || new DOMException("AbortError", "AbortError")), s();
1045
- };
1046
- t.addEventListener("complete", o), t.addEventListener("error", i), t.addEventListener("abort", i);
1047
- });
1048
- oe.set(t, e);
1049
- }
1050
- let ie = {
1051
- get(t, e, n) {
1052
- if (t instanceof IDBTransaction) {
1053
- if (e === "done")
1054
- return oe.get(t);
1055
- if (e === "objectStoreNames")
1056
- return t.objectStoreNames || xe.get(t);
1057
- if (e === "store")
1058
- return n.objectStoreNames[1] ? void 0 : n.objectStore(n.objectStoreNames[0]);
1059
- }
1060
- return A(t[e]);
1061
- },
1062
- set(t, e, n) {
1063
- return t[e] = n, !0;
1064
- },
1065
- has(t, e) {
1066
- return t instanceof IDBTransaction && (e === "done" || e === "store") ? !0 : e in t;
1067
- }
1068
- };
1069
- function Ht(t) {
1070
- ie = t(ie);
1071
- }
1072
- function xt(t) {
1073
- return t === IDBDatabase.prototype.transaction && !("objectStoreNames" in IDBTransaction.prototype) ? function(e, ...n) {
1074
- const r = t.call(Q(this), e, ...n);
1075
- return xe.set(r, e.sort ? e.sort() : [e]), A(r);
1076
- } : Pt().includes(t) ? function(...e) {
1077
- return t.apply(Q(this), e), A(He.get(this));
1078
- } : function(...e) {
1079
- return A(t.apply(Q(this), e));
1080
- };
1081
- }
1082
- function Ft(t) {
1083
- return typeof t == "function" ? xt(t) : (t instanceof IDBTransaction && Mt(t), Ut(t, Bt()) ? new Proxy(t, ie) : t);
1084
- }
1085
- function A(t) {
1086
- if (t instanceof IDBRequest)
1087
- return Lt(t);
1088
- if (Z.has(t))
1089
- return Z.get(t);
1090
- const e = Ft(t);
1091
- return e !== t && (Z.set(t, e), pe.set(e, t)), e;
1092
- }
1093
- const Q = (t) => pe.get(t);
1094
- function $t(t, e, { blocked: n, upgrade: r, blocking: s, terminated: o } = {}) {
1095
- const i = indexedDB.open(t, e), a = A(i);
1096
- return r && i.addEventListener("upgradeneeded", (c) => {
1097
- r(A(i.result), c.oldVersion, c.newVersion, A(i.transaction), c);
1098
- }), n && i.addEventListener("blocked", (c) => n(
1099
- // Casting due to https://github.com/microsoft/TypeScript-DOM-lib-generator/pull/1405
1100
- c.oldVersion,
1101
- c.newVersion,
1102
- c
1103
- )), a.then((c) => {
1104
- o && c.addEventListener("close", () => o()), s && c.addEventListener("versionchange", (u) => s(u.oldVersion, u.newVersion, u));
1105
- }).catch(() => {
1106
- }), a;
1107
- }
1108
- const jt = ["get", "getKey", "getAll", "getAllKeys", "count"], Gt = ["put", "add", "delete", "clear"], ee = /* @__PURE__ */ new Map();
1109
- function Te(t, e) {
1110
- if (!(t instanceof IDBDatabase && !(e in t) && typeof e == "string"))
1111
- return;
1112
- if (ee.get(e))
1113
- return ee.get(e);
1114
- const n = e.replace(/FromIndex$/, ""), r = e !== n, s = Gt.includes(n);
1115
- if (
1116
- // Bail if the target doesn't exist on the target. Eg, getAll isn't in Edge.
1117
- !(n in (r ? IDBIndex : IDBObjectStore).prototype) || !(s || jt.includes(n))
1118
- )
1119
- return;
1120
- const o = async function(i, ...a) {
1121
- const c = this.transaction(i, s ? "readwrite" : "readonly");
1122
- let u = c.store;
1123
- return r && (u = u.index(a.shift())), (await Promise.all([
1124
- u[n](...a),
1125
- s && c.done
1126
- ]))[0];
1127
- };
1128
- return ee.set(e, o), o;
1129
- }
1130
- Ht((t) => ({
1131
- ...t,
1132
- get: (e, n, r) => Te(e, n) || t.get(e, n, r),
1133
- has: (e, n) => !!Te(e, n) || t.has(e, n)
1134
- }));
1135
- /**
1136
- * @license
1137
- * Copyright 2019 Google LLC
1138
- *
1139
- * Licensed under the Apache License, Version 2.0 (the "License");
1140
- * you may not use this file except in compliance with the License.
1141
- * You may obtain a copy of the License at
1142
- *
1143
- * http://www.apache.org/licenses/LICENSE-2.0
1144
- *
1145
- * Unless required by applicable law or agreed to in writing, software
1146
- * distributed under the License is distributed on an "AS IS" BASIS,
1147
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1148
- * See the License for the specific language governing permissions and
1149
- * limitations under the License.
1150
- */
1151
- class Vt {
1152
- constructor(e) {
1153
- this.container = e;
1154
- }
1155
- // In initial implementation, this will be called by installations on
1156
- // auth token refresh, and installations will send this string.
1157
- getPlatformInfoString() {
1158
- return this.container.getProviders().map((n) => {
1159
- if (Wt(n)) {
1160
- const r = n.getImmediate();
1161
- return `${r.library}/${r.version}`;
1162
- } else
1163
- return null;
1164
- }).filter((n) => n).join(" ");
1165
- }
1166
- }
1167
- function Wt(t) {
1168
- const e = t.getComponent();
1169
- return (e == null ? void 0 : e.type) === "VERSION";
1170
- }
1171
- const ae = "@firebase/app", ve = "0.10.7";
1172
- /**
1173
- * @license
1174
- * Copyright 2019 Google LLC
1175
- *
1176
- * Licensed under the Apache License, Version 2.0 (the "License");
1177
- * you may not use this file except in compliance with the License.
1178
- * You may obtain a copy of the License at
1179
- *
1180
- * http://www.apache.org/licenses/LICENSE-2.0
1181
- *
1182
- * Unless required by applicable law or agreed to in writing, software
1183
- * distributed under the License is distributed on an "AS IS" BASIS,
1184
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1185
- * See the License for the specific language governing permissions and
1186
- * limitations under the License.
1187
- */
1188
- const N = new Ct("@firebase/app"), zt = "@firebase/app-compat", Kt = "@firebase/analytics-compat", Xt = "@firebase/analytics", qt = "@firebase/app-check-compat", Yt = "@firebase/app-check", Jt = "@firebase/auth", Zt = "@firebase/auth-compat", Qt = "@firebase/database", en = "@firebase/database-compat", tn = "@firebase/functions", nn = "@firebase/functions-compat", rn = "@firebase/installations", sn = "@firebase/installations-compat", on = "@firebase/messaging", an = "@firebase/messaging-compat", cn = "@firebase/performance", un = "@firebase/performance-compat", ln = "@firebase/remote-config", dn = "@firebase/remote-config-compat", pn = "@firebase/storage", hn = "@firebase/storage-compat", _n = "@firebase/firestore", fn = "@firebase/vertexai-preview", mn = "@firebase/firestore-compat", gn = "firebase", bn = "10.12.4";
1189
- /**
1190
- * @license
1191
- * Copyright 2019 Google LLC
1192
- *
1193
- * Licensed under the Apache License, Version 2.0 (the "License");
1194
- * you may not use this file except in compliance with the License.
1195
- * You may obtain a copy of the License at
1196
- *
1197
- * http://www.apache.org/licenses/LICENSE-2.0
1198
- *
1199
- * Unless required by applicable law or agreed to in writing, software
1200
- * distributed under the License is distributed on an "AS IS" BASIS,
1201
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1202
- * See the License for the specific language governing permissions and
1203
- * limitations under the License.
1204
- */
1205
- const ce = "[DEFAULT]", En = {
1206
- [ae]: "fire-core",
1207
- [zt]: "fire-core-compat",
1208
- [Xt]: "fire-analytics",
1209
- [Kt]: "fire-analytics-compat",
1210
- [Yt]: "fire-app-check",
1211
- [qt]: "fire-app-check-compat",
1212
- [Jt]: "fire-auth",
1213
- [Zt]: "fire-auth-compat",
1214
- [Qt]: "fire-rtdb",
1215
- [en]: "fire-rtdb-compat",
1216
- [tn]: "fire-fn",
1217
- [nn]: "fire-fn-compat",
1218
- [rn]: "fire-iid",
1219
- [sn]: "fire-iid-compat",
1220
- [on]: "fire-fcm",
1221
- [an]: "fire-fcm-compat",
1222
- [cn]: "fire-perf",
1223
- [un]: "fire-perf-compat",
1224
- [ln]: "fire-rc",
1225
- [dn]: "fire-rc-compat",
1226
- [pn]: "fire-gcs",
1227
- [hn]: "fire-gcs-compat",
1228
- [_n]: "fire-fst",
1229
- [mn]: "fire-fst-compat",
1230
- [fn]: "fire-vertex",
1231
- "fire-js": "fire-js",
1232
- [gn]: "fire-js-all"
1233
- };
1234
- /**
1235
- * @license
1236
- * Copyright 2019 Google LLC
1237
- *
1238
- * Licensed under the Apache License, Version 2.0 (the "License");
1239
- * you may not use this file except in compliance with the License.
1240
- * You may obtain a copy of the License at
1241
- *
1242
- * http://www.apache.org/licenses/LICENSE-2.0
1243
- *
1244
- * Unless required by applicable law or agreed to in writing, software
1245
- * distributed under the License is distributed on an "AS IS" BASIS,
1246
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1247
- * See the License for the specific language governing permissions and
1248
- * limitations under the License.
1249
- */
1250
- const x = /* @__PURE__ */ new Map(), Rn = /* @__PURE__ */ new Map(), ue = /* @__PURE__ */ new Map();
1251
- function ye(t, e) {
1252
- try {
1253
- t.container.addComponent(e);
1254
- } catch (n) {
1255
- N.debug(`Component ${e.name} failed to register with FirebaseApp ${t.name}`, n);
1256
- }
1257
- }
1258
- function z(t) {
1259
- const e = t.name;
1260
- if (ue.has(e))
1261
- return N.debug(`There were multiple attempts to register component ${e}.`), !1;
1262
- ue.set(e, t);
1263
- for (const n of x.values())
1264
- ye(n, t);
1265
- for (const n of Rn.values())
1266
- ye(n, t);
1267
- return !0;
1268
- }
1269
- function In(t, e) {
1270
- const n = t.container.getProvider("heartbeat").getImmediate({ optional: !0 });
1271
- return n && n.triggerHeartbeat(), t.container.getProvider(e);
1272
- }
1273
- function ts(t) {
1274
- return t.settings !== void 0;
1275
- }
1276
- /**
1277
- * @license
1278
- * Copyright 2019 Google LLC
1279
- *
1280
- * Licensed under the Apache License, Version 2.0 (the "License");
1281
- * you may not use this file except in compliance with the License.
1282
- * You may obtain a copy of the License at
1283
- *
1284
- * http://www.apache.org/licenses/LICENSE-2.0
1285
- *
1286
- * Unless required by applicable law or agreed to in writing, software
1287
- * distributed under the License is distributed on an "AS IS" BASIS,
1288
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1289
- * See the License for the specific language governing permissions and
1290
- * limitations under the License.
1291
- */
1292
- const Tn = {
1293
- "no-app": "No Firebase App '{$appName}' has been created - call initializeApp() first",
1294
- "bad-app-name": "Illegal App name: '{$appName}'",
1295
- "duplicate-app": "Firebase App named '{$appName}' already exists with different options or config",
1296
- "app-deleted": "Firebase App named '{$appName}' already deleted",
1297
- "server-app-deleted": "Firebase Server App has been deleted",
1298
- "no-options": "Need to provide options, when not being deployed to hosting via source.",
1299
- "invalid-app-argument": "firebase.{$appName}() takes either no argument or a Firebase App instance.",
1300
- "invalid-log-argument": "First argument to `onLog` must be null or a function.",
1301
- "idb-open": "Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.",
1302
- "idb-get": "Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.",
1303
- "idb-set": "Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.",
1304
- "idb-delete": "Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}.",
1305
- "finalization-registry-not-supported": "FirebaseServerApp deleteOnDeref field defined but the JS runtime does not support FinalizationRegistry.",
1306
- "invalid-server-app-environment": "FirebaseServerApp is not for use in browser environments."
1307
- }, w = new Me("app", "Firebase", Tn);
1308
- /**
1309
- * @license
1310
- * Copyright 2019 Google LLC
1311
- *
1312
- * Licensed under the Apache License, Version 2.0 (the "License");
1313
- * you may not use this file except in compliance with the License.
1314
- * You may obtain a copy of the License at
1315
- *
1316
- * http://www.apache.org/licenses/LICENSE-2.0
1317
- *
1318
- * Unless required by applicable law or agreed to in writing, software
1319
- * distributed under the License is distributed on an "AS IS" BASIS,
1320
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1321
- * See the License for the specific language governing permissions and
1322
- * limitations under the License.
1323
- */
1324
- class vn {
1325
- constructor(e, n, r) {
1326
- this._isDeleted = !1, this._options = Object.assign({}, e), this._config = Object.assign({}, n), this._name = n.name, this._automaticDataCollectionEnabled = n.automaticDataCollectionEnabled, this._container = r, this.container.addComponent(new H(
1327
- "app",
1328
- () => this,
1329
- "PUBLIC"
1330
- /* ComponentType.PUBLIC */
1331
- ));
1332
- }
1333
- get automaticDataCollectionEnabled() {
1334
- return this.checkDestroyed(), this._automaticDataCollectionEnabled;
1335
- }
1336
- set automaticDataCollectionEnabled(e) {
1337
- this.checkDestroyed(), this._automaticDataCollectionEnabled = e;
1338
- }
1339
- get name() {
1340
- return this.checkDestroyed(), this._name;
1341
- }
1342
- get options() {
1343
- return this.checkDestroyed(), this._options;
1344
- }
1345
- get config() {
1346
- return this.checkDestroyed(), this._config;
1347
- }
1348
- get container() {
1349
- return this._container;
1350
- }
1351
- get isDeleted() {
1352
- return this._isDeleted;
1353
- }
1354
- set isDeleted(e) {
1355
- this._isDeleted = e;
1356
- }
1357
- /**
1358
- * This function will throw an Error if the App has already been deleted -
1359
- * use before performing API actions on the App.
1360
- */
1361
- checkDestroyed() {
1362
- if (this.isDeleted)
1363
- throw w.create("app-deleted", { appName: this._name });
1364
- }
1365
- }
1366
- /**
1367
- * @license
1368
- * Copyright 2019 Google LLC
1369
- *
1370
- * Licensed under the Apache License, Version 2.0 (the "License");
1371
- * you may not use this file except in compliance with the License.
1372
- * You may obtain a copy of the License at
1373
- *
1374
- * http://www.apache.org/licenses/LICENSE-2.0
1375
- *
1376
- * Unless required by applicable law or agreed to in writing, software
1377
- * distributed under the License is distributed on an "AS IS" BASIS,
1378
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1379
- * See the License for the specific language governing permissions and
1380
- * limitations under the License.
1381
- */
1382
- const yn = bn;
1383
- function An(t, e = {}) {
1384
- let n = t;
1385
- typeof e != "object" && (e = { name: e });
1386
- const r = Object.assign({ name: ce, automaticDataCollectionEnabled: !1 }, e), s = r.name;
1387
- if (typeof s != "string" || !s)
1388
- throw w.create("bad-app-name", {
1389
- appName: String(s)
1390
- });
1391
- if (n || (n = Pe()), !n)
1392
- throw w.create(
1393
- "no-options"
1394
- /* AppError.NO_OPTIONS */
1395
- );
1396
- const o = x.get(s);
1397
- if (o) {
1398
- if (se(n, o.options) && se(r, o.config))
1399
- return o;
1400
- throw w.create("duplicate-app", { appName: s });
1401
- }
1402
- const i = new Ot(s);
1403
- for (const c of ue.values())
1404
- i.addComponent(c);
1405
- const a = new vn(n, r, i);
1406
- return x.set(s, a), a;
1407
- }
1408
- function wn(t = ce) {
1409
- const e = x.get(t);
1410
- if (!e && t === ce && Pe())
1411
- return An();
1412
- if (!e)
1413
- throw w.create("no-app", { appName: t });
1414
- return e;
1415
- }
1416
- function ns() {
1417
- return Array.from(x.values());
1418
- }
1419
- function L(t, e, n) {
1420
- var r;
1421
- let s = (r = En[t]) !== null && r !== void 0 ? r : t;
1422
- n && (s += `-${n}`);
1423
- const o = s.match(/\s|\//), i = e.match(/\s|\//);
1424
- if (o || i) {
1425
- const a = [
1426
- `Unable to register library "${s}" with version "${e}":`
1427
- ];
1428
- o && a.push(`library name "${s}" contains illegal characters (whitespace or "/")`), o && i && a.push("and"), i && a.push(`version name "${e}" contains illegal characters (whitespace or "/")`), N.warn(a.join(" "));
1429
- return;
1430
- }
1431
- z(new H(
1432
- `${s}-version`,
1433
- () => ({ library: s, version: e }),
1434
- "VERSION"
1435
- /* ComponentType.VERSION */
1436
- ));
1437
- }
1438
- /**
1439
- * @license
1440
- * Copyright 2021 Google LLC
1441
- *
1442
- * Licensed under the Apache License, Version 2.0 (the "License");
1443
- * you may not use this file except in compliance with the License.
1444
- * You may obtain a copy of the License at
1445
- *
1446
- * http://www.apache.org/licenses/LICENSE-2.0
1447
- *
1448
- * Unless required by applicable law or agreed to in writing, software
1449
- * distributed under the License is distributed on an "AS IS" BASIS,
1450
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1451
- * See the License for the specific language governing permissions and
1452
- * limitations under the License.
1453
- */
1454
- const On = "firebase-heartbeat-database", Dn = 1, F = "firebase-heartbeat-store";
1455
- let te = null;
1456
- function Fe() {
1457
- return te || (te = $t(On, Dn, {
1458
- upgrade: (t, e) => {
1459
- switch (e) {
1460
- case 0:
1461
- try {
1462
- t.createObjectStore(F);
1463
- } catch (n) {
1464
- console.warn(n);
1465
- }
1466
- }
1467
- }
1468
- }).catch((t) => {
1469
- throw w.create("idb-open", {
1470
- originalErrorMessage: t.message
1471
- });
1472
- })), te;
1473
- }
1474
- async function kn(t) {
1475
- try {
1476
- const n = (await Fe()).transaction(F), r = await n.objectStore(F).get($e(t));
1477
- return await n.done, r;
1478
- } catch (e) {
1479
- if (e instanceof B)
1480
- N.warn(e.message);
1481
- else {
1482
- const n = w.create("idb-get", {
1483
- originalErrorMessage: e == null ? void 0 : e.message
1484
- });
1485
- N.warn(n.message);
1486
- }
1487
- }
1488
- }
1489
- async function Ae(t, e) {
1490
- try {
1491
- const r = (await Fe()).transaction(F, "readwrite");
1492
- await r.objectStore(F).put(e, $e(t)), await r.done;
1493
- } catch (n) {
1494
- if (n instanceof B)
1495
- N.warn(n.message);
1496
- else {
1497
- const r = w.create("idb-set", {
1498
- originalErrorMessage: n == null ? void 0 : n.message
1499
- });
1500
- N.warn(r.message);
1501
- }
1502
- }
1503
- }
1504
- function $e(t) {
1505
- return `${t.name}!${t.options.appId}`;
1506
- }
1507
- /**
1508
- * @license
1509
- * Copyright 2021 Google LLC
1510
- *
1511
- * Licensed under the Apache License, Version 2.0 (the "License");
1512
- * you may not use this file except in compliance with the License.
1513
- * You may obtain a copy of the License at
1514
- *
1515
- * http://www.apache.org/licenses/LICENSE-2.0
1516
- *
1517
- * Unless required by applicable law or agreed to in writing, software
1518
- * distributed under the License is distributed on an "AS IS" BASIS,
1519
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1520
- * See the License for the specific language governing permissions and
1521
- * limitations under the License.
1522
- */
1523
- const Nn = 1024, Sn = 30 * 24 * 60 * 60 * 1e3;
1524
- class Cn {
1525
- constructor(e) {
1526
- this.container = e, this._heartbeatsCache = null;
1527
- const n = this.container.getProvider("app").getImmediate();
1528
- this._storage = new Bn(n), this._heartbeatsCachePromise = this._storage.read().then((r) => (this._heartbeatsCache = r, r));
1529
- }
1530
- /**
1531
- * Called to report a heartbeat. The function will generate
1532
- * a HeartbeatsByUserAgent object, update heartbeatsCache, and persist it
1533
- * to IndexedDB.
1534
- * Note that we only store one heartbeat per day. So if a heartbeat for today is
1535
- * already logged, subsequent calls to this function in the same day will be ignored.
1536
- */
1537
- async triggerHeartbeat() {
1538
- var e, n;
1539
- const s = this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(), o = we();
1540
- if (!(((e = this._heartbeatsCache) === null || e === void 0 ? void 0 : e.heartbeats) == null && (this._heartbeatsCache = await this._heartbeatsCachePromise, ((n = this._heartbeatsCache) === null || n === void 0 ? void 0 : n.heartbeats) == null)) && !(this._heartbeatsCache.lastSentHeartbeatDate === o || this._heartbeatsCache.heartbeats.some((i) => i.date === o)))
1541
- return this._heartbeatsCache.heartbeats.push({ date: o, agent: s }), this._heartbeatsCache.heartbeats = this._heartbeatsCache.heartbeats.filter((i) => {
1542
- const a = new Date(i.date).valueOf();
1543
- return Date.now() - a <= Sn;
1544
- }), this._storage.overwrite(this._heartbeatsCache);
1545
- }
1546
- /**
1547
- * Returns a base64 encoded string which can be attached to the heartbeat-specific header directly.
1548
- * It also clears all heartbeats from memory as well as in IndexedDB.
1549
- *
1550
- * NOTE: Consuming product SDKs should not send the header if this method
1551
- * returns an empty string.
1552
- */
1553
- async getHeartbeatsHeader() {
1554
- var e;
1555
- if (this._heartbeatsCache === null && await this._heartbeatsCachePromise, ((e = this._heartbeatsCache) === null || e === void 0 ? void 0 : e.heartbeats) == null || this._heartbeatsCache.heartbeats.length === 0)
1556
- return "";
1557
- const n = we(), { heartbeatsToSend: r, unsentEntries: s } = Un(this._heartbeatsCache.heartbeats), o = W(JSON.stringify({ version: 2, heartbeats: r }));
1558
- return this._heartbeatsCache.lastSentHeartbeatDate = n, s.length > 0 ? (this._heartbeatsCache.heartbeats = s, await this._storage.overwrite(this._heartbeatsCache)) : (this._heartbeatsCache.heartbeats = [], this._storage.overwrite(this._heartbeatsCache)), o;
1559
- }
1560
- }
1561
- function we() {
1562
- return (/* @__PURE__ */ new Date()).toISOString().substring(0, 10);
1563
- }
1564
- function Un(t, e = Nn) {
1565
- const n = [];
1566
- let r = t.slice();
1567
- for (const s of t) {
1568
- const o = n.find((i) => i.agent === s.agent);
1569
- if (o) {
1570
- if (o.dates.push(s.date), Oe(n) > e) {
1571
- o.dates.pop();
1572
- break;
1573
- }
1574
- } else if (n.push({
1575
- agent: s.agent,
1576
- dates: [s.date]
1577
- }), Oe(n) > e) {
1578
- n.pop();
1579
- break;
1580
- }
1581
- r = r.slice(1);
1582
- }
1583
- return {
1584
- heartbeatsToSend: n,
1585
- unsentEntries: r
1586
- };
1587
- }
1588
- class Bn {
1589
- constructor(e) {
1590
- this.app = e, this._canUseIndexedDBPromise = this.runIndexedDBEnvironmentCheck();
1591
- }
1592
- async runIndexedDBEnvironmentCheck() {
1593
- return gt() ? bt().then(() => !0).catch(() => !1) : !1;
1594
- }
1595
- /**
1596
- * Read all heartbeats.
1597
- */
1598
- async read() {
1599
- if (await this._canUseIndexedDBPromise) {
1600
- const n = await kn(this.app);
1601
- return n != null && n.heartbeats ? n : { heartbeats: [] };
1602
- } else
1603
- return { heartbeats: [] };
1604
- }
1605
- // overwrite the storage with the provided heartbeats
1606
- async overwrite(e) {
1607
- var n;
1608
- if (await this._canUseIndexedDBPromise) {
1609
- const s = await this.read();
1610
- return Ae(this.app, {
1611
- lastSentHeartbeatDate: (n = e.lastSentHeartbeatDate) !== null && n !== void 0 ? n : s.lastSentHeartbeatDate,
1612
- heartbeats: e.heartbeats
1613
- });
1614
- } else
1615
- return;
1616
- }
1617
- // add heartbeats
1618
- async add(e) {
1619
- var n;
1620
- if (await this._canUseIndexedDBPromise) {
1621
- const s = await this.read();
1622
- return Ae(this.app, {
1623
- lastSentHeartbeatDate: (n = e.lastSentHeartbeatDate) !== null && n !== void 0 ? n : s.lastSentHeartbeatDate,
1624
- heartbeats: [
1625
- ...s.heartbeats,
1626
- ...e.heartbeats
1627
- ]
1628
- });
1629
- } else
1630
- return;
1631
- }
1632
- }
1633
- function Oe(t) {
1634
- return W(
1635
- // heartbeatsCache wrapper properties
1636
- JSON.stringify({ version: 2, heartbeats: t })
1637
- ).length;
1638
- }
1639
- /**
1640
- * @license
1641
- * Copyright 2019 Google LLC
1642
- *
1643
- * Licensed under the Apache License, Version 2.0 (the "License");
1644
- * you may not use this file except in compliance with the License.
1645
- * You may obtain a copy of the License at
1646
- *
1647
- * http://www.apache.org/licenses/LICENSE-2.0
1648
- *
1649
- * Unless required by applicable law or agreed to in writing, software
1650
- * distributed under the License is distributed on an "AS IS" BASIS,
1651
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1652
- * See the License for the specific language governing permissions and
1653
- * limitations under the License.
1654
- */
1655
- function Pn(t) {
1656
- z(new H(
1657
- "platform-logger",
1658
- (e) => new Vt(e),
1659
- "PRIVATE"
1660
- /* ComponentType.PRIVATE */
1661
- )), z(new H(
1662
- "heartbeat",
1663
- (e) => new Cn(e),
1664
- "PRIVATE"
1665
- /* ComponentType.PRIVATE */
1666
- )), L(ae, ve, t), L(ae, ve, "esm2017"), L("fire-js", "");
1667
- }
1668
- Pn("");
1669
- /**
1670
- * @license
1671
- * Copyright 2017 Google LLC
1672
- *
1673
- * Licensed under the Apache License, Version 2.0 (the "License");
1674
- * you may not use this file except in compliance with the License.
1675
- * You may obtain a copy of the License at
1676
- *
1677
- * http://www.apache.org/licenses/LICENSE-2.0
1678
- *
1679
- * Unless required by applicable law or agreed to in writing, software
1680
- * distributed under the License is distributed on an "AS IS" BASIS,
1681
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1682
- * See the License for the specific language governing permissions and
1683
- * limitations under the License.
1684
- */
1685
- const je = "firebasestorage.googleapis.com", Ge = "storageBucket", Ln = 2 * 60 * 1e3, Mn = 10 * 60 * 1e3;
1686
- /**
1687
- * @license
1688
- * Copyright 2017 Google LLC
1689
- *
1690
- * Licensed under the Apache License, Version 2.0 (the "License");
1691
- * you may not use this file except in compliance with the License.
1692
- * You may obtain a copy of the License at
1693
- *
1694
- * http://www.apache.org/licenses/LICENSE-2.0
1695
- *
1696
- * Unless required by applicable law or agreed to in writing, software
1697
- * distributed under the License is distributed on an "AS IS" BASIS,
1698
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1699
- * See the License for the specific language governing permissions and
1700
- * limitations under the License.
1701
- */
1702
- class p extends B {
1703
- /**
1704
- * @param code - A `StorageErrorCode` string to be prefixed with 'storage/' and
1705
- * added to the end of the message.
1706
- * @param message - Error message.
1707
- * @param status_ - Corresponding HTTP Status Code
1708
- */
1709
- constructor(e, n, r = 0) {
1710
- super(ne(e), `Firebase Storage: ${n} (${ne(e)})`), this.status_ = r, this.customData = { serverResponse: null }, this._baseMessage = this.message, Object.setPrototypeOf(this, p.prototype);
1711
- }
1712
- get status() {
1713
- return this.status_;
1714
- }
1715
- set status(e) {
1716
- this.status_ = e;
1717
- }
1718
- /**
1719
- * Compares a `StorageErrorCode` against this error's code, filtering out the prefix.
1720
- */
1721
- _codeEquals(e) {
1722
- return ne(e) === this.code;
1723
- }
1724
- /**
1725
- * Optional response message that was added by the server.
1726
- */
1727
- get serverResponse() {
1728
- return this.customData.serverResponse;
1729
- }
1730
- set serverResponse(e) {
1731
- this.customData.serverResponse = e, this.customData.serverResponse ? this.message = `${this._baseMessage}
1732
- ${this.customData.serverResponse}` : this.message = this._baseMessage;
1733
- }
1734
- }
1735
- var d;
1736
- (function(t) {
1737
- t.UNKNOWN = "unknown", t.OBJECT_NOT_FOUND = "object-not-found", t.BUCKET_NOT_FOUND = "bucket-not-found", t.PROJECT_NOT_FOUND = "project-not-found", t.QUOTA_EXCEEDED = "quota-exceeded", t.UNAUTHENTICATED = "unauthenticated", t.UNAUTHORIZED = "unauthorized", t.UNAUTHORIZED_APP = "unauthorized-app", t.RETRY_LIMIT_EXCEEDED = "retry-limit-exceeded", t.INVALID_CHECKSUM = "invalid-checksum", t.CANCELED = "canceled", t.INVALID_EVENT_NAME = "invalid-event-name", t.INVALID_URL = "invalid-url", t.INVALID_DEFAULT_BUCKET = "invalid-default-bucket", t.NO_DEFAULT_BUCKET = "no-default-bucket", t.CANNOT_SLICE_BLOB = "cannot-slice-blob", t.SERVER_FILE_WRONG_SIZE = "server-file-wrong-size", t.NO_DOWNLOAD_URL = "no-download-url", t.INVALID_ARGUMENT = "invalid-argument", t.INVALID_ARGUMENT_COUNT = "invalid-argument-count", t.APP_DELETED = "app-deleted", t.INVALID_ROOT_OPERATION = "invalid-root-operation", t.INVALID_FORMAT = "invalid-format", t.INTERNAL_ERROR = "internal-error", t.UNSUPPORTED_ENVIRONMENT = "unsupported-environment";
1738
- })(d || (d = {}));
1739
- function ne(t) {
1740
- return "storage/" + t;
1741
- }
1742
- function he() {
1743
- const t = "An unknown error occurred, please check the error payload for server response.";
1744
- return new p(d.UNKNOWN, t);
1745
- }
1746
- function Hn(t) {
1747
- return new p(d.OBJECT_NOT_FOUND, "Object '" + t + "' does not exist.");
1748
- }
1749
- function xn(t) {
1750
- return new p(d.QUOTA_EXCEEDED, "Quota for bucket '" + t + "' exceeded, please view quota on https://firebase.google.com/pricing/.");
1751
- }
1752
- function Fn() {
1753
- const t = "User is not authenticated, please authenticate using Firebase Authentication and try again.";
1754
- return new p(d.UNAUTHENTICATED, t);
1755
- }
1756
- function $n() {
1757
- return new p(d.UNAUTHORIZED_APP, "This app does not have permission to access Firebase Storage on this project.");
1758
- }
1759
- function jn(t) {
1760
- return new p(d.UNAUTHORIZED, "User does not have permission to access '" + t + "'.");
1761
- }
1762
- function Gn() {
1763
- return new p(d.RETRY_LIMIT_EXCEEDED, "Max retry time for operation exceeded, please try again.");
1764
- }
1765
- function Vn() {
1766
- return new p(d.CANCELED, "User canceled the upload/download.");
1767
- }
1768
- function Wn(t) {
1769
- return new p(d.INVALID_URL, "Invalid URL '" + t + "'.");
1770
- }
1771
- function zn(t) {
1772
- return new p(d.INVALID_DEFAULT_BUCKET, "Invalid default bucket '" + t + "'.");
1773
- }
1774
- function Kn() {
1775
- return new p(d.NO_DEFAULT_BUCKET, "No default bucket found. Did you set the '" + Ge + "' property when initializing the app?");
1776
- }
1777
- function Xn() {
1778
- return new p(d.CANNOT_SLICE_BLOB, "Cannot slice blob for upload. Please retry the upload.");
1779
- }
1780
- function qn() {
1781
- return new p(d.NO_DOWNLOAD_URL, "The given file does not have any download URLs.");
1782
- }
1783
- function Yn(t) {
1784
- return new p(d.UNSUPPORTED_ENVIRONMENT, `${t} is missing. Make sure to install the required polyfills. See https://firebase.google.com/docs/web/environments-js-sdk#polyfills for more information.`);
1785
- }
1786
- function le(t) {
1787
- return new p(d.INVALID_ARGUMENT, t);
1788
- }
1789
- function Ve() {
1790
- return new p(d.APP_DELETED, "The Firebase app was deleted.");
1791
- }
1792
- function Jn(t) {
1793
- return new p(d.INVALID_ROOT_OPERATION, "The operation '" + t + "' cannot be performed on a root reference, create a non-root reference using child, such as .child('file.png').");
1794
- }
1795
- function M(t, e) {
1796
- return new p(d.INVALID_FORMAT, "String does not match format '" + t + "': " + e);
1797
- }
1798
- function P(t) {
1799
- throw new p(d.INTERNAL_ERROR, "Internal error: " + t);
1800
- }
1801
- /**
1802
- * @license
1803
- * Copyright 2017 Google LLC
1804
- *
1805
- * Licensed under the Apache License, Version 2.0 (the "License");
1806
- * you may not use this file except in compliance with the License.
1807
- * You may obtain a copy of the License at
1808
- *
1809
- * http://www.apache.org/licenses/LICENSE-2.0
1810
- *
1811
- * Unless required by applicable law or agreed to in writing, software
1812
- * distributed under the License is distributed on an "AS IS" BASIS,
1813
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1814
- * See the License for the specific language governing permissions and
1815
- * limitations under the License.
1816
- */
1817
- class R {
1818
- constructor(e, n) {
1819
- this.bucket = e, this.path_ = n;
1820
- }
1821
- get path() {
1822
- return this.path_;
1823
- }
1824
- get isRoot() {
1825
- return this.path.length === 0;
1826
- }
1827
- fullServerUrl() {
1828
- const e = encodeURIComponent;
1829
- return "/b/" + e(this.bucket) + "/o/" + e(this.path);
1830
- }
1831
- bucketOnlyServerUrl() {
1832
- return "/b/" + encodeURIComponent(this.bucket) + "/o";
1833
- }
1834
- static makeFromBucketSpec(e, n) {
1835
- let r;
1836
- try {
1837
- r = R.makeFromUrl(e, n);
1838
- } catch {
1839
- return new R(e, "");
1840
- }
1841
- if (r.path === "")
1842
- return r;
1843
- throw zn(e);
1844
- }
1845
- static makeFromUrl(e, n) {
1846
- let r = null;
1847
- const s = "([A-Za-z0-9.\\-_]+)";
1848
- function o(E) {
1849
- E.path.charAt(E.path.length - 1) === "/" && (E.path_ = E.path_.slice(0, -1));
1850
- }
1851
- const i = "(/(.*))?$", a = new RegExp("^gs://" + s + i, "i"), c = { bucket: 1, path: 3 };
1852
- function u(E) {
1853
- E.path_ = decodeURIComponent(E.path);
1854
- }
1855
- const f = "v[A-Za-z0-9_]+", h = n.replace(/[.]/g, "\\."), _ = "(/([^?#]*).*)?$", m = new RegExp(`^https?://${h}/${f}/b/${s}/o${_}`, "i"), I = { bucket: 1, path: 3 }, C = n === je ? "(?:storage.googleapis.com|storage.cloud.google.com)" : n, b = "([^?#]*)", U = new RegExp(`^https?://${C}/${s}/${b}`, "i"), T = [
1856
- { regex: a, indices: c, postModify: o },
1857
- {
1858
- regex: m,
1859
- indices: I,
1860
- postModify: u
1861
- },
1862
- {
1863
- regex: U,
1864
- indices: { bucket: 1, path: 2 },
1865
- postModify: u
1866
- }
1867
- ];
1868
- for (let E = 0; E < T.length; E++) {
1869
- const j = T[E], X = j.regex.exec(e);
1870
- if (X) {
1871
- const st = X[j.indices.bucket];
1872
- let q = X[j.indices.path];
1873
- q || (q = ""), r = new R(st, q), j.postModify(r);
1874
- break;
1875
- }
1876
- }
1877
- if (r == null)
1878
- throw Wn(e);
1879
- return r;
1880
- }
1881
- }
1882
- class Zn {
1883
- constructor(e) {
1884
- this.promise_ = Promise.reject(e);
1885
- }
1886
- /** @inheritDoc */
1887
- getPromise() {
1888
- return this.promise_;
1889
- }
1890
- /** @inheritDoc */
1891
- cancel(e = !1) {
1892
- }
1893
- }
1894
- /**
1895
- * @license
1896
- * Copyright 2017 Google LLC
1897
- *
1898
- * Licensed under the Apache License, Version 2.0 (the "License");
1899
- * you may not use this file except in compliance with the License.
1900
- * You may obtain a copy of the License at
1901
- *
1902
- * http://www.apache.org/licenses/LICENSE-2.0
1903
- *
1904
- * Unless required by applicable law or agreed to in writing, software
1905
- * distributed under the License is distributed on an "AS IS" BASIS,
1906
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1907
- * See the License for the specific language governing permissions and
1908
- * limitations under the License.
1909
- */
1910
- function Qn(t, e, n) {
1911
- let r = 1, s = null, o = null, i = !1, a = 0;
1912
- function c() {
1913
- return a === 2;
1914
- }
1915
- let u = !1;
1916
- function f(...b) {
1917
- u || (u = !0, e.apply(null, b));
1918
- }
1919
- function h(b) {
1920
- s = setTimeout(() => {
1921
- s = null, t(m, c());
1922
- }, b);
1923
- }
1924
- function _() {
1925
- o && clearTimeout(o);
1926
- }
1927
- function m(b, ...U) {
1928
- if (u) {
1929
- _();
1930
- return;
1931
- }
1932
- if (b) {
1933
- _(), f.call(null, b, ...U);
1934
- return;
1935
- }
1936
- if (c() || i) {
1937
- _(), f.call(null, b, ...U);
1938
- return;
1939
- }
1940
- r < 64 && (r *= 2);
1941
- let T;
1942
- a === 1 ? (a = 2, T = 0) : T = (r + Math.random()) * 1e3, h(T);
1943
- }
1944
- let I = !1;
1945
- function C(b) {
1946
- I || (I = !0, _(), !u && (s !== null ? (b || (a = 2), clearTimeout(s), h(0)) : b || (a = 1)));
1947
- }
1948
- return h(0), o = setTimeout(() => {
1949
- i = !0, C(!0);
1950
- }, n), C;
1951
- }
1952
- function er(t) {
1953
- t(!1);
1954
- }
1955
- /**
1956
- * @license
1957
- * Copyright 2017 Google LLC
1958
- *
1959
- * Licensed under the Apache License, Version 2.0 (the "License");
1960
- * you may not use this file except in compliance with the License.
1961
- * You may obtain a copy of the License at
1962
- *
1963
- * http://www.apache.org/licenses/LICENSE-2.0
1964
- *
1965
- * Unless required by applicable law or agreed to in writing, software
1966
- * distributed under the License is distributed on an "AS IS" BASIS,
1967
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1968
- * See the License for the specific language governing permissions and
1969
- * limitations under the License.
1970
- */
1971
- function tr(t) {
1972
- return t !== void 0;
1973
- }
1974
- function nr(t) {
1975
- return typeof t == "object" && !Array.isArray(t);
1976
- }
1977
- function _e(t) {
1978
- return typeof t == "string" || t instanceof String;
1979
- }
1980
- function De(t) {
1981
- return fe() && t instanceof Blob;
1982
- }
1983
- function fe() {
1984
- return typeof Blob < "u";
1985
- }
1986
- function ke(t, e, n, r) {
1987
- if (r < e)
1988
- throw le(`Invalid value for '${t}'. Expected ${e} or greater.`);
1989
- if (r > n)
1990
- throw le(`Invalid value for '${t}'. Expected ${n} or less.`);
1991
- }
1992
- /**
1993
- * @license
1994
- * Copyright 2017 Google LLC
1995
- *
1996
- * Licensed under the Apache License, Version 2.0 (the "License");
1997
- * you may not use this file except in compliance with the License.
1998
- * You may obtain a copy of the License at
1999
- *
2000
- * http://www.apache.org/licenses/LICENSE-2.0
2001
- *
2002
- * Unless required by applicable law or agreed to in writing, software
2003
- * distributed under the License is distributed on an "AS IS" BASIS,
2004
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2005
- * See the License for the specific language governing permissions and
2006
- * limitations under the License.
2007
- */
2008
- function K(t, e, n) {
2009
- let r = e;
2010
- return n == null && (r = `https://${e}`), `${n}://${r}/v0${t}`;
2011
- }
2012
- function We(t) {
2013
- const e = encodeURIComponent;
2014
- let n = "?";
2015
- for (const r in t)
2016
- if (t.hasOwnProperty(r)) {
2017
- const s = e(r) + "=" + e(t[r]);
2018
- n = n + s + "&";
2019
- }
2020
- return n = n.slice(0, -1), n;
2021
- }
2022
- /**
2023
- * @license
2024
- * Copyright 2017 Google LLC
2025
- *
2026
- * Licensed under the Apache License, Version 2.0 (the "License");
2027
- * you may not use this file except in compliance with the License.
2028
- * You may obtain a copy of the License at
2029
- *
2030
- * http://www.apache.org/licenses/LICENSE-2.0
2031
- *
2032
- * Unless required by applicable law or agreed to in writing, software
2033
- * distributed under the License is distributed on an "AS IS" BASIS,
2034
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2035
- * See the License for the specific language governing permissions and
2036
- * limitations under the License.
2037
- */
2038
- var k;
2039
- (function(t) {
2040
- t[t.NO_ERROR = 0] = "NO_ERROR", t[t.NETWORK_ERROR = 1] = "NETWORK_ERROR", t[t.ABORT = 2] = "ABORT";
2041
- })(k || (k = {}));
2042
- /**
2043
- * @license
2044
- * Copyright 2022 Google LLC
2045
- *
2046
- * Licensed under the Apache License, Version 2.0 (the "License");
2047
- * you may not use this file except in compliance with the License.
2048
- * You may obtain a copy of the License at
2049
- *
2050
- * http://www.apache.org/licenses/LICENSE-2.0
2051
- *
2052
- * Unless required by applicable law or agreed to in writing, software
2053
- * distributed under the License is distributed on an "AS IS" BASIS,
2054
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2055
- * See the License for the specific language governing permissions and
2056
- * limitations under the License.
2057
- */
2058
- function rr(t, e) {
2059
- const n = t >= 500 && t < 600, s = [
2060
- // Request Timeout: web server didn't receive full request in time.
2061
- 408,
2062
- // Too Many Requests: you're getting rate-limited, basically.
2063
- 429
2064
- ].indexOf(t) !== -1, o = e.indexOf(t) !== -1;
2065
- return n || s || o;
2066
- }
2067
- /**
2068
- * @license
2069
- * Copyright 2017 Google LLC
2070
- *
2071
- * Licensed under the Apache License, Version 2.0 (the "License");
2072
- * you may not use this file except in compliance with the License.
2073
- * You may obtain a copy of the License at
2074
- *
2075
- * http://www.apache.org/licenses/LICENSE-2.0
2076
- *
2077
- * Unless required by applicable law or agreed to in writing, software
2078
- * distributed under the License is distributed on an "AS IS" BASIS,
2079
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2080
- * See the License for the specific language governing permissions and
2081
- * limitations under the License.
2082
- */
2083
- class sr {
2084
- constructor(e, n, r, s, o, i, a, c, u, f, h, _ = !0) {
2085
- this.url_ = e, this.method_ = n, this.headers_ = r, this.body_ = s, this.successCodes_ = o, this.additionalRetryCodes_ = i, this.callback_ = a, this.errorCallback_ = c, this.timeout_ = u, this.progressCallback_ = f, this.connectionFactory_ = h, this.retry = _, this.pendingConnection_ = null, this.backoffId_ = null, this.canceled_ = !1, this.appDelete_ = !1, this.promise_ = new Promise((m, I) => {
2086
- this.resolve_ = m, this.reject_ = I, this.start_();
2087
- });
2088
- }
2089
- /**
2090
- * Actually starts the retry loop.
2091
- */
2092
- start_() {
2093
- const e = (r, s) => {
2094
- if (s) {
2095
- r(!1, new G(!1, null, !0));
2096
- return;
2097
- }
2098
- const o = this.connectionFactory_();
2099
- this.pendingConnection_ = o;
2100
- const i = (a) => {
2101
- const c = a.loaded, u = a.lengthComputable ? a.total : -1;
2102
- this.progressCallback_ !== null && this.progressCallback_(c, u);
2103
- };
2104
- this.progressCallback_ !== null && o.addUploadProgressListener(i), o.send(this.url_, this.method_, this.body_, this.headers_).then(() => {
2105
- this.progressCallback_ !== null && o.removeUploadProgressListener(i), this.pendingConnection_ = null;
2106
- const a = o.getErrorCode() === k.NO_ERROR, c = o.getStatus();
2107
- if (!a || rr(c, this.additionalRetryCodes_) && this.retry) {
2108
- const f = o.getErrorCode() === k.ABORT;
2109
- r(!1, new G(!1, null, f));
2110
- return;
2111
- }
2112
- const u = this.successCodes_.indexOf(c) !== -1;
2113
- r(!0, new G(u, o));
2114
- });
2115
- }, n = (r, s) => {
2116
- const o = this.resolve_, i = this.reject_, a = s.connection;
2117
- if (s.wasSuccessCode)
2118
- try {
2119
- const c = this.callback_(a, a.getResponse());
2120
- tr(c) ? o(c) : o();
2121
- } catch (c) {
2122
- i(c);
2123
- }
2124
- else if (a !== null) {
2125
- const c = he();
2126
- c.serverResponse = a.getErrorText(), this.errorCallback_ ? i(this.errorCallback_(a, c)) : i(c);
2127
- } else if (s.canceled) {
2128
- const c = this.appDelete_ ? Ve() : Vn();
2129
- i(c);
2130
- } else {
2131
- const c = Gn();
2132
- i(c);
2133
- }
2134
- };
2135
- this.canceled_ ? n(!1, new G(!1, null, !0)) : this.backoffId_ = Qn(e, n, this.timeout_);
2136
- }
2137
- /** @inheritDoc */
2138
- getPromise() {
2139
- return this.promise_;
2140
- }
2141
- /** @inheritDoc */
2142
- cancel(e) {
2143
- this.canceled_ = !0, this.appDelete_ = e || !1, this.backoffId_ !== null && er(this.backoffId_), this.pendingConnection_ !== null && this.pendingConnection_.abort();
2144
- }
2145
- }
2146
- class G {
2147
- constructor(e, n, r) {
2148
- this.wasSuccessCode = e, this.connection = n, this.canceled = !!r;
2149
- }
2150
- }
2151
- function or(t, e) {
2152
- e !== null && e.length > 0 && (t.Authorization = "Firebase " + e);
2153
- }
2154
- function ir(t, e) {
2155
- t["X-Firebase-Storage-Version"] = "webjs/" + (e ?? "AppManager");
2156
- }
2157
- function ar(t, e) {
2158
- e && (t["X-Firebase-GMPID"] = e);
2159
- }
2160
- function cr(t, e) {
2161
- e !== null && (t["X-Firebase-AppCheck"] = e);
2162
- }
2163
- function ur(t, e, n, r, s, o, i = !0) {
2164
- const a = We(t.urlParams), c = t.url + a, u = Object.assign({}, t.headers);
2165
- return ar(u, e), or(u, n), ir(u, o), cr(u, r), new sr(c, t.method, u, t.body, t.successCodes, t.additionalRetryCodes, t.handler, t.errorHandler, t.timeout, t.progressCallback, s, i);
2166
- }
2167
- /**
2168
- * @license
2169
- * Copyright 2017 Google LLC
2170
- *
2171
- * Licensed under the Apache License, Version 2.0 (the "License");
2172
- * you may not use this file except in compliance with the License.
2173
- * You may obtain a copy of the License at
2174
- *
2175
- * http://www.apache.org/licenses/LICENSE-2.0
2176
- *
2177
- * Unless required by applicable law or agreed to in writing, software
2178
- * distributed under the License is distributed on an "AS IS" BASIS,
2179
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2180
- * See the License for the specific language governing permissions and
2181
- * limitations under the License.
2182
- */
2183
- function lr() {
2184
- return typeof BlobBuilder < "u" ? BlobBuilder : typeof WebKitBlobBuilder < "u" ? WebKitBlobBuilder : void 0;
2185
- }
2186
- function dr(...t) {
2187
- const e = lr();
2188
- if (e !== void 0) {
2189
- const n = new e();
2190
- for (let r = 0; r < t.length; r++)
2191
- n.append(t[r]);
2192
- return n.getBlob();
2193
- } else {
2194
- if (fe())
2195
- return new Blob(t);
2196
- throw new p(d.UNSUPPORTED_ENVIRONMENT, "This browser doesn't seem to support creating Blobs");
2197
- }
2198
- }
2199
- function pr(t, e, n) {
2200
- return t.webkitSlice ? t.webkitSlice(e, n) : t.mozSlice ? t.mozSlice(e, n) : t.slice ? t.slice(e, n) : null;
2201
- }
2202
- /**
2203
- * @license
2204
- * Copyright 2021 Google LLC
2205
- *
2206
- * Licensed under the Apache License, Version 2.0 (the "License");
2207
- * you may not use this file except in compliance with the License.
2208
- * You may obtain a copy of the License at
2209
- *
2210
- * http://www.apache.org/licenses/LICENSE-2.0
2211
- *
2212
- * Unless required by applicable law or agreed to in writing, software
2213
- * distributed under the License is distributed on an "AS IS" BASIS,
2214
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2215
- * See the License for the specific language governing permissions and
2216
- * limitations under the License.
2217
- */
2218
- function hr(t) {
2219
- if (typeof atob > "u")
2220
- throw Yn("base-64");
2221
- return atob(t);
2222
- }
2223
- /**
2224
- * @license
2225
- * Copyright 2017 Google LLC
2226
- *
2227
- * Licensed under the Apache License, Version 2.0 (the "License");
2228
- * you may not use this file except in compliance with the License.
2229
- * You may obtain a copy of the License at
2230
- *
2231
- * http://www.apache.org/licenses/LICENSE-2.0
2232
- *
2233
- * Unless required by applicable law or agreed to in writing, software
2234
- * distributed under the License is distributed on an "AS IS" BASIS,
2235
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2236
- * See the License for the specific language governing permissions and
2237
- * limitations under the License.
2238
- */
2239
- const v = {
2240
- /**
2241
- * Indicates the string should be interpreted "raw", that is, as normal text.
2242
- * The string will be interpreted as UTF-16, then uploaded as a UTF-8 byte
2243
- * sequence.
2244
- * Example: The string 'Hello! \\ud83d\\ude0a' becomes the byte sequence
2245
- * 48 65 6c 6c 6f 21 20 f0 9f 98 8a
2246
- */
2247
- RAW: "raw",
2248
- /**
2249
- * Indicates the string should be interpreted as base64-encoded data.
2250
- * Padding characters (trailing '='s) are optional.
2251
- * Example: The string 'rWmO++E6t7/rlw==' becomes the byte sequence
2252
- * ad 69 8e fb e1 3a b7 bf eb 97
2253
- */
2254
- BASE64: "base64",
2255
- /**
2256
- * Indicates the string should be interpreted as base64url-encoded data.
2257
- * Padding characters (trailing '='s) are optional.
2258
- * Example: The string 'rWmO--E6t7_rlw==' becomes the byte sequence
2259
- * ad 69 8e fb e1 3a b7 bf eb 97
2260
- */
2261
- BASE64URL: "base64url",
2262
- /**
2263
- * Indicates the string is a data URL, such as one obtained from
2264
- * canvas.toDataURL().
2265
- * Example: the string 'data:application/octet-stream;base64,aaaa'
2266
- * becomes the byte sequence
2267
- * 69 a6 9a
2268
- * (the content-type "application/octet-stream" is also applied, but can
2269
- * be overridden in the metadata object).
2270
- */
2271
- DATA_URL: "data_url"
2272
- };
2273
- class re {
2274
- constructor(e, n) {
2275
- this.data = e, this.contentType = n || null;
2276
- }
2277
- }
2278
- function _r(t, e) {
2279
- switch (t) {
2280
- case v.RAW:
2281
- return new re(ze(e));
2282
- case v.BASE64:
2283
- case v.BASE64URL:
2284
- return new re(Ke(t, e));
2285
- case v.DATA_URL:
2286
- return new re(mr(e), gr(e));
2287
- }
2288
- throw he();
2289
- }
2290
- function ze(t) {
2291
- const e = [];
2292
- for (let n = 0; n < t.length; n++) {
2293
- let r = t.charCodeAt(n);
2294
- if (r <= 127)
2295
- e.push(r);
2296
- else if (r <= 2047)
2297
- e.push(192 | r >> 6, 128 | r & 63);
2298
- else if ((r & 64512) === 55296)
2299
- if (!(n < t.length - 1 && (t.charCodeAt(n + 1) & 64512) === 56320))
2300
- e.push(239, 191, 189);
2301
- else {
2302
- const o = r, i = t.charCodeAt(++n);
2303
- r = 65536 | (o & 1023) << 10 | i & 1023, e.push(240 | r >> 18, 128 | r >> 12 & 63, 128 | r >> 6 & 63, 128 | r & 63);
2304
- }
2305
- else
2306
- (r & 64512) === 56320 ? e.push(239, 191, 189) : e.push(224 | r >> 12, 128 | r >> 6 & 63, 128 | r & 63);
2307
- }
2308
- return new Uint8Array(e);
2309
- }
2310
- function fr(t) {
2311
- let e;
2312
- try {
2313
- e = decodeURIComponent(t);
2314
- } catch {
2315
- throw M(v.DATA_URL, "Malformed data URL.");
2316
- }
2317
- return ze(e);
2318
- }
2319
- function Ke(t, e) {
2320
- switch (t) {
2321
- case v.BASE64: {
2322
- const s = e.indexOf("-") !== -1, o = e.indexOf("_") !== -1;
2323
- if (s || o)
2324
- throw M(t, "Invalid character '" + (s ? "-" : "_") + "' found: is it base64url encoded?");
2325
- break;
2326
- }
2327
- case v.BASE64URL: {
2328
- const s = e.indexOf("+") !== -1, o = e.indexOf("/") !== -1;
2329
- if (s || o)
2330
- throw M(t, "Invalid character '" + (s ? "+" : "/") + "' found: is it base64 encoded?");
2331
- e = e.replace(/-/g, "+").replace(/_/g, "/");
2332
- break;
2333
- }
2334
- }
2335
- let n;
2336
- try {
2337
- n = hr(e);
2338
- } catch (s) {
2339
- throw s.message.includes("polyfill") ? s : M(t, "Invalid character found");
2340
- }
2341
- const r = new Uint8Array(n.length);
2342
- for (let s = 0; s < n.length; s++)
2343
- r[s] = n.charCodeAt(s);
2344
- return r;
2345
- }
2346
- class Xe {
2347
- constructor(e) {
2348
- this.base64 = !1, this.contentType = null;
2349
- const n = e.match(/^data:([^,]+)?,/);
2350
- if (n === null)
2351
- throw M(v.DATA_URL, "Must be formatted 'data:[<mediatype>][;base64],<data>");
2352
- const r = n[1] || null;
2353
- r != null && (this.base64 = br(r, ";base64"), this.contentType = this.base64 ? r.substring(0, r.length - 7) : r), this.rest = e.substring(e.indexOf(",") + 1);
2354
- }
2355
- }
2356
- function mr(t) {
2357
- const e = new Xe(t);
2358
- return e.base64 ? Ke(v.BASE64, e.rest) : fr(e.rest);
2359
- }
2360
- function gr(t) {
2361
- return new Xe(t).contentType;
2362
- }
2363
- function br(t, e) {
2364
- return t.length >= e.length ? t.substring(t.length - e.length) === e : !1;
2365
- }
2366
- /**
2367
- * @license
2368
- * Copyright 2017 Google LLC
2369
- *
2370
- * Licensed under the Apache License, Version 2.0 (the "License");
2371
- * you may not use this file except in compliance with the License.
2372
- * You may obtain a copy of the License at
2373
- *
2374
- * http://www.apache.org/licenses/LICENSE-2.0
2375
- *
2376
- * Unless required by applicable law or agreed to in writing, software
2377
- * distributed under the License is distributed on an "AS IS" BASIS,
2378
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2379
- * See the License for the specific language governing permissions and
2380
- * limitations under the License.
2381
- */
2382
- class y {
2383
- constructor(e, n) {
2384
- let r = 0, s = "";
2385
- De(e) ? (this.data_ = e, r = e.size, s = e.type) : e instanceof ArrayBuffer ? (n ? this.data_ = new Uint8Array(e) : (this.data_ = new Uint8Array(e.byteLength), this.data_.set(new Uint8Array(e))), r = this.data_.length) : e instanceof Uint8Array && (n ? this.data_ = e : (this.data_ = new Uint8Array(e.length), this.data_.set(e)), r = e.length), this.size_ = r, this.type_ = s;
2386
- }
2387
- size() {
2388
- return this.size_;
2389
- }
2390
- type() {
2391
- return this.type_;
2392
- }
2393
- slice(e, n) {
2394
- if (De(this.data_)) {
2395
- const r = this.data_, s = pr(r, e, n);
2396
- return s === null ? null : new y(s);
2397
- } else {
2398
- const r = new Uint8Array(this.data_.buffer, e, n - e);
2399
- return new y(r, !0);
2400
- }
2401
- }
2402
- static getBlob(...e) {
2403
- if (fe()) {
2404
- const n = e.map((r) => r instanceof y ? r.data_ : r);
2405
- return new y(dr.apply(null, n));
2406
- } else {
2407
- const n = e.map((i) => _e(i) ? _r(v.RAW, i).data : i.data_);
2408
- let r = 0;
2409
- n.forEach((i) => {
2410
- r += i.byteLength;
2411
- });
2412
- const s = new Uint8Array(r);
2413
- let o = 0;
2414
- return n.forEach((i) => {
2415
- for (let a = 0; a < i.length; a++)
2416
- s[o++] = i[a];
2417
- }), new y(s, !0);
2418
- }
2419
- }
2420
- uploadData() {
2421
- return this.data_;
2422
- }
2423
- }
2424
- /**
2425
- * @license
2426
- * Copyright 2017 Google LLC
2427
- *
2428
- * Licensed under the Apache License, Version 2.0 (the "License");
2429
- * you may not use this file except in compliance with the License.
2430
- * You may obtain a copy of the License at
2431
- *
2432
- * http://www.apache.org/licenses/LICENSE-2.0
2433
- *
2434
- * Unless required by applicable law or agreed to in writing, software
2435
- * distributed under the License is distributed on an "AS IS" BASIS,
2436
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2437
- * See the License for the specific language governing permissions and
2438
- * limitations under the License.
2439
- */
2440
- function qe(t) {
2441
- let e;
2442
- try {
2443
- e = JSON.parse(t);
2444
- } catch {
2445
- return null;
2446
- }
2447
- return nr(e) ? e : null;
2448
- }
2449
- /**
2450
- * @license
2451
- * Copyright 2017 Google LLC
2452
- *
2453
- * Licensed under the Apache License, Version 2.0 (the "License");
2454
- * you may not use this file except in compliance with the License.
2455
- * You may obtain a copy of the License at
2456
- *
2457
- * http://www.apache.org/licenses/LICENSE-2.0
2458
- *
2459
- * Unless required by applicable law or agreed to in writing, software
2460
- * distributed under the License is distributed on an "AS IS" BASIS,
2461
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2462
- * See the License for the specific language governing permissions and
2463
- * limitations under the License.
2464
- */
2465
- function Er(t) {
2466
- if (t.length === 0)
2467
- return null;
2468
- const e = t.lastIndexOf("/");
2469
- return e === -1 ? "" : t.slice(0, e);
2470
- }
2471
- function Rr(t, e) {
2472
- const n = e.split("/").filter((r) => r.length > 0).join("/");
2473
- return t.length === 0 ? n : t + "/" + n;
2474
- }
2475
- function Ye(t) {
2476
- const e = t.lastIndexOf("/", t.length - 2);
2477
- return e === -1 ? t : t.slice(e + 1);
2478
- }
2479
- /**
2480
- * @license
2481
- * Copyright 2017 Google LLC
2482
- *
2483
- * Licensed under the Apache License, Version 2.0 (the "License");
2484
- * you may not use this file except in compliance with the License.
2485
- * You may obtain a copy of the License at
2486
- *
2487
- * http://www.apache.org/licenses/LICENSE-2.0
2488
- *
2489
- * Unless required by applicable law or agreed to in writing, software
2490
- * distributed under the License is distributed on an "AS IS" BASIS,
2491
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2492
- * See the License for the specific language governing permissions and
2493
- * limitations under the License.
2494
- */
2495
- function Ir(t, e) {
2496
- return e;
2497
- }
2498
- class g {
2499
- constructor(e, n, r, s) {
2500
- this.server = e, this.local = n || e, this.writable = !!r, this.xform = s || Ir;
2501
- }
2502
- }
2503
- let V = null;
2504
- function Tr(t) {
2505
- return !_e(t) || t.length < 2 ? t : Ye(t);
2506
- }
2507
- function Je() {
2508
- if (V)
2509
- return V;
2510
- const t = [];
2511
- t.push(new g("bucket")), t.push(new g("generation")), t.push(new g("metageneration")), t.push(new g("name", "fullPath", !0));
2512
- function e(o, i) {
2513
- return Tr(i);
2514
- }
2515
- const n = new g("name");
2516
- n.xform = e, t.push(n);
2517
- function r(o, i) {
2518
- return i !== void 0 ? Number(i) : i;
2519
- }
2520
- const s = new g("size");
2521
- return s.xform = r, t.push(s), t.push(new g("timeCreated")), t.push(new g("updated")), t.push(new g("md5Hash", null, !0)), t.push(new g("cacheControl", null, !0)), t.push(new g("contentDisposition", null, !0)), t.push(new g("contentEncoding", null, !0)), t.push(new g("contentLanguage", null, !0)), t.push(new g("contentType", null, !0)), t.push(new g("metadata", "customMetadata", !0)), V = t, V;
2522
- }
2523
- function vr(t, e) {
2524
- function n() {
2525
- const r = t.bucket, s = t.fullPath, o = new R(r, s);
2526
- return e._makeStorageReference(o);
2527
- }
2528
- Object.defineProperty(t, "ref", { get: n });
2529
- }
2530
- function yr(t, e, n) {
2531
- const r = {};
2532
- r.type = "file";
2533
- const s = n.length;
2534
- for (let o = 0; o < s; o++) {
2535
- const i = n[o];
2536
- r[i.local] = i.xform(r, e[i.server]);
2537
- }
2538
- return vr(r, t), r;
2539
- }
2540
- function Ze(t, e, n) {
2541
- const r = qe(e);
2542
- return r === null ? null : yr(t, r, n);
2543
- }
2544
- function Ar(t, e, n, r) {
2545
- const s = qe(e);
2546
- if (s === null || !_e(s.downloadTokens))
2547
- return null;
2548
- const o = s.downloadTokens;
2549
- if (o.length === 0)
2550
- return null;
2551
- const i = encodeURIComponent;
2552
- return o.split(",").map((u) => {
2553
- const f = t.bucket, h = t.fullPath, _ = "/b/" + i(f) + "/o/" + i(h), m = K(_, n, r), I = We({
2554
- alt: "media",
2555
- token: u
2556
- });
2557
- return m + I;
2558
- })[0];
2559
- }
2560
- function wr(t, e) {
2561
- const n = {}, r = e.length;
2562
- for (let s = 0; s < r; s++) {
2563
- const o = e[s];
2564
- o.writable && (n[o.server] = t[o.local]);
2565
- }
2566
- return JSON.stringify(n);
2567
- }
2568
- class me {
2569
- constructor(e, n, r, s) {
2570
- this.url = e, this.method = n, this.handler = r, this.timeout = s, this.urlParams = {}, this.headers = {}, this.body = null, this.errorHandler = null, this.progressCallback = null, this.successCodes = [200], this.additionalRetryCodes = [];
2571
- }
2572
- }
2573
- /**
2574
- * @license
2575
- * Copyright 2017 Google LLC
2576
- *
2577
- * Licensed under the Apache License, Version 2.0 (the "License");
2578
- * you may not use this file except in compliance with the License.
2579
- * You may obtain a copy of the License at
2580
- *
2581
- * http://www.apache.org/licenses/LICENSE-2.0
2582
- *
2583
- * Unless required by applicable law or agreed to in writing, software
2584
- * distributed under the License is distributed on an "AS IS" BASIS,
2585
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2586
- * See the License for the specific language governing permissions and
2587
- * limitations under the License.
2588
- */
2589
- function Qe(t) {
2590
- if (!t)
2591
- throw he();
2592
- }
2593
- function Or(t, e) {
2594
- function n(r, s) {
2595
- const o = Ze(t, s, e);
2596
- return Qe(o !== null), o;
2597
- }
2598
- return n;
2599
- }
2600
- function Dr(t, e) {
2601
- function n(r, s) {
2602
- const o = Ze(t, s, e);
2603
- return Qe(o !== null), Ar(o, s, t.host, t._protocol);
2604
- }
2605
- return n;
2606
- }
2607
- function et(t) {
2608
- function e(n, r) {
2609
- let s;
2610
- return n.getStatus() === 401 ? /* This exact message string is the only consistent part of the */ /* server's error response that identifies it as an App Check error. */ n.getErrorText().includes("Firebase App Check token is invalid") ? s = $n() : s = Fn() : n.getStatus() === 402 ? s = xn(t.bucket) : n.getStatus() === 403 ? s = jn(t.path) : s = r, s.status = n.getStatus(), s.serverResponse = r.serverResponse, s;
2611
- }
2612
- return e;
2613
- }
2614
- function tt(t) {
2615
- const e = et(t);
2616
- function n(r, s) {
2617
- let o = e(r, s);
2618
- return r.getStatus() === 404 && (o = Hn(t.path)), o.serverResponse = s.serverResponse, o;
2619
- }
2620
- return n;
2621
- }
2622
- function kr(t, e, n) {
2623
- const r = e.fullServerUrl(), s = K(r, t.host, t._protocol), o = "GET", i = t.maxOperationRetryTime, a = new me(s, o, Dr(t, n), i);
2624
- return a.errorHandler = tt(e), a;
2625
- }
2626
- function Nr(t, e) {
2627
- const n = e.fullServerUrl(), r = K(n, t.host, t._protocol), s = "DELETE", o = t.maxOperationRetryTime;
2628
- function i(c, u) {
2629
- }
2630
- const a = new me(r, s, i, o);
2631
- return a.successCodes = [200, 204], a.errorHandler = tt(e), a;
2632
- }
2633
- function Sr(t, e) {
2634
- return t && t.contentType || e && e.type() || "application/octet-stream";
2635
- }
2636
- function Cr(t, e, n) {
2637
- const r = Object.assign({}, n);
2638
- return r.fullPath = t.path, r.size = e.size(), r.contentType || (r.contentType = Sr(null, e)), r;
2639
- }
2640
- function Ur(t, e, n, r, s) {
2641
- const o = e.bucketOnlyServerUrl(), i = {
2642
- "X-Goog-Upload-Protocol": "multipart"
2643
- };
2644
- function a() {
2645
- let T = "";
2646
- for (let E = 0; E < 2; E++)
2647
- T = T + Math.random().toString().slice(2);
2648
- return T;
2649
- }
2650
- const c = a();
2651
- i["Content-Type"] = "multipart/related; boundary=" + c;
2652
- const u = Cr(e, r, s), f = wr(u, n), h = "--" + c + `\r
2653
- Content-Type: application/json; charset=utf-8\r
2654
- \r
2655
- ` + f + `\r
2656
- --` + c + `\r
2657
- Content-Type: ` + u.contentType + `\r
2658
- \r
2659
- `, _ = `\r
2660
- --` + c + "--", m = y.getBlob(h, r, _);
2661
- if (m === null)
2662
- throw Xn();
2663
- const I = { name: u.fullPath }, C = K(o, t.host, t._protocol), b = "POST", U = t.maxUploadRetryTime, O = new me(C, b, Or(t, n), U);
2664
- return O.urlParams = I, O.headers = i, O.body = m.uploadData(), O.errorHandler = et(e), O;
2665
- }
2666
- class Br {
2667
- constructor() {
2668
- this.sent_ = !1, this.xhr_ = new XMLHttpRequest(), this.initXhr(), this.errorCode_ = k.NO_ERROR, this.sendPromise_ = new Promise((e) => {
2669
- this.xhr_.addEventListener("abort", () => {
2670
- this.errorCode_ = k.ABORT, e();
2671
- }), this.xhr_.addEventListener("error", () => {
2672
- this.errorCode_ = k.NETWORK_ERROR, e();
2673
- }), this.xhr_.addEventListener("load", () => {
2674
- e();
2675
- });
2676
- });
2677
- }
2678
- send(e, n, r, s) {
2679
- if (this.sent_)
2680
- throw P("cannot .send() more than once");
2681
- if (this.sent_ = !0, this.xhr_.open(n, e, !0), s !== void 0)
2682
- for (const o in s)
2683
- s.hasOwnProperty(o) && this.xhr_.setRequestHeader(o, s[o].toString());
2684
- return r !== void 0 ? this.xhr_.send(r) : this.xhr_.send(), this.sendPromise_;
2685
- }
2686
- getErrorCode() {
2687
- if (!this.sent_)
2688
- throw P("cannot .getErrorCode() before sending");
2689
- return this.errorCode_;
2690
- }
2691
- getStatus() {
2692
- if (!this.sent_)
2693
- throw P("cannot .getStatus() before sending");
2694
- try {
2695
- return this.xhr_.status;
2696
- } catch {
2697
- return -1;
2698
- }
2699
- }
2700
- getResponse() {
2701
- if (!this.sent_)
2702
- throw P("cannot .getResponse() before sending");
2703
- return this.xhr_.response;
2704
- }
2705
- getErrorText() {
2706
- if (!this.sent_)
2707
- throw P("cannot .getErrorText() before sending");
2708
- return this.xhr_.statusText;
2709
- }
2710
- /** Aborts the request. */
2711
- abort() {
2712
- this.xhr_.abort();
2713
- }
2714
- getResponseHeader(e) {
2715
- return this.xhr_.getResponseHeader(e);
2716
- }
2717
- addUploadProgressListener(e) {
2718
- this.xhr_.upload != null && this.xhr_.upload.addEventListener("progress", e);
2719
- }
2720
- removeUploadProgressListener(e) {
2721
- this.xhr_.upload != null && this.xhr_.upload.removeEventListener("progress", e);
2722
- }
2723
- }
2724
- class Pr extends Br {
2725
- initXhr() {
2726
- this.xhr_.responseType = "text";
2727
- }
2728
- }
2729
- function ge() {
2730
- return new Pr();
2731
- }
2732
- /**
2733
- * @license
2734
- * Copyright 2019 Google LLC
2735
- *
2736
- * Licensed under the Apache License, Version 2.0 (the "License");
2737
- * you may not use this file except in compliance with the License.
2738
- * You may obtain a copy of the License at
2739
- *
2740
- * http://www.apache.org/licenses/LICENSE-2.0
2741
- *
2742
- * Unless required by applicable law or agreed to in writing, software
2743
- * distributed under the License is distributed on an "AS IS" BASIS,
2744
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2745
- * See the License for the specific language governing permissions and
2746
- * limitations under the License.
2747
- */
2748
- class S {
2749
- constructor(e, n) {
2750
- this._service = e, n instanceof R ? this._location = n : this._location = R.makeFromUrl(n, e.host);
2751
- }
2752
- /**
2753
- * Returns the URL for the bucket and path this object references,
2754
- * in the form gs://<bucket>/<object-path>
2755
- * @override
2756
- */
2757
- toString() {
2758
- return "gs://" + this._location.bucket + "/" + this._location.path;
2759
- }
2760
- _newRef(e, n) {
2761
- return new S(e, n);
2762
- }
2763
- /**
2764
- * A reference to the root of this object's bucket.
2765
- */
2766
- get root() {
2767
- const e = new R(this._location.bucket, "");
2768
- return this._newRef(this._service, e);
2769
- }
2770
- /**
2771
- * The name of the bucket containing this reference's object.
2772
- */
2773
- get bucket() {
2774
- return this._location.bucket;
2775
- }
2776
- /**
2777
- * The full path of this object.
2778
- */
2779
- get fullPath() {
2780
- return this._location.path;
2781
- }
2782
- /**
2783
- * The short name of this object, which is the last component of the full path.
2784
- * For example, if fullPath is 'full/path/image.png', name is 'image.png'.
2785
- */
2786
- get name() {
2787
- return Ye(this._location.path);
2788
- }
2789
- /**
2790
- * The `StorageService` instance this `StorageReference` is associated with.
2791
- */
2792
- get storage() {
2793
- return this._service;
2794
- }
2795
- /**
2796
- * A `StorageReference` pointing to the parent location of this `StorageReference`, or null if
2797
- * this reference is the root.
2798
- */
2799
- get parent() {
2800
- const e = Er(this._location.path);
2801
- if (e === null)
2802
- return null;
2803
- const n = new R(this._location.bucket, e);
2804
- return new S(this._service, n);
2805
- }
2806
- /**
2807
- * Utility function to throw an error in methods that do not accept a root reference.
2808
- */
2809
- _throwIfRoot(e) {
2810
- if (this._location.path === "")
2811
- throw Jn(e);
2812
- }
2813
- }
2814
- function Lr(t, e, n) {
2815
- t._throwIfRoot("uploadBytes");
2816
- const r = Ur(t.storage, t._location, Je(), new y(e, !0), n);
2817
- return t.storage.makeRequestWithTokens(r, ge).then((s) => ({
2818
- metadata: s,
2819
- ref: t
2820
- }));
2821
- }
2822
- function Mr(t) {
2823
- t._throwIfRoot("getDownloadURL");
2824
- const e = kr(t.storage, t._location, Je());
2825
- return t.storage.makeRequestWithTokens(e, ge).then((n) => {
2826
- if (n === null)
2827
- throw qn();
2828
- return n;
2829
- });
2830
- }
2831
- function Hr(t) {
2832
- t._throwIfRoot("deleteObject");
2833
- const e = Nr(t.storage, t._location);
2834
- return t.storage.makeRequestWithTokens(e, ge);
2835
- }
2836
- function xr(t, e) {
2837
- const n = Rr(t._location.path, e), r = new R(t._location.bucket, n);
2838
- return new S(t.storage, r);
2839
- }
2840
- /**
2841
- * @license
2842
- * Copyright 2017 Google LLC
2843
- *
2844
- * Licensed under the Apache License, Version 2.0 (the "License");
2845
- * you may not use this file except in compliance with the License.
2846
- * You may obtain a copy of the License at
2847
- *
2848
- * http://www.apache.org/licenses/LICENSE-2.0
2849
- *
2850
- * Unless required by applicable law or agreed to in writing, software
2851
- * distributed under the License is distributed on an "AS IS" BASIS,
2852
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2853
- * See the License for the specific language governing permissions and
2854
- * limitations under the License.
2855
- */
2856
- function Fr(t) {
2857
- return /^[A-Za-z]+:\/\//.test(t);
2858
- }
2859
- function $r(t, e) {
2860
- return new S(t, e);
2861
- }
2862
- function nt(t, e) {
2863
- if (t instanceof be) {
2864
- const n = t;
2865
- if (n._bucket == null)
2866
- throw Kn();
2867
- const r = new S(n, n._bucket);
2868
- return e != null ? nt(r, e) : r;
2869
- } else
2870
- return e !== void 0 ? xr(t, e) : t;
2871
- }
2872
- function jr(t, e) {
2873
- if (e && Fr(e)) {
2874
- if (t instanceof be)
2875
- return $r(t, e);
2876
- throw le("To use ref(service, url), the first argument must be a Storage instance.");
2877
- } else
2878
- return nt(t, e);
2879
- }
2880
- function Ne(t, e) {
2881
- const n = e == null ? void 0 : e[Ge];
2882
- return n == null ? null : R.makeFromBucketSpec(n, t);
2883
- }
2884
- function Gr(t, e, n, r = {}) {
2885
- t.host = `${e}:${n}`, t._protocol = "http";
2886
- const { mockUserToken: s } = r;
2887
- s && (t._overrideAuthToken = typeof s == "string" ? s : mt(s, t.app.options.projectId));
2888
- }
2889
- class be {
2890
- constructor(e, n, r, s, o) {
2891
- this.app = e, this._authProvider = n, this._appCheckProvider = r, this._url = s, this._firebaseVersion = o, this._bucket = null, this._host = je, this._protocol = "https", this._appId = null, this._deleted = !1, this._maxOperationRetryTime = Ln, this._maxUploadRetryTime = Mn, this._requests = /* @__PURE__ */ new Set(), s != null ? this._bucket = R.makeFromBucketSpec(s, this._host) : this._bucket = Ne(this._host, this.app.options);
2892
- }
2893
- /**
2894
- * The host string for this service, in the form of `host` or
2895
- * `host:port`.
2896
- */
2897
- get host() {
2898
- return this._host;
2899
- }
2900
- set host(e) {
2901
- this._host = e, this._url != null ? this._bucket = R.makeFromBucketSpec(this._url, e) : this._bucket = Ne(e, this.app.options);
2902
- }
2903
- /**
2904
- * The maximum time to retry uploads in milliseconds.
2905
- */
2906
- get maxUploadRetryTime() {
2907
- return this._maxUploadRetryTime;
2908
- }
2909
- set maxUploadRetryTime(e) {
2910
- ke(
2911
- "time",
2912
- /* minValue=*/
2913
- 0,
2914
- /* maxValue= */
2915
- Number.POSITIVE_INFINITY,
2916
- e
2917
- ), this._maxUploadRetryTime = e;
2918
- }
2919
- /**
2920
- * The maximum time to retry operations other than uploads or downloads in
2921
- * milliseconds.
2922
- */
2923
- get maxOperationRetryTime() {
2924
- return this._maxOperationRetryTime;
2925
- }
2926
- set maxOperationRetryTime(e) {
2927
- ke(
2928
- "time",
2929
- /* minValue=*/
2930
- 0,
2931
- /* maxValue= */
2932
- Number.POSITIVE_INFINITY,
2933
- e
2934
- ), this._maxOperationRetryTime = e;
2935
- }
2936
- async _getAuthToken() {
2937
- if (this._overrideAuthToken)
2938
- return this._overrideAuthToken;
2939
- const e = this._authProvider.getImmediate({ optional: !0 });
2940
- if (e) {
2941
- const n = await e.getToken();
2942
- if (n !== null)
2943
- return n.accessToken;
2944
- }
2945
- return null;
2946
- }
2947
- async _getAppCheckToken() {
2948
- const e = this._appCheckProvider.getImmediate({ optional: !0 });
2949
- return e ? (await e.getToken()).token : null;
2950
- }
2951
- /**
2952
- * Stop running requests and prevent more from being created.
2953
- */
2954
- _delete() {
2955
- return this._deleted || (this._deleted = !0, this._requests.forEach((e) => e.cancel()), this._requests.clear()), Promise.resolve();
2956
- }
2957
- /**
2958
- * Returns a new firebaseStorage.Reference object referencing this StorageService
2959
- * at the given Location.
2960
- */
2961
- _makeStorageReference(e) {
2962
- return new S(this, e);
2963
- }
2964
- /**
2965
- * @param requestInfo - HTTP RequestInfo object
2966
- * @param authToken - Firebase auth token
2967
- */
2968
- _makeRequest(e, n, r, s, o = !0) {
2969
- if (this._deleted)
2970
- return new Zn(Ve());
2971
- {
2972
- const i = ur(e, this._appId, r, s, n, this._firebaseVersion, o);
2973
- return this._requests.add(i), i.getPromise().then(() => this._requests.delete(i), () => this._requests.delete(i)), i;
2974
- }
2975
- }
2976
- async makeRequestWithTokens(e, n) {
2977
- const [r, s] = await Promise.all([
2978
- this._getAuthToken(),
2979
- this._getAppCheckToken()
2980
- ]);
2981
- return this._makeRequest(e, n, r, s).getPromise();
2982
- }
2983
- }
2984
- const Se = "@firebase/storage", Ce = "0.12.6";
2985
- /**
2986
- * @license
2987
- * Copyright 2020 Google LLC
2988
- *
2989
- * Licensed under the Apache License, Version 2.0 (the "License");
2990
- * you may not use this file except in compliance with the License.
2991
- * You may obtain a copy of the License at
2992
- *
2993
- * http://www.apache.org/licenses/LICENSE-2.0
2994
- *
2995
- * Unless required by applicable law or agreed to in writing, software
2996
- * distributed under the License is distributed on an "AS IS" BASIS,
2997
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2998
- * See the License for the specific language governing permissions and
2999
- * limitations under the License.
3000
- */
3001
- const rt = "storage";
3002
- function rs(t, e, n) {
3003
- return t = $(t), Lr(t, e, n);
3004
- }
3005
- function ss(t) {
3006
- return t = $(t), Mr(t);
3007
- }
3008
- function os(t) {
3009
- return t = $(t), Hr(t);
3010
- }
3011
- function is(t, e) {
3012
- return t = $(t), jr(t, e);
3013
- }
3014
- function as(t = wn(), e) {
3015
- t = $(t);
3016
- const r = In(t, rt).getImmediate({
3017
- identifier: e
3018
- }), s = _t("storage");
3019
- return s && Vr(r, ...s), r;
3020
- }
3021
- function Vr(t, e, n, r = {}) {
3022
- Gr(t, e, n, r);
3023
- }
3024
- function Wr(t, { instanceIdentifier: e }) {
3025
- const n = t.getProvider("app").getImmediate(), r = t.getProvider("auth-internal"), s = t.getProvider("app-check-internal");
3026
- return new be(n, r, s, e, yn);
3027
- }
3028
- function zr() {
3029
- z(new H(
3030
- rt,
3031
- Wr,
3032
- "PUBLIC"
3033
- /* ComponentType.PUBLIC */
3034
- ).setMultipleInstances(!0)), L(Se, Ce, ""), L(Se, Ce, "esm2017");
3035
- }
3036
- zr();
3037
- export {
3038
- H as C,
3039
- Me as E,
3040
- B as F,
3041
- Ct as L,
3042
- yn as S,
3043
- z as _,
3044
- Yr as a,
3045
- qr as b,
3046
- ts as c,
3047
- $ as d,
3048
- es as e,
3049
- In as f,
3050
- Kr as g,
3051
- ht as h,
3052
- Xr as i,
3053
- wn as j,
3054
- l as k,
3055
- Le as l,
3056
- se as m,
3057
- ct as n,
3058
- Jr as o,
3059
- Zr as p,
3060
- Qr as q,
3061
- L as r,
3062
- ns as s,
3063
- An as t,
3064
- as as u,
3065
- is as v,
3066
- ss as w,
3067
- rs as x,
3068
- os as y
3069
- };