@feedmepos/mf-payment 1.5.5 → 1.5.6-dev
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/{Actions.vue_vue_type_script_setup_true_lang-BLXnOuCw.js → Actions.vue_vue_type_script_setup_true_lang-Cwt13ALm.js} +2 -2
- package/dist/{Chargeback-19afdT_4.js → Chargeback-BdT_s3at.js} +5 -5
- package/dist/{DocumentViewer.vue_vue_type_script_setup_true_lang-C-5XOuTl.js → DocumentViewer.vue_vue_type_script_setup_true_lang-CTA026mA.js} +1 -1
- package/dist/{OnboardForm-BJSHk-cq.js → OnboardForm-BGM0rOan.js} +5 -5
- package/dist/{OnboardForm-BK2DIdR7.js → OnboardForm-BsgH4rQ8.js} +5 -5
- package/dist/{OnboardSubmission-Dj8AGb69.js → OnboardSubmission-DcFt464S.js} +5 -5
- package/dist/{OnboardSubmission-B-leoVPo.js → OnboardSubmission-DrWzegfK.js} +2 -2
- package/dist/{PayoutAccount-DoTiFzIL.js → PayoutAccount-5spM7Xnv.js} +5 -5
- package/dist/{PayoutAccount-SfVNXkci.js → PayoutAccount-D1NqkA8w.js} +4 -4
- package/dist/PayoutAccountSetting-BSmvV6yF.js +1359 -0
- package/dist/{Restaurant-ZiTHtFZJ.js → Restaurant-DCycaRR7.js} +4 -4
- package/dist/{RestaurantSetting-M1jYaGwx.js → RestaurantSetting-D6s1uPMz.js} +3 -3
- package/dist/{Settlement-D_nmqYEC.js → Settlement-DHebMBfs.js} +3 -3
- package/dist/{Settlement-Cj2W8VfH.js → Settlement-DlplAJW2.js} +3 -3
- package/dist/{SettlementTransactions-DvO6XMC4.js → SettlementTransactions-BB3jFvdP.js} +4 -4
- package/dist/{SettlementTransactions-DQZUsieX.js → SettlementTransactions-D1FZ4SvU.js} +4 -4
- package/dist/{Status.vue_vue_type_script_setup_true_lang-BP5m6Vic.js → Status.vue_vue_type_script_setup_true_lang-BsbxaRKL.js} +1 -1
- package/dist/{Terminal-CoPPPePw.js → Terminal-DOf20nIw.js} +5 -5
- package/dist/{TerminalSetting-PWs1fyFe.js → TerminalSetting-fwdOkBMF.js} +3 -3
- package/dist/{Transaction-C6CtVbqB.js → Transaction-BojSMumb.js} +6 -6
- package/dist/{Transaction-DHTahbbJ.js → Transaction-DRc7VdWm.js} +9 -9
- package/dist/{TransactionOld-Cvqw-Osm.js → TransactionOld-CVid_gM_.js} +6 -6
- package/dist/{app-C3eKGkJf.js → app-DewutbV3.js} +526 -518
- package/dist/app.js +5 -4
- package/dist/{assets-V6CPweA9.js → assets-BnwoyNOf.js} +1 -1
- package/dist/{grafana-fZyobMgN.js → grafana-Bz7xSfdW.js} +1 -1
- package/dist/{index-_u7l8cO3.js → index-6TNmNay6.js} +1 -1
- package/dist/{index-CMN40t8e.js → index-BGliGchf.js} +1 -1
- package/dist/{index-C-YBwRQp.js → index-BcpQUz2-.js} +1 -1
- package/dist/{index-CtkwL_6R.js → index-Bi2r6bNV.js} +1 -1
- package/dist/{index-CbONxZz2.js → index-D68osbqj.js} +2 -2
- package/dist/{index-D69RnDa7.js → index-DaMy_lQ6.js} +1 -1
- package/dist/{index-eLZ3BErV.js → index-DqW_m_SE.js} +1 -1
- package/dist/{index-BJNCcdvT.js → index-Dqk3bGgi.js} +5503 -5504
- package/dist/{index--K2ipr4H.js → index-DyEaoZ8f.js} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-zxkA_YTt.js → index.vue_vue_type_script_setup_true_lang-D6hndvwu.js} +1 -1
- package/dist/package.json +2 -2
- package/dist/{payout-account-D4xWK_RQ.js → payout-account-BTAtskf1.js} +3 -3
- package/dist/stores/payoutAccount.d.ts +30 -22
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/views/admin/payout-account/cell/MinimumFeeInput.vue.d.ts +6 -0
- package/dist/views/admin/payout-account/tabs/Information.vue.d.ts +30 -22
- package/dist/views/admin/payout-account/tabs/PaymentChannel.vue.d.ts +30 -22
- package/dist/views/admin/payout-account/tabs/PaymentGateway.vue.d.ts +30 -22
- package/dist/views/admin/payout-account/tabs/PaymentStatus.vue.d.ts +32 -24
- package/dist/views/admin/payout-account/tabs/Settlement.vue.d.ts +30 -22
- package/dist/views/admin/payout-account/tabs/TokenGateway.vue.d.ts +30 -22
- package/dist/views/admin/terminal/TerminalDialog.vue.d.ts +8 -8
- package/dist/views/admin/terminal/tabs/EcrGateway.vue.d.ts +8 -8
- package/dist/views/admin/terminal/tabs/Information.vue.d.ts +8 -8
- package/dist/views/admin/terminal/tabs/QrGateway.vue.d.ts +8 -8
- package/dist/views/admin/terminal/tabs/SettingRequest.vue.d.ts +8 -8
- package/dist/views/admin/terminal/tabs/SoftposGateway.vue.d.ts +8 -8
- package/dist/views/admin/terminal/tabs/ecr/Ghl2Gateway.vue.d.ts +8 -8
- package/dist/views/admin/terminal/tabs/ecr/Ghl3Gateway.vue.d.ts +8 -8
- package/dist/views/admin/terminal/tabs/ecr/GhlGateway.vue.d.ts +8 -8
- package/dist/views/admin/terminal/tabs/ecr/HlbbGateway.vue.d.ts +8 -8
- package/dist/views/admin/terminal/tabs/ecr/KBankGateway.vue.d.ts +8 -8
- package/dist/views/admin/terminal/tabs/ecr/Maybank2Gateway.vue.d.ts +8 -8
- package/dist/views/admin/terminal/tabs/ecr/Maybank3Gateway.vue.d.ts +8 -8
- package/dist/views/admin/terminal/tabs/ecr/MaybankGateway.vue.d.ts +8 -8
- package/dist/views/admin/terminal/tabs/ecr/NetsGateway.vue.d.ts +8 -8
- package/dist/views/admin/terminal/tabs/ecr/TerminalGateway.vue.d.ts +8 -8
- package/dist/views/admin/terminal/tabs/qr/PromptPayGateway.vue.d.ts +8 -8
- package/dist/views/admin/terminal/tabs/settings/KioskMode.vue.d.ts +8 -8
- package/dist/views/payout-account/PayoutAccountTable.vue.d.ts +60 -44
- package/dist/views/settlement/FiuuSettlementTable.vue.d.ts +52 -52
- package/dist/views/settlement/FiuuSettlementTransactions.vue.d.ts +26 -26
- package/package.json +2 -2
- package/dist/PayoutAccountSetting-DzkmUdgK.js +0 -1318
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
1
|
+
import { FmApp as Nn, routes as Ln, i18nMessages as Mn } from "@feedmepos/mf-financing";
|
|
2
|
+
import { createRouter as Un, createWebHistory as xn, useRouter as Fn, useRoute as Bn } from "vue-router";
|
|
3
|
+
import { computed as Nt, watch as q, defineComponent as Lt, ref as $n, resolveComponent as Mt, openBlock as Ut, createBlock as xt, h as Hn, onMounted as Vn, onBeforeMount as jn, unref as Wn } from "vue";
|
|
4
|
+
import { useCoreStore as je, useI18n as zn } from "@feedmepos/mf-common";
|
|
5
|
+
import { defineStore as Gn } from "pinia";
|
|
6
|
+
import { components as qn } from "@feedmepos/ui-library";
|
|
7
|
+
const Kn = {
|
|
7
8
|
components: {
|
|
8
9
|
select: "Select filter entity",
|
|
9
10
|
restaurant: "Restaurant",
|
|
@@ -178,9 +179,9 @@ const zn = {
|
|
|
178
179
|
service2: "SoftPOS Card Payment"
|
|
179
180
|
}
|
|
180
181
|
}
|
|
181
|
-
},
|
|
182
|
-
payment:
|
|
183
|
-
},
|
|
182
|
+
}, Jn = {
|
|
183
|
+
payment: Kn
|
|
184
|
+
}, Yn = {
|
|
184
185
|
components: {
|
|
185
186
|
select: "选择筛选对象",
|
|
186
187
|
restaurant: "餐厅",
|
|
@@ -355,8 +356,8 @@ const zn = {
|
|
|
355
356
|
service2: "SoftPOS银行卡支付"
|
|
356
357
|
}
|
|
357
358
|
}
|
|
358
|
-
},
|
|
359
|
-
payment:
|
|
359
|
+
}, Xn = {
|
|
360
|
+
payment: Yn
|
|
360
361
|
}, K = [
|
|
361
362
|
{
|
|
362
363
|
path: "/admin/restaurants",
|
|
@@ -365,7 +366,7 @@ const zn = {
|
|
|
365
366
|
sidebarDisplay: "Restaurants",
|
|
366
367
|
section: "payment-gateway"
|
|
367
368
|
},
|
|
368
|
-
component: () => import("./Restaurant-
|
|
369
|
+
component: () => import("./Restaurant-DCycaRR7.js")
|
|
369
370
|
},
|
|
370
371
|
{
|
|
371
372
|
path: "/admin/restaurants/:restaurantId",
|
|
@@ -374,7 +375,7 @@ const zn = {
|
|
|
374
375
|
meta: {
|
|
375
376
|
parent: "mf-payment-admin.restaurant"
|
|
376
377
|
},
|
|
377
|
-
component: () => import("./RestaurantSetting-
|
|
378
|
+
component: () => import("./RestaurantSetting-D6s1uPMz.js")
|
|
378
379
|
},
|
|
379
380
|
{
|
|
380
381
|
path: "/admin/payout-accounts",
|
|
@@ -383,7 +384,7 @@ const zn = {
|
|
|
383
384
|
sidebarDisplay: "Payout Accounts",
|
|
384
385
|
section: "payment-gateway"
|
|
385
386
|
},
|
|
386
|
-
component: () => import("./PayoutAccount-
|
|
387
|
+
component: () => import("./PayoutAccount-5spM7Xnv.js")
|
|
387
388
|
},
|
|
388
389
|
{
|
|
389
390
|
path: "/admin/payout-accounts/:accountId",
|
|
@@ -392,7 +393,7 @@ const zn = {
|
|
|
392
393
|
meta: {
|
|
393
394
|
parent: "mf-payment-admin.payout-account"
|
|
394
395
|
},
|
|
395
|
-
component: () => import("./PayoutAccountSetting-
|
|
396
|
+
component: () => import("./PayoutAccountSetting-BSmvV6yF.js")
|
|
396
397
|
},
|
|
397
398
|
{
|
|
398
399
|
path: "/admin/onboarding",
|
|
@@ -401,7 +402,7 @@ const zn = {
|
|
|
401
402
|
sidebarDisplay: "Payment Onboarding",
|
|
402
403
|
section: "payment-gateway"
|
|
403
404
|
},
|
|
404
|
-
component: () => import("./OnboardSubmission-
|
|
405
|
+
component: () => import("./OnboardSubmission-DcFt464S.js")
|
|
405
406
|
},
|
|
406
407
|
{
|
|
407
408
|
path: "/admin/onboarding/:submissionId",
|
|
@@ -410,7 +411,7 @@ const zn = {
|
|
|
410
411
|
meta: {
|
|
411
412
|
parent: "mf-payment-admin.onboard-submission"
|
|
412
413
|
},
|
|
413
|
-
component: () => import("./OnboardForm-
|
|
414
|
+
component: () => import("./OnboardForm-BsgH4rQ8.js")
|
|
414
415
|
},
|
|
415
416
|
{
|
|
416
417
|
path: "/admin/terminal/pos",
|
|
@@ -419,7 +420,7 @@ const zn = {
|
|
|
419
420
|
sidebarDisplay: "POS",
|
|
420
421
|
section: "device"
|
|
421
422
|
},
|
|
422
|
-
component: () => import("./Terminal-
|
|
423
|
+
component: () => import("./Terminal-DOf20nIw.js"),
|
|
423
424
|
props: {
|
|
424
425
|
type: "POS"
|
|
425
426
|
}
|
|
@@ -431,7 +432,7 @@ const zn = {
|
|
|
431
432
|
sidebarDisplay: "Kiosks",
|
|
432
433
|
section: "device"
|
|
433
434
|
},
|
|
434
|
-
component: () => import("./Terminal-
|
|
435
|
+
component: () => import("./Terminal-DOf20nIw.js"),
|
|
435
436
|
props: {
|
|
436
437
|
type: "KIOSK"
|
|
437
438
|
}
|
|
@@ -443,7 +444,7 @@ const zn = {
|
|
|
443
444
|
sidebarDisplay: "Terminals",
|
|
444
445
|
section: "device"
|
|
445
446
|
},
|
|
446
|
-
component: () => import("./Terminal-
|
|
447
|
+
component: () => import("./Terminal-DOf20nIw.js"),
|
|
447
448
|
props: {
|
|
448
449
|
type: "TERMINAL"
|
|
449
450
|
}
|
|
@@ -455,7 +456,7 @@ const zn = {
|
|
|
455
456
|
meta: {
|
|
456
457
|
parent: "mf-payment-admin.pos"
|
|
457
458
|
},
|
|
458
|
-
component: () => import("./TerminalSetting-
|
|
459
|
+
component: () => import("./TerminalSetting-fwdOkBMF.js")
|
|
459
460
|
},
|
|
460
461
|
{
|
|
461
462
|
path: "/admin/terminal/kiosk/:terminalId",
|
|
@@ -464,7 +465,7 @@ const zn = {
|
|
|
464
465
|
meta: {
|
|
465
466
|
parent: "mf-payment-admin.kiosk"
|
|
466
467
|
},
|
|
467
|
-
component: () => import("./TerminalSetting-
|
|
468
|
+
component: () => import("./TerminalSetting-fwdOkBMF.js")
|
|
468
469
|
},
|
|
469
470
|
{
|
|
470
471
|
path: "/admin/terminal/terminal/:terminalId",
|
|
@@ -473,7 +474,7 @@ const zn = {
|
|
|
473
474
|
meta: {
|
|
474
475
|
parent: "mf-payment-admin.terminal"
|
|
475
476
|
},
|
|
476
|
-
component: () => import("./TerminalSetting-
|
|
477
|
+
component: () => import("./TerminalSetting-fwdOkBMF.js")
|
|
477
478
|
},
|
|
478
479
|
{
|
|
479
480
|
path: "/admin/transaction",
|
|
@@ -481,7 +482,7 @@ const zn = {
|
|
|
481
482
|
meta: {
|
|
482
483
|
sidebarDisplay: "Transactions"
|
|
483
484
|
},
|
|
484
|
-
component: () => import("./Transaction-
|
|
485
|
+
component: () => import("./Transaction-BojSMumb.js")
|
|
485
486
|
},
|
|
486
487
|
{
|
|
487
488
|
path: "/admin/chargeback",
|
|
@@ -489,7 +490,7 @@ const zn = {
|
|
|
489
490
|
meta: {
|
|
490
491
|
sidebarDisplay: "Chargebacks"
|
|
491
492
|
},
|
|
492
|
-
component: () => import("./Chargeback-
|
|
493
|
+
component: () => import("./Chargeback-BdT_s3at.js")
|
|
493
494
|
},
|
|
494
495
|
{
|
|
495
496
|
path: "/admin/settlement",
|
|
@@ -497,7 +498,7 @@ const zn = {
|
|
|
497
498
|
meta: {
|
|
498
499
|
sidebarDisplay: "Settlements"
|
|
499
500
|
},
|
|
500
|
-
component: () => import("./Settlement-
|
|
501
|
+
component: () => import("./Settlement-DHebMBfs.js")
|
|
501
502
|
},
|
|
502
503
|
{
|
|
503
504
|
path: "/admin/settlement/:settlementId",
|
|
@@ -506,9 +507,9 @@ const zn = {
|
|
|
506
507
|
meta: {
|
|
507
508
|
parent: "mf-payment-admin.settlement"
|
|
508
509
|
},
|
|
509
|
-
component: () => import("./SettlementTransactions-
|
|
510
|
+
component: () => import("./SettlementTransactions-BB3jFvdP.js")
|
|
510
511
|
}
|
|
511
|
-
],
|
|
512
|
+
], ue = [
|
|
512
513
|
{
|
|
513
514
|
path: "",
|
|
514
515
|
redirect: { name: "mf-payment-payout-account" }
|
|
@@ -516,7 +517,7 @@ const zn = {
|
|
|
516
517
|
{
|
|
517
518
|
path: "/payout-account",
|
|
518
519
|
name: "mf-payment-payout-account",
|
|
519
|
-
component: () => import("./PayoutAccount-
|
|
520
|
+
component: () => import("./PayoutAccount-D1NqkA8w.js"),
|
|
520
521
|
meta: {
|
|
521
522
|
sidebarDisplay: "i18n:payment.routes.payout_account"
|
|
522
523
|
}
|
|
@@ -524,7 +525,7 @@ const zn = {
|
|
|
524
525
|
{
|
|
525
526
|
path: "/onboard-submission",
|
|
526
527
|
name: "mf-payment-onboard-submission",
|
|
527
|
-
component: () => import("./OnboardSubmission-
|
|
528
|
+
component: () => import("./OnboardSubmission-DrWzegfK.js"),
|
|
528
529
|
meta: {
|
|
529
530
|
sidebarDisplay: "i18n:payment.routes.onboard_submission",
|
|
530
531
|
region: { MY: !0 }
|
|
@@ -534,7 +535,7 @@ const zn = {
|
|
|
534
535
|
path: "/onboard-submission/:type/:submission?",
|
|
535
536
|
name: "mf-payment-onboard-submission-form",
|
|
536
537
|
props: !0,
|
|
537
|
-
component: () => import("./OnboardForm-
|
|
538
|
+
component: () => import("./OnboardForm-BGM0rOan.js"),
|
|
538
539
|
meta: {
|
|
539
540
|
parent: "mf-payment-onboard-submission"
|
|
540
541
|
}
|
|
@@ -542,7 +543,7 @@ const zn = {
|
|
|
542
543
|
{
|
|
543
544
|
path: "/transaction-old",
|
|
544
545
|
name: "mf-payment-old-transaction",
|
|
545
|
-
component: () => import("./TransactionOld-
|
|
546
|
+
component: () => import("./TransactionOld-CVid_gM_.js"),
|
|
546
547
|
meta: {
|
|
547
548
|
sidebarDisplay: "i18n:payment.routes.transaction"
|
|
548
549
|
}
|
|
@@ -550,7 +551,7 @@ const zn = {
|
|
|
550
551
|
{
|
|
551
552
|
path: "/transaction",
|
|
552
553
|
name: "mf-payment-transaction",
|
|
553
|
-
component: () => import("./Transaction-
|
|
554
|
+
component: () => import("./Transaction-DRc7VdWm.js"),
|
|
554
555
|
meta: {
|
|
555
556
|
sidebarDisplay: "i18n:payment.routes.transaction-new",
|
|
556
557
|
sidebarNew: !0
|
|
@@ -559,7 +560,7 @@ const zn = {
|
|
|
559
560
|
{
|
|
560
561
|
path: "/settlement",
|
|
561
562
|
name: "mf-payment-settlement",
|
|
562
|
-
component: () => import("./Settlement-
|
|
563
|
+
component: () => import("./Settlement-DlplAJW2.js"),
|
|
563
564
|
meta: {
|
|
564
565
|
sidebarDisplay: "i18n:payment.routes.settlement"
|
|
565
566
|
}
|
|
@@ -568,28 +569,28 @@ const zn = {
|
|
|
568
569
|
path: "/settlement/:settlementId",
|
|
569
570
|
name: "mf-payment-settlement-transaction",
|
|
570
571
|
props: !0,
|
|
571
|
-
component: () => import("./SettlementTransactions-
|
|
572
|
+
component: () => import("./SettlementTransactions-D1FZ4SvU.js"),
|
|
572
573
|
meta: {
|
|
573
574
|
parent: "mf-payment-settlement"
|
|
574
575
|
}
|
|
576
|
+
},
|
|
577
|
+
{
|
|
578
|
+
path: "/financing",
|
|
579
|
+
name: "mf-payment-financing",
|
|
580
|
+
component: Nn,
|
|
581
|
+
meta: {
|
|
582
|
+
useChildrenRoutes: !0
|
|
583
|
+
},
|
|
584
|
+
children: Ln.map((n) => ({
|
|
585
|
+
...n,
|
|
586
|
+
meta: {
|
|
587
|
+
...n.meta,
|
|
588
|
+
section: "financing"
|
|
589
|
+
},
|
|
590
|
+
path: `/financing${n.path}`
|
|
591
|
+
}))
|
|
575
592
|
}
|
|
576
|
-
|
|
577
|
-
// path: "/financing",
|
|
578
|
-
// name: "mf-payment-financing",
|
|
579
|
-
// component: FinacingApp,
|
|
580
|
-
// meta: {
|
|
581
|
-
// useChildrenRoutes: true,
|
|
582
|
-
// },
|
|
583
|
-
// children: financingRoutes.map((route) => ({
|
|
584
|
-
// ...route,
|
|
585
|
-
// meta: {
|
|
586
|
-
// ...route.meta,
|
|
587
|
-
// section: "financing",
|
|
588
|
-
// },
|
|
589
|
-
// path: `/financing${route.path}`,
|
|
590
|
-
// })),
|
|
591
|
-
// },
|
|
592
|
-
], Jn = jn("mf-payment-iframe", () => {
|
|
593
|
+
], Qn = Gn("mf-payment-iframe", () => {
|
|
593
594
|
const n = {
|
|
594
595
|
isIframe: !1
|
|
595
596
|
}, e = Nt(() => n);
|
|
@@ -633,7 +634,7 @@ const zn = {
|
|
|
633
634
|
* See the License for the specific language governing permissions and
|
|
634
635
|
* limitations under the License.
|
|
635
636
|
*/
|
|
636
|
-
const
|
|
637
|
+
const Ft = function(n) {
|
|
637
638
|
const e = [];
|
|
638
639
|
let t = 0;
|
|
639
640
|
for (let r = 0; r < n.length; r++) {
|
|
@@ -641,7 +642,7 @@ const Bt = function(n) {
|
|
|
641
642
|
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);
|
|
642
643
|
}
|
|
643
644
|
return e;
|
|
644
|
-
},
|
|
645
|
+
}, Zn = function(n) {
|
|
645
646
|
const e = [];
|
|
646
647
|
let t = 0, r = 0;
|
|
647
648
|
for (; t < n.length; ) {
|
|
@@ -660,7 +661,7 @@ const Bt = function(n) {
|
|
|
660
661
|
}
|
|
661
662
|
}
|
|
662
663
|
return e.join("");
|
|
663
|
-
},
|
|
664
|
+
}, Bt = {
|
|
664
665
|
/**
|
|
665
666
|
* Maps bytes to characters.
|
|
666
667
|
*/
|
|
@@ -734,7 +735,7 @@ const Bt = function(n) {
|
|
|
734
735
|
* @return The base64 encoded string.
|
|
735
736
|
*/
|
|
736
737
|
encodeString(n, e) {
|
|
737
|
-
return this.HAS_NATIVE_SUPPORT && !e ? btoa(n) : this.encodeByteArray(
|
|
738
|
+
return this.HAS_NATIVE_SUPPORT && !e ? btoa(n) : this.encodeByteArray(Ft(n), e);
|
|
738
739
|
},
|
|
739
740
|
/**
|
|
740
741
|
* Base64-decode a string.
|
|
@@ -745,7 +746,7 @@ const Bt = function(n) {
|
|
|
745
746
|
* @return string representing the decoded value.
|
|
746
747
|
*/
|
|
747
748
|
decodeString(n, e) {
|
|
748
|
-
return this.HAS_NATIVE_SUPPORT && !e ? atob(n) :
|
|
749
|
+
return this.HAS_NATIVE_SUPPORT && !e ? atob(n) : Zn(this.decodeStringToByteArray(n, e));
|
|
749
750
|
},
|
|
750
751
|
/**
|
|
751
752
|
* Base64-decode a string.
|
|
@@ -772,13 +773,13 @@ const Bt = function(n) {
|
|
|
772
773
|
++i;
|
|
773
774
|
const d = i < n.length ? t[n.charAt(i)] : 64;
|
|
774
775
|
if (++i, s == null || c == null || l == null || d == null)
|
|
775
|
-
throw new
|
|
776
|
+
throw new er();
|
|
776
777
|
const p = s << 2 | c >> 4;
|
|
777
778
|
if (r.push(p), l !== 64) {
|
|
778
779
|
const m = c << 4 & 240 | l >> 2;
|
|
779
780
|
if (r.push(m), d !== 64) {
|
|
780
|
-
const
|
|
781
|
-
r.push(
|
|
781
|
+
const F = l << 6 & 192 | d;
|
|
782
|
+
r.push(F);
|
|
782
783
|
}
|
|
783
784
|
}
|
|
784
785
|
}
|
|
@@ -797,19 +798,19 @@ const Bt = function(n) {
|
|
|
797
798
|
}
|
|
798
799
|
}
|
|
799
800
|
};
|
|
800
|
-
class
|
|
801
|
+
class er extends Error {
|
|
801
802
|
constructor() {
|
|
802
803
|
super(...arguments), this.name = "DecodeBase64StringError";
|
|
803
804
|
}
|
|
804
805
|
}
|
|
805
|
-
const
|
|
806
|
-
const e =
|
|
807
|
-
return
|
|
806
|
+
const tr = function(n) {
|
|
807
|
+
const e = Ft(n);
|
|
808
|
+
return Bt.encodeByteArray(e, !0);
|
|
808
809
|
}, $t = function(n) {
|
|
809
|
-
return
|
|
810
|
+
return tr(n).replace(/\./g, "");
|
|
810
811
|
}, Ht = function(n) {
|
|
811
812
|
try {
|
|
812
|
-
return
|
|
813
|
+
return Bt.decodeString(n, !0);
|
|
813
814
|
} catch (e) {
|
|
814
815
|
console.error("base64Decode failed: ", e);
|
|
815
816
|
}
|
|
@@ -831,7 +832,7 @@ const Qn = function(n) {
|
|
|
831
832
|
* See the License for the specific language governing permissions and
|
|
832
833
|
* limitations under the License.
|
|
833
834
|
*/
|
|
834
|
-
function
|
|
835
|
+
function nr() {
|
|
835
836
|
if (typeof self < "u")
|
|
836
837
|
return self;
|
|
837
838
|
if (typeof window < "u")
|
|
@@ -856,13 +857,13 @@ function Zn() {
|
|
|
856
857
|
* See the License for the specific language governing permissions and
|
|
857
858
|
* limitations under the License.
|
|
858
859
|
*/
|
|
859
|
-
const
|
|
860
|
+
const rr = () => nr().__FIREBASE_DEFAULTS__, ir = () => {
|
|
860
861
|
if (typeof process > "u" || typeof process.env > "u")
|
|
861
862
|
return;
|
|
862
863
|
const n = process.env.__FIREBASE_DEFAULTS__;
|
|
863
864
|
if (n)
|
|
864
865
|
return JSON.parse(n);
|
|
865
|
-
},
|
|
866
|
+
}, sr = () => {
|
|
866
867
|
if (typeof document > "u")
|
|
867
868
|
return;
|
|
868
869
|
let n;
|
|
@@ -875,12 +876,12 @@ const er = () => Zn().__FIREBASE_DEFAULTS__, tr = () => {
|
|
|
875
876
|
return e && JSON.parse(e);
|
|
876
877
|
}, We = () => {
|
|
877
878
|
try {
|
|
878
|
-
return
|
|
879
|
+
return rr() || ir() || sr();
|
|
879
880
|
} catch (n) {
|
|
880
881
|
console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${n}`);
|
|
881
882
|
return;
|
|
882
883
|
}
|
|
883
|
-
},
|
|
884
|
+
}, ar = (n) => {
|
|
884
885
|
var e, t;
|
|
885
886
|
return (t = (e = We()) === null || e === void 0 ? void 0 : e.emulatorHosts) === null || t === void 0 ? void 0 : t[n];
|
|
886
887
|
}, Vt = () => {
|
|
@@ -906,7 +907,7 @@ const er = () => Zn().__FIREBASE_DEFAULTS__, tr = () => {
|
|
|
906
907
|
* See the License for the specific language governing permissions and
|
|
907
908
|
* limitations under the License.
|
|
908
909
|
*/
|
|
909
|
-
class
|
|
910
|
+
class or {
|
|
910
911
|
constructor() {
|
|
911
912
|
this.reject = () => {
|
|
912
913
|
}, this.resolve = () => {
|
|
@@ -945,33 +946,33 @@ class ir {
|
|
|
945
946
|
function g() {
|
|
946
947
|
return typeof navigator < "u" && typeof navigator.userAgent == "string" ? navigator.userAgent : "";
|
|
947
948
|
}
|
|
948
|
-
function
|
|
949
|
+
function cr() {
|
|
949
950
|
return typeof window < "u" && // @ts-ignore Setting up an broadly applicable index signature for Window
|
|
950
951
|
// just to deal with this case would probably be a bad idea.
|
|
951
952
|
!!(window.cordova || window.phonegap || window.PhoneGap) && /ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(g());
|
|
952
953
|
}
|
|
953
|
-
function
|
|
954
|
+
function lr() {
|
|
954
955
|
return typeof navigator < "u" && navigator.userAgent === "Cloudflare-Workers";
|
|
955
956
|
}
|
|
956
|
-
function
|
|
957
|
+
function ur() {
|
|
957
958
|
const n = typeof chrome == "object" ? chrome.runtime : typeof browser == "object" ? browser.runtime : void 0;
|
|
958
959
|
return typeof n == "object" && n.id !== void 0;
|
|
959
960
|
}
|
|
960
|
-
function
|
|
961
|
+
function dr() {
|
|
961
962
|
return typeof navigator == "object" && navigator.product === "ReactNative";
|
|
962
963
|
}
|
|
963
|
-
function
|
|
964
|
+
function hr() {
|
|
964
965
|
const n = g();
|
|
965
966
|
return n.indexOf("MSIE ") >= 0 || n.indexOf("Trident/") >= 0;
|
|
966
967
|
}
|
|
967
|
-
function
|
|
968
|
+
function fr() {
|
|
968
969
|
try {
|
|
969
970
|
return typeof indexedDB == "object";
|
|
970
971
|
} catch {
|
|
971
972
|
return !1;
|
|
972
973
|
}
|
|
973
974
|
}
|
|
974
|
-
function
|
|
975
|
+
function pr() {
|
|
975
976
|
return new Promise((n, e) => {
|
|
976
977
|
try {
|
|
977
978
|
let t = !0;
|
|
@@ -1005,10 +1006,10 @@ function dr() {
|
|
|
1005
1006
|
* See the License for the specific language governing permissions and
|
|
1006
1007
|
* limitations under the License.
|
|
1007
1008
|
*/
|
|
1008
|
-
const
|
|
1009
|
+
const mr = "FirebaseError";
|
|
1009
1010
|
class L extends Error {
|
|
1010
1011
|
constructor(e, t, r) {
|
|
1011
|
-
super(t), this.code = e, this.customData = r, this.name =
|
|
1012
|
+
super(t), this.code = e, this.customData = r, this.name = mr, Object.setPrototypeOf(this, L.prototype), Error.captureStackTrace && Error.captureStackTrace(this, Z.prototype.create);
|
|
1012
1013
|
}
|
|
1013
1014
|
}
|
|
1014
1015
|
class Z {
|
|
@@ -1016,24 +1017,24 @@ class Z {
|
|
|
1016
1017
|
this.service = e, this.serviceName = t, this.errors = r;
|
|
1017
1018
|
}
|
|
1018
1019
|
create(e, ...t) {
|
|
1019
|
-
const r = t[0] || {}, i = `${this.service}/${e}`, s = this.errors[e], a = s ?
|
|
1020
|
+
const r = t[0] || {}, i = `${this.service}/${e}`, s = this.errors[e], a = s ? gr(s, r) : "Error", c = `${this.serviceName}: ${a} (${i}).`;
|
|
1020
1021
|
return new L(i, c, r);
|
|
1021
1022
|
}
|
|
1022
1023
|
}
|
|
1023
|
-
function
|
|
1024
|
-
return n.replace(
|
|
1024
|
+
function gr(n, e) {
|
|
1025
|
+
return n.replace(_r, (t, r) => {
|
|
1025
1026
|
const i = e[r];
|
|
1026
1027
|
return i != null ? String(i) : `<${r}?>`;
|
|
1027
1028
|
});
|
|
1028
1029
|
}
|
|
1029
|
-
const
|
|
1030
|
-
function
|
|
1030
|
+
const _r = /\{\$([^}]+)}/g;
|
|
1031
|
+
function yr(n) {
|
|
1031
1032
|
for (const e in n)
|
|
1032
1033
|
if (Object.prototype.hasOwnProperty.call(n, e))
|
|
1033
1034
|
return !1;
|
|
1034
1035
|
return !0;
|
|
1035
1036
|
}
|
|
1036
|
-
function
|
|
1037
|
+
function de(n, e) {
|
|
1037
1038
|
if (n === e)
|
|
1038
1039
|
return !0;
|
|
1039
1040
|
const t = Object.keys(n), r = Object.keys(e);
|
|
@@ -1042,7 +1043,7 @@ function ue(n, e) {
|
|
|
1042
1043
|
return !1;
|
|
1043
1044
|
const s = n[i], a = e[i];
|
|
1044
1045
|
if (at(s) && at(a)) {
|
|
1045
|
-
if (!
|
|
1046
|
+
if (!de(s, a))
|
|
1046
1047
|
return !1;
|
|
1047
1048
|
} else if (s !== a)
|
|
1048
1049
|
return !1;
|
|
@@ -1079,11 +1080,11 @@ function ee(n) {
|
|
|
1079
1080
|
}) : e.push(encodeURIComponent(t) + "=" + encodeURIComponent(r));
|
|
1080
1081
|
return e.length ? "&" + e.join("&") : "";
|
|
1081
1082
|
}
|
|
1082
|
-
function
|
|
1083
|
-
const t = new
|
|
1083
|
+
function vr(n, e) {
|
|
1084
|
+
const t = new br(n, e);
|
|
1084
1085
|
return t.subscribe.bind(t);
|
|
1085
1086
|
}
|
|
1086
|
-
class
|
|
1087
|
+
class br {
|
|
1087
1088
|
/**
|
|
1088
1089
|
* @param executor Function which can make calls to a single Observer
|
|
1089
1090
|
* as a proxy.
|
|
@@ -1121,7 +1122,7 @@ class _r {
|
|
|
1121
1122
|
let i;
|
|
1122
1123
|
if (e === void 0 && t === void 0 && r === void 0)
|
|
1123
1124
|
throw new Error("Missing Observer.");
|
|
1124
|
-
|
|
1125
|
+
Ir(e, [
|
|
1125
1126
|
"next",
|
|
1126
1127
|
"error",
|
|
1127
1128
|
"complete"
|
|
@@ -1129,7 +1130,7 @@ class _r {
|
|
|
1129
1130
|
next: e,
|
|
1130
1131
|
error: t,
|
|
1131
1132
|
complete: r
|
|
1132
|
-
}, i.next === void 0 && (i.next =
|
|
1133
|
+
}, i.next === void 0 && (i.next = ke), i.error === void 0 && (i.error = ke), i.complete === void 0 && (i.complete = ke);
|
|
1133
1134
|
const s = this.unsubscribeOne.bind(this, this.observers.length);
|
|
1134
1135
|
return this.finalized && this.task.then(() => {
|
|
1135
1136
|
try {
|
|
@@ -1167,7 +1168,7 @@ class _r {
|
|
|
1167
1168
|
}));
|
|
1168
1169
|
}
|
|
1169
1170
|
}
|
|
1170
|
-
function
|
|
1171
|
+
function Ir(n, e) {
|
|
1171
1172
|
if (typeof n != "object" || n === null)
|
|
1172
1173
|
return !1;
|
|
1173
1174
|
for (const t of e)
|
|
@@ -1175,7 +1176,7 @@ function yr(n, e) {
|
|
|
1175
1176
|
return !0;
|
|
1176
1177
|
return !1;
|
|
1177
1178
|
}
|
|
1178
|
-
function
|
|
1179
|
+
function ke() {
|
|
1179
1180
|
}
|
|
1180
1181
|
/**
|
|
1181
1182
|
* @license
|
|
@@ -1252,7 +1253,7 @@ const M = "[DEFAULT]";
|
|
|
1252
1253
|
* See the License for the specific language governing permissions and
|
|
1253
1254
|
* limitations under the License.
|
|
1254
1255
|
*/
|
|
1255
|
-
class
|
|
1256
|
+
class wr {
|
|
1256
1257
|
constructor(e, t) {
|
|
1257
1258
|
this.name = e, this.container = t, this.component = null, this.instances = /* @__PURE__ */ new Map(), this.instancesDeferred = /* @__PURE__ */ new Map(), this.instancesOptions = /* @__PURE__ */ new Map(), this.onInitCallbacks = /* @__PURE__ */ new Map();
|
|
1258
1259
|
}
|
|
@@ -1263,7 +1264,7 @@ class vr {
|
|
|
1263
1264
|
get(e) {
|
|
1264
1265
|
const t = this.normalizeInstanceIdentifier(e);
|
|
1265
1266
|
if (!this.instancesDeferred.has(t)) {
|
|
1266
|
-
const r = new
|
|
1267
|
+
const r = new or();
|
|
1267
1268
|
if (this.instancesDeferred.set(t, r), this.isInitialized(t) || this.shouldAutoInitialize())
|
|
1268
1269
|
try {
|
|
1269
1270
|
const i = this.getOrInitializeService({
|
|
@@ -1303,7 +1304,7 @@ class vr {
|
|
|
1303
1304
|
if (this.component)
|
|
1304
1305
|
throw Error(`Component for ${this.name} has already been provided`);
|
|
1305
1306
|
if (this.component = e, !!this.shouldAutoInitialize()) {
|
|
1306
|
-
if (
|
|
1307
|
+
if (Tr(e))
|
|
1307
1308
|
try {
|
|
1308
1309
|
this.getOrInitializeService({ instanceIdentifier: M });
|
|
1309
1310
|
} catch {
|
|
@@ -1390,7 +1391,7 @@ class vr {
|
|
|
1390
1391
|
getOrInitializeService({ instanceIdentifier: e, options: t = {} }) {
|
|
1391
1392
|
let r = this.instances.get(e);
|
|
1392
1393
|
if (!r && this.component && (r = this.component.instanceFactory(this.container, {
|
|
1393
|
-
instanceIdentifier:
|
|
1394
|
+
instanceIdentifier: Er(e),
|
|
1394
1395
|
options: t
|
|
1395
1396
|
}), this.instances.set(e, r), this.instancesOptions.set(e, t), this.invokeOnInitCallbacks(r, e), this.component.onInstanceCreated))
|
|
1396
1397
|
try {
|
|
@@ -1406,10 +1407,10 @@ class vr {
|
|
|
1406
1407
|
return !!this.component && this.component.instantiationMode !== "EXPLICIT";
|
|
1407
1408
|
}
|
|
1408
1409
|
}
|
|
1409
|
-
function
|
|
1410
|
+
function Er(n) {
|
|
1410
1411
|
return n === M ? void 0 : n;
|
|
1411
1412
|
}
|
|
1412
|
-
function
|
|
1413
|
+
function Tr(n) {
|
|
1413
1414
|
return n.instantiationMode === "EAGER";
|
|
1414
1415
|
}
|
|
1415
1416
|
/**
|
|
@@ -1428,7 +1429,7 @@ function Ir(n) {
|
|
|
1428
1429
|
* See the License for the specific language governing permissions and
|
|
1429
1430
|
* limitations under the License.
|
|
1430
1431
|
*/
|
|
1431
|
-
class
|
|
1432
|
+
class Sr {
|
|
1432
1433
|
constructor(e) {
|
|
1433
1434
|
this.name = e, this.providers = /* @__PURE__ */ new Map();
|
|
1434
1435
|
}
|
|
@@ -1460,7 +1461,7 @@ class wr {
|
|
|
1460
1461
|
getProvider(e) {
|
|
1461
1462
|
if (this.providers.has(e))
|
|
1462
1463
|
return this.providers.get(e);
|
|
1463
|
-
const t = new
|
|
1464
|
+
const t = new wr(e, this);
|
|
1464
1465
|
return this.providers.set(e, t), t;
|
|
1465
1466
|
}
|
|
1466
1467
|
getProviders() {
|
|
@@ -1487,23 +1488,23 @@ var f;
|
|
|
1487
1488
|
(function(n) {
|
|
1488
1489
|
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";
|
|
1489
1490
|
})(f || (f = {}));
|
|
1490
|
-
const
|
|
1491
|
+
const kr = {
|
|
1491
1492
|
debug: f.DEBUG,
|
|
1492
1493
|
verbose: f.VERBOSE,
|
|
1493
1494
|
info: f.INFO,
|
|
1494
1495
|
warn: f.WARN,
|
|
1495
1496
|
error: f.ERROR,
|
|
1496
1497
|
silent: f.SILENT
|
|
1497
|
-
},
|
|
1498
|
+
}, Ar = f.INFO, Cr = {
|
|
1498
1499
|
[f.DEBUG]: "log",
|
|
1499
1500
|
[f.VERBOSE]: "log",
|
|
1500
1501
|
[f.INFO]: "info",
|
|
1501
1502
|
[f.WARN]: "warn",
|
|
1502
1503
|
[f.ERROR]: "error"
|
|
1503
|
-
},
|
|
1504
|
+
}, Rr = (n, e, ...t) => {
|
|
1504
1505
|
if (e < n.logLevel)
|
|
1505
1506
|
return;
|
|
1506
|
-
const r = (/* @__PURE__ */ new Date()).toISOString(), i =
|
|
1507
|
+
const r = (/* @__PURE__ */ new Date()).toISOString(), i = Cr[e];
|
|
1507
1508
|
if (i)
|
|
1508
1509
|
console[i](`[${r}] ${n.name}:`, ...t);
|
|
1509
1510
|
else
|
|
@@ -1517,7 +1518,7 @@ class Wt {
|
|
|
1517
1518
|
* @param name The name that the logs will be associated with
|
|
1518
1519
|
*/
|
|
1519
1520
|
constructor(e) {
|
|
1520
|
-
this.name = e, this._logLevel =
|
|
1521
|
+
this.name = e, this._logLevel = Ar, this._logHandler = Rr, this._userLogHandler = null;
|
|
1521
1522
|
}
|
|
1522
1523
|
get logLevel() {
|
|
1523
1524
|
return this._logLevel;
|
|
@@ -1529,7 +1530,7 @@ class Wt {
|
|
|
1529
1530
|
}
|
|
1530
1531
|
// Workaround for setter/getter having to be the same type.
|
|
1531
1532
|
setLogLevel(e) {
|
|
1532
|
-
this._logLevel = typeof e == "string" ?
|
|
1533
|
+
this._logLevel = typeof e == "string" ? kr[e] : e;
|
|
1533
1534
|
}
|
|
1534
1535
|
get logHandler() {
|
|
1535
1536
|
return this._logHandler;
|
|
@@ -1564,9 +1565,9 @@ class Wt {
|
|
|
1564
1565
|
this._userLogHandler && this._userLogHandler(this, f.ERROR, ...e), this._logHandler(this, f.ERROR, ...e);
|
|
1565
1566
|
}
|
|
1566
1567
|
}
|
|
1567
|
-
const
|
|
1568
|
+
const Pr = (n, e) => e.some((t) => n instanceof t);
|
|
1568
1569
|
let ot, ct;
|
|
1569
|
-
function
|
|
1570
|
+
function Or() {
|
|
1570
1571
|
return ot || (ot = [
|
|
1571
1572
|
IDBDatabase,
|
|
1572
1573
|
IDBObjectStore,
|
|
@@ -1575,15 +1576,15 @@ function Rr() {
|
|
|
1575
1576
|
IDBTransaction
|
|
1576
1577
|
]);
|
|
1577
1578
|
}
|
|
1578
|
-
function
|
|
1579
|
+
function Dr() {
|
|
1579
1580
|
return ct || (ct = [
|
|
1580
1581
|
IDBCursor.prototype.advance,
|
|
1581
1582
|
IDBCursor.prototype.continue,
|
|
1582
1583
|
IDBCursor.prototype.continuePrimaryKey
|
|
1583
1584
|
]);
|
|
1584
1585
|
}
|
|
1585
|
-
const zt = /* @__PURE__ */ new WeakMap(),
|
|
1586
|
-
function
|
|
1586
|
+
const zt = /* @__PURE__ */ new WeakMap(), Me = /* @__PURE__ */ new WeakMap(), Gt = /* @__PURE__ */ new WeakMap(), Ae = /* @__PURE__ */ new WeakMap(), ze = /* @__PURE__ */ new WeakMap();
|
|
1587
|
+
function Nr(n) {
|
|
1587
1588
|
const e = new Promise((t, r) => {
|
|
1588
1589
|
const i = () => {
|
|
1589
1590
|
n.removeEventListener("success", s), n.removeEventListener("error", a);
|
|
@@ -1599,8 +1600,8 @@ function Pr(n) {
|
|
|
1599
1600
|
}).catch(() => {
|
|
1600
1601
|
}), ze.set(e, n), e;
|
|
1601
1602
|
}
|
|
1602
|
-
function
|
|
1603
|
-
if (
|
|
1603
|
+
function Lr(n) {
|
|
1604
|
+
if (Me.has(n))
|
|
1604
1605
|
return;
|
|
1605
1606
|
const e = new Promise((t, r) => {
|
|
1606
1607
|
const i = () => {
|
|
@@ -1612,13 +1613,13 @@ function Or(n) {
|
|
|
1612
1613
|
};
|
|
1613
1614
|
n.addEventListener("complete", s), n.addEventListener("error", a), n.addEventListener("abort", a);
|
|
1614
1615
|
});
|
|
1615
|
-
|
|
1616
|
+
Me.set(n, e);
|
|
1616
1617
|
}
|
|
1617
|
-
let
|
|
1618
|
+
let Ue = {
|
|
1618
1619
|
get(n, e, t) {
|
|
1619
1620
|
if (n instanceof IDBTransaction) {
|
|
1620
1621
|
if (e === "done")
|
|
1621
|
-
return
|
|
1622
|
+
return Me.get(n);
|
|
1622
1623
|
if (e === "objectStoreNames")
|
|
1623
1624
|
return n.objectStoreNames || Gt.get(n);
|
|
1624
1625
|
if (e === "store")
|
|
@@ -1633,32 +1634,32 @@ let Me = {
|
|
|
1633
1634
|
return n instanceof IDBTransaction && (e === "done" || e === "store") ? !0 : e in n;
|
|
1634
1635
|
}
|
|
1635
1636
|
};
|
|
1636
|
-
function
|
|
1637
|
-
|
|
1637
|
+
function Mr(n) {
|
|
1638
|
+
Ue = n(Ue);
|
|
1638
1639
|
}
|
|
1639
|
-
function
|
|
1640
|
+
function Ur(n) {
|
|
1640
1641
|
return n === IDBDatabase.prototype.transaction && !("objectStoreNames" in IDBTransaction.prototype) ? function(e, ...t) {
|
|
1641
|
-
const r = n.call(
|
|
1642
|
+
const r = n.call(Ce(this), e, ...t);
|
|
1642
1643
|
return Gt.set(r, e.sort ? e.sort() : [e]), O(r);
|
|
1643
|
-
} :
|
|
1644
|
-
return n.apply(
|
|
1644
|
+
} : Dr().includes(n) ? function(...e) {
|
|
1645
|
+
return n.apply(Ce(this), e), O(zt.get(this));
|
|
1645
1646
|
} : function(...e) {
|
|
1646
|
-
return O(n.apply(
|
|
1647
|
+
return O(n.apply(Ce(this), e));
|
|
1647
1648
|
};
|
|
1648
1649
|
}
|
|
1649
|
-
function
|
|
1650
|
-
return typeof n == "function" ?
|
|
1650
|
+
function xr(n) {
|
|
1651
|
+
return typeof n == "function" ? Ur(n) : (n instanceof IDBTransaction && Lr(n), Pr(n, Or()) ? new Proxy(n, Ue) : n);
|
|
1651
1652
|
}
|
|
1652
1653
|
function O(n) {
|
|
1653
1654
|
if (n instanceof IDBRequest)
|
|
1654
|
-
return
|
|
1655
|
-
if (
|
|
1656
|
-
return
|
|
1657
|
-
const e =
|
|
1658
|
-
return e !== n && (
|
|
1659
|
-
}
|
|
1660
|
-
const
|
|
1661
|
-
function
|
|
1655
|
+
return Nr(n);
|
|
1656
|
+
if (Ae.has(n))
|
|
1657
|
+
return Ae.get(n);
|
|
1658
|
+
const e = xr(n);
|
|
1659
|
+
return e !== n && (Ae.set(n, e), ze.set(e, n)), e;
|
|
1660
|
+
}
|
|
1661
|
+
const Ce = (n) => ze.get(n);
|
|
1662
|
+
function Fr(n, e, { blocked: t, upgrade: r, blocking: i, terminated: s } = {}) {
|
|
1662
1663
|
const a = indexedDB.open(n, e), c = O(a);
|
|
1663
1664
|
return r && a.addEventListener("upgradeneeded", (o) => {
|
|
1664
1665
|
r(O(a.result), o.oldVersion, o.newVersion, O(a.transaction), o);
|
|
@@ -1672,16 +1673,16 @@ function Mr(n, e, { blocked: t, upgrade: r, blocking: i, terminated: s } = {}) {
|
|
|
1672
1673
|
}).catch(() => {
|
|
1673
1674
|
}), c;
|
|
1674
1675
|
}
|
|
1675
|
-
const
|
|
1676
|
+
const Br = ["get", "getKey", "getAll", "getAllKeys", "count"], $r = ["put", "add", "delete", "clear"], Re = /* @__PURE__ */ new Map();
|
|
1676
1677
|
function lt(n, e) {
|
|
1677
1678
|
if (!(n instanceof IDBDatabase && !(e in n) && typeof e == "string"))
|
|
1678
1679
|
return;
|
|
1679
1680
|
if (Re.get(e))
|
|
1680
1681
|
return Re.get(e);
|
|
1681
|
-
const t = e.replace(/FromIndex$/, ""), r = e !== t, i =
|
|
1682
|
+
const t = e.replace(/FromIndex$/, ""), r = e !== t, i = $r.includes(t);
|
|
1682
1683
|
if (
|
|
1683
1684
|
// Bail if the target doesn't exist on the target. Eg, getAll isn't in Edge.
|
|
1684
|
-
!(t in (r ? IDBIndex : IDBObjectStore).prototype) || !(i ||
|
|
1685
|
+
!(t in (r ? IDBIndex : IDBObjectStore).prototype) || !(i || Br.includes(t))
|
|
1685
1686
|
)
|
|
1686
1687
|
return;
|
|
1687
1688
|
const s = async function(a, ...c) {
|
|
@@ -1694,7 +1695,7 @@ function lt(n, e) {
|
|
|
1694
1695
|
};
|
|
1695
1696
|
return Re.set(e, s), s;
|
|
1696
1697
|
}
|
|
1697
|
-
|
|
1698
|
+
Mr((n) => ({
|
|
1698
1699
|
...n,
|
|
1699
1700
|
get: (e, t, r) => lt(e, t) || n.get(e, t, r),
|
|
1700
1701
|
has: (e, t) => !!lt(e, t) || n.has(e, t)
|
|
@@ -1715,7 +1716,7 @@ Dr((n) => ({
|
|
|
1715
1716
|
* See the License for the specific language governing permissions and
|
|
1716
1717
|
* limitations under the License.
|
|
1717
1718
|
*/
|
|
1718
|
-
class
|
|
1719
|
+
class Hr {
|
|
1719
1720
|
constructor(e) {
|
|
1720
1721
|
this.container = e;
|
|
1721
1722
|
}
|
|
@@ -1723,7 +1724,7 @@ class Br {
|
|
|
1723
1724
|
// auth token refresh, and installations will send this string.
|
|
1724
1725
|
getPlatformInfoString() {
|
|
1725
1726
|
return this.container.getProviders().map((t) => {
|
|
1726
|
-
if (
|
|
1727
|
+
if (Vr(t)) {
|
|
1727
1728
|
const r = t.getImmediate();
|
|
1728
1729
|
return `${r.library}/${r.version}`;
|
|
1729
1730
|
} else
|
|
@@ -1731,11 +1732,11 @@ class Br {
|
|
|
1731
1732
|
}).filter((t) => t).join(" ");
|
|
1732
1733
|
}
|
|
1733
1734
|
}
|
|
1734
|
-
function
|
|
1735
|
+
function Vr(n) {
|
|
1735
1736
|
const e = n.getComponent();
|
|
1736
1737
|
return (e == null ? void 0 : e.type) === "VERSION";
|
|
1737
1738
|
}
|
|
1738
|
-
const
|
|
1739
|
+
const xe = "@firebase/app", ut = "0.10.13";
|
|
1739
1740
|
/**
|
|
1740
1741
|
* @license
|
|
1741
1742
|
* Copyright 2019 Google LLC
|
|
@@ -1752,7 +1753,7 @@ const Ue = "@firebase/app", ut = "0.10.13";
|
|
|
1752
1753
|
* See the License for the specific language governing permissions and
|
|
1753
1754
|
* limitations under the License.
|
|
1754
1755
|
*/
|
|
1755
|
-
const E = new Wt("@firebase/app"),
|
|
1756
|
+
const E = new Wt("@firebase/app"), jr = "@firebase/app-compat", Wr = "@firebase/analytics-compat", zr = "@firebase/analytics", Gr = "@firebase/app-check-compat", qr = "@firebase/app-check", Kr = "@firebase/auth", Jr = "@firebase/auth-compat", Yr = "@firebase/database", Xr = "@firebase/data-connect", Qr = "@firebase/database-compat", Zr = "@firebase/functions", ei = "@firebase/functions-compat", ti = "@firebase/installations", ni = "@firebase/installations-compat", ri = "@firebase/messaging", ii = "@firebase/messaging-compat", si = "@firebase/performance", ai = "@firebase/performance-compat", oi = "@firebase/remote-config", ci = "@firebase/remote-config-compat", li = "@firebase/storage", ui = "@firebase/storage-compat", di = "@firebase/firestore", hi = "@firebase/vertexai-preview", fi = "@firebase/firestore-compat", pi = "firebase", mi = "10.14.1";
|
|
1756
1757
|
/**
|
|
1757
1758
|
* @license
|
|
1758
1759
|
* Copyright 2019 Google LLC
|
|
@@ -1769,35 +1770,35 @@ const E = new Wt("@firebase/app"), $r = "@firebase/app-compat", Hr = "@firebase/
|
|
|
1769
1770
|
* See the License for the specific language governing permissions and
|
|
1770
1771
|
* limitations under the License.
|
|
1771
1772
|
*/
|
|
1772
|
-
const
|
|
1773
|
-
[
|
|
1774
|
-
[
|
|
1775
|
-
[
|
|
1776
|
-
[
|
|
1777
|
-
[
|
|
1778
|
-
[
|
|
1779
|
-
[
|
|
1780
|
-
[
|
|
1781
|
-
[
|
|
1782
|
-
[
|
|
1783
|
-
[
|
|
1784
|
-
[
|
|
1785
|
-
[
|
|
1786
|
-
[
|
|
1787
|
-
[
|
|
1788
|
-
[
|
|
1789
|
-
[
|
|
1790
|
-
[
|
|
1791
|
-
[
|
|
1792
|
-
[
|
|
1793
|
-
[
|
|
1794
|
-
[
|
|
1795
|
-
[
|
|
1796
|
-
[
|
|
1797
|
-
[
|
|
1798
|
-
[
|
|
1773
|
+
const Fe = "[DEFAULT]", gi = {
|
|
1774
|
+
[xe]: "fire-core",
|
|
1775
|
+
[jr]: "fire-core-compat",
|
|
1776
|
+
[zr]: "fire-analytics",
|
|
1777
|
+
[Wr]: "fire-analytics-compat",
|
|
1778
|
+
[qr]: "fire-app-check",
|
|
1779
|
+
[Gr]: "fire-app-check-compat",
|
|
1780
|
+
[Kr]: "fire-auth",
|
|
1781
|
+
[Jr]: "fire-auth-compat",
|
|
1782
|
+
[Yr]: "fire-rtdb",
|
|
1783
|
+
[Xr]: "fire-data-connect",
|
|
1784
|
+
[Qr]: "fire-rtdb-compat",
|
|
1785
|
+
[Zr]: "fire-fn",
|
|
1786
|
+
[ei]: "fire-fn-compat",
|
|
1787
|
+
[ti]: "fire-iid",
|
|
1788
|
+
[ni]: "fire-iid-compat",
|
|
1789
|
+
[ri]: "fire-fcm",
|
|
1790
|
+
[ii]: "fire-fcm-compat",
|
|
1791
|
+
[si]: "fire-perf",
|
|
1792
|
+
[ai]: "fire-perf-compat",
|
|
1793
|
+
[oi]: "fire-rc",
|
|
1794
|
+
[ci]: "fire-rc-compat",
|
|
1795
|
+
[li]: "fire-gcs",
|
|
1796
|
+
[ui]: "fire-gcs-compat",
|
|
1797
|
+
[di]: "fire-fst",
|
|
1798
|
+
[fi]: "fire-fst-compat",
|
|
1799
|
+
[hi]: "fire-vertex",
|
|
1799
1800
|
"fire-js": "fire-js",
|
|
1800
|
-
[
|
|
1801
|
+
[pi]: "fire-js-all"
|
|
1801
1802
|
};
|
|
1802
1803
|
/**
|
|
1803
1804
|
* @license
|
|
@@ -1815,7 +1816,7 @@ const xe = "[DEFAULT]", fi = {
|
|
|
1815
1816
|
* See the License for the specific language governing permissions and
|
|
1816
1817
|
* limitations under the License.
|
|
1817
1818
|
*/
|
|
1818
|
-
const
|
|
1819
|
+
const he = /* @__PURE__ */ new Map(), _i = /* @__PURE__ */ new Map(), Be = /* @__PURE__ */ new Map();
|
|
1819
1820
|
function dt(n, e) {
|
|
1820
1821
|
try {
|
|
1821
1822
|
n.container.addComponent(e);
|
|
@@ -1828,9 +1829,9 @@ function Y(n) {
|
|
|
1828
1829
|
if (Be.has(e))
|
|
1829
1830
|
return E.debug(`There were multiple attempts to register component ${e}.`), !1;
|
|
1830
1831
|
Be.set(e, n);
|
|
1831
|
-
for (const t of
|
|
1832
|
+
for (const t of he.values())
|
|
1832
1833
|
dt(t, n);
|
|
1833
|
-
for (const t of
|
|
1834
|
+
for (const t of _i.values())
|
|
1834
1835
|
dt(t, n);
|
|
1835
1836
|
return !0;
|
|
1836
1837
|
}
|
|
@@ -1857,7 +1858,7 @@ function v(n) {
|
|
|
1857
1858
|
* See the License for the specific language governing permissions and
|
|
1858
1859
|
* limitations under the License.
|
|
1859
1860
|
*/
|
|
1860
|
-
const
|
|
1861
|
+
const yi = {
|
|
1861
1862
|
"no-app": "No Firebase App '{$appName}' has been created - call initializeApp() first",
|
|
1862
1863
|
"bad-app-name": "Illegal App name: '{$appName}'",
|
|
1863
1864
|
"duplicate-app": "Firebase App named '{$appName}' already exists with different options or config",
|
|
@@ -1872,7 +1873,7 @@ const mi = {
|
|
|
1872
1873
|
"idb-delete": "Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}.",
|
|
1873
1874
|
"finalization-registry-not-supported": "FirebaseServerApp deleteOnDeref field defined but the JS runtime does not support FinalizationRegistry.",
|
|
1874
1875
|
"invalid-server-app-environment": "FirebaseServerApp is not for use in browser environments."
|
|
1875
|
-
}, D = new Z("app", "Firebase",
|
|
1876
|
+
}, D = new Z("app", "Firebase", yi);
|
|
1876
1877
|
/**
|
|
1877
1878
|
* @license
|
|
1878
1879
|
* Copyright 2019 Google LLC
|
|
@@ -1889,7 +1890,7 @@ const mi = {
|
|
|
1889
1890
|
* See the License for the specific language governing permissions and
|
|
1890
1891
|
* limitations under the License.
|
|
1891
1892
|
*/
|
|
1892
|
-
class
|
|
1893
|
+
class vi {
|
|
1893
1894
|
constructor(e, t, r) {
|
|
1894
1895
|
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(
|
|
1895
1896
|
"app",
|
|
@@ -1947,11 +1948,11 @@ class gi {
|
|
|
1947
1948
|
* See the License for the specific language governing permissions and
|
|
1948
1949
|
* limitations under the License.
|
|
1949
1950
|
*/
|
|
1950
|
-
const te =
|
|
1951
|
+
const te = mi;
|
|
1951
1952
|
function Kt(n, e = {}) {
|
|
1952
1953
|
let t = n;
|
|
1953
1954
|
typeof e != "object" && (e = { name: e });
|
|
1954
|
-
const r = Object.assign({ name:
|
|
1955
|
+
const r = Object.assign({ name: Fe, automaticDataCollectionEnabled: !1 }, e), i = r.name;
|
|
1955
1956
|
if (typeof i != "string" || !i)
|
|
1956
1957
|
throw D.create("bad-app-name", {
|
|
1957
1958
|
appName: String(i)
|
|
@@ -1961,21 +1962,21 @@ function Kt(n, e = {}) {
|
|
|
1961
1962
|
"no-options"
|
|
1962
1963
|
/* AppError.NO_OPTIONS */
|
|
1963
1964
|
);
|
|
1964
|
-
const s =
|
|
1965
|
+
const s = he.get(i);
|
|
1965
1966
|
if (s) {
|
|
1966
|
-
if (
|
|
1967
|
+
if (de(t, s.options) && de(r, s.config))
|
|
1967
1968
|
return s;
|
|
1968
1969
|
throw D.create("duplicate-app", { appName: i });
|
|
1969
1970
|
}
|
|
1970
|
-
const a = new
|
|
1971
|
+
const a = new Sr(i);
|
|
1971
1972
|
for (const o of Be.values())
|
|
1972
1973
|
a.addComponent(o);
|
|
1973
|
-
const c = new
|
|
1974
|
-
return
|
|
1974
|
+
const c = new vi(t, r, a);
|
|
1975
|
+
return he.set(i, c), c;
|
|
1975
1976
|
}
|
|
1976
|
-
function
|
|
1977
|
-
const e =
|
|
1978
|
-
if (!e && n ===
|
|
1977
|
+
function bi(n = Fe) {
|
|
1978
|
+
const e = he.get(n);
|
|
1979
|
+
if (!e && n === Fe && Vt())
|
|
1979
1980
|
return Kt();
|
|
1980
1981
|
if (!e)
|
|
1981
1982
|
throw D.create("no-app", { appName: n });
|
|
@@ -1983,7 +1984,7 @@ function _i(n = xe) {
|
|
|
1983
1984
|
}
|
|
1984
1985
|
function $(n, e, t) {
|
|
1985
1986
|
var r;
|
|
1986
|
-
let i = (r =
|
|
1987
|
+
let i = (r = gi[n]) !== null && r !== void 0 ? r : n;
|
|
1987
1988
|
t && (i += `-${t}`);
|
|
1988
1989
|
const s = i.match(/\s|\//), a = e.match(/\s|\//);
|
|
1989
1990
|
if (s || a) {
|
|
@@ -2016,10 +2017,10 @@ function $(n, e, t) {
|
|
|
2016
2017
|
* See the License for the specific language governing permissions and
|
|
2017
2018
|
* limitations under the License.
|
|
2018
2019
|
*/
|
|
2019
|
-
const
|
|
2020
|
-
let
|
|
2020
|
+
const Ii = "firebase-heartbeat-database", wi = 1, X = "firebase-heartbeat-store";
|
|
2021
|
+
let Pe = null;
|
|
2021
2022
|
function Jt() {
|
|
2022
|
-
return
|
|
2023
|
+
return Pe || (Pe = Fr(Ii, wi, {
|
|
2023
2024
|
upgrade: (n, e) => {
|
|
2024
2025
|
switch (e) {
|
|
2025
2026
|
case 0:
|
|
@@ -2034,9 +2035,9 @@ function Jt() {
|
|
|
2034
2035
|
throw D.create("idb-open", {
|
|
2035
2036
|
originalErrorMessage: n.message
|
|
2036
2037
|
});
|
|
2037
|
-
})),
|
|
2038
|
+
})), Pe;
|
|
2038
2039
|
}
|
|
2039
|
-
async function
|
|
2040
|
+
async function Ei(n) {
|
|
2040
2041
|
try {
|
|
2041
2042
|
const t = (await Jt()).transaction(X), r = await t.objectStore(X).get(Yt(n));
|
|
2042
2043
|
return await t.done, r;
|
|
@@ -2085,12 +2086,12 @@ function Yt(n) {
|
|
|
2085
2086
|
* See the License for the specific language governing permissions and
|
|
2086
2087
|
* limitations under the License.
|
|
2087
2088
|
*/
|
|
2088
|
-
const
|
|
2089
|
-
class
|
|
2089
|
+
const Ti = 1024, Si = 30 * 24 * 60 * 60 * 1e3;
|
|
2090
|
+
class ki {
|
|
2090
2091
|
constructor(e) {
|
|
2091
2092
|
this.container = e, this._heartbeatsCache = null;
|
|
2092
2093
|
const t = this.container.getProvider("app").getImmediate();
|
|
2093
|
-
this._storage = new
|
|
2094
|
+
this._storage = new Ci(t), this._heartbeatsCachePromise = this._storage.read().then((r) => (this._heartbeatsCache = r, r));
|
|
2094
2095
|
}
|
|
2095
2096
|
/**
|
|
2096
2097
|
* Called to report a heartbeat. The function will generate
|
|
@@ -2105,7 +2106,7 @@ class Ei {
|
|
|
2105
2106
|
const i = this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(), s = ft();
|
|
2106
2107
|
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) => {
|
|
2107
2108
|
const c = new Date(a.date).valueOf();
|
|
2108
|
-
return Date.now() - c <=
|
|
2109
|
+
return Date.now() - c <= Si;
|
|
2109
2110
|
}), this._storage.overwrite(this._heartbeatsCache));
|
|
2110
2111
|
} catch (r) {
|
|
2111
2112
|
E.warn(r);
|
|
@@ -2123,7 +2124,7 @@ class Ei {
|
|
|
2123
2124
|
try {
|
|
2124
2125
|
if (this._heartbeatsCache === null && await this._heartbeatsCachePromise, ((e = this._heartbeatsCache) === null || e === void 0 ? void 0 : e.heartbeats) == null || this._heartbeatsCache.heartbeats.length === 0)
|
|
2125
2126
|
return "";
|
|
2126
|
-
const t = ft(), { heartbeatsToSend: r, unsentEntries: i } =
|
|
2127
|
+
const t = ft(), { heartbeatsToSend: r, unsentEntries: i } = Ai(this._heartbeatsCache.heartbeats), s = $t(JSON.stringify({ version: 2, heartbeats: r }));
|
|
2127
2128
|
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;
|
|
2128
2129
|
} catch (t) {
|
|
2129
2130
|
return E.warn(t), "";
|
|
@@ -2133,7 +2134,7 @@ class Ei {
|
|
|
2133
2134
|
function ft() {
|
|
2134
2135
|
return (/* @__PURE__ */ new Date()).toISOString().substring(0, 10);
|
|
2135
2136
|
}
|
|
2136
|
-
function
|
|
2137
|
+
function Ai(n, e = Ti) {
|
|
2137
2138
|
const t = [];
|
|
2138
2139
|
let r = n.slice();
|
|
2139
2140
|
for (const i of n) {
|
|
@@ -2157,19 +2158,19 @@ function Ti(n, e = Ii) {
|
|
|
2157
2158
|
unsentEntries: r
|
|
2158
2159
|
};
|
|
2159
2160
|
}
|
|
2160
|
-
class
|
|
2161
|
+
class Ci {
|
|
2161
2162
|
constructor(e) {
|
|
2162
2163
|
this.app = e, this._canUseIndexedDBPromise = this.runIndexedDBEnvironmentCheck();
|
|
2163
2164
|
}
|
|
2164
2165
|
async runIndexedDBEnvironmentCheck() {
|
|
2165
|
-
return
|
|
2166
|
+
return fr() ? pr().then(() => !0).catch(() => !1) : !1;
|
|
2166
2167
|
}
|
|
2167
2168
|
/**
|
|
2168
2169
|
* Read all heartbeats.
|
|
2169
2170
|
*/
|
|
2170
2171
|
async read() {
|
|
2171
2172
|
if (await this._canUseIndexedDBPromise) {
|
|
2172
|
-
const t = await
|
|
2173
|
+
const t = await Ei(this.app);
|
|
2173
2174
|
return t != null && t.heartbeats ? t : { heartbeats: [] };
|
|
2174
2175
|
} else
|
|
2175
2176
|
return { heartbeats: [] };
|
|
@@ -2224,21 +2225,21 @@ function pt(n) {
|
|
|
2224
2225
|
* See the License for the specific language governing permissions and
|
|
2225
2226
|
* limitations under the License.
|
|
2226
2227
|
*/
|
|
2227
|
-
function
|
|
2228
|
+
function Ri(n) {
|
|
2228
2229
|
Y(new W(
|
|
2229
2230
|
"platform-logger",
|
|
2230
|
-
(e) => new
|
|
2231
|
+
(e) => new Hr(e),
|
|
2231
2232
|
"PRIVATE"
|
|
2232
2233
|
/* ComponentType.PRIVATE */
|
|
2233
2234
|
)), Y(new W(
|
|
2234
2235
|
"heartbeat",
|
|
2235
|
-
(e) => new
|
|
2236
|
+
(e) => new ki(e),
|
|
2236
2237
|
"PRIVATE"
|
|
2237
2238
|
/* ComponentType.PRIVATE */
|
|
2238
|
-
)), $(
|
|
2239
|
+
)), $(xe, ut, n), $(xe, ut, "esm2017"), $("fire-js", "");
|
|
2239
2240
|
}
|
|
2240
|
-
|
|
2241
|
-
var
|
|
2241
|
+
Ri("");
|
|
2242
|
+
var Pi = "firebase", Oi = "10.14.1";
|
|
2242
2243
|
/**
|
|
2243
2244
|
* @license
|
|
2244
2245
|
* Copyright 2020 Google LLC
|
|
@@ -2255,7 +2256,7 @@ var Ai = "firebase", Ri = "10.14.1";
|
|
|
2255
2256
|
* See the License for the specific language governing permissions and
|
|
2256
2257
|
* limitations under the License.
|
|
2257
2258
|
*/
|
|
2258
|
-
$(
|
|
2259
|
+
$(Pi, Oi, "app");
|
|
2259
2260
|
var mt = function() {
|
|
2260
2261
|
return mt = Object.assign || function(e) {
|
|
2261
2262
|
for (var t, r = 1, i = arguments.length; r < i; r++) {
|
|
@@ -2278,7 +2279,7 @@ function Xt() {
|
|
|
2278
2279
|
"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."
|
|
2279
2280
|
};
|
|
2280
2281
|
}
|
|
2281
|
-
const
|
|
2282
|
+
const Di = Xt, Qt = new Z("auth", "Firebase", Xt());
|
|
2282
2283
|
/**
|
|
2283
2284
|
* @license
|
|
2284
2285
|
* Copyright 2020 Google LLC
|
|
@@ -2295,12 +2296,12 @@ const Ci = Xt, Qt = new Z("auth", "Firebase", Xt());
|
|
|
2295
2296
|
* See the License for the specific language governing permissions and
|
|
2296
2297
|
* limitations under the License.
|
|
2297
2298
|
*/
|
|
2298
|
-
const
|
|
2299
|
-
function
|
|
2300
|
-
|
|
2299
|
+
const fe = new Wt("@firebase/auth");
|
|
2300
|
+
function Ni(n, ...e) {
|
|
2301
|
+
fe.logLevel <= f.WARN && fe.warn(`Auth (${te}): ${n}`, ...e);
|
|
2301
2302
|
}
|
|
2302
2303
|
function ae(n, ...e) {
|
|
2303
|
-
|
|
2304
|
+
fe.logLevel <= f.ERROR && fe.error(`Auth (${te}): ${n}`, ...e);
|
|
2304
2305
|
}
|
|
2305
2306
|
/**
|
|
2306
2307
|
* @license
|
|
@@ -2325,7 +2326,7 @@ function _(n, ...e) {
|
|
|
2325
2326
|
return qe(n, ...e);
|
|
2326
2327
|
}
|
|
2327
2328
|
function Zt(n, e, t) {
|
|
2328
|
-
const r = Object.assign(Object.assign({},
|
|
2329
|
+
const r = Object.assign(Object.assign({}, Di()), { [e]: t });
|
|
2329
2330
|
return new Z("auth", "Firebase", r).create(e, {
|
|
2330
2331
|
appName: n.name
|
|
2331
2332
|
});
|
|
@@ -2367,11 +2368,11 @@ function S(n, e) {
|
|
|
2367
2368
|
* See the License for the specific language governing permissions and
|
|
2368
2369
|
* limitations under the License.
|
|
2369
2370
|
*/
|
|
2370
|
-
function
|
|
2371
|
+
function $e() {
|
|
2371
2372
|
var n;
|
|
2372
2373
|
return typeof self < "u" && ((n = self.location) === null || n === void 0 ? void 0 : n.href) || "";
|
|
2373
2374
|
}
|
|
2374
|
-
function
|
|
2375
|
+
function Li() {
|
|
2375
2376
|
return gt() === "http:" || gt() === "https:";
|
|
2376
2377
|
}
|
|
2377
2378
|
function gt() {
|
|
@@ -2394,15 +2395,15 @@ function gt() {
|
|
|
2394
2395
|
* See the License for the specific language governing permissions and
|
|
2395
2396
|
* limitations under the License.
|
|
2396
2397
|
*/
|
|
2397
|
-
function
|
|
2398
|
+
function Mi() {
|
|
2398
2399
|
return typeof navigator < "u" && navigator && "onLine" in navigator && typeof navigator.onLine == "boolean" && // Apply only for traditional web apps and Chrome extensions.
|
|
2399
2400
|
// This is especially true for Cordova apps which have unreliable
|
|
2400
2401
|
// navigator.onLine behavior unless cordova-plugin-network-information is
|
|
2401
2402
|
// installed which overwrites the native navigator.onLine value and
|
|
2402
2403
|
// defines navigator.connection.
|
|
2403
|
-
(
|
|
2404
|
+
(Li() || ur() || "connection" in navigator) ? navigator.onLine : !0;
|
|
2404
2405
|
}
|
|
2405
|
-
function
|
|
2406
|
+
function Ui() {
|
|
2406
2407
|
if (typeof navigator > "u")
|
|
2407
2408
|
return null;
|
|
2408
2409
|
const n = navigator;
|
|
@@ -2432,10 +2433,10 @@ function Ni() {
|
|
|
2432
2433
|
*/
|
|
2433
2434
|
class ne {
|
|
2434
2435
|
constructor(e, t) {
|
|
2435
|
-
this.shortDelay = e, this.longDelay = t, S(t > e, "Short delay should be less than long delay!"), this.isMobile =
|
|
2436
|
+
this.shortDelay = e, this.longDelay = t, S(t > e, "Short delay should be less than long delay!"), this.isMobile = cr() || dr();
|
|
2436
2437
|
}
|
|
2437
2438
|
get() {
|
|
2438
|
-
return
|
|
2439
|
+
return Mi() ? this.isMobile ? this.longDelay : this.shortDelay : Math.min(5e3, this.shortDelay);
|
|
2439
2440
|
}
|
|
2440
2441
|
}
|
|
2441
2442
|
/**
|
|
@@ -2529,7 +2530,7 @@ class en {
|
|
|
2529
2530
|
* See the License for the specific language governing permissions and
|
|
2530
2531
|
* limitations under the License.
|
|
2531
2532
|
*/
|
|
2532
|
-
const
|
|
2533
|
+
const xi = {
|
|
2533
2534
|
// Custom token errors.
|
|
2534
2535
|
CREDENTIAL_MISMATCH: "custom-token-mismatch",
|
|
2535
2536
|
// This can only happen if the SDK sends a bad request.
|
|
@@ -2620,8 +2621,8 @@ const Li = {
|
|
|
2620
2621
|
* See the License for the specific language governing permissions and
|
|
2621
2622
|
* limitations under the License.
|
|
2622
2623
|
*/
|
|
2623
|
-
const
|
|
2624
|
-
function
|
|
2624
|
+
const Fi = new ne(3e4, 6e4);
|
|
2625
|
+
function ye(n, e) {
|
|
2625
2626
|
return n.tenantId && !e.tenantId ? Object.assign(Object.assign({}, e), { tenantId: n.tenantId }) : e;
|
|
2626
2627
|
}
|
|
2627
2628
|
async function G(n, e, t, r, i = {}) {
|
|
@@ -2642,14 +2643,14 @@ async function G(n, e, t, r, i = {}) {
|
|
|
2642
2643
|
method: e,
|
|
2643
2644
|
headers: o
|
|
2644
2645
|
}, s);
|
|
2645
|
-
return
|
|
2646
|
+
return lr() || (l.referrerPolicy = "no-referrer"), en.fetch()(rn(n, n.config.apiHost, t, c), l);
|
|
2646
2647
|
});
|
|
2647
2648
|
}
|
|
2648
2649
|
async function tn(n, e, t) {
|
|
2649
2650
|
n._canInitEmulator = !1;
|
|
2650
|
-
const r = Object.assign(Object.assign({},
|
|
2651
|
+
const r = Object.assign(Object.assign({}, xi), e);
|
|
2651
2652
|
try {
|
|
2652
|
-
const i = new
|
|
2653
|
+
const i = new Bi(n), s = await Promise.race([
|
|
2653
2654
|
t(),
|
|
2654
2655
|
i.promise
|
|
2655
2656
|
]);
|
|
@@ -2688,14 +2689,14 @@ function rn(n, e, t, r) {
|
|
|
2688
2689
|
const i = `${e}${t}?${r}`;
|
|
2689
2690
|
return n.config.emulator ? Ke(n.config, i) : `${n.config.apiScheme}://${i}`;
|
|
2690
2691
|
}
|
|
2691
|
-
class
|
|
2692
|
+
class Bi {
|
|
2692
2693
|
constructor(e) {
|
|
2693
2694
|
this.auth = e, this.timer = null, this.promise = new Promise((t, r) => {
|
|
2694
2695
|
this.timer = setTimeout(() => r(_(
|
|
2695
2696
|
this.auth,
|
|
2696
2697
|
"network-request-failed"
|
|
2697
2698
|
/* AuthErrorCode.NETWORK_REQUEST_FAILED */
|
|
2698
|
-
)),
|
|
2699
|
+
)), Fi.get());
|
|
2699
2700
|
});
|
|
2700
2701
|
}
|
|
2701
2702
|
clearNetworkTimeout() {
|
|
@@ -2726,7 +2727,7 @@ function se(n, e, t) {
|
|
|
2726
2727
|
* See the License for the specific language governing permissions and
|
|
2727
2728
|
* limitations under the License.
|
|
2728
2729
|
*/
|
|
2729
|
-
async function
|
|
2730
|
+
async function $i(n, e) {
|
|
2730
2731
|
return G(n, "POST", "/v1/accounts:delete", e);
|
|
2731
2732
|
}
|
|
2732
2733
|
async function sn(n, e) {
|
|
@@ -2757,7 +2758,7 @@ function J(n) {
|
|
|
2757
2758
|
} catch {
|
|
2758
2759
|
}
|
|
2759
2760
|
}
|
|
2760
|
-
async function
|
|
2761
|
+
async function Hi(n, e = !1) {
|
|
2761
2762
|
const t = z(n), r = await t.getIdToken(e), i = Je(r);
|
|
2762
2763
|
h(
|
|
2763
2764
|
i && i.exp && i.auth_time && i.iat,
|
|
@@ -2769,14 +2770,14 @@ async function Bi(n, e = !1) {
|
|
|
2769
2770
|
return {
|
|
2770
2771
|
claims: i,
|
|
2771
2772
|
token: r,
|
|
2772
|
-
authTime: J(
|
|
2773
|
-
issuedAtTime: J(
|
|
2774
|
-
expirationTime: J(
|
|
2773
|
+
authTime: J(Oe(i.auth_time)),
|
|
2774
|
+
issuedAtTime: J(Oe(i.iat)),
|
|
2775
|
+
expirationTime: J(Oe(i.exp)),
|
|
2775
2776
|
signInProvider: a || null,
|
|
2776
2777
|
signInSecondFactor: (s == null ? void 0 : s.sign_in_second_factor) || null
|
|
2777
2778
|
};
|
|
2778
2779
|
}
|
|
2779
|
-
function
|
|
2780
|
+
function Oe(n) {
|
|
2780
2781
|
return Number(n) * 1e3;
|
|
2781
2782
|
}
|
|
2782
2783
|
function Je(n) {
|
|
@@ -2828,10 +2829,10 @@ async function Q(n, e, t = !1) {
|
|
|
2828
2829
|
try {
|
|
2829
2830
|
return await e;
|
|
2830
2831
|
} catch (r) {
|
|
2831
|
-
throw r instanceof L &&
|
|
2832
|
+
throw r instanceof L && Vi(r) && n.auth.currentUser === n && await n.auth.signOut(), r;
|
|
2832
2833
|
}
|
|
2833
2834
|
}
|
|
2834
|
-
function
|
|
2835
|
+
function Vi({ code: n }) {
|
|
2835
2836
|
return n === "auth/user-disabled" || n === "auth/user-token-expired";
|
|
2836
2837
|
}
|
|
2837
2838
|
/**
|
|
@@ -2850,7 +2851,7 @@ function Fi({ code: n }) {
|
|
|
2850
2851
|
* See the License for the specific language governing permissions and
|
|
2851
2852
|
* limitations under the License.
|
|
2852
2853
|
*/
|
|
2853
|
-
class
|
|
2854
|
+
class ji {
|
|
2854
2855
|
constructor(e) {
|
|
2855
2856
|
this.user = e, this.isRunning = !1, this.timerId = null, this.errorBackoff = 3e4;
|
|
2856
2857
|
}
|
|
@@ -2912,7 +2913,7 @@ class $i {
|
|
|
2912
2913
|
* See the License for the specific language governing permissions and
|
|
2913
2914
|
* limitations under the License.
|
|
2914
2915
|
*/
|
|
2915
|
-
class
|
|
2916
|
+
class He {
|
|
2916
2917
|
constructor(e, t) {
|
|
2917
2918
|
this.createdAt = e, this.lastLoginAt = t, this._initializeTime();
|
|
2918
2919
|
}
|
|
@@ -2945,7 +2946,7 @@ class $e {
|
|
|
2945
2946
|
* See the License for the specific language governing permissions and
|
|
2946
2947
|
* limitations under the License.
|
|
2947
2948
|
*/
|
|
2948
|
-
async function
|
|
2949
|
+
async function pe(n) {
|
|
2949
2950
|
var e;
|
|
2950
2951
|
const t = n.auth, r = await n.getIdToken(), i = await Q(n, sn(t, { idToken: r }));
|
|
2951
2952
|
h(
|
|
@@ -2956,7 +2957,7 @@ async function fe(n) {
|
|
|
2956
2957
|
);
|
|
2957
2958
|
const s = i.users[0];
|
|
2958
2959
|
n._notifyReloadListener(s);
|
|
2959
|
-
const a = !((e = s.providerUserInfo) === null || e === void 0) && e.length ? an(s.providerUserInfo) : [], c =
|
|
2960
|
+
const a = !((e = s.providerUserInfo) === null || e === void 0) && e.length ? an(s.providerUserInfo) : [], c = zi(n.providerData, a), o = n.isAnonymous, l = !(n.email && s.passwordHash) && !(c != null && c.length), u = o ? l : !1, d = {
|
|
2960
2961
|
uid: s.localId,
|
|
2961
2962
|
displayName: s.displayName || null,
|
|
2962
2963
|
photoURL: s.photoUrl || null,
|
|
@@ -2965,16 +2966,16 @@ async function fe(n) {
|
|
|
2965
2966
|
phoneNumber: s.phoneNumber || null,
|
|
2966
2967
|
tenantId: s.tenantId || null,
|
|
2967
2968
|
providerData: c,
|
|
2968
|
-
metadata: new
|
|
2969
|
+
metadata: new He(s.createdAt, s.lastLoginAt),
|
|
2969
2970
|
isAnonymous: u
|
|
2970
2971
|
};
|
|
2971
2972
|
Object.assign(n, d);
|
|
2972
2973
|
}
|
|
2973
|
-
async function
|
|
2974
|
+
async function Wi(n) {
|
|
2974
2975
|
const e = z(n);
|
|
2975
|
-
await
|
|
2976
|
+
await pe(e), await e.auth._persistUserIfCurrent(e), e.auth._notifyListenersIfCurrent(e);
|
|
2976
2977
|
}
|
|
2977
|
-
function
|
|
2978
|
+
function zi(n, e) {
|
|
2978
2979
|
return [...n.filter((r) => !e.some((i) => i.providerId === r.providerId)), ...e];
|
|
2979
2980
|
}
|
|
2980
2981
|
function an(n) {
|
|
@@ -3006,7 +3007,7 @@ function an(n) {
|
|
|
3006
3007
|
* See the License for the specific language governing permissions and
|
|
3007
3008
|
* limitations under the License.
|
|
3008
3009
|
*/
|
|
3009
|
-
async function
|
|
3010
|
+
async function Gi(n, e) {
|
|
3010
3011
|
const t = await tn(n, {}, async () => {
|
|
3011
3012
|
const r = ee({
|
|
3012
3013
|
grant_type: "refresh_token",
|
|
@@ -3027,8 +3028,8 @@ async function ji(n, e) {
|
|
|
3027
3028
|
refreshToken: t.refresh_token
|
|
3028
3029
|
};
|
|
3029
3030
|
}
|
|
3030
|
-
async function
|
|
3031
|
-
return G(n, "POST", "/v2/accounts:revokeToken",
|
|
3031
|
+
async function qi(n, e) {
|
|
3032
|
+
return G(n, "POST", "/v2/accounts:revokeToken", ye(n, e));
|
|
3032
3033
|
}
|
|
3033
3034
|
/**
|
|
3034
3035
|
* @license
|
|
@@ -3091,7 +3092,7 @@ class H {
|
|
|
3091
3092
|
this.refreshToken = null;
|
|
3092
3093
|
}
|
|
3093
3094
|
async refresh(e, t) {
|
|
3094
|
-
const { accessToken: r, refreshToken: i, expiresIn: s } = await
|
|
3095
|
+
const { accessToken: r, refreshToken: i, expiresIn: s } = await Gi(e, t);
|
|
3095
3096
|
this.updateTokensAndExpiration(r, i, Number(s));
|
|
3096
3097
|
}
|
|
3097
3098
|
updateTokensAndExpiration(e, t, r) {
|
|
@@ -3146,7 +3147,7 @@ function k(n, e) {
|
|
|
3146
3147
|
class I {
|
|
3147
3148
|
constructor(e) {
|
|
3148
3149
|
var { uid: t, auth: r, stsTokenManager: i } = e, s = Ge(e, ["uid", "auth", "stsTokenManager"]);
|
|
3149
|
-
this.providerId = "firebase", this.proactiveRefresh = new
|
|
3150
|
+
this.providerId = "firebase", this.proactiveRefresh = new ji(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);
|
|
3150
3151
|
}
|
|
3151
3152
|
async getIdToken(e) {
|
|
3152
3153
|
const t = await Q(this, this.stsTokenManager.getToken(this.auth, e));
|
|
@@ -3158,10 +3159,10 @@ class I {
|
|
|
3158
3159
|
), this.accessToken !== t && (this.accessToken = t, await this.auth._persistUserIfCurrent(this), this.auth._notifyListenersIfCurrent(this)), t;
|
|
3159
3160
|
}
|
|
3160
3161
|
getIdTokenResult(e) {
|
|
3161
|
-
return
|
|
3162
|
+
return Hi(this, e);
|
|
3162
3163
|
}
|
|
3163
3164
|
reload() {
|
|
3164
|
-
return
|
|
3165
|
+
return Wi(this);
|
|
3165
3166
|
}
|
|
3166
3167
|
_assign(e) {
|
|
3167
3168
|
this !== e && (h(
|
|
@@ -3194,13 +3195,13 @@ class I {
|
|
|
3194
3195
|
}
|
|
3195
3196
|
async _updateTokensIfNecessary(e, t = !1) {
|
|
3196
3197
|
let r = !1;
|
|
3197
|
-
e.idToken && e.idToken !== this.stsTokenManager.accessToken && (this.stsTokenManager.updateFromServerResponse(e), r = !0), t && await
|
|
3198
|
+
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);
|
|
3198
3199
|
}
|
|
3199
3200
|
async delete() {
|
|
3200
3201
|
if (v(this.auth.app))
|
|
3201
3202
|
return Promise.reject(N(this.auth));
|
|
3202
3203
|
const e = await this.getIdToken();
|
|
3203
|
-
return await Q(this,
|
|
3204
|
+
return await Q(this, $i(this.auth, { idToken: e })), this.stsTokenManager.clearRefreshToken(), this.auth.signOut();
|
|
3204
3205
|
}
|
|
3205
3206
|
toJSON() {
|
|
3206
3207
|
return Object.assign(Object.assign({
|
|
@@ -3228,16 +3229,16 @@ class I {
|
|
|
3228
3229
|
}
|
|
3229
3230
|
static _fromJSON(e, t) {
|
|
3230
3231
|
var r, i, s, a, c, o, l, u;
|
|
3231
|
-
const d = (r = t.displayName) !== null && r !== void 0 ? r : void 0, p = (i = t.email) !== null && i !== void 0 ? i : void 0, m = (s = t.phoneNumber) !== null && s !== void 0 ? s : void 0,
|
|
3232
|
+
const d = (r = t.displayName) !== null && r !== void 0 ? r : void 0, p = (i = t.email) !== null && i !== void 0 ? i : void 0, m = (s = t.phoneNumber) !== null && s !== void 0 ? s : void 0, F = (a = t.photoURL) !== null && a !== void 0 ? a : void 0, et = (c = t.tenantId) !== null && c !== void 0 ? c : void 0, we = (o = t._redirectEventId) !== null && o !== void 0 ? o : void 0, tt = (l = t.createdAt) !== null && l !== void 0 ? l : void 0, nt = (u = t.lastLoginAt) !== null && u !== void 0 ? u : void 0, { uid: Ee, emailVerified: rt, isAnonymous: it, providerData: Te, stsTokenManager: st } = t;
|
|
3232
3233
|
h(
|
|
3233
|
-
|
|
3234
|
+
Ee && st,
|
|
3234
3235
|
e,
|
|
3235
3236
|
"internal-error"
|
|
3236
3237
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
3237
3238
|
);
|
|
3238
3239
|
const On = H.fromJSON(this.name, st);
|
|
3239
3240
|
h(
|
|
3240
|
-
typeof
|
|
3241
|
+
typeof Ee == "string",
|
|
3241
3242
|
e,
|
|
3242
3243
|
"internal-error"
|
|
3243
3244
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
@@ -3251,22 +3252,22 @@ class I {
|
|
|
3251
3252
|
e,
|
|
3252
3253
|
"internal-error"
|
|
3253
3254
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
3254
|
-
), k(m, e.name), k(
|
|
3255
|
-
const
|
|
3256
|
-
uid:
|
|
3255
|
+
), k(m, e.name), k(F, e.name), k(et, e.name), k(we, e.name), k(tt, e.name), k(nt, e.name);
|
|
3256
|
+
const Se = new I({
|
|
3257
|
+
uid: Ee,
|
|
3257
3258
|
auth: e,
|
|
3258
3259
|
email: p,
|
|
3259
3260
|
emailVerified: rt,
|
|
3260
3261
|
displayName: d,
|
|
3261
3262
|
isAnonymous: it,
|
|
3262
|
-
photoURL:
|
|
3263
|
+
photoURL: F,
|
|
3263
3264
|
phoneNumber: m,
|
|
3264
3265
|
tenantId: et,
|
|
3265
3266
|
stsTokenManager: On,
|
|
3266
3267
|
createdAt: tt,
|
|
3267
3268
|
lastLoginAt: nt
|
|
3268
3269
|
});
|
|
3269
|
-
return
|
|
3270
|
+
return Te && Array.isArray(Te) && (Se.providerData = Te.map((Dn) => Object.assign({}, Dn))), we && (Se._redirectEventId = we), Se;
|
|
3270
3271
|
}
|
|
3271
3272
|
/**
|
|
3272
3273
|
* Initialize a User from an idToken server response
|
|
@@ -3282,7 +3283,7 @@ class I {
|
|
|
3282
3283
|
stsTokenManager: i,
|
|
3283
3284
|
isAnonymous: r
|
|
3284
3285
|
});
|
|
3285
|
-
return await
|
|
3286
|
+
return await pe(s), s;
|
|
3286
3287
|
}
|
|
3287
3288
|
/**
|
|
3288
3289
|
* Initialize a User from an idToken server response
|
|
@@ -3312,7 +3313,7 @@ class I {
|
|
|
3312
3313
|
phoneNumber: i.phoneNumber || null,
|
|
3313
3314
|
tenantId: i.tenantId || null,
|
|
3314
3315
|
providerData: s,
|
|
3315
|
-
metadata: new
|
|
3316
|
+
metadata: new He(i.createdAt, i.lastLoginAt),
|
|
3316
3317
|
isAnonymous: !(i.email && i.passwordHash) && !(s != null && s.length)
|
|
3317
3318
|
};
|
|
3318
3319
|
return Object.assign(o, l), o;
|
|
@@ -3530,12 +3531,12 @@ function pn(n = g()) {
|
|
|
3530
3531
|
function Ye(n = g()) {
|
|
3531
3532
|
return /iphone|ipad|ipod/i.test(n) || /macintosh/i.test(n) && /mobile/i.test(n);
|
|
3532
3533
|
}
|
|
3533
|
-
function
|
|
3534
|
+
function Ki(n = g()) {
|
|
3534
3535
|
var e;
|
|
3535
3536
|
return Ye(n) && !!(!((e = window.navigator) === null || e === void 0) && e.standalone);
|
|
3536
3537
|
}
|
|
3537
|
-
function
|
|
3538
|
-
return
|
|
3538
|
+
function Ji() {
|
|
3539
|
+
return hr() && document.documentMode === 10;
|
|
3539
3540
|
}
|
|
3540
3541
|
function mn(n = g()) {
|
|
3541
3542
|
return Ye(n) || hn(n) || pn(n) || fn(n) || /windows phone/i.test(n) || dn(n);
|
|
@@ -3587,7 +3588,7 @@ function gn(n, e = []) {
|
|
|
3587
3588
|
* See the License for the specific language governing permissions and
|
|
3588
3589
|
* limitations under the License.
|
|
3589
3590
|
*/
|
|
3590
|
-
class
|
|
3591
|
+
class Yi {
|
|
3591
3592
|
constructor(e) {
|
|
3592
3593
|
this.auth = e, this.queue = [];
|
|
3593
3594
|
}
|
|
@@ -3642,8 +3643,8 @@ class qi {
|
|
|
3642
3643
|
* See the License for the specific language governing permissions and
|
|
3643
3644
|
* limitations under the License.
|
|
3644
3645
|
*/
|
|
3645
|
-
async function
|
|
3646
|
-
return G(n, "GET", "/v2/passwordPolicy",
|
|
3646
|
+
async function Xi(n, e = {}) {
|
|
3647
|
+
return G(n, "GET", "/v2/passwordPolicy", ye(n, e));
|
|
3647
3648
|
}
|
|
3648
3649
|
/**
|
|
3649
3650
|
* @license
|
|
@@ -3661,12 +3662,12 @@ async function Ki(n, e = {}) {
|
|
|
3661
3662
|
* See the License for the specific language governing permissions and
|
|
3662
3663
|
* limitations under the License.
|
|
3663
3664
|
*/
|
|
3664
|
-
const
|
|
3665
|
-
class
|
|
3665
|
+
const Qi = 6;
|
|
3666
|
+
class Zi {
|
|
3666
3667
|
constructor(e) {
|
|
3667
3668
|
var t, r, i, s;
|
|
3668
3669
|
const a = e.customStrengthOptions;
|
|
3669
|
-
this.customStrengthOptions = {}, this.customStrengthOptions.minPasswordLength = (t = a.minPasswordLength) !== null && t !== void 0 ? t :
|
|
3670
|
+
this.customStrengthOptions = {}, this.customStrengthOptions.minPasswordLength = (t = a.minPasswordLength) !== null && t !== void 0 ? t : Qi, 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;
|
|
3670
3671
|
}
|
|
3671
3672
|
validatePassword(e) {
|
|
3672
3673
|
var t, r, i, s, a, c;
|
|
@@ -3749,9 +3750,9 @@ class Yi {
|
|
|
3749
3750
|
* See the License for the specific language governing permissions and
|
|
3750
3751
|
* limitations under the License.
|
|
3751
3752
|
*/
|
|
3752
|
-
class
|
|
3753
|
+
class es {
|
|
3753
3754
|
constructor(e, t, r, i) {
|
|
3754
|
-
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 It(this), this.idTokenSubscription = new It(this), this.beforeStateQueue = new
|
|
3755
|
+
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 It(this), this.idTokenSubscription = new It(this), this.beforeStateQueue = new Yi(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 = Qt, 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;
|
|
3755
3756
|
}
|
|
3756
3757
|
_initializeWithPersistence(e, t) {
|
|
3757
3758
|
return t && (this._popupRedirectResolver = w(t)), this._initializationPromise = this.queue(async () => {
|
|
@@ -3837,7 +3838,7 @@ class Xi {
|
|
|
3837
3838
|
}
|
|
3838
3839
|
async reloadAndSetCurrentUserOrClear(e) {
|
|
3839
3840
|
try {
|
|
3840
|
-
await
|
|
3841
|
+
await pe(e);
|
|
3841
3842
|
} catch (t) {
|
|
3842
3843
|
if ((t == null ? void 0 : t.code) !== "auth/network-request-failed")
|
|
3843
3844
|
return this.directlySetCurrentUser(null);
|
|
@@ -3845,7 +3846,7 @@ class Xi {
|
|
|
3845
3846
|
return this.directlySetCurrentUser(e);
|
|
3846
3847
|
}
|
|
3847
3848
|
useDeviceLanguage() {
|
|
3848
|
-
this.languageCode =
|
|
3849
|
+
this.languageCode = Ui();
|
|
3849
3850
|
}
|
|
3850
3851
|
async _delete() {
|
|
3851
3852
|
this._deleted = !0;
|
|
@@ -3896,7 +3897,7 @@ class Xi {
|
|
|
3896
3897
|
return this.tenantId === null ? this._projectPasswordPolicy : this._tenantPasswordPolicies[this.tenantId];
|
|
3897
3898
|
}
|
|
3898
3899
|
async _updatePasswordPolicy() {
|
|
3899
|
-
const e = await
|
|
3900
|
+
const e = await Xi(this), t = new Zi(e);
|
|
3900
3901
|
this.tenantId === null ? this._projectPasswordPolicy = t : this._tenantPasswordPolicies[this.tenantId] = t;
|
|
3901
3902
|
}
|
|
3902
3903
|
_getPersistence() {
|
|
@@ -3936,7 +3937,7 @@ class Xi {
|
|
|
3936
3937
|
token: e,
|
|
3937
3938
|
idToken: t
|
|
3938
3939
|
};
|
|
3939
|
-
this.tenantId != null && (r.tenantId = this.tenantId), await
|
|
3940
|
+
this.tenantId != null && (r.tenantId = this.tenantId), await qi(this, r);
|
|
3940
3941
|
}
|
|
3941
3942
|
}
|
|
3942
3943
|
toJSON() {
|
|
@@ -4079,15 +4080,15 @@ class Xi {
|
|
|
4079
4080
|
async _getAppCheckToken() {
|
|
4080
4081
|
var e;
|
|
4081
4082
|
const t = await ((e = this.appCheckServiceProvider.getImmediate({ optional: !0 })) === null || e === void 0 ? void 0 : e.getToken());
|
|
4082
|
-
return t != null && t.error &&
|
|
4083
|
+
return t != null && t.error && Ni(`Error while retrieving App Check token: ${t.error}`), t == null ? void 0 : t.token;
|
|
4083
4084
|
}
|
|
4084
4085
|
}
|
|
4085
|
-
function
|
|
4086
|
+
function ve(n) {
|
|
4086
4087
|
return z(n);
|
|
4087
4088
|
}
|
|
4088
4089
|
class It {
|
|
4089
4090
|
constructor(e) {
|
|
4090
|
-
this.auth = e, this.observer = null, this.addObserver =
|
|
4091
|
+
this.auth = e, this.observer = null, this.addObserver = vr((t) => this.observer = t);
|
|
4091
4092
|
}
|
|
4092
4093
|
get next() {
|
|
4093
4094
|
return h(
|
|
@@ -4122,16 +4123,16 @@ let Xe = {
|
|
|
4122
4123
|
recaptchaEnterpriseScript: "",
|
|
4123
4124
|
gapiScript: ""
|
|
4124
4125
|
};
|
|
4125
|
-
function
|
|
4126
|
+
function ts(n) {
|
|
4126
4127
|
Xe = n;
|
|
4127
4128
|
}
|
|
4128
|
-
function
|
|
4129
|
+
function ns(n) {
|
|
4129
4130
|
return Xe.loadJS(n);
|
|
4130
4131
|
}
|
|
4131
|
-
function
|
|
4132
|
+
function rs() {
|
|
4132
4133
|
return Xe.gapiScript;
|
|
4133
4134
|
}
|
|
4134
|
-
function
|
|
4135
|
+
function is(n) {
|
|
4135
4136
|
return `__${n}${Math.floor(Math.random() * 1e6)}`;
|
|
4136
4137
|
}
|
|
4137
4138
|
/**
|
|
@@ -4150,11 +4151,11 @@ function ts(n) {
|
|
|
4150
4151
|
* See the License for the specific language governing permissions and
|
|
4151
4152
|
* limitations under the License.
|
|
4152
4153
|
*/
|
|
4153
|
-
function
|
|
4154
|
+
function ss(n, e) {
|
|
4154
4155
|
const t = qt(n, "auth");
|
|
4155
4156
|
if (t.isInitialized()) {
|
|
4156
4157
|
const i = t.getImmediate(), s = t.getOptions();
|
|
4157
|
-
if (
|
|
4158
|
+
if (de(s, e ?? {}))
|
|
4158
4159
|
return i;
|
|
4159
4160
|
T(
|
|
4160
4161
|
i,
|
|
@@ -4164,12 +4165,12 @@ function ns(n, e) {
|
|
|
4164
4165
|
}
|
|
4165
4166
|
return t.initialize({ options: e });
|
|
4166
4167
|
}
|
|
4167
|
-
function
|
|
4168
|
+
function as(n, e) {
|
|
4168
4169
|
const t = (e == null ? void 0 : e.persistence) || [], r = (Array.isArray(t) ? t : [t]).map(w);
|
|
4169
4170
|
e != null && e.errorMap && n._updateErrorMap(e.errorMap), n._initializeWithPersistence(r, e == null ? void 0 : e.popupRedirectResolver);
|
|
4170
4171
|
}
|
|
4171
|
-
function
|
|
4172
|
-
const r =
|
|
4172
|
+
function os(n, e, t) {
|
|
4173
|
+
const r = ve(n);
|
|
4173
4174
|
h(
|
|
4174
4175
|
r._canInitEmulator,
|
|
4175
4176
|
r,
|
|
@@ -4181,19 +4182,19 @@ function is(n, e, t) {
|
|
|
4181
4182
|
"invalid-emulator-scheme"
|
|
4182
4183
|
/* AuthErrorCode.INVALID_EMULATOR_SCHEME */
|
|
4183
4184
|
);
|
|
4184
|
-
const i = !1, s = _n(e), { host: a, port: c } =
|
|
4185
|
+
const i = !1, s = _n(e), { host: a, port: c } = cs(e), o = c === null ? "" : `:${c}`;
|
|
4185
4186
|
r.config.emulator = { url: `${s}//${a}${o}/` }, r.settings.appVerificationDisabledForTesting = !0, r.emulatorConfig = Object.freeze({
|
|
4186
4187
|
host: a,
|
|
4187
4188
|
port: c,
|
|
4188
4189
|
protocol: s.replace(":", ""),
|
|
4189
4190
|
options: Object.freeze({ disableWarnings: i })
|
|
4190
|
-
}),
|
|
4191
|
+
}), ls();
|
|
4191
4192
|
}
|
|
4192
4193
|
function _n(n) {
|
|
4193
4194
|
const e = n.indexOf(":");
|
|
4194
4195
|
return e < 0 ? "" : n.substr(0, e + 1);
|
|
4195
4196
|
}
|
|
4196
|
-
function
|
|
4197
|
+
function cs(n) {
|
|
4197
4198
|
const e = _n(n), t = /(\/\/)?([^?#/]+)/.exec(n.substr(e.length));
|
|
4198
4199
|
if (!t)
|
|
4199
4200
|
return { host: "", port: null };
|
|
@@ -4212,7 +4213,7 @@ function wt(n) {
|
|
|
4212
4213
|
const e = Number(n);
|
|
4213
4214
|
return isNaN(e) ? null : e;
|
|
4214
4215
|
}
|
|
4215
|
-
function
|
|
4216
|
+
function ls() {
|
|
4216
4217
|
function n() {
|
|
4217
4218
|
const e = document.createElement("p"), t = e.style;
|
|
4218
4219
|
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);
|
|
@@ -4278,7 +4279,7 @@ class yn {
|
|
|
4278
4279
|
* limitations under the License.
|
|
4279
4280
|
*/
|
|
4280
4281
|
async function j(n, e) {
|
|
4281
|
-
return nn(n, "POST", "/v1/accounts:signInWithIdp",
|
|
4282
|
+
return nn(n, "POST", "/v1/accounts:signInWithIdp", ye(n, e));
|
|
4282
4283
|
}
|
|
4283
4284
|
/**
|
|
4284
4285
|
* @license
|
|
@@ -4296,7 +4297,7 @@ async function j(n, e) {
|
|
|
4296
4297
|
* See the License for the specific language governing permissions and
|
|
4297
4298
|
* limitations under the License.
|
|
4298
4299
|
*/
|
|
4299
|
-
const
|
|
4300
|
+
const us = "http://localhost";
|
|
4300
4301
|
class U extends yn {
|
|
4301
4302
|
constructor() {
|
|
4302
4303
|
super(...arguments), this.pendingToken = null;
|
|
@@ -4354,7 +4355,7 @@ class U extends yn {
|
|
|
4354
4355
|
}
|
|
4355
4356
|
buildRequest() {
|
|
4356
4357
|
const e = {
|
|
4357
|
-
requestUri:
|
|
4358
|
+
requestUri: us,
|
|
4358
4359
|
returnSecureToken: !0
|
|
4359
4360
|
};
|
|
4360
4361
|
if (this.pendingToken)
|
|
@@ -4541,7 +4542,7 @@ A.PROVIDER_ID = "facebook.com";
|
|
|
4541
4542
|
* See the License for the specific language governing permissions and
|
|
4542
4543
|
* limitations under the License.
|
|
4543
4544
|
*/
|
|
4544
|
-
class
|
|
4545
|
+
class C extends re {
|
|
4545
4546
|
constructor() {
|
|
4546
4547
|
super(
|
|
4547
4548
|
"google.com"
|
|
@@ -4563,8 +4564,8 @@ class R extends re {
|
|
|
4563
4564
|
*/
|
|
4564
4565
|
static credential(e, t) {
|
|
4565
4566
|
return U._fromParams({
|
|
4566
|
-
providerId:
|
|
4567
|
-
signInMethod:
|
|
4567
|
+
providerId: C.PROVIDER_ID,
|
|
4568
|
+
signInMethod: C.GOOGLE_SIGN_IN_METHOD,
|
|
4568
4569
|
idToken: e,
|
|
4569
4570
|
accessToken: t
|
|
4570
4571
|
});
|
|
@@ -4575,7 +4576,7 @@ class R extends re {
|
|
|
4575
4576
|
* @param userCredential - The user credential.
|
|
4576
4577
|
*/
|
|
4577
4578
|
static credentialFromResult(e) {
|
|
4578
|
-
return
|
|
4579
|
+
return C.credentialFromTaggedObject(e);
|
|
4579
4580
|
}
|
|
4580
4581
|
/**
|
|
4581
4582
|
* Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was
|
|
@@ -4584,7 +4585,7 @@ class R extends re {
|
|
|
4584
4585
|
* @param userCredential - The user credential.
|
|
4585
4586
|
*/
|
|
4586
4587
|
static credentialFromError(e) {
|
|
4587
|
-
return
|
|
4588
|
+
return C.credentialFromTaggedObject(e.customData || {});
|
|
4588
4589
|
}
|
|
4589
4590
|
static credentialFromTaggedObject({ _tokenResponse: e }) {
|
|
4590
4591
|
if (!e)
|
|
@@ -4593,14 +4594,14 @@ class R extends re {
|
|
|
4593
4594
|
if (!t && !r)
|
|
4594
4595
|
return null;
|
|
4595
4596
|
try {
|
|
4596
|
-
return
|
|
4597
|
+
return C.credential(t, r);
|
|
4597
4598
|
} catch {
|
|
4598
4599
|
return null;
|
|
4599
4600
|
}
|
|
4600
4601
|
}
|
|
4601
4602
|
}
|
|
4602
|
-
|
|
4603
|
-
|
|
4603
|
+
C.GOOGLE_SIGN_IN_METHOD = "google.com";
|
|
4604
|
+
C.PROVIDER_ID = "google.com";
|
|
4604
4605
|
/**
|
|
4605
4606
|
* @license
|
|
4606
4607
|
* Copyright 2020 Google LLC
|
|
@@ -4617,7 +4618,7 @@ R.PROVIDER_ID = "google.com";
|
|
|
4617
4618
|
* See the License for the specific language governing permissions and
|
|
4618
4619
|
* limitations under the License.
|
|
4619
4620
|
*/
|
|
4620
|
-
class
|
|
4621
|
+
class R extends re {
|
|
4621
4622
|
constructor() {
|
|
4622
4623
|
super(
|
|
4623
4624
|
"github.com"
|
|
@@ -4631,8 +4632,8 @@ class C extends re {
|
|
|
4631
4632
|
*/
|
|
4632
4633
|
static credential(e) {
|
|
4633
4634
|
return U._fromParams({
|
|
4634
|
-
providerId:
|
|
4635
|
-
signInMethod:
|
|
4635
|
+
providerId: R.PROVIDER_ID,
|
|
4636
|
+
signInMethod: R.GITHUB_SIGN_IN_METHOD,
|
|
4636
4637
|
accessToken: e
|
|
4637
4638
|
});
|
|
4638
4639
|
}
|
|
@@ -4642,7 +4643,7 @@ class C extends re {
|
|
|
4642
4643
|
* @param userCredential - The user credential.
|
|
4643
4644
|
*/
|
|
4644
4645
|
static credentialFromResult(e) {
|
|
4645
|
-
return
|
|
4646
|
+
return R.credentialFromTaggedObject(e);
|
|
4646
4647
|
}
|
|
4647
4648
|
/**
|
|
4648
4649
|
* Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was
|
|
@@ -4651,20 +4652,20 @@ class C extends re {
|
|
|
4651
4652
|
* @param userCredential - The user credential.
|
|
4652
4653
|
*/
|
|
4653
4654
|
static credentialFromError(e) {
|
|
4654
|
-
return
|
|
4655
|
+
return R.credentialFromTaggedObject(e.customData || {});
|
|
4655
4656
|
}
|
|
4656
4657
|
static credentialFromTaggedObject({ _tokenResponse: e }) {
|
|
4657
4658
|
if (!e || !("oauthAccessToken" in e) || !e.oauthAccessToken)
|
|
4658
4659
|
return null;
|
|
4659
4660
|
try {
|
|
4660
|
-
return
|
|
4661
|
+
return R.credential(e.oauthAccessToken);
|
|
4661
4662
|
} catch {
|
|
4662
4663
|
return null;
|
|
4663
4664
|
}
|
|
4664
4665
|
}
|
|
4665
4666
|
}
|
|
4666
|
-
|
|
4667
|
-
|
|
4667
|
+
R.GITHUB_SIGN_IN_METHOD = "github.com";
|
|
4668
|
+
R.PROVIDER_ID = "github.com";
|
|
4668
4669
|
/**
|
|
4669
4670
|
* @license
|
|
4670
4671
|
* Copyright 2020 Google LLC
|
|
@@ -4797,10 +4798,10 @@ function Et(n) {
|
|
|
4797
4798
|
* See the License for the specific language governing permissions and
|
|
4798
4799
|
* limitations under the License.
|
|
4799
4800
|
*/
|
|
4800
|
-
class
|
|
4801
|
+
class me extends L {
|
|
4801
4802
|
constructor(e, t, r, i) {
|
|
4802
4803
|
var s;
|
|
4803
|
-
super(t.code, t.message), this.operationType = r, this.user = i, Object.setPrototypeOf(this,
|
|
4804
|
+
super(t.code, t.message), this.operationType = r, this.user = i, Object.setPrototypeOf(this, me.prototype), this.customData = {
|
|
4804
4805
|
appName: e.name,
|
|
4805
4806
|
tenantId: (s = e.tenantId) !== null && s !== void 0 ? s : void 0,
|
|
4806
4807
|
_serverResponse: t.customData._serverResponse,
|
|
@@ -4808,15 +4809,15 @@ class pe extends L {
|
|
|
4808
4809
|
};
|
|
4809
4810
|
}
|
|
4810
4811
|
static _fromErrorAndOperation(e, t, r, i) {
|
|
4811
|
-
return new
|
|
4812
|
+
return new me(e, t, r, i);
|
|
4812
4813
|
}
|
|
4813
4814
|
}
|
|
4814
4815
|
function bn(n, e, t, r) {
|
|
4815
4816
|
return (e === "reauthenticate" ? t._getReauthenticationResolver(n) : t._getIdTokenResponse(n)).catch((s) => {
|
|
4816
|
-
throw s.code === "auth/multi-factor-auth-required" ?
|
|
4817
|
+
throw s.code === "auth/multi-factor-auth-required" ? me._fromErrorAndOperation(n, s, e, r) : s;
|
|
4817
4818
|
});
|
|
4818
4819
|
}
|
|
4819
|
-
async function
|
|
4820
|
+
async function ds(n, e, t = !1) {
|
|
4820
4821
|
const r = await Q(n, e._linkToIdToken(n.auth, await n.getIdToken()), t);
|
|
4821
4822
|
return x._forOperation(n, "link", r);
|
|
4822
4823
|
}
|
|
@@ -4836,7 +4837,7 @@ async function cs(n, e, t = !1) {
|
|
|
4836
4837
|
* See the License for the specific language governing permissions and
|
|
4837
4838
|
* limitations under the License.
|
|
4838
4839
|
*/
|
|
4839
|
-
async function
|
|
4840
|
+
async function hs(n, e, t = !1) {
|
|
4840
4841
|
const { auth: r } = n;
|
|
4841
4842
|
if (v(r.app))
|
|
4842
4843
|
return Promise.reject(N(r));
|
|
@@ -4887,7 +4888,7 @@ async function ls(n, e, t = !1) {
|
|
|
4887
4888
|
* See the License for the specific language governing permissions and
|
|
4888
4889
|
* limitations under the License.
|
|
4889
4890
|
*/
|
|
4890
|
-
async function
|
|
4891
|
+
async function fs(n, e, t = !1) {
|
|
4891
4892
|
if (v(n.app))
|
|
4892
4893
|
return Promise.reject(N(n));
|
|
4893
4894
|
const r = "signIn", i = await bn(n, r, e), s = await x._fromIdTokenResponse(n, r, i);
|
|
@@ -4909,8 +4910,8 @@ async function us(n, e, t = !1) {
|
|
|
4909
4910
|
* See the License for the specific language governing permissions and
|
|
4910
4911
|
* limitations under the License.
|
|
4911
4912
|
*/
|
|
4912
|
-
async function
|
|
4913
|
-
return nn(n, "POST", "/v1/accounts:signInWithCustomToken",
|
|
4913
|
+
async function ps(n, e) {
|
|
4914
|
+
return nn(n, "POST", "/v1/accounts:signInWithCustomToken", ye(n, e));
|
|
4914
4915
|
}
|
|
4915
4916
|
/**
|
|
4916
4917
|
* @license
|
|
@@ -4928,22 +4929,22 @@ async function ds(n, e) {
|
|
|
4928
4929
|
* See the License for the specific language governing permissions and
|
|
4929
4930
|
* limitations under the License.
|
|
4930
4931
|
*/
|
|
4931
|
-
async function
|
|
4932
|
+
async function ms(n, e) {
|
|
4932
4933
|
if (v(n.app))
|
|
4933
4934
|
return Promise.reject(N(n));
|
|
4934
|
-
const t =
|
|
4935
|
+
const t = ve(n), r = await ps(t, {
|
|
4935
4936
|
token: e,
|
|
4936
4937
|
returnSecureToken: !0
|
|
4937
4938
|
}), i = await x._fromIdTokenResponse(t, "signIn", r);
|
|
4938
4939
|
return await t._updateCurrentUser(i.user), i;
|
|
4939
4940
|
}
|
|
4940
|
-
function
|
|
4941
|
+
function gs(n, e, t, r) {
|
|
4941
4942
|
return z(n).onIdTokenChanged(e, t, r);
|
|
4942
4943
|
}
|
|
4943
|
-
function
|
|
4944
|
+
function _s(n, e, t) {
|
|
4944
4945
|
return z(n).beforeAuthStateChanged(e, t);
|
|
4945
4946
|
}
|
|
4946
|
-
const
|
|
4947
|
+
const ge = "__sak";
|
|
4947
4948
|
/**
|
|
4948
4949
|
* @license
|
|
4949
4950
|
* Copyright 2019 Google LLC
|
|
@@ -4966,7 +4967,7 @@ class In {
|
|
|
4966
4967
|
}
|
|
4967
4968
|
_isAvailable() {
|
|
4968
4969
|
try {
|
|
4969
|
-
return this.storage ? (this.storage.setItem(
|
|
4970
|
+
return this.storage ? (this.storage.setItem(ge, "1"), this.storage.removeItem(ge), Promise.resolve(!0)) : Promise.resolve(!1);
|
|
4970
4971
|
} catch {
|
|
4971
4972
|
return Promise.resolve(!1);
|
|
4972
4973
|
}
|
|
@@ -5001,7 +5002,7 @@ class In {
|
|
|
5001
5002
|
* See the License for the specific language governing permissions and
|
|
5002
5003
|
* limitations under the License.
|
|
5003
5004
|
*/
|
|
5004
|
-
const
|
|
5005
|
+
const ys = 1e3, vs = 10;
|
|
5005
5006
|
class wn extends In {
|
|
5006
5007
|
constructor() {
|
|
5007
5008
|
super(
|
|
@@ -5029,7 +5030,7 @@ class wn extends In {
|
|
|
5029
5030
|
const a = this.storage.getItem(r);
|
|
5030
5031
|
!t && this.localCache[r] === a || this.notifyListeners(r, a);
|
|
5031
5032
|
}, s = this.storage.getItem(r);
|
|
5032
|
-
|
|
5033
|
+
Ji() && s !== e.newValue && e.newValue !== e.oldValue ? setTimeout(i, vs) : i();
|
|
5033
5034
|
}
|
|
5034
5035
|
notifyListeners(e, t) {
|
|
5035
5036
|
this.localCache[e] = t;
|
|
@@ -5051,7 +5052,7 @@ class wn extends In {
|
|
|
5051
5052
|
!0
|
|
5052
5053
|
);
|
|
5053
5054
|
});
|
|
5054
|
-
},
|
|
5055
|
+
}, ys);
|
|
5055
5056
|
}
|
|
5056
5057
|
stopPolling() {
|
|
5057
5058
|
this.pollTimer && (clearInterval(this.pollTimer), this.pollTimer = null);
|
|
@@ -5081,7 +5082,7 @@ class wn extends In {
|
|
|
5081
5082
|
}
|
|
5082
5083
|
}
|
|
5083
5084
|
wn.type = "LOCAL";
|
|
5084
|
-
const
|
|
5085
|
+
const bs = wn;
|
|
5085
5086
|
/**
|
|
5086
5087
|
* @license
|
|
5087
5088
|
* Copyright 2020 Google LLC
|
|
@@ -5129,7 +5130,7 @@ const Tn = En;
|
|
|
5129
5130
|
* See the License for the specific language governing permissions and
|
|
5130
5131
|
* limitations under the License.
|
|
5131
5132
|
*/
|
|
5132
|
-
function
|
|
5133
|
+
function Is(n) {
|
|
5133
5134
|
return Promise.all(n.map(async (e) => {
|
|
5134
5135
|
try {
|
|
5135
5136
|
return {
|
|
@@ -5160,7 +5161,7 @@ function ys(n) {
|
|
|
5160
5161
|
* See the License for the specific language governing permissions and
|
|
5161
5162
|
* limitations under the License.
|
|
5162
5163
|
*/
|
|
5163
|
-
class
|
|
5164
|
+
class be {
|
|
5164
5165
|
constructor(e) {
|
|
5165
5166
|
this.eventTarget = e, this.handlersMap = {}, this.boundEventHandler = this.handleEvent.bind(this);
|
|
5166
5167
|
}
|
|
@@ -5174,7 +5175,7 @@ class ve {
|
|
|
5174
5175
|
const t = this.receivers.find((i) => i.isListeningto(e));
|
|
5175
5176
|
if (t)
|
|
5176
5177
|
return t;
|
|
5177
|
-
const r = new
|
|
5178
|
+
const r = new be(e);
|
|
5178
5179
|
return this.receivers.push(r), r;
|
|
5179
5180
|
}
|
|
5180
5181
|
isListeningto(e) {
|
|
@@ -5199,7 +5200,7 @@ class ve {
|
|
|
5199
5200
|
eventId: r,
|
|
5200
5201
|
eventType: i
|
|
5201
5202
|
});
|
|
5202
|
-
const c = Array.from(a).map(async (l) => l(t.origin, s)), o = await
|
|
5203
|
+
const c = Array.from(a).map(async (l) => l(t.origin, s)), o = await Is(c);
|
|
5203
5204
|
t.ports[0].postMessage({
|
|
5204
5205
|
status: "done",
|
|
5205
5206
|
eventId: r,
|
|
@@ -5228,7 +5229,7 @@ class ve {
|
|
|
5228
5229
|
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);
|
|
5229
5230
|
}
|
|
5230
5231
|
}
|
|
5231
|
-
|
|
5232
|
+
be.receivers = [];
|
|
5232
5233
|
/**
|
|
5233
5234
|
* @license
|
|
5234
5235
|
* Copyright 2020 Google LLC
|
|
@@ -5267,7 +5268,7 @@ function Qe(n = "", e = 10) {
|
|
|
5267
5268
|
* See the License for the specific language governing permissions and
|
|
5268
5269
|
* limitations under the License.
|
|
5269
5270
|
*/
|
|
5270
|
-
class
|
|
5271
|
+
class ws {
|
|
5271
5272
|
constructor(e) {
|
|
5272
5273
|
this.target = e, this.handlers = /* @__PURE__ */ new Set();
|
|
5273
5274
|
}
|
|
@@ -5367,7 +5368,7 @@ class vs {
|
|
|
5367
5368
|
function y() {
|
|
5368
5369
|
return window;
|
|
5369
5370
|
}
|
|
5370
|
-
function
|
|
5371
|
+
function Es(n) {
|
|
5371
5372
|
y().location.href = n;
|
|
5372
5373
|
}
|
|
5373
5374
|
/**
|
|
@@ -5389,7 +5390,7 @@ function bs(n) {
|
|
|
5389
5390
|
function Sn() {
|
|
5390
5391
|
return typeof y().WorkerGlobalScope < "u" && typeof y().importScripts == "function";
|
|
5391
5392
|
}
|
|
5392
|
-
async function
|
|
5393
|
+
async function Ts() {
|
|
5393
5394
|
if (!(navigator != null && navigator.serviceWorker))
|
|
5394
5395
|
return null;
|
|
5395
5396
|
try {
|
|
@@ -5398,11 +5399,11 @@ async function Is() {
|
|
|
5398
5399
|
return null;
|
|
5399
5400
|
}
|
|
5400
5401
|
}
|
|
5401
|
-
function
|
|
5402
|
+
function Ss() {
|
|
5402
5403
|
var n;
|
|
5403
5404
|
return ((n = navigator == null ? void 0 : navigator.serviceWorker) === null || n === void 0 ? void 0 : n.controller) || null;
|
|
5404
5405
|
}
|
|
5405
|
-
function
|
|
5406
|
+
function ks() {
|
|
5406
5407
|
return Sn() ? self : null;
|
|
5407
5408
|
}
|
|
5408
5409
|
/**
|
|
@@ -5421,7 +5422,7 @@ function Es() {
|
|
|
5421
5422
|
* See the License for the specific language governing permissions and
|
|
5422
5423
|
* limitations under the License.
|
|
5423
5424
|
*/
|
|
5424
|
-
const kn = "firebaseLocalStorageDb",
|
|
5425
|
+
const kn = "firebaseLocalStorageDb", As = 1, _e = "firebaseLocalStorage", An = "fbase_key";
|
|
5425
5426
|
class ie {
|
|
5426
5427
|
constructor(e) {
|
|
5427
5428
|
this.request = e;
|
|
@@ -5436,55 +5437,55 @@ class ie {
|
|
|
5436
5437
|
});
|
|
5437
5438
|
}
|
|
5438
5439
|
}
|
|
5439
|
-
function
|
|
5440
|
-
return n.transaction([
|
|
5440
|
+
function Ie(n, e) {
|
|
5441
|
+
return n.transaction([_e], e ? "readwrite" : "readonly").objectStore(_e);
|
|
5441
5442
|
}
|
|
5442
|
-
function
|
|
5443
|
+
function Cs() {
|
|
5443
5444
|
const n = indexedDB.deleteDatabase(kn);
|
|
5444
5445
|
return new ie(n).toPromise();
|
|
5445
5446
|
}
|
|
5446
|
-
function
|
|
5447
|
-
const n = indexedDB.open(kn,
|
|
5447
|
+
function Ve() {
|
|
5448
|
+
const n = indexedDB.open(kn, As);
|
|
5448
5449
|
return new Promise((e, t) => {
|
|
5449
5450
|
n.addEventListener("error", () => {
|
|
5450
5451
|
t(n.error);
|
|
5451
5452
|
}), n.addEventListener("upgradeneeded", () => {
|
|
5452
5453
|
const r = n.result;
|
|
5453
5454
|
try {
|
|
5454
|
-
r.createObjectStore(
|
|
5455
|
+
r.createObjectStore(_e, { keyPath: An });
|
|
5455
5456
|
} catch (i) {
|
|
5456
5457
|
t(i);
|
|
5457
5458
|
}
|
|
5458
5459
|
}), n.addEventListener("success", async () => {
|
|
5459
5460
|
const r = n.result;
|
|
5460
|
-
r.objectStoreNames.contains(
|
|
5461
|
+
r.objectStoreNames.contains(_e) ? e(r) : (r.close(), await Cs(), e(await Ve()));
|
|
5461
5462
|
});
|
|
5462
5463
|
});
|
|
5463
5464
|
}
|
|
5464
5465
|
async function Tt(n, e, t) {
|
|
5465
|
-
const r =
|
|
5466
|
+
const r = Ie(n, !0).put({
|
|
5466
5467
|
[An]: e,
|
|
5467
5468
|
value: t
|
|
5468
5469
|
});
|
|
5469
5470
|
return new ie(r).toPromise();
|
|
5470
5471
|
}
|
|
5471
|
-
async function
|
|
5472
|
-
const t =
|
|
5472
|
+
async function Rs(n, e) {
|
|
5473
|
+
const t = Ie(n, !1).get(e), r = await new ie(t).toPromise();
|
|
5473
5474
|
return r === void 0 ? null : r.value;
|
|
5474
5475
|
}
|
|
5475
5476
|
function St(n, e) {
|
|
5476
|
-
const t =
|
|
5477
|
+
const t = Ie(n, !0).delete(e);
|
|
5477
5478
|
return new ie(t).toPromise();
|
|
5478
5479
|
}
|
|
5479
|
-
const
|
|
5480
|
-
class
|
|
5480
|
+
const Ps = 800, Os = 3;
|
|
5481
|
+
class Cn {
|
|
5481
5482
|
constructor() {
|
|
5482
5483
|
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(() => {
|
|
5483
5484
|
}, () => {
|
|
5484
5485
|
});
|
|
5485
5486
|
}
|
|
5486
5487
|
async _openDb() {
|
|
5487
|
-
return this.db ? this.db : (this.db = await
|
|
5488
|
+
return this.db ? this.db : (this.db = await Ve(), this.db);
|
|
5488
5489
|
}
|
|
5489
5490
|
async _withRetries(e) {
|
|
5490
5491
|
let t = 0;
|
|
@@ -5493,7 +5494,7 @@ class Rn {
|
|
|
5493
5494
|
const r = await this._openDb();
|
|
5494
5495
|
return await e(r);
|
|
5495
5496
|
} catch (r) {
|
|
5496
|
-
if (t++ >
|
|
5497
|
+
if (t++ > Os)
|
|
5497
5498
|
throw r;
|
|
5498
5499
|
this.db && (this.db.close(), this.db = void 0);
|
|
5499
5500
|
}
|
|
@@ -5509,7 +5510,7 @@ class Rn {
|
|
|
5509
5510
|
* As the worker we should listen to events from the main window.
|
|
5510
5511
|
*/
|
|
5511
5512
|
async initializeReceiver() {
|
|
5512
|
-
this.receiver =
|
|
5513
|
+
this.receiver = be._getInstance(ks()), this.receiver._subscribe("keyChanged", async (e, t) => ({
|
|
5513
5514
|
keyProcessed: (await this._poll()).includes(t.key)
|
|
5514
5515
|
})), this.receiver._subscribe("ping", async (e, t) => [
|
|
5515
5516
|
"keyChanged"
|
|
@@ -5525,9 +5526,9 @@ class Rn {
|
|
|
5525
5526
|
*/
|
|
5526
5527
|
async initializeSender() {
|
|
5527
5528
|
var e, t;
|
|
5528
|
-
if (this.activeServiceWorker = await
|
|
5529
|
+
if (this.activeServiceWorker = await Ts(), !this.activeServiceWorker)
|
|
5529
5530
|
return;
|
|
5530
|
-
this.sender = new
|
|
5531
|
+
this.sender = new ws(this.activeServiceWorker);
|
|
5531
5532
|
const r = await this.sender._send(
|
|
5532
5533
|
"ping",
|
|
5533
5534
|
{},
|
|
@@ -5549,7 +5550,7 @@ class Rn {
|
|
|
5549
5550
|
* @param key - Storage key which changed.
|
|
5550
5551
|
*/
|
|
5551
5552
|
async notifyServiceWorker(e) {
|
|
5552
|
-
if (!(!this.sender || !this.activeServiceWorker ||
|
|
5553
|
+
if (!(!this.sender || !this.activeServiceWorker || Ss() !== this.activeServiceWorker))
|
|
5553
5554
|
try {
|
|
5554
5555
|
await this.sender._send(
|
|
5555
5556
|
"keyChanged",
|
|
@@ -5565,8 +5566,8 @@ class Rn {
|
|
|
5565
5566
|
try {
|
|
5566
5567
|
if (!indexedDB)
|
|
5567
5568
|
return !1;
|
|
5568
|
-
const e = await
|
|
5569
|
-
return await Tt(e,
|
|
5569
|
+
const e = await Ve();
|
|
5570
|
+
return await Tt(e, ge, "1"), await St(e, ge), !0;
|
|
5570
5571
|
} catch {
|
|
5571
5572
|
}
|
|
5572
5573
|
return !1;
|
|
@@ -5583,7 +5584,7 @@ class Rn {
|
|
|
5583
5584
|
return this._withPendingWrite(async () => (await this._withRetries((r) => Tt(r, e, t)), this.localCache[e] = t, this.notifyServiceWorker(e)));
|
|
5584
5585
|
}
|
|
5585
5586
|
async _get(e) {
|
|
5586
|
-
const t = await this._withRetries((r) =>
|
|
5587
|
+
const t = await this._withRetries((r) => Rs(r, e));
|
|
5587
5588
|
return this.localCache[e] = t, t;
|
|
5588
5589
|
}
|
|
5589
5590
|
async _remove(e) {
|
|
@@ -5591,7 +5592,7 @@ class Rn {
|
|
|
5591
5592
|
}
|
|
5592
5593
|
async _poll() {
|
|
5593
5594
|
const e = await this._withRetries((i) => {
|
|
5594
|
-
const s =
|
|
5595
|
+
const s = Ie(i, !1).getAll();
|
|
5595
5596
|
return new ie(s).toPromise();
|
|
5596
5597
|
});
|
|
5597
5598
|
if (!e)
|
|
@@ -5614,7 +5615,7 @@ class Rn {
|
|
|
5614
5615
|
i(t);
|
|
5615
5616
|
}
|
|
5616
5617
|
startPolling() {
|
|
5617
|
-
this.stopPolling(), this.pollTimer = setInterval(async () => this._poll(),
|
|
5618
|
+
this.stopPolling(), this.pollTimer = setInterval(async () => this._poll(), Ps);
|
|
5618
5619
|
}
|
|
5619
5620
|
stopPolling() {
|
|
5620
5621
|
this.pollTimer && (clearInterval(this.pollTimer), this.pollTimer = null);
|
|
@@ -5626,8 +5627,8 @@ class Rn {
|
|
|
5626
5627
|
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();
|
|
5627
5628
|
}
|
|
5628
5629
|
}
|
|
5629
|
-
|
|
5630
|
-
const
|
|
5630
|
+
Cn.type = "LOCAL";
|
|
5631
|
+
const Ds = Cn;
|
|
5631
5632
|
new ne(3e4, 6e4);
|
|
5632
5633
|
/**
|
|
5633
5634
|
* @license
|
|
@@ -5645,7 +5646,7 @@ new ne(3e4, 6e4);
|
|
|
5645
5646
|
* See the License for the specific language governing permissions and
|
|
5646
5647
|
* limitations under the License.
|
|
5647
5648
|
*/
|
|
5648
|
-
function
|
|
5649
|
+
function Ns(n, e) {
|
|
5649
5650
|
return e ? w(e) : (h(
|
|
5650
5651
|
n._popupRedirectResolver,
|
|
5651
5652
|
n,
|
|
@@ -5699,26 +5700,26 @@ class Ze extends yn {
|
|
|
5699
5700
|
return e && (t.idToken = e), t;
|
|
5700
5701
|
}
|
|
5701
5702
|
}
|
|
5702
|
-
function
|
|
5703
|
-
return
|
|
5703
|
+
function Ls(n) {
|
|
5704
|
+
return fs(n.auth, new Ze(n), n.bypassAuthState);
|
|
5704
5705
|
}
|
|
5705
|
-
function
|
|
5706
|
+
function Ms(n) {
|
|
5706
5707
|
const { auth: e, user: t } = n;
|
|
5707
5708
|
return h(
|
|
5708
5709
|
t,
|
|
5709
5710
|
e,
|
|
5710
5711
|
"internal-error"
|
|
5711
5712
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
5712
|
-
),
|
|
5713
|
+
), hs(t, new Ze(n), n.bypassAuthState);
|
|
5713
5714
|
}
|
|
5714
|
-
async function
|
|
5715
|
+
async function Us(n) {
|
|
5715
5716
|
const { auth: e, user: t } = n;
|
|
5716
5717
|
return h(
|
|
5717
5718
|
t,
|
|
5718
5719
|
e,
|
|
5719
5720
|
"internal-error"
|
|
5720
5721
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
5721
|
-
),
|
|
5722
|
+
), ds(t, new Ze(n), n.bypassAuthState);
|
|
5722
5723
|
}
|
|
5723
5724
|
/**
|
|
5724
5725
|
* @license
|
|
@@ -5736,7 +5737,7 @@ async function Ns(n) {
|
|
|
5736
5737
|
* See the License for the specific language governing permissions and
|
|
5737
5738
|
* limitations under the License.
|
|
5738
5739
|
*/
|
|
5739
|
-
class
|
|
5740
|
+
class Rn {
|
|
5740
5741
|
constructor(e, t, r, i, s = !1) {
|
|
5741
5742
|
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];
|
|
5742
5743
|
}
|
|
@@ -5778,13 +5779,13 @@ class Cn {
|
|
|
5778
5779
|
switch (e) {
|
|
5779
5780
|
case "signInViaPopup":
|
|
5780
5781
|
case "signInViaRedirect":
|
|
5781
|
-
return
|
|
5782
|
+
return Ls;
|
|
5782
5783
|
case "linkViaPopup":
|
|
5783
5784
|
case "linkViaRedirect":
|
|
5784
|
-
return
|
|
5785
|
+
return Us;
|
|
5785
5786
|
case "reauthViaPopup":
|
|
5786
5787
|
case "reauthViaRedirect":
|
|
5787
|
-
return
|
|
5788
|
+
return Ms;
|
|
5788
5789
|
default:
|
|
5789
5790
|
T(
|
|
5790
5791
|
this.auth,
|
|
@@ -5819,10 +5820,10 @@ class Cn {
|
|
|
5819
5820
|
* See the License for the specific language governing permissions and
|
|
5820
5821
|
* limitations under the License.
|
|
5821
5822
|
*/
|
|
5822
|
-
const
|
|
5823
|
-
class
|
|
5823
|
+
const xs = new ne(2e3, 1e4);
|
|
5824
|
+
class B extends Rn {
|
|
5824
5825
|
constructor(e, t, r, i, s) {
|
|
5825
|
-
super(e, t, i, s), this.provider = r, this.authWindow = null, this.pollId = null,
|
|
5826
|
+
super(e, t, i, s), this.provider = r, this.authWindow = null, this.pollId = null, B.currentPopupAction && B.currentPopupAction.cancel(), B.currentPopupAction = this;
|
|
5826
5827
|
}
|
|
5827
5828
|
async executeNotNull() {
|
|
5828
5829
|
const e = await this.execute();
|
|
@@ -5864,7 +5865,7 @@ class F extends Cn {
|
|
|
5864
5865
|
));
|
|
5865
5866
|
}
|
|
5866
5867
|
cleanUp() {
|
|
5867
|
-
this.authWindow && this.authWindow.close(), this.pollId && window.clearTimeout(this.pollId), this.authWindow = null, this.pollId = null,
|
|
5868
|
+
this.authWindow && this.authWindow.close(), this.pollId && window.clearTimeout(this.pollId), this.authWindow = null, this.pollId = null, B.currentPopupAction = null;
|
|
5868
5869
|
}
|
|
5869
5870
|
pollUserCancellation() {
|
|
5870
5871
|
const e = () => {
|
|
@@ -5883,12 +5884,12 @@ class F extends Cn {
|
|
|
5883
5884
|
);
|
|
5884
5885
|
return;
|
|
5885
5886
|
}
|
|
5886
|
-
this.pollId = window.setTimeout(e,
|
|
5887
|
+
this.pollId = window.setTimeout(e, xs.get());
|
|
5887
5888
|
};
|
|
5888
5889
|
e();
|
|
5889
5890
|
}
|
|
5890
5891
|
}
|
|
5891
|
-
|
|
5892
|
+
B.currentPopupAction = null;
|
|
5892
5893
|
/**
|
|
5893
5894
|
* @license
|
|
5894
5895
|
* Copyright 2020 Google LLC
|
|
@@ -5905,8 +5906,8 @@ F.currentPopupAction = null;
|
|
|
5905
5906
|
* See the License for the specific language governing permissions and
|
|
5906
5907
|
* limitations under the License.
|
|
5907
5908
|
*/
|
|
5908
|
-
const
|
|
5909
|
-
class
|
|
5909
|
+
const Fs = "pendingRedirect", ce = /* @__PURE__ */ new Map();
|
|
5910
|
+
class Bs extends Rn {
|
|
5910
5911
|
constructor(e, t, r = !1) {
|
|
5911
5912
|
super(e, [
|
|
5912
5913
|
"signInViaRedirect",
|
|
@@ -5924,7 +5925,7 @@ class Us extends Cn {
|
|
|
5924
5925
|
let e = ce.get(this.auth._key());
|
|
5925
5926
|
if (!e) {
|
|
5926
5927
|
try {
|
|
5927
|
-
const r = await
|
|
5928
|
+
const r = await $s(this.resolver, this.auth) ? await super.execute() : null;
|
|
5928
5929
|
e = () => Promise.resolve(r);
|
|
5929
5930
|
} catch (t) {
|
|
5930
5931
|
e = () => Promise.reject(t);
|
|
@@ -5952,26 +5953,26 @@ class Us extends Cn {
|
|
|
5952
5953
|
cleanUp() {
|
|
5953
5954
|
}
|
|
5954
5955
|
}
|
|
5955
|
-
async function
|
|
5956
|
-
const t =
|
|
5956
|
+
async function $s(n, e) {
|
|
5957
|
+
const t = js(e), r = Vs(n);
|
|
5957
5958
|
if (!await r._isAvailable())
|
|
5958
5959
|
return !1;
|
|
5959
5960
|
const i = await r._get(t) === "true";
|
|
5960
5961
|
return await r._remove(t), i;
|
|
5961
5962
|
}
|
|
5962
|
-
function
|
|
5963
|
+
function Hs(n, e) {
|
|
5963
5964
|
ce.set(n._key(), e);
|
|
5964
5965
|
}
|
|
5965
|
-
function
|
|
5966
|
+
function Vs(n) {
|
|
5966
5967
|
return w(n._redirectPersistence);
|
|
5967
5968
|
}
|
|
5968
|
-
function
|
|
5969
|
-
return oe(
|
|
5969
|
+
function js(n) {
|
|
5970
|
+
return oe(Fs, n.config.apiKey, n.name);
|
|
5970
5971
|
}
|
|
5971
|
-
async function
|
|
5972
|
+
async function Ws(n, e, t = !1) {
|
|
5972
5973
|
if (v(n.app))
|
|
5973
5974
|
return Promise.reject(N(n));
|
|
5974
|
-
const r =
|
|
5975
|
+
const r = ve(n), i = Ns(r, e), a = await new Bs(r, i, t).execute();
|
|
5975
5976
|
return a && !t && (delete a.user._redirectEventId, await r._persistUserIfCurrent(a.user), await r._setRedirectUser(null, e)), a;
|
|
5976
5977
|
}
|
|
5977
5978
|
/**
|
|
@@ -5990,8 +5991,8 @@ async function Hs(n, e, t = !1) {
|
|
|
5990
5991
|
* See the License for the specific language governing permissions and
|
|
5991
5992
|
* limitations under the License.
|
|
5992
5993
|
*/
|
|
5993
|
-
const
|
|
5994
|
-
class
|
|
5994
|
+
const zs = 10 * 60 * 1e3;
|
|
5995
|
+
class Gs {
|
|
5995
5996
|
constructor(e) {
|
|
5996
5997
|
this.auth = e, this.cachedEventUids = /* @__PURE__ */ new Set(), this.consumers = /* @__PURE__ */ new Set(), this.queuedRedirectEvent = null, this.hasHandledPotentialRedirect = !1, this.lastProcessedEventTime = Date.now();
|
|
5997
5998
|
}
|
|
@@ -6007,7 +6008,7 @@ class js {
|
|
|
6007
6008
|
let t = !1;
|
|
6008
6009
|
return this.consumers.forEach((r) => {
|
|
6009
6010
|
this.isEventForConsumer(e, r) && (t = !0, this.sendToConsumer(e, r), this.saveEventToCache(e));
|
|
6010
|
-
}), this.hasHandledPotentialRedirect || !
|
|
6011
|
+
}), this.hasHandledPotentialRedirect || !qs(e) || (this.hasHandledPotentialRedirect = !0, t || (this.queuedRedirectEvent = e, t = !0)), t;
|
|
6011
6012
|
}
|
|
6012
6013
|
sendToConsumer(e, t) {
|
|
6013
6014
|
var r;
|
|
@@ -6022,7 +6023,7 @@ class js {
|
|
|
6022
6023
|
return t.filter.includes(e.type) && r;
|
|
6023
6024
|
}
|
|
6024
6025
|
hasEventBeenHandled(e) {
|
|
6025
|
-
return Date.now() - this.lastProcessedEventTime >=
|
|
6026
|
+
return Date.now() - this.lastProcessedEventTime >= zs && this.cachedEventUids.clear(), this.cachedEventUids.has(kt(e));
|
|
6026
6027
|
}
|
|
6027
6028
|
saveEventToCache(e) {
|
|
6028
6029
|
this.cachedEventUids.add(kt(e)), this.lastProcessedEventTime = Date.now();
|
|
@@ -6034,7 +6035,7 @@ function kt(n) {
|
|
|
6034
6035
|
function Pn({ type: n, error: e }) {
|
|
6035
6036
|
return n === "unknown" && (e == null ? void 0 : e.code) === "auth/no-auth-event";
|
|
6036
6037
|
}
|
|
6037
|
-
function
|
|
6038
|
+
function qs(n) {
|
|
6038
6039
|
switch (n.type) {
|
|
6039
6040
|
case "signInViaRedirect":
|
|
6040
6041
|
case "linkViaRedirect":
|
|
@@ -6062,7 +6063,7 @@ function Ws(n) {
|
|
|
6062
6063
|
* See the License for the specific language governing permissions and
|
|
6063
6064
|
* limitations under the License.
|
|
6064
6065
|
*/
|
|
6065
|
-
async function
|
|
6066
|
+
async function Ks(n, e = {}) {
|
|
6066
6067
|
return G(n, "GET", "/v1/projects", e);
|
|
6067
6068
|
}
|
|
6068
6069
|
/**
|
|
@@ -6081,14 +6082,14 @@ async function zs(n, e = {}) {
|
|
|
6081
6082
|
* See the License for the specific language governing permissions and
|
|
6082
6083
|
* limitations under the License.
|
|
6083
6084
|
*/
|
|
6084
|
-
const
|
|
6085
|
-
async function
|
|
6085
|
+
const Js = /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/, Ys = /^https?/;
|
|
6086
|
+
async function Xs(n) {
|
|
6086
6087
|
if (n.config.emulator)
|
|
6087
6088
|
return;
|
|
6088
|
-
const { authorizedDomains: e } = await
|
|
6089
|
+
const { authorizedDomains: e } = await Ks(n);
|
|
6089
6090
|
for (const t of e)
|
|
6090
6091
|
try {
|
|
6091
|
-
if (
|
|
6092
|
+
if (Qs(t))
|
|
6092
6093
|
return;
|
|
6093
6094
|
} catch {
|
|
6094
6095
|
}
|
|
@@ -6098,15 +6099,15 @@ async function Ks(n) {
|
|
|
6098
6099
|
/* AuthErrorCode.INVALID_ORIGIN */
|
|
6099
6100
|
);
|
|
6100
6101
|
}
|
|
6101
|
-
function
|
|
6102
|
-
const e =
|
|
6102
|
+
function Qs(n) {
|
|
6103
|
+
const e = $e(), { protocol: t, hostname: r } = new URL(e);
|
|
6103
6104
|
if (n.startsWith("chrome-extension://")) {
|
|
6104
6105
|
const a = new URL(n);
|
|
6105
6106
|
return a.hostname === "" && r === "" ? t === "chrome-extension:" && n.replace("chrome-extension://", "") === e.replace("chrome-extension://", "") : t === "chrome-extension:" && a.hostname === r;
|
|
6106
6107
|
}
|
|
6107
|
-
if (!
|
|
6108
|
+
if (!Ys.test(t))
|
|
6108
6109
|
return !1;
|
|
6109
|
-
if (
|
|
6110
|
+
if (Js.test(n))
|
|
6110
6111
|
return r === n;
|
|
6111
6112
|
const i = n.replace(/\./g, "\\.");
|
|
6112
6113
|
return new RegExp("^(.+\\." + i + "|" + i + ")$", "i").test(r);
|
|
@@ -6127,7 +6128,7 @@ function Js(n) {
|
|
|
6127
6128
|
* See the License for the specific language governing permissions and
|
|
6128
6129
|
* limitations under the License.
|
|
6129
6130
|
*/
|
|
6130
|
-
const
|
|
6131
|
+
const Zs = new ne(3e4, 6e4);
|
|
6131
6132
|
function At() {
|
|
6132
6133
|
const n = y().___jsl;
|
|
6133
6134
|
if (n != null && n.H) {
|
|
@@ -6137,7 +6138,7 @@ function At() {
|
|
|
6137
6138
|
n.CP[t] = null;
|
|
6138
6139
|
}
|
|
6139
6140
|
}
|
|
6140
|
-
function
|
|
6141
|
+
function ea(n) {
|
|
6141
6142
|
return new Promise((e, t) => {
|
|
6142
6143
|
var r, i, s;
|
|
6143
6144
|
function a() {
|
|
@@ -6152,7 +6153,7 @@ function Xs(n) {
|
|
|
6152
6153
|
/* AuthErrorCode.NETWORK_REQUEST_FAILED */
|
|
6153
6154
|
));
|
|
6154
6155
|
},
|
|
6155
|
-
timeout:
|
|
6156
|
+
timeout: Zs.get()
|
|
6156
6157
|
});
|
|
6157
6158
|
}
|
|
6158
6159
|
if (!((i = (r = y().gapi) === null || r === void 0 ? void 0 : r.iframes) === null || i === void 0) && i.Iframe)
|
|
@@ -6160,22 +6161,22 @@ function Xs(n) {
|
|
|
6160
6161
|
else if (!((s = y().gapi) === null || s === void 0) && s.load)
|
|
6161
6162
|
a();
|
|
6162
6163
|
else {
|
|
6163
|
-
const c =
|
|
6164
|
+
const c = is("iframefcb");
|
|
6164
6165
|
return y()[c] = () => {
|
|
6165
6166
|
gapi.load ? a() : t(_(
|
|
6166
6167
|
n,
|
|
6167
6168
|
"network-request-failed"
|
|
6168
6169
|
/* AuthErrorCode.NETWORK_REQUEST_FAILED */
|
|
6169
6170
|
));
|
|
6170
|
-
},
|
|
6171
|
+
}, ns(`${rs()}?onload=${c}`).catch((o) => t(o));
|
|
6171
6172
|
}
|
|
6172
6173
|
}).catch((e) => {
|
|
6173
6174
|
throw le = null, e;
|
|
6174
6175
|
});
|
|
6175
6176
|
}
|
|
6176
6177
|
let le = null;
|
|
6177
|
-
function
|
|
6178
|
-
return le = le ||
|
|
6178
|
+
function ta(n) {
|
|
6179
|
+
return le = le || ea(n), le;
|
|
6179
6180
|
}
|
|
6180
6181
|
/**
|
|
6181
6182
|
* @license
|
|
@@ -6193,7 +6194,7 @@ function Qs(n) {
|
|
|
6193
6194
|
* See the License for the specific language governing permissions and
|
|
6194
6195
|
* limitations under the License.
|
|
6195
6196
|
*/
|
|
6196
|
-
const
|
|
6197
|
+
const na = new ne(5e3, 15e3), ra = "__/auth/iframe", ia = "emulator/auth/iframe", sa = {
|
|
6197
6198
|
style: {
|
|
6198
6199
|
position: "absolute",
|
|
6199
6200
|
top: "-100px",
|
|
@@ -6202,13 +6203,13 @@ const Zs = new ne(5e3, 15e3), ea = "__/auth/iframe", ta = "emulator/auth/iframe"
|
|
|
6202
6203
|
},
|
|
6203
6204
|
"aria-hidden": "true",
|
|
6204
6205
|
tabindex: "-1"
|
|
6205
|
-
},
|
|
6206
|
+
}, aa = /* @__PURE__ */ new Map([
|
|
6206
6207
|
["identitytoolkit.googleapis.com", "p"],
|
|
6207
6208
|
["staging-identitytoolkit.sandbox.googleapis.com", "s"],
|
|
6208
6209
|
["test-identitytoolkit.sandbox.googleapis.com", "t"]
|
|
6209
6210
|
// test
|
|
6210
6211
|
]);
|
|
6211
|
-
function
|
|
6212
|
+
function oa(n) {
|
|
6212
6213
|
const e = n.config;
|
|
6213
6214
|
h(
|
|
6214
6215
|
e.authDomain,
|
|
@@ -6216,17 +6217,17 @@ function ia(n) {
|
|
|
6216
6217
|
"auth-domain-config-required"
|
|
6217
6218
|
/* AuthErrorCode.MISSING_AUTH_DOMAIN */
|
|
6218
6219
|
);
|
|
6219
|
-
const t = e.emulator ? Ke(e,
|
|
6220
|
+
const t = e.emulator ? Ke(e, ia) : `https://${n.config.authDomain}/${ra}`, r = {
|
|
6220
6221
|
apiKey: e.apiKey,
|
|
6221
6222
|
appName: n.name,
|
|
6222
6223
|
v: te
|
|
6223
|
-
}, i =
|
|
6224
|
+
}, i = aa.get(n.config.apiHost);
|
|
6224
6225
|
i && (r.eid = i);
|
|
6225
6226
|
const s = n._getFrameworks();
|
|
6226
6227
|
return s.length && (r.fw = s.join(",")), `${t}?${ee(r).slice(1)}`;
|
|
6227
6228
|
}
|
|
6228
|
-
async function
|
|
6229
|
-
const e = await
|
|
6229
|
+
async function ca(n) {
|
|
6230
|
+
const e = await ta(n), t = y().gapi;
|
|
6230
6231
|
return h(
|
|
6231
6232
|
t,
|
|
6232
6233
|
n,
|
|
@@ -6234,9 +6235,9 @@ async function sa(n) {
|
|
|
6234
6235
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
6235
6236
|
), e.open({
|
|
6236
6237
|
where: document.body,
|
|
6237
|
-
url:
|
|
6238
|
+
url: oa(n),
|
|
6238
6239
|
messageHandlersFilter: t.iframes.CROSS_ORIGIN_IFRAMES_FILTER,
|
|
6239
|
-
attributes:
|
|
6240
|
+
attributes: sa,
|
|
6240
6241
|
dontclear: !0
|
|
6241
6242
|
}, (r) => new Promise(async (i, s) => {
|
|
6242
6243
|
await r.restyle({
|
|
@@ -6249,7 +6250,7 @@ async function sa(n) {
|
|
|
6249
6250
|
/* AuthErrorCode.NETWORK_REQUEST_FAILED */
|
|
6250
6251
|
), c = y().setTimeout(() => {
|
|
6251
6252
|
s(a);
|
|
6252
|
-
},
|
|
6253
|
+
}, na.get());
|
|
6253
6254
|
function o() {
|
|
6254
6255
|
y().clearTimeout(c), i(r);
|
|
6255
6256
|
}
|
|
@@ -6274,13 +6275,13 @@ async function sa(n) {
|
|
|
6274
6275
|
* See the License for the specific language governing permissions and
|
|
6275
6276
|
* limitations under the License.
|
|
6276
6277
|
*/
|
|
6277
|
-
const
|
|
6278
|
+
const la = {
|
|
6278
6279
|
location: "yes",
|
|
6279
6280
|
resizable: "yes",
|
|
6280
6281
|
statusbar: "yes",
|
|
6281
6282
|
toolbar: "no"
|
|
6282
|
-
},
|
|
6283
|
-
class
|
|
6283
|
+
}, ua = 500, da = 600, ha = "_blank", fa = "http://localhost";
|
|
6284
|
+
class Ct {
|
|
6284
6285
|
constructor(e) {
|
|
6285
6286
|
this.window = e, this.associatedEvent = null;
|
|
6286
6287
|
}
|
|
@@ -6292,19 +6293,19 @@ class Rt {
|
|
|
6292
6293
|
}
|
|
6293
6294
|
}
|
|
6294
6295
|
}
|
|
6295
|
-
function
|
|
6296
|
+
function pa(n, e, t, r = ua, i = da) {
|
|
6296
6297
|
const s = Math.max((window.screen.availHeight - i) / 2, 0).toString(), a = Math.max((window.screen.availWidth - r) / 2, 0).toString();
|
|
6297
6298
|
let c = "";
|
|
6298
|
-
const o = Object.assign(Object.assign({},
|
|
6299
|
+
const o = Object.assign(Object.assign({}, la), {
|
|
6299
6300
|
width: r.toString(),
|
|
6300
6301
|
height: i.toString(),
|
|
6301
6302
|
top: s,
|
|
6302
6303
|
left: a
|
|
6303
6304
|
}), l = g().toLowerCase();
|
|
6304
|
-
t && (c = un(l) ?
|
|
6305
|
-
const u = Object.entries(o).reduce((p, [m,
|
|
6306
|
-
if (
|
|
6307
|
-
return
|
|
6305
|
+
t && (c = un(l) ? ha : t), cn(l) && (e = e || fa, o.scrollbars = "yes");
|
|
6306
|
+
const u = Object.entries(o).reduce((p, [m, F]) => `${p}${m}=${F},`, "");
|
|
6307
|
+
if (Ki(l) && c !== "_self")
|
|
6308
|
+
return ma(e || "", c), new Ct(null);
|
|
6308
6309
|
const d = window.open(e || "", c, u);
|
|
6309
6310
|
h(
|
|
6310
6311
|
d,
|
|
@@ -6316,9 +6317,9 @@ function da(n, e, t, r = oa, i = ca) {
|
|
|
6316
6317
|
d.focus();
|
|
6317
6318
|
} catch {
|
|
6318
6319
|
}
|
|
6319
|
-
return new
|
|
6320
|
+
return new Ct(d);
|
|
6320
6321
|
}
|
|
6321
|
-
function
|
|
6322
|
+
function ma(n, e) {
|
|
6322
6323
|
const t = document.createElement("a");
|
|
6323
6324
|
t.href = n, t.target = e;
|
|
6324
6325
|
const r = document.createEvent("MouseEvent");
|
|
@@ -6340,8 +6341,8 @@ function ha(n, e) {
|
|
|
6340
6341
|
* See the License for the specific language governing permissions and
|
|
6341
6342
|
* limitations under the License.
|
|
6342
6343
|
*/
|
|
6343
|
-
const
|
|
6344
|
-
async function
|
|
6344
|
+
const ga = "__/auth/handler", _a = "emulator/auth/handler", ya = encodeURIComponent("fac");
|
|
6345
|
+
async function Rt(n, e, t, r, i, s) {
|
|
6345
6346
|
h(
|
|
6346
6347
|
n.config.authDomain,
|
|
6347
6348
|
n,
|
|
@@ -6362,7 +6363,7 @@ async function Ct(n, e, t, r, i, s) {
|
|
|
6362
6363
|
eventId: i
|
|
6363
6364
|
};
|
|
6364
6365
|
if (e instanceof vn) {
|
|
6365
|
-
e.setDefaultLanguage(n.languageCode), a.providerId = e.providerId || "",
|
|
6366
|
+
e.setDefaultLanguage(n.languageCode), a.providerId = e.providerId || "", yr(e.getCustomParameters()) || (a.customParameters = JSON.stringify(e.getCustomParameters()));
|
|
6366
6367
|
for (const [u, d] of Object.entries({}))
|
|
6367
6368
|
a[u] = d;
|
|
6368
6369
|
}
|
|
@@ -6374,11 +6375,11 @@ async function Ct(n, e, t, r, i, s) {
|
|
|
6374
6375
|
const c = a;
|
|
6375
6376
|
for (const u of Object.keys(c))
|
|
6376
6377
|
c[u] === void 0 && delete c[u];
|
|
6377
|
-
const o = await n._getAppCheckToken(), l = o ? `#${
|
|
6378
|
-
return `${
|
|
6378
|
+
const o = await n._getAppCheckToken(), l = o ? `#${ya}=${encodeURIComponent(o)}` : "";
|
|
6379
|
+
return `${va(n)}?${ee(c).slice(1)}${l}`;
|
|
6379
6380
|
}
|
|
6380
|
-
function
|
|
6381
|
-
return n.emulator ? Ke(n,
|
|
6381
|
+
function va({ config: n }) {
|
|
6382
|
+
return n.emulator ? Ke(n, _a) : `https://${n.authDomain}/${ga}`;
|
|
6382
6383
|
}
|
|
6383
6384
|
/**
|
|
6384
6385
|
* @license
|
|
@@ -6396,23 +6397,23 @@ function ga({ config: n }) {
|
|
|
6396
6397
|
* See the License for the specific language governing permissions and
|
|
6397
6398
|
* limitations under the License.
|
|
6398
6399
|
*/
|
|
6399
|
-
const
|
|
6400
|
-
class
|
|
6400
|
+
const De = "webStorageSupport";
|
|
6401
|
+
class ba {
|
|
6401
6402
|
constructor() {
|
|
6402
|
-
this.eventManagers = {}, this.iframes = {}, this.originValidationPromises = {}, this._redirectPersistence = Tn, this._completeRedirectFn =
|
|
6403
|
+
this.eventManagers = {}, this.iframes = {}, this.originValidationPromises = {}, this._redirectPersistence = Tn, this._completeRedirectFn = Ws, this._overrideRedirectResult = Hs;
|
|
6403
6404
|
}
|
|
6404
6405
|
// Wrapping in async even though we don't await anywhere in order
|
|
6405
6406
|
// to make sure errors are raised as promise rejections
|
|
6406
6407
|
async _openPopup(e, t, r, i) {
|
|
6407
6408
|
var s;
|
|
6408
6409
|
S((s = this.eventManagers[e._key()]) === null || s === void 0 ? void 0 : s.manager, "_initialize() not called before _openPopup()");
|
|
6409
|
-
const a = await
|
|
6410
|
-
return
|
|
6410
|
+
const a = await Rt(e, t, r, $e(), i);
|
|
6411
|
+
return pa(e, a, Qe());
|
|
6411
6412
|
}
|
|
6412
6413
|
async _openRedirect(e, t, r, i) {
|
|
6413
6414
|
await this._originValidation(e);
|
|
6414
|
-
const s = await
|
|
6415
|
-
return
|
|
6415
|
+
const s = await Rt(e, t, r, $e(), i);
|
|
6416
|
+
return Es(s), new Promise(() => {
|
|
6416
6417
|
});
|
|
6417
6418
|
}
|
|
6418
6419
|
_initialize(e) {
|
|
@@ -6427,7 +6428,7 @@ class _a {
|
|
|
6427
6428
|
}), r;
|
|
6428
6429
|
}
|
|
6429
6430
|
async initAndGetManager(e) {
|
|
6430
|
-
const t = await
|
|
6431
|
+
const t = await ca(e), r = new Gs(e);
|
|
6431
6432
|
return t.register("authEvent", (i) => (h(
|
|
6432
6433
|
i == null ? void 0 : i.authEvent,
|
|
6433
6434
|
e,
|
|
@@ -6439,9 +6440,9 @@ class _a {
|
|
|
6439
6440
|
}), gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER), this.eventManagers[e._key()] = { manager: r }, this.iframes[e._key()] = t, r;
|
|
6440
6441
|
}
|
|
6441
6442
|
_isIframeWebStorageSupported(e, t) {
|
|
6442
|
-
this.iframes[e._key()].send(
|
|
6443
|
+
this.iframes[e._key()].send(De, { type: De }, (i) => {
|
|
6443
6444
|
var s;
|
|
6444
|
-
const a = (s = i == null ? void 0 : i[0]) === null || s === void 0 ? void 0 : s[
|
|
6445
|
+
const a = (s = i == null ? void 0 : i[0]) === null || s === void 0 ? void 0 : s[De];
|
|
6445
6446
|
a !== void 0 && t(!!a), T(
|
|
6446
6447
|
e,
|
|
6447
6448
|
"internal-error"
|
|
@@ -6451,13 +6452,13 @@ class _a {
|
|
|
6451
6452
|
}
|
|
6452
6453
|
_originValidation(e) {
|
|
6453
6454
|
const t = e._key();
|
|
6454
|
-
return this.originValidationPromises[t] || (this.originValidationPromises[t] =
|
|
6455
|
+
return this.originValidationPromises[t] || (this.originValidationPromises[t] = Xs(e)), this.originValidationPromises[t];
|
|
6455
6456
|
}
|
|
6456
6457
|
get _shouldInitProactively() {
|
|
6457
6458
|
return mn() || ln() || Ye();
|
|
6458
6459
|
}
|
|
6459
6460
|
}
|
|
6460
|
-
const
|
|
6461
|
+
const Ia = ba;
|
|
6461
6462
|
var Pt = "@firebase/auth", Ot = "1.7.9";
|
|
6462
6463
|
/**
|
|
6463
6464
|
* @license
|
|
@@ -6475,7 +6476,7 @@ var Pt = "@firebase/auth", Ot = "1.7.9";
|
|
|
6475
6476
|
* See the License for the specific language governing permissions and
|
|
6476
6477
|
* limitations under the License.
|
|
6477
6478
|
*/
|
|
6478
|
-
class
|
|
6479
|
+
class wa {
|
|
6479
6480
|
constructor(e) {
|
|
6480
6481
|
this.auth = e, this.internalListeners = /* @__PURE__ */ new Map();
|
|
6481
6482
|
}
|
|
@@ -6526,7 +6527,7 @@ class va {
|
|
|
6526
6527
|
* See the License for the specific language governing permissions and
|
|
6527
6528
|
* limitations under the License.
|
|
6528
6529
|
*/
|
|
6529
|
-
function
|
|
6530
|
+
function Ea(n) {
|
|
6530
6531
|
switch (n) {
|
|
6531
6532
|
case "Node":
|
|
6532
6533
|
return "node";
|
|
@@ -6542,7 +6543,7 @@ function ba(n) {
|
|
|
6542
6543
|
return;
|
|
6543
6544
|
}
|
|
6544
6545
|
}
|
|
6545
|
-
function
|
|
6546
|
+
function Ta(n) {
|
|
6546
6547
|
Y(new W(
|
|
6547
6548
|
"auth",
|
|
6548
6549
|
(e, { options: t }) => {
|
|
@@ -6556,8 +6557,8 @@ function Ia(n) {
|
|
|
6556
6557
|
tokenApiHost: "securetoken.googleapis.com",
|
|
6557
6558
|
apiScheme: "https",
|
|
6558
6559
|
sdkClientVersion: gn(n)
|
|
6559
|
-
}, l = new
|
|
6560
|
-
return
|
|
6560
|
+
}, l = new es(r, i, s, o);
|
|
6561
|
+
return as(l, t), l;
|
|
6561
6562
|
},
|
|
6562
6563
|
"PUBLIC"
|
|
6563
6564
|
/* ComponentType.PUBLIC */
|
|
@@ -6572,18 +6573,18 @@ function Ia(n) {
|
|
|
6572
6573
|
})), Y(new W(
|
|
6573
6574
|
"auth-internal",
|
|
6574
6575
|
(e) => {
|
|
6575
|
-
const t =
|
|
6576
|
+
const t = ve(e.getProvider(
|
|
6576
6577
|
"auth"
|
|
6577
6578
|
/* _ComponentName.AUTH */
|
|
6578
6579
|
).getImmediate());
|
|
6579
|
-
return ((r) => new
|
|
6580
|
+
return ((r) => new wa(r))(t);
|
|
6580
6581
|
},
|
|
6581
6582
|
"PRIVATE"
|
|
6582
6583
|
/* ComponentType.PRIVATE */
|
|
6583
6584
|
).setInstantiationMode(
|
|
6584
6585
|
"EXPLICIT"
|
|
6585
6586
|
/* InstantiationMode.EXPLICIT */
|
|
6586
|
-
)), $(Pt, Ot,
|
|
6587
|
+
)), $(Pt, Ot, Ea(n)), $(Pt, Ot, "esm2017");
|
|
6587
6588
|
}
|
|
6588
6589
|
/**
|
|
6589
6590
|
* @license
|
|
@@ -6601,11 +6602,11 @@ function Ia(n) {
|
|
|
6601
6602
|
* See the License for the specific language governing permissions and
|
|
6602
6603
|
* limitations under the License.
|
|
6603
6604
|
*/
|
|
6604
|
-
const
|
|
6605
|
+
const Sa = 5 * 60, ka = jt("authIdTokenMaxAge") || Sa;
|
|
6605
6606
|
let Dt = null;
|
|
6606
|
-
const
|
|
6607
|
+
const Aa = (n) => async (e) => {
|
|
6607
6608
|
const t = e && await e.getIdTokenResult(), r = t && ((/* @__PURE__ */ new Date()).getTime() - Date.parse(t.issuedAtTime)) / 1e3;
|
|
6608
|
-
if (r && r >
|
|
6609
|
+
if (r && r > ka)
|
|
6609
6610
|
return;
|
|
6610
6611
|
const i = t == null ? void 0 : t.token;
|
|
6611
6612
|
Dt !== i && (Dt = i, await fetch(n, {
|
|
@@ -6615,33 +6616,33 @@ const Ta = (n) => async (e) => {
|
|
|
6615
6616
|
} : {}
|
|
6616
6617
|
}));
|
|
6617
6618
|
};
|
|
6618
|
-
function
|
|
6619
|
+
function Ca(n = bi()) {
|
|
6619
6620
|
const e = qt(n, "auth");
|
|
6620
6621
|
if (e.isInitialized())
|
|
6621
6622
|
return e.getImmediate();
|
|
6622
|
-
const t =
|
|
6623
|
-
popupRedirectResolver:
|
|
6623
|
+
const t = ss(n, {
|
|
6624
|
+
popupRedirectResolver: Ia,
|
|
6624
6625
|
persistence: [
|
|
6625
|
-
|
|
6626
|
-
|
|
6626
|
+
Ds,
|
|
6627
|
+
bs,
|
|
6627
6628
|
Tn
|
|
6628
6629
|
]
|
|
6629
6630
|
}), r = jt("authTokenSyncURL");
|
|
6630
6631
|
if (r && typeof isSecureContext == "boolean" && isSecureContext) {
|
|
6631
6632
|
const s = new URL(r, location.origin);
|
|
6632
6633
|
if (location.origin === s.origin) {
|
|
6633
|
-
const a =
|
|
6634
|
-
|
|
6634
|
+
const a = Aa(s.toString());
|
|
6635
|
+
_s(t, a, () => a(t.currentUser)), gs(t, (c) => a(c));
|
|
6635
6636
|
}
|
|
6636
6637
|
}
|
|
6637
|
-
const i =
|
|
6638
|
-
return i &&
|
|
6638
|
+
const i = ar("auth");
|
|
6639
|
+
return i && os(t, `http://${i}`), t;
|
|
6639
6640
|
}
|
|
6640
|
-
function
|
|
6641
|
+
function Ra() {
|
|
6641
6642
|
var n, e;
|
|
6642
6643
|
return (e = (n = document.getElementsByTagName("head")) === null || n === void 0 ? void 0 : n[0]) !== null && e !== void 0 ? e : document;
|
|
6643
6644
|
}
|
|
6644
|
-
|
|
6645
|
+
ts({
|
|
6645
6646
|
loadJS(n) {
|
|
6646
6647
|
return new Promise((e, t) => {
|
|
6647
6648
|
const r = document.createElement("script");
|
|
@@ -6651,21 +6652,21 @@ Qi({
|
|
|
6651
6652
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
6652
6653
|
);
|
|
6653
6654
|
s.customData = i, t(s);
|
|
6654
|
-
}, r.type = "text/javascript", r.charset = "UTF-8",
|
|
6655
|
+
}, r.type = "text/javascript", r.charset = "UTF-8", Ra().appendChild(r);
|
|
6655
6656
|
});
|
|
6656
6657
|
},
|
|
6657
6658
|
gapiScript: "https://apis.google.com/js/api.js",
|
|
6658
6659
|
recaptchaV2Script: "https://www.google.com/recaptcha/api.js",
|
|
6659
6660
|
recaptchaEnterpriseScript: "https://www.google.com/recaptcha/enterprise.js?render="
|
|
6660
6661
|
});
|
|
6661
|
-
|
|
6662
|
+
Ta(
|
|
6662
6663
|
"Browser"
|
|
6663
6664
|
/* ClientPlatform.BROWSER */
|
|
6664
6665
|
);
|
|
6665
|
-
const
|
|
6666
|
-
history:
|
|
6666
|
+
const Pa = Un({
|
|
6667
|
+
history: xn(),
|
|
6667
6668
|
routes: [
|
|
6668
|
-
...
|
|
6669
|
+
...ue,
|
|
6669
6670
|
...K,
|
|
6670
6671
|
{
|
|
6671
6672
|
path: "/forbidden",
|
|
@@ -6674,18 +6675,18 @@ const Aa = Nn({
|
|
|
6674
6675
|
}
|
|
6675
6676
|
]
|
|
6676
6677
|
});
|
|
6677
|
-
let
|
|
6678
|
-
|
|
6678
|
+
let Ne, Le;
|
|
6679
|
+
Pa.beforeEach(async (n) => {
|
|
6679
6680
|
const {
|
|
6680
6681
|
sessionUser: e,
|
|
6681
6682
|
currentRestaurant: t,
|
|
6682
6683
|
currentBusiness: r,
|
|
6683
6684
|
readRestaurants: i,
|
|
6684
6685
|
changeRestaurant: s
|
|
6685
|
-
} =
|
|
6686
|
+
} = je();
|
|
6686
6687
|
if (n.name && n.name.startsWith("mf-payment-admin")) {
|
|
6687
6688
|
if (!e.value) {
|
|
6688
|
-
|
|
6689
|
+
Ne || (Ne = new Promise((c) => {
|
|
6689
6690
|
const o = q(e, (l) => {
|
|
6690
6691
|
var u, d;
|
|
6691
6692
|
l && (o(), c(
|
|
@@ -6693,12 +6694,12 @@ Aa.beforeEach(async (n) => {
|
|
|
6693
6694
|
));
|
|
6694
6695
|
});
|
|
6695
6696
|
}));
|
|
6696
|
-
const a = await
|
|
6697
|
+
const a = await Ne;
|
|
6697
6698
|
return a || { name: "mf-payment-forbidden" };
|
|
6698
6699
|
}
|
|
6699
6700
|
return !0;
|
|
6700
6701
|
}
|
|
6701
|
-
return !r.value || !t.value ? (
|
|
6702
|
+
return !r.value || !t.value ? (Le || (Le = Promise.all([
|
|
6702
6703
|
new Promise(async (a) => {
|
|
6703
6704
|
const c = q(r, (o) => {
|
|
6704
6705
|
o && (c(), a(!0));
|
|
@@ -6710,17 +6711,17 @@ Aa.beforeEach(async (n) => {
|
|
|
6710
6711
|
}), o = await i();
|
|
6711
6712
|
await s(o == null ? void 0 : o.at(0));
|
|
6712
6713
|
})
|
|
6713
|
-
]).then((a) => !0)),
|
|
6714
|
+
]).then((a) => !0)), Le) : !0;
|
|
6714
6715
|
});
|
|
6715
|
-
const
|
|
6716
|
+
const Oa = /* @__PURE__ */ Lt({
|
|
6716
6717
|
__name: "AppSidebar",
|
|
6717
6718
|
setup(n) {
|
|
6718
|
-
const e =
|
|
6719
|
+
const e = je(), t = Fn(), { t: r } = zn(), i = $n(t.currentRoute.value.name);
|
|
6719
6720
|
q(t.currentRoute, () => {
|
|
6720
6721
|
let l = t.currentRoute.value.name;
|
|
6721
6722
|
t.currentRoute.value.meta.parent && (l = t.currentRoute.value.meta.parent), i.value = l;
|
|
6722
6723
|
});
|
|
6723
|
-
const s =
|
|
6724
|
+
const s = ue.map((l) => {
|
|
6724
6725
|
var p, m;
|
|
6725
6726
|
if (!((p = l.meta) != null && p.sidebarDisplay) || l.meta.region && !((m = l.meta.region) != null && m[e.currentCountry.value]) || l.meta.section)
|
|
6726
6727
|
return;
|
|
@@ -6732,7 +6733,7 @@ const Ra = /* @__PURE__ */ Lt({
|
|
|
6732
6733
|
return t.push({ name: l.name });
|
|
6733
6734
|
}
|
|
6734
6735
|
};
|
|
6735
|
-
return l.meta.sidebarNew && (d.badge = () =>
|
|
6736
|
+
return l.meta.sidebarNew && (d.badge = () => Hn(qn.FmPill, { label: "New" })), d;
|
|
6736
6737
|
}).filter((l) => !!l);
|
|
6737
6738
|
function a(l, u) {
|
|
6738
6739
|
return l.map((d) => {
|
|
@@ -6763,7 +6764,16 @@ const Ra = /* @__PURE__ */ Lt({
|
|
|
6763
6764
|
}).filter((l) => !!l), o = Nt(() => {
|
|
6764
6765
|
var u, d;
|
|
6765
6766
|
const l = [...s];
|
|
6766
|
-
return
|
|
6767
|
+
return l.push({
|
|
6768
|
+
label: "",
|
|
6769
|
+
value: "divider",
|
|
6770
|
+
disabled: !0
|
|
6771
|
+
}), l.push({
|
|
6772
|
+
label: r("financing.title"),
|
|
6773
|
+
icon: "credit_score",
|
|
6774
|
+
value: "divider",
|
|
6775
|
+
disabled: !0
|
|
6776
|
+
}), l.push(...a(ue, "financing")), ((u = e.sessionUser.value) != null && u.role.isStaff || (d = e.sessionUser.value) != null && d.role.isAdmin) && (l.push({
|
|
6767
6777
|
label: "",
|
|
6768
6778
|
value: "divider",
|
|
6769
6779
|
disabled: !0
|
|
@@ -6803,32 +6813,30 @@ const Ra = /* @__PURE__ */ Lt({
|
|
|
6803
6813
|
};
|
|
6804
6814
|
}
|
|
6805
6815
|
});
|
|
6806
|
-
var
|
|
6807
|
-
const
|
|
6816
|
+
var Da = { 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" } };
|
|
6817
|
+
const Ba = /* @__PURE__ */ Lt({
|
|
6808
6818
|
__name: "App",
|
|
6809
6819
|
setup(n) {
|
|
6810
|
-
const { state: e } =
|
|
6820
|
+
const { state: e } = Qn(), t = je(), r = Bn(), i = Kt(Da.firebase);
|
|
6811
6821
|
async function s() {
|
|
6812
6822
|
const a = t.sessionUser.value;
|
|
6813
6823
|
if (!a || !a.token) return;
|
|
6814
|
-
const c = await a.getCustomToken(), o =
|
|
6815
|
-
await
|
|
6824
|
+
const c = await a.getCustomToken(), o = Ca(i);
|
|
6825
|
+
await ms(o, c);
|
|
6816
6826
|
}
|
|
6817
|
-
return s(), q(t.sessionUser, s),
|
|
6827
|
+
return s(), q(t.sessionUser, s), Vn(() => {
|
|
6818
6828
|
e.isIframe && parent.postMessage({ event: "ready" }, "*");
|
|
6819
|
-
}),
|
|
6820
|
-
t.registerSidebarComponent(
|
|
6829
|
+
}), jn(() => {
|
|
6830
|
+
t.registerSidebarComponent(Oa);
|
|
6821
6831
|
}), (a, c) => {
|
|
6822
6832
|
const o = Mt("RouterView");
|
|
6823
6833
|
return Ut(), xt(o, {
|
|
6824
|
-
key:
|
|
6834
|
+
key: Wn(r).path
|
|
6825
6835
|
});
|
|
6826
6836
|
};
|
|
6827
6837
|
}
|
|
6828
|
-
}),
|
|
6829
|
-
const n = [
|
|
6830
|
-
{ "en-US": Gn, "zh-CN": Kn }
|
|
6831
|
-
], e = new Set(
|
|
6838
|
+
}), $a = () => {
|
|
6839
|
+
const n = [{ "en-US": Jn, "zh-CN": Xn }, Mn], e = new Set(
|
|
6832
6840
|
n.flatMap((t) => Object.keys(t))
|
|
6833
6841
|
);
|
|
6834
6842
|
return Array.from(e).reduce(
|
|
@@ -6841,10 +6849,10 @@ const Ma = /* @__PURE__ */ Lt({
|
|
|
6841
6849
|
},
|
|
6842
6850
|
{}
|
|
6843
6851
|
);
|
|
6844
|
-
},
|
|
6852
|
+
}, Ha = [...K, ...ue];
|
|
6845
6853
|
export {
|
|
6846
6854
|
mt as _,
|
|
6847
|
-
|
|
6848
|
-
|
|
6849
|
-
|
|
6855
|
+
Ba as a,
|
|
6856
|
+
$a as i,
|
|
6857
|
+
Ha as r
|
|
6850
6858
|
};
|