@feedmepos/mf-payment 1.2.21 → 1.2.23
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.
- package/dist/{PayoutAccount-DsEqU8hK.js → PayoutAccount-CH8We8lQ.js} +6 -6
- package/dist/{PayoutAccount-BJO8qK63.js → PayoutAccount-DpD668YX.js} +5 -5
- package/dist/{PayoutAccountSetting-B9dt772M.js → PayoutAccountSetting-4rChUUC2.js} +3 -3
- package/dist/{Restaurant-Jvhky-xo.js → Restaurant-BdX8Zvgf.js} +4 -4
- package/dist/{RestaurantSetting-C1V2H96h.js → RestaurantSetting-GwZG2qIM.js} +3 -3
- package/dist/{Settlement-DE7WPC6B.js → Settlement-BxgrIFl0.js} +3 -3
- package/dist/{Settlement-BOcW6cys.js → Settlement-C1Cnjbfa.js} +3 -3
- package/dist/{SettlementTransactions-DF7gUi8D.js → SettlementTransactions-BCXpOllL.js} +3 -3
- package/dist/{SettlementTransactions-DOH3dozr.js → SettlementTransactions-DJSO-CHK.js} +3 -3
- package/dist/{Terminal-CQafwGHN.js → Terminal-DgtrqIDu.js} +5 -5
- package/dist/{TerminalSetting-C7YmyFUO.js → TerminalSetting-BDfDUo4z.js} +3 -3
- package/dist/{Transaction-B0iwdCCm.js → Transaction-CRhYNPh0.js} +7 -7
- package/dist/{Transaction-NiOW5uKS.js → Transaction-DudH8wYy.js} +5 -5
- package/dist/{TransactionOld-CcWxcV1S.js → TransactionOld-RjXR9GsJ.js} +4 -4
- package/dist/{TransactionTable.vue_vue_type_script_setup_true_lang-Ci_3cerr.js → TransactionTable.vue_vue_type_script_setup_true_lang-8unyvpBs.js} +3 -3
- package/dist/{app-DeXX5bbm.js → app-DE_s3s24.js} +869 -854
- package/dist/app.js +1 -1
- package/dist/{assets-CKuU57MG.js → assets-B3_vL33P.js} +2 -2
- package/dist/{grafana-D8JxKpJG.js → grafana-gGem10RX.js} +1 -1
- package/dist/{index-B5Wdro6B.js → index-B-qY0UqE.js} +1 -1
- package/dist/{index-BdhRNPHY.js → index-BO20Q-JI.js} +1 -1
- package/dist/{index-UBd3b6lw.js → index-Bu7KNcy0.js} +1 -1
- package/dist/{index-D2Vrq0ZZ.js → index-C46w44Pn.js} +1 -1
- package/dist/{index-CD9N19yB.js → index-C5KhoncH.js} +2 -2
- package/dist/{index-D9bjLfdf.js → index-DuTkLd3Q.js} +8821 -8822
- package/dist/{index-CIwsFgto.js → index-uquYA8M1.js} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-eDh_nfj1.js → index.vue_vue_type_script_setup_true_lang-DlPKXE4R.js} +1 -1
- package/dist/package.json +3 -3
- package/dist/{payout-account-CoxGghFG.js → payout-account-Cm8EH3zV.js} +3 -3
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/package.json +3 -3
@@ -1,9 +1,9 @@
|
|
1
|
-
import { createRouter as Ln, createWebHistory as
|
2
|
-
import { computed as Lt, watch as
|
3
|
-
import { useCoreStore as
|
4
|
-
import { defineStore as
|
5
|
-
import { components as
|
6
|
-
const
|
1
|
+
import { createRouter as Ln, createWebHistory as Mn, useRouter as Un, useRoute as xn } from "vue-router";
|
2
|
+
import { computed as Lt, watch as q, defineComponent as Mt, ref as Fn, resolveComponent as Ut, openBlock as xt, createBlock as Ft, h as Bn, onMounted as $n, onBeforeMount as Hn, unref as Vn } from "vue";
|
3
|
+
import { useCoreStore as je, useI18n as jn } from "@feedmepos/mf-common";
|
4
|
+
import { defineStore as Wn } from "pinia";
|
5
|
+
import { components as zn } from "@feedmepos/ui-library";
|
6
|
+
const Gn = {
|
7
7
|
components: {
|
8
8
|
select: "Select filter entity",
|
9
9
|
restaurant: "Restaurant",
|
@@ -150,9 +150,9 @@ const Yn = {
|
|
150
150
|
}
|
151
151
|
}
|
152
152
|
}
|
153
|
-
},
|
154
|
-
payment:
|
155
|
-
},
|
153
|
+
}, qn = {
|
154
|
+
payment: Gn
|
155
|
+
}, Kn = {
|
156
156
|
components: {
|
157
157
|
select: "选择筛选对象",
|
158
158
|
restaurant: "餐厅",
|
@@ -299,8 +299,8 @@ const Yn = {
|
|
299
299
|
}
|
300
300
|
}
|
301
301
|
}
|
302
|
-
},
|
303
|
-
payment:
|
302
|
+
}, Jn = {
|
303
|
+
payment: Kn
|
304
304
|
}, le = [
|
305
305
|
{
|
306
306
|
path: "/admin/restaurants",
|
@@ -309,7 +309,7 @@ const Yn = {
|
|
309
309
|
sidebarDisplay: "Restaurants",
|
310
310
|
section: "payment-gateway"
|
311
311
|
},
|
312
|
-
component: () => import("./Restaurant-
|
312
|
+
component: () => import("./Restaurant-BdX8Zvgf.js")
|
313
313
|
},
|
314
314
|
{
|
315
315
|
path: "/admin/restaurants/:restaurantId",
|
@@ -318,7 +318,7 @@ const Yn = {
|
|
318
318
|
meta: {
|
319
319
|
parent: "mf-payment-admin.restaurant"
|
320
320
|
},
|
321
|
-
component: () => import("./RestaurantSetting-
|
321
|
+
component: () => import("./RestaurantSetting-GwZG2qIM.js")
|
322
322
|
},
|
323
323
|
{
|
324
324
|
path: "/admin/payout-accounts",
|
@@ -327,7 +327,7 @@ const Yn = {
|
|
327
327
|
sidebarDisplay: "Payout Accounts",
|
328
328
|
section: "payment-gateway"
|
329
329
|
},
|
330
|
-
component: () => import("./PayoutAccount-
|
330
|
+
component: () => import("./PayoutAccount-CH8We8lQ.js")
|
331
331
|
},
|
332
332
|
{
|
333
333
|
path: "/admin/payout-accounts/:accountId",
|
@@ -336,7 +336,7 @@ const Yn = {
|
|
336
336
|
meta: {
|
337
337
|
parent: "mf-payment-admin.payout-account"
|
338
338
|
},
|
339
|
-
component: () => import("./PayoutAccountSetting-
|
339
|
+
component: () => import("./PayoutAccountSetting-4rChUUC2.js")
|
340
340
|
},
|
341
341
|
{
|
342
342
|
path: "/admin/terminal/pos",
|
@@ -345,7 +345,7 @@ const Yn = {
|
|
345
345
|
sidebarDisplay: "POS",
|
346
346
|
section: "device"
|
347
347
|
},
|
348
|
-
component: () => import("./Terminal-
|
348
|
+
component: () => import("./Terminal-DgtrqIDu.js"),
|
349
349
|
props: {
|
350
350
|
type: "POS"
|
351
351
|
}
|
@@ -357,7 +357,7 @@ const Yn = {
|
|
357
357
|
sidebarDisplay: "Kiosks",
|
358
358
|
section: "device"
|
359
359
|
},
|
360
|
-
component: () => import("./Terminal-
|
360
|
+
component: () => import("./Terminal-DgtrqIDu.js"),
|
361
361
|
props: {
|
362
362
|
type: "KIOSK"
|
363
363
|
}
|
@@ -369,7 +369,7 @@ const Yn = {
|
|
369
369
|
sidebarDisplay: "Terminals",
|
370
370
|
section: "device"
|
371
371
|
},
|
372
|
-
component: () => import("./Terminal-
|
372
|
+
component: () => import("./Terminal-DgtrqIDu.js"),
|
373
373
|
props: {
|
374
374
|
type: "TERMINAL"
|
375
375
|
}
|
@@ -381,7 +381,7 @@ const Yn = {
|
|
381
381
|
meta: {
|
382
382
|
parent: "mf-payment-admin.pos"
|
383
383
|
},
|
384
|
-
component: () => import("./TerminalSetting-
|
384
|
+
component: () => import("./TerminalSetting-BDfDUo4z.js")
|
385
385
|
},
|
386
386
|
{
|
387
387
|
path: "/admin/terminal/kiosk/:terminalId",
|
@@ -390,7 +390,7 @@ const Yn = {
|
|
390
390
|
meta: {
|
391
391
|
parent: "mf-payment-admin.kiosk"
|
392
392
|
},
|
393
|
-
component: () => import("./TerminalSetting-
|
393
|
+
component: () => import("./TerminalSetting-BDfDUo4z.js")
|
394
394
|
},
|
395
395
|
{
|
396
396
|
path: "/admin/terminal/terminal/:terminalId",
|
@@ -399,7 +399,7 @@ const Yn = {
|
|
399
399
|
meta: {
|
400
400
|
parent: "mf-payment-admin.terminal"
|
401
401
|
},
|
402
|
-
component: () => import("./TerminalSetting-
|
402
|
+
component: () => import("./TerminalSetting-BDfDUo4z.js")
|
403
403
|
},
|
404
404
|
{
|
405
405
|
path: "/admin/transaction",
|
@@ -407,7 +407,7 @@ const Yn = {
|
|
407
407
|
meta: {
|
408
408
|
sidebarDisplay: "Transactions"
|
409
409
|
},
|
410
|
-
component: () => import("./Transaction-
|
410
|
+
component: () => import("./Transaction-DudH8wYy.js")
|
411
411
|
},
|
412
412
|
{
|
413
413
|
path: "/admin/settlement",
|
@@ -415,7 +415,7 @@ const Yn = {
|
|
415
415
|
meta: {
|
416
416
|
sidebarDisplay: "Settlements"
|
417
417
|
},
|
418
|
-
component: () => import("./Settlement-
|
418
|
+
component: () => import("./Settlement-BxgrIFl0.js")
|
419
419
|
},
|
420
420
|
{
|
421
421
|
path: "/admin/settlement/:settlementId",
|
@@ -424,9 +424,9 @@ const Yn = {
|
|
424
424
|
meta: {
|
425
425
|
parent: "mf-payment-admin.settlement"
|
426
426
|
},
|
427
|
-
component: () => import("./SettlementTransactions-
|
427
|
+
component: () => import("./SettlementTransactions-BCXpOllL.js")
|
428
428
|
}
|
429
|
-
],
|
429
|
+
], We = [
|
430
430
|
{
|
431
431
|
path: "",
|
432
432
|
redirect: { name: "mf-payment-payout-account" }
|
@@ -434,7 +434,7 @@ const Yn = {
|
|
434
434
|
{
|
435
435
|
path: "/payout-account",
|
436
436
|
name: "mf-payment-payout-account",
|
437
|
-
component: () => import("./PayoutAccount-
|
437
|
+
component: () => import("./PayoutAccount-DpD668YX.js"),
|
438
438
|
meta: {
|
439
439
|
sidebarDisplay: "i18n:payment.routes.payout_account"
|
440
440
|
}
|
@@ -442,7 +442,7 @@ const Yn = {
|
|
442
442
|
{
|
443
443
|
path: "/transaction-old",
|
444
444
|
name: "mf-payment-old-transaction",
|
445
|
-
component: () => import("./TransactionOld-
|
445
|
+
component: () => import("./TransactionOld-RjXR9GsJ.js"),
|
446
446
|
meta: {
|
447
447
|
sidebarDisplay: "i18n:payment.routes.transaction"
|
448
448
|
}
|
@@ -450,7 +450,7 @@ const Yn = {
|
|
450
450
|
{
|
451
451
|
path: "/transaction",
|
452
452
|
name: "mf-payment-transaction",
|
453
|
-
component: () => import("./Transaction-
|
453
|
+
component: () => import("./Transaction-CRhYNPh0.js"),
|
454
454
|
meta: {
|
455
455
|
sidebarDisplay: "i18n:payment.routes.transaction-new",
|
456
456
|
sidebarNew: !0
|
@@ -459,7 +459,7 @@ const Yn = {
|
|
459
459
|
{
|
460
460
|
path: "/settlement",
|
461
461
|
name: "mf-payment-settlement",
|
462
|
-
component: () => import("./Settlement-
|
462
|
+
component: () => import("./Settlement-C1Cnjbfa.js"),
|
463
463
|
meta: {
|
464
464
|
sidebarDisplay: "i18n:payment.routes.settlement"
|
465
465
|
}
|
@@ -468,12 +468,12 @@ const Yn = {
|
|
468
468
|
path: "/settlement/:settlementId",
|
469
469
|
name: "mf-payment-settlement-transaction",
|
470
470
|
props: !0,
|
471
|
-
component: () => import("./SettlementTransactions-
|
471
|
+
component: () => import("./SettlementTransactions-DJSO-CHK.js"),
|
472
472
|
meta: {
|
473
473
|
parent: "mf-payment-settlement"
|
474
474
|
}
|
475
475
|
}
|
476
|
-
],
|
476
|
+
], Yn = Wn("mf-payment-iframe", () => {
|
477
477
|
const n = {
|
478
478
|
isIframe: !1
|
479
479
|
}, e = Lt(() => n);
|
@@ -485,7 +485,6 @@ const Yn = {
|
|
485
485
|
init: t
|
486
486
|
};
|
487
487
|
});
|
488
|
-
var ot = { GITHUB_STATE: "/home/runner/work/_temp/_runner_file_commands/save_state_a72d1cad-349d-4d54-9e13-1d8d5d651474", npm_package_devDependencies_ts_node: "^10.9.1", npm_package_dependencies_zod: "^3.23.8", npm_package_dependencies_dinero_js: "^1.9.1", DOTNET_NOLOGO: "1", npm_package_dependencies_pinia: "^2.1.7", USER: "runner", npm_package_devDependencies_jest: "^29.6.3", npm_package_dependencies_vue_pdf_embed: "^2.1.0", npm_config_version_commit_hooks: "true", npm_config_user_agent: "yarn/1.22.22 npm/? node/v22.17.0 linux x64", npm_config_always_auth: "", CI: "true", npm_package_dependencies_vue: "^3.2.25", npm_config_bin_links: "true", npm_config_wrap_output: "", RUNNER_ENVIRONMENT: "github-hosted", GITHUB_ENV: "/home/runner/work/_temp/_runner_file_commands/set_env_a72d1cad-349d-4d54-9e13-1d8d5d651474", PIPX_HOME: "/opt/pipx", npm_node_execpath: "/opt/hostedtoolcache/node/22.17.0/x64/bin/node", npm_package_devDependencies_vite: "^5.2.11", npm_package_devDependencies__tsconfig_node20: "^20.1.4", npm_config_init_version: "1.0.0", JAVA_HOME_8_X64: "/usr/lib/jvm/temurin-8-jdk-amd64", NODE_AUTH_TOKEN: "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", SHLVL: "1", npm_package_files_0: "dist", HOME: "/home/runner", npm_package_devDependencies_sass: "1.32.12", RUNNER_TEMP: "/home/runner/work/_temp", GITHUB_EVENT_PATH: "/home/runner/work/_temp/_github_workflow/event.json", npm_package_dependencies_jspdf: "^2.5.1", npm_package_scripts_build_mf_dev: "vite build --mode fmmf:dev", JAVA_HOME_11_X64: "/usr/lib/jvm/temurin-11-jdk-amd64", PIPX_BIN_DIR: "/opt/pipx_bin", GITHUB_REPOSITORY_OWNER: "feedmepos", npm_package_dependencies_change_case: "^4.1.2", npm_package_scripts_build_mf_prod: "vite build --mode fmmf:prod", npm_config_init_license: "MIT", NODE_OPTIONS: "--max-old-space-size=8192", GRADLE_HOME: "/usr/share/gradle-8.14.2", ANDROID_NDK_LATEST_HOME: "/usr/local/lib/android/sdk/ndk/28.1.13356709", JAVA_HOME_21_X64: "/usr/lib/jvm/temurin-21-jdk-amd64", GITHUB_RETENTION_DAYS: "90", YARN_WRAP_OUTPUT: "false", npm_package_dependencies__feedmepos_mf_common: "^1.26.8", npm_config_version_tag_prefix: "v", 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.5", npm_config_userconfig: "/home/runner/work/_temp/.npmrc", SYSTEMD_EXEC_PID: "1732", npm_package_dependencies_moment: "^2.29.4", npm_package_dependencies_dotenv: "^16.0.3", npm_package_dependencies__feedmepos_ui_library: "^1.6.8", npm_package_scripts_postinstall: "yarn --cwd .. && yarn --cwd ../package/common && yarn --cwd ../package/entity", npm_config_feedmepos_registry: "https://npm.pkg.github.com/", GITHUB_GRAPHQL_URL: "https://api.github.com/graphql", npm_package_description: 'Development always based on production and add "-beta.version" in behind. Every deployment from development to production will increment based on semantic versioninig.', npm_package_devDependencies_typescript: "~5.4.0", npm_package_devDependencies_tailwindcss: "^3.4.14", npm_package_dependencies_i18next: "^21.8.8", npm_package_dependencies__casl_ability: "^3.2.0", npm_package_scripts_build_only_dev: "yarn build:mf:dev && yarn build:dts && yarn build-types && cp package.json ./dist", NVM_DIR: "/home/runner/.nvm", npm_package_readmeFilename: "README.md", npm_package_devDependencies_vue_tsc: "^2.0.11", npm_package_devDependencies__babel_preset_env: "^7.22.10", npm_package_dependencies_xlsx: "^0.18.5", npm_package_dependencies_google_maps: "^4.3.3", npm_package_scripts_build_only_prod: "yarn build:mf:prod && yarn build:dts && yarn build-types && cp package.json ./dist", DOTNET_SKIP_FIRST_TIME_EXPERIENCE: "1", JAVA_HOME_17_X64: "/usr/lib/jvm/temurin-17-jdk-amd64", ImageVersion: "20250629.1.0", npm_package_dependencies_i18next_vue: "^2.0.0-beta.0", npm_package_scripts_dev: "vite --mode dev", LOGNAME: "runner", RUNNER_OS: "Linux", GITHUB_API_URL: "https://api.github.com", GOROOT_1_22_X64: "/opt/hostedtoolcache/go/1.22.12/x64", SWIFT_PATH: "/usr/share/swift/usr/bin", npm_package_scripts_prod: "vite --mode prod", npm_package_type: "module", CHROMEWEBDRIVER: "/usr/local/share/chromedriver-linux64", GOROOT_1_23_X64: "/opt/hostedtoolcache/go/1.23.10/x64", JOURNAL_STREAM: "9:12542", GITHUB_WORKFLOW: "payment-mf-portal-dev", _: "/usr/local/bin/yarn", npm_package_devDependencies_ts_jest: "^29.1.1", npm_package_devDependencies_autoprefixer: "^10.4.20", npm_package_devDependencies__types_jest: "^29.5.4", npm_package_dependencies_i18next_browser_languagedetector: "^6.1.4", npm_package_module: "./dist/app.js", MEMORY_PRESSURE_WATCH: "/sys/fs/cgroup/system.slice/hosted-compute-agent.service/memory.pressure", GOROOT_1_24_X64: "/opt/hostedtoolcache/go/1.24.4/x64", npm_package_devDependencies__types_uuid: "^8.3.4", npm_package_scripts_lint: "eslint --ext .ts,vue --ignore-path .gitignore . --fix", npm_config_registry: "https://registry.yarnpkg.com", ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE: "/opt/actionarchivecache", GITHUB_RUN_ID: "16219029044", GITHUB_REF_TYPE: "branch", BOOTSTRAP_HASKELL_NONINTERACTIVE: "1", GITHUB_WORKFLOW_SHA: "53a46b9c35a593f2bb580c6631acea2d677c6443", GITHUB_BASE_REF: "", ImageOS: "ubuntu24", npm_package_devDependencies__vitejs_plugin_vue: "^5.0.4", npm_package_exports___import: "./dist/app.js", npm_config_ignore_scripts: "", GITHUB_WORKFLOW_REF: "feedmepos/payment-service/.github/workflows/payment-mf-portal-dev.yaml@refs/heads/dev", ACTIONS_ID_TOKEN_REQUEST_TOKEN: "eyJhbGciOiJSUzI1NiIsImtpZCI6IjM4ODI2YjE3LTZhMzAtNWY5Yi1iMTY5LThiZWI4MjAyZjcyMyIsInR5cCI6IkpXVCIsIng1dCI6InlrTmFZNHFNX3RhNGsyVGdaT0NFWUxrY1lsQSJ9.eyJJZGVudGl0eVR5cGVDbGFpbSI6IlN5c3RlbTpTZXJ2aWNlSWRlbnRpdHkiLCJhYyI6Ilt7XCJTY29wZVwiOlwicmVmcy9oZWFkcy9kZXZcIixcIlBlcm1pc3Npb25cIjozfSx7XCJTY29wZVwiOlwicmVmcy9oZWFkcy9tYWluXCIsXCJQZXJtaXNzaW9uXCI6MX1dIiwiYWNzbCI6IjEwIiwiYXVkIjoidnNvOjdlNjQ1MmM1LWZjMmUtNGFkNS1iNjczLTI5ZTkwY2Y3M2RkOCIsImJpbGxpbmdfb3duZXJfaWQiOiJFX2tnRE9BQUpvWVEiLCJleHAiOjE3NTIyNTU4NDYsImh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vd3MvMjAwOC8wNi9pZGVudGl0eS9jbGFpbXMvcHJpbWFyeXNpZCI6ImRkZGRkZGRkLWRkZGQtZGRkZC1kZGRkLWRkZGRkZGRkZGRkZCIsImh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzLzIwMDUvMDUvaWRlbnRpdHkvY2xhaW1zL3NpZCI6ImRkZGRkZGRkLWRkZGQtZGRkZC1kZGRkLWRkZGRkZGRkZGRkZCIsImlhdCI6MTc1MjIzMzY0NiwiaXNzIjoiaHR0cHM6Ly90b2tlbi5hY3Rpb25zLmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImpvYl9pZCI6IjA0OTM5Nzc0LWZhMzgtNWVkYS1hYjkzLTQ2ODRiNGVhODY2NyIsIm5hbWVpZCI6ImRkZGRkZGRkLWRkZGQtZGRkZC1kZGRkLWRkZGRkZGRkZGRkZCIsIm5iZiI6MTc1MjIzMzM0Niwib2lkY19leHRyYSI6IntcImFjdG9yXCI6XCJPc2thbmcwOVwiLFwiYWN0b3JfaWRcIjpcIjE1Njc0MTA3XCIsXCJiYXNlX3JlZlwiOlwiXCIsXCJldmVudF9uYW1lXCI6XCJwdXNoXCIsXCJoZWFkX3JlZlwiOlwiXCIsXCJqb2Jfd29ya2Zsb3dfcmVmXCI6XCJmZWVkbWVwb3MvcGF5bWVudC1zZXJ2aWNlLy5naXRodWIvd29ya2Zsb3dzL3BheW1lbnQtbWYtcG9ydGFsLWRldi55YW1sQHJlZnMvaGVhZHMvZGV2XCIsXCJqb2Jfd29ya2Zsb3dfc2hhXCI6XCI1M2E0NmI5YzM1YTU5M2YyYmI1ODBjNjYzMWFjZWEyZDY3N2M2NDQzXCIsXCJyZWZcIjpcInJlZnMvaGVhZHMvZGV2XCIsXCJyZWZfcHJvdGVjdGVkXCI6XCJmYWxzZVwiLFwicmVmX3R5cGVcIjpcImJyYW5jaFwiLFwicmVwb3NpdG9yeVwiOlwiZmVlZG1lcG9zL3BheW1lbnQtc2VydmljZVwiLFwicmVwb3NpdG9yeV9pZFwiOlwiNjkwOTc5MjYwXCIsXCJyZXBvc2l0b3J5X293bmVyXCI6XCJmZWVkbWVwb3NcIixcInJlcG9zaXRvcnlfb3duZXJfaWRcIjpcIjU0ODMxNTE1XCIsXCJyZXBvc2l0b3J5X3Zpc2liaWxpdHlcIjpcInByaXZhdGVcIixcInJ1bl9hdHRlbXB0XCI6XCIxXCIsXCJydW5faWRcIjpcIjE2MjE5MDI5MDQ0XCIsXCJydW5fbnVtYmVyXCI6XCIyMTVcIixcInJ1bm5lcl9lbnZpcm9ubWVudFwiOlwiZ2l0aHViLWhvc3RlZFwiLFwic2hhXCI6XCI1M2E0NmI5YzM1YTU5M2YyYmI1ODBjNjYzMWFjZWEyZDY3N2M2NDQzXCIsXCJ3b3JrZmxvd1wiOlwicGF5bWVudC1tZi1wb3J0YWwtZGV2XCIsXCJ3b3JrZmxvd19yZWZcIjpcImZlZWRtZXBvcy9wYXltZW50LXNlcnZpY2UvLmdpdGh1Yi93b3JrZmxvd3MvcGF5bWVudC1tZi1wb3J0YWwtZGV2LnlhbWxAcmVmcy9oZWFkcy9kZXZcIixcIndvcmtmbG93X3NoYVwiOlwiNTNhNDZiOWMzNWE1OTNmMmJiNTgwYzY2MzFhY2VhMmQ2NzdjNjQ0M1wifSIsIm9pZGNfc3ViIjoicmVwbzpmZWVkbWVwb3MvcGF5bWVudC1zZXJ2aWNlOnJlZjpyZWZzL2hlYWRzL2RldiIsIm9yY2hfaWQiOiIwNjQ0ODdmNC0xYTUwLTQzZmYtOGE1Mi0wN2Y2MGY0Yzk0MmMuZGVwbG95Ll9fZGVmYXVsdCIsIm93bmVyX2lkIjoiRV9rZ0RPQUFKb1lRIiwicGxhbl9pZCI6IjA2NDQ4N2Y0LTFhNTAtNDNmZi04YTUyLTA3ZjYwZjRjOTQyYyIsInJ1bl9pZCI6IjE2MjE5MDI5MDQ0IiwicnVuX251bWJlciI6IjIxNSIsInJ1bl90eXBlIjoiZnVsbCIsInJ1bm5lcl9pZCI6IjEwMDAwMDU5NTMiLCJydW5uZXJfdHlwZSI6Imhvc3RlZCIsInNjcCI6IkFjdGlvbnMuUmVzdWx0czowNjQ0ODdmNC0xYTUwLTQzZmYtOGE1Mi0wN2Y2MGY0Yzk0MmM6MDQ5Mzk3NzQtZmEzOC01ZWRhLWFiOTMtNDY4NGI0ZWE4NjY3IEFjdGlvbnMuUnVubmVyOjA2NDQ4N2Y0LTFhNTAtNDNmZi04YTUyLTA3ZjYwZjRjOTQyYzowNDkzOTc3NC1mYTM4LTVlZGEtYWI5My00Njg0YjRlYTg2NjcgQWN0aW9ucy5VcGxvYWRBcnRpZmFjdHM6MDY0NDg3ZjQtMWE1MC00M2ZmLThhNTItMDdmNjBmNGM5NDJjOjA0OTM5Nzc0LWZhMzgtNWVkYS1hYjkzLTQ2ODRiNGVhODY2NyBnZW5lcmF0ZV9pZF90b2tlbjowNjQ0ODdmNC0xYTUwLTQzZmYtOGE1Mi0wN2Y2MGY0Yzk0MmM6MDQ5Mzk3NzQtZmEzOC01ZWRhLWFiOTMtNDY4NGI0ZWE4NjY3IEFjdGlvbnMuR2VuZXJpY1JlYWQ6MDAwMDAwMDAtMDAwMC0wMDAwLTAwMDAtMDAwMDAwMDAwMDAwIiwic2hhIjoiNTNhNDZiOWMzNWE1OTNmMmJiNTgwYzY2MzFhY2VhMmQ2NzdjNjQ0MyJ9.R-R4p-A-JgfzvnxmP5wWCW2kaFrLN71snVYJvYPjR2mTyfNM9U8PvftxKippIzfPQTjHNi5xNKut2GKPUqXurxZLnSEe49pBQJKOrXHf-ISsnHdOijxYPUp-mg7XQSDYNmw_vjwZLAKMkV6bf5vPjJx18GEj9OqP7Q_fh9fySlhlsY_dfavr4HvMPMq4AShUdCweyDEF-9e6F6SzFx5Y3ermwQUdfebHHK0GBlOKe-mLV1Sm4G4IC8DlOH_TUmI22LO8kMSLuh1IJFcYR5LWCl82HgmO_EA2fPSdxhbX5zX5ff-gMWmUjyoMxJYUvKeW_xSzwqdE2yQPQ4q-dwWTEA", GITHUB_ACTION_REPOSITORY: "", ENABLE_RUNNER_TRACING: "true", npm_package_dependencies_axios: "^0.27.2", PATH: "/tmp/yarn--1752233698101-0.27396990563923906:/home/runner/work/payment-service/payment-service/mf-portal/node_modules/.bin:/home/runner/.config/yarn/link/node_modules/.bin:/opt/hostedtoolcache/node/22.17.0/x64/libexec/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/22.17.0/x64/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/22.17.0/x64/bin/node_modules/npm/bin/node-gyp-bin:/tmp/yarn--1752233697914-0.5302634099501176:/home/runner/work/payment-service/payment-service/mf-portal/node_modules/.bin:/home/runner/.config/yarn/link/node_modules/.bin:/opt/hostedtoolcache/node/22.17.0/x64/libexec/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/22.17.0/x64/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/22.17.0/x64/bin/node_modules/npm/bin/node-gyp-bin:/tmp/yarn--1752233697726-0.3350763289836951:/home/runner/work/payment-service/payment-service/mf-portal/node_modules/.bin:/home/runner/.config/yarn/link/node_modules/.bin:/opt/hostedtoolcache/node/22.17.0/x64/libexec/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/22.17.0/x64/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/22.17.0/x64/bin/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/22.17.0/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", NODE: "/opt/hostedtoolcache/node/22.17.0/x64/bin/node", ANT_HOME: "/usr/share/ant", DOTNET_MULTILEVEL_LOOKUP: "0", RUNNER_TRACKING_ID: "github_23ab866e-8fd8-4729-abea-2cca2fe7aeec", INVOCATION_ID: "ee6001fd9beb4377ab60ec4cc051b80e", NPM_CONFIG_USERCONFIG: "/home/runner/work/_temp/.npmrc", RUNNER_TOOL_CACHE: "/opt/hostedtoolcache", npm_package_devDependencies__types_qrcode: "^1.5.0", npm_package_devDependencies__types_jsurl: "^0.1.2", npm_package_dependencies_file_saver: "^2.0.5", npm_package_scripts_deploy_dev: "yarn build-only:dev && npm publish --@feedmepos:registry=https://registry.npmjs.org/ --access public --tag beta --no-git-checks .", npm_package_name: "@feedmepos/mf-payment", GITHUB_ACTION: "__run", GITHUB_RUN_NUMBER: "215", GITHUB_TRIGGERING_ACTOR: "Oskang09", RUNNER_ARCH: "X64", XDG_RUNTIME_DIR: "/run/user/1001", AGENT_TOOLSDIRECTORY: "/opt/hostedtoolcache", npm_package_dependencies_vue_country_flag_next: "^2.3.2", npm_package_scripts_deploy_prod: "yarn build-only:prod && npm publish --@feedmepos:registry=https://registry.npmjs.org/ --access public --tag beta --no-git-checks .", npm_package_dependencies_vue_advanced_cropper: "^2.8.6", LANG: "C.UTF-8", VCPKG_INSTALLATION_ROOT: "/usr/local/share/vcpkg", npm_package_devDependencies_eslint: "^8.17.0", npm_package_devDependencies__vue_test_utils: "^2.4.1", npm_package_devDependencies__vue_eslint_config_typescript: "^10.0.0", CONDA: "/usr/share/miniconda", RUNNER_NAME: "GitHub Actions 1000005953", XDG_CONFIG_HOME: "/home/runner/.config", GITHUB_REF_NAME: "dev", GITHUB_REPOSITORY: "feedmepos/payment-service", npm_lifecycle_script: "vite build --mode fmmf:dev", npm_package_dependencies__feedmepos_core: "^2.6.0", npm_package_scripts_build_types: "vue-tsc --declaration --emitDeclarationOnly -p tsconfig.app.json --outDir dist --composite false", npm_package_scripts_build_dts: "vue-tsc --declaration --emitDeclarationOnly -p tsconfig.app.json --outDir ./dist && mv ./dist/src/* dist", ANDROID_NDK_ROOT: "/usr/local/lib/android/sdk/ndk/27.2.12479018", GITHUB_ACTION_REF: "", DEBIAN_FRONTEND: "noninteractive", npm_package_dependencies_vue3_lottie: "^2.2.3", npm_package_scripts_test: "jest", npm_config_version_git_message: "v%s", SHELL: "/bin/bash", GITHUB_REPOSITORY_ID: "690979260", GITHUB_ACTIONS: "true", npm_lifecycle_event: "build:mf:dev", npm_package_devDependencies_jest_transform_stub: "^2.0.0", npm_package_devDependencies_jest_environment_jsdom: "^29.4.1", npm_package_devDependencies__rushstack_eslint_patch: "^1.1.3", npm_package_dependencies_vuedraggable: "^4.1.0", npm_package_version: "1.2.21", GITHUB_REF_PROTECTED: "false", npm_config_argv: '{"remain":[],"cooked":["run","deploy:dev"],"original":["deploy:dev"]}', npm_package_devDependencies__types_dinero_js: "^1.9.0", npm_package_dependencies_uuid: "^9.0.0", npm_package_dependencies_buffer: "^6.0.3", npm_package_dependencies_vue_i18n: "10.0.5", npm_config__feedmepos_registry: "https://npm.pkg.github.com/", GITHUB_WORKSPACE: "/home/runner/work/payment-service/payment-service", ACCEPT_EULA: "Y", GITHUB_JOB: "deploy", GITHUB_SHA: "53a46b9c35a593f2bb580c6631acea2d677c6443", GITHUB_RUN_ATTEMPT: "1", npm_package_dependencies_vue_router: "^4.2.5", npm_package_exports___style: "./dist/style.css", npm_config_version_git_tag: "true", npm_config_version_git_sign: "", GITHUB_REF: "refs/heads/dev", GITHUB_ACTOR: "Oskang09", ANDROID_SDK_ROOT: "/usr/local/lib/android/sdk", npm_config_strict_ssl: "true", npm_package_devDependencies_path: "^0.12.7", npm_package_dependencies_jszip: "^3.10.1", npm_package_dependencies_jsurl: "^0.1.5", npm_package_dependencies_firebase: "^10.14.0", GITHUB_PATH: "/home/runner/work/_temp/_runner_file_commands/add_path_a72d1cad-349d-4d54-9e13-1d8d5d651474", JAVA_HOME: "/usr/lib/jvm/temurin-17-jdk-amd64", PWD: "/home/runner/work/payment-service/payment-service/mf-portal", GITHUB_ACTOR_ID: "15674107", RUNNER_WORKSPACE: "/home/runner/work/payment-service", npm_execpath: "/usr/local/lib/node_modules/yarn/bin/yarn.js", 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", ACTIONS_ID_TOKEN_REQUEST_URL: "https://run-actions-3-azure-eastus.actions.githubusercontent.com/94//idtoken/064487f4-1a50-43ff-8a52-07f60f4c942c/04939774-fa38-5eda-ab93-4684b4ea8667?api-version=2.0", GHCUP_INSTALL_BASE_PREFIX: "/usr/local", GITHUB_OUTPUT: "/home/runner/work/_temp/_runner_file_commands/set_output_a72d1cad-349d-4d54-9e13-1d8d5d651474", npm_package_dependencies_qrcode_vue: "^3.6.0", npm_package_exports___types: "./dist/app.d.ts", EDGEWEBDRIVER: "/usr/local/share/edge_driver", npm_package_devDependencies_postcss: "^8.4.47", npm_package_devDependencies_eslint_plugin_vue: "^9.1.0", npm_package_devDependencies__vue_vue3_jest: "^29.2.5", npm_package_devDependencies__pinia_testing: "^0.1.3", npm_config_save_prefix: "^", npm_config_ignore_optional: "", ANDROID_NDK: "/usr/local/lib/android/sdk/ndk/27.2.12479018", SGX_AESM_ADDR: "1", CHROME_BIN: "/usr/bin/google-chrome", npm_package_devDependencies_cd: "^0.3.3", npm_package_dependencies_i18next_http_backend: "^1.4.1", npm_package_dependencies_rasterizehtml: "^1.3.1", npm_package_scripts_preview: "vite preview", SELENIUM_JAR_PATH: "/usr/share/java/selenium-server.jar", MEMORY_PRESSURE_WRITE: "c29tZSAyMDAwMDAgMjAwMDAwMAA=", INIT_CWD: "/home/runner/work/payment-service/payment-service/mf-portal", ANDROID_NDK_HOME: "/usr/local/lib/android/sdk/ndk/27.2.12479018", GITHUB_STEP_SUMMARY: "/home/runner/work/_temp/_runner_file_commands/step_summary_a72d1cad-349d-4d54-9e13-1d8d5d651474", npm_package_dependencies_libphonenumber_js: "^1.10.6", npm_package_dependencies__feedmepos_payment_entity: "^0.1.14", NODE_ENV: "production", ENVIRONMENT: "development", FIREBASE_API_KEY: "AIzaSyAj8JdCHtP0Vc5vZobCfgoLzWxPIn0WUG4", FIREBASE_AUTH_DOMAIN: "feedme-dev-4c3ef.firebaseapp.com", FIREBASE_DATABASE_URL: "https://feedme-dev-4c3ef.firebaseio.com", FIREBASE_PROJECT_ID: "feedme-dev-4c3ef", FIREBASE_STORAGE_BUCKET: "feedme-dev-4c3ef.appspot.com", FIREBASE_MESSAGING_SENDER_ID: "458797803788", FIREBASE_APP_ID: "1:458797803788:web:37f2af2926a84288f0c129", FIREBASE_MEASUREMENT_ID: "G-J2QG09D2Q7", ASSET_STORAGE_BUCKET: "feedme-dev-4c3ef.appspot.com", GOOGLE_MAP_API_KEY: "AIzaSyA_isPR1-9bX7UmRiJIhsIRNNwdn6DdmW4", AUTH_CLIENT_ID: "1a362d621873497b277ea55258cc82594ba148d235257f7bd44ea2acc132d8a4" };
|
489
488
|
/**
|
490
489
|
* @license
|
491
490
|
* Copyright 2017 Google LLC
|
@@ -502,7 +501,23 @@ var ot = { GITHUB_STATE: "/home/runner/work/_temp/_runner_file_commands/save_sta
|
|
502
501
|
* See the License for the specific language governing permissions and
|
503
502
|
* limitations under the License.
|
504
503
|
*/
|
505
|
-
|
504
|
+
/**
|
505
|
+
* @license
|
506
|
+
* Copyright 2017 Google LLC
|
507
|
+
*
|
508
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
509
|
+
* you may not use this file except in compliance with the License.
|
510
|
+
* You may obtain a copy of the License at
|
511
|
+
*
|
512
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
513
|
+
*
|
514
|
+
* Unless required by applicable law or agreed to in writing, software
|
515
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
516
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
517
|
+
* See the License for the specific language governing permissions and
|
518
|
+
* limitations under the License.
|
519
|
+
*/
|
520
|
+
const Bt = function(n) {
|
506
521
|
const e = [];
|
507
522
|
let t = 0;
|
508
523
|
for (let r = 0; r < n.length; r++) {
|
@@ -510,7 +525,7 @@ const Ft = function(n) {
|
|
510
525
|
i < 128 ? e[t++] = i : i < 2048 ? (e[t++] = i >> 6 | 192, e[t++] = i & 63 | 128) : (i & 64512) === 55296 && r + 1 < n.length && (n.charCodeAt(r + 1) & 64512) === 56320 ? (i = 65536 + ((i & 1023) << 10) + (n.charCodeAt(++r) & 1023), e[t++] = i >> 18 | 240, e[t++] = i >> 12 & 63 | 128, e[t++] = i >> 6 & 63 | 128, e[t++] = i & 63 | 128) : (e[t++] = i >> 12 | 224, e[t++] = i >> 6 & 63 | 128, e[t++] = i & 63 | 128);
|
511
526
|
}
|
512
527
|
return e;
|
513
|
-
},
|
528
|
+
}, Xn = function(n) {
|
514
529
|
const e = [];
|
515
530
|
let t = 0, r = 0;
|
516
531
|
for (; t < n.length; ) {
|
@@ -529,7 +544,7 @@ const Ft = function(n) {
|
|
529
544
|
}
|
530
545
|
}
|
531
546
|
return e.join("");
|
532
|
-
},
|
547
|
+
}, $t = {
|
533
548
|
/**
|
534
549
|
* Maps bytes to characters.
|
535
550
|
*/
|
@@ -588,9 +603,9 @@ const Ft = function(n) {
|
|
588
603
|
this.init_();
|
589
604
|
const t = e ? this.byteToCharMapWebSafe_ : this.byteToCharMap_, r = [];
|
590
605
|
for (let i = 0; i < n.length; i += 3) {
|
591
|
-
const s = n[i], a = i + 1 < n.length, c = a ? n[i + 1] : 0, o = i + 2 < n.length, l = o ? n[i + 2] : 0,
|
592
|
-
let
|
593
|
-
o || (
|
606
|
+
const s = n[i], a = i + 1 < n.length, c = a ? n[i + 1] : 0, o = i + 2 < n.length, l = o ? n[i + 2] : 0, u = s >> 2, h = (s & 3) << 4 | c >> 4;
|
607
|
+
let p = (c & 15) << 2 | l >> 6, v = l & 63;
|
608
|
+
o || (v = 64, a || (p = 64)), r.push(t[u], t[h], t[p], t[v]);
|
594
609
|
}
|
595
610
|
return r.join("");
|
596
611
|
},
|
@@ -603,7 +618,7 @@ const Ft = function(n) {
|
|
603
618
|
* @return The base64 encoded string.
|
604
619
|
*/
|
605
620
|
encodeString(n, e) {
|
606
|
-
return this.HAS_NATIVE_SUPPORT && !e ? btoa(n) : this.encodeByteArray(
|
621
|
+
return this.HAS_NATIVE_SUPPORT && !e ? btoa(n) : this.encodeByteArray(Bt(n), e);
|
607
622
|
},
|
608
623
|
/**
|
609
624
|
* Base64-decode a string.
|
@@ -614,7 +629,7 @@ const Ft = function(n) {
|
|
614
629
|
* @return string representing the decoded value.
|
615
630
|
*/
|
616
631
|
decodeString(n, e) {
|
617
|
-
return this.HAS_NATIVE_SUPPORT && !e ? atob(n) :
|
632
|
+
return this.HAS_NATIVE_SUPPORT && !e ? atob(n) : Xn(this.decodeStringToByteArray(n, e));
|
618
633
|
},
|
619
634
|
/**
|
620
635
|
* Base64-decode a string.
|
@@ -642,12 +657,12 @@ const Ft = function(n) {
|
|
642
657
|
const h = i < n.length ? t[n.charAt(i)] : 64;
|
643
658
|
if (++i, s == null || c == null || l == null || h == null)
|
644
659
|
throw new Qn();
|
645
|
-
const
|
646
|
-
if (r.push(
|
647
|
-
const
|
648
|
-
if (r.push(
|
649
|
-
const
|
650
|
-
r.push(
|
660
|
+
const p = s << 2 | c >> 4;
|
661
|
+
if (r.push(p), l !== 64) {
|
662
|
+
const v = c << 4 & 240 | l >> 2;
|
663
|
+
if (r.push(v), h !== 64) {
|
664
|
+
const F = l << 6 & 192 | h;
|
665
|
+
r.push(F);
|
651
666
|
}
|
652
667
|
}
|
653
668
|
}
|
@@ -671,14 +686,14 @@ class Qn extends Error {
|
|
671
686
|
super(...arguments), this.name = "DecodeBase64StringError";
|
672
687
|
}
|
673
688
|
}
|
674
|
-
const
|
675
|
-
const e =
|
676
|
-
return
|
677
|
-
},
|
678
|
-
return
|
679
|
-
},
|
689
|
+
const Zn = function(n) {
|
690
|
+
const e = Bt(n);
|
691
|
+
return $t.encodeByteArray(e, !0);
|
692
|
+
}, ue = function(n) {
|
693
|
+
return Zn(n).replace(/\./g, "");
|
694
|
+
}, Ht = function(n) {
|
680
695
|
try {
|
681
|
-
return
|
696
|
+
return $t.decodeString(n, !0);
|
682
697
|
} catch (e) {
|
683
698
|
console.error("base64Decode failed: ", e);
|
684
699
|
}
|
@@ -700,7 +715,7 @@ const er = function(n) {
|
|
700
715
|
* See the License for the specific language governing permissions and
|
701
716
|
* limitations under the License.
|
702
717
|
*/
|
703
|
-
function
|
718
|
+
function er() {
|
704
719
|
if (typeof self < "u")
|
705
720
|
return self;
|
706
721
|
if (typeof window < "u")
|
@@ -725,13 +740,13 @@ function tr() {
|
|
725
740
|
* See the License for the specific language governing permissions and
|
726
741
|
* limitations under the License.
|
727
742
|
*/
|
728
|
-
const
|
729
|
-
if (typeof process > "u" || typeof
|
743
|
+
const tr = () => er().__FIREBASE_DEFAULTS__, nr = () => {
|
744
|
+
if (typeof process > "u" || typeof process.env > "u")
|
730
745
|
return;
|
731
|
-
const n =
|
746
|
+
const n = process.env.__FIREBASE_DEFAULTS__;
|
732
747
|
if (n)
|
733
748
|
return JSON.parse(n);
|
734
|
-
},
|
749
|
+
}, rr = () => {
|
735
750
|
if (typeof document > "u")
|
736
751
|
return;
|
737
752
|
let n;
|
@@ -740,11 +755,11 @@ const nr = () => tr().__FIREBASE_DEFAULTS__, rr = () => {
|
|
740
755
|
} catch {
|
741
756
|
return;
|
742
757
|
}
|
743
|
-
const e = n &&
|
758
|
+
const e = n && Ht(n[1]);
|
744
759
|
return e && JSON.parse(e);
|
745
760
|
}, ze = () => {
|
746
761
|
try {
|
747
|
-
return
|
762
|
+
return tr() || nr() || rr();
|
748
763
|
} catch (n) {
|
749
764
|
console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${n}`);
|
750
765
|
return;
|
@@ -752,7 +767,7 @@ const nr = () => tr().__FIREBASE_DEFAULTS__, rr = () => {
|
|
752
767
|
}, Vt = (n) => {
|
753
768
|
var e, t;
|
754
769
|
return (t = (e = ze()) === null || e === void 0 ? void 0 : e.emulatorHosts) === null || t === void 0 ? void 0 : t[n];
|
755
|
-
},
|
770
|
+
}, Ma = (n) => {
|
756
771
|
const e = Vt(n);
|
757
772
|
if (!e)
|
758
773
|
return;
|
@@ -761,10 +776,10 @@ const nr = () => tr().__FIREBASE_DEFAULTS__, rr = () => {
|
|
761
776
|
throw new Error(`Invalid host ${e} with no separate hostname and port!`);
|
762
777
|
const r = parseInt(e.substring(t + 1), 10);
|
763
778
|
return e[0] === "[" ? [e.substring(1, t - 1), r] : [e.substring(0, t), r];
|
764
|
-
},
|
779
|
+
}, jt = () => {
|
765
780
|
var n;
|
766
781
|
return (n = ze()) === null || n === void 0 ? void 0 : n.config;
|
767
|
-
},
|
782
|
+
}, Wt = (n) => {
|
768
783
|
var e;
|
769
784
|
return (e = ze()) === null || e === void 0 ? void 0 : e[`_${n}`];
|
770
785
|
};
|
@@ -784,7 +799,7 @@ const nr = () => tr().__FIREBASE_DEFAULTS__, rr = () => {
|
|
784
799
|
* See the License for the specific language governing permissions and
|
785
800
|
* limitations under the License.
|
786
801
|
*/
|
787
|
-
class
|
802
|
+
class ir {
|
788
803
|
constructor() {
|
789
804
|
this.reject = () => {
|
790
805
|
}, this.resolve = () => {
|
@@ -820,7 +835,7 @@ class sr {
|
|
820
835
|
* See the License for the specific language governing permissions and
|
821
836
|
* limitations under the License.
|
822
837
|
*/
|
823
|
-
function
|
838
|
+
function Ua(n, e) {
|
824
839
|
if (n.uid)
|
825
840
|
throw new Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.');
|
826
841
|
const t = {
|
@@ -844,8 +859,8 @@ function ja(n, e) {
|
|
844
859
|
}
|
845
860
|
}, n);
|
846
861
|
return [
|
847
|
-
|
848
|
-
|
862
|
+
ue(JSON.stringify(t)),
|
863
|
+
ue(JSON.stringify(a)),
|
849
864
|
""
|
850
865
|
].join(".");
|
851
866
|
}
|
@@ -865,26 +880,26 @@ function ja(n, e) {
|
|
865
880
|
* See the License for the specific language governing permissions and
|
866
881
|
* limitations under the License.
|
867
882
|
*/
|
868
|
-
function
|
883
|
+
function m() {
|
869
884
|
return typeof navigator < "u" && typeof navigator.userAgent == "string" ? navigator.userAgent : "";
|
870
885
|
}
|
871
|
-
function
|
886
|
+
function sr() {
|
872
887
|
return typeof window < "u" && // @ts-ignore Setting up an broadly applicable index signature for Window
|
873
888
|
// just to deal with this case would probably be a bad idea.
|
874
|
-
!!(window.cordova || window.phonegap || window.PhoneGap) && /ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(
|
889
|
+
!!(window.cordova || window.phonegap || window.PhoneGap) && /ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(m());
|
875
890
|
}
|
876
|
-
function
|
891
|
+
function ar() {
|
877
892
|
return typeof navigator < "u" && navigator.userAgent === "Cloudflare-Workers";
|
878
893
|
}
|
879
|
-
function
|
894
|
+
function or() {
|
880
895
|
const n = typeof chrome == "object" ? chrome.runtime : typeof browser == "object" ? browser.runtime : void 0;
|
881
896
|
return typeof n == "object" && n.id !== void 0;
|
882
897
|
}
|
883
|
-
function
|
898
|
+
function cr() {
|
884
899
|
return typeof navigator == "object" && navigator.product === "ReactNative";
|
885
900
|
}
|
886
|
-
function
|
887
|
-
const n =
|
901
|
+
function lr() {
|
902
|
+
const n = m();
|
888
903
|
return n.indexOf("MSIE ") >= 0 || n.indexOf("Trident/") >= 0;
|
889
904
|
}
|
890
905
|
function ur() {
|
@@ -894,7 +909,7 @@ function ur() {
|
|
894
909
|
return !1;
|
895
910
|
}
|
896
911
|
}
|
897
|
-
function
|
912
|
+
function dr() {
|
898
913
|
return new Promise((n, e) => {
|
899
914
|
try {
|
900
915
|
let t = !0;
|
@@ -928,35 +943,35 @@ function hr() {
|
|
928
943
|
* See the License for the specific language governing permissions and
|
929
944
|
* limitations under the License.
|
930
945
|
*/
|
931
|
-
const
|
932
|
-
class
|
946
|
+
const hr = "FirebaseError";
|
947
|
+
class L extends Error {
|
933
948
|
constructor(e, t, r) {
|
934
|
-
super(t), this.code = e, this.customData = r, this.name =
|
949
|
+
super(t), this.code = e, this.customData = r, this.name = hr, Object.setPrototypeOf(this, L.prototype), Error.captureStackTrace && Error.captureStackTrace(this, Q.prototype.create);
|
935
950
|
}
|
936
951
|
}
|
937
|
-
class
|
952
|
+
class Q {
|
938
953
|
constructor(e, t, r) {
|
939
954
|
this.service = e, this.serviceName = t, this.errors = r;
|
940
955
|
}
|
941
956
|
create(e, ...t) {
|
942
|
-
const r = t[0] || {}, i = `${this.service}/${e}`, s = this.errors[e], a = s ?
|
943
|
-
return new
|
957
|
+
const r = t[0] || {}, i = `${this.service}/${e}`, s = this.errors[e], a = s ? fr(s, r) : "Error", c = `${this.serviceName}: ${a} (${i}).`;
|
958
|
+
return new L(i, c, r);
|
944
959
|
}
|
945
960
|
}
|
946
|
-
function
|
947
|
-
return n.replace(
|
961
|
+
function fr(n, e) {
|
962
|
+
return n.replace(pr, (t, r) => {
|
948
963
|
const i = e[r];
|
949
964
|
return i != null ? String(i) : `<${r}?>`;
|
950
965
|
});
|
951
966
|
}
|
952
|
-
const
|
953
|
-
function
|
967
|
+
const pr = /\{\$([^}]+)}/g;
|
968
|
+
function mr(n) {
|
954
969
|
for (const e in n)
|
955
970
|
if (Object.prototype.hasOwnProperty.call(n, e))
|
956
971
|
return !1;
|
957
972
|
return !0;
|
958
973
|
}
|
959
|
-
function
|
974
|
+
function de(n, e) {
|
960
975
|
if (n === e)
|
961
976
|
return !0;
|
962
977
|
const t = Object.keys(n), r = Object.keys(e);
|
@@ -964,8 +979,8 @@ function ue(n, e) {
|
|
964
979
|
if (!r.includes(i))
|
965
980
|
return !1;
|
966
981
|
const s = n[i], a = e[i];
|
967
|
-
if (
|
968
|
-
if (!
|
982
|
+
if (ot(s) && ot(a)) {
|
983
|
+
if (!de(s, a))
|
969
984
|
return !1;
|
970
985
|
} else if (s !== a)
|
971
986
|
return !1;
|
@@ -975,7 +990,7 @@ function ue(n, e) {
|
|
975
990
|
return !1;
|
976
991
|
return !0;
|
977
992
|
}
|
978
|
-
function
|
993
|
+
function ot(n) {
|
979
994
|
return n !== null && typeof n == "object";
|
980
995
|
}
|
981
996
|
/**
|
@@ -994,7 +1009,7 @@ function ct(n) {
|
|
994
1009
|
* See the License for the specific language governing permissions and
|
995
1010
|
* limitations under the License.
|
996
1011
|
*/
|
997
|
-
function
|
1012
|
+
function Z(n) {
|
998
1013
|
const e = [];
|
999
1014
|
for (const [t, r] of Object.entries(n))
|
1000
1015
|
Array.isArray(r) ? r.forEach((i) => {
|
@@ -1003,10 +1018,10 @@ function Q(n) {
|
|
1003
1018
|
return e.length ? "&" + e.join("&") : "";
|
1004
1019
|
}
|
1005
1020
|
function gr(n, e) {
|
1006
|
-
const t = new
|
1021
|
+
const t = new _r(n, e);
|
1007
1022
|
return t.subscribe.bind(t);
|
1008
1023
|
}
|
1009
|
-
class
|
1024
|
+
class _r {
|
1010
1025
|
/**
|
1011
1026
|
* @param executor Function which can make calls to a single Observer
|
1012
1027
|
* as a proxy.
|
@@ -1052,7 +1067,7 @@ class Ir {
|
|
1052
1067
|
next: e,
|
1053
1068
|
error: t,
|
1054
1069
|
complete: r
|
1055
|
-
}, i.next === void 0 && (i.next =
|
1070
|
+
}, i.next === void 0 && (i.next = ke), i.error === void 0 && (i.error = ke), i.complete === void 0 && (i.complete = ke);
|
1056
1071
|
const s = this.unsubscribeOne.bind(this, this.observers.length);
|
1057
1072
|
return this.finalized && this.task.then(() => {
|
1058
1073
|
try {
|
@@ -1098,7 +1113,7 @@ function vr(n, e) {
|
|
1098
1113
|
return !0;
|
1099
1114
|
return !1;
|
1100
1115
|
}
|
1101
|
-
function
|
1116
|
+
function ke() {
|
1102
1117
|
}
|
1103
1118
|
/**
|
1104
1119
|
* @license
|
@@ -1119,7 +1134,7 @@ function Re() {
|
|
1119
1134
|
function z(n) {
|
1120
1135
|
return n && n._delegate ? n._delegate : n;
|
1121
1136
|
}
|
1122
|
-
class
|
1137
|
+
class W {
|
1123
1138
|
/**
|
1124
1139
|
*
|
1125
1140
|
* @param name The public service name, e.g. app, auth, firestore, database
|
@@ -1158,7 +1173,7 @@ class G {
|
|
1158
1173
|
* See the License for the specific language governing permissions and
|
1159
1174
|
* limitations under the License.
|
1160
1175
|
*/
|
1161
|
-
const
|
1176
|
+
const M = "[DEFAULT]";
|
1162
1177
|
/**
|
1163
1178
|
* @license
|
1164
1179
|
* Copyright 2019 Google LLC
|
@@ -1186,7 +1201,7 @@ class yr {
|
|
1186
1201
|
get(e) {
|
1187
1202
|
const t = this.normalizeInstanceIdentifier(e);
|
1188
1203
|
if (!this.instancesDeferred.has(t)) {
|
1189
|
-
const r = new
|
1204
|
+
const r = new ir();
|
1190
1205
|
if (this.instancesDeferred.set(t, r), this.isInitialized(t) || this.shouldAutoInitialize())
|
1191
1206
|
try {
|
1192
1207
|
const i = this.getOrInitializeService({
|
@@ -1226,9 +1241,9 @@ class yr {
|
|
1226
1241
|
if (this.component)
|
1227
1242
|
throw Error(`Component for ${this.name} has already been provided`);
|
1228
1243
|
if (this.component = e, !!this.shouldAutoInitialize()) {
|
1229
|
-
if (
|
1244
|
+
if (br(e))
|
1230
1245
|
try {
|
1231
|
-
this.getOrInitializeService({ instanceIdentifier:
|
1246
|
+
this.getOrInitializeService({ instanceIdentifier: M });
|
1232
1247
|
} catch {
|
1233
1248
|
}
|
1234
1249
|
for (const [t, r] of this.instancesDeferred.entries()) {
|
@@ -1243,7 +1258,7 @@ class yr {
|
|
1243
1258
|
}
|
1244
1259
|
}
|
1245
1260
|
}
|
1246
|
-
clearInstance(e =
|
1261
|
+
clearInstance(e = M) {
|
1247
1262
|
this.instancesDeferred.delete(e), this.instancesOptions.delete(e), this.instances.delete(e);
|
1248
1263
|
}
|
1249
1264
|
// app.delete() will call this method on every provider to delete the services
|
@@ -1258,10 +1273,10 @@ class yr {
|
|
1258
1273
|
isComponentSet() {
|
1259
1274
|
return this.component != null;
|
1260
1275
|
}
|
1261
|
-
isInitialized(e =
|
1276
|
+
isInitialized(e = M) {
|
1262
1277
|
return this.instances.has(e);
|
1263
1278
|
}
|
1264
|
-
getOptions(e =
|
1279
|
+
getOptions(e = M) {
|
1265
1280
|
return this.instancesOptions.get(e) || {};
|
1266
1281
|
}
|
1267
1282
|
initialize(e = {}) {
|
@@ -1313,7 +1328,7 @@ class yr {
|
|
1313
1328
|
getOrInitializeService({ instanceIdentifier: e, options: t = {} }) {
|
1314
1329
|
let r = this.instances.get(e);
|
1315
1330
|
if (!r && this.component && (r = this.component.instanceFactory(this.container, {
|
1316
|
-
instanceIdentifier:
|
1331
|
+
instanceIdentifier: Ir(e),
|
1317
1332
|
options: t
|
1318
1333
|
}), this.instances.set(e, r), this.instancesOptions.set(e, t), this.invokeOnInitCallbacks(r, e), this.component.onInstanceCreated))
|
1319
1334
|
try {
|
@@ -1322,17 +1337,17 @@ class yr {
|
|
1322
1337
|
}
|
1323
1338
|
return r || null;
|
1324
1339
|
}
|
1325
|
-
normalizeInstanceIdentifier(e =
|
1326
|
-
return this.component ? this.component.multipleInstances ? e :
|
1340
|
+
normalizeInstanceIdentifier(e = M) {
|
1341
|
+
return this.component ? this.component.multipleInstances ? e : M : e;
|
1327
1342
|
}
|
1328
1343
|
shouldAutoInitialize() {
|
1329
1344
|
return !!this.component && this.component.instantiationMode !== "EXPLICIT";
|
1330
1345
|
}
|
1331
1346
|
}
|
1332
|
-
function
|
1333
|
-
return n ===
|
1347
|
+
function Ir(n) {
|
1348
|
+
return n === M ? void 0 : n;
|
1334
1349
|
}
|
1335
|
-
function
|
1350
|
+
function br(n) {
|
1336
1351
|
return n.instantiationMode === "EAGER";
|
1337
1352
|
}
|
1338
1353
|
/**
|
@@ -1406,33 +1421,33 @@ class wr {
|
|
1406
1421
|
* See the License for the specific language governing permissions and
|
1407
1422
|
* limitations under the License.
|
1408
1423
|
*/
|
1409
|
-
var
|
1424
|
+
var f;
|
1410
1425
|
(function(n) {
|
1411
1426
|
n[n.DEBUG = 0] = "DEBUG", n[n.VERBOSE = 1] = "VERBOSE", n[n.INFO = 2] = "INFO", n[n.WARN = 3] = "WARN", n[n.ERROR = 4] = "ERROR", n[n.SILENT = 5] = "SILENT";
|
1412
|
-
})(
|
1413
|
-
const
|
1414
|
-
debug:
|
1415
|
-
verbose:
|
1416
|
-
info:
|
1417
|
-
warn:
|
1418
|
-
error:
|
1419
|
-
silent:
|
1420
|
-
},
|
1421
|
-
[
|
1422
|
-
[
|
1423
|
-
[
|
1424
|
-
[
|
1425
|
-
[
|
1426
|
-
},
|
1427
|
+
})(f || (f = {}));
|
1428
|
+
const Er = {
|
1429
|
+
debug: f.DEBUG,
|
1430
|
+
verbose: f.VERBOSE,
|
1431
|
+
info: f.INFO,
|
1432
|
+
warn: f.WARN,
|
1433
|
+
error: f.ERROR,
|
1434
|
+
silent: f.SILENT
|
1435
|
+
}, Tr = f.INFO, Sr = {
|
1436
|
+
[f.DEBUG]: "log",
|
1437
|
+
[f.VERBOSE]: "log",
|
1438
|
+
[f.INFO]: "info",
|
1439
|
+
[f.WARN]: "warn",
|
1440
|
+
[f.ERROR]: "error"
|
1441
|
+
}, kr = (n, e, ...t) => {
|
1427
1442
|
if (e < n.logLevel)
|
1428
1443
|
return;
|
1429
|
-
const r = (/* @__PURE__ */ new Date()).toISOString(), i =
|
1444
|
+
const r = (/* @__PURE__ */ new Date()).toISOString(), i = Sr[e];
|
1430
1445
|
if (i)
|
1431
1446
|
console[i](`[${r}] ${n.name}:`, ...t);
|
1432
1447
|
else
|
1433
1448
|
throw new Error(`Attempted to log a message with an invalid logType (value: ${e})`);
|
1434
1449
|
};
|
1435
|
-
class
|
1450
|
+
class zt {
|
1436
1451
|
/**
|
1437
1452
|
* Gives you an instance of a Logger to capture messages according to
|
1438
1453
|
* Firebase's logging scheme.
|
@@ -1440,19 +1455,19 @@ class Zt {
|
|
1440
1455
|
* @param name The name that the logs will be associated with
|
1441
1456
|
*/
|
1442
1457
|
constructor(e) {
|
1443
|
-
this.name = e, this._logLevel =
|
1458
|
+
this.name = e, this._logLevel = Tr, this._logHandler = kr, this._userLogHandler = null;
|
1444
1459
|
}
|
1445
1460
|
get logLevel() {
|
1446
1461
|
return this._logLevel;
|
1447
1462
|
}
|
1448
1463
|
set logLevel(e) {
|
1449
|
-
if (!(e in
|
1464
|
+
if (!(e in f))
|
1450
1465
|
throw new TypeError(`Invalid value "${e}" assigned to \`logLevel\``);
|
1451
1466
|
this._logLevel = e;
|
1452
1467
|
}
|
1453
1468
|
// Workaround for setter/getter having to be the same type.
|
1454
1469
|
setLogLevel(e) {
|
1455
|
-
this._logLevel = typeof e == "string" ?
|
1470
|
+
this._logLevel = typeof e == "string" ? Er[e] : e;
|
1456
1471
|
}
|
1457
1472
|
get logHandler() {
|
1458
1473
|
return this._logHandler;
|
@@ -1472,25 +1487,25 @@ class Zt {
|
|
1472
1487
|
* The functions below are all based on the `console` interface
|
1473
1488
|
*/
|
1474
1489
|
debug(...e) {
|
1475
|
-
this._userLogHandler && this._userLogHandler(this,
|
1490
|
+
this._userLogHandler && this._userLogHandler(this, f.DEBUG, ...e), this._logHandler(this, f.DEBUG, ...e);
|
1476
1491
|
}
|
1477
1492
|
log(...e) {
|
1478
|
-
this._userLogHandler && this._userLogHandler(this,
|
1493
|
+
this._userLogHandler && this._userLogHandler(this, f.VERBOSE, ...e), this._logHandler(this, f.VERBOSE, ...e);
|
1479
1494
|
}
|
1480
1495
|
info(...e) {
|
1481
|
-
this._userLogHandler && this._userLogHandler(this,
|
1496
|
+
this._userLogHandler && this._userLogHandler(this, f.INFO, ...e), this._logHandler(this, f.INFO, ...e);
|
1482
1497
|
}
|
1483
1498
|
warn(...e) {
|
1484
|
-
this._userLogHandler && this._userLogHandler(this,
|
1499
|
+
this._userLogHandler && this._userLogHandler(this, f.WARN, ...e), this._logHandler(this, f.WARN, ...e);
|
1485
1500
|
}
|
1486
1501
|
error(...e) {
|
1487
|
-
this._userLogHandler && this._userLogHandler(this,
|
1502
|
+
this._userLogHandler && this._userLogHandler(this, f.ERROR, ...e), this._logHandler(this, f.ERROR, ...e);
|
1488
1503
|
}
|
1489
1504
|
}
|
1490
1505
|
const Ar = (n, e) => e.some((t) => n instanceof t);
|
1491
|
-
let
|
1492
|
-
function
|
1493
|
-
return
|
1506
|
+
let ct, lt;
|
1507
|
+
function Cr() {
|
1508
|
+
return ct || (ct = [
|
1494
1509
|
IDBDatabase,
|
1495
1510
|
IDBObjectStore,
|
1496
1511
|
IDBIndex,
|
@@ -1498,15 +1513,15 @@ function Nr() {
|
|
1498
1513
|
IDBTransaction
|
1499
1514
|
]);
|
1500
1515
|
}
|
1501
|
-
function
|
1502
|
-
return
|
1516
|
+
function Rr() {
|
1517
|
+
return lt || (lt = [
|
1503
1518
|
IDBCursor.prototype.advance,
|
1504
1519
|
IDBCursor.prototype.continue,
|
1505
1520
|
IDBCursor.prototype.continuePrimaryKey
|
1506
1521
|
]);
|
1507
1522
|
}
|
1508
|
-
const
|
1509
|
-
function
|
1523
|
+
const Gt = /* @__PURE__ */ new WeakMap(), Me = /* @__PURE__ */ new WeakMap(), qt = /* @__PURE__ */ new WeakMap(), Ae = /* @__PURE__ */ new WeakMap(), Ge = /* @__PURE__ */ new WeakMap();
|
1524
|
+
function Pr(n) {
|
1510
1525
|
const e = new Promise((t, r) => {
|
1511
1526
|
const i = () => {
|
1512
1527
|
n.removeEventListener("success", s), n.removeEventListener("error", a);
|
@@ -1518,12 +1533,12 @@ function Or(n) {
|
|
1518
1533
|
n.addEventListener("success", s), n.addEventListener("error", a);
|
1519
1534
|
});
|
1520
1535
|
return e.then((t) => {
|
1521
|
-
t instanceof IDBCursor &&
|
1536
|
+
t instanceof IDBCursor && Gt.set(t, n);
|
1522
1537
|
}).catch(() => {
|
1523
|
-
}),
|
1538
|
+
}), Ge.set(e, n), e;
|
1524
1539
|
}
|
1525
|
-
function
|
1526
|
-
if (
|
1540
|
+
function Or(n) {
|
1541
|
+
if (Me.has(n))
|
1527
1542
|
return;
|
1528
1543
|
const e = new Promise((t, r) => {
|
1529
1544
|
const i = () => {
|
@@ -1535,15 +1550,15 @@ function Dr(n) {
|
|
1535
1550
|
};
|
1536
1551
|
n.addEventListener("complete", s), n.addEventListener("error", a), n.addEventListener("abort", a);
|
1537
1552
|
});
|
1538
|
-
|
1553
|
+
Me.set(n, e);
|
1539
1554
|
}
|
1540
1555
|
let Ue = {
|
1541
1556
|
get(n, e, t) {
|
1542
1557
|
if (n instanceof IDBTransaction) {
|
1543
1558
|
if (e === "done")
|
1544
|
-
return
|
1559
|
+
return Me.get(n);
|
1545
1560
|
if (e === "objectStoreNames")
|
1546
|
-
return n.objectStoreNames ||
|
1561
|
+
return n.objectStoreNames || qt.get(n);
|
1547
1562
|
if (e === "store")
|
1548
1563
|
return t.objectStoreNames[1] ? void 0 : t.objectStore(t.objectStoreNames[0]);
|
1549
1564
|
}
|
@@ -1556,32 +1571,32 @@ let Ue = {
|
|
1556
1571
|
return n instanceof IDBTransaction && (e === "done" || e === "store") ? !0 : e in n;
|
1557
1572
|
}
|
1558
1573
|
};
|
1559
|
-
function
|
1574
|
+
function Dr(n) {
|
1560
1575
|
Ue = n(Ue);
|
1561
1576
|
}
|
1562
|
-
function
|
1577
|
+
function Nr(n) {
|
1563
1578
|
return n === IDBDatabase.prototype.transaction && !("objectStoreNames" in IDBTransaction.prototype) ? function(e, ...t) {
|
1564
|
-
const r = n.call(
|
1565
|
-
return
|
1566
|
-
} :
|
1567
|
-
return n.apply(
|
1579
|
+
const r = n.call(Ce(this), e, ...t);
|
1580
|
+
return qt.set(r, e.sort ? e.sort() : [e]), O(r);
|
1581
|
+
} : Rr().includes(n) ? function(...e) {
|
1582
|
+
return n.apply(Ce(this), e), O(Gt.get(this));
|
1568
1583
|
} : function(...e) {
|
1569
|
-
return O(n.apply(
|
1584
|
+
return O(n.apply(Ce(this), e));
|
1570
1585
|
};
|
1571
1586
|
}
|
1572
1587
|
function Lr(n) {
|
1573
|
-
return typeof n == "function" ?
|
1588
|
+
return typeof n == "function" ? Nr(n) : (n instanceof IDBTransaction && Or(n), Ar(n, Cr()) ? new Proxy(n, Ue) : n);
|
1574
1589
|
}
|
1575
1590
|
function O(n) {
|
1576
1591
|
if (n instanceof IDBRequest)
|
1577
|
-
return
|
1578
|
-
if (
|
1579
|
-
return
|
1592
|
+
return Pr(n);
|
1593
|
+
if (Ae.has(n))
|
1594
|
+
return Ae.get(n);
|
1580
1595
|
const e = Lr(n);
|
1581
|
-
return e !== n && (
|
1596
|
+
return e !== n && (Ae.set(n, e), Ge.set(e, n)), e;
|
1582
1597
|
}
|
1583
|
-
const
|
1584
|
-
function
|
1598
|
+
const Ce = (n) => Ge.get(n);
|
1599
|
+
function Mr(n, e, { blocked: t, upgrade: r, blocking: i, terminated: s } = {}) {
|
1585
1600
|
const a = indexedDB.open(n, e), c = O(a);
|
1586
1601
|
return r && a.addEventListener("upgradeneeded", (o) => {
|
1587
1602
|
r(O(a.result), o.oldVersion, o.newVersion, O(a.transaction), o);
|
@@ -1595,16 +1610,16 @@ function Ur(n, e, { blocked: t, upgrade: r, blocking: i, terminated: s } = {}) {
|
|
1595
1610
|
}).catch(() => {
|
1596
1611
|
}), c;
|
1597
1612
|
}
|
1598
|
-
const
|
1613
|
+
const Ur = ["get", "getKey", "getAll", "getAllKeys", "count"], xr = ["put", "add", "delete", "clear"], Re = /* @__PURE__ */ new Map();
|
1599
1614
|
function ut(n, e) {
|
1600
1615
|
if (!(n instanceof IDBDatabase && !(e in n) && typeof e == "string"))
|
1601
1616
|
return;
|
1602
|
-
if (
|
1603
|
-
return
|
1617
|
+
if (Re.get(e))
|
1618
|
+
return Re.get(e);
|
1604
1619
|
const t = e.replace(/FromIndex$/, ""), r = e !== t, i = xr.includes(t);
|
1605
1620
|
if (
|
1606
1621
|
// Bail if the target doesn't exist on the target. Eg, getAll isn't in Edge.
|
1607
|
-
!(t in (r ? IDBIndex : IDBObjectStore).prototype) || !(i ||
|
1622
|
+
!(t in (r ? IDBIndex : IDBObjectStore).prototype) || !(i || Ur.includes(t))
|
1608
1623
|
)
|
1609
1624
|
return;
|
1610
1625
|
const s = async function(a, ...c) {
|
@@ -1615,9 +1630,9 @@ function ut(n, e) {
|
|
1615
1630
|
i && o.done
|
1616
1631
|
]))[0];
|
1617
1632
|
};
|
1618
|
-
return
|
1633
|
+
return Re.set(e, s), s;
|
1619
1634
|
}
|
1620
|
-
|
1635
|
+
Dr((n) => ({
|
1621
1636
|
...n,
|
1622
1637
|
get: (e, t, r) => ut(e, t) || n.get(e, t, r),
|
1623
1638
|
has: (e, t) => !!ut(e, t) || n.has(e, t)
|
@@ -1638,7 +1653,7 @@ Pr((n) => ({
|
|
1638
1653
|
* See the License for the specific language governing permissions and
|
1639
1654
|
* limitations under the License.
|
1640
1655
|
*/
|
1641
|
-
class
|
1656
|
+
class Fr {
|
1642
1657
|
constructor(e) {
|
1643
1658
|
this.container = e;
|
1644
1659
|
}
|
@@ -1646,7 +1661,7 @@ class Br {
|
|
1646
1661
|
// auth token refresh, and installations will send this string.
|
1647
1662
|
getPlatformInfoString() {
|
1648
1663
|
return this.container.getProviders().map((t) => {
|
1649
|
-
if (
|
1664
|
+
if (Br(t)) {
|
1650
1665
|
const r = t.getImmediate();
|
1651
1666
|
return `${r.library}/${r.version}`;
|
1652
1667
|
} else
|
@@ -1654,11 +1669,11 @@ class Br {
|
|
1654
1669
|
}).filter((t) => t).join(" ");
|
1655
1670
|
}
|
1656
1671
|
}
|
1657
|
-
function
|
1672
|
+
function Br(n) {
|
1658
1673
|
const e = n.getComponent();
|
1659
1674
|
return (e == null ? void 0 : e.type) === "VERSION";
|
1660
1675
|
}
|
1661
|
-
const
|
1676
|
+
const xe = "@firebase/app", dt = "0.10.13";
|
1662
1677
|
/**
|
1663
1678
|
* @license
|
1664
1679
|
* Copyright 2019 Google LLC
|
@@ -1675,7 +1690,7 @@ const je = "@firebase/app", ht = "0.10.13";
|
|
1675
1690
|
* See the License for the specific language governing permissions and
|
1676
1691
|
* limitations under the License.
|
1677
1692
|
*/
|
1678
|
-
const
|
1693
|
+
const E = new zt("@firebase/app"), $r = "@firebase/app-compat", Hr = "@firebase/analytics-compat", Vr = "@firebase/analytics", jr = "@firebase/app-check-compat", Wr = "@firebase/app-check", zr = "@firebase/auth", Gr = "@firebase/auth-compat", qr = "@firebase/database", Kr = "@firebase/data-connect", Jr = "@firebase/database-compat", Yr = "@firebase/functions", Xr = "@firebase/functions-compat", Qr = "@firebase/installations", Zr = "@firebase/installations-compat", ei = "@firebase/messaging", ti = "@firebase/messaging-compat", ni = "@firebase/performance", ri = "@firebase/performance-compat", ii = "@firebase/remote-config", si = "@firebase/remote-config-compat", ai = "@firebase/storage", oi = "@firebase/storage-compat", ci = "@firebase/firestore", li = "@firebase/vertexai-preview", ui = "@firebase/firestore-compat", di = "firebase", hi = "10.14.1";
|
1679
1694
|
/**
|
1680
1695
|
* @license
|
1681
1696
|
* Copyright 2019 Google LLC
|
@@ -1692,35 +1707,35 @@ const w = new Zt("@firebase/app"), Hr = "@firebase/app-compat", Wr = "@firebase/
|
|
1692
1707
|
* See the License for the specific language governing permissions and
|
1693
1708
|
* limitations under the License.
|
1694
1709
|
*/
|
1695
|
-
const
|
1696
|
-
[
|
1697
|
-
[
|
1710
|
+
const Fe = "[DEFAULT]", fi = {
|
1711
|
+
[xe]: "fire-core",
|
1712
|
+
[$r]: "fire-core-compat",
|
1698
1713
|
[Vr]: "fire-analytics",
|
1699
|
-
[
|
1700
|
-
[
|
1701
|
-
[
|
1702
|
-
[
|
1703
|
-
[
|
1704
|
-
[
|
1705
|
-
[
|
1706
|
-
[
|
1707
|
-
[
|
1708
|
-
[
|
1714
|
+
[Hr]: "fire-analytics-compat",
|
1715
|
+
[Wr]: "fire-app-check",
|
1716
|
+
[jr]: "fire-app-check-compat",
|
1717
|
+
[zr]: "fire-auth",
|
1718
|
+
[Gr]: "fire-auth-compat",
|
1719
|
+
[qr]: "fire-rtdb",
|
1720
|
+
[Kr]: "fire-data-connect",
|
1721
|
+
[Jr]: "fire-rtdb-compat",
|
1722
|
+
[Yr]: "fire-fn",
|
1723
|
+
[Xr]: "fire-fn-compat",
|
1709
1724
|
[Qr]: "fire-iid",
|
1710
|
-
[
|
1711
|
-
[
|
1712
|
-
[
|
1713
|
-
[
|
1714
|
-
[
|
1715
|
-
[
|
1716
|
-
[
|
1717
|
-
[
|
1718
|
-
[
|
1719
|
-
[
|
1725
|
+
[Zr]: "fire-iid-compat",
|
1726
|
+
[ei]: "fire-fcm",
|
1727
|
+
[ti]: "fire-fcm-compat",
|
1728
|
+
[ni]: "fire-perf",
|
1729
|
+
[ri]: "fire-perf-compat",
|
1730
|
+
[ii]: "fire-rc",
|
1731
|
+
[si]: "fire-rc-compat",
|
1732
|
+
[ai]: "fire-gcs",
|
1733
|
+
[oi]: "fire-gcs-compat",
|
1734
|
+
[ci]: "fire-fst",
|
1720
1735
|
[ui]: "fire-fst-compat",
|
1721
|
-
[
|
1736
|
+
[li]: "fire-vertex",
|
1722
1737
|
"fire-js": "fire-js",
|
1723
|
-
[
|
1738
|
+
[di]: "fire-js-all"
|
1724
1739
|
};
|
1725
1740
|
/**
|
1726
1741
|
* @license
|
@@ -1738,30 +1753,30 @@ const xe = "[DEFAULT]", mi = {
|
|
1738
1753
|
* See the License for the specific language governing permissions and
|
1739
1754
|
* limitations under the License.
|
1740
1755
|
*/
|
1741
|
-
const he = /* @__PURE__ */ new Map(),
|
1742
|
-
function
|
1756
|
+
const he = /* @__PURE__ */ new Map(), pi = /* @__PURE__ */ new Map(), Be = /* @__PURE__ */ new Map();
|
1757
|
+
function ht(n, e) {
|
1743
1758
|
try {
|
1744
1759
|
n.container.addComponent(e);
|
1745
1760
|
} catch (t) {
|
1746
|
-
|
1761
|
+
E.debug(`Component ${e.name} failed to register with FirebaseApp ${n.name}`, t);
|
1747
1762
|
}
|
1748
1763
|
}
|
1749
1764
|
function J(n) {
|
1750
1765
|
const e = n.name;
|
1751
1766
|
if (Be.has(e))
|
1752
|
-
return
|
1767
|
+
return E.debug(`There were multiple attempts to register component ${e}.`), !1;
|
1753
1768
|
Be.set(e, n);
|
1754
1769
|
for (const t of he.values())
|
1755
|
-
|
1756
|
-
for (const t of
|
1757
|
-
|
1770
|
+
ht(t, n);
|
1771
|
+
for (const t of pi.values())
|
1772
|
+
ht(t, n);
|
1758
1773
|
return !0;
|
1759
1774
|
}
|
1760
|
-
function
|
1775
|
+
function Kt(n, e) {
|
1761
1776
|
const t = n.container.getProvider("heartbeat").getImmediate({ optional: !0 });
|
1762
1777
|
return t && t.triggerHeartbeat(), n.container.getProvider(e);
|
1763
1778
|
}
|
1764
|
-
function
|
1779
|
+
function y(n) {
|
1765
1780
|
return n.settings !== void 0;
|
1766
1781
|
}
|
1767
1782
|
/**
|
@@ -1780,7 +1795,7 @@ function v(n) {
|
|
1780
1795
|
* See the License for the specific language governing permissions and
|
1781
1796
|
* limitations under the License.
|
1782
1797
|
*/
|
1783
|
-
const
|
1798
|
+
const mi = {
|
1784
1799
|
"no-app": "No Firebase App '{$appName}' has been created - call initializeApp() first",
|
1785
1800
|
"bad-app-name": "Illegal App name: '{$appName}'",
|
1786
1801
|
"duplicate-app": "Firebase App named '{$appName}' already exists with different options or config",
|
@@ -1795,7 +1810,7 @@ const _i = {
|
|
1795
1810
|
"idb-delete": "Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}.",
|
1796
1811
|
"finalization-registry-not-supported": "FirebaseServerApp deleteOnDeref field defined but the JS runtime does not support FinalizationRegistry.",
|
1797
1812
|
"invalid-server-app-environment": "FirebaseServerApp is not for use in browser environments."
|
1798
|
-
}, D = new
|
1813
|
+
}, D = new Q("app", "Firebase", mi);
|
1799
1814
|
/**
|
1800
1815
|
* @license
|
1801
1816
|
* Copyright 2019 Google LLC
|
@@ -1814,7 +1829,7 @@ const _i = {
|
|
1814
1829
|
*/
|
1815
1830
|
class gi {
|
1816
1831
|
constructor(e, t, r) {
|
1817
|
-
this._isDeleted = !1, this._options = Object.assign({}, e), this._config = Object.assign({}, t), this._name = t.name, this._automaticDataCollectionEnabled = t.automaticDataCollectionEnabled, this._container = r, this.container.addComponent(new
|
1832
|
+
this._isDeleted = !1, this._options = Object.assign({}, e), this._config = Object.assign({}, t), this._name = t.name, this._automaticDataCollectionEnabled = t.automaticDataCollectionEnabled, this._container = r, this.container.addComponent(new W(
|
1818
1833
|
"app",
|
1819
1834
|
() => this,
|
1820
1835
|
"PUBLIC"
|
@@ -1870,23 +1885,23 @@ class gi {
|
|
1870
1885
|
* See the License for the specific language governing permissions and
|
1871
1886
|
* limitations under the License.
|
1872
1887
|
*/
|
1873
|
-
const ee =
|
1874
|
-
function
|
1888
|
+
const ee = hi;
|
1889
|
+
function Jt(n, e = {}) {
|
1875
1890
|
let t = n;
|
1876
1891
|
typeof e != "object" && (e = { name: e });
|
1877
|
-
const r = Object.assign({ name:
|
1892
|
+
const r = Object.assign({ name: Fe, automaticDataCollectionEnabled: !1 }, e), i = r.name;
|
1878
1893
|
if (typeof i != "string" || !i)
|
1879
1894
|
throw D.create("bad-app-name", {
|
1880
1895
|
appName: String(i)
|
1881
1896
|
});
|
1882
|
-
if (t || (t =
|
1897
|
+
if (t || (t = jt()), !t)
|
1883
1898
|
throw D.create(
|
1884
1899
|
"no-options"
|
1885
1900
|
/* AppError.NO_OPTIONS */
|
1886
1901
|
);
|
1887
1902
|
const s = he.get(i);
|
1888
1903
|
if (s) {
|
1889
|
-
if (
|
1904
|
+
if (de(t, s.options) && de(r, s.config))
|
1890
1905
|
return s;
|
1891
1906
|
throw D.create("duplicate-app", { appName: i });
|
1892
1907
|
}
|
@@ -1896,27 +1911,27 @@ function Xt(n, e = {}) {
|
|
1896
1911
|
const c = new gi(t, r, a);
|
1897
1912
|
return he.set(i, c), c;
|
1898
1913
|
}
|
1899
|
-
function
|
1914
|
+
function _i(n = Fe) {
|
1900
1915
|
const e = he.get(n);
|
1901
|
-
if (!e && n ===
|
1902
|
-
return
|
1916
|
+
if (!e && n === Fe && jt())
|
1917
|
+
return Jt();
|
1903
1918
|
if (!e)
|
1904
1919
|
throw D.create("no-app", { appName: n });
|
1905
1920
|
return e;
|
1906
1921
|
}
|
1907
|
-
function
|
1922
|
+
function $(n, e, t) {
|
1908
1923
|
var r;
|
1909
|
-
let i = (r =
|
1924
|
+
let i = (r = fi[n]) !== null && r !== void 0 ? r : n;
|
1910
1925
|
t && (i += `-${t}`);
|
1911
1926
|
const s = i.match(/\s|\//), a = e.match(/\s|\//);
|
1912
1927
|
if (s || a) {
|
1913
1928
|
const c = [
|
1914
1929
|
`Unable to register library "${i}" with version "${e}":`
|
1915
1930
|
];
|
1916
|
-
s && c.push(`library name "${i}" contains illegal characters (whitespace or "/")`), s && a && c.push("and"), a && c.push(`version name "${e}" contains illegal characters (whitespace or "/")`),
|
1931
|
+
s && c.push(`library name "${i}" contains illegal characters (whitespace or "/")`), s && a && c.push("and"), a && c.push(`version name "${e}" contains illegal characters (whitespace or "/")`), E.warn(c.join(" "));
|
1917
1932
|
return;
|
1918
1933
|
}
|
1919
|
-
J(new
|
1934
|
+
J(new W(
|
1920
1935
|
`${i}-version`,
|
1921
1936
|
() => ({ library: i, version: e }),
|
1922
1937
|
"VERSION"
|
@@ -1939,15 +1954,15 @@ function F(n, e, t) {
|
|
1939
1954
|
* See the License for the specific language governing permissions and
|
1940
1955
|
* limitations under the License.
|
1941
1956
|
*/
|
1942
|
-
const vi = "firebase-heartbeat-database", yi = 1,
|
1943
|
-
let
|
1944
|
-
function
|
1945
|
-
return
|
1957
|
+
const vi = "firebase-heartbeat-database", yi = 1, Y = "firebase-heartbeat-store";
|
1958
|
+
let Pe = null;
|
1959
|
+
function Yt() {
|
1960
|
+
return Pe || (Pe = Mr(vi, yi, {
|
1946
1961
|
upgrade: (n, e) => {
|
1947
1962
|
switch (e) {
|
1948
1963
|
case 0:
|
1949
1964
|
try {
|
1950
|
-
n.createObjectStore(
|
1965
|
+
n.createObjectStore(Y);
|
1951
1966
|
} catch (t) {
|
1952
1967
|
console.warn(t);
|
1953
1968
|
}
|
@@ -1957,39 +1972,39 @@ function Kt() {
|
|
1957
1972
|
throw D.create("idb-open", {
|
1958
1973
|
originalErrorMessage: n.message
|
1959
1974
|
});
|
1960
|
-
})),
|
1975
|
+
})), Pe;
|
1961
1976
|
}
|
1962
|
-
async function
|
1977
|
+
async function Ii(n) {
|
1963
1978
|
try {
|
1964
|
-
const t = (await
|
1979
|
+
const t = (await Yt()).transaction(Y), r = await t.objectStore(Y).get(Xt(n));
|
1965
1980
|
return await t.done, r;
|
1966
1981
|
} catch (e) {
|
1967
|
-
if (e instanceof
|
1968
|
-
|
1982
|
+
if (e instanceof L)
|
1983
|
+
E.warn(e.message);
|
1969
1984
|
else {
|
1970
1985
|
const t = D.create("idb-get", {
|
1971
1986
|
originalErrorMessage: e == null ? void 0 : e.message
|
1972
1987
|
});
|
1973
|
-
|
1988
|
+
E.warn(t.message);
|
1974
1989
|
}
|
1975
1990
|
}
|
1976
1991
|
}
|
1977
|
-
async function
|
1992
|
+
async function ft(n, e) {
|
1978
1993
|
try {
|
1979
|
-
const r = (await
|
1980
|
-
await r.objectStore(
|
1994
|
+
const r = (await Yt()).transaction(Y, "readwrite");
|
1995
|
+
await r.objectStore(Y).put(e, Xt(n)), await r.done;
|
1981
1996
|
} catch (t) {
|
1982
|
-
if (t instanceof
|
1983
|
-
|
1997
|
+
if (t instanceof L)
|
1998
|
+
E.warn(t.message);
|
1984
1999
|
else {
|
1985
2000
|
const r = D.create("idb-set", {
|
1986
2001
|
originalErrorMessage: t == null ? void 0 : t.message
|
1987
2002
|
});
|
1988
|
-
|
2003
|
+
E.warn(r.message);
|
1989
2004
|
}
|
1990
2005
|
}
|
1991
2006
|
}
|
1992
|
-
function
|
2007
|
+
function Xt(n) {
|
1993
2008
|
return `${n.name}!${n.options.appId}`;
|
1994
2009
|
}
|
1995
2010
|
/**
|
@@ -2008,12 +2023,12 @@ function qt(n) {
|
|
2008
2023
|
* See the License for the specific language governing permissions and
|
2009
2024
|
* limitations under the License.
|
2010
2025
|
*/
|
2011
|
-
const
|
2012
|
-
class
|
2026
|
+
const bi = 1024, wi = 30 * 24 * 60 * 60 * 1e3;
|
2027
|
+
class Ei {
|
2013
2028
|
constructor(e) {
|
2014
2029
|
this.container = e, this._heartbeatsCache = null;
|
2015
2030
|
const t = this.container.getProvider("app").getImmediate();
|
2016
|
-
this._storage = new
|
2031
|
+
this._storage = new Si(t), this._heartbeatsCachePromise = this._storage.read().then((r) => (this._heartbeatsCache = r, r));
|
2017
2032
|
}
|
2018
2033
|
/**
|
2019
2034
|
* Called to report a heartbeat. The function will generate
|
@@ -2025,13 +2040,13 @@ class Ti {
|
|
2025
2040
|
async triggerHeartbeat() {
|
2026
2041
|
var e, t;
|
2027
2042
|
try {
|
2028
|
-
const i = this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(), s =
|
2043
|
+
const i = this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(), s = pt();
|
2029
2044
|
return ((e = this._heartbeatsCache) === null || e === void 0 ? void 0 : e.heartbeats) == null && (this._heartbeatsCache = await this._heartbeatsCachePromise, ((t = this._heartbeatsCache) === null || t === void 0 ? void 0 : t.heartbeats) == null) || this._heartbeatsCache.lastSentHeartbeatDate === s || this._heartbeatsCache.heartbeats.some((a) => a.date === s) ? void 0 : (this._heartbeatsCache.heartbeats.push({ date: s, agent: i }), this._heartbeatsCache.heartbeats = this._heartbeatsCache.heartbeats.filter((a) => {
|
2030
2045
|
const c = new Date(a.date).valueOf();
|
2031
2046
|
return Date.now() - c <= wi;
|
2032
2047
|
}), this._storage.overwrite(this._heartbeatsCache));
|
2033
2048
|
} catch (r) {
|
2034
|
-
|
2049
|
+
E.warn(r);
|
2035
2050
|
}
|
2036
2051
|
}
|
2037
2052
|
/**
|
@@ -2046,30 +2061,30 @@ class Ti {
|
|
2046
2061
|
try {
|
2047
2062
|
if (this._heartbeatsCache === null && await this._heartbeatsCachePromise, ((e = this._heartbeatsCache) === null || e === void 0 ? void 0 : e.heartbeats) == null || this._heartbeatsCache.heartbeats.length === 0)
|
2048
2063
|
return "";
|
2049
|
-
const t =
|
2064
|
+
const t = pt(), { heartbeatsToSend: r, unsentEntries: i } = Ti(this._heartbeatsCache.heartbeats), s = ue(JSON.stringify({ version: 2, heartbeats: r }));
|
2050
2065
|
return this._heartbeatsCache.lastSentHeartbeatDate = t, i.length > 0 ? (this._heartbeatsCache.heartbeats = i, await this._storage.overwrite(this._heartbeatsCache)) : (this._heartbeatsCache.heartbeats = [], this._storage.overwrite(this._heartbeatsCache)), s;
|
2051
2066
|
} catch (t) {
|
2052
|
-
return
|
2067
|
+
return E.warn(t), "";
|
2053
2068
|
}
|
2054
2069
|
}
|
2055
2070
|
}
|
2056
|
-
function
|
2071
|
+
function pt() {
|
2057
2072
|
return (/* @__PURE__ */ new Date()).toISOString().substring(0, 10);
|
2058
2073
|
}
|
2059
|
-
function
|
2074
|
+
function Ti(n, e = bi) {
|
2060
2075
|
const t = [];
|
2061
2076
|
let r = n.slice();
|
2062
2077
|
for (const i of n) {
|
2063
2078
|
const s = t.find((a) => a.agent === i.agent);
|
2064
2079
|
if (s) {
|
2065
|
-
if (s.dates.push(i.date),
|
2080
|
+
if (s.dates.push(i.date), mt(t) > e) {
|
2066
2081
|
s.dates.pop();
|
2067
2082
|
break;
|
2068
2083
|
}
|
2069
2084
|
} else if (t.push({
|
2070
2085
|
agent: i.agent,
|
2071
2086
|
dates: [i.date]
|
2072
|
-
}),
|
2087
|
+
}), mt(t) > e) {
|
2073
2088
|
t.pop();
|
2074
2089
|
break;
|
2075
2090
|
}
|
@@ -2080,19 +2095,19 @@ function ki(n, e = Ei) {
|
|
2080
2095
|
unsentEntries: r
|
2081
2096
|
};
|
2082
2097
|
}
|
2083
|
-
class
|
2098
|
+
class Si {
|
2084
2099
|
constructor(e) {
|
2085
2100
|
this.app = e, this._canUseIndexedDBPromise = this.runIndexedDBEnvironmentCheck();
|
2086
2101
|
}
|
2087
2102
|
async runIndexedDBEnvironmentCheck() {
|
2088
|
-
return ur() ?
|
2103
|
+
return ur() ? dr().then(() => !0).catch(() => !1) : !1;
|
2089
2104
|
}
|
2090
2105
|
/**
|
2091
2106
|
* Read all heartbeats.
|
2092
2107
|
*/
|
2093
2108
|
async read() {
|
2094
2109
|
if (await this._canUseIndexedDBPromise) {
|
2095
|
-
const t = await
|
2110
|
+
const t = await Ii(this.app);
|
2096
2111
|
return t != null && t.heartbeats ? t : { heartbeats: [] };
|
2097
2112
|
} else
|
2098
2113
|
return { heartbeats: [] };
|
@@ -2102,7 +2117,7 @@ class Ri {
|
|
2102
2117
|
var t;
|
2103
2118
|
if (await this._canUseIndexedDBPromise) {
|
2104
2119
|
const i = await this.read();
|
2105
|
-
return
|
2120
|
+
return ft(this.app, {
|
2106
2121
|
lastSentHeartbeatDate: (t = e.lastSentHeartbeatDate) !== null && t !== void 0 ? t : i.lastSentHeartbeatDate,
|
2107
2122
|
heartbeats: e.heartbeats
|
2108
2123
|
});
|
@@ -2114,7 +2129,7 @@ class Ri {
|
|
2114
2129
|
var t;
|
2115
2130
|
if (await this._canUseIndexedDBPromise) {
|
2116
2131
|
const i = await this.read();
|
2117
|
-
return
|
2132
|
+
return ft(this.app, {
|
2118
2133
|
lastSentHeartbeatDate: (t = e.lastSentHeartbeatDate) !== null && t !== void 0 ? t : i.lastSentHeartbeatDate,
|
2119
2134
|
heartbeats: [
|
2120
2135
|
...i.heartbeats,
|
@@ -2125,8 +2140,8 @@ class Ri {
|
|
2125
2140
|
return;
|
2126
2141
|
}
|
2127
2142
|
}
|
2128
|
-
function
|
2129
|
-
return
|
2143
|
+
function mt(n) {
|
2144
|
+
return ue(
|
2130
2145
|
// heartbeatsCache wrapper properties
|
2131
2146
|
JSON.stringify({ version: 2, heartbeats: n })
|
2132
2147
|
).length;
|
@@ -2147,21 +2162,21 @@ function _t(n) {
|
|
2147
2162
|
* See the License for the specific language governing permissions and
|
2148
2163
|
* limitations under the License.
|
2149
2164
|
*/
|
2150
|
-
function
|
2151
|
-
J(new
|
2165
|
+
function ki(n) {
|
2166
|
+
J(new W(
|
2152
2167
|
"platform-logger",
|
2153
|
-
(e) => new
|
2168
|
+
(e) => new Fr(e),
|
2154
2169
|
"PRIVATE"
|
2155
2170
|
/* ComponentType.PRIVATE */
|
2156
|
-
)), J(new
|
2171
|
+
)), J(new W(
|
2157
2172
|
"heartbeat",
|
2158
|
-
(e) => new
|
2173
|
+
(e) => new Ei(e),
|
2159
2174
|
"PRIVATE"
|
2160
2175
|
/* ComponentType.PRIVATE */
|
2161
|
-
)),
|
2176
|
+
)), $(xe, dt, n), $(xe, dt, "esm2017"), $("fire-js", "");
|
2162
2177
|
}
|
2163
|
-
|
2164
|
-
var Ai = "firebase",
|
2178
|
+
ki("");
|
2179
|
+
var Ai = "firebase", Ci = "10.14.1";
|
2165
2180
|
/**
|
2166
2181
|
* @license
|
2167
2182
|
* Copyright 2020 Google LLC
|
@@ -2178,7 +2193,7 @@ var Ai = "firebase", Ni = "10.14.1";
|
|
2178
2193
|
* See the License for the specific language governing permissions and
|
2179
2194
|
* limitations under the License.
|
2180
2195
|
*/
|
2181
|
-
|
2196
|
+
$(Ai, Ci, "app");
|
2182
2197
|
var gt = function() {
|
2183
2198
|
return gt = Object.assign || function(e) {
|
2184
2199
|
for (var t, r = 1, i = arguments.length; r < i; r++) {
|
@@ -2188,7 +2203,7 @@ var gt = function() {
|
|
2188
2203
|
return e;
|
2189
2204
|
}, gt.apply(this, arguments);
|
2190
2205
|
};
|
2191
|
-
function
|
2206
|
+
function qe(n, e) {
|
2192
2207
|
var t = {};
|
2193
2208
|
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && e.indexOf(r) < 0 && (t[r] = n[r]);
|
2194
2209
|
if (n != null && typeof Object.getOwnPropertySymbols == "function")
|
@@ -2201,7 +2216,7 @@ function Qt() {
|
|
2201
2216
|
"dependent-sdk-initialized-before-auth": "Another Firebase SDK was initialized and is trying to use Auth before Auth is initialized. Please be sure to call `initializeAuth` or `getAuth` before starting any other Firebase SDK."
|
2202
2217
|
};
|
2203
2218
|
}
|
2204
|
-
const
|
2219
|
+
const Ri = Qt, Zt = new Q("auth", "Firebase", Qt());
|
2205
2220
|
/**
|
2206
2221
|
* @license
|
2207
2222
|
* Copyright 2020 Google LLC
|
@@ -2218,12 +2233,12 @@ const Ci = Qt, en = new q("auth", "Firebase", Qt());
|
|
2218
2233
|
* See the License for the specific language governing permissions and
|
2219
2234
|
* limitations under the License.
|
2220
2235
|
*/
|
2221
|
-
const
|
2222
|
-
function
|
2223
|
-
|
2236
|
+
const fe = new zt("@firebase/auth");
|
2237
|
+
function Pi(n, ...e) {
|
2238
|
+
fe.logLevel <= f.WARN && fe.warn(`Auth (${ee}): ${n}`, ...e);
|
2224
2239
|
}
|
2225
2240
|
function se(n, ...e) {
|
2226
|
-
|
2241
|
+
fe.logLevel <= f.ERROR && fe.error(`Auth (${ee}): ${n}`, ...e);
|
2227
2242
|
}
|
2228
2243
|
/**
|
2229
2244
|
* @license
|
@@ -2242,37 +2257,37 @@ function se(n, ...e) {
|
|
2242
2257
|
* limitations under the License.
|
2243
2258
|
*/
|
2244
2259
|
function T(n, ...e) {
|
2245
|
-
throw
|
2260
|
+
throw Ke(n, ...e);
|
2246
2261
|
}
|
2247
|
-
function
|
2248
|
-
return
|
2262
|
+
function g(n, ...e) {
|
2263
|
+
return Ke(n, ...e);
|
2249
2264
|
}
|
2250
|
-
function
|
2251
|
-
const r = Object.assign(Object.assign({},
|
2252
|
-
return new
|
2265
|
+
function en(n, e, t) {
|
2266
|
+
const r = Object.assign(Object.assign({}, Ri()), { [e]: t });
|
2267
|
+
return new Q("auth", "Firebase", r).create(e, {
|
2253
2268
|
appName: n.name
|
2254
2269
|
});
|
2255
2270
|
}
|
2256
|
-
function
|
2257
|
-
return
|
2271
|
+
function N(n) {
|
2272
|
+
return en(n, "operation-not-supported-in-this-environment", "Operations that alter the current user are not supported in conjunction with FirebaseServerApp");
|
2258
2273
|
}
|
2259
|
-
function
|
2274
|
+
function Ke(n, ...e) {
|
2260
2275
|
if (typeof n != "string") {
|
2261
2276
|
const t = e[0], r = [...e.slice(1)];
|
2262
2277
|
return r[0] && (r[0].appName = n.name), n._errorFactory.create(t, ...r);
|
2263
2278
|
}
|
2264
|
-
return
|
2279
|
+
return Zt.create(n, ...e);
|
2265
2280
|
}
|
2266
|
-
function
|
2281
|
+
function d(n, e, ...t) {
|
2267
2282
|
if (!n)
|
2268
|
-
throw
|
2283
|
+
throw Ke(e, ...t);
|
2269
2284
|
}
|
2270
|
-
function
|
2285
|
+
function I(n) {
|
2271
2286
|
const e = "INTERNAL ASSERTION FAILED: " + n;
|
2272
2287
|
throw se(e), new Error(e);
|
2273
2288
|
}
|
2274
|
-
function
|
2275
|
-
n ||
|
2289
|
+
function S(n, e) {
|
2290
|
+
n || I(e);
|
2276
2291
|
}
|
2277
2292
|
/**
|
2278
2293
|
* @license
|
@@ -2290,14 +2305,14 @@ function k(n, e) {
|
|
2290
2305
|
* See the License for the specific language governing permissions and
|
2291
2306
|
* limitations under the License.
|
2292
2307
|
*/
|
2293
|
-
function
|
2308
|
+
function $e() {
|
2294
2309
|
var n;
|
2295
2310
|
return typeof self < "u" && ((n = self.location) === null || n === void 0 ? void 0 : n.href) || "";
|
2296
2311
|
}
|
2297
|
-
function
|
2298
|
-
return
|
2312
|
+
function Oi() {
|
2313
|
+
return _t() === "http:" || _t() === "https:";
|
2299
2314
|
}
|
2300
|
-
function
|
2315
|
+
function _t() {
|
2301
2316
|
var n;
|
2302
2317
|
return typeof self < "u" && ((n = self.location) === null || n === void 0 ? void 0 : n.protocol) || null;
|
2303
2318
|
}
|
@@ -2317,15 +2332,15 @@ function It() {
|
|
2317
2332
|
* See the License for the specific language governing permissions and
|
2318
2333
|
* limitations under the License.
|
2319
2334
|
*/
|
2320
|
-
function
|
2335
|
+
function Di() {
|
2321
2336
|
return typeof navigator < "u" && navigator && "onLine" in navigator && typeof navigator.onLine == "boolean" && // Apply only for traditional web apps and Chrome extensions.
|
2322
2337
|
// This is especially true for Cordova apps which have unreliable
|
2323
2338
|
// navigator.onLine behavior unless cordova-plugin-network-information is
|
2324
2339
|
// installed which overwrites the native navigator.onLine value and
|
2325
2340
|
// defines navigator.connection.
|
2326
|
-
(
|
2341
|
+
(Oi() || or() || "connection" in navigator) ? navigator.onLine : !0;
|
2327
2342
|
}
|
2328
|
-
function
|
2343
|
+
function Ni() {
|
2329
2344
|
if (typeof navigator > "u")
|
2330
2345
|
return null;
|
2331
2346
|
const n = navigator;
|
@@ -2355,10 +2370,10 @@ function Mi() {
|
|
2355
2370
|
*/
|
2356
2371
|
class te {
|
2357
2372
|
constructor(e, t) {
|
2358
|
-
this.shortDelay = e, this.longDelay = t,
|
2373
|
+
this.shortDelay = e, this.longDelay = t, S(t > e, "Short delay should be less than long delay!"), this.isMobile = sr() || cr();
|
2359
2374
|
}
|
2360
2375
|
get() {
|
2361
|
-
return
|
2376
|
+
return Di() ? this.isMobile ? this.longDelay : this.shortDelay : Math.min(5e3, this.shortDelay);
|
2362
2377
|
}
|
2363
2378
|
}
|
2364
2379
|
/**
|
@@ -2378,7 +2393,7 @@ class te {
|
|
2378
2393
|
* limitations under the License.
|
2379
2394
|
*/
|
2380
2395
|
function Je(n, e) {
|
2381
|
-
|
2396
|
+
S(n.emulator, "Emulator should always be set here");
|
2382
2397
|
const { url: t } = n.emulator;
|
2383
2398
|
return e ? `${t}${e.startsWith("/") ? e.slice(1) : e}` : t;
|
2384
2399
|
}
|
@@ -2398,7 +2413,7 @@ function Je(n, e) {
|
|
2398
2413
|
* See the License for the specific language governing permissions and
|
2399
2414
|
* limitations under the License.
|
2400
2415
|
*/
|
2401
|
-
class
|
2416
|
+
class tn {
|
2402
2417
|
static initialize(e, t, r) {
|
2403
2418
|
this.fetchImpl = e, t && (this.headersImpl = t), r && (this.responseImpl = r);
|
2404
2419
|
}
|
@@ -2411,7 +2426,7 @@ class nn {
|
|
2411
2426
|
return globalThis.fetch;
|
2412
2427
|
if (typeof fetch < "u")
|
2413
2428
|
return fetch;
|
2414
|
-
|
2429
|
+
I("Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill");
|
2415
2430
|
}
|
2416
2431
|
static headers() {
|
2417
2432
|
if (this.headersImpl)
|
@@ -2422,7 +2437,7 @@ class nn {
|
|
2422
2437
|
return globalThis.Headers;
|
2423
2438
|
if (typeof Headers < "u")
|
2424
2439
|
return Headers;
|
2425
|
-
|
2440
|
+
I("Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill");
|
2426
2441
|
}
|
2427
2442
|
static response() {
|
2428
2443
|
if (this.responseImpl)
|
@@ -2433,7 +2448,7 @@ class nn {
|
|
2433
2448
|
return globalThis.Response;
|
2434
2449
|
if (typeof Response < "u")
|
2435
2450
|
return Response;
|
2436
|
-
|
2451
|
+
I("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill");
|
2437
2452
|
}
|
2438
2453
|
}
|
2439
2454
|
/**
|
@@ -2543,17 +2558,17 @@ const Li = {
|
|
2543
2558
|
* See the License for the specific language governing permissions and
|
2544
2559
|
* limitations under the License.
|
2545
2560
|
*/
|
2546
|
-
const
|
2547
|
-
function
|
2561
|
+
const Mi = new te(3e4, 6e4);
|
2562
|
+
function ve(n, e) {
|
2548
2563
|
return n.tenantId && !e.tenantId ? Object.assign(Object.assign({}, e), { tenantId: n.tenantId }) : e;
|
2549
2564
|
}
|
2550
|
-
async function
|
2551
|
-
return
|
2565
|
+
async function G(n, e, t, r, i = {}) {
|
2566
|
+
return nn(n, i, async () => {
|
2552
2567
|
let s = {}, a = {};
|
2553
2568
|
r && (e === "GET" ? a = r : s = {
|
2554
2569
|
body: JSON.stringify(r)
|
2555
2570
|
});
|
2556
|
-
const c =
|
2571
|
+
const c = Z(Object.assign({ key: n.config.apiKey }, a)).slice(1), o = await n._getAdditionalHeaders();
|
2557
2572
|
o[
|
2558
2573
|
"Content-Type"
|
2559
2574
|
/* HttpHeader.CONTENT_TYPE */
|
@@ -2565,14 +2580,14 @@ async function Z(n, e, t, r, i = {}) {
|
|
2565
2580
|
method: e,
|
2566
2581
|
headers: o
|
2567
2582
|
}, s);
|
2568
|
-
return
|
2583
|
+
return ar() || (l.referrerPolicy = "no-referrer"), tn.fetch()(sn(n, n.config.apiHost, t, c), l);
|
2569
2584
|
});
|
2570
2585
|
}
|
2571
|
-
async function
|
2586
|
+
async function nn(n, e, t) {
|
2572
2587
|
n._canInitEmulator = !1;
|
2573
2588
|
const r = Object.assign(Object.assign({}, Li), e);
|
2574
2589
|
try {
|
2575
|
-
const i = new
|
2590
|
+
const i = new Ui(n), s = await Promise.race([
|
2576
2591
|
t(),
|
2577
2592
|
i.promise
|
2578
2593
|
]);
|
@@ -2590,35 +2605,35 @@ async function rn(n, e, t) {
|
|
2590
2605
|
throw ie(n, "email-already-in-use", a);
|
2591
2606
|
if (o === "USER_DISABLED")
|
2592
2607
|
throw ie(n, "user-disabled", a);
|
2593
|
-
const
|
2608
|
+
const u = r[o] || o.toLowerCase().replace(/[_\s]+/g, "-");
|
2594
2609
|
if (l)
|
2595
|
-
throw
|
2596
|
-
T(n,
|
2610
|
+
throw en(n, u, l);
|
2611
|
+
T(n, u);
|
2597
2612
|
}
|
2598
2613
|
} catch (i) {
|
2599
|
-
if (i instanceof
|
2614
|
+
if (i instanceof L)
|
2600
2615
|
throw i;
|
2601
2616
|
T(n, "network-request-failed", { message: String(i) });
|
2602
2617
|
}
|
2603
2618
|
}
|
2604
|
-
async function
|
2605
|
-
const s = await
|
2619
|
+
async function rn(n, e, t, r, i = {}) {
|
2620
|
+
const s = await G(n, e, t, r, i);
|
2606
2621
|
return "mfaPendingCredential" in s && T(n, "multi-factor-auth-required", {
|
2607
2622
|
_serverResponse: s
|
2608
2623
|
}), s;
|
2609
2624
|
}
|
2610
|
-
function
|
2625
|
+
function sn(n, e, t, r) {
|
2611
2626
|
const i = `${e}${t}?${r}`;
|
2612
2627
|
return n.config.emulator ? Je(n.config, i) : `${n.config.apiScheme}://${i}`;
|
2613
2628
|
}
|
2614
|
-
class
|
2629
|
+
class Ui {
|
2615
2630
|
constructor(e) {
|
2616
2631
|
this.auth = e, this.timer = null, this.promise = new Promise((t, r) => {
|
2617
|
-
this.timer = setTimeout(() => r(
|
2632
|
+
this.timer = setTimeout(() => r(g(
|
2618
2633
|
this.auth,
|
2619
2634
|
"network-request-failed"
|
2620
2635
|
/* AuthErrorCode.NETWORK_REQUEST_FAILED */
|
2621
|
-
)),
|
2636
|
+
)), Mi.get());
|
2622
2637
|
});
|
2623
2638
|
}
|
2624
2639
|
clearNetworkTimeout() {
|
@@ -2630,7 +2645,7 @@ function ie(n, e, t) {
|
|
2630
2645
|
appName: n.name
|
2631
2646
|
};
|
2632
2647
|
t.email && (r.email = t.email), t.phoneNumber && (r.phoneNumber = t.phoneNumber);
|
2633
|
-
const i =
|
2648
|
+
const i = g(n, e, r);
|
2634
2649
|
return i.customData._tokenResponse = t, i;
|
2635
2650
|
}
|
2636
2651
|
/**
|
@@ -2650,10 +2665,10 @@ function ie(n, e, t) {
|
|
2650
2665
|
* limitations under the License.
|
2651
2666
|
*/
|
2652
2667
|
async function xi(n, e) {
|
2653
|
-
return
|
2668
|
+
return G(n, "POST", "/v1/accounts:delete", e);
|
2654
2669
|
}
|
2655
|
-
async function
|
2656
|
-
return
|
2670
|
+
async function an(n, e) {
|
2671
|
+
return G(n, "POST", "/v1/accounts:lookup", e);
|
2657
2672
|
}
|
2658
2673
|
/**
|
2659
2674
|
* @license
|
@@ -2671,7 +2686,7 @@ async function on(n, e) {
|
|
2671
2686
|
* See the License for the specific language governing permissions and
|
2672
2687
|
* limitations under the License.
|
2673
2688
|
*/
|
2674
|
-
function
|
2689
|
+
function K(n) {
|
2675
2690
|
if (n)
|
2676
2691
|
try {
|
2677
2692
|
const e = new Date(Number(n));
|
@@ -2680,9 +2695,9 @@ function $(n) {
|
|
2680
2695
|
} catch {
|
2681
2696
|
}
|
2682
2697
|
}
|
2683
|
-
async function
|
2684
|
-
const t = z(n), r = await t.getIdToken(e), i =
|
2685
|
-
|
2698
|
+
async function Fi(n, e = !1) {
|
2699
|
+
const t = z(n), r = await t.getIdToken(e), i = Ye(r);
|
2700
|
+
d(
|
2686
2701
|
i && i.exp && i.auth_time && i.iat,
|
2687
2702
|
t.auth,
|
2688
2703
|
"internal-error"
|
@@ -2692,9 +2707,9 @@ async function Bi(n, e = !1) {
|
|
2692
2707
|
return {
|
2693
2708
|
claims: i,
|
2694
2709
|
token: r,
|
2695
|
-
authTime:
|
2696
|
-
issuedAtTime:
|
2697
|
-
expirationTime:
|
2710
|
+
authTime: K(Oe(i.auth_time)),
|
2711
|
+
issuedAtTime: K(Oe(i.iat)),
|
2712
|
+
expirationTime: K(Oe(i.exp)),
|
2698
2713
|
signInProvider: a || null,
|
2699
2714
|
signInSecondFactor: (s == null ? void 0 : s.sign_in_second_factor) || null
|
2700
2715
|
};
|
@@ -2702,28 +2717,28 @@ async function Bi(n, e = !1) {
|
|
2702
2717
|
function Oe(n) {
|
2703
2718
|
return Number(n) * 1e3;
|
2704
2719
|
}
|
2705
|
-
function
|
2720
|
+
function Ye(n) {
|
2706
2721
|
const [e, t, r] = n.split(".");
|
2707
2722
|
if (e === void 0 || t === void 0 || r === void 0)
|
2708
2723
|
return se("JWT malformed, contained fewer than 3 sections"), null;
|
2709
2724
|
try {
|
2710
|
-
const i =
|
2725
|
+
const i = Ht(t);
|
2711
2726
|
return i ? JSON.parse(i) : (se("Failed to decode base64 JWT payload"), null);
|
2712
2727
|
} catch (i) {
|
2713
2728
|
return se("Caught error parsing JWT payload as JSON", i == null ? void 0 : i.toString()), null;
|
2714
2729
|
}
|
2715
2730
|
}
|
2716
2731
|
function vt(n) {
|
2717
|
-
const e =
|
2718
|
-
return
|
2732
|
+
const e = Ye(n);
|
2733
|
+
return d(
|
2719
2734
|
e,
|
2720
2735
|
"internal-error"
|
2721
2736
|
/* AuthErrorCode.INTERNAL_ERROR */
|
2722
|
-
),
|
2737
|
+
), d(
|
2723
2738
|
typeof e.exp < "u",
|
2724
2739
|
"internal-error"
|
2725
2740
|
/* AuthErrorCode.INTERNAL_ERROR */
|
2726
|
-
),
|
2741
|
+
), d(
|
2727
2742
|
typeof e.iat < "u",
|
2728
2743
|
"internal-error"
|
2729
2744
|
/* AuthErrorCode.INTERNAL_ERROR */
|
@@ -2745,16 +2760,16 @@ function vt(n) {
|
|
2745
2760
|
* See the License for the specific language governing permissions and
|
2746
2761
|
* limitations under the License.
|
2747
2762
|
*/
|
2748
|
-
async function
|
2763
|
+
async function X(n, e, t = !1) {
|
2749
2764
|
if (t)
|
2750
2765
|
return e;
|
2751
2766
|
try {
|
2752
2767
|
return await e;
|
2753
2768
|
} catch (r) {
|
2754
|
-
throw r instanceof
|
2769
|
+
throw r instanceof L && Bi(r) && n.auth.currentUser === n && await n.auth.signOut(), r;
|
2755
2770
|
}
|
2756
2771
|
}
|
2757
|
-
function
|
2772
|
+
function Bi({ code: n }) {
|
2758
2773
|
return n === "auth/user-disabled" || n === "auth/user-token-expired";
|
2759
2774
|
}
|
2760
2775
|
/**
|
@@ -2773,7 +2788,7 @@ function Fi({ code: n }) {
|
|
2773
2788
|
* See the License for the specific language governing permissions and
|
2774
2789
|
* limitations under the License.
|
2775
2790
|
*/
|
2776
|
-
class
|
2791
|
+
class $i {
|
2777
2792
|
constructor(e) {
|
2778
2793
|
this.user = e, this.isRunning = !1, this.timerId = null, this.errorBackoff = 3e4;
|
2779
2794
|
}
|
@@ -2840,7 +2855,7 @@ class He {
|
|
2840
2855
|
this.createdAt = e, this.lastLoginAt = t, this._initializeTime();
|
2841
2856
|
}
|
2842
2857
|
_initializeTime() {
|
2843
|
-
this.lastSignInTime =
|
2858
|
+
this.lastSignInTime = K(this.lastLoginAt), this.creationTime = K(this.createdAt);
|
2844
2859
|
}
|
2845
2860
|
_copy(e) {
|
2846
2861
|
this.createdAt = e.createdAt, this.lastLoginAt = e.lastLoginAt, this._initializeTime();
|
@@ -2868,10 +2883,10 @@ class He {
|
|
2868
2883
|
* See the License for the specific language governing permissions and
|
2869
2884
|
* limitations under the License.
|
2870
2885
|
*/
|
2871
|
-
async function
|
2886
|
+
async function pe(n) {
|
2872
2887
|
var e;
|
2873
|
-
const t = n.auth, r = await n.getIdToken(), i = await
|
2874
|
-
|
2888
|
+
const t = n.auth, r = await n.getIdToken(), i = await X(n, an(t, { idToken: r }));
|
2889
|
+
d(
|
2875
2890
|
i == null ? void 0 : i.users.length,
|
2876
2891
|
t,
|
2877
2892
|
"internal-error"
|
@@ -2879,7 +2894,7 @@ async function me(n) {
|
|
2879
2894
|
);
|
2880
2895
|
const s = i.users[0];
|
2881
2896
|
n._notifyReloadListener(s);
|
2882
|
-
const a = !((e = s.providerUserInfo) === null || e === void 0) && e.length ?
|
2897
|
+
const a = !((e = s.providerUserInfo) === null || e === void 0) && e.length ? on(s.providerUserInfo) : [], c = Vi(n.providerData, a), o = n.isAnonymous, l = !(n.email && s.passwordHash) && !(c != null && c.length), u = o ? l : !1, h = {
|
2883
2898
|
uid: s.localId,
|
2884
2899
|
displayName: s.displayName || null,
|
2885
2900
|
photoURL: s.photoUrl || null,
|
@@ -2889,20 +2904,20 @@ async function me(n) {
|
|
2889
2904
|
tenantId: s.tenantId || null,
|
2890
2905
|
providerData: c,
|
2891
2906
|
metadata: new He(s.createdAt, s.lastLoginAt),
|
2892
|
-
isAnonymous:
|
2907
|
+
isAnonymous: u
|
2893
2908
|
};
|
2894
2909
|
Object.assign(n, h);
|
2895
2910
|
}
|
2896
|
-
async function
|
2911
|
+
async function Hi(n) {
|
2897
2912
|
const e = z(n);
|
2898
|
-
await
|
2913
|
+
await pe(e), await e.auth._persistUserIfCurrent(e), e.auth._notifyListenersIfCurrent(e);
|
2899
2914
|
}
|
2900
2915
|
function Vi(n, e) {
|
2901
2916
|
return [...n.filter((r) => !e.some((i) => i.providerId === r.providerId)), ...e];
|
2902
2917
|
}
|
2903
|
-
function
|
2918
|
+
function on(n) {
|
2904
2919
|
return n.map((e) => {
|
2905
|
-
var { providerId: t } = e, r =
|
2920
|
+
var { providerId: t } = e, r = qe(e, ["providerId"]);
|
2906
2921
|
return {
|
2907
2922
|
providerId: t,
|
2908
2923
|
uid: r.rawId || "",
|
@@ -2929,16 +2944,16 @@ function cn(n) {
|
|
2929
2944
|
* See the License for the specific language governing permissions and
|
2930
2945
|
* limitations under the License.
|
2931
2946
|
*/
|
2932
|
-
async function
|
2933
|
-
const t = await
|
2934
|
-
const r =
|
2947
|
+
async function ji(n, e) {
|
2948
|
+
const t = await nn(n, {}, async () => {
|
2949
|
+
const r = Z({
|
2935
2950
|
grant_type: "refresh_token",
|
2936
2951
|
refresh_token: e
|
2937
|
-
}).slice(1), { tokenApiHost: i, apiKey: s } = n.config, a =
|
2952
|
+
}).slice(1), { tokenApiHost: i, apiKey: s } = n.config, a = sn(n, i, "/v1/token", `key=${s}`), c = await n._getAdditionalHeaders();
|
2938
2953
|
return c[
|
2939
2954
|
"Content-Type"
|
2940
2955
|
/* HttpHeader.CONTENT_TYPE */
|
2941
|
-
] = "application/x-www-form-urlencoded",
|
2956
|
+
] = "application/x-www-form-urlencoded", tn.fetch()(a, {
|
2942
2957
|
method: "POST",
|
2943
2958
|
headers: c,
|
2944
2959
|
body: r
|
@@ -2950,8 +2965,8 @@ async function Gi(n, e) {
|
|
2950
2965
|
refreshToken: t.refresh_token
|
2951
2966
|
};
|
2952
2967
|
}
|
2953
|
-
async function
|
2954
|
-
return
|
2968
|
+
async function Wi(n, e) {
|
2969
|
+
return G(n, "POST", "/v2/accounts:revokeToken", ve(n, e));
|
2955
2970
|
}
|
2956
2971
|
/**
|
2957
2972
|
* @license
|
@@ -2977,15 +2992,15 @@ class H {
|
|
2977
2992
|
return !this.expirationTime || Date.now() > this.expirationTime - 3e4;
|
2978
2993
|
}
|
2979
2994
|
updateFromServerResponse(e) {
|
2980
|
-
|
2995
|
+
d(
|
2981
2996
|
e.idToken,
|
2982
2997
|
"internal-error"
|
2983
2998
|
/* AuthErrorCode.INTERNAL_ERROR */
|
2984
|
-
),
|
2999
|
+
), d(
|
2985
3000
|
typeof e.idToken < "u",
|
2986
3001
|
"internal-error"
|
2987
3002
|
/* AuthErrorCode.INTERNAL_ERROR */
|
2988
|
-
),
|
3003
|
+
), d(
|
2989
3004
|
typeof e.refreshToken < "u",
|
2990
3005
|
"internal-error"
|
2991
3006
|
/* AuthErrorCode.INTERNAL_ERROR */
|
@@ -2994,7 +3009,7 @@ class H {
|
|
2994
3009
|
this.updateTokensAndExpiration(e.idToken, e.refreshToken, t);
|
2995
3010
|
}
|
2996
3011
|
updateFromIdToken(e) {
|
2997
|
-
|
3012
|
+
d(
|
2998
3013
|
e.length !== 0,
|
2999
3014
|
"internal-error"
|
3000
3015
|
/* AuthErrorCode.INTERNAL_ERROR */
|
@@ -3003,7 +3018,7 @@ class H {
|
|
3003
3018
|
this.updateTokensAndExpiration(e, null, t);
|
3004
3019
|
}
|
3005
3020
|
async getToken(e, t = !1) {
|
3006
|
-
return !t && this.accessToken && !this.isExpired ? this.accessToken : (
|
3021
|
+
return !t && this.accessToken && !this.isExpired ? this.accessToken : (d(
|
3007
3022
|
this.refreshToken,
|
3008
3023
|
e,
|
3009
3024
|
"user-token-expired"
|
@@ -3014,7 +3029,7 @@ class H {
|
|
3014
3029
|
this.refreshToken = null;
|
3015
3030
|
}
|
3016
3031
|
async refresh(e, t) {
|
3017
|
-
const { accessToken: r, refreshToken: i, expiresIn: s } = await
|
3032
|
+
const { accessToken: r, refreshToken: i, expiresIn: s } = await ji(e, t);
|
3018
3033
|
this.updateTokensAndExpiration(r, i, Number(s));
|
3019
3034
|
}
|
3020
3035
|
updateTokensAndExpiration(e, t, r) {
|
@@ -3022,11 +3037,11 @@ class H {
|
|
3022
3037
|
}
|
3023
3038
|
static fromJSON(e, t) {
|
3024
3039
|
const { refreshToken: r, accessToken: i, expirationTime: s } = t, a = new H();
|
3025
|
-
return r && (
|
3040
|
+
return r && (d(typeof r == "string", "internal-error", {
|
3026
3041
|
appName: e
|
3027
|
-
}), a.refreshToken = r), i && (
|
3042
|
+
}), a.refreshToken = r), i && (d(typeof i == "string", "internal-error", {
|
3028
3043
|
appName: e
|
3029
|
-
}), a.accessToken = i), s && (
|
3044
|
+
}), a.accessToken = i), s && (d(typeof s == "number", "internal-error", {
|
3030
3045
|
appName: e
|
3031
3046
|
}), a.expirationTime = s), a;
|
3032
3047
|
}
|
@@ -3044,7 +3059,7 @@ class H {
|
|
3044
3059
|
return Object.assign(new H(), this.toJSON());
|
3045
3060
|
}
|
3046
3061
|
_performRefresh() {
|
3047
|
-
return
|
3062
|
+
return I("not implemented");
|
3048
3063
|
}
|
3049
3064
|
}
|
3050
3065
|
/**
|
@@ -3063,17 +3078,17 @@ class H {
|
|
3063
3078
|
* See the License for the specific language governing permissions and
|
3064
3079
|
* limitations under the License.
|
3065
3080
|
*/
|
3066
|
-
function
|
3067
|
-
|
3081
|
+
function k(n, e) {
|
3082
|
+
d(typeof n == "string" || typeof n > "u", "internal-error", { appName: e });
|
3068
3083
|
}
|
3069
3084
|
class b {
|
3070
3085
|
constructor(e) {
|
3071
|
-
var { uid: t, auth: r, stsTokenManager: i } = e, s =
|
3072
|
-
this.providerId = "firebase", this.proactiveRefresh = new
|
3086
|
+
var { uid: t, auth: r, stsTokenManager: i } = e, s = qe(e, ["uid", "auth", "stsTokenManager"]);
|
3087
|
+
this.providerId = "firebase", this.proactiveRefresh = new $i(this), this.reloadUserInfo = null, this.reloadListener = null, this.uid = t, this.auth = r, this.stsTokenManager = i, this.accessToken = i.accessToken, this.displayName = s.displayName || null, this.email = s.email || null, this.emailVerified = s.emailVerified || !1, this.phoneNumber = s.phoneNumber || null, this.photoURL = s.photoURL || null, this.isAnonymous = s.isAnonymous || !1, this.tenantId = s.tenantId || null, this.providerData = s.providerData ? [...s.providerData] : [], this.metadata = new He(s.createdAt || void 0, s.lastLoginAt || void 0);
|
3073
3088
|
}
|
3074
3089
|
async getIdToken(e) {
|
3075
|
-
const t = await
|
3076
|
-
return
|
3090
|
+
const t = await X(this, this.stsTokenManager.getToken(this.auth, e));
|
3091
|
+
return d(
|
3077
3092
|
t,
|
3078
3093
|
this.auth,
|
3079
3094
|
"internal-error"
|
@@ -3081,13 +3096,13 @@ class b {
|
|
3081
3096
|
), this.accessToken !== t && (this.accessToken = t, await this.auth._persistUserIfCurrent(this), this.auth._notifyListenersIfCurrent(this)), t;
|
3082
3097
|
}
|
3083
3098
|
getIdTokenResult(e) {
|
3084
|
-
return
|
3099
|
+
return Fi(this, e);
|
3085
3100
|
}
|
3086
3101
|
reload() {
|
3087
|
-
return
|
3102
|
+
return Hi(this);
|
3088
3103
|
}
|
3089
3104
|
_assign(e) {
|
3090
|
-
this !== e && (
|
3105
|
+
this !== e && (d(
|
3091
3106
|
this.uid === e.uid,
|
3092
3107
|
this.auth,
|
3093
3108
|
"internal-error"
|
@@ -3099,7 +3114,7 @@ class b {
|
|
3099
3114
|
return t.metadata._copy(this.metadata), t;
|
3100
3115
|
}
|
3101
3116
|
_onReload(e) {
|
3102
|
-
|
3117
|
+
d(
|
3103
3118
|
!this.reloadListener,
|
3104
3119
|
this.auth,
|
3105
3120
|
"internal-error"
|
@@ -3117,13 +3132,13 @@ class b {
|
|
3117
3132
|
}
|
3118
3133
|
async _updateTokensIfNecessary(e, t = !1) {
|
3119
3134
|
let r = !1;
|
3120
|
-
e.idToken && e.idToken !== this.stsTokenManager.accessToken && (this.stsTokenManager.updateFromServerResponse(e), r = !0), t && await
|
3135
|
+
e.idToken && e.idToken !== this.stsTokenManager.accessToken && (this.stsTokenManager.updateFromServerResponse(e), r = !0), t && await pe(this), await this.auth._persistUserIfCurrent(this), r && this.auth._notifyListenersIfCurrent(this);
|
3121
3136
|
}
|
3122
3137
|
async delete() {
|
3123
|
-
if (
|
3124
|
-
return Promise.reject(
|
3138
|
+
if (y(this.auth.app))
|
3139
|
+
return Promise.reject(N(this.auth));
|
3125
3140
|
const e = await this.getIdToken();
|
3126
|
-
return await
|
3141
|
+
return await X(this, xi(this.auth, { idToken: e })), this.stsTokenManager.clearRefreshToken(), this.auth.signOut();
|
3127
3142
|
}
|
3128
3143
|
toJSON() {
|
3129
3144
|
return Object.assign(Object.assign({
|
@@ -3150,46 +3165,46 @@ class b {
|
|
3150
3165
|
return this.stsTokenManager.refreshToken || "";
|
3151
3166
|
}
|
3152
3167
|
static _fromJSON(e, t) {
|
3153
|
-
var r, i, s, a, c, o, l,
|
3154
|
-
const h = (r = t.displayName) !== null && r !== void 0 ? r : void 0,
|
3155
|
-
|
3156
|
-
|
3168
|
+
var r, i, s, a, c, o, l, u;
|
3169
|
+
const h = (r = t.displayName) !== null && r !== void 0 ? r : void 0, p = (i = t.email) !== null && i !== void 0 ? i : void 0, v = (s = t.phoneNumber) !== null && s !== void 0 ? s : void 0, F = (a = t.photoURL) !== null && a !== void 0 ? a : void 0, tt = (c = t.tenantId) !== null && c !== void 0 ? c : void 0, we = (o = t._redirectEventId) !== null && o !== void 0 ? o : void 0, nt = (l = t.createdAt) !== null && l !== void 0 ? l : void 0, rt = (u = t.lastLoginAt) !== null && u !== void 0 ? u : void 0, { uid: Ee, emailVerified: it, isAnonymous: st, providerData: Te, stsTokenManager: at } = t;
|
3170
|
+
d(
|
3171
|
+
Ee && at,
|
3157
3172
|
e,
|
3158
3173
|
"internal-error"
|
3159
3174
|
/* AuthErrorCode.INTERNAL_ERROR */
|
3160
3175
|
);
|
3161
|
-
const
|
3162
|
-
|
3163
|
-
typeof
|
3176
|
+
const Dn = H.fromJSON(this.name, at);
|
3177
|
+
d(
|
3178
|
+
typeof Ee == "string",
|
3164
3179
|
e,
|
3165
3180
|
"internal-error"
|
3166
3181
|
/* AuthErrorCode.INTERNAL_ERROR */
|
3167
|
-
),
|
3182
|
+
), k(h, e.name), k(p, e.name), d(
|
3168
3183
|
typeof it == "boolean",
|
3169
3184
|
e,
|
3170
3185
|
"internal-error"
|
3171
3186
|
/* AuthErrorCode.INTERNAL_ERROR */
|
3172
|
-
),
|
3187
|
+
), d(
|
3173
3188
|
typeof st == "boolean",
|
3174
3189
|
e,
|
3175
3190
|
"internal-error"
|
3176
3191
|
/* AuthErrorCode.INTERNAL_ERROR */
|
3177
|
-
),
|
3178
|
-
const
|
3179
|
-
uid:
|
3192
|
+
), k(v, e.name), k(F, e.name), k(tt, e.name), k(we, e.name), k(nt, e.name), k(rt, e.name);
|
3193
|
+
const Se = new b({
|
3194
|
+
uid: Ee,
|
3180
3195
|
auth: e,
|
3181
|
-
email:
|
3196
|
+
email: p,
|
3182
3197
|
emailVerified: it,
|
3183
3198
|
displayName: h,
|
3184
3199
|
isAnonymous: st,
|
3185
|
-
photoURL:
|
3186
|
-
phoneNumber:
|
3200
|
+
photoURL: F,
|
3201
|
+
phoneNumber: v,
|
3187
3202
|
tenantId: tt,
|
3188
|
-
stsTokenManager:
|
3203
|
+
stsTokenManager: Dn,
|
3189
3204
|
createdAt: nt,
|
3190
3205
|
lastLoginAt: rt
|
3191
3206
|
});
|
3192
|
-
return Te && Array.isArray(Te) && (
|
3207
|
+
return Te && Array.isArray(Te) && (Se.providerData = Te.map((Nn) => Object.assign({}, Nn))), we && (Se._redirectEventId = we), Se;
|
3193
3208
|
}
|
3194
3209
|
/**
|
3195
3210
|
* Initialize a User from an idToken server response
|
@@ -3205,7 +3220,7 @@ class b {
|
|
3205
3220
|
stsTokenManager: i,
|
3206
3221
|
isAnonymous: r
|
3207
3222
|
});
|
3208
|
-
return await
|
3223
|
+
return await pe(s), s;
|
3209
3224
|
}
|
3210
3225
|
/**
|
3211
3226
|
* Initialize a User from an idToken server response
|
@@ -3214,12 +3229,12 @@ class b {
|
|
3214
3229
|
*/
|
3215
3230
|
static async _fromGetAccountInfoResponse(e, t, r) {
|
3216
3231
|
const i = t.users[0];
|
3217
|
-
|
3232
|
+
d(
|
3218
3233
|
i.localId !== void 0,
|
3219
3234
|
"internal-error"
|
3220
3235
|
/* AuthErrorCode.INTERNAL_ERROR */
|
3221
3236
|
);
|
3222
|
-
const s = i.providerUserInfo !== void 0 ?
|
3237
|
+
const s = i.providerUserInfo !== void 0 ? on(i.providerUserInfo) : [], a = !(i.email && i.passwordHash) && !(s != null && s.length), c = new H();
|
3223
3238
|
c.updateFromIdToken(r);
|
3224
3239
|
const o = new b({
|
3225
3240
|
uid: i.localId,
|
@@ -3258,10 +3273,10 @@ class b {
|
|
3258
3273
|
* limitations under the License.
|
3259
3274
|
*/
|
3260
3275
|
const yt = /* @__PURE__ */ new Map();
|
3261
|
-
function
|
3262
|
-
|
3276
|
+
function w(n) {
|
3277
|
+
S(n instanceof Function, "Expected a class definition");
|
3263
3278
|
let e = yt.get(n);
|
3264
|
-
return e ? (
|
3279
|
+
return e ? (S(e instanceof n, "Instance stored in cache mismatched with class"), e) : (e = new n(), yt.set(n, e), e);
|
3265
3280
|
}
|
3266
3281
|
/**
|
3267
3282
|
* @license
|
@@ -3279,7 +3294,7 @@ function E(n) {
|
|
3279
3294
|
* See the License for the specific language governing permissions and
|
3280
3295
|
* limitations under the License.
|
3281
3296
|
*/
|
3282
|
-
class
|
3297
|
+
class cn {
|
3283
3298
|
constructor() {
|
3284
3299
|
this.type = "NONE", this.storage = {};
|
3285
3300
|
}
|
@@ -3301,8 +3316,8 @@ class ln {
|
|
3301
3316
|
_removeListener(e, t) {
|
3302
3317
|
}
|
3303
3318
|
}
|
3304
|
-
|
3305
|
-
const
|
3319
|
+
cn.type = "NONE";
|
3320
|
+
const It = cn;
|
3306
3321
|
/**
|
3307
3322
|
* @license
|
3308
3323
|
* Copyright 2019 Google LLC
|
@@ -3322,7 +3337,7 @@ const bt = ln;
|
|
3322
3337
|
function ae(n, e, t) {
|
3323
3338
|
return `firebase:${n}:${e}:${t}`;
|
3324
3339
|
}
|
3325
|
-
class
|
3340
|
+
class V {
|
3326
3341
|
constructor(e, t, r) {
|
3327
3342
|
this.persistence = e, this.auth = t, this.userKey = r;
|
3328
3343
|
const { config: i, name: s } = this.auth;
|
@@ -3353,32 +3368,32 @@ class W {
|
|
3353
3368
|
}
|
3354
3369
|
static async create(e, t, r = "authUser") {
|
3355
3370
|
if (!t.length)
|
3356
|
-
return new
|
3371
|
+
return new V(w(It), e, r);
|
3357
3372
|
const i = (await Promise.all(t.map(async (l) => {
|
3358
3373
|
if (await l._isAvailable())
|
3359
3374
|
return l;
|
3360
3375
|
}))).filter((l) => l);
|
3361
|
-
let s = i[0] ||
|
3376
|
+
let s = i[0] || w(It);
|
3362
3377
|
const a = ae(r, e.config.apiKey, e.name);
|
3363
3378
|
let c = null;
|
3364
3379
|
for (const l of t)
|
3365
3380
|
try {
|
3366
|
-
const
|
3367
|
-
if (
|
3368
|
-
const h = b._fromJSON(e,
|
3381
|
+
const u = await l._get(a);
|
3382
|
+
if (u) {
|
3383
|
+
const h = b._fromJSON(e, u);
|
3369
3384
|
l !== s && (c = h), s = l;
|
3370
3385
|
break;
|
3371
3386
|
}
|
3372
3387
|
} catch {
|
3373
3388
|
}
|
3374
3389
|
const o = i.filter((l) => l._shouldAllowMigration);
|
3375
|
-
return !s._shouldAllowMigration || !o.length ? new
|
3390
|
+
return !s._shouldAllowMigration || !o.length ? new V(s, e, r) : (s = o[0], c && await s._set(a, c.toJSON()), await Promise.all(t.map(async (l) => {
|
3376
3391
|
if (l !== s)
|
3377
3392
|
try {
|
3378
3393
|
await l._remove(a);
|
3379
3394
|
} catch {
|
3380
3395
|
}
|
3381
|
-
})), new
|
3396
|
+
})), new V(s, e, r));
|
3382
3397
|
}
|
3383
3398
|
}
|
3384
3399
|
/**
|
@@ -3397,29 +3412,29 @@ class W {
|
|
3397
3412
|
* See the License for the specific language governing permissions and
|
3398
3413
|
* limitations under the License.
|
3399
3414
|
*/
|
3400
|
-
function
|
3415
|
+
function bt(n) {
|
3401
3416
|
const e = n.toLowerCase();
|
3402
3417
|
if (e.includes("opera/") || e.includes("opr/") || e.includes("opios/"))
|
3403
3418
|
return "Opera";
|
3404
|
-
if (
|
3419
|
+
if (hn(e))
|
3405
3420
|
return "IEMobile";
|
3406
3421
|
if (e.includes("msie") || e.includes("trident/"))
|
3407
3422
|
return "IE";
|
3408
3423
|
if (e.includes("edge/"))
|
3409
3424
|
return "Edge";
|
3410
|
-
if (
|
3425
|
+
if (ln(e))
|
3411
3426
|
return "Firefox";
|
3412
3427
|
if (e.includes("silk/"))
|
3413
3428
|
return "Silk";
|
3414
|
-
if (
|
3429
|
+
if (pn(e))
|
3415
3430
|
return "Blackberry";
|
3416
|
-
if (
|
3431
|
+
if (mn(e))
|
3417
3432
|
return "Webos";
|
3418
3433
|
if (un(e))
|
3419
3434
|
return "Safari";
|
3420
|
-
if ((e.includes("chrome/") ||
|
3435
|
+
if ((e.includes("chrome/") || dn(e)) && !e.includes("edge/"))
|
3421
3436
|
return "Chrome";
|
3422
|
-
if (
|
3437
|
+
if (fn(e))
|
3423
3438
|
return "Android";
|
3424
3439
|
{
|
3425
3440
|
const t = /([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/, r = n.match(t);
|
@@ -3428,40 +3443,40 @@ function Et(n) {
|
|
3428
3443
|
}
|
3429
3444
|
return "Other";
|
3430
3445
|
}
|
3431
|
-
function
|
3446
|
+
function ln(n = m()) {
|
3432
3447
|
return /firefox\//i.test(n);
|
3433
3448
|
}
|
3434
|
-
function un(n =
|
3449
|
+
function un(n = m()) {
|
3435
3450
|
const e = n.toLowerCase();
|
3436
3451
|
return e.includes("safari/") && !e.includes("chrome/") && !e.includes("crios/") && !e.includes("android");
|
3437
3452
|
}
|
3438
|
-
function
|
3453
|
+
function dn(n = m()) {
|
3439
3454
|
return /crios\//i.test(n);
|
3440
3455
|
}
|
3441
|
-
function
|
3456
|
+
function hn(n = m()) {
|
3442
3457
|
return /iemobile/i.test(n);
|
3443
3458
|
}
|
3444
|
-
function
|
3459
|
+
function fn(n = m()) {
|
3445
3460
|
return /android/i.test(n);
|
3446
3461
|
}
|
3447
|
-
function
|
3462
|
+
function pn(n = m()) {
|
3448
3463
|
return /blackberry/i.test(n);
|
3449
3464
|
}
|
3450
|
-
function
|
3465
|
+
function mn(n = m()) {
|
3451
3466
|
return /webos/i.test(n);
|
3452
3467
|
}
|
3453
|
-
function
|
3468
|
+
function Xe(n = m()) {
|
3454
3469
|
return /iphone|ipad|ipod/i.test(n) || /macintosh/i.test(n) && /mobile/i.test(n);
|
3455
3470
|
}
|
3456
|
-
function
|
3471
|
+
function zi(n = m()) {
|
3457
3472
|
var e;
|
3458
|
-
return
|
3473
|
+
return Xe(n) && !!(!((e = window.navigator) === null || e === void 0) && e.standalone);
|
3459
3474
|
}
|
3460
|
-
function
|
3461
|
-
return
|
3475
|
+
function Gi() {
|
3476
|
+
return lr() && document.documentMode === 10;
|
3462
3477
|
}
|
3463
|
-
function gn(n =
|
3464
|
-
return
|
3478
|
+
function gn(n = m()) {
|
3479
|
+
return Xe(n) || fn(n) || mn(n) || pn(n) || /windows phone/i.test(n) || hn(n);
|
3465
3480
|
}
|
3466
3481
|
/**
|
3467
3482
|
* @license
|
@@ -3479,14 +3494,14 @@ function gn(n = f()) {
|
|
3479
3494
|
* See the License for the specific language governing permissions and
|
3480
3495
|
* limitations under the License.
|
3481
3496
|
*/
|
3482
|
-
function
|
3497
|
+
function _n(n, e = []) {
|
3483
3498
|
let t;
|
3484
3499
|
switch (n) {
|
3485
3500
|
case "Browser":
|
3486
|
-
t =
|
3501
|
+
t = bt(m());
|
3487
3502
|
break;
|
3488
3503
|
case "Worker":
|
3489
|
-
t = `${
|
3504
|
+
t = `${bt(m())}-${n}`;
|
3490
3505
|
break;
|
3491
3506
|
default:
|
3492
3507
|
t = n;
|
@@ -3510,7 +3525,7 @@ function In(n, e = []) {
|
|
3510
3525
|
* See the License for the specific language governing permissions and
|
3511
3526
|
* limitations under the License.
|
3512
3527
|
*/
|
3513
|
-
class
|
3528
|
+
class qi {
|
3514
3529
|
constructor(e) {
|
3515
3530
|
this.auth = e, this.queue = [];
|
3516
3531
|
}
|
@@ -3565,8 +3580,8 @@ class $i {
|
|
3565
3580
|
* See the License for the specific language governing permissions and
|
3566
3581
|
* limitations under the License.
|
3567
3582
|
*/
|
3568
|
-
async function
|
3569
|
-
return
|
3583
|
+
async function Ki(n, e = {}) {
|
3584
|
+
return G(n, "GET", "/v2/passwordPolicy", ve(n, e));
|
3570
3585
|
}
|
3571
3586
|
/**
|
3572
3587
|
* @license
|
@@ -3584,12 +3599,12 @@ async function Ji(n, e = {}) {
|
|
3584
3599
|
* See the License for the specific language governing permissions and
|
3585
3600
|
* limitations under the License.
|
3586
3601
|
*/
|
3587
|
-
const
|
3588
|
-
class
|
3602
|
+
const Ji = 6;
|
3603
|
+
class Yi {
|
3589
3604
|
constructor(e) {
|
3590
3605
|
var t, r, i, s;
|
3591
3606
|
const a = e.customStrengthOptions;
|
3592
|
-
this.customStrengthOptions = {}, this.customStrengthOptions.minPasswordLength = (t = a.minPasswordLength) !== null && t !== void 0 ? t :
|
3607
|
+
this.customStrengthOptions = {}, this.customStrengthOptions.minPasswordLength = (t = a.minPasswordLength) !== null && t !== void 0 ? t : Ji, a.maxPasswordLength && (this.customStrengthOptions.maxPasswordLength = a.maxPasswordLength), a.containsLowercaseCharacter !== void 0 && (this.customStrengthOptions.containsLowercaseLetter = a.containsLowercaseCharacter), a.containsUppercaseCharacter !== void 0 && (this.customStrengthOptions.containsUppercaseLetter = a.containsUppercaseCharacter), a.containsNumericCharacter !== void 0 && (this.customStrengthOptions.containsNumericCharacter = a.containsNumericCharacter), a.containsNonAlphanumericCharacter !== void 0 && (this.customStrengthOptions.containsNonAlphanumericCharacter = a.containsNonAlphanumericCharacter), this.enforcementState = e.enforcementState, this.enforcementState === "ENFORCEMENT_STATE_UNSPECIFIED" && (this.enforcementState = "OFF"), this.allowedNonAlphanumericCharacters = (i = (r = e.allowedNonAlphanumericCharacters) === null || r === void 0 ? void 0 : r.join("")) !== null && i !== void 0 ? i : "", this.forceUpgradeOnSignin = (s = e.forceUpgradeOnSignin) !== null && s !== void 0 ? s : !1, this.schemaVersion = e.schemaVersion;
|
3593
3608
|
}
|
3594
3609
|
validatePassword(e) {
|
3595
3610
|
var t, r, i, s, a, c;
|
@@ -3672,14 +3687,14 @@ class Ki {
|
|
3672
3687
|
* See the License for the specific language governing permissions and
|
3673
3688
|
* limitations under the License.
|
3674
3689
|
*/
|
3675
|
-
class
|
3690
|
+
class Xi {
|
3676
3691
|
constructor(e, t, r, i) {
|
3677
|
-
this.app = e, this.heartbeatServiceProvider = t, this.appCheckServiceProvider = r, this.config = i, this.currentUser = null, this.emulatorConfig = null, this.operations = Promise.resolve(), this.authStateSubscription = new wt(this), this.idTokenSubscription = new wt(this), this.beforeStateQueue = new
|
3692
|
+
this.app = e, this.heartbeatServiceProvider = t, this.appCheckServiceProvider = r, this.config = i, this.currentUser = null, this.emulatorConfig = null, this.operations = Promise.resolve(), this.authStateSubscription = new wt(this), this.idTokenSubscription = new wt(this), this.beforeStateQueue = new qi(this), this.redirectUser = null, this.isProactiveRefreshEnabled = !1, this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION = 1, this._canInitEmulator = !0, this._isInitialized = !1, this._deleted = !1, this._initializationPromise = null, this._popupRedirectResolver = null, this._errorFactory = Zt, this._agentRecaptchaConfig = null, this._tenantRecaptchaConfigs = {}, this._projectPasswordPolicy = null, this._tenantPasswordPolicies = {}, this.lastNotifiedUid = void 0, this.languageCode = null, this.tenantId = null, this.settings = { appVerificationDisabledForTesting: !1 }, this.frameworks = [], this.name = e.name, this.clientVersion = i.sdkClientVersion;
|
3678
3693
|
}
|
3679
3694
|
_initializeWithPersistence(e, t) {
|
3680
|
-
return t && (this._popupRedirectResolver =
|
3695
|
+
return t && (this._popupRedirectResolver = w(t)), this._initializationPromise = this.queue(async () => {
|
3681
3696
|
var r, i;
|
3682
|
-
if (!this._deleted && (this.persistenceManager = await
|
3697
|
+
if (!this._deleted && (this.persistenceManager = await V.create(this, e), !this._deleted)) {
|
3683
3698
|
if (!((r = this._popupRedirectResolver) === null || r === void 0) && r._shouldInitProactively)
|
3684
3699
|
try {
|
3685
3700
|
await this._popupRedirectResolver._initialize(this);
|
@@ -3710,7 +3725,7 @@ class qi {
|
|
3710
3725
|
}
|
3711
3726
|
async initializeCurrentUserFromIdToken(e) {
|
3712
3727
|
try {
|
3713
|
-
const t = await
|
3728
|
+
const t = await an(this, { idToken: e }), r = await b._fromGetAccountInfoResponse(this, t, e);
|
3714
3729
|
await this.directlySetCurrentUser(r);
|
3715
3730
|
} catch (t) {
|
3716
3731
|
console.warn("FirebaseServerApp could not login user with provided authIdToken: ", t), await this.directlySetCurrentUser(null);
|
@@ -3718,7 +3733,7 @@ class qi {
|
|
3718
3733
|
}
|
3719
3734
|
async initializeCurrentUser(e) {
|
3720
3735
|
var t;
|
3721
|
-
if (
|
3736
|
+
if (y(this.app)) {
|
3722
3737
|
const a = this.app.settings.authIdToken;
|
3723
3738
|
return a ? new Promise((c) => {
|
3724
3739
|
setTimeout(() => this.initializeCurrentUserFromIdToken(a).then(c, c));
|
@@ -3742,7 +3757,7 @@ class qi {
|
|
3742
3757
|
}
|
3743
3758
|
return i ? this.reloadAndSetCurrentUserOrClear(i) : this.directlySetCurrentUser(null);
|
3744
3759
|
}
|
3745
|
-
return
|
3760
|
+
return d(
|
3746
3761
|
this._popupRedirectResolver,
|
3747
3762
|
this,
|
3748
3763
|
"argument-error"
|
@@ -3760,7 +3775,7 @@ class qi {
|
|
3760
3775
|
}
|
3761
3776
|
async reloadAndSetCurrentUserOrClear(e) {
|
3762
3777
|
try {
|
3763
|
-
await
|
3778
|
+
await pe(e);
|
3764
3779
|
} catch (t) {
|
3765
3780
|
if ((t == null ? void 0 : t.code) !== "auth/network-request-failed")
|
3766
3781
|
return this.directlySetCurrentUser(null);
|
@@ -3768,16 +3783,16 @@ class qi {
|
|
3768
3783
|
return this.directlySetCurrentUser(e);
|
3769
3784
|
}
|
3770
3785
|
useDeviceLanguage() {
|
3771
|
-
this.languageCode =
|
3786
|
+
this.languageCode = Ni();
|
3772
3787
|
}
|
3773
3788
|
async _delete() {
|
3774
3789
|
this._deleted = !0;
|
3775
3790
|
}
|
3776
3791
|
async updateCurrentUser(e) {
|
3777
|
-
if (
|
3778
|
-
return Promise.reject(
|
3792
|
+
if (y(this.app))
|
3793
|
+
return Promise.reject(N(this));
|
3779
3794
|
const t = e ? z(e) : null;
|
3780
|
-
return t &&
|
3795
|
+
return t && d(
|
3781
3796
|
t.auth.config.apiKey === this.config.apiKey,
|
3782
3797
|
this,
|
3783
3798
|
"invalid-user-token"
|
@@ -3786,7 +3801,7 @@ class qi {
|
|
3786
3801
|
}
|
3787
3802
|
async _updateCurrentUser(e, t = !1) {
|
3788
3803
|
if (!this._deleted)
|
3789
|
-
return e &&
|
3804
|
+
return e && d(
|
3790
3805
|
this.tenantId === e.tenantId,
|
3791
3806
|
this,
|
3792
3807
|
"tenant-id-mismatch"
|
@@ -3796,15 +3811,15 @@ class qi {
|
|
3796
3811
|
});
|
3797
3812
|
}
|
3798
3813
|
async signOut() {
|
3799
|
-
return
|
3814
|
+
return y(this.app) ? Promise.reject(N(this)) : (await this.beforeStateQueue.runMiddleware(null), (this.redirectPersistenceManager || this._popupRedirectResolver) && await this._setRedirectUser(null), this._updateCurrentUser(
|
3800
3815
|
null,
|
3801
3816
|
/* skipBeforeStateCallbacks */
|
3802
3817
|
!0
|
3803
3818
|
));
|
3804
3819
|
}
|
3805
3820
|
setPersistence(e) {
|
3806
|
-
return
|
3807
|
-
await this.assertedPersistence.setPersistence(
|
3821
|
+
return y(this.app) ? Promise.reject(N(this)) : this.queue(async () => {
|
3822
|
+
await this.assertedPersistence.setPersistence(w(e));
|
3808
3823
|
});
|
3809
3824
|
}
|
3810
3825
|
_getRecaptchaConfig() {
|
@@ -3819,14 +3834,14 @@ class qi {
|
|
3819
3834
|
return this.tenantId === null ? this._projectPasswordPolicy : this._tenantPasswordPolicies[this.tenantId];
|
3820
3835
|
}
|
3821
3836
|
async _updatePasswordPolicy() {
|
3822
|
-
const e = await
|
3837
|
+
const e = await Ki(this), t = new Yi(e);
|
3823
3838
|
this.tenantId === null ? this._projectPasswordPolicy = t : this._tenantPasswordPolicies[this.tenantId] = t;
|
3824
3839
|
}
|
3825
3840
|
_getPersistence() {
|
3826
3841
|
return this.assertedPersistence.persistence.type;
|
3827
3842
|
}
|
3828
3843
|
_updateErrorMap(e) {
|
3829
|
-
this._errorFactory = new
|
3844
|
+
this._errorFactory = new Q("auth", "Firebase", e());
|
3830
3845
|
}
|
3831
3846
|
onAuthStateChanged(e, t, r) {
|
3832
3847
|
return this.registerStateListener(this.authStateSubscription, e, t, r);
|
@@ -3859,7 +3874,7 @@ class qi {
|
|
3859
3874
|
token: e,
|
3860
3875
|
idToken: t
|
3861
3876
|
};
|
3862
|
-
this.tenantId != null && (r.tenantId = this.tenantId), await
|
3877
|
+
this.tenantId != null && (r.tenantId = this.tenantId), await Wi(this, r);
|
3863
3878
|
}
|
3864
3879
|
}
|
3865
3880
|
toJSON() {
|
@@ -3877,15 +3892,15 @@ class qi {
|
|
3877
3892
|
}
|
3878
3893
|
async getOrInitRedirectPersistenceManager(e) {
|
3879
3894
|
if (!this.redirectPersistenceManager) {
|
3880
|
-
const t = e &&
|
3881
|
-
|
3895
|
+
const t = e && w(e) || this._popupRedirectResolver;
|
3896
|
+
d(
|
3882
3897
|
t,
|
3883
3898
|
this,
|
3884
3899
|
"argument-error"
|
3885
3900
|
/* AuthErrorCode.ARGUMENT_ERROR */
|
3886
|
-
), this.redirectPersistenceManager = await
|
3901
|
+
), this.redirectPersistenceManager = await V.create(
|
3887
3902
|
this,
|
3888
|
-
[
|
3903
|
+
[w(t._redirectPersistence)],
|
3889
3904
|
"redirectUser"
|
3890
3905
|
/* KeyName.REDIRECT_USER */
|
3891
3906
|
), this.redirectUser = await this.redirectPersistenceManager.getCurrentUser();
|
@@ -3933,7 +3948,7 @@ class qi {
|
|
3933
3948
|
const s = typeof t == "function" ? t : t.next.bind(t);
|
3934
3949
|
let a = !1;
|
3935
3950
|
const c = this._isInitialized ? Promise.resolve() : this._initializationPromise;
|
3936
|
-
if (
|
3951
|
+
if (d(
|
3937
3952
|
c,
|
3938
3953
|
this,
|
3939
3954
|
"internal-error"
|
@@ -3964,7 +3979,7 @@ class qi {
|
|
3964
3979
|
return this.operations = this.operations.then(e, e), this.operations;
|
3965
3980
|
}
|
3966
3981
|
get assertedPersistence() {
|
3967
|
-
return
|
3982
|
+
return d(
|
3968
3983
|
this.persistenceManager,
|
3969
3984
|
this,
|
3970
3985
|
"internal-error"
|
@@ -3972,7 +3987,7 @@ class qi {
|
|
3972
3987
|
), this.persistenceManager;
|
3973
3988
|
}
|
3974
3989
|
_logFramework(e) {
|
3975
|
-
!e || this.frameworks.includes(e) || (this.frameworks.push(e), this.frameworks.sort(), this.clientVersion =
|
3990
|
+
!e || this.frameworks.includes(e) || (this.frameworks.push(e), this.frameworks.sort(), this.clientVersion = _n(this.config.clientPlatform, this._getFrameworks()));
|
3976
3991
|
}
|
3977
3992
|
_getFrameworks() {
|
3978
3993
|
return this.frameworks;
|
@@ -4002,10 +4017,10 @@ class qi {
|
|
4002
4017
|
async _getAppCheckToken() {
|
4003
4018
|
var e;
|
4004
4019
|
const t = await ((e = this.appCheckServiceProvider.getImmediate({ optional: !0 })) === null || e === void 0 ? void 0 : e.getToken());
|
4005
|
-
return t != null && t.error &&
|
4020
|
+
return t != null && t.error && Pi(`Error while retrieving App Check token: ${t.error}`), t == null ? void 0 : t.token;
|
4006
4021
|
}
|
4007
4022
|
}
|
4008
|
-
function
|
4023
|
+
function ye(n) {
|
4009
4024
|
return z(n);
|
4010
4025
|
}
|
4011
4026
|
class wt {
|
@@ -4013,7 +4028,7 @@ class wt {
|
|
4013
4028
|
this.auth = e, this.observer = null, this.addObserver = gr((t) => this.observer = t);
|
4014
4029
|
}
|
4015
4030
|
get next() {
|
4016
|
-
return
|
4031
|
+
return d(
|
4017
4032
|
this.observer,
|
4018
4033
|
this.auth,
|
4019
4034
|
"internal-error"
|
@@ -4037,7 +4052,7 @@ class wt {
|
|
4037
4052
|
* See the License for the specific language governing permissions and
|
4038
4053
|
* limitations under the License.
|
4039
4054
|
*/
|
4040
|
-
let
|
4055
|
+
let Qe = {
|
4041
4056
|
async loadJS() {
|
4042
4057
|
throw new Error("Unable to load external scripts");
|
4043
4058
|
},
|
@@ -4046,15 +4061,15 @@ let qe = {
|
|
4046
4061
|
gapiScript: ""
|
4047
4062
|
};
|
4048
4063
|
function Qi(n) {
|
4049
|
-
|
4064
|
+
Qe = n;
|
4050
4065
|
}
|
4051
|
-
function
|
4052
|
-
return
|
4066
|
+
function Zi(n) {
|
4067
|
+
return Qe.loadJS(n);
|
4053
4068
|
}
|
4054
|
-
function
|
4055
|
-
return
|
4069
|
+
function es() {
|
4070
|
+
return Qe.gapiScript;
|
4056
4071
|
}
|
4057
|
-
function
|
4072
|
+
function ts(n) {
|
4058
4073
|
return `__${n}${Math.floor(Math.random() * 1e6)}`;
|
4059
4074
|
}
|
4060
4075
|
/**
|
@@ -4073,11 +4088,11 @@ function ns(n) {
|
|
4073
4088
|
* See the License for the specific language governing permissions and
|
4074
4089
|
* limitations under the License.
|
4075
4090
|
*/
|
4076
|
-
function
|
4077
|
-
const t =
|
4091
|
+
function ns(n, e) {
|
4092
|
+
const t = Kt(n, "auth");
|
4078
4093
|
if (t.isInitialized()) {
|
4079
4094
|
const i = t.getImmediate(), s = t.getOptions();
|
4080
|
-
if (
|
4095
|
+
if (de(s, e ?? {}))
|
4081
4096
|
return i;
|
4082
4097
|
T(
|
4083
4098
|
i,
|
@@ -4087,55 +4102,55 @@ function rs(n, e) {
|
|
4087
4102
|
}
|
4088
4103
|
return t.initialize({ options: e });
|
4089
4104
|
}
|
4090
|
-
function
|
4091
|
-
const t = (e == null ? void 0 : e.persistence) || [], r = (Array.isArray(t) ? t : [t]).map(
|
4105
|
+
function rs(n, e) {
|
4106
|
+
const t = (e == null ? void 0 : e.persistence) || [], r = (Array.isArray(t) ? t : [t]).map(w);
|
4092
4107
|
e != null && e.errorMap && n._updateErrorMap(e.errorMap), n._initializeWithPersistence(r, e == null ? void 0 : e.popupRedirectResolver);
|
4093
4108
|
}
|
4094
|
-
function
|
4095
|
-
const r =
|
4096
|
-
|
4109
|
+
function is(n, e, t) {
|
4110
|
+
const r = ye(n);
|
4111
|
+
d(
|
4097
4112
|
r._canInitEmulator,
|
4098
4113
|
r,
|
4099
4114
|
"emulator-config-failed"
|
4100
4115
|
/* AuthErrorCode.EMULATOR_CONFIG_FAILED */
|
4101
|
-
),
|
4116
|
+
), d(
|
4102
4117
|
/^https?:\/\//.test(e),
|
4103
4118
|
r,
|
4104
4119
|
"invalid-emulator-scheme"
|
4105
4120
|
/* AuthErrorCode.INVALID_EMULATOR_SCHEME */
|
4106
4121
|
);
|
4107
|
-
const i = !1, s = vn(e), { host: a, port: c } =
|
4122
|
+
const i = !1, s = vn(e), { host: a, port: c } = ss(e), o = c === null ? "" : `:${c}`;
|
4108
4123
|
r.config.emulator = { url: `${s}//${a}${o}/` }, r.settings.appVerificationDisabledForTesting = !0, r.emulatorConfig = Object.freeze({
|
4109
4124
|
host: a,
|
4110
4125
|
port: c,
|
4111
4126
|
protocol: s.replace(":", ""),
|
4112
4127
|
options: Object.freeze({ disableWarnings: i })
|
4113
|
-
}),
|
4128
|
+
}), as();
|
4114
4129
|
}
|
4115
4130
|
function vn(n) {
|
4116
4131
|
const e = n.indexOf(":");
|
4117
4132
|
return e < 0 ? "" : n.substr(0, e + 1);
|
4118
4133
|
}
|
4119
|
-
function
|
4134
|
+
function ss(n) {
|
4120
4135
|
const e = vn(n), t = /(\/\/)?([^?#/]+)/.exec(n.substr(e.length));
|
4121
4136
|
if (!t)
|
4122
4137
|
return { host: "", port: null };
|
4123
4138
|
const r = t[2].split("@").pop() || "", i = /^(\[[^\]]+\])(:|$)/.exec(r);
|
4124
4139
|
if (i) {
|
4125
4140
|
const s = i[1];
|
4126
|
-
return { host: s, port:
|
4141
|
+
return { host: s, port: Et(r.substr(s.length + 1)) };
|
4127
4142
|
} else {
|
4128
4143
|
const [s, a] = r.split(":");
|
4129
|
-
return { host: s, port:
|
4144
|
+
return { host: s, port: Et(a) };
|
4130
4145
|
}
|
4131
4146
|
}
|
4132
|
-
function
|
4147
|
+
function Et(n) {
|
4133
4148
|
if (!n)
|
4134
4149
|
return null;
|
4135
4150
|
const e = Number(n);
|
4136
4151
|
return isNaN(e) ? null : e;
|
4137
4152
|
}
|
4138
|
-
function
|
4153
|
+
function as() {
|
4139
4154
|
function n() {
|
4140
4155
|
const e = document.createElement("p"), t = e.style;
|
4141
4156
|
e.innerText = "Running in emulator mode. Do not use with production credentials.", t.position = "fixed", t.width = "100%", t.backgroundColor = "#ffffff", t.border = ".1em solid #000000", t.color = "#b50000", t.bottom = "0px", t.left = "0px", t.margin = "0px", t.zIndex = "10000", t.textAlign = "center", e.classList.add("firebase-emulator-warning"), document.body.appendChild(e);
|
@@ -4169,19 +4184,19 @@ class yn {
|
|
4169
4184
|
* @returns a JSON-serializable representation of this object.
|
4170
4185
|
*/
|
4171
4186
|
toJSON() {
|
4172
|
-
return
|
4187
|
+
return I("not implemented");
|
4173
4188
|
}
|
4174
4189
|
/** @internal */
|
4175
4190
|
_getIdTokenResponse(e) {
|
4176
|
-
return
|
4191
|
+
return I("not implemented");
|
4177
4192
|
}
|
4178
4193
|
/** @internal */
|
4179
4194
|
_linkToIdToken(e, t) {
|
4180
|
-
return
|
4195
|
+
return I("not implemented");
|
4181
4196
|
}
|
4182
4197
|
/** @internal */
|
4183
4198
|
_getReauthenticationResolver(e) {
|
4184
|
-
return
|
4199
|
+
return I("not implemented");
|
4185
4200
|
}
|
4186
4201
|
}
|
4187
4202
|
/**
|
@@ -4200,8 +4215,8 @@ class yn {
|
|
4200
4215
|
* See the License for the specific language governing permissions and
|
4201
4216
|
* limitations under the License.
|
4202
4217
|
*/
|
4203
|
-
async function
|
4204
|
-
return
|
4218
|
+
async function j(n, e) {
|
4219
|
+
return rn(n, "POST", "/v1/accounts:signInWithIdp", ve(n, e));
|
4205
4220
|
}
|
4206
4221
|
/**
|
4207
4222
|
* @license
|
@@ -4219,7 +4234,7 @@ async function V(n, e) {
|
|
4219
4234
|
* See the License for the specific language governing permissions and
|
4220
4235
|
* limitations under the License.
|
4221
4236
|
*/
|
4222
|
-
const
|
4237
|
+
const os = "http://localhost";
|
4223
4238
|
class U extends yn {
|
4224
4239
|
constructor() {
|
4225
4240
|
super(...arguments), this.pendingToken = null;
|
@@ -4254,7 +4269,7 @@ class U extends yn {
|
|
4254
4269
|
* @returns If the JSON input does not represent an {@link AuthCredential}, null is returned.
|
4255
4270
|
*/
|
4256
4271
|
static fromJSON(e) {
|
4257
|
-
const t = typeof e == "string" ? JSON.parse(e) : e, { providerId: r, signInMethod: i } = t, s =
|
4272
|
+
const t = typeof e == "string" ? JSON.parse(e) : e, { providerId: r, signInMethod: i } = t, s = qe(t, ["providerId", "signInMethod"]);
|
4258
4273
|
if (!r || !i)
|
4259
4274
|
return null;
|
4260
4275
|
const a = new U(r, i);
|
@@ -4263,28 +4278,28 @@ class U extends yn {
|
|
4263
4278
|
/** @internal */
|
4264
4279
|
_getIdTokenResponse(e) {
|
4265
4280
|
const t = this.buildRequest();
|
4266
|
-
return
|
4281
|
+
return j(e, t);
|
4267
4282
|
}
|
4268
4283
|
/** @internal */
|
4269
4284
|
_linkToIdToken(e, t) {
|
4270
4285
|
const r = this.buildRequest();
|
4271
|
-
return r.idToken = t,
|
4286
|
+
return r.idToken = t, j(e, r);
|
4272
4287
|
}
|
4273
4288
|
/** @internal */
|
4274
4289
|
_getReauthenticationResolver(e) {
|
4275
4290
|
const t = this.buildRequest();
|
4276
|
-
return t.autoCreate = !1,
|
4291
|
+
return t.autoCreate = !1, j(e, t);
|
4277
4292
|
}
|
4278
4293
|
buildRequest() {
|
4279
4294
|
const e = {
|
4280
|
-
requestUri:
|
4295
|
+
requestUri: os,
|
4281
4296
|
returnSecureToken: !0
|
4282
4297
|
};
|
4283
4298
|
if (this.pendingToken)
|
4284
4299
|
e.pendingToken = this.pendingToken;
|
4285
4300
|
else {
|
4286
4301
|
const t = {};
|
4287
|
-
this.idToken && (t.id_token = this.idToken), this.accessToken && (t.access_token = this.accessToken), this.secret && (t.oauth_token_secret = this.secret), t.providerId = this.providerId, this.nonce && !this.pendingToken && (t.nonce = this.nonce), e.postBody =
|
4302
|
+
this.idToken && (t.id_token = this.idToken), this.accessToken && (t.access_token = this.accessToken), this.secret && (t.oauth_token_secret = this.secret), t.providerId = this.providerId, this.nonce && !this.pendingToken && (t.nonce = this.nonce), e.postBody = Z(t);
|
4288
4303
|
}
|
4289
4304
|
return e;
|
4290
4305
|
}
|
@@ -4305,7 +4320,7 @@ class U extends yn {
|
|
4305
4320
|
* See the License for the specific language governing permissions and
|
4306
4321
|
* limitations under the License.
|
4307
4322
|
*/
|
4308
|
-
class
|
4323
|
+
class In {
|
4309
4324
|
/**
|
4310
4325
|
* Constructor for generic OAuth providers.
|
4311
4326
|
*
|
@@ -4358,7 +4373,7 @@ class bn {
|
|
4358
4373
|
* See the License for the specific language governing permissions and
|
4359
4374
|
* limitations under the License.
|
4360
4375
|
*/
|
4361
|
-
class ne extends
|
4376
|
+
class ne extends In {
|
4362
4377
|
constructor() {
|
4363
4378
|
super(...arguments), this.scopes = [];
|
4364
4379
|
}
|
@@ -4393,7 +4408,7 @@ class ne extends bn {
|
|
4393
4408
|
* See the License for the specific language governing permissions and
|
4394
4409
|
* limitations under the License.
|
4395
4410
|
*/
|
4396
|
-
class
|
4411
|
+
class A extends ne {
|
4397
4412
|
constructor() {
|
4398
4413
|
super(
|
4399
4414
|
"facebook.com"
|
@@ -4414,8 +4429,8 @@ class S extends ne {
|
|
4414
4429
|
*/
|
4415
4430
|
static credential(e) {
|
4416
4431
|
return U._fromParams({
|
4417
|
-
providerId:
|
4418
|
-
signInMethod:
|
4432
|
+
providerId: A.PROVIDER_ID,
|
4433
|
+
signInMethod: A.FACEBOOK_SIGN_IN_METHOD,
|
4419
4434
|
accessToken: e
|
4420
4435
|
});
|
4421
4436
|
}
|
@@ -4425,7 +4440,7 @@ class S extends ne {
|
|
4425
4440
|
* @param userCredential - The user credential.
|
4426
4441
|
*/
|
4427
4442
|
static credentialFromResult(e) {
|
4428
|
-
return
|
4443
|
+
return A.credentialFromTaggedObject(e);
|
4429
4444
|
}
|
4430
4445
|
/**
|
4431
4446
|
* Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was
|
@@ -4434,20 +4449,20 @@ class S extends ne {
|
|
4434
4449
|
* @param userCredential - The user credential.
|
4435
4450
|
*/
|
4436
4451
|
static credentialFromError(e) {
|
4437
|
-
return
|
4452
|
+
return A.credentialFromTaggedObject(e.customData || {});
|
4438
4453
|
}
|
4439
4454
|
static credentialFromTaggedObject({ _tokenResponse: e }) {
|
4440
4455
|
if (!e || !("oauthAccessToken" in e) || !e.oauthAccessToken)
|
4441
4456
|
return null;
|
4442
4457
|
try {
|
4443
|
-
return
|
4458
|
+
return A.credential(e.oauthAccessToken);
|
4444
4459
|
} catch {
|
4445
4460
|
return null;
|
4446
4461
|
}
|
4447
4462
|
}
|
4448
4463
|
}
|
4449
|
-
|
4450
|
-
|
4464
|
+
A.FACEBOOK_SIGN_IN_METHOD = "facebook.com";
|
4465
|
+
A.PROVIDER_ID = "facebook.com";
|
4451
4466
|
/**
|
4452
4467
|
* @license
|
4453
4468
|
* Copyright 2020 Google LLC
|
@@ -4464,7 +4479,7 @@ S.PROVIDER_ID = "facebook.com";
|
|
4464
4479
|
* See the License for the specific language governing permissions and
|
4465
4480
|
* limitations under the License.
|
4466
4481
|
*/
|
4467
|
-
class
|
4482
|
+
class C extends ne {
|
4468
4483
|
constructor() {
|
4469
4484
|
super(
|
4470
4485
|
"google.com"
|
@@ -4486,8 +4501,8 @@ class A extends ne {
|
|
4486
4501
|
*/
|
4487
4502
|
static credential(e, t) {
|
4488
4503
|
return U._fromParams({
|
4489
|
-
providerId:
|
4490
|
-
signInMethod:
|
4504
|
+
providerId: C.PROVIDER_ID,
|
4505
|
+
signInMethod: C.GOOGLE_SIGN_IN_METHOD,
|
4491
4506
|
idToken: e,
|
4492
4507
|
accessToken: t
|
4493
4508
|
});
|
@@ -4498,7 +4513,7 @@ class A extends ne {
|
|
4498
4513
|
* @param userCredential - The user credential.
|
4499
4514
|
*/
|
4500
4515
|
static credentialFromResult(e) {
|
4501
|
-
return
|
4516
|
+
return C.credentialFromTaggedObject(e);
|
4502
4517
|
}
|
4503
4518
|
/**
|
4504
4519
|
* Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was
|
@@ -4507,7 +4522,7 @@ class A extends ne {
|
|
4507
4522
|
* @param userCredential - The user credential.
|
4508
4523
|
*/
|
4509
4524
|
static credentialFromError(e) {
|
4510
|
-
return
|
4525
|
+
return C.credentialFromTaggedObject(e.customData || {});
|
4511
4526
|
}
|
4512
4527
|
static credentialFromTaggedObject({ _tokenResponse: e }) {
|
4513
4528
|
if (!e)
|
@@ -4516,14 +4531,14 @@ class A extends ne {
|
|
4516
4531
|
if (!t && !r)
|
4517
4532
|
return null;
|
4518
4533
|
try {
|
4519
|
-
return
|
4534
|
+
return C.credential(t, r);
|
4520
4535
|
} catch {
|
4521
4536
|
return null;
|
4522
4537
|
}
|
4523
4538
|
}
|
4524
4539
|
}
|
4525
|
-
|
4526
|
-
|
4540
|
+
C.GOOGLE_SIGN_IN_METHOD = "google.com";
|
4541
|
+
C.PROVIDER_ID = "google.com";
|
4527
4542
|
/**
|
4528
4543
|
* @license
|
4529
4544
|
* Copyright 2020 Google LLC
|
@@ -4540,7 +4555,7 @@ A.PROVIDER_ID = "google.com";
|
|
4540
4555
|
* See the License for the specific language governing permissions and
|
4541
4556
|
* limitations under the License.
|
4542
4557
|
*/
|
4543
|
-
class
|
4558
|
+
class R extends ne {
|
4544
4559
|
constructor() {
|
4545
4560
|
super(
|
4546
4561
|
"github.com"
|
@@ -4554,8 +4569,8 @@ class N extends ne {
|
|
4554
4569
|
*/
|
4555
4570
|
static credential(e) {
|
4556
4571
|
return U._fromParams({
|
4557
|
-
providerId:
|
4558
|
-
signInMethod:
|
4572
|
+
providerId: R.PROVIDER_ID,
|
4573
|
+
signInMethod: R.GITHUB_SIGN_IN_METHOD,
|
4559
4574
|
accessToken: e
|
4560
4575
|
});
|
4561
4576
|
}
|
@@ -4565,7 +4580,7 @@ class N extends ne {
|
|
4565
4580
|
* @param userCredential - The user credential.
|
4566
4581
|
*/
|
4567
4582
|
static credentialFromResult(e) {
|
4568
|
-
return
|
4583
|
+
return R.credentialFromTaggedObject(e);
|
4569
4584
|
}
|
4570
4585
|
/**
|
4571
4586
|
* Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was
|
@@ -4574,20 +4589,20 @@ class N extends ne {
|
|
4574
4589
|
* @param userCredential - The user credential.
|
4575
4590
|
*/
|
4576
4591
|
static credentialFromError(e) {
|
4577
|
-
return
|
4592
|
+
return R.credentialFromTaggedObject(e.customData || {});
|
4578
4593
|
}
|
4579
4594
|
static credentialFromTaggedObject({ _tokenResponse: e }) {
|
4580
4595
|
if (!e || !("oauthAccessToken" in e) || !e.oauthAccessToken)
|
4581
4596
|
return null;
|
4582
4597
|
try {
|
4583
|
-
return
|
4598
|
+
return R.credential(e.oauthAccessToken);
|
4584
4599
|
} catch {
|
4585
4600
|
return null;
|
4586
4601
|
}
|
4587
4602
|
}
|
4588
4603
|
}
|
4589
|
-
|
4590
|
-
|
4604
|
+
R.GITHUB_SIGN_IN_METHOD = "github.com";
|
4605
|
+
R.PROVIDER_ID = "github.com";
|
4591
4606
|
/**
|
4592
4607
|
* @license
|
4593
4608
|
* Copyright 2020 Google LLC
|
@@ -4604,7 +4619,7 @@ N.PROVIDER_ID = "github.com";
|
|
4604
4619
|
* See the License for the specific language governing permissions and
|
4605
4620
|
* limitations under the License.
|
4606
4621
|
*/
|
4607
|
-
class
|
4622
|
+
class P extends ne {
|
4608
4623
|
constructor() {
|
4609
4624
|
super(
|
4610
4625
|
"twitter.com"
|
@@ -4619,8 +4634,8 @@ class C extends ne {
|
|
4619
4634
|
*/
|
4620
4635
|
static credential(e, t) {
|
4621
4636
|
return U._fromParams({
|
4622
|
-
providerId:
|
4623
|
-
signInMethod:
|
4637
|
+
providerId: P.PROVIDER_ID,
|
4638
|
+
signInMethod: P.TWITTER_SIGN_IN_METHOD,
|
4624
4639
|
oauthToken: e,
|
4625
4640
|
oauthTokenSecret: t
|
4626
4641
|
});
|
@@ -4631,7 +4646,7 @@ class C extends ne {
|
|
4631
4646
|
* @param userCredential - The user credential.
|
4632
4647
|
*/
|
4633
4648
|
static credentialFromResult(e) {
|
4634
|
-
return
|
4649
|
+
return P.credentialFromTaggedObject(e);
|
4635
4650
|
}
|
4636
4651
|
/**
|
4637
4652
|
* Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was
|
@@ -4640,7 +4655,7 @@ class C extends ne {
|
|
4640
4655
|
* @param userCredential - The user credential.
|
4641
4656
|
*/
|
4642
4657
|
static credentialFromError(e) {
|
4643
|
-
return
|
4658
|
+
return P.credentialFromTaggedObject(e.customData || {});
|
4644
4659
|
}
|
4645
4660
|
static credentialFromTaggedObject({ _tokenResponse: e }) {
|
4646
4661
|
if (!e)
|
@@ -4649,14 +4664,14 @@ class C extends ne {
|
|
4649
4664
|
if (!t || !r)
|
4650
4665
|
return null;
|
4651
4666
|
try {
|
4652
|
-
return
|
4667
|
+
return P.credential(t, r);
|
4653
4668
|
} catch {
|
4654
4669
|
return null;
|
4655
4670
|
}
|
4656
4671
|
}
|
4657
4672
|
}
|
4658
|
-
|
4659
|
-
|
4673
|
+
P.TWITTER_SIGN_IN_METHOD = "twitter.com";
|
4674
|
+
P.PROVIDER_ID = "twitter.com";
|
4660
4675
|
/**
|
4661
4676
|
* @license
|
4662
4677
|
* Copyright 2020 Google LLC
|
@@ -4673,13 +4688,13 @@ C.PROVIDER_ID = "twitter.com";
|
|
4673
4688
|
* See the License for the specific language governing permissions and
|
4674
4689
|
* limitations under the License.
|
4675
4690
|
*/
|
4676
|
-
class
|
4691
|
+
class x {
|
4677
4692
|
constructor(e) {
|
4678
4693
|
this.user = e.user, this.providerId = e.providerId, this._tokenResponse = e._tokenResponse, this.operationType = e.operationType;
|
4679
4694
|
}
|
4680
4695
|
static async _fromIdTokenResponse(e, t, r, i = !1) {
|
4681
|
-
const s = await b._fromIdTokenResponse(e, r, i), a =
|
4682
|
-
return new
|
4696
|
+
const s = await b._fromIdTokenResponse(e, r, i), a = Tt(r);
|
4697
|
+
return new x({
|
4683
4698
|
user: s,
|
4684
4699
|
providerId: a,
|
4685
4700
|
_tokenResponse: r,
|
@@ -4692,8 +4707,8 @@ class j {
|
|
4692
4707
|
/* reload */
|
4693
4708
|
!0
|
4694
4709
|
);
|
4695
|
-
const i =
|
4696
|
-
return new
|
4710
|
+
const i = Tt(r);
|
4711
|
+
return new x({
|
4697
4712
|
user: e,
|
4698
4713
|
providerId: i,
|
4699
4714
|
_tokenResponse: r,
|
@@ -4701,7 +4716,7 @@ class j {
|
|
4701
4716
|
});
|
4702
4717
|
}
|
4703
4718
|
}
|
4704
|
-
function
|
4719
|
+
function Tt(n) {
|
4705
4720
|
return n.providerId ? n.providerId : "phoneNumber" in n ? "phone" : null;
|
4706
4721
|
}
|
4707
4722
|
/**
|
@@ -4720,10 +4735,10 @@ function kt(n) {
|
|
4720
4735
|
* See the License for the specific language governing permissions and
|
4721
4736
|
* limitations under the License.
|
4722
4737
|
*/
|
4723
|
-
class
|
4738
|
+
class me extends L {
|
4724
4739
|
constructor(e, t, r, i) {
|
4725
4740
|
var s;
|
4726
|
-
super(t.code, t.message), this.operationType = r, this.user = i, Object.setPrototypeOf(this,
|
4741
|
+
super(t.code, t.message), this.operationType = r, this.user = i, Object.setPrototypeOf(this, me.prototype), this.customData = {
|
4727
4742
|
appName: e.name,
|
4728
4743
|
tenantId: (s = e.tenantId) !== null && s !== void 0 ? s : void 0,
|
4729
4744
|
_serverResponse: t.customData._serverResponse,
|
@@ -4731,17 +4746,17 @@ class fe extends M {
|
|
4731
4746
|
};
|
4732
4747
|
}
|
4733
4748
|
static _fromErrorAndOperation(e, t, r, i) {
|
4734
|
-
return new
|
4749
|
+
return new me(e, t, r, i);
|
4735
4750
|
}
|
4736
4751
|
}
|
4737
|
-
function
|
4752
|
+
function bn(n, e, t, r) {
|
4738
4753
|
return (e === "reauthenticate" ? t._getReauthenticationResolver(n) : t._getIdTokenResponse(n)).catch((s) => {
|
4739
|
-
throw s.code === "auth/multi-factor-auth-required" ?
|
4754
|
+
throw s.code === "auth/multi-factor-auth-required" ? me._fromErrorAndOperation(n, s, e, r) : s;
|
4740
4755
|
});
|
4741
4756
|
}
|
4742
|
-
async function
|
4743
|
-
const r = await
|
4744
|
-
return
|
4757
|
+
async function cs(n, e, t = !1) {
|
4758
|
+
const r = await X(n, e._linkToIdToken(n.auth, await n.getIdToken()), t);
|
4759
|
+
return x._forOperation(n, "link", r);
|
4745
4760
|
}
|
4746
4761
|
/**
|
4747
4762
|
* @license
|
@@ -4759,33 +4774,33 @@ async function ls(n, e, t = !1) {
|
|
4759
4774
|
* See the License for the specific language governing permissions and
|
4760
4775
|
* limitations under the License.
|
4761
4776
|
*/
|
4762
|
-
async function
|
4777
|
+
async function ls(n, e, t = !1) {
|
4763
4778
|
const { auth: r } = n;
|
4764
|
-
if (
|
4765
|
-
return Promise.reject(
|
4779
|
+
if (y(r.app))
|
4780
|
+
return Promise.reject(N(r));
|
4766
4781
|
const i = "reauthenticate";
|
4767
4782
|
try {
|
4768
|
-
const s = await
|
4769
|
-
|
4783
|
+
const s = await X(n, bn(r, i, e, n), t);
|
4784
|
+
d(
|
4770
4785
|
s.idToken,
|
4771
4786
|
r,
|
4772
4787
|
"internal-error"
|
4773
4788
|
/* AuthErrorCode.INTERNAL_ERROR */
|
4774
4789
|
);
|
4775
|
-
const a =
|
4776
|
-
|
4790
|
+
const a = Ye(s.idToken);
|
4791
|
+
d(
|
4777
4792
|
a,
|
4778
4793
|
r,
|
4779
4794
|
"internal-error"
|
4780
4795
|
/* AuthErrorCode.INTERNAL_ERROR */
|
4781
4796
|
);
|
4782
4797
|
const { sub: c } = a;
|
4783
|
-
return
|
4798
|
+
return d(
|
4784
4799
|
n.uid === c,
|
4785
4800
|
r,
|
4786
4801
|
"user-mismatch"
|
4787
4802
|
/* AuthErrorCode.USER_MISMATCH */
|
4788
|
-
),
|
4803
|
+
), x._forOperation(n, i, s);
|
4789
4804
|
} catch (s) {
|
4790
4805
|
throw (s == null ? void 0 : s.code) === "auth/user-not-found" && T(
|
4791
4806
|
r,
|
@@ -4811,9 +4826,9 @@ async function ds(n, e, t = !1) {
|
|
4811
4826
|
* limitations under the License.
|
4812
4827
|
*/
|
4813
4828
|
async function us(n, e, t = !1) {
|
4814
|
-
if (
|
4815
|
-
return Promise.reject(
|
4816
|
-
const r = "signIn", i = await
|
4829
|
+
if (y(n.app))
|
4830
|
+
return Promise.reject(N(n));
|
4831
|
+
const r = "signIn", i = await bn(n, r, e), s = await x._fromIdTokenResponse(n, r, i);
|
4817
4832
|
return t || await n._updateCurrentUser(s.user), s;
|
4818
4833
|
}
|
4819
4834
|
/**
|
@@ -4832,8 +4847,8 @@ async function us(n, e, t = !1) {
|
|
4832
4847
|
* See the License for the specific language governing permissions and
|
4833
4848
|
* limitations under the License.
|
4834
4849
|
*/
|
4835
|
-
async function
|
4836
|
-
return
|
4850
|
+
async function ds(n, e) {
|
4851
|
+
return rn(n, "POST", "/v1/accounts:signInWithCustomToken", ve(n, e));
|
4837
4852
|
}
|
4838
4853
|
/**
|
4839
4854
|
* @license
|
@@ -4851,22 +4866,22 @@ async function hs(n, e) {
|
|
4851
4866
|
* See the License for the specific language governing permissions and
|
4852
4867
|
* limitations under the License.
|
4853
4868
|
*/
|
4854
|
-
async function
|
4855
|
-
if (
|
4856
|
-
return Promise.reject(
|
4857
|
-
const t =
|
4869
|
+
async function hs(n, e) {
|
4870
|
+
if (y(n.app))
|
4871
|
+
return Promise.reject(N(n));
|
4872
|
+
const t = ye(n), r = await ds(t, {
|
4858
4873
|
token: e,
|
4859
4874
|
returnSecureToken: !0
|
4860
|
-
}), i = await
|
4875
|
+
}), i = await x._fromIdTokenResponse(t, "signIn", r);
|
4861
4876
|
return await t._updateCurrentUser(i.user), i;
|
4862
4877
|
}
|
4863
|
-
function
|
4878
|
+
function fs(n, e, t, r) {
|
4864
4879
|
return z(n).onIdTokenChanged(e, t, r);
|
4865
4880
|
}
|
4866
|
-
function
|
4881
|
+
function ps(n, e, t) {
|
4867
4882
|
return z(n).beforeAuthStateChanged(e, t);
|
4868
4883
|
}
|
4869
|
-
const
|
4884
|
+
const ge = "__sak";
|
4870
4885
|
/**
|
4871
4886
|
* @license
|
4872
4887
|
* Copyright 2019 Google LLC
|
@@ -4889,7 +4904,7 @@ class wn {
|
|
4889
4904
|
}
|
4890
4905
|
_isAvailable() {
|
4891
4906
|
try {
|
4892
|
-
return this.storage ? (this.storage.setItem(
|
4907
|
+
return this.storage ? (this.storage.setItem(ge, "1"), this.storage.removeItem(ge), Promise.resolve(!0)) : Promise.resolve(!1);
|
4893
4908
|
} catch {
|
4894
4909
|
return Promise.resolve(!1);
|
4895
4910
|
}
|
@@ -4924,8 +4939,8 @@ class wn {
|
|
4924
4939
|
* See the License for the specific language governing permissions and
|
4925
4940
|
* limitations under the License.
|
4926
4941
|
*/
|
4927
|
-
const
|
4928
|
-
class
|
4942
|
+
const ms = 1e3, gs = 10;
|
4943
|
+
class En extends wn {
|
4929
4944
|
constructor() {
|
4930
4945
|
super(
|
4931
4946
|
() => window.localStorage,
|
@@ -4952,7 +4967,7 @@ class Tn extends wn {
|
|
4952
4967
|
const a = this.storage.getItem(r);
|
4953
4968
|
!t && this.localCache[r] === a || this.notifyListeners(r, a);
|
4954
4969
|
}, s = this.storage.getItem(r);
|
4955
|
-
|
4970
|
+
Gi() && s !== e.newValue && e.newValue !== e.oldValue ? setTimeout(i, gs) : i();
|
4956
4971
|
}
|
4957
4972
|
notifyListeners(e, t) {
|
4958
4973
|
this.localCache[e] = t;
|
@@ -4974,7 +4989,7 @@ class Tn extends wn {
|
|
4974
4989
|
!0
|
4975
4990
|
);
|
4976
4991
|
});
|
4977
|
-
},
|
4992
|
+
}, ms);
|
4978
4993
|
}
|
4979
4994
|
stopPolling() {
|
4980
4995
|
this.pollTimer && (clearInterval(this.pollTimer), this.pollTimer = null);
|
@@ -5003,8 +5018,8 @@ class Tn extends wn {
|
|
5003
5018
|
await super._remove(e), delete this.localCache[e];
|
5004
5019
|
}
|
5005
5020
|
}
|
5006
|
-
|
5007
|
-
const
|
5021
|
+
En.type = "LOCAL";
|
5022
|
+
const _s = En;
|
5008
5023
|
/**
|
5009
5024
|
* @license
|
5010
5025
|
* Copyright 2020 Google LLC
|
@@ -5021,7 +5036,7 @@ const Is = Tn;
|
|
5021
5036
|
* See the License for the specific language governing permissions and
|
5022
5037
|
* limitations under the License.
|
5023
5038
|
*/
|
5024
|
-
class
|
5039
|
+
class Tn extends wn {
|
5025
5040
|
constructor() {
|
5026
5041
|
super(
|
5027
5042
|
() => window.sessionStorage,
|
@@ -5034,8 +5049,8 @@ class kn extends wn {
|
|
5034
5049
|
_removeListener(e, t) {
|
5035
5050
|
}
|
5036
5051
|
}
|
5037
|
-
|
5038
|
-
const
|
5052
|
+
Tn.type = "SESSION";
|
5053
|
+
const Sn = Tn;
|
5039
5054
|
/**
|
5040
5055
|
* @license
|
5041
5056
|
* Copyright 2019 Google LLC
|
@@ -5083,7 +5098,7 @@ function vs(n) {
|
|
5083
5098
|
* See the License for the specific language governing permissions and
|
5084
5099
|
* limitations under the License.
|
5085
5100
|
*/
|
5086
|
-
class
|
5101
|
+
class Ie {
|
5087
5102
|
constructor(e) {
|
5088
5103
|
this.eventTarget = e, this.handlersMap = {}, this.boundEventHandler = this.handleEvent.bind(this);
|
5089
5104
|
}
|
@@ -5097,7 +5112,7 @@ class ye {
|
|
5097
5112
|
const t = this.receivers.find((i) => i.isListeningto(e));
|
5098
5113
|
if (t)
|
5099
5114
|
return t;
|
5100
|
-
const r = new
|
5115
|
+
const r = new Ie(e);
|
5101
5116
|
return this.receivers.push(r), r;
|
5102
5117
|
}
|
5103
5118
|
isListeningto(e) {
|
@@ -5151,7 +5166,7 @@ class ye {
|
|
5151
5166
|
this.handlersMap[e] && t && this.handlersMap[e].delete(t), (!t || this.handlersMap[e].size === 0) && delete this.handlersMap[e], Object.keys(this.handlersMap).length === 0 && this.eventTarget.removeEventListener("message", this.boundEventHandler);
|
5152
5167
|
}
|
5153
5168
|
}
|
5154
|
-
|
5169
|
+
Ie.receivers = [];
|
5155
5170
|
/**
|
5156
5171
|
* @license
|
5157
5172
|
* Copyright 2020 Google LLC
|
@@ -5168,7 +5183,7 @@ ye.receivers = [];
|
|
5168
5183
|
* See the License for the specific language governing permissions and
|
5169
5184
|
* limitations under the License.
|
5170
5185
|
*/
|
5171
|
-
function
|
5186
|
+
function Ze(n = "", e = 10) {
|
5172
5187
|
let t = "";
|
5173
5188
|
for (let r = 0; r < e; r++)
|
5174
5189
|
t += Math.floor(Math.random() * 10);
|
@@ -5224,9 +5239,9 @@ class ys {
|
|
5224
5239
|
);
|
5225
5240
|
let s, a;
|
5226
5241
|
return new Promise((c, o) => {
|
5227
|
-
const l =
|
5242
|
+
const l = Ze("", 20);
|
5228
5243
|
i.port1.start();
|
5229
|
-
const
|
5244
|
+
const u = setTimeout(() => {
|
5230
5245
|
o(new Error(
|
5231
5246
|
"unsupported_event"
|
5232
5247
|
/* _MessageError.UNSUPPORTED_EVENT */
|
@@ -5235,11 +5250,11 @@ class ys {
|
|
5235
5250
|
a = {
|
5236
5251
|
messageChannel: i,
|
5237
5252
|
onMessage(h) {
|
5238
|
-
const
|
5239
|
-
if (
|
5240
|
-
switch (
|
5253
|
+
const p = h;
|
5254
|
+
if (p.data.eventId === l)
|
5255
|
+
switch (p.data.status) {
|
5241
5256
|
case "ack":
|
5242
|
-
clearTimeout(
|
5257
|
+
clearTimeout(u), s = setTimeout(
|
5243
5258
|
() => {
|
5244
5259
|
o(new Error(
|
5245
5260
|
"timeout"
|
@@ -5251,10 +5266,10 @@ class ys {
|
|
5251
5266
|
);
|
5252
5267
|
break;
|
5253
5268
|
case "done":
|
5254
|
-
clearTimeout(s), c(
|
5269
|
+
clearTimeout(s), c(p.data.response);
|
5255
5270
|
break;
|
5256
5271
|
default:
|
5257
|
-
clearTimeout(
|
5272
|
+
clearTimeout(u), clearTimeout(s), o(new Error(
|
5258
5273
|
"invalid_response"
|
5259
5274
|
/* _MessageError.INVALID_RESPONSE */
|
5260
5275
|
));
|
@@ -5287,11 +5302,11 @@ class ys {
|
|
5287
5302
|
* See the License for the specific language governing permissions and
|
5288
5303
|
* limitations under the License.
|
5289
5304
|
*/
|
5290
|
-
function
|
5305
|
+
function _() {
|
5291
5306
|
return window;
|
5292
5307
|
}
|
5293
|
-
function
|
5294
|
-
|
5308
|
+
function Is(n) {
|
5309
|
+
_().location.href = n;
|
5295
5310
|
}
|
5296
5311
|
/**
|
5297
5312
|
* @license
|
@@ -5309,10 +5324,10 @@ function bs(n) {
|
|
5309
5324
|
* See the License for the specific language governing permissions and
|
5310
5325
|
* limitations under the License.
|
5311
5326
|
*/
|
5312
|
-
function
|
5313
|
-
return typeof
|
5327
|
+
function kn() {
|
5328
|
+
return typeof _().WorkerGlobalScope < "u" && typeof _().importScripts == "function";
|
5314
5329
|
}
|
5315
|
-
async function
|
5330
|
+
async function bs() {
|
5316
5331
|
if (!(navigator != null && navigator.serviceWorker))
|
5317
5332
|
return null;
|
5318
5333
|
try {
|
@@ -5325,8 +5340,8 @@ function ws() {
|
|
5325
5340
|
var n;
|
5326
5341
|
return ((n = navigator == null ? void 0 : navigator.serviceWorker) === null || n === void 0 ? void 0 : n.controller) || null;
|
5327
5342
|
}
|
5328
|
-
function
|
5329
|
-
return
|
5343
|
+
function Es() {
|
5344
|
+
return kn() ? self : null;
|
5330
5345
|
}
|
5331
5346
|
/**
|
5332
5347
|
* @license
|
@@ -5344,7 +5359,7 @@ function Ts() {
|
|
5344
5359
|
* See the License for the specific language governing permissions and
|
5345
5360
|
* limitations under the License.
|
5346
5361
|
*/
|
5347
|
-
const An = "firebaseLocalStorageDb",
|
5362
|
+
const An = "firebaseLocalStorageDb", Ts = 1, _e = "firebaseLocalStorage", Cn = "fbase_key";
|
5348
5363
|
class re {
|
5349
5364
|
constructor(e) {
|
5350
5365
|
this.request = e;
|
@@ -5360,54 +5375,54 @@ class re {
|
|
5360
5375
|
}
|
5361
5376
|
}
|
5362
5377
|
function be(n, e) {
|
5363
|
-
return n.transaction([
|
5378
|
+
return n.transaction([_e], e ? "readwrite" : "readonly").objectStore(_e);
|
5364
5379
|
}
|
5365
|
-
function
|
5380
|
+
function Ss() {
|
5366
5381
|
const n = indexedDB.deleteDatabase(An);
|
5367
5382
|
return new re(n).toPromise();
|
5368
5383
|
}
|
5369
|
-
function
|
5370
|
-
const n = indexedDB.open(An,
|
5384
|
+
function Ve() {
|
5385
|
+
const n = indexedDB.open(An, Ts);
|
5371
5386
|
return new Promise((e, t) => {
|
5372
5387
|
n.addEventListener("error", () => {
|
5373
5388
|
t(n.error);
|
5374
5389
|
}), n.addEventListener("upgradeneeded", () => {
|
5375
5390
|
const r = n.result;
|
5376
5391
|
try {
|
5377
|
-
r.createObjectStore(
|
5392
|
+
r.createObjectStore(_e, { keyPath: Cn });
|
5378
5393
|
} catch (i) {
|
5379
5394
|
t(i);
|
5380
5395
|
}
|
5381
5396
|
}), n.addEventListener("success", async () => {
|
5382
5397
|
const r = n.result;
|
5383
|
-
r.objectStoreNames.contains(
|
5398
|
+
r.objectStoreNames.contains(_e) ? e(r) : (r.close(), await Ss(), e(await Ve()));
|
5384
5399
|
});
|
5385
5400
|
});
|
5386
5401
|
}
|
5387
|
-
async function
|
5402
|
+
async function St(n, e, t) {
|
5388
5403
|
const r = be(n, !0).put({
|
5389
|
-
[
|
5404
|
+
[Cn]: e,
|
5390
5405
|
value: t
|
5391
5406
|
});
|
5392
5407
|
return new re(r).toPromise();
|
5393
5408
|
}
|
5394
|
-
async function
|
5409
|
+
async function ks(n, e) {
|
5395
5410
|
const t = be(n, !1).get(e), r = await new re(t).toPromise();
|
5396
5411
|
return r === void 0 ? null : r.value;
|
5397
5412
|
}
|
5398
|
-
function
|
5413
|
+
function kt(n, e) {
|
5399
5414
|
const t = be(n, !0).delete(e);
|
5400
5415
|
return new re(t).toPromise();
|
5401
5416
|
}
|
5402
|
-
const As = 800,
|
5403
|
-
class
|
5417
|
+
const As = 800, Cs = 3;
|
5418
|
+
class Rn {
|
5404
5419
|
constructor() {
|
5405
5420
|
this.type = "LOCAL", this._shouldAllowMigration = !0, this.listeners = {}, this.localCache = {}, this.pollTimer = null, this.pendingWrites = 0, this.receiver = null, this.sender = null, this.serviceWorkerReceiverAvailable = !1, this.activeServiceWorker = null, this._workerInitializationPromise = this.initializeServiceWorkerMessaging().then(() => {
|
5406
5421
|
}, () => {
|
5407
5422
|
});
|
5408
5423
|
}
|
5409
5424
|
async _openDb() {
|
5410
|
-
return this.db ? this.db : (this.db = await
|
5425
|
+
return this.db ? this.db : (this.db = await Ve(), this.db);
|
5411
5426
|
}
|
5412
5427
|
async _withRetries(e) {
|
5413
5428
|
let t = 0;
|
@@ -5416,7 +5431,7 @@ class Cn {
|
|
5416
5431
|
const r = await this._openDb();
|
5417
5432
|
return await e(r);
|
5418
5433
|
} catch (r) {
|
5419
|
-
if (t++ >
|
5434
|
+
if (t++ > Cs)
|
5420
5435
|
throw r;
|
5421
5436
|
this.db && (this.db.close(), this.db = void 0);
|
5422
5437
|
}
|
@@ -5426,13 +5441,13 @@ class Cn {
|
|
5426
5441
|
* postMessage interface to send these events to the worker ourselves.
|
5427
5442
|
*/
|
5428
5443
|
async initializeServiceWorkerMessaging() {
|
5429
|
-
return
|
5444
|
+
return kn() ? this.initializeReceiver() : this.initializeSender();
|
5430
5445
|
}
|
5431
5446
|
/**
|
5432
5447
|
* As the worker we should listen to events from the main window.
|
5433
5448
|
*/
|
5434
5449
|
async initializeReceiver() {
|
5435
|
-
this.receiver =
|
5450
|
+
this.receiver = Ie._getInstance(Es()), this.receiver._subscribe("keyChanged", async (e, t) => ({
|
5436
5451
|
keyProcessed: (await this._poll()).includes(t.key)
|
5437
5452
|
})), this.receiver._subscribe("ping", async (e, t) => [
|
5438
5453
|
"keyChanged"
|
@@ -5448,7 +5463,7 @@ class Cn {
|
|
5448
5463
|
*/
|
5449
5464
|
async initializeSender() {
|
5450
5465
|
var e, t;
|
5451
|
-
if (this.activeServiceWorker = await
|
5466
|
+
if (this.activeServiceWorker = await bs(), !this.activeServiceWorker)
|
5452
5467
|
return;
|
5453
5468
|
this.sender = new ys(this.activeServiceWorker);
|
5454
5469
|
const r = await this.sender._send(
|
@@ -5488,8 +5503,8 @@ class Cn {
|
|
5488
5503
|
try {
|
5489
5504
|
if (!indexedDB)
|
5490
5505
|
return !1;
|
5491
|
-
const e = await
|
5492
|
-
return await
|
5506
|
+
const e = await Ve();
|
5507
|
+
return await St(e, ge, "1"), await kt(e, ge), !0;
|
5493
5508
|
} catch {
|
5494
5509
|
}
|
5495
5510
|
return !1;
|
@@ -5503,14 +5518,14 @@ class Cn {
|
|
5503
5518
|
}
|
5504
5519
|
}
|
5505
5520
|
async _set(e, t) {
|
5506
|
-
return this._withPendingWrite(async () => (await this._withRetries((r) =>
|
5521
|
+
return this._withPendingWrite(async () => (await this._withRetries((r) => St(r, e, t)), this.localCache[e] = t, this.notifyServiceWorker(e)));
|
5507
5522
|
}
|
5508
5523
|
async _get(e) {
|
5509
|
-
const t = await this._withRetries((r) =>
|
5524
|
+
const t = await this._withRetries((r) => ks(r, e));
|
5510
5525
|
return this.localCache[e] = t, t;
|
5511
5526
|
}
|
5512
5527
|
async _remove(e) {
|
5513
|
-
return this._withPendingWrite(async () => (await this._withRetries((t) =>
|
5528
|
+
return this._withPendingWrite(async () => (await this._withRetries((t) => kt(t, e)), delete this.localCache[e], this.notifyServiceWorker(e)));
|
5514
5529
|
}
|
5515
5530
|
async _poll() {
|
5516
5531
|
const e = await this._withRetries((i) => {
|
@@ -5549,8 +5564,8 @@ class Cn {
|
|
5549
5564
|
this.listeners[e] && (this.listeners[e].delete(t), this.listeners[e].size === 0 && delete this.listeners[e]), Object.keys(this.listeners).length === 0 && this.stopPolling();
|
5550
5565
|
}
|
5551
5566
|
}
|
5552
|
-
|
5553
|
-
const
|
5567
|
+
Rn.type = "LOCAL";
|
5568
|
+
const Rs = Rn;
|
5554
5569
|
new te(3e4, 6e4);
|
5555
5570
|
/**
|
5556
5571
|
* @license
|
@@ -5568,8 +5583,8 @@ new te(3e4, 6e4);
|
|
5568
5583
|
* See the License for the specific language governing permissions and
|
5569
5584
|
* limitations under the License.
|
5570
5585
|
*/
|
5571
|
-
function
|
5572
|
-
return e ?
|
5586
|
+
function Ps(n, e) {
|
5587
|
+
return e ? w(e) : (d(
|
5573
5588
|
n._popupRedirectResolver,
|
5574
5589
|
n,
|
5575
5590
|
"argument-error"
|
@@ -5601,13 +5616,13 @@ class et extends yn {
|
|
5601
5616
|
), this.params = e;
|
5602
5617
|
}
|
5603
5618
|
_getIdTokenResponse(e) {
|
5604
|
-
return
|
5619
|
+
return j(e, this._buildIdpRequest());
|
5605
5620
|
}
|
5606
5621
|
_linkToIdToken(e, t) {
|
5607
|
-
return
|
5622
|
+
return j(e, this._buildIdpRequest(t));
|
5608
5623
|
}
|
5609
5624
|
_getReauthenticationResolver(e) {
|
5610
|
-
return
|
5625
|
+
return j(e, this._buildIdpRequest());
|
5611
5626
|
}
|
5612
5627
|
_buildIdpRequest(e) {
|
5613
5628
|
const t = {
|
@@ -5622,26 +5637,26 @@ class et extends yn {
|
|
5622
5637
|
return e && (t.idToken = e), t;
|
5623
5638
|
}
|
5624
5639
|
}
|
5625
|
-
function
|
5640
|
+
function Os(n) {
|
5626
5641
|
return us(n.auth, new et(n), n.bypassAuthState);
|
5627
5642
|
}
|
5628
|
-
function
|
5643
|
+
function Ds(n) {
|
5629
5644
|
const { auth: e, user: t } = n;
|
5630
|
-
return
|
5645
|
+
return d(
|
5631
5646
|
t,
|
5632
5647
|
e,
|
5633
5648
|
"internal-error"
|
5634
5649
|
/* AuthErrorCode.INTERNAL_ERROR */
|
5635
|
-
),
|
5650
|
+
), ls(t, new et(n), n.bypassAuthState);
|
5636
5651
|
}
|
5637
|
-
async function
|
5652
|
+
async function Ns(n) {
|
5638
5653
|
const { auth: e, user: t } = n;
|
5639
|
-
return
|
5654
|
+
return d(
|
5640
5655
|
t,
|
5641
5656
|
e,
|
5642
5657
|
"internal-error"
|
5643
5658
|
/* AuthErrorCode.INTERNAL_ERROR */
|
5644
|
-
),
|
5659
|
+
), cs(t, new et(n), n.bypassAuthState);
|
5645
5660
|
}
|
5646
5661
|
/**
|
5647
5662
|
* @license
|
@@ -5659,7 +5674,7 @@ async function Ms(n) {
|
|
5659
5674
|
* See the License for the specific language governing permissions and
|
5660
5675
|
* limitations under the License.
|
5661
5676
|
*/
|
5662
|
-
class
|
5677
|
+
class Pn {
|
5663
5678
|
constructor(e, t, r, i, s = !1) {
|
5664
5679
|
this.auth = e, this.resolver = r, this.user = i, this.bypassAuthState = s, this.pendingPromise = null, this.eventManager = null, this.filter = Array.isArray(t) ? t : [t];
|
5665
5680
|
}
|
@@ -5701,13 +5716,13 @@ class On {
|
|
5701
5716
|
switch (e) {
|
5702
5717
|
case "signInViaPopup":
|
5703
5718
|
case "signInViaRedirect":
|
5704
|
-
return
|
5719
|
+
return Os;
|
5705
5720
|
case "linkViaPopup":
|
5706
5721
|
case "linkViaRedirect":
|
5707
|
-
return
|
5722
|
+
return Ns;
|
5708
5723
|
case "reauthViaPopup":
|
5709
5724
|
case "reauthViaRedirect":
|
5710
|
-
return
|
5725
|
+
return Ds;
|
5711
5726
|
default:
|
5712
5727
|
T(
|
5713
5728
|
this.auth,
|
@@ -5717,10 +5732,10 @@ class On {
|
|
5717
5732
|
}
|
5718
5733
|
}
|
5719
5734
|
resolve(e) {
|
5720
|
-
|
5735
|
+
S(this.pendingPromise, "Pending promise was never set"), this.pendingPromise.resolve(e), this.unregisterAndCleanUp();
|
5721
5736
|
}
|
5722
5737
|
reject(e) {
|
5723
|
-
|
5738
|
+
S(this.pendingPromise, "Pending promise was never set"), this.pendingPromise.reject(e), this.unregisterAndCleanUp();
|
5724
5739
|
}
|
5725
5740
|
unregisterAndCleanUp() {
|
5726
5741
|
this.eventManager && this.eventManager.unregisterConsumer(this), this.pendingPromise = null, this.cleanUp();
|
@@ -5743,13 +5758,13 @@ class On {
|
|
5743
5758
|
* limitations under the License.
|
5744
5759
|
*/
|
5745
5760
|
const Ls = new te(2e3, 1e4);
|
5746
|
-
class B extends
|
5761
|
+
class B extends Pn {
|
5747
5762
|
constructor(e, t, r, i, s) {
|
5748
5763
|
super(e, t, i, s), this.provider = r, this.authWindow = null, this.pollId = null, B.currentPopupAction && B.currentPopupAction.cancel(), B.currentPopupAction = this;
|
5749
5764
|
}
|
5750
5765
|
async executeNotNull() {
|
5751
5766
|
const e = await this.execute();
|
5752
|
-
return
|
5767
|
+
return d(
|
5753
5768
|
e,
|
5754
5769
|
this.auth,
|
5755
5770
|
"internal-error"
|
@@ -5757,8 +5772,8 @@ class B extends On {
|
|
5757
5772
|
), e;
|
5758
5773
|
}
|
5759
5774
|
async onExecution() {
|
5760
|
-
|
5761
|
-
const e =
|
5775
|
+
S(this.filter.length === 1, "Popup operations only handle one event");
|
5776
|
+
const e = Ze();
|
5762
5777
|
this.authWindow = await this.resolver._openPopup(
|
5763
5778
|
this.auth,
|
5764
5779
|
this.provider,
|
@@ -5768,7 +5783,7 @@ class B extends On {
|
|
5768
5783
|
), this.authWindow.associatedEvent = e, this.resolver._originValidation(this.auth).catch((t) => {
|
5769
5784
|
this.reject(t);
|
5770
5785
|
}), this.resolver._isIframeWebStorageSupported(this.auth, (t) => {
|
5771
|
-
t || this.reject(
|
5786
|
+
t || this.reject(g(
|
5772
5787
|
this.auth,
|
5773
5788
|
"web-storage-unsupported"
|
5774
5789
|
/* AuthErrorCode.WEB_STORAGE_UNSUPPORTED */
|
@@ -5780,7 +5795,7 @@ class B extends On {
|
|
5780
5795
|
return ((e = this.authWindow) === null || e === void 0 ? void 0 : e.associatedEvent) || null;
|
5781
5796
|
}
|
5782
5797
|
cancel() {
|
5783
|
-
this.reject(
|
5798
|
+
this.reject(g(
|
5784
5799
|
this.auth,
|
5785
5800
|
"cancelled-popup-request"
|
5786
5801
|
/* AuthErrorCode.EXPIRED_POPUP_REQUEST */
|
@@ -5795,7 +5810,7 @@ class B extends On {
|
|
5795
5810
|
if (!((r = (t = this.authWindow) === null || t === void 0 ? void 0 : t.window) === null || r === void 0) && r.closed) {
|
5796
5811
|
this.pollId = window.setTimeout(
|
5797
5812
|
() => {
|
5798
|
-
this.pollId = null, this.reject(
|
5813
|
+
this.pollId = null, this.reject(g(
|
5799
5814
|
this.auth,
|
5800
5815
|
"popup-closed-by-user"
|
5801
5816
|
/* AuthErrorCode.POPUP_CLOSED_BY_USER */
|
@@ -5828,8 +5843,8 @@ B.currentPopupAction = null;
|
|
5828
5843
|
* See the License for the specific language governing permissions and
|
5829
5844
|
* limitations under the License.
|
5830
5845
|
*/
|
5831
|
-
const
|
5832
|
-
class
|
5846
|
+
const Ms = "pendingRedirect", oe = /* @__PURE__ */ new Map();
|
5847
|
+
class Us extends Pn {
|
5833
5848
|
constructor(e, t, r = !1) {
|
5834
5849
|
super(e, [
|
5835
5850
|
"signInViaRedirect",
|
@@ -5876,25 +5891,25 @@ class js extends On {
|
|
5876
5891
|
}
|
5877
5892
|
}
|
5878
5893
|
async function xs(n, e) {
|
5879
|
-
const t =
|
5894
|
+
const t = $s(e), r = Bs(n);
|
5880
5895
|
if (!await r._isAvailable())
|
5881
5896
|
return !1;
|
5882
5897
|
const i = await r._get(t) === "true";
|
5883
5898
|
return await r._remove(t), i;
|
5884
5899
|
}
|
5885
|
-
function
|
5900
|
+
function Fs(n, e) {
|
5886
5901
|
oe.set(n._key(), e);
|
5887
5902
|
}
|
5888
|
-
function
|
5889
|
-
return
|
5903
|
+
function Bs(n) {
|
5904
|
+
return w(n._redirectPersistence);
|
5890
5905
|
}
|
5891
|
-
function
|
5892
|
-
return ae(
|
5906
|
+
function $s(n) {
|
5907
|
+
return ae(Ms, n.config.apiKey, n.name);
|
5893
5908
|
}
|
5894
|
-
async function
|
5895
|
-
if (
|
5896
|
-
return Promise.reject(
|
5897
|
-
const r =
|
5909
|
+
async function Hs(n, e, t = !1) {
|
5910
|
+
if (y(n.app))
|
5911
|
+
return Promise.reject(N(n));
|
5912
|
+
const r = ye(n), i = Ps(r, e), a = await new Us(r, i, t).execute();
|
5898
5913
|
return a && !t && (delete a.user._redirectEventId, await r._persistUserIfCurrent(a.user), await r._setRedirectUser(null, e)), a;
|
5899
5914
|
}
|
5900
5915
|
/**
|
@@ -5914,7 +5929,7 @@ async function Ws(n, e, t = !1) {
|
|
5914
5929
|
* limitations under the License.
|
5915
5930
|
*/
|
5916
5931
|
const Vs = 10 * 60 * 1e3;
|
5917
|
-
class
|
5932
|
+
class js {
|
5918
5933
|
constructor(e) {
|
5919
5934
|
this.auth = e, this.cachedEventUids = /* @__PURE__ */ new Set(), this.consumers = /* @__PURE__ */ new Set(), this.queuedRedirectEvent = null, this.hasHandledPotentialRedirect = !1, this.lastProcessedEventTime = Date.now();
|
5920
5935
|
}
|
@@ -5930,13 +5945,13 @@ class Gs {
|
|
5930
5945
|
let t = !1;
|
5931
5946
|
return this.consumers.forEach((r) => {
|
5932
5947
|
this.isEventForConsumer(e, r) && (t = !0, this.sendToConsumer(e, r), this.saveEventToCache(e));
|
5933
|
-
}), this.hasHandledPotentialRedirect || !
|
5948
|
+
}), this.hasHandledPotentialRedirect || !Ws(e) || (this.hasHandledPotentialRedirect = !0, t || (this.queuedRedirectEvent = e, t = !0)), t;
|
5934
5949
|
}
|
5935
5950
|
sendToConsumer(e, t) {
|
5936
5951
|
var r;
|
5937
|
-
if (e.error && !
|
5952
|
+
if (e.error && !On(e)) {
|
5938
5953
|
const i = ((r = e.error.code) === null || r === void 0 ? void 0 : r.split("auth/")[1]) || "internal-error";
|
5939
|
-
t.onError(
|
5954
|
+
t.onError(g(this.auth, i));
|
5940
5955
|
} else
|
5941
5956
|
t.onAuthEvent(e);
|
5942
5957
|
}
|
@@ -5954,17 +5969,17 @@ class Gs {
|
|
5954
5969
|
function At(n) {
|
5955
5970
|
return [n.type, n.eventId, n.sessionId, n.tenantId].filter((e) => e).join("-");
|
5956
5971
|
}
|
5957
|
-
function
|
5972
|
+
function On({ type: n, error: e }) {
|
5958
5973
|
return n === "unknown" && (e == null ? void 0 : e.code) === "auth/no-auth-event";
|
5959
5974
|
}
|
5960
|
-
function
|
5975
|
+
function Ws(n) {
|
5961
5976
|
switch (n.type) {
|
5962
5977
|
case "signInViaRedirect":
|
5963
5978
|
case "linkViaRedirect":
|
5964
5979
|
case "reauthViaRedirect":
|
5965
5980
|
return !0;
|
5966
5981
|
case "unknown":
|
5967
|
-
return
|
5982
|
+
return On(n);
|
5968
5983
|
default:
|
5969
5984
|
return !1;
|
5970
5985
|
}
|
@@ -5985,8 +6000,8 @@ function zs(n) {
|
|
5985
6000
|
* See the License for the specific language governing permissions and
|
5986
6001
|
* limitations under the License.
|
5987
6002
|
*/
|
5988
|
-
async function
|
5989
|
-
return
|
6003
|
+
async function zs(n, e = {}) {
|
6004
|
+
return G(n, "GET", "/v1/projects", e);
|
5990
6005
|
}
|
5991
6006
|
/**
|
5992
6007
|
* @license
|
@@ -6004,14 +6019,14 @@ async function Zs(n, e = {}) {
|
|
6004
6019
|
* See the License for the specific language governing permissions and
|
6005
6020
|
* limitations under the License.
|
6006
6021
|
*/
|
6007
|
-
const
|
6008
|
-
async function
|
6022
|
+
const Gs = /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/, qs = /^https?/;
|
6023
|
+
async function Ks(n) {
|
6009
6024
|
if (n.config.emulator)
|
6010
6025
|
return;
|
6011
|
-
const { authorizedDomains: e } = await
|
6026
|
+
const { authorizedDomains: e } = await zs(n);
|
6012
6027
|
for (const t of e)
|
6013
6028
|
try {
|
6014
|
-
if (
|
6029
|
+
if (Js(t))
|
6015
6030
|
return;
|
6016
6031
|
} catch {
|
6017
6032
|
}
|
@@ -6021,15 +6036,15 @@ async function Js(n) {
|
|
6021
6036
|
/* AuthErrorCode.INVALID_ORIGIN */
|
6022
6037
|
);
|
6023
6038
|
}
|
6024
|
-
function
|
6025
|
-
const e =
|
6039
|
+
function Js(n) {
|
6040
|
+
const e = $e(), { protocol: t, hostname: r } = new URL(e);
|
6026
6041
|
if (n.startsWith("chrome-extension://")) {
|
6027
6042
|
const a = new URL(n);
|
6028
6043
|
return a.hostname === "" && r === "" ? t === "chrome-extension:" && n.replace("chrome-extension://", "") === e.replace("chrome-extension://", "") : t === "chrome-extension:" && a.hostname === r;
|
6029
6044
|
}
|
6030
|
-
if (
|
6045
|
+
if (!qs.test(t))
|
6031
6046
|
return !1;
|
6032
|
-
if (
|
6047
|
+
if (Gs.test(n))
|
6033
6048
|
return r === n;
|
6034
6049
|
const i = n.replace(/\./g, "\\.");
|
6035
6050
|
return new RegExp("^(.+\\." + i + "|" + i + ")$", "i").test(r);
|
@@ -6050,9 +6065,9 @@ function Xs(n) {
|
|
6050
6065
|
* See the License for the specific language governing permissions and
|
6051
6066
|
* limitations under the License.
|
6052
6067
|
*/
|
6053
|
-
const
|
6054
|
-
function
|
6055
|
-
const n =
|
6068
|
+
const Ys = new te(3e4, 6e4);
|
6069
|
+
function Ct() {
|
6070
|
+
const n = _().___jsl;
|
6056
6071
|
if (n != null && n.H) {
|
6057
6072
|
for (const e of Object.keys(n.H))
|
6058
6073
|
if (n.H[e].r = n.H[e].r || [], n.H[e].L = n.H[e].L || [], n.H[e].r = [...n.H[e].L], n.CP)
|
@@ -6060,37 +6075,37 @@ function Nt() {
|
|
6060
6075
|
n.CP[t] = null;
|
6061
6076
|
}
|
6062
6077
|
}
|
6063
|
-
function
|
6078
|
+
function Xs(n) {
|
6064
6079
|
return new Promise((e, t) => {
|
6065
6080
|
var r, i, s;
|
6066
6081
|
function a() {
|
6067
|
-
|
6082
|
+
Ct(), gapi.load("gapi.iframes", {
|
6068
6083
|
callback: () => {
|
6069
6084
|
e(gapi.iframes.getContext());
|
6070
6085
|
},
|
6071
6086
|
ontimeout: () => {
|
6072
|
-
|
6087
|
+
Ct(), t(g(
|
6073
6088
|
n,
|
6074
6089
|
"network-request-failed"
|
6075
6090
|
/* AuthErrorCode.NETWORK_REQUEST_FAILED */
|
6076
6091
|
));
|
6077
6092
|
},
|
6078
|
-
timeout:
|
6093
|
+
timeout: Ys.get()
|
6079
6094
|
});
|
6080
6095
|
}
|
6081
|
-
if (!((i = (r =
|
6096
|
+
if (!((i = (r = _().gapi) === null || r === void 0 ? void 0 : r.iframes) === null || i === void 0) && i.Iframe)
|
6082
6097
|
e(gapi.iframes.getContext());
|
6083
|
-
else if (!((s =
|
6098
|
+
else if (!((s = _().gapi) === null || s === void 0) && s.load)
|
6084
6099
|
a();
|
6085
6100
|
else {
|
6086
|
-
const c =
|
6087
|
-
return
|
6088
|
-
gapi.load ? a() : t(
|
6101
|
+
const c = ts("iframefcb");
|
6102
|
+
return _()[c] = () => {
|
6103
|
+
gapi.load ? a() : t(g(
|
6089
6104
|
n,
|
6090
6105
|
"network-request-failed"
|
6091
6106
|
/* AuthErrorCode.NETWORK_REQUEST_FAILED */
|
6092
6107
|
));
|
6093
|
-
},
|
6108
|
+
}, Zi(`${es()}?onload=${c}`).catch((o) => t(o));
|
6094
6109
|
}
|
6095
6110
|
}).catch((e) => {
|
6096
6111
|
throw ce = null, e;
|
@@ -6098,7 +6113,7 @@ function qs(n) {
|
|
6098
6113
|
}
|
6099
6114
|
let ce = null;
|
6100
6115
|
function Qs(n) {
|
6101
|
-
return ce = ce ||
|
6116
|
+
return ce = ce || Xs(n), ce;
|
6102
6117
|
}
|
6103
6118
|
/**
|
6104
6119
|
* @license
|
@@ -6116,7 +6131,7 @@ function Qs(n) {
|
|
6116
6131
|
* See the License for the specific language governing permissions and
|
6117
6132
|
* limitations under the License.
|
6118
6133
|
*/
|
6119
|
-
const
|
6134
|
+
const Zs = new te(5e3, 15e3), ea = "__/auth/iframe", ta = "emulator/auth/iframe", na = {
|
6120
6135
|
style: {
|
6121
6136
|
position: "absolute",
|
6122
6137
|
top: "-100px",
|
@@ -6125,56 +6140,56 @@ const ea = new te(5e3, 15e3), ta = "__/auth/iframe", na = "emulator/auth/iframe"
|
|
6125
6140
|
},
|
6126
6141
|
"aria-hidden": "true",
|
6127
6142
|
tabindex: "-1"
|
6128
|
-
},
|
6143
|
+
}, ra = /* @__PURE__ */ new Map([
|
6129
6144
|
["identitytoolkit.googleapis.com", "p"],
|
6130
6145
|
["staging-identitytoolkit.sandbox.googleapis.com", "s"],
|
6131
6146
|
["test-identitytoolkit.sandbox.googleapis.com", "t"]
|
6132
6147
|
// test
|
6133
6148
|
]);
|
6134
|
-
function
|
6149
|
+
function ia(n) {
|
6135
6150
|
const e = n.config;
|
6136
|
-
|
6151
|
+
d(
|
6137
6152
|
e.authDomain,
|
6138
6153
|
n,
|
6139
6154
|
"auth-domain-config-required"
|
6140
6155
|
/* AuthErrorCode.MISSING_AUTH_DOMAIN */
|
6141
6156
|
);
|
6142
|
-
const t = e.emulator ? Je(e,
|
6157
|
+
const t = e.emulator ? Je(e, ta) : `https://${n.config.authDomain}/${ea}`, r = {
|
6143
6158
|
apiKey: e.apiKey,
|
6144
6159
|
appName: n.name,
|
6145
6160
|
v: ee
|
6146
|
-
}, i =
|
6161
|
+
}, i = ra.get(n.config.apiHost);
|
6147
6162
|
i && (r.eid = i);
|
6148
6163
|
const s = n._getFrameworks();
|
6149
|
-
return s.length && (r.fw = s.join(",")), `${t}?${
|
6164
|
+
return s.length && (r.fw = s.join(",")), `${t}?${Z(r).slice(1)}`;
|
6150
6165
|
}
|
6151
|
-
async function
|
6152
|
-
const e = await Qs(n), t =
|
6153
|
-
return
|
6166
|
+
async function sa(n) {
|
6167
|
+
const e = await Qs(n), t = _().gapi;
|
6168
|
+
return d(
|
6154
6169
|
t,
|
6155
6170
|
n,
|
6156
6171
|
"internal-error"
|
6157
6172
|
/* AuthErrorCode.INTERNAL_ERROR */
|
6158
6173
|
), e.open({
|
6159
6174
|
where: document.body,
|
6160
|
-
url:
|
6175
|
+
url: ia(n),
|
6161
6176
|
messageHandlersFilter: t.iframes.CROSS_ORIGIN_IFRAMES_FILTER,
|
6162
|
-
attributes:
|
6177
|
+
attributes: na,
|
6163
6178
|
dontclear: !0
|
6164
6179
|
}, (r) => new Promise(async (i, s) => {
|
6165
6180
|
await r.restyle({
|
6166
6181
|
// Prevent iframe from closing on mouse out.
|
6167
6182
|
setHideOnLeave: !1
|
6168
6183
|
});
|
6169
|
-
const a =
|
6184
|
+
const a = g(
|
6170
6185
|
n,
|
6171
6186
|
"network-request-failed"
|
6172
6187
|
/* AuthErrorCode.NETWORK_REQUEST_FAILED */
|
6173
|
-
), c =
|
6188
|
+
), c = _().setTimeout(() => {
|
6174
6189
|
s(a);
|
6175
|
-
},
|
6190
|
+
}, Zs.get());
|
6176
6191
|
function o() {
|
6177
|
-
|
6192
|
+
_().clearTimeout(c), i(r);
|
6178
6193
|
}
|
6179
6194
|
r.ping(o).then(o, () => {
|
6180
6195
|
s(a);
|
@@ -6197,13 +6212,13 @@ async function aa(n) {
|
|
6197
6212
|
* See the License for the specific language governing permissions and
|
6198
6213
|
* limitations under the License.
|
6199
6214
|
*/
|
6200
|
-
const
|
6215
|
+
const aa = {
|
6201
6216
|
location: "yes",
|
6202
6217
|
resizable: "yes",
|
6203
6218
|
statusbar: "yes",
|
6204
6219
|
toolbar: "no"
|
6205
|
-
},
|
6206
|
-
class
|
6220
|
+
}, oa = 500, ca = 600, la = "_blank", ua = "http://localhost";
|
6221
|
+
class Rt {
|
6207
6222
|
constructor(e) {
|
6208
6223
|
this.window = e, this.associatedEvent = null;
|
6209
6224
|
}
|
@@ -6215,21 +6230,21 @@ class Ct {
|
|
6215
6230
|
}
|
6216
6231
|
}
|
6217
6232
|
}
|
6218
|
-
function
|
6233
|
+
function da(n, e, t, r = oa, i = ca) {
|
6219
6234
|
const s = Math.max((window.screen.availHeight - i) / 2, 0).toString(), a = Math.max((window.screen.availWidth - r) / 2, 0).toString();
|
6220
6235
|
let c = "";
|
6221
|
-
const o = Object.assign(Object.assign({},
|
6236
|
+
const o = Object.assign(Object.assign({}, aa), {
|
6222
6237
|
width: r.toString(),
|
6223
6238
|
height: i.toString(),
|
6224
6239
|
top: s,
|
6225
6240
|
left: a
|
6226
|
-
}), l =
|
6227
|
-
t && (c =
|
6228
|
-
const
|
6229
|
-
if (
|
6230
|
-
return
|
6231
|
-
const h = window.open(e || "", c,
|
6232
|
-
|
6241
|
+
}), l = m().toLowerCase();
|
6242
|
+
t && (c = dn(l) ? la : t), ln(l) && (e = e || ua, o.scrollbars = "yes");
|
6243
|
+
const u = Object.entries(o).reduce((p, [v, F]) => `${p}${v}=${F},`, "");
|
6244
|
+
if (zi(l) && c !== "_self")
|
6245
|
+
return ha(e || "", c), new Rt(null);
|
6246
|
+
const h = window.open(e || "", c, u);
|
6247
|
+
d(
|
6233
6248
|
h,
|
6234
6249
|
n,
|
6235
6250
|
"popup-blocked"
|
@@ -6239,9 +6254,9 @@ function ha(n, e, t, r = ca, i = la) {
|
|
6239
6254
|
h.focus();
|
6240
6255
|
} catch {
|
6241
6256
|
}
|
6242
|
-
return new
|
6257
|
+
return new Rt(h);
|
6243
6258
|
}
|
6244
|
-
function
|
6259
|
+
function ha(n, e) {
|
6245
6260
|
const t = document.createElement("a");
|
6246
6261
|
t.href = n, t.target = e;
|
6247
6262
|
const r = document.createEvent("MouseEvent");
|
@@ -6263,14 +6278,14 @@ function pa(n, e) {
|
|
6263
6278
|
* See the License for the specific language governing permissions and
|
6264
6279
|
* limitations under the License.
|
6265
6280
|
*/
|
6266
|
-
const
|
6267
|
-
async function
|
6268
|
-
|
6281
|
+
const fa = "__/auth/handler", pa = "emulator/auth/handler", ma = encodeURIComponent("fac");
|
6282
|
+
async function Pt(n, e, t, r, i, s) {
|
6283
|
+
d(
|
6269
6284
|
n.config.authDomain,
|
6270
6285
|
n,
|
6271
6286
|
"auth-domain-config-required"
|
6272
6287
|
/* AuthErrorCode.MISSING_AUTH_DOMAIN */
|
6273
|
-
),
|
6288
|
+
), d(
|
6274
6289
|
n.config.apiKey,
|
6275
6290
|
n,
|
6276
6291
|
"invalid-api-key"
|
@@ -6284,24 +6299,24 @@ async function Ot(n, e, t, r, i, s) {
|
|
6284
6299
|
v: ee,
|
6285
6300
|
eventId: i
|
6286
6301
|
};
|
6287
|
-
if (e instanceof
|
6288
|
-
e.setDefaultLanguage(n.languageCode), a.providerId = e.providerId || "",
|
6289
|
-
for (const [
|
6290
|
-
a[
|
6302
|
+
if (e instanceof In) {
|
6303
|
+
e.setDefaultLanguage(n.languageCode), a.providerId = e.providerId || "", mr(e.getCustomParameters()) || (a.customParameters = JSON.stringify(e.getCustomParameters()));
|
6304
|
+
for (const [u, h] of Object.entries({}))
|
6305
|
+
a[u] = h;
|
6291
6306
|
}
|
6292
6307
|
if (e instanceof ne) {
|
6293
|
-
const
|
6294
|
-
|
6308
|
+
const u = e.getScopes().filter((h) => h !== "");
|
6309
|
+
u.length > 0 && (a.scopes = u.join(","));
|
6295
6310
|
}
|
6296
6311
|
n.tenantId && (a.tid = n.tenantId);
|
6297
6312
|
const c = a;
|
6298
|
-
for (const
|
6299
|
-
c[
|
6300
|
-
const o = await n._getAppCheckToken(), l = o ? `#${
|
6301
|
-
return `${ga(n)}?${
|
6313
|
+
for (const u of Object.keys(c))
|
6314
|
+
c[u] === void 0 && delete c[u];
|
6315
|
+
const o = await n._getAppCheckToken(), l = o ? `#${ma}=${encodeURIComponent(o)}` : "";
|
6316
|
+
return `${ga(n)}?${Z(c).slice(1)}${l}`;
|
6302
6317
|
}
|
6303
6318
|
function ga({ config: n }) {
|
6304
|
-
return n.emulator ? Je(n,
|
6319
|
+
return n.emulator ? Je(n, pa) : `https://${n.authDomain}/${fa}`;
|
6305
6320
|
}
|
6306
6321
|
/**
|
6307
6322
|
* @license
|
@@ -6320,29 +6335,29 @@ function ga({ config: n }) {
|
|
6320
6335
|
* limitations under the License.
|
6321
6336
|
*/
|
6322
6337
|
const De = "webStorageSupport";
|
6323
|
-
class
|
6338
|
+
class _a {
|
6324
6339
|
constructor() {
|
6325
|
-
this.eventManagers = {}, this.iframes = {}, this.originValidationPromises = {}, this._redirectPersistence =
|
6340
|
+
this.eventManagers = {}, this.iframes = {}, this.originValidationPromises = {}, this._redirectPersistence = Sn, this._completeRedirectFn = Hs, this._overrideRedirectResult = Fs;
|
6326
6341
|
}
|
6327
6342
|
// Wrapping in async even though we don't await anywhere in order
|
6328
6343
|
// to make sure errors are raised as promise rejections
|
6329
6344
|
async _openPopup(e, t, r, i) {
|
6330
6345
|
var s;
|
6331
|
-
|
6332
|
-
const a = await
|
6333
|
-
return
|
6346
|
+
S((s = this.eventManagers[e._key()]) === null || s === void 0 ? void 0 : s.manager, "_initialize() not called before _openPopup()");
|
6347
|
+
const a = await Pt(e, t, r, $e(), i);
|
6348
|
+
return da(e, a, Ze());
|
6334
6349
|
}
|
6335
6350
|
async _openRedirect(e, t, r, i) {
|
6336
6351
|
await this._originValidation(e);
|
6337
|
-
const s = await
|
6338
|
-
return
|
6352
|
+
const s = await Pt(e, t, r, $e(), i);
|
6353
|
+
return Is(s), new Promise(() => {
|
6339
6354
|
});
|
6340
6355
|
}
|
6341
6356
|
_initialize(e) {
|
6342
6357
|
const t = e._key();
|
6343
6358
|
if (this.eventManagers[t]) {
|
6344
6359
|
const { manager: i, promise: s } = this.eventManagers[t];
|
6345
|
-
return i ? Promise.resolve(i) : (
|
6360
|
+
return i ? Promise.resolve(i) : (S(s, "If manager is not set, promise should be"), s);
|
6346
6361
|
}
|
6347
6362
|
const r = this.initAndGetManager(e);
|
6348
6363
|
return this.eventManagers[t] = { promise: r }, r.catch(() => {
|
@@ -6350,8 +6365,8 @@ class Ia {
|
|
6350
6365
|
}), r;
|
6351
6366
|
}
|
6352
6367
|
async initAndGetManager(e) {
|
6353
|
-
const t = await
|
6354
|
-
return t.register("authEvent", (i) => (
|
6368
|
+
const t = await sa(e), r = new js(e);
|
6369
|
+
return t.register("authEvent", (i) => (d(
|
6355
6370
|
i == null ? void 0 : i.authEvent,
|
6356
6371
|
e,
|
6357
6372
|
"invalid-auth-event"
|
@@ -6374,14 +6389,14 @@ class Ia {
|
|
6374
6389
|
}
|
6375
6390
|
_originValidation(e) {
|
6376
6391
|
const t = e._key();
|
6377
|
-
return this.originValidationPromises[t] || (this.originValidationPromises[t] =
|
6392
|
+
return this.originValidationPromises[t] || (this.originValidationPromises[t] = Ks(e)), this.originValidationPromises[t];
|
6378
6393
|
}
|
6379
6394
|
get _shouldInitProactively() {
|
6380
|
-
return gn() || un() ||
|
6395
|
+
return gn() || un() || Xe();
|
6381
6396
|
}
|
6382
6397
|
}
|
6383
|
-
const va =
|
6384
|
-
var
|
6398
|
+
const va = _a;
|
6399
|
+
var Ot = "@firebase/auth", Dt = "1.7.9";
|
6385
6400
|
/**
|
6386
6401
|
* @license
|
6387
6402
|
* Copyright 2020 Google LLC
|
@@ -6423,7 +6438,7 @@ class ya {
|
|
6423
6438
|
t && (this.internalListeners.delete(e), t(), this.updateProactiveRefresh());
|
6424
6439
|
}
|
6425
6440
|
assertAuthConfigured() {
|
6426
|
-
|
6441
|
+
d(
|
6427
6442
|
this.auth._initializationPromise,
|
6428
6443
|
"dependent-sdk-initialized-before-auth"
|
6429
6444
|
/* AuthErrorCode.DEPENDENT_SDK_INIT_BEFORE_AUTH */
|
@@ -6449,7 +6464,7 @@ class ya {
|
|
6449
6464
|
* See the License for the specific language governing permissions and
|
6450
6465
|
* limitations under the License.
|
6451
6466
|
*/
|
6452
|
-
function
|
6467
|
+
function Ia(n) {
|
6453
6468
|
switch (n) {
|
6454
6469
|
case "Node":
|
6455
6470
|
return "node";
|
@@ -6465,12 +6480,12 @@ function ba(n) {
|
|
6465
6480
|
return;
|
6466
6481
|
}
|
6467
6482
|
}
|
6468
|
-
function
|
6469
|
-
J(new
|
6483
|
+
function ba(n) {
|
6484
|
+
J(new W(
|
6470
6485
|
"auth",
|
6471
6486
|
(e, { options: t }) => {
|
6472
6487
|
const r = e.getProvider("app").getImmediate(), i = e.getProvider("heartbeat"), s = e.getProvider("app-check-internal"), { apiKey: a, authDomain: c } = r.options;
|
6473
|
-
|
6488
|
+
d(a && !a.includes(":"), "invalid-api-key", { appName: r.name });
|
6474
6489
|
const o = {
|
6475
6490
|
apiKey: a,
|
6476
6491
|
authDomain: c,
|
@@ -6478,9 +6493,9 @@ function Ea(n) {
|
|
6478
6493
|
apiHost: "identitytoolkit.googleapis.com",
|
6479
6494
|
tokenApiHost: "securetoken.googleapis.com",
|
6480
6495
|
apiScheme: "https",
|
6481
|
-
sdkClientVersion:
|
6482
|
-
}, l = new
|
6483
|
-
return
|
6496
|
+
sdkClientVersion: _n(n)
|
6497
|
+
}, l = new Xi(r, i, s, o);
|
6498
|
+
return rs(l, t), l;
|
6484
6499
|
},
|
6485
6500
|
"PUBLIC"
|
6486
6501
|
/* ComponentType.PUBLIC */
|
@@ -6492,10 +6507,10 @@ function Ea(n) {
|
|
6492
6507
|
"auth-internal"
|
6493
6508
|
/* _ComponentName.AUTH_INTERNAL */
|
6494
6509
|
).initialize();
|
6495
|
-
})), J(new
|
6510
|
+
})), J(new W(
|
6496
6511
|
"auth-internal",
|
6497
6512
|
(e) => {
|
6498
|
-
const t =
|
6513
|
+
const t = ye(e.getProvider(
|
6499
6514
|
"auth"
|
6500
6515
|
/* _ComponentName.AUTH */
|
6501
6516
|
).getImmediate());
|
@@ -6506,7 +6521,7 @@ function Ea(n) {
|
|
6506
6521
|
).setInstantiationMode(
|
6507
6522
|
"EXPLICIT"
|
6508
6523
|
/* InstantiationMode.EXPLICIT */
|
6509
|
-
)),
|
6524
|
+
)), $(Ot, Dt, Ia(n)), $(Ot, Dt, "esm2017");
|
6510
6525
|
}
|
6511
6526
|
/**
|
6512
6527
|
* @license
|
@@ -6524,43 +6539,43 @@ function Ea(n) {
|
|
6524
6539
|
* See the License for the specific language governing permissions and
|
6525
6540
|
* limitations under the License.
|
6526
6541
|
*/
|
6527
|
-
const wa = 5 * 60,
|
6528
|
-
let
|
6529
|
-
const
|
6542
|
+
const wa = 5 * 60, Ea = Wt("authIdTokenMaxAge") || wa;
|
6543
|
+
let Nt = null;
|
6544
|
+
const Ta = (n) => async (e) => {
|
6530
6545
|
const t = e && await e.getIdTokenResult(), r = t && ((/* @__PURE__ */ new Date()).getTime() - Date.parse(t.issuedAtTime)) / 1e3;
|
6531
|
-
if (r && r >
|
6546
|
+
if (r && r > Ea)
|
6532
6547
|
return;
|
6533
6548
|
const i = t == null ? void 0 : t.token;
|
6534
|
-
|
6549
|
+
Nt !== i && (Nt = i, await fetch(n, {
|
6535
6550
|
method: i ? "POST" : "DELETE",
|
6536
6551
|
headers: i ? {
|
6537
6552
|
Authorization: `Bearer ${i}`
|
6538
6553
|
} : {}
|
6539
6554
|
}));
|
6540
6555
|
};
|
6541
|
-
function
|
6542
|
-
const e =
|
6556
|
+
function Sa(n = _i()) {
|
6557
|
+
const e = Kt(n, "auth");
|
6543
6558
|
if (e.isInitialized())
|
6544
6559
|
return e.getImmediate();
|
6545
|
-
const t =
|
6560
|
+
const t = ns(n, {
|
6546
6561
|
popupRedirectResolver: va,
|
6547
6562
|
persistence: [
|
6548
|
-
|
6549
|
-
|
6550
|
-
|
6563
|
+
Rs,
|
6564
|
+
_s,
|
6565
|
+
Sn
|
6551
6566
|
]
|
6552
|
-
}), r =
|
6567
|
+
}), r = Wt("authTokenSyncURL");
|
6553
6568
|
if (r && typeof isSecureContext == "boolean" && isSecureContext) {
|
6554
6569
|
const s = new URL(r, location.origin);
|
6555
6570
|
if (location.origin === s.origin) {
|
6556
|
-
const a =
|
6557
|
-
|
6571
|
+
const a = Ta(s.toString());
|
6572
|
+
ps(t, a, () => a(t.currentUser)), fs(t, (c) => a(c));
|
6558
6573
|
}
|
6559
6574
|
}
|
6560
6575
|
const i = Vt("auth");
|
6561
|
-
return i &&
|
6576
|
+
return i && is(t, `http://${i}`), t;
|
6562
6577
|
}
|
6563
|
-
function
|
6578
|
+
function ka() {
|
6564
6579
|
var n, e;
|
6565
6580
|
return (e = (n = document.getElementsByTagName("head")) === null || n === void 0 ? void 0 : n[0]) !== null && e !== void 0 ? e : document;
|
6566
6581
|
}
|
@@ -6569,26 +6584,26 @@ Qi({
|
|
6569
6584
|
return new Promise((e, t) => {
|
6570
6585
|
const r = document.createElement("script");
|
6571
6586
|
r.setAttribute("src", n), r.onload = e, r.onerror = (i) => {
|
6572
|
-
const s =
|
6587
|
+
const s = g(
|
6573
6588
|
"internal-error"
|
6574
6589
|
/* AuthErrorCode.INTERNAL_ERROR */
|
6575
6590
|
);
|
6576
6591
|
s.customData = i, t(s);
|
6577
|
-
}, r.type = "text/javascript", r.charset = "UTF-8",
|
6592
|
+
}, r.type = "text/javascript", r.charset = "UTF-8", ka().appendChild(r);
|
6578
6593
|
});
|
6579
6594
|
},
|
6580
6595
|
gapiScript: "https://apis.google.com/js/api.js",
|
6581
6596
|
recaptchaV2Script: "https://www.google.com/recaptcha/api.js",
|
6582
6597
|
recaptchaEnterpriseScript: "https://www.google.com/recaptcha/enterprise.js?render="
|
6583
6598
|
});
|
6584
|
-
|
6599
|
+
ba(
|
6585
6600
|
"Browser"
|
6586
6601
|
/* ClientPlatform.BROWSER */
|
6587
6602
|
);
|
6588
6603
|
const Aa = Ln({
|
6589
|
-
history:
|
6604
|
+
history: Mn(),
|
6590
6605
|
routes: [
|
6591
|
-
...
|
6606
|
+
...We,
|
6592
6607
|
...le,
|
6593
6608
|
{
|
6594
6609
|
path: "/forbidden",
|
@@ -6597,7 +6612,7 @@ const Aa = Ln({
|
|
6597
6612
|
}
|
6598
6613
|
]
|
6599
6614
|
});
|
6600
|
-
let
|
6615
|
+
let Ne, Le;
|
6601
6616
|
Aa.beforeEach(async (n) => {
|
6602
6617
|
const {
|
6603
6618
|
sessionUser: e,
|
@@ -6605,60 +6620,60 @@ Aa.beforeEach(async (n) => {
|
|
6605
6620
|
currentBusiness: r,
|
6606
6621
|
readRestaurants: i,
|
6607
6622
|
changeRestaurant: s
|
6608
|
-
} =
|
6623
|
+
} = je();
|
6609
6624
|
if (n.name.startsWith("mf-payment-admin")) {
|
6610
6625
|
if (!e.value) {
|
6611
|
-
|
6612
|
-
const o =
|
6613
|
-
var
|
6626
|
+
Ne || (Ne = new Promise((c) => {
|
6627
|
+
const o = q(e, (l) => {
|
6628
|
+
var u, h;
|
6614
6629
|
l && (o(), c(
|
6615
|
-
(((
|
6630
|
+
(((u = e.value) == null ? void 0 : u.role.isStaff) || ((h = e.value) == null ? void 0 : h.role.isAdmin)) ?? !1
|
6616
6631
|
));
|
6617
6632
|
});
|
6618
6633
|
}));
|
6619
|
-
const a = await
|
6634
|
+
const a = await Ne;
|
6620
6635
|
return a || { name: "mf-payment-forbidden" };
|
6621
6636
|
}
|
6622
6637
|
return !0;
|
6623
6638
|
}
|
6624
|
-
return !r.value || !t.value ? (
|
6639
|
+
return !r.value || !t.value ? (Le || (Le = Promise.all([
|
6625
6640
|
new Promise(async (a) => {
|
6626
|
-
const c =
|
6641
|
+
const c = q(r, (o) => {
|
6627
6642
|
o && (c(), a(!0));
|
6628
6643
|
});
|
6629
6644
|
}),
|
6630
6645
|
new Promise(async (a) => {
|
6631
|
-
const c =
|
6646
|
+
const c = q(t, (l) => {
|
6632
6647
|
l && (c(), a(!0));
|
6633
6648
|
}), o = await i();
|
6634
6649
|
await s(o == null ? void 0 : o.at(0));
|
6635
6650
|
})
|
6636
|
-
]).then((a) => !0)),
|
6651
|
+
]).then((a) => !0)), Le) : !0;
|
6637
6652
|
});
|
6638
|
-
const
|
6653
|
+
const Ca = /* @__PURE__ */ Mt({
|
6639
6654
|
__name: "AppSidebar",
|
6640
6655
|
setup(n) {
|
6641
|
-
const e =
|
6642
|
-
|
6656
|
+
const e = je(), t = Un(), { t: r } = jn(), i = Fn(t.currentRoute.value.name);
|
6657
|
+
q(t.currentRoute, () => {
|
6643
6658
|
let l = t.currentRoute.value.name;
|
6644
6659
|
t.currentRoute.value.meta.parent && (l = t.currentRoute.value.meta.parent), i.value = l;
|
6645
6660
|
});
|
6646
|
-
const s =
|
6647
|
-
var
|
6648
|
-
if (!((
|
6661
|
+
const s = We.map((l) => {
|
6662
|
+
var p;
|
6663
|
+
if (!((p = l.meta) != null && p.sidebarDisplay))
|
6649
6664
|
return;
|
6650
|
-
const
|
6651
|
-
label:
|
6665
|
+
const u = l.meta.sidebarDisplay, h = {
|
6666
|
+
label: u.startsWith("i18n:") ? r(u.replaceAll("i18n:", "")) : u,
|
6652
6667
|
value: l.name,
|
6653
6668
|
action: () => {
|
6654
6669
|
if (t.currentRoute.value.name !== l.name)
|
6655
6670
|
return t.push({ name: l.name });
|
6656
6671
|
}
|
6657
6672
|
};
|
6658
|
-
return l.meta.sidebarNew && (h.badge = () =>
|
6673
|
+
return l.meta.sidebarNew && (h.badge = () => Bn(zn.FmPill, { label: "New" })), h;
|
6659
6674
|
}).filter((l) => !!l), a = le.map((l) => {
|
6660
|
-
var
|
6661
|
-
if ((
|
6675
|
+
var u;
|
6676
|
+
if ((u = l.meta) != null && u.sidebarDisplay && !l.meta.section)
|
6662
6677
|
return {
|
6663
6678
|
label: l.meta.sidebarDisplay,
|
6664
6679
|
value: l.name,
|
@@ -6667,21 +6682,21 @@ const Na = /* @__PURE__ */ Ut({
|
|
6667
6682
|
return t.push({ name: l.name });
|
6668
6683
|
}
|
6669
6684
|
};
|
6670
|
-
}).filter((l) => !!l), c = (l) => le.map((
|
6685
|
+
}).filter((l) => !!l), c = (l) => le.map((u) => {
|
6671
6686
|
var h;
|
6672
|
-
if ((h =
|
6687
|
+
if ((h = u.meta) != null && h.sidebarDisplay && u.meta.section === l)
|
6673
6688
|
return {
|
6674
|
-
label:
|
6675
|
-
value:
|
6689
|
+
label: u.meta.sidebarDisplay,
|
6690
|
+
value: u.name,
|
6676
6691
|
action: () => {
|
6677
|
-
if (t.currentRoute.value.name !==
|
6678
|
-
return t.push({ name:
|
6692
|
+
if (t.currentRoute.value.name !== u.name)
|
6693
|
+
return t.push({ name: u.name });
|
6679
6694
|
}
|
6680
6695
|
};
|
6681
|
-
}).filter((
|
6682
|
-
var
|
6696
|
+
}).filter((u) => !!u), o = Lt(() => {
|
6697
|
+
var u, h;
|
6683
6698
|
const l = [...s];
|
6684
|
-
return ((
|
6699
|
+
return ((u = e.sessionUser.value) != null && u.role.isStaff || (h = e.sessionUser.value) != null && h.role.isAdmin) && (l.push({
|
6685
6700
|
label: "",
|
6686
6701
|
value: "divider",
|
6687
6702
|
disabled: !0
|
@@ -6710,56 +6725,56 @@ const Na = /* @__PURE__ */ Ut({
|
|
6710
6725
|
disabled: !0
|
6711
6726
|
}), l.push(...a)), l;
|
6712
6727
|
});
|
6713
|
-
return (l,
|
6714
|
-
const h =
|
6715
|
-
return xt(),
|
6728
|
+
return (l, u) => {
|
6729
|
+
const h = Ut("FmCollapsibleTabs");
|
6730
|
+
return xt(), Ft(h, {
|
6716
6731
|
modelValue: i.value,
|
6717
|
-
"onUpdate:modelValue":
|
6732
|
+
"onUpdate:modelValue": u[0] || (u[0] = (p) => i.value = p),
|
6718
6733
|
items: o.value,
|
6719
6734
|
class: "py-16 px-8 w-[240px]"
|
6720
6735
|
}, null, 8, ["modelValue", "items"]);
|
6721
6736
|
};
|
6722
6737
|
}
|
6723
6738
|
});
|
6724
|
-
var
|
6725
|
-
const xa = /* @__PURE__ */
|
6739
|
+
var Ra = { authClientId: "1a362d621873497b277ea55258cc82594ba148d235257f7bd44ea2acc132d8a4", googleMap: "AIzaSyA_isPR1-9bX7UmRiJIhsIRNNwdn6DdmW4", firebase: { apiKey: "AIzaSyAj8JdCHtP0Vc5vZobCfgoLzWxPIn0WUG4", authDomain: "feedme-dev-4c3ef.firebaseapp.com", databaseURL: "https://feedme-dev-4c3ef.firebaseio.com", projectId: "feedme-dev-4c3ef", storageBucket: "feedme-dev-4c3ef.appspot.com", messagingSenderId: "458797803788", appId: "1:458797803788:web:37f2af2926a84288f0c129", measurementId: "G-J2QG09D2Q7" }, assetBucketUrl: "feedme-dev-4c3ef.appspot.com" };
|
6740
|
+
const xa = /* @__PURE__ */ Mt({
|
6726
6741
|
__name: "App",
|
6727
6742
|
setup(n) {
|
6728
|
-
const { state: e } =
|
6743
|
+
const { state: e } = Yn(), t = je(), r = xn(), i = Jt(Ra.firebase);
|
6729
6744
|
async function s() {
|
6730
6745
|
const a = t.sessionUser.value;
|
6731
6746
|
if (!a || !a.token) return;
|
6732
|
-
const c = await a.getCustomToken(), o =
|
6733
|
-
await
|
6747
|
+
const c = await a.getCustomToken(), o = Sa(i);
|
6748
|
+
await hs(o, c);
|
6734
6749
|
}
|
6735
|
-
return s(),
|
6750
|
+
return s(), q(t.sessionUser, s), $n(() => {
|
6736
6751
|
e.isIframe && parent.postMessage({ event: "ready" }, "*");
|
6737
|
-
}),
|
6738
|
-
t.registerSidebarComponent(
|
6752
|
+
}), Hn(() => {
|
6753
|
+
t.registerSidebarComponent(Ca);
|
6739
6754
|
}), (a, c) => {
|
6740
|
-
const o =
|
6741
|
-
return xt(),
|
6755
|
+
const o = Ut("RouterView");
|
6756
|
+
return xt(), Ft(o, {
|
6742
6757
|
key: Vn(r).path
|
6743
6758
|
});
|
6744
6759
|
};
|
6745
6760
|
}
|
6746
|
-
}),
|
6747
|
-
"en-US":
|
6748
|
-
"zh-CN":
|
6749
|
-
},
|
6761
|
+
}), Fa = {
|
6762
|
+
"en-US": qn,
|
6763
|
+
"zh-CN": Jn
|
6764
|
+
}, Ba = [...le, ...We];
|
6750
6765
|
export {
|
6751
|
-
|
6752
|
-
|
6766
|
+
W as C,
|
6767
|
+
L as F,
|
6753
6768
|
ee as S,
|
6754
6769
|
J as _,
|
6755
|
-
|
6756
|
-
|
6757
|
-
|
6758
|
-
|
6770
|
+
Kt as a,
|
6771
|
+
Ma as b,
|
6772
|
+
_i as c,
|
6773
|
+
Ua as d,
|
6759
6774
|
gt as e,
|
6760
|
-
|
6775
|
+
Ba as f,
|
6761
6776
|
z as g,
|
6762
6777
|
xa as h,
|
6763
|
-
|
6764
|
-
|
6778
|
+
Fa as i,
|
6779
|
+
$ as r
|
6765
6780
|
};
|