@feedmepos/mf-payment 1.4.46 → 1.5.0-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.
Files changed (127) hide show
  1. package/dist/{Actions.vue_vue_type_script_setup_true_lang-sYaYPQ_s.js → Actions.vue_vue_type_script_setup_true_lang-DGbH2LsQ.js} +43 -43
  2. package/dist/{AdminLayout.vue_vue_type_script_setup_true_lang-BTmMOzwx.js → AdminLayout.vue_vue_type_script_setup_true_lang-0Mf1MhAL.js} +13 -13
  3. package/dist/AutoCopyCell.vue_vue_type_script_setup_true_lang-I9eO197f.js +47 -0
  4. package/dist/{Chargeback-BftBez0p.js → Chargeback-19afdT_4.js} +83 -83
  5. package/dist/{DateRangePicker.vue_vue_type_script_setup_true_lang-XZ7OzGau.js → DateRangePicker.vue_vue_type_script_setup_true_lang-kymnzYpd.js} +1 -1
  6. package/dist/DocumentViewer.vue_vue_type_script_setup_true_lang-CzwG5dCO.js +77 -0
  7. package/dist/Forbidden-CSTZjebc.js +38 -0
  8. package/dist/Layout.vue_vue_type_script_setup_true_lang-BKIvkgA_.js +45 -0
  9. package/dist/{OnboardForm-CnKOFMMH.js → OnboardForm-Cc6JOr09.js} +596 -528
  10. package/dist/{OnboardForm-DqhRFi-H.js → OnboardForm-Do6ar3sx.js} +363 -347
  11. package/dist/{OnboardSubmission-DKxUJxCW.js → OnboardSubmission-B-leoVPo.js} +4 -4
  12. package/dist/{OnboardSubmission-munHiPKU.js → OnboardSubmission-Dj8AGb69.js} +8 -8
  13. package/dist/PDFViewer-DgyyGDHl.js +23209 -0
  14. package/dist/{PayoutAccount-DbLQjLVr.js → PayoutAccount--1J5ubvX.js} +341 -312
  15. package/dist/{PayoutAccount-C1ADGszh.js → PayoutAccount-ChGlsZ-O.js} +75 -75
  16. package/dist/{PayoutAccountSetting-YYswVooL.js → PayoutAccountSetting-BC0ANAqY.js} +281 -266
  17. package/dist/{Restaurant-26r7Q01z.js → Restaurant-ZiTHtFZJ.js} +79 -79
  18. package/dist/{RestaurantSelector.vue_vue_type_script_setup_true_lang-Bzj_sdSY.js → RestaurantSelector.vue_vue_type_script_setup_true_lang-DG3iyjkK.js} +3 -3
  19. package/dist/{RestaurantSetting-D1APrvzM.js → RestaurantSetting-M1jYaGwx.js} +5 -5
  20. package/dist/{SelectAll.vue_vue_type_script_setup_true_lang-DA4rs3tk.js → SelectAll.vue_vue_type_script_setup_true_lang-BNZTqdoF.js} +5 -5
  21. package/dist/{Settlement-CWX5RKwL.js → Settlement-Cj2W8VfH.js} +7 -7
  22. package/dist/{Settlement-Ix55QLVB.js → Settlement-D_nmqYEC.js} +12 -15
  23. package/dist/{SettlementTransactions-DYAlKO__.js → SettlementTransactions-Ch9jeQU6.js} +99 -99
  24. package/dist/{SettlementTransactions-BIodJ6DN.js → SettlementTransactions-DK1ONvn6.js} +55 -55
  25. package/dist/{Status.vue_vue_type_script_setup_true_lang-B5iI3OiL.js → Status.vue_vue_type_script_setup_true_lang-BP5m6Vic.js} +9 -9
  26. package/dist/Terminal-CoPPPePw.js +1135 -0
  27. package/dist/{TerminalSetting-BiaGvysm.js → TerminalSetting-PWs1fyFe.js} +549 -425
  28. package/dist/{Transaction-D51QiCaP.js → Transaction-BirTp8t6.js} +82 -82
  29. package/dist/{Transaction-ouagKBic.js → Transaction-CegzBK7m.js} +65 -65
  30. package/dist/{TransactionOld-CCzonxUD.js → TransactionOld-DqGMuWvL.js} +9 -9
  31. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
  32. package/dist/api/document/index.d.ts +4 -0
  33. package/dist/{app-DE4U_54A.js → app-D6U0uODp.js} +894 -944
  34. package/dist/app.d.ts +1 -358
  35. package/dist/app.js +4 -3
  36. package/dist/{assets--JQWdCl5.js → assets-DtwUojcS.js} +1 -1
  37. package/dist/components/AdminLayout.vue.d.ts +3 -3
  38. package/dist/components/AutoCopyCell.vue.d.ts +1 -1
  39. package/dist/components/DocumentViewer.vue.d.ts +16 -0
  40. package/dist/components/ImagePreview.vue.d.ts +3 -3
  41. package/dist/components/Layout.vue.d.ts +3 -3
  42. package/dist/components/PDFViewer.vue.d.ts +4 -4
  43. package/dist/components/RestaurantSelector.vue.d.ts +1 -1
  44. package/dist/components/RouteCell.vue.d.ts +1 -1
  45. package/dist/{grafana-22PXAn1O.js → grafana-fZyobMgN.js} +1 -1
  46. package/dist/{index-B0uA-O38.js → index--K2ipr4H.js} +7 -7
  47. package/dist/{index-cCTvH31Z.js → index-BJNCcdvT.js} +22132 -24859
  48. package/dist/{index-Blb5YaYR.js → index-C-YBwRQp.js} +3 -3
  49. package/dist/{index-Ctn4LFui.js → index-CMN40t8e.js} +1 -1
  50. package/dist/{index-sc6pzeZl.js → index-CbONxZz2.js} +17 -13
  51. package/dist/{index-BLyx8ZQr.js → index-CtkwL_6R.js} +1 -1
  52. package/dist/{index-B9kHmV6p.js → index-D69RnDa7.js} +19 -19
  53. package/dist/index-_u7l8cO3.js +27 -0
  54. package/dist/{index-B0-Kn6Mw.js → index-eLZ3BErV.js} +12 -12
  55. package/dist/{index.vue_vue_type_script_setup_true_lang-NUicoOT2.js → index.vue_vue_type_script_setup_true_lang-zxkA_YTt.js} +50 -50
  56. package/dist/model/payout-account.d.ts +2 -2
  57. package/dist/{Forbidden-Dqw0MqyC.js → no-data-BRmo6XOO.js} +2 -35
  58. package/dist/package.json +13 -7
  59. package/dist/{payout-account-KcIc3kyX.js → payout-account-CVYMFqu9.js} +78 -77
  60. package/dist/plugins.d.ts +1 -5
  61. package/dist/router/index.d.ts +1 -0
  62. package/dist/stores/payoutAccount.d.ts +16 -16
  63. package/dist/tsconfig.app.tsbuildinfo +1 -1
  64. package/dist/{validator-D5jtpt9A.js → validator-DzjyJnvv.js} +842 -763
  65. package/dist/views/Forbidden.vue.d.ts +1 -1
  66. package/dist/views/admin/chargeback/cell/Actions.vue.d.ts +1 -1
  67. package/dist/views/admin/onboard-submission/cell/SignatureBoard.vue.d.ts +2 -1
  68. package/dist/views/admin/onboard-submission/cell/UploadButton.vue.d.ts +3 -2
  69. package/dist/views/admin/onboard-submission/forms/SoftspaceSubmission.vue.d.ts +17 -17
  70. package/dist/views/admin/payout-account/tabs/Information.vue.d.ts +17 -17
  71. package/dist/views/admin/payout-account/tabs/PaymentChannel.vue.d.ts +22 -22
  72. package/dist/views/admin/payout-account/tabs/PaymentGateway.vue.d.ts +22 -22
  73. package/dist/views/admin/payout-account/tabs/PaymentStatus.vue.d.ts +16 -16
  74. package/dist/views/admin/payout-account/tabs/Settlement.vue.d.ts +17 -17
  75. package/dist/views/admin/payout-account/tabs/TokenGateway.vue.d.ts +22 -22
  76. package/dist/views/admin/payout-account/tabs/cell/Actions.vue.d.ts +1 -1
  77. package/dist/views/admin/payout-account/tabs/gateway/AdyenGateway.vue.d.ts +2 -2
  78. package/dist/views/admin/payout-account/tabs/gateway/KsherGateway.vue.d.ts +2 -2
  79. package/dist/views/admin/payout-account/tabs/token/ApplePayToken.vue.d.ts +2 -2
  80. package/dist/views/admin/payout-account/tabs/token/GooglePayToken.vue.d.ts +2 -2
  81. package/dist/views/admin/restaurant/cell/LogButton.vue.d.ts +1 -1
  82. package/dist/views/admin/restaurant/tabs/PaymentGateway.vue.d.ts +118 -244
  83. package/dist/views/admin/restaurant/tabs/gateway/AdyenGateway.vue.d.ts +4 -4
  84. package/dist/views/admin/restaurant/tabs/gateway/DigioGateway.vue.d.ts +4 -4
  85. package/dist/views/admin/restaurant/tabs/gateway/FiuuGateway.vue.d.ts +6 -6
  86. package/dist/views/admin/restaurant/tabs/gateway/GhlGateway.vue.d.ts +4 -4
  87. package/dist/views/admin/restaurant/tabs/gateway/GrabGateway.vue.d.ts +4 -4
  88. package/dist/views/admin/restaurant/tabs/gateway/KsherGateway.vue.d.ts +6 -6
  89. package/dist/views/admin/restaurant/tabs/gateway/MacauPassGateway.vue.d.ts +4 -4
  90. package/dist/views/admin/restaurant/tabs/gateway/RevenueMonsterGateway.vue.d.ts +4 -4
  91. package/dist/views/admin/restaurant/tabs/gateway/SoftSpaceGateway.vue.d.ts +4 -4
  92. package/dist/views/admin/terminal/TerminalDialog.vue.d.ts +28 -8
  93. package/dist/views/admin/terminal/cell/Actions.vue.d.ts +1 -1
  94. package/dist/views/admin/terminal/cell/ID.vue.d.ts +1 -1
  95. package/dist/views/admin/terminal/tabs/EcrGateway.vue.d.ts +29 -9
  96. package/dist/views/admin/terminal/tabs/Information.vue.d.ts +28 -8
  97. package/dist/views/admin/terminal/tabs/QrGateway.vue.d.ts +29 -9
  98. package/dist/views/admin/terminal/tabs/SettingRequest.vue.d.ts +28 -8
  99. package/dist/views/admin/terminal/tabs/SoftposGateway.vue.d.ts +28 -8
  100. package/dist/views/admin/terminal/tabs/ecr/Ghl2Gateway.vue.d.ts +28 -8
  101. package/dist/views/admin/terminal/tabs/ecr/Ghl3Gateway.vue.d.ts +28 -8
  102. package/dist/views/admin/terminal/tabs/ecr/GhlGateway.vue.d.ts +28 -8
  103. package/dist/views/admin/terminal/tabs/ecr/HlbbGateway.vue.d.ts +250 -0
  104. package/dist/views/admin/terminal/tabs/ecr/KBankGateway.vue.d.ts +28 -8
  105. package/dist/views/admin/terminal/tabs/ecr/Maybank2Gateway.vue.d.ts +28 -8
  106. package/dist/views/admin/terminal/tabs/ecr/Maybank3Gateway.vue.d.ts +28 -8
  107. package/dist/views/admin/terminal/tabs/ecr/MaybankGateway.vue.d.ts +28 -8
  108. package/dist/views/admin/terminal/tabs/ecr/NetsGateway.vue.d.ts +28 -8
  109. package/dist/views/admin/terminal/tabs/ecr/TerminalGateway.vue.d.ts +28 -8
  110. package/dist/views/admin/terminal/tabs/qr/PromptPayGateway.vue.d.ts +28 -8
  111. package/dist/views/admin/terminal/tabs/settings/KioskMode.vue.d.ts +28 -8
  112. package/dist/views/admin/transaction/cell/Actions.vue.d.ts +1 -1
  113. package/dist/views/admin/transaction/cell/BillSeqNumber.vue.d.ts +1 -1
  114. package/dist/views/onboard-submission/cell/SignatureBoard.vue.d.ts +2 -1
  115. package/dist/views/onboard-submission/cell/UploadButton.vue.d.ts +6 -5
  116. package/dist/views/payout-account/PayoutAccountDialog.vue.d.ts +2 -2
  117. package/dist/views/payout-account/PayoutAccountTable.vue.d.ts +32 -32
  118. package/dist/views/settlement/FiuuSettlementTable.vue.d.ts +68 -68
  119. package/dist/views/settlement/FiuuSettlementTransactions.vue.d.ts +34 -34
  120. package/dist/views/transaction/cell/Actions.vue.d.ts +1 -1
  121. package/dist/views/transaction/cell/BillSeqNumber.vue.d.ts +1 -1
  122. package/package.json +26 -20
  123. package/dist/AutoCopyCell.vue_vue_type_script_setup_true_lang-DP8STuAT.js +0 -47
  124. package/dist/Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js +0 -45
  125. package/dist/PDFViewer-DHKBD99J.js +0 -22433
  126. package/dist/Terminal-CrM7EzkM.js +0 -1095
  127. package/dist/plugins-DOA8YO_V.js +0 -1366
@@ -1,7 +1,7 @@
1
- import { createRouter as Ln, createWebHistory as Mn, useRouter as Un, useRoute as xn } from "vue-router";
2
- import { routes as Fn, FmApp as Bn } from "@feedmepos/mf-financing";
1
+ import { FmApp as Ln, routes as Nt, 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
3
  import { computed as Lt, watch as q, defineComponent as Mt, ref as $n, resolveComponent as Ut, openBlock as xt, createBlock as Ft, h as Hn, onMounted as Vn, onBeforeMount as jn, unref as Wn } from "vue";
4
- import { useCoreStore as We, useI18n as zn } from "@feedmepos/mf-common";
4
+ import { useCoreStore as je, useI18n as zn } from "@feedmepos/mf-common";
5
5
  import { defineStore as Gn } from "pinia";
6
6
  import { components as qn } from "@feedmepos/ui-library";
7
7
  const Kn = {
@@ -358,7 +358,7 @@ const Kn = {
358
358
  }
359
359
  }, Xn = {
360
360
  payment: Yn
361
- }, le = [
361
+ }, K = [
362
362
  {
363
363
  path: "/admin/restaurants",
364
364
  name: "mf-payment-admin.restaurant",
@@ -366,7 +366,7 @@ const Kn = {
366
366
  sidebarDisplay: "Restaurants",
367
367
  section: "payment-gateway"
368
368
  },
369
- component: () => import("./Restaurant-26r7Q01z.js")
369
+ component: () => import("./Restaurant-ZiTHtFZJ.js")
370
370
  },
371
371
  {
372
372
  path: "/admin/restaurants/:restaurantId",
@@ -375,7 +375,7 @@ const Kn = {
375
375
  meta: {
376
376
  parent: "mf-payment-admin.restaurant"
377
377
  },
378
- component: () => import("./RestaurantSetting-D1APrvzM.js")
378
+ component: () => import("./RestaurantSetting-M1jYaGwx.js")
379
379
  },
380
380
  {
381
381
  path: "/admin/payout-accounts",
@@ -384,7 +384,7 @@ const Kn = {
384
384
  sidebarDisplay: "Payout Accounts",
385
385
  section: "payment-gateway"
386
386
  },
387
- component: () => import("./PayoutAccount-C1ADGszh.js")
387
+ component: () => import("./PayoutAccount-ChGlsZ-O.js")
388
388
  },
389
389
  {
390
390
  path: "/admin/payout-accounts/:accountId",
@@ -393,7 +393,7 @@ const Kn = {
393
393
  meta: {
394
394
  parent: "mf-payment-admin.payout-account"
395
395
  },
396
- component: () => import("./PayoutAccountSetting-YYswVooL.js")
396
+ component: () => import("./PayoutAccountSetting-BC0ANAqY.js")
397
397
  },
398
398
  {
399
399
  path: "/admin/onboarding",
@@ -402,7 +402,7 @@ const Kn = {
402
402
  sidebarDisplay: "Payment Onboarding",
403
403
  section: "payment-gateway"
404
404
  },
405
- component: () => import("./OnboardSubmission-munHiPKU.js")
405
+ component: () => import("./OnboardSubmission-Dj8AGb69.js")
406
406
  },
407
407
  {
408
408
  path: "/admin/onboarding/:submissionId",
@@ -411,7 +411,7 @@ const Kn = {
411
411
  meta: {
412
412
  parent: "mf-payment-admin.onboard-submission"
413
413
  },
414
- component: () => import("./OnboardForm-DqhRFi-H.js")
414
+ component: () => import("./OnboardForm-Do6ar3sx.js")
415
415
  },
416
416
  {
417
417
  path: "/admin/terminal/pos",
@@ -420,7 +420,7 @@ const Kn = {
420
420
  sidebarDisplay: "POS",
421
421
  section: "device"
422
422
  },
423
- component: () => import("./Terminal-CrM7EzkM.js"),
423
+ component: () => import("./Terminal-CoPPPePw.js"),
424
424
  props: {
425
425
  type: "POS"
426
426
  }
@@ -432,7 +432,7 @@ const Kn = {
432
432
  sidebarDisplay: "Kiosks",
433
433
  section: "device"
434
434
  },
435
- component: () => import("./Terminal-CrM7EzkM.js"),
435
+ component: () => import("./Terminal-CoPPPePw.js"),
436
436
  props: {
437
437
  type: "KIOSK"
438
438
  }
@@ -444,7 +444,7 @@ const Kn = {
444
444
  sidebarDisplay: "Terminals",
445
445
  section: "device"
446
446
  },
447
- component: () => import("./Terminal-CrM7EzkM.js"),
447
+ component: () => import("./Terminal-CoPPPePw.js"),
448
448
  props: {
449
449
  type: "TERMINAL"
450
450
  }
@@ -456,7 +456,7 @@ const Kn = {
456
456
  meta: {
457
457
  parent: "mf-payment-admin.pos"
458
458
  },
459
- component: () => import("./TerminalSetting-BiaGvysm.js")
459
+ component: () => import("./TerminalSetting-PWs1fyFe.js")
460
460
  },
461
461
  {
462
462
  path: "/admin/terminal/kiosk/:terminalId",
@@ -465,7 +465,7 @@ const Kn = {
465
465
  meta: {
466
466
  parent: "mf-payment-admin.kiosk"
467
467
  },
468
- component: () => import("./TerminalSetting-BiaGvysm.js")
468
+ component: () => import("./TerminalSetting-PWs1fyFe.js")
469
469
  },
470
470
  {
471
471
  path: "/admin/terminal/terminal/:terminalId",
@@ -474,7 +474,7 @@ const Kn = {
474
474
  meta: {
475
475
  parent: "mf-payment-admin.terminal"
476
476
  },
477
- component: () => import("./TerminalSetting-BiaGvysm.js")
477
+ component: () => import("./TerminalSetting-PWs1fyFe.js")
478
478
  },
479
479
  {
480
480
  path: "/admin/transaction",
@@ -482,7 +482,7 @@ const Kn = {
482
482
  meta: {
483
483
  sidebarDisplay: "Transactions"
484
484
  },
485
- component: () => import("./Transaction-D51QiCaP.js")
485
+ component: () => import("./Transaction-BirTp8t6.js")
486
486
  },
487
487
  {
488
488
  path: "/admin/chargeback",
@@ -490,7 +490,7 @@ const Kn = {
490
490
  meta: {
491
491
  sidebarDisplay: "Chargebacks"
492
492
  },
493
- component: () => import("./Chargeback-BftBez0p.js")
493
+ component: () => import("./Chargeback-19afdT_4.js")
494
494
  },
495
495
  {
496
496
  path: "/admin/settlement",
@@ -498,7 +498,7 @@ const Kn = {
498
498
  meta: {
499
499
  sidebarDisplay: "Settlements"
500
500
  },
501
- component: () => import("./Settlement-Ix55QLVB.js")
501
+ component: () => import("./Settlement-D_nmqYEC.js")
502
502
  },
503
503
  {
504
504
  path: "/admin/settlement/:settlementId",
@@ -507,7 +507,7 @@ const Kn = {
507
507
  meta: {
508
508
  parent: "mf-payment-admin.settlement"
509
509
  },
510
- component: () => import("./SettlementTransactions-DYAlKO__.js")
510
+ component: () => import("./SettlementTransactions-Ch9jeQU6.js")
511
511
  }
512
512
  ], ue = [
513
513
  {
@@ -517,7 +517,7 @@ const Kn = {
517
517
  {
518
518
  path: "/payout-account",
519
519
  name: "mf-payment-payout-account",
520
- component: () => import("./PayoutAccount-DbLQjLVr.js"),
520
+ component: () => import("./PayoutAccount--1J5ubvX.js"),
521
521
  meta: {
522
522
  sidebarDisplay: "i18n:payment.routes.payout_account"
523
523
  }
@@ -525,7 +525,7 @@ const Kn = {
525
525
  {
526
526
  path: "/onboard-submission",
527
527
  name: "mf-payment-onboard-submission",
528
- component: () => import("./OnboardSubmission-DKxUJxCW.js"),
528
+ component: () => import("./OnboardSubmission-B-leoVPo.js"),
529
529
  meta: {
530
530
  sidebarDisplay: "i18n:payment.routes.onboard_submission",
531
531
  region: { MY: !0 }
@@ -535,7 +535,7 @@ const Kn = {
535
535
  path: "/onboard-submission/:type/:submission?",
536
536
  name: "mf-payment-onboard-submission-form",
537
537
  props: !0,
538
- component: () => import("./OnboardForm-CnKOFMMH.js"),
538
+ component: () => import("./OnboardForm-Cc6JOr09.js"),
539
539
  meta: {
540
540
  parent: "mf-payment-onboard-submission"
541
541
  }
@@ -543,7 +543,7 @@ const Kn = {
543
543
  {
544
544
  path: "/transaction-old",
545
545
  name: "mf-payment-old-transaction",
546
- component: () => import("./TransactionOld-CCzonxUD.js"),
546
+ component: () => import("./TransactionOld-DqGMuWvL.js"),
547
547
  meta: {
548
548
  sidebarDisplay: "i18n:payment.routes.transaction"
549
549
  }
@@ -551,7 +551,7 @@ const Kn = {
551
551
  {
552
552
  path: "/transaction",
553
553
  name: "mf-payment-transaction",
554
- component: () => import("./Transaction-ouagKBic.js"),
554
+ component: () => import("./Transaction-CegzBK7m.js"),
555
555
  meta: {
556
556
  sidebarDisplay: "i18n:payment.routes.transaction-new",
557
557
  sidebarNew: !0
@@ -560,7 +560,7 @@ const Kn = {
560
560
  {
561
561
  path: "/settlement",
562
562
  name: "mf-payment-settlement",
563
- component: () => import("./Settlement-CWX5RKwL.js"),
563
+ component: () => import("./Settlement-Cj2W8VfH.js"),
564
564
  meta: {
565
565
  sidebarDisplay: "i18n:payment.routes.settlement"
566
566
  }
@@ -569,21 +569,30 @@ const Kn = {
569
569
  path: "/settlement/:settlementId",
570
570
  name: "mf-payment-settlement-transaction",
571
571
  props: !0,
572
- component: () => import("./SettlementTransactions-BIodJ6DN.js"),
572
+ component: () => import("./SettlementTransactions-DK1ONvn6.js"),
573
573
  meta: {
574
574
  parent: "mf-payment-settlement"
575
575
  }
576
576
  },
577
- ...Fn.map((n) => ({
578
- ...n,
577
+ {
578
+ path: "/financing",
579
+ name: "mf-payment-financing",
580
+ component: Ln,
579
581
  meta: {
580
- ...n.meta,
581
- section: "financing"
582
+ useChildrenRoutes: !0
582
583
  },
583
- path: `/financing${n.path}`,
584
- component: Bn
585
- }))
586
- ], Qn = Gn("mf-payment-iframe", () => {
584
+ children: Nt.map((n) => ({
585
+ ...n,
586
+ meta: {
587
+ ...n.meta,
588
+ section: "financing"
589
+ },
590
+ path: `/financing${n.path}`
591
+ }))
592
+ }
593
+ ];
594
+ console.log(Nt);
595
+ const Qn = Gn("mf-payment-iframe", () => {
587
596
  const n = {
588
597
  isIframe: !1
589
598
  }, e = Lt(() => n);
@@ -713,9 +722,9 @@ const Bt = function(n) {
713
722
  this.init_();
714
723
  const t = e ? this.byteToCharMapWebSafe_ : this.byteToCharMap_, r = [];
715
724
  for (let i = 0; i < n.length; i += 3) {
716
- const s = n[i], a = i + 1 < n.length, c = a ? n[i + 1] : 0, o = i + 2 < n.length, u = o ? n[i + 2] : 0, l = s >> 2, d = (s & 3) << 4 | c >> 4;
717
- let f = (c & 15) << 2 | u >> 6, g = u & 63;
718
- o || (g = 64, a || (f = 64)), r.push(t[l], t[d], t[f], t[g]);
725
+ const s = n[i], a = i + 1 < n.length, c = a ? n[i + 1] : 0, o = i + 2 < n.length, l = o ? n[i + 2] : 0, u = s >> 2, d = (s & 3) << 4 | c >> 4;
726
+ let p = (c & 15) << 2 | l >> 6, m = l & 63;
727
+ o || (m = 64, a || (p = 64)), r.push(t[u], t[d], t[p], t[m]);
719
728
  }
720
729
  return r.join("");
721
730
  },
@@ -762,17 +771,17 @@ const Bt = function(n) {
762
771
  for (let i = 0; i < n.length; ) {
763
772
  const s = t[n.charAt(i++)], c = i < n.length ? t[n.charAt(i)] : 0;
764
773
  ++i;
765
- const u = i < n.length ? t[n.charAt(i)] : 64;
774
+ const l = i < n.length ? t[n.charAt(i)] : 64;
766
775
  ++i;
767
776
  const d = i < n.length ? t[n.charAt(i)] : 64;
768
- if (++i, s == null || c == null || u == null || d == null)
777
+ if (++i, s == null || c == null || l == null || d == null)
769
778
  throw new er();
770
- const f = s << 2 | c >> 4;
771
- if (r.push(f), u !== 64) {
772
- const g = c << 4 & 240 | u >> 2;
773
- if (r.push(g), d !== 64) {
774
- const v = u << 6 & 192 | d;
775
- r.push(v);
779
+ const p = s << 2 | c >> 4;
780
+ if (r.push(p), l !== 64) {
781
+ const m = c << 4 & 240 | l >> 2;
782
+ if (r.push(m), d !== 64) {
783
+ const F = l << 6 & 192 | d;
784
+ r.push(F);
776
785
  }
777
786
  }
778
787
  }
@@ -799,9 +808,9 @@ class er extends Error {
799
808
  const tr = function(n) {
800
809
  const e = Bt(n);
801
810
  return $t.encodeByteArray(e, !0);
802
- }, de = function(n) {
803
- return tr(n).replace(/\./g, "");
804
811
  }, Ht = function(n) {
812
+ return tr(n).replace(/\./g, "");
813
+ }, Vt = function(n) {
805
814
  try {
806
815
  return $t.decodeString(n, !0);
807
816
  } catch (e) {
@@ -865,33 +874,24 @@ const rr = () => nr().__FIREBASE_DEFAULTS__, ir = () => {
865
874
  } catch {
866
875
  return;
867
876
  }
868
- const e = n && Ht(n[1]);
877
+ const e = n && Vt(n[1]);
869
878
  return e && JSON.parse(e);
870
- }, ze = () => {
879
+ }, We = () => {
871
880
  try {
872
881
  return rr() || ir() || sr();
873
882
  } catch (n) {
874
883
  console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${n}`);
875
884
  return;
876
885
  }
877
- }, Vt = (n) => {
886
+ }, ar = (n) => {
878
887
  var e, t;
879
- return (t = (e = ze()) === null || e === void 0 ? void 0 : e.emulatorHosts) === null || t === void 0 ? void 0 : t[n];
880
- }, Fa = (n) => {
881
- const e = Vt(n);
882
- if (!e)
883
- return;
884
- const t = e.lastIndexOf(":");
885
- if (t <= 0 || t + 1 === e.length)
886
- throw new Error(`Invalid host ${e} with no separate hostname and port!`);
887
- const r = parseInt(e.substring(t + 1), 10);
888
- return e[0] === "[" ? [e.substring(1, t - 1), r] : [e.substring(0, t), r];
888
+ return (t = (e = We()) === null || e === void 0 ? void 0 : e.emulatorHosts) === null || t === void 0 ? void 0 : t[n];
889
889
  }, jt = () => {
890
890
  var n;
891
- return (n = ze()) === null || n === void 0 ? void 0 : n.config;
891
+ return (n = We()) === null || n === void 0 ? void 0 : n.config;
892
892
  }, Wt = (n) => {
893
893
  var e;
894
- return (e = ze()) === null || e === void 0 ? void 0 : e[`_${n}`];
894
+ return (e = We()) === null || e === void 0 ? void 0 : e[`_${n}`];
895
895
  };
896
896
  /**
897
897
  * @license
@@ -909,7 +909,7 @@ const rr = () => nr().__FIREBASE_DEFAULTS__, ir = () => {
909
909
  * See the License for the specific language governing permissions and
910
910
  * limitations under the License.
911
911
  */
912
- class ar {
912
+ class or {
913
913
  constructor() {
914
914
  this.reject = () => {
915
915
  }, this.resolve = () => {
@@ -929,51 +929,6 @@ class ar {
929
929
  };
930
930
  }
931
931
  }
932
- /**
933
- * @license
934
- * Copyright 2021 Google LLC
935
- *
936
- * Licensed under the Apache License, Version 2.0 (the "License");
937
- * you may not use this file except in compliance with the License.
938
- * You may obtain a copy of the License at
939
- *
940
- * http://www.apache.org/licenses/LICENSE-2.0
941
- *
942
- * Unless required by applicable law or agreed to in writing, software
943
- * distributed under the License is distributed on an "AS IS" BASIS,
944
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
945
- * See the License for the specific language governing permissions and
946
- * limitations under the License.
947
- */
948
- function Ba(n, e) {
949
- if (n.uid)
950
- throw new Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.');
951
- const t = {
952
- alg: "none",
953
- type: "JWT"
954
- }, r = e || "demo-project", i = n.iat || 0, s = n.sub || n.user_id;
955
- if (!s)
956
- throw new Error("mockUserToken must contain 'sub' or 'user_id' field!");
957
- const a = Object.assign({
958
- // Set all required fields to decent defaults
959
- iss: `https://securetoken.google.com/${r}`,
960
- aud: r,
961
- iat: i,
962
- exp: i + 3600,
963
- auth_time: i,
964
- sub: s,
965
- user_id: s,
966
- firebase: {
967
- sign_in_provider: "custom",
968
- identities: {}
969
- }
970
- }, n);
971
- return [
972
- de(JSON.stringify(t)),
973
- de(JSON.stringify(a)),
974
- ""
975
- ].join(".");
976
- }
977
932
  /**
978
933
  * @license
979
934
  * Copyright 2017 Google LLC
@@ -990,36 +945,36 @@ function Ba(n, e) {
990
945
  * See the License for the specific language governing permissions and
991
946
  * limitations under the License.
992
947
  */
993
- function m() {
948
+ function g() {
994
949
  return typeof navigator < "u" && typeof navigator.userAgent == "string" ? navigator.userAgent : "";
995
950
  }
996
- function or() {
951
+ function cr() {
997
952
  return typeof window < "u" && // @ts-ignore Setting up an broadly applicable index signature for Window
998
953
  // just to deal with this case would probably be a bad idea.
999
- !!(window.cordova || window.phonegap || window.PhoneGap) && /ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(m());
954
+ !!(window.cordova || window.phonegap || window.PhoneGap) && /ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(g());
1000
955
  }
1001
- function cr() {
956
+ function lr() {
1002
957
  return typeof navigator < "u" && navigator.userAgent === "Cloudflare-Workers";
1003
958
  }
1004
- function lr() {
959
+ function ur() {
1005
960
  const n = typeof chrome == "object" ? chrome.runtime : typeof browser == "object" ? browser.runtime : void 0;
1006
961
  return typeof n == "object" && n.id !== void 0;
1007
962
  }
1008
- function ur() {
963
+ function dr() {
1009
964
  return typeof navigator == "object" && navigator.product === "ReactNative";
1010
965
  }
1011
- function dr() {
1012
- const n = m();
966
+ function hr() {
967
+ const n = g();
1013
968
  return n.indexOf("MSIE ") >= 0 || n.indexOf("Trident/") >= 0;
1014
969
  }
1015
- function hr() {
970
+ function fr() {
1016
971
  try {
1017
972
  return typeof indexedDB == "object";
1018
973
  } catch {
1019
974
  return !1;
1020
975
  }
1021
976
  }
1022
- function fr() {
977
+ function pr() {
1023
978
  return new Promise((n, e) => {
1024
979
  try {
1025
980
  let t = !0;
@@ -1053,35 +1008,35 @@ function fr() {
1053
1008
  * See the License for the specific language governing permissions and
1054
1009
  * limitations under the License.
1055
1010
  */
1056
- const pr = "FirebaseError";
1057
- class M extends Error {
1011
+ const mr = "FirebaseError";
1012
+ class L extends Error {
1058
1013
  constructor(e, t, r) {
1059
- super(t), this.code = e, this.customData = r, this.name = pr, Object.setPrototypeOf(this, M.prototype), Error.captureStackTrace && Error.captureStackTrace(this, Q.prototype.create);
1014
+ super(t), this.code = e, this.customData = r, this.name = mr, Object.setPrototypeOf(this, L.prototype), Error.captureStackTrace && Error.captureStackTrace(this, Z.prototype.create);
1060
1015
  }
1061
1016
  }
1062
- class Q {
1017
+ class Z {
1063
1018
  constructor(e, t, r) {
1064
1019
  this.service = e, this.serviceName = t, this.errors = r;
1065
1020
  }
1066
1021
  create(e, ...t) {
1067
- const r = t[0] || {}, i = `${this.service}/${e}`, s = this.errors[e], a = s ? mr(s, r) : "Error", c = `${this.serviceName}: ${a} (${i}).`;
1068
- return new M(i, c, r);
1022
+ const r = t[0] || {}, i = `${this.service}/${e}`, s = this.errors[e], a = s ? gr(s, r) : "Error", c = `${this.serviceName}: ${a} (${i}).`;
1023
+ return new L(i, c, r);
1069
1024
  }
1070
1025
  }
1071
- function mr(n, e) {
1072
- return n.replace(gr, (t, r) => {
1026
+ function gr(n, e) {
1027
+ return n.replace(_r, (t, r) => {
1073
1028
  const i = e[r];
1074
1029
  return i != null ? String(i) : `<${r}?>`;
1075
1030
  });
1076
1031
  }
1077
- const gr = /\{\$([^}]+)}/g;
1078
- function _r(n) {
1032
+ const _r = /\{\$([^}]+)}/g;
1033
+ function yr(n) {
1079
1034
  for (const e in n)
1080
1035
  if (Object.prototype.hasOwnProperty.call(n, e))
1081
1036
  return !1;
1082
1037
  return !0;
1083
1038
  }
1084
- function he(n, e) {
1039
+ function de(n, e) {
1085
1040
  if (n === e)
1086
1041
  return !0;
1087
1042
  const t = Object.keys(n), r = Object.keys(e);
@@ -1089,8 +1044,8 @@ function he(n, e) {
1089
1044
  if (!r.includes(i))
1090
1045
  return !1;
1091
1046
  const s = n[i], a = e[i];
1092
- if (ot(s) && ot(a)) {
1093
- if (!he(s, a))
1047
+ if (at(s) && at(a)) {
1048
+ if (!de(s, a))
1094
1049
  return !1;
1095
1050
  } else if (s !== a)
1096
1051
  return !1;
@@ -1100,7 +1055,7 @@ function he(n, e) {
1100
1055
  return !1;
1101
1056
  return !0;
1102
1057
  }
1103
- function ot(n) {
1058
+ function at(n) {
1104
1059
  return n !== null && typeof n == "object";
1105
1060
  }
1106
1061
  /**
@@ -1119,7 +1074,7 @@ function ot(n) {
1119
1074
  * See the License for the specific language governing permissions and
1120
1075
  * limitations under the License.
1121
1076
  */
1122
- function Z(n) {
1077
+ function ee(n) {
1123
1078
  const e = [];
1124
1079
  for (const [t, r] of Object.entries(n))
1125
1080
  Array.isArray(r) ? r.forEach((i) => {
@@ -1127,11 +1082,11 @@ function Z(n) {
1127
1082
  }) : e.push(encodeURIComponent(t) + "=" + encodeURIComponent(r));
1128
1083
  return e.length ? "&" + e.join("&") : "";
1129
1084
  }
1130
- function yr(n, e) {
1131
- const t = new vr(n, e);
1085
+ function vr(n, e) {
1086
+ const t = new br(n, e);
1132
1087
  return t.subscribe.bind(t);
1133
1088
  }
1134
- class vr {
1089
+ class br {
1135
1090
  /**
1136
1091
  * @param executor Function which can make calls to a single Observer
1137
1092
  * as a proxy.
@@ -1169,7 +1124,7 @@ class vr {
1169
1124
  let i;
1170
1125
  if (e === void 0 && t === void 0 && r === void 0)
1171
1126
  throw new Error("Missing Observer.");
1172
- br(e, [
1127
+ Ir(e, [
1173
1128
  "next",
1174
1129
  "error",
1175
1130
  "complete"
@@ -1177,7 +1132,7 @@ class vr {
1177
1132
  next: e,
1178
1133
  error: t,
1179
1134
  complete: r
1180
- }, i.next === void 0 && (i.next = Ae), i.error === void 0 && (i.error = Ae), i.complete === void 0 && (i.complete = Ae);
1135
+ }, i.next === void 0 && (i.next = ke), i.error === void 0 && (i.error = ke), i.complete === void 0 && (i.complete = ke);
1181
1136
  const s = this.unsubscribeOne.bind(this, this.observers.length);
1182
1137
  return this.finalized && this.task.then(() => {
1183
1138
  try {
@@ -1215,7 +1170,7 @@ class vr {
1215
1170
  }));
1216
1171
  }
1217
1172
  }
1218
- function br(n, e) {
1173
+ function Ir(n, e) {
1219
1174
  if (typeof n != "object" || n === null)
1220
1175
  return !1;
1221
1176
  for (const t of e)
@@ -1223,7 +1178,7 @@ function br(n, e) {
1223
1178
  return !0;
1224
1179
  return !1;
1225
1180
  }
1226
- function Ae() {
1181
+ function ke() {
1227
1182
  }
1228
1183
  /**
1229
1184
  * @license
@@ -1283,7 +1238,7 @@ class W {
1283
1238
  * See the License for the specific language governing permissions and
1284
1239
  * limitations under the License.
1285
1240
  */
1286
- const U = "[DEFAULT]";
1241
+ const M = "[DEFAULT]";
1287
1242
  /**
1288
1243
  * @license
1289
1244
  * Copyright 2019 Google LLC
@@ -1300,7 +1255,7 @@ const U = "[DEFAULT]";
1300
1255
  * See the License for the specific language governing permissions and
1301
1256
  * limitations under the License.
1302
1257
  */
1303
- class Ir {
1258
+ class wr {
1304
1259
  constructor(e, t) {
1305
1260
  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();
1306
1261
  }
@@ -1311,7 +1266,7 @@ class Ir {
1311
1266
  get(e) {
1312
1267
  const t = this.normalizeInstanceIdentifier(e);
1313
1268
  if (!this.instancesDeferred.has(t)) {
1314
- const r = new ar();
1269
+ const r = new or();
1315
1270
  if (this.instancesDeferred.set(t, r), this.isInitialized(t) || this.shouldAutoInitialize())
1316
1271
  try {
1317
1272
  const i = this.getOrInitializeService({
@@ -1351,9 +1306,9 @@ class Ir {
1351
1306
  if (this.component)
1352
1307
  throw Error(`Component for ${this.name} has already been provided`);
1353
1308
  if (this.component = e, !!this.shouldAutoInitialize()) {
1354
- if (Er(e))
1309
+ if (Tr(e))
1355
1310
  try {
1356
- this.getOrInitializeService({ instanceIdentifier: U });
1311
+ this.getOrInitializeService({ instanceIdentifier: M });
1357
1312
  } catch {
1358
1313
  }
1359
1314
  for (const [t, r] of this.instancesDeferred.entries()) {
@@ -1368,7 +1323,7 @@ class Ir {
1368
1323
  }
1369
1324
  }
1370
1325
  }
1371
- clearInstance(e = U) {
1326
+ clearInstance(e = M) {
1372
1327
  this.instancesDeferred.delete(e), this.instancesOptions.delete(e), this.instances.delete(e);
1373
1328
  }
1374
1329
  // app.delete() will call this method on every provider to delete the services
@@ -1383,10 +1338,10 @@ class Ir {
1383
1338
  isComponentSet() {
1384
1339
  return this.component != null;
1385
1340
  }
1386
- isInitialized(e = U) {
1341
+ isInitialized(e = M) {
1387
1342
  return this.instances.has(e);
1388
1343
  }
1389
- getOptions(e = U) {
1344
+ getOptions(e = M) {
1390
1345
  return this.instancesOptions.get(e) || {};
1391
1346
  }
1392
1347
  initialize(e = {}) {
@@ -1438,7 +1393,7 @@ class Ir {
1438
1393
  getOrInitializeService({ instanceIdentifier: e, options: t = {} }) {
1439
1394
  let r = this.instances.get(e);
1440
1395
  if (!r && this.component && (r = this.component.instanceFactory(this.container, {
1441
- instanceIdentifier: wr(e),
1396
+ instanceIdentifier: Er(e),
1442
1397
  options: t
1443
1398
  }), this.instances.set(e, r), this.instancesOptions.set(e, t), this.invokeOnInitCallbacks(r, e), this.component.onInstanceCreated))
1444
1399
  try {
@@ -1447,17 +1402,17 @@ class Ir {
1447
1402
  }
1448
1403
  return r || null;
1449
1404
  }
1450
- normalizeInstanceIdentifier(e = U) {
1451
- return this.component ? this.component.multipleInstances ? e : U : e;
1405
+ normalizeInstanceIdentifier(e = M) {
1406
+ return this.component ? this.component.multipleInstances ? e : M : e;
1452
1407
  }
1453
1408
  shouldAutoInitialize() {
1454
1409
  return !!this.component && this.component.instantiationMode !== "EXPLICIT";
1455
1410
  }
1456
1411
  }
1457
- function wr(n) {
1458
- return n === U ? void 0 : n;
1459
- }
1460
1412
  function Er(n) {
1413
+ return n === M ? void 0 : n;
1414
+ }
1415
+ function Tr(n) {
1461
1416
  return n.instantiationMode === "EAGER";
1462
1417
  }
1463
1418
  /**
@@ -1476,7 +1431,7 @@ function Er(n) {
1476
1431
  * See the License for the specific language governing permissions and
1477
1432
  * limitations under the License.
1478
1433
  */
1479
- class Tr {
1434
+ class Sr {
1480
1435
  constructor(e) {
1481
1436
  this.name = e, this.providers = /* @__PURE__ */ new Map();
1482
1437
  }
@@ -1508,7 +1463,7 @@ class Tr {
1508
1463
  getProvider(e) {
1509
1464
  if (this.providers.has(e))
1510
1465
  return this.providers.get(e);
1511
- const t = new Ir(e, this);
1466
+ const t = new wr(e, this);
1512
1467
  return this.providers.set(e, t), t;
1513
1468
  }
1514
1469
  getProviders() {
@@ -1531,27 +1486,27 @@ class Tr {
1531
1486
  * See the License for the specific language governing permissions and
1532
1487
  * limitations under the License.
1533
1488
  */
1534
- var p;
1489
+ var f;
1535
1490
  (function(n) {
1536
1491
  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";
1537
- })(p || (p = {}));
1538
- const Sr = {
1539
- debug: p.DEBUG,
1540
- verbose: p.VERBOSE,
1541
- info: p.INFO,
1542
- warn: p.WARN,
1543
- error: p.ERROR,
1544
- silent: p.SILENT
1545
- }, kr = p.INFO, Ar = {
1546
- [p.DEBUG]: "log",
1547
- [p.VERBOSE]: "log",
1548
- [p.INFO]: "info",
1549
- [p.WARN]: "warn",
1550
- [p.ERROR]: "error"
1492
+ })(f || (f = {}));
1493
+ const kr = {
1494
+ debug: f.DEBUG,
1495
+ verbose: f.VERBOSE,
1496
+ info: f.INFO,
1497
+ warn: f.WARN,
1498
+ error: f.ERROR,
1499
+ silent: f.SILENT
1500
+ }, Ar = f.INFO, Cr = {
1501
+ [f.DEBUG]: "log",
1502
+ [f.VERBOSE]: "log",
1503
+ [f.INFO]: "info",
1504
+ [f.WARN]: "warn",
1505
+ [f.ERROR]: "error"
1551
1506
  }, Rr = (n, e, ...t) => {
1552
1507
  if (e < n.logLevel)
1553
1508
  return;
1554
- const r = (/* @__PURE__ */ new Date()).toISOString(), i = Ar[e];
1509
+ const r = (/* @__PURE__ */ new Date()).toISOString(), i = Cr[e];
1555
1510
  if (i)
1556
1511
  console[i](`[${r}] ${n.name}:`, ...t);
1557
1512
  else
@@ -1565,19 +1520,19 @@ class zt {
1565
1520
  * @param name The name that the logs will be associated with
1566
1521
  */
1567
1522
  constructor(e) {
1568
- this.name = e, this._logLevel = kr, this._logHandler = Rr, this._userLogHandler = null;
1523
+ this.name = e, this._logLevel = Ar, this._logHandler = Rr, this._userLogHandler = null;
1569
1524
  }
1570
1525
  get logLevel() {
1571
1526
  return this._logLevel;
1572
1527
  }
1573
1528
  set logLevel(e) {
1574
- if (!(e in p))
1529
+ if (!(e in f))
1575
1530
  throw new TypeError(`Invalid value "${e}" assigned to \`logLevel\``);
1576
1531
  this._logLevel = e;
1577
1532
  }
1578
1533
  // Workaround for setter/getter having to be the same type.
1579
1534
  setLogLevel(e) {
1580
- this._logLevel = typeof e == "string" ? Sr[e] : e;
1535
+ this._logLevel = typeof e == "string" ? kr[e] : e;
1581
1536
  }
1582
1537
  get logHandler() {
1583
1538
  return this._logHandler;
@@ -1597,25 +1552,25 @@ class zt {
1597
1552
  * The functions below are all based on the `console` interface
1598
1553
  */
1599
1554
  debug(...e) {
1600
- this._userLogHandler && this._userLogHandler(this, p.DEBUG, ...e), this._logHandler(this, p.DEBUG, ...e);
1555
+ this._userLogHandler && this._userLogHandler(this, f.DEBUG, ...e), this._logHandler(this, f.DEBUG, ...e);
1601
1556
  }
1602
1557
  log(...e) {
1603
- this._userLogHandler && this._userLogHandler(this, p.VERBOSE, ...e), this._logHandler(this, p.VERBOSE, ...e);
1558
+ this._userLogHandler && this._userLogHandler(this, f.VERBOSE, ...e), this._logHandler(this, f.VERBOSE, ...e);
1604
1559
  }
1605
1560
  info(...e) {
1606
- this._userLogHandler && this._userLogHandler(this, p.INFO, ...e), this._logHandler(this, p.INFO, ...e);
1561
+ this._userLogHandler && this._userLogHandler(this, f.INFO, ...e), this._logHandler(this, f.INFO, ...e);
1607
1562
  }
1608
1563
  warn(...e) {
1609
- this._userLogHandler && this._userLogHandler(this, p.WARN, ...e), this._logHandler(this, p.WARN, ...e);
1564
+ this._userLogHandler && this._userLogHandler(this, f.WARN, ...e), this._logHandler(this, f.WARN, ...e);
1610
1565
  }
1611
1566
  error(...e) {
1612
- this._userLogHandler && this._userLogHandler(this, p.ERROR, ...e), this._logHandler(this, p.ERROR, ...e);
1567
+ this._userLogHandler && this._userLogHandler(this, f.ERROR, ...e), this._logHandler(this, f.ERROR, ...e);
1613
1568
  }
1614
1569
  }
1615
- const Cr = (n, e) => e.some((t) => n instanceof t);
1616
- let ct, lt;
1617
- function Pr() {
1618
- return ct || (ct = [
1570
+ const Pr = (n, e) => e.some((t) => n instanceof t);
1571
+ let ot, ct;
1572
+ function Or() {
1573
+ return ot || (ot = [
1619
1574
  IDBDatabase,
1620
1575
  IDBObjectStore,
1621
1576
  IDBIndex,
@@ -1623,20 +1578,20 @@ function Pr() {
1623
1578
  IDBTransaction
1624
1579
  ]);
1625
1580
  }
1626
- function Or() {
1627
- return lt || (lt = [
1581
+ function Dr() {
1582
+ return ct || (ct = [
1628
1583
  IDBCursor.prototype.advance,
1629
1584
  IDBCursor.prototype.continue,
1630
1585
  IDBCursor.prototype.continuePrimaryKey
1631
1586
  ]);
1632
1587
  }
1633
- const Gt = /* @__PURE__ */ new WeakMap(), Ue = /* @__PURE__ */ new WeakMap(), qt = /* @__PURE__ */ new WeakMap(), Re = /* @__PURE__ */ new WeakMap(), Ge = /* @__PURE__ */ new WeakMap();
1634
- function Dr(n) {
1588
+ const Gt = /* @__PURE__ */ new WeakMap(), Me = /* @__PURE__ */ new WeakMap(), qt = /* @__PURE__ */ new WeakMap(), Ae = /* @__PURE__ */ new WeakMap(), ze = /* @__PURE__ */ new WeakMap();
1589
+ function Nr(n) {
1635
1590
  const e = new Promise((t, r) => {
1636
1591
  const i = () => {
1637
1592
  n.removeEventListener("success", s), n.removeEventListener("error", a);
1638
1593
  }, s = () => {
1639
- t(D(n.result)), i();
1594
+ t(O(n.result)), i();
1640
1595
  }, a = () => {
1641
1596
  r(n.error), i();
1642
1597
  };
@@ -1645,10 +1600,10 @@ function Dr(n) {
1645
1600
  return e.then((t) => {
1646
1601
  t instanceof IDBCursor && Gt.set(t, n);
1647
1602
  }).catch(() => {
1648
- }), Ge.set(e, n), e;
1603
+ }), ze.set(e, n), e;
1649
1604
  }
1650
- function Nr(n) {
1651
- if (Ue.has(n))
1605
+ function Lr(n) {
1606
+ if (Me.has(n))
1652
1607
  return;
1653
1608
  const e = new Promise((t, r) => {
1654
1609
  const i = () => {
@@ -1660,19 +1615,19 @@ function Nr(n) {
1660
1615
  };
1661
1616
  n.addEventListener("complete", s), n.addEventListener("error", a), n.addEventListener("abort", a);
1662
1617
  });
1663
- Ue.set(n, e);
1618
+ Me.set(n, e);
1664
1619
  }
1665
- let xe = {
1620
+ let Ue = {
1666
1621
  get(n, e, t) {
1667
1622
  if (n instanceof IDBTransaction) {
1668
1623
  if (e === "done")
1669
- return Ue.get(n);
1624
+ return Me.get(n);
1670
1625
  if (e === "objectStoreNames")
1671
1626
  return n.objectStoreNames || qt.get(n);
1672
1627
  if (e === "store")
1673
1628
  return t.objectStoreNames[1] ? void 0 : t.objectStore(t.objectStoreNames[0]);
1674
1629
  }
1675
- return D(n[e]);
1630
+ return O(n[e]);
1676
1631
  },
1677
1632
  set(n, e, t) {
1678
1633
  return n[e] = t, !0;
@@ -1681,71 +1636,71 @@ let xe = {
1681
1636
  return n instanceof IDBTransaction && (e === "done" || e === "store") ? !0 : e in n;
1682
1637
  }
1683
1638
  };
1684
- function Lr(n) {
1685
- xe = n(xe);
1686
- }
1687
1639
  function Mr(n) {
1640
+ Ue = n(Ue);
1641
+ }
1642
+ function Ur(n) {
1688
1643
  return n === IDBDatabase.prototype.transaction && !("objectStoreNames" in IDBTransaction.prototype) ? function(e, ...t) {
1689
1644
  const r = n.call(Ce(this), e, ...t);
1690
- return qt.set(r, e.sort ? e.sort() : [e]), D(r);
1691
- } : Or().includes(n) ? function(...e) {
1692
- return n.apply(Ce(this), e), D(Gt.get(this));
1645
+ return qt.set(r, e.sort ? e.sort() : [e]), O(r);
1646
+ } : Dr().includes(n) ? function(...e) {
1647
+ return n.apply(Ce(this), e), O(Gt.get(this));
1693
1648
  } : function(...e) {
1694
- return D(n.apply(Ce(this), e));
1649
+ return O(n.apply(Ce(this), e));
1695
1650
  };
1696
1651
  }
1697
- function Ur(n) {
1698
- return typeof n == "function" ? Mr(n) : (n instanceof IDBTransaction && Nr(n), Cr(n, Pr()) ? new Proxy(n, xe) : n);
1652
+ function xr(n) {
1653
+ return typeof n == "function" ? Ur(n) : (n instanceof IDBTransaction && Lr(n), Pr(n, Or()) ? new Proxy(n, Ue) : n);
1699
1654
  }
1700
- function D(n) {
1655
+ function O(n) {
1701
1656
  if (n instanceof IDBRequest)
1702
- return Dr(n);
1703
- if (Re.has(n))
1704
- return Re.get(n);
1705
- const e = Ur(n);
1706
- return e !== n && (Re.set(n, e), Ge.set(e, n)), e;
1707
- }
1708
- const Ce = (n) => Ge.get(n);
1709
- function xr(n, e, { blocked: t, upgrade: r, blocking: i, terminated: s } = {}) {
1710
- const a = indexedDB.open(n, e), c = D(a);
1657
+ return Nr(n);
1658
+ if (Ae.has(n))
1659
+ return Ae.get(n);
1660
+ const e = xr(n);
1661
+ return e !== n && (Ae.set(n, e), ze.set(e, n)), e;
1662
+ }
1663
+ const Ce = (n) => ze.get(n);
1664
+ function Fr(n, e, { blocked: t, upgrade: r, blocking: i, terminated: s } = {}) {
1665
+ const a = indexedDB.open(n, e), c = O(a);
1711
1666
  return r && a.addEventListener("upgradeneeded", (o) => {
1712
- r(D(a.result), o.oldVersion, o.newVersion, D(a.transaction), o);
1667
+ r(O(a.result), o.oldVersion, o.newVersion, O(a.transaction), o);
1713
1668
  }), t && a.addEventListener("blocked", (o) => t(
1714
1669
  // Casting due to https://github.com/microsoft/TypeScript-DOM-lib-generator/pull/1405
1715
1670
  o.oldVersion,
1716
1671
  o.newVersion,
1717
1672
  o
1718
1673
  )), c.then((o) => {
1719
- s && o.addEventListener("close", () => s()), i && o.addEventListener("versionchange", (u) => i(u.oldVersion, u.newVersion, u));
1674
+ s && o.addEventListener("close", () => s()), i && o.addEventListener("versionchange", (l) => i(l.oldVersion, l.newVersion, l));
1720
1675
  }).catch(() => {
1721
1676
  }), c;
1722
1677
  }
1723
- const Fr = ["get", "getKey", "getAll", "getAllKeys", "count"], Br = ["put", "add", "delete", "clear"], Pe = /* @__PURE__ */ new Map();
1724
- function ut(n, e) {
1678
+ const Br = ["get", "getKey", "getAll", "getAllKeys", "count"], $r = ["put", "add", "delete", "clear"], Re = /* @__PURE__ */ new Map();
1679
+ function lt(n, e) {
1725
1680
  if (!(n instanceof IDBDatabase && !(e in n) && typeof e == "string"))
1726
1681
  return;
1727
- if (Pe.get(e))
1728
- return Pe.get(e);
1729
- const t = e.replace(/FromIndex$/, ""), r = e !== t, i = Br.includes(t);
1682
+ if (Re.get(e))
1683
+ return Re.get(e);
1684
+ const t = e.replace(/FromIndex$/, ""), r = e !== t, i = $r.includes(t);
1730
1685
  if (
1731
1686
  // Bail if the target doesn't exist on the target. Eg, getAll isn't in Edge.
1732
- !(t in (r ? IDBIndex : IDBObjectStore).prototype) || !(i || Fr.includes(t))
1687
+ !(t in (r ? IDBIndex : IDBObjectStore).prototype) || !(i || Br.includes(t))
1733
1688
  )
1734
1689
  return;
1735
1690
  const s = async function(a, ...c) {
1736
1691
  const o = this.transaction(a, i ? "readwrite" : "readonly");
1737
- let u = o.store;
1738
- return r && (u = u.index(c.shift())), (await Promise.all([
1739
- u[t](...c),
1692
+ let l = o.store;
1693
+ return r && (l = l.index(c.shift())), (await Promise.all([
1694
+ l[t](...c),
1740
1695
  i && o.done
1741
1696
  ]))[0];
1742
1697
  };
1743
- return Pe.set(e, s), s;
1698
+ return Re.set(e, s), s;
1744
1699
  }
1745
- Lr((n) => ({
1700
+ Mr((n) => ({
1746
1701
  ...n,
1747
- get: (e, t, r) => ut(e, t) || n.get(e, t, r),
1748
- has: (e, t) => !!ut(e, t) || n.has(e, t)
1702
+ get: (e, t, r) => lt(e, t) || n.get(e, t, r),
1703
+ has: (e, t) => !!lt(e, t) || n.has(e, t)
1749
1704
  }));
1750
1705
  /**
1751
1706
  * @license
@@ -1763,7 +1718,7 @@ Lr((n) => ({
1763
1718
  * See the License for the specific language governing permissions and
1764
1719
  * limitations under the License.
1765
1720
  */
1766
- class $r {
1721
+ class Hr {
1767
1722
  constructor(e) {
1768
1723
  this.container = e;
1769
1724
  }
@@ -1771,7 +1726,7 @@ class $r {
1771
1726
  // auth token refresh, and installations will send this string.
1772
1727
  getPlatformInfoString() {
1773
1728
  return this.container.getProviders().map((t) => {
1774
- if (Hr(t)) {
1729
+ if (Vr(t)) {
1775
1730
  const r = t.getImmediate();
1776
1731
  return `${r.library}/${r.version}`;
1777
1732
  } else
@@ -1779,11 +1734,11 @@ class $r {
1779
1734
  }).filter((t) => t).join(" ");
1780
1735
  }
1781
1736
  }
1782
- function Hr(n) {
1737
+ function Vr(n) {
1783
1738
  const e = n.getComponent();
1784
1739
  return (e == null ? void 0 : e.type) === "VERSION";
1785
1740
  }
1786
- const Fe = "@firebase/app", dt = "0.10.13";
1741
+ const xe = "@firebase/app", ut = "0.10.13";
1787
1742
  /**
1788
1743
  * @license
1789
1744
  * Copyright 2019 Google LLC
@@ -1800,7 +1755,7 @@ const Fe = "@firebase/app", dt = "0.10.13";
1800
1755
  * See the License for the specific language governing permissions and
1801
1756
  * limitations under the License.
1802
1757
  */
1803
- const T = new zt("@firebase/app"), Vr = "@firebase/app-compat", jr = "@firebase/analytics-compat", Wr = "@firebase/analytics", zr = "@firebase/app-check-compat", Gr = "@firebase/app-check", qr = "@firebase/auth", Kr = "@firebase/auth-compat", Jr = "@firebase/database", Yr = "@firebase/data-connect", Xr = "@firebase/database-compat", Qr = "@firebase/functions", Zr = "@firebase/functions-compat", ei = "@firebase/installations", ti = "@firebase/installations-compat", ni = "@firebase/messaging", ri = "@firebase/messaging-compat", ii = "@firebase/performance", si = "@firebase/performance-compat", ai = "@firebase/remote-config", oi = "@firebase/remote-config-compat", ci = "@firebase/storage", li = "@firebase/storage-compat", ui = "@firebase/firestore", di = "@firebase/vertexai-preview", hi = "@firebase/firestore-compat", fi = "firebase", pi = "10.14.1";
1758
+ const E = new zt("@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";
1804
1759
  /**
1805
1760
  * @license
1806
1761
  * Copyright 2019 Google LLC
@@ -1817,35 +1772,35 @@ const T = new zt("@firebase/app"), Vr = "@firebase/app-compat", jr = "@firebase/
1817
1772
  * See the License for the specific language governing permissions and
1818
1773
  * limitations under the License.
1819
1774
  */
1820
- const Be = "[DEFAULT]", mi = {
1821
- [Fe]: "fire-core",
1822
- [Vr]: "fire-core-compat",
1823
- [Wr]: "fire-analytics",
1824
- [jr]: "fire-analytics-compat",
1825
- [Gr]: "fire-app-check",
1826
- [zr]: "fire-app-check-compat",
1827
- [qr]: "fire-auth",
1828
- [Kr]: "fire-auth-compat",
1829
- [Jr]: "fire-rtdb",
1830
- [Yr]: "fire-data-connect",
1831
- [Xr]: "fire-rtdb-compat",
1832
- [Qr]: "fire-fn",
1833
- [Zr]: "fire-fn-compat",
1834
- [ei]: "fire-iid",
1835
- [ti]: "fire-iid-compat",
1836
- [ni]: "fire-fcm",
1837
- [ri]: "fire-fcm-compat",
1838
- [ii]: "fire-perf",
1839
- [si]: "fire-perf-compat",
1840
- [ai]: "fire-rc",
1841
- [oi]: "fire-rc-compat",
1842
- [ci]: "fire-gcs",
1843
- [li]: "fire-gcs-compat",
1844
- [ui]: "fire-fst",
1845
- [hi]: "fire-fst-compat",
1846
- [di]: "fire-vertex",
1775
+ const Fe = "[DEFAULT]", gi = {
1776
+ [xe]: "fire-core",
1777
+ [jr]: "fire-core-compat",
1778
+ [zr]: "fire-analytics",
1779
+ [Wr]: "fire-analytics-compat",
1780
+ [qr]: "fire-app-check",
1781
+ [Gr]: "fire-app-check-compat",
1782
+ [Kr]: "fire-auth",
1783
+ [Jr]: "fire-auth-compat",
1784
+ [Yr]: "fire-rtdb",
1785
+ [Xr]: "fire-data-connect",
1786
+ [Qr]: "fire-rtdb-compat",
1787
+ [Zr]: "fire-fn",
1788
+ [ei]: "fire-fn-compat",
1789
+ [ti]: "fire-iid",
1790
+ [ni]: "fire-iid-compat",
1791
+ [ri]: "fire-fcm",
1792
+ [ii]: "fire-fcm-compat",
1793
+ [si]: "fire-perf",
1794
+ [ai]: "fire-perf-compat",
1795
+ [oi]: "fire-rc",
1796
+ [ci]: "fire-rc-compat",
1797
+ [li]: "fire-gcs",
1798
+ [ui]: "fire-gcs-compat",
1799
+ [di]: "fire-fst",
1800
+ [fi]: "fire-fst-compat",
1801
+ [hi]: "fire-vertex",
1847
1802
  "fire-js": "fire-js",
1848
- [fi]: "fire-js-all"
1803
+ [pi]: "fire-js-all"
1849
1804
  };
1850
1805
  /**
1851
1806
  * @license
@@ -1863,30 +1818,30 @@ const Be = "[DEFAULT]", mi = {
1863
1818
  * See the License for the specific language governing permissions and
1864
1819
  * limitations under the License.
1865
1820
  */
1866
- const fe = /* @__PURE__ */ new Map(), gi = /* @__PURE__ */ new Map(), $e = /* @__PURE__ */ new Map();
1867
- function ht(n, e) {
1821
+ const he = /* @__PURE__ */ new Map(), _i = /* @__PURE__ */ new Map(), Be = /* @__PURE__ */ new Map();
1822
+ function dt(n, e) {
1868
1823
  try {
1869
1824
  n.container.addComponent(e);
1870
1825
  } catch (t) {
1871
- T.debug(`Component ${e.name} failed to register with FirebaseApp ${n.name}`, t);
1826
+ E.debug(`Component ${e.name} failed to register with FirebaseApp ${n.name}`, t);
1872
1827
  }
1873
1828
  }
1874
- function J(n) {
1829
+ function Y(n) {
1875
1830
  const e = n.name;
1876
- if ($e.has(e))
1877
- return T.debug(`There were multiple attempts to register component ${e}.`), !1;
1878
- $e.set(e, n);
1879
- for (const t of fe.values())
1880
- ht(t, n);
1881
- for (const t of gi.values())
1882
- ht(t, n);
1831
+ if (Be.has(e))
1832
+ return E.debug(`There were multiple attempts to register component ${e}.`), !1;
1833
+ Be.set(e, n);
1834
+ for (const t of he.values())
1835
+ dt(t, n);
1836
+ for (const t of _i.values())
1837
+ dt(t, n);
1883
1838
  return !0;
1884
1839
  }
1885
1840
  function Kt(n, e) {
1886
1841
  const t = n.container.getProvider("heartbeat").getImmediate({ optional: !0 });
1887
1842
  return t && t.triggerHeartbeat(), n.container.getProvider(e);
1888
1843
  }
1889
- function b(n) {
1844
+ function v(n) {
1890
1845
  return n.settings !== void 0;
1891
1846
  }
1892
1847
  /**
@@ -1905,7 +1860,7 @@ function b(n) {
1905
1860
  * See the License for the specific language governing permissions and
1906
1861
  * limitations under the License.
1907
1862
  */
1908
- const _i = {
1863
+ const yi = {
1909
1864
  "no-app": "No Firebase App '{$appName}' has been created - call initializeApp() first",
1910
1865
  "bad-app-name": "Illegal App name: '{$appName}'",
1911
1866
  "duplicate-app": "Firebase App named '{$appName}' already exists with different options or config",
@@ -1920,7 +1875,7 @@ const _i = {
1920
1875
  "idb-delete": "Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}.",
1921
1876
  "finalization-registry-not-supported": "FirebaseServerApp deleteOnDeref field defined but the JS runtime does not support FinalizationRegistry.",
1922
1877
  "invalid-server-app-environment": "FirebaseServerApp is not for use in browser environments."
1923
- }, N = new Q("app", "Firebase", _i);
1878
+ }, D = new Z("app", "Firebase", yi);
1924
1879
  /**
1925
1880
  * @license
1926
1881
  * Copyright 2019 Google LLC
@@ -1937,7 +1892,7 @@ const _i = {
1937
1892
  * See the License for the specific language governing permissions and
1938
1893
  * limitations under the License.
1939
1894
  */
1940
- class yi {
1895
+ class vi {
1941
1896
  constructor(e, t, r) {
1942
1897
  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(
1943
1898
  "app",
@@ -1976,7 +1931,7 @@ class yi {
1976
1931
  */
1977
1932
  checkDestroyed() {
1978
1933
  if (this.isDeleted)
1979
- throw N.create("app-deleted", { appName: this._name });
1934
+ throw D.create("app-deleted", { appName: this._name });
1980
1935
  }
1981
1936
  }
1982
1937
  /**
@@ -1995,53 +1950,53 @@ class yi {
1995
1950
  * See the License for the specific language governing permissions and
1996
1951
  * limitations under the License.
1997
1952
  */
1998
- const ee = pi;
1953
+ const te = mi;
1999
1954
  function Jt(n, e = {}) {
2000
1955
  let t = n;
2001
1956
  typeof e != "object" && (e = { name: e });
2002
- const r = Object.assign({ name: Be, automaticDataCollectionEnabled: !1 }, e), i = r.name;
1957
+ const r = Object.assign({ name: Fe, automaticDataCollectionEnabled: !1 }, e), i = r.name;
2003
1958
  if (typeof i != "string" || !i)
2004
- throw N.create("bad-app-name", {
1959
+ throw D.create("bad-app-name", {
2005
1960
  appName: String(i)
2006
1961
  });
2007
1962
  if (t || (t = jt()), !t)
2008
- throw N.create(
1963
+ throw D.create(
2009
1964
  "no-options"
2010
1965
  /* AppError.NO_OPTIONS */
2011
1966
  );
2012
- const s = fe.get(i);
1967
+ const s = he.get(i);
2013
1968
  if (s) {
2014
- if (he(t, s.options) && he(r, s.config))
1969
+ if (de(t, s.options) && de(r, s.config))
2015
1970
  return s;
2016
- throw N.create("duplicate-app", { appName: i });
1971
+ throw D.create("duplicate-app", { appName: i });
2017
1972
  }
2018
- const a = new Tr(i);
2019
- for (const o of $e.values())
1973
+ const a = new Sr(i);
1974
+ for (const o of Be.values())
2020
1975
  a.addComponent(o);
2021
- const c = new yi(t, r, a);
2022
- return fe.set(i, c), c;
1976
+ const c = new vi(t, r, a);
1977
+ return he.set(i, c), c;
2023
1978
  }
2024
- function vi(n = Be) {
2025
- const e = fe.get(n);
2026
- if (!e && n === Be && jt())
1979
+ function bi(n = Fe) {
1980
+ const e = he.get(n);
1981
+ if (!e && n === Fe && jt())
2027
1982
  return Jt();
2028
1983
  if (!e)
2029
- throw N.create("no-app", { appName: n });
1984
+ throw D.create("no-app", { appName: n });
2030
1985
  return e;
2031
1986
  }
2032
1987
  function $(n, e, t) {
2033
1988
  var r;
2034
- let i = (r = mi[n]) !== null && r !== void 0 ? r : n;
1989
+ let i = (r = gi[n]) !== null && r !== void 0 ? r : n;
2035
1990
  t && (i += `-${t}`);
2036
1991
  const s = i.match(/\s|\//), a = e.match(/\s|\//);
2037
1992
  if (s || a) {
2038
1993
  const c = [
2039
1994
  `Unable to register library "${i}" with version "${e}":`
2040
1995
  ];
2041
- s && c.push(`library name "${i}" contains illegal characters (whitespace or "/")`), s && a && c.push("and"), a && c.push(`version name "${e}" contains illegal characters (whitespace or "/")`), T.warn(c.join(" "));
1996
+ s && c.push(`library name "${i}" contains illegal characters (whitespace or "/")`), s && a && c.push("and"), a && c.push(`version name "${e}" contains illegal characters (whitespace or "/")`), E.warn(c.join(" "));
2042
1997
  return;
2043
1998
  }
2044
- J(new W(
1999
+ Y(new W(
2045
2000
  `${i}-version`,
2046
2001
  () => ({ library: i, version: e }),
2047
2002
  "VERSION"
@@ -2064,53 +2019,53 @@ function $(n, e, t) {
2064
2019
  * See the License for the specific language governing permissions and
2065
2020
  * limitations under the License.
2066
2021
  */
2067
- const bi = "firebase-heartbeat-database", Ii = 1, Y = "firebase-heartbeat-store";
2068
- let Oe = null;
2022
+ const Ii = "firebase-heartbeat-database", wi = 1, X = "firebase-heartbeat-store";
2023
+ let Pe = null;
2069
2024
  function Yt() {
2070
- return Oe || (Oe = xr(bi, Ii, {
2025
+ return Pe || (Pe = Fr(Ii, wi, {
2071
2026
  upgrade: (n, e) => {
2072
2027
  switch (e) {
2073
2028
  case 0:
2074
2029
  try {
2075
- n.createObjectStore(Y);
2030
+ n.createObjectStore(X);
2076
2031
  } catch (t) {
2077
2032
  console.warn(t);
2078
2033
  }
2079
2034
  }
2080
2035
  }
2081
2036
  }).catch((n) => {
2082
- throw N.create("idb-open", {
2037
+ throw D.create("idb-open", {
2083
2038
  originalErrorMessage: n.message
2084
2039
  });
2085
- })), Oe;
2040
+ })), Pe;
2086
2041
  }
2087
- async function wi(n) {
2042
+ async function Ei(n) {
2088
2043
  try {
2089
- const t = (await Yt()).transaction(Y), r = await t.objectStore(Y).get(Xt(n));
2044
+ const t = (await Yt()).transaction(X), r = await t.objectStore(X).get(Xt(n));
2090
2045
  return await t.done, r;
2091
2046
  } catch (e) {
2092
- if (e instanceof M)
2093
- T.warn(e.message);
2047
+ if (e instanceof L)
2048
+ E.warn(e.message);
2094
2049
  else {
2095
- const t = N.create("idb-get", {
2050
+ const t = D.create("idb-get", {
2096
2051
  originalErrorMessage: e == null ? void 0 : e.message
2097
2052
  });
2098
- T.warn(t.message);
2053
+ E.warn(t.message);
2099
2054
  }
2100
2055
  }
2101
2056
  }
2102
- async function ft(n, e) {
2057
+ async function ht(n, e) {
2103
2058
  try {
2104
- const r = (await Yt()).transaction(Y, "readwrite");
2105
- await r.objectStore(Y).put(e, Xt(n)), await r.done;
2059
+ const r = (await Yt()).transaction(X, "readwrite");
2060
+ await r.objectStore(X).put(e, Xt(n)), await r.done;
2106
2061
  } catch (t) {
2107
- if (t instanceof M)
2108
- T.warn(t.message);
2062
+ if (t instanceof L)
2063
+ E.warn(t.message);
2109
2064
  else {
2110
- const r = N.create("idb-set", {
2065
+ const r = D.create("idb-set", {
2111
2066
  originalErrorMessage: t == null ? void 0 : t.message
2112
2067
  });
2113
- T.warn(r.message);
2068
+ E.warn(r.message);
2114
2069
  }
2115
2070
  }
2116
2071
  }
@@ -2133,12 +2088,12 @@ function Xt(n) {
2133
2088
  * See the License for the specific language governing permissions and
2134
2089
  * limitations under the License.
2135
2090
  */
2136
- const Ei = 1024, Ti = 30 * 24 * 60 * 60 * 1e3;
2137
- class Si {
2091
+ const Ti = 1024, Si = 30 * 24 * 60 * 60 * 1e3;
2092
+ class ki {
2138
2093
  constructor(e) {
2139
2094
  this.container = e, this._heartbeatsCache = null;
2140
2095
  const t = this.container.getProvider("app").getImmediate();
2141
- this._storage = new Ai(t), this._heartbeatsCachePromise = this._storage.read().then((r) => (this._heartbeatsCache = r, r));
2096
+ this._storage = new Ci(t), this._heartbeatsCachePromise = this._storage.read().then((r) => (this._heartbeatsCache = r, r));
2142
2097
  }
2143
2098
  /**
2144
2099
  * Called to report a heartbeat. The function will generate
@@ -2150,13 +2105,13 @@ class Si {
2150
2105
  async triggerHeartbeat() {
2151
2106
  var e, t;
2152
2107
  try {
2153
- const i = this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(), s = pt();
2108
+ const i = this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(), s = ft();
2154
2109
  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) => {
2155
2110
  const c = new Date(a.date).valueOf();
2156
- return Date.now() - c <= Ti;
2111
+ return Date.now() - c <= Si;
2157
2112
  }), this._storage.overwrite(this._heartbeatsCache));
2158
2113
  } catch (r) {
2159
- T.warn(r);
2114
+ E.warn(r);
2160
2115
  }
2161
2116
  }
2162
2117
  /**
@@ -2171,30 +2126,30 @@ class Si {
2171
2126
  try {
2172
2127
  if (this._heartbeatsCache === null && await this._heartbeatsCachePromise, ((e = this._heartbeatsCache) === null || e === void 0 ? void 0 : e.heartbeats) == null || this._heartbeatsCache.heartbeats.length === 0)
2173
2128
  return "";
2174
- const t = pt(), { heartbeatsToSend: r, unsentEntries: i } = ki(this._heartbeatsCache.heartbeats), s = de(JSON.stringify({ version: 2, heartbeats: r }));
2129
+ const t = ft(), { heartbeatsToSend: r, unsentEntries: i } = Ai(this._heartbeatsCache.heartbeats), s = Ht(JSON.stringify({ version: 2, heartbeats: r }));
2175
2130
  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;
2176
2131
  } catch (t) {
2177
- return T.warn(t), "";
2132
+ return E.warn(t), "";
2178
2133
  }
2179
2134
  }
2180
2135
  }
2181
- function pt() {
2136
+ function ft() {
2182
2137
  return (/* @__PURE__ */ new Date()).toISOString().substring(0, 10);
2183
2138
  }
2184
- function ki(n, e = Ei) {
2139
+ function Ai(n, e = Ti) {
2185
2140
  const t = [];
2186
2141
  let r = n.slice();
2187
2142
  for (const i of n) {
2188
2143
  const s = t.find((a) => a.agent === i.agent);
2189
2144
  if (s) {
2190
- if (s.dates.push(i.date), mt(t) > e) {
2145
+ if (s.dates.push(i.date), pt(t) > e) {
2191
2146
  s.dates.pop();
2192
2147
  break;
2193
2148
  }
2194
2149
  } else if (t.push({
2195
2150
  agent: i.agent,
2196
2151
  dates: [i.date]
2197
- }), mt(t) > e) {
2152
+ }), pt(t) > e) {
2198
2153
  t.pop();
2199
2154
  break;
2200
2155
  }
@@ -2205,19 +2160,19 @@ function ki(n, e = Ei) {
2205
2160
  unsentEntries: r
2206
2161
  };
2207
2162
  }
2208
- class Ai {
2163
+ class Ci {
2209
2164
  constructor(e) {
2210
2165
  this.app = e, this._canUseIndexedDBPromise = this.runIndexedDBEnvironmentCheck();
2211
2166
  }
2212
2167
  async runIndexedDBEnvironmentCheck() {
2213
- return hr() ? fr().then(() => !0).catch(() => !1) : !1;
2168
+ return fr() ? pr().then(() => !0).catch(() => !1) : !1;
2214
2169
  }
2215
2170
  /**
2216
2171
  * Read all heartbeats.
2217
2172
  */
2218
2173
  async read() {
2219
2174
  if (await this._canUseIndexedDBPromise) {
2220
- const t = await wi(this.app);
2175
+ const t = await Ei(this.app);
2221
2176
  return t != null && t.heartbeats ? t : { heartbeats: [] };
2222
2177
  } else
2223
2178
  return { heartbeats: [] };
@@ -2227,7 +2182,7 @@ class Ai {
2227
2182
  var t;
2228
2183
  if (await this._canUseIndexedDBPromise) {
2229
2184
  const i = await this.read();
2230
- return ft(this.app, {
2185
+ return ht(this.app, {
2231
2186
  lastSentHeartbeatDate: (t = e.lastSentHeartbeatDate) !== null && t !== void 0 ? t : i.lastSentHeartbeatDate,
2232
2187
  heartbeats: e.heartbeats
2233
2188
  });
@@ -2239,7 +2194,7 @@ class Ai {
2239
2194
  var t;
2240
2195
  if (await this._canUseIndexedDBPromise) {
2241
2196
  const i = await this.read();
2242
- return ft(this.app, {
2197
+ return ht(this.app, {
2243
2198
  lastSentHeartbeatDate: (t = e.lastSentHeartbeatDate) !== null && t !== void 0 ? t : i.lastSentHeartbeatDate,
2244
2199
  heartbeats: [
2245
2200
  ...i.heartbeats,
@@ -2250,8 +2205,8 @@ class Ai {
2250
2205
  return;
2251
2206
  }
2252
2207
  }
2253
- function mt(n) {
2254
- return de(
2208
+ function pt(n) {
2209
+ return Ht(
2255
2210
  // heartbeatsCache wrapper properties
2256
2211
  JSON.stringify({ version: 2, heartbeats: n })
2257
2212
  ).length;
@@ -2273,20 +2228,20 @@ function mt(n) {
2273
2228
  * limitations under the License.
2274
2229
  */
2275
2230
  function Ri(n) {
2276
- J(new W(
2231
+ Y(new W(
2277
2232
  "platform-logger",
2278
- (e) => new $r(e),
2233
+ (e) => new Hr(e),
2279
2234
  "PRIVATE"
2280
2235
  /* ComponentType.PRIVATE */
2281
- )), J(new W(
2236
+ )), Y(new W(
2282
2237
  "heartbeat",
2283
- (e) => new Si(e),
2238
+ (e) => new ki(e),
2284
2239
  "PRIVATE"
2285
2240
  /* ComponentType.PRIVATE */
2286
- )), $(Fe, dt, n), $(Fe, dt, "esm2017"), $("fire-js", "");
2241
+ )), $(xe, ut, n), $(xe, ut, "esm2017"), $("fire-js", "");
2287
2242
  }
2288
2243
  Ri("");
2289
- var Ci = "firebase", Pi = "10.14.1";
2244
+ var Pi = "firebase", Oi = "10.14.1";
2290
2245
  /**
2291
2246
  * @license
2292
2247
  * Copyright 2020 Google LLC
@@ -2303,17 +2258,17 @@ var Ci = "firebase", Pi = "10.14.1";
2303
2258
  * See the License for the specific language governing permissions and
2304
2259
  * limitations under the License.
2305
2260
  */
2306
- $(Ci, Pi, "app");
2307
- var gt = function() {
2308
- return gt = Object.assign || function(e) {
2261
+ $(Pi, Oi, "app");
2262
+ var mt = function() {
2263
+ return mt = Object.assign || function(e) {
2309
2264
  for (var t, r = 1, i = arguments.length; r < i; r++) {
2310
2265
  t = arguments[r];
2311
2266
  for (var s in t) Object.prototype.hasOwnProperty.call(t, s) && (e[s] = t[s]);
2312
2267
  }
2313
2268
  return e;
2314
- }, gt.apply(this, arguments);
2269
+ }, mt.apply(this, arguments);
2315
2270
  };
2316
- function qe(n, e) {
2271
+ function Ge(n, e) {
2317
2272
  var t = {};
2318
2273
  for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && e.indexOf(r) < 0 && (t[r] = n[r]);
2319
2274
  if (n != null && typeof Object.getOwnPropertySymbols == "function")
@@ -2326,7 +2281,7 @@ function Qt() {
2326
2281
  "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."
2327
2282
  };
2328
2283
  }
2329
- const Oi = Qt, Zt = new Q("auth", "Firebase", Qt());
2284
+ const Di = Qt, Zt = new Z("auth", "Firebase", Qt());
2330
2285
  /**
2331
2286
  * @license
2332
2287
  * Copyright 2020 Google LLC
@@ -2343,12 +2298,12 @@ const Oi = Qt, Zt = new Q("auth", "Firebase", Qt());
2343
2298
  * See the License for the specific language governing permissions and
2344
2299
  * limitations under the License.
2345
2300
  */
2346
- const pe = new zt("@firebase/auth");
2347
- function Di(n, ...e) {
2348
- pe.logLevel <= p.WARN && pe.warn(`Auth (${ee}): ${n}`, ...e);
2301
+ const fe = new zt("@firebase/auth");
2302
+ function Ni(n, ...e) {
2303
+ fe.logLevel <= f.WARN && fe.warn(`Auth (${te}): ${n}`, ...e);
2349
2304
  }
2350
- function se(n, ...e) {
2351
- pe.logLevel <= p.ERROR && pe.error(`Auth (${ee}): ${n}`, ...e);
2305
+ function ae(n, ...e) {
2306
+ fe.logLevel <= f.ERROR && fe.error(`Auth (${te}): ${n}`, ...e);
2352
2307
  }
2353
2308
  /**
2354
2309
  * @license
@@ -2366,22 +2321,22 @@ function se(n, ...e) {
2366
2321
  * See the License for the specific language governing permissions and
2367
2322
  * limitations under the License.
2368
2323
  */
2369
- function S(n, ...e) {
2370
- throw Ke(n, ...e);
2324
+ function T(n, ...e) {
2325
+ throw qe(n, ...e);
2371
2326
  }
2372
2327
  function _(n, ...e) {
2373
- return Ke(n, ...e);
2328
+ return qe(n, ...e);
2374
2329
  }
2375
2330
  function en(n, e, t) {
2376
- const r = Object.assign(Object.assign({}, Oi()), { [e]: t });
2377
- return new Q("auth", "Firebase", r).create(e, {
2331
+ const r = Object.assign(Object.assign({}, Di()), { [e]: t });
2332
+ return new Z("auth", "Firebase", r).create(e, {
2378
2333
  appName: n.name
2379
2334
  });
2380
2335
  }
2381
- function L(n) {
2336
+ function N(n) {
2382
2337
  return en(n, "operation-not-supported-in-this-environment", "Operations that alter the current user are not supported in conjunction with FirebaseServerApp");
2383
2338
  }
2384
- function Ke(n, ...e) {
2339
+ function qe(n, ...e) {
2385
2340
  if (typeof n != "string") {
2386
2341
  const t = e[0], r = [...e.slice(1)];
2387
2342
  return r[0] && (r[0].appName = n.name), n._errorFactory.create(t, ...r);
@@ -2390,14 +2345,14 @@ function Ke(n, ...e) {
2390
2345
  }
2391
2346
  function h(n, e, ...t) {
2392
2347
  if (!n)
2393
- throw Ke(e, ...t);
2348
+ throw qe(e, ...t);
2394
2349
  }
2395
- function I(n) {
2350
+ function b(n) {
2396
2351
  const e = "INTERNAL ASSERTION FAILED: " + n;
2397
- throw se(e), new Error(e);
2352
+ throw ae(e), new Error(e);
2398
2353
  }
2399
- function k(n, e) {
2400
- n || I(e);
2354
+ function S(n, e) {
2355
+ n || b(e);
2401
2356
  }
2402
2357
  /**
2403
2358
  * @license
@@ -2415,14 +2370,14 @@ function k(n, e) {
2415
2370
  * See the License for the specific language governing permissions and
2416
2371
  * limitations under the License.
2417
2372
  */
2418
- function He() {
2373
+ function $e() {
2419
2374
  var n;
2420
2375
  return typeof self < "u" && ((n = self.location) === null || n === void 0 ? void 0 : n.href) || "";
2421
2376
  }
2422
- function Ni() {
2423
- return _t() === "http:" || _t() === "https:";
2377
+ function Li() {
2378
+ return gt() === "http:" || gt() === "https:";
2424
2379
  }
2425
- function _t() {
2380
+ function gt() {
2426
2381
  var n;
2427
2382
  return typeof self < "u" && ((n = self.location) === null || n === void 0 ? void 0 : n.protocol) || null;
2428
2383
  }
@@ -2442,15 +2397,15 @@ function _t() {
2442
2397
  * See the License for the specific language governing permissions and
2443
2398
  * limitations under the License.
2444
2399
  */
2445
- function Li() {
2400
+ function Mi() {
2446
2401
  return typeof navigator < "u" && navigator && "onLine" in navigator && typeof navigator.onLine == "boolean" && // Apply only for traditional web apps and Chrome extensions.
2447
2402
  // This is especially true for Cordova apps which have unreliable
2448
2403
  // navigator.onLine behavior unless cordova-plugin-network-information is
2449
2404
  // installed which overwrites the native navigator.onLine value and
2450
2405
  // defines navigator.connection.
2451
- (Ni() || lr() || "connection" in navigator) ? navigator.onLine : !0;
2406
+ (Li() || ur() || "connection" in navigator) ? navigator.onLine : !0;
2452
2407
  }
2453
- function Mi() {
2408
+ function Ui() {
2454
2409
  if (typeof navigator > "u")
2455
2410
  return null;
2456
2411
  const n = navigator;
@@ -2478,12 +2433,12 @@ function Mi() {
2478
2433
  * See the License for the specific language governing permissions and
2479
2434
  * limitations under the License.
2480
2435
  */
2481
- class te {
2436
+ class ne {
2482
2437
  constructor(e, t) {
2483
- this.shortDelay = e, this.longDelay = t, k(t > e, "Short delay should be less than long delay!"), this.isMobile = or() || ur();
2438
+ this.shortDelay = e, this.longDelay = t, S(t > e, "Short delay should be less than long delay!"), this.isMobile = cr() || dr();
2484
2439
  }
2485
2440
  get() {
2486
- return Li() ? this.isMobile ? this.longDelay : this.shortDelay : Math.min(5e3, this.shortDelay);
2441
+ return Mi() ? this.isMobile ? this.longDelay : this.shortDelay : Math.min(5e3, this.shortDelay);
2487
2442
  }
2488
2443
  }
2489
2444
  /**
@@ -2502,8 +2457,8 @@ class te {
2502
2457
  * See the License for the specific language governing permissions and
2503
2458
  * limitations under the License.
2504
2459
  */
2505
- function Je(n, e) {
2506
- k(n.emulator, "Emulator should always be set here");
2460
+ function Ke(n, e) {
2461
+ S(n.emulator, "Emulator should always be set here");
2507
2462
  const { url: t } = n.emulator;
2508
2463
  return e ? `${t}${e.startsWith("/") ? e.slice(1) : e}` : t;
2509
2464
  }
@@ -2536,7 +2491,7 @@ class tn {
2536
2491
  return globalThis.fetch;
2537
2492
  if (typeof fetch < "u")
2538
2493
  return fetch;
2539
- I("Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill");
2494
+ b("Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill");
2540
2495
  }
2541
2496
  static headers() {
2542
2497
  if (this.headersImpl)
@@ -2547,7 +2502,7 @@ class tn {
2547
2502
  return globalThis.Headers;
2548
2503
  if (typeof Headers < "u")
2549
2504
  return Headers;
2550
- I("Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill");
2505
+ b("Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill");
2551
2506
  }
2552
2507
  static response() {
2553
2508
  if (this.responseImpl)
@@ -2558,7 +2513,7 @@ class tn {
2558
2513
  return globalThis.Response;
2559
2514
  if (typeof Response < "u")
2560
2515
  return Response;
2561
- I("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill");
2516
+ b("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill");
2562
2517
  }
2563
2518
  }
2564
2519
  /**
@@ -2577,7 +2532,7 @@ class tn {
2577
2532
  * See the License for the specific language governing permissions and
2578
2533
  * limitations under the License.
2579
2534
  */
2580
- const Ui = {
2535
+ const xi = {
2581
2536
  // Custom token errors.
2582
2537
  CREDENTIAL_MISMATCH: "custom-token-mismatch",
2583
2538
  // This can only happen if the SDK sends a bad request.
@@ -2668,8 +2623,8 @@ const Ui = {
2668
2623
  * See the License for the specific language governing permissions and
2669
2624
  * limitations under the License.
2670
2625
  */
2671
- const xi = new te(3e4, 6e4);
2672
- function ve(n, e) {
2626
+ const Fi = new ne(3e4, 6e4);
2627
+ function ye(n, e) {
2673
2628
  return n.tenantId && !e.tenantId ? Object.assign(Object.assign({}, e), { tenantId: n.tenantId }) : e;
2674
2629
  }
2675
2630
  async function G(n, e, t, r, i = {}) {
@@ -2678,7 +2633,7 @@ async function G(n, e, t, r, i = {}) {
2678
2633
  r && (e === "GET" ? a = r : s = {
2679
2634
  body: JSON.stringify(r)
2680
2635
  });
2681
- const c = Z(Object.assign({ key: n.config.apiKey }, a)).slice(1), o = await n._getAdditionalHeaders();
2636
+ const c = ee(Object.assign({ key: n.config.apiKey }, a)).slice(1), o = await n._getAdditionalHeaders();
2682
2637
  o[
2683
2638
  "Content-Type"
2684
2639
  /* HttpHeader.CONTENT_TYPE */
@@ -2686,71 +2641,71 @@ async function G(n, e, t, r, i = {}) {
2686
2641
  "X-Firebase-Locale"
2687
2642
  /* HttpHeader.X_FIREBASE_LOCALE */
2688
2643
  ] = n.languageCode);
2689
- const u = Object.assign({
2644
+ const l = Object.assign({
2690
2645
  method: e,
2691
2646
  headers: o
2692
2647
  }, s);
2693
- return cr() || (u.referrerPolicy = "no-referrer"), tn.fetch()(sn(n, n.config.apiHost, t, c), u);
2648
+ return lr() || (l.referrerPolicy = "no-referrer"), tn.fetch()(sn(n, n.config.apiHost, t, c), l);
2694
2649
  });
2695
2650
  }
2696
2651
  async function nn(n, e, t) {
2697
2652
  n._canInitEmulator = !1;
2698
- const r = Object.assign(Object.assign({}, Ui), e);
2653
+ const r = Object.assign(Object.assign({}, xi), e);
2699
2654
  try {
2700
- const i = new Fi(n), s = await Promise.race([
2655
+ const i = new Bi(n), s = await Promise.race([
2701
2656
  t(),
2702
2657
  i.promise
2703
2658
  ]);
2704
2659
  i.clearNetworkTimeout();
2705
2660
  const a = await s.json();
2706
2661
  if ("needConfirmation" in a)
2707
- throw ie(n, "account-exists-with-different-credential", a);
2662
+ throw se(n, "account-exists-with-different-credential", a);
2708
2663
  if (s.ok && !("errorMessage" in a))
2709
2664
  return a;
2710
2665
  {
2711
- const c = s.ok ? a.errorMessage : a.error.message, [o, u] = c.split(" : ");
2666
+ const c = s.ok ? a.errorMessage : a.error.message, [o, l] = c.split(" : ");
2712
2667
  if (o === "FEDERATED_USER_ID_ALREADY_LINKED")
2713
- throw ie(n, "credential-already-in-use", a);
2668
+ throw se(n, "credential-already-in-use", a);
2714
2669
  if (o === "EMAIL_EXISTS")
2715
- throw ie(n, "email-already-in-use", a);
2670
+ throw se(n, "email-already-in-use", a);
2716
2671
  if (o === "USER_DISABLED")
2717
- throw ie(n, "user-disabled", a);
2718
- const l = r[o] || o.toLowerCase().replace(/[_\s]+/g, "-");
2719
- if (u)
2720
- throw en(n, l, u);
2721
- S(n, l);
2672
+ throw se(n, "user-disabled", a);
2673
+ const u = r[o] || o.toLowerCase().replace(/[_\s]+/g, "-");
2674
+ if (l)
2675
+ throw en(n, u, l);
2676
+ T(n, u);
2722
2677
  }
2723
2678
  } catch (i) {
2724
- if (i instanceof M)
2679
+ if (i instanceof L)
2725
2680
  throw i;
2726
- S(n, "network-request-failed", { message: String(i) });
2681
+ T(n, "network-request-failed", { message: String(i) });
2727
2682
  }
2728
2683
  }
2729
2684
  async function rn(n, e, t, r, i = {}) {
2730
2685
  const s = await G(n, e, t, r, i);
2731
- return "mfaPendingCredential" in s && S(n, "multi-factor-auth-required", {
2686
+ return "mfaPendingCredential" in s && T(n, "multi-factor-auth-required", {
2732
2687
  _serverResponse: s
2733
2688
  }), s;
2734
2689
  }
2735
2690
  function sn(n, e, t, r) {
2736
2691
  const i = `${e}${t}?${r}`;
2737
- return n.config.emulator ? Je(n.config, i) : `${n.config.apiScheme}://${i}`;
2692
+ return n.config.emulator ? Ke(n.config, i) : `${n.config.apiScheme}://${i}`;
2738
2693
  }
2739
- class Fi {
2694
+ class Bi {
2740
2695
  constructor(e) {
2741
2696
  this.auth = e, this.timer = null, this.promise = new Promise((t, r) => {
2742
2697
  this.timer = setTimeout(() => r(_(
2743
2698
  this.auth,
2744
2699
  "network-request-failed"
2745
2700
  /* AuthErrorCode.NETWORK_REQUEST_FAILED */
2746
- )), xi.get());
2701
+ )), Fi.get());
2747
2702
  });
2748
2703
  }
2749
2704
  clearNetworkTimeout() {
2750
2705
  clearTimeout(this.timer);
2751
2706
  }
2752
2707
  }
2753
- function ie(n, e, t) {
2708
+ function se(n, e, t) {
2754
2709
  const r = {
2755
2710
  appName: n.name
2756
2711
  };
@@ -2774,7 +2729,7 @@ function ie(n, e, t) {
2774
2729
  * See the License for the specific language governing permissions and
2775
2730
  * limitations under the License.
2776
2731
  */
2777
- async function Bi(n, e) {
2732
+ async function $i(n, e) {
2778
2733
  return G(n, "POST", "/v1/accounts:delete", e);
2779
2734
  }
2780
2735
  async function an(n, e) {
@@ -2796,7 +2751,7 @@ async function an(n, e) {
2796
2751
  * See the License for the specific language governing permissions and
2797
2752
  * limitations under the License.
2798
2753
  */
2799
- function K(n) {
2754
+ function J(n) {
2800
2755
  if (n)
2801
2756
  try {
2802
2757
  const e = new Date(Number(n));
@@ -2805,8 +2760,8 @@ function K(n) {
2805
2760
  } catch {
2806
2761
  }
2807
2762
  }
2808
- async function $i(n, e = !1) {
2809
- const t = z(n), r = await t.getIdToken(e), i = Ye(r);
2763
+ async function Hi(n, e = !1) {
2764
+ const t = z(n), r = await t.getIdToken(e), i = Je(r);
2810
2765
  h(
2811
2766
  i && i.exp && i.auth_time && i.iat,
2812
2767
  t.auth,
@@ -2817,29 +2772,29 @@ async function $i(n, e = !1) {
2817
2772
  return {
2818
2773
  claims: i,
2819
2774
  token: r,
2820
- authTime: K(De(i.auth_time)),
2821
- issuedAtTime: K(De(i.iat)),
2822
- expirationTime: K(De(i.exp)),
2775
+ authTime: J(Oe(i.auth_time)),
2776
+ issuedAtTime: J(Oe(i.iat)),
2777
+ expirationTime: J(Oe(i.exp)),
2823
2778
  signInProvider: a || null,
2824
2779
  signInSecondFactor: (s == null ? void 0 : s.sign_in_second_factor) || null
2825
2780
  };
2826
2781
  }
2827
- function De(n) {
2782
+ function Oe(n) {
2828
2783
  return Number(n) * 1e3;
2829
2784
  }
2830
- function Ye(n) {
2785
+ function Je(n) {
2831
2786
  const [e, t, r] = n.split(".");
2832
2787
  if (e === void 0 || t === void 0 || r === void 0)
2833
- return se("JWT malformed, contained fewer than 3 sections"), null;
2788
+ return ae("JWT malformed, contained fewer than 3 sections"), null;
2834
2789
  try {
2835
- const i = Ht(t);
2836
- return i ? JSON.parse(i) : (se("Failed to decode base64 JWT payload"), null);
2790
+ const i = Vt(t);
2791
+ return i ? JSON.parse(i) : (ae("Failed to decode base64 JWT payload"), null);
2837
2792
  } catch (i) {
2838
- return se("Caught error parsing JWT payload as JSON", i == null ? void 0 : i.toString()), null;
2793
+ return ae("Caught error parsing JWT payload as JSON", i == null ? void 0 : i.toString()), null;
2839
2794
  }
2840
2795
  }
2841
- function yt(n) {
2842
- const e = Ye(n);
2796
+ function _t(n) {
2797
+ const e = Je(n);
2843
2798
  return h(
2844
2799
  e,
2845
2800
  "internal-error"
@@ -2870,16 +2825,16 @@ function yt(n) {
2870
2825
  * See the License for the specific language governing permissions and
2871
2826
  * limitations under the License.
2872
2827
  */
2873
- async function X(n, e, t = !1) {
2828
+ async function Q(n, e, t = !1) {
2874
2829
  if (t)
2875
2830
  return e;
2876
2831
  try {
2877
2832
  return await e;
2878
2833
  } catch (r) {
2879
- throw r instanceof M && Hi(r) && n.auth.currentUser === n && await n.auth.signOut(), r;
2834
+ throw r instanceof L && Vi(r) && n.auth.currentUser === n && await n.auth.signOut(), r;
2880
2835
  }
2881
2836
  }
2882
- function Hi({ code: n }) {
2837
+ function Vi({ code: n }) {
2883
2838
  return n === "auth/user-disabled" || n === "auth/user-token-expired";
2884
2839
  }
2885
2840
  /**
@@ -2898,7 +2853,7 @@ function Hi({ code: n }) {
2898
2853
  * See the License for the specific language governing permissions and
2899
2854
  * limitations under the License.
2900
2855
  */
2901
- class Vi {
2856
+ class ji {
2902
2857
  constructor(e) {
2903
2858
  this.user = e, this.isRunning = !1, this.timerId = null, this.errorBackoff = 3e4;
2904
2859
  }
@@ -2960,12 +2915,12 @@ class Vi {
2960
2915
  * See the License for the specific language governing permissions and
2961
2916
  * limitations under the License.
2962
2917
  */
2963
- class Ve {
2918
+ class He {
2964
2919
  constructor(e, t) {
2965
2920
  this.createdAt = e, this.lastLoginAt = t, this._initializeTime();
2966
2921
  }
2967
2922
  _initializeTime() {
2968
- this.lastSignInTime = K(this.lastLoginAt), this.creationTime = K(this.createdAt);
2923
+ this.lastSignInTime = J(this.lastLoginAt), this.creationTime = J(this.createdAt);
2969
2924
  }
2970
2925
  _copy(e) {
2971
2926
  this.createdAt = e.createdAt, this.lastLoginAt = e.lastLoginAt, this._initializeTime();
@@ -2993,9 +2948,9 @@ class Ve {
2993
2948
  * See the License for the specific language governing permissions and
2994
2949
  * limitations under the License.
2995
2950
  */
2996
- async function me(n) {
2951
+ async function pe(n) {
2997
2952
  var e;
2998
- const t = n.auth, r = await n.getIdToken(), i = await X(n, an(t, { idToken: r }));
2953
+ const t = n.auth, r = await n.getIdToken(), i = await Q(n, an(t, { idToken: r }));
2999
2954
  h(
3000
2955
  i == null ? void 0 : i.users.length,
3001
2956
  t,
@@ -3004,7 +2959,7 @@ async function me(n) {
3004
2959
  );
3005
2960
  const s = i.users[0];
3006
2961
  n._notifyReloadListener(s);
3007
- const a = !((e = s.providerUserInfo) === null || e === void 0) && e.length ? on(s.providerUserInfo) : [], c = Wi(n.providerData, a), o = n.isAnonymous, u = !(n.email && s.passwordHash) && !(c != null && c.length), l = o ? u : !1, d = {
2962
+ const a = !((e = s.providerUserInfo) === null || e === void 0) && e.length ? on(s.providerUserInfo) : [], c = zi(n.providerData, a), o = n.isAnonymous, l = !(n.email && s.passwordHash) && !(c != null && c.length), u = o ? l : !1, d = {
3008
2963
  uid: s.localId,
3009
2964
  displayName: s.displayName || null,
3010
2965
  photoURL: s.photoUrl || null,
@@ -3013,21 +2968,21 @@ async function me(n) {
3013
2968
  phoneNumber: s.phoneNumber || null,
3014
2969
  tenantId: s.tenantId || null,
3015
2970
  providerData: c,
3016
- metadata: new Ve(s.createdAt, s.lastLoginAt),
3017
- isAnonymous: l
2971
+ metadata: new He(s.createdAt, s.lastLoginAt),
2972
+ isAnonymous: u
3018
2973
  };
3019
2974
  Object.assign(n, d);
3020
2975
  }
3021
- async function ji(n) {
2976
+ async function Wi(n) {
3022
2977
  const e = z(n);
3023
- await me(e), await e.auth._persistUserIfCurrent(e), e.auth._notifyListenersIfCurrent(e);
2978
+ await pe(e), await e.auth._persistUserIfCurrent(e), e.auth._notifyListenersIfCurrent(e);
3024
2979
  }
3025
- function Wi(n, e) {
2980
+ function zi(n, e) {
3026
2981
  return [...n.filter((r) => !e.some((i) => i.providerId === r.providerId)), ...e];
3027
2982
  }
3028
2983
  function on(n) {
3029
2984
  return n.map((e) => {
3030
- var { providerId: t } = e, r = qe(e, ["providerId"]);
2985
+ var { providerId: t } = e, r = Ge(e, ["providerId"]);
3031
2986
  return {
3032
2987
  providerId: t,
3033
2988
  uid: r.rawId || "",
@@ -3054,9 +3009,9 @@ function on(n) {
3054
3009
  * See the License for the specific language governing permissions and
3055
3010
  * limitations under the License.
3056
3011
  */
3057
- async function zi(n, e) {
3012
+ async function Gi(n, e) {
3058
3013
  const t = await nn(n, {}, async () => {
3059
- const r = Z({
3014
+ const r = ee({
3060
3015
  grant_type: "refresh_token",
3061
3016
  refresh_token: e
3062
3017
  }).slice(1), { tokenApiHost: i, apiKey: s } = n.config, a = sn(n, i, "/v1/token", `key=${s}`), c = await n._getAdditionalHeaders();
@@ -3075,8 +3030,8 @@ async function zi(n, e) {
3075
3030
  refreshToken: t.refresh_token
3076
3031
  };
3077
3032
  }
3078
- async function Gi(n, e) {
3079
- return G(n, "POST", "/v2/accounts:revokeToken", ve(n, e));
3033
+ async function qi(n, e) {
3034
+ return G(n, "POST", "/v2/accounts:revokeToken", ye(n, e));
3080
3035
  }
3081
3036
  /**
3082
3037
  * @license
@@ -3115,7 +3070,7 @@ class H {
3115
3070
  "internal-error"
3116
3071
  /* AuthErrorCode.INTERNAL_ERROR */
3117
3072
  );
3118
- const t = "expiresIn" in e && typeof e.expiresIn < "u" ? Number(e.expiresIn) : yt(e.idToken);
3073
+ const t = "expiresIn" in e && typeof e.expiresIn < "u" ? Number(e.expiresIn) : _t(e.idToken);
3119
3074
  this.updateTokensAndExpiration(e.idToken, e.refreshToken, t);
3120
3075
  }
3121
3076
  updateFromIdToken(e) {
@@ -3124,7 +3079,7 @@ class H {
3124
3079
  "internal-error"
3125
3080
  /* AuthErrorCode.INTERNAL_ERROR */
3126
3081
  );
3127
- const t = yt(e);
3082
+ const t = _t(e);
3128
3083
  this.updateTokensAndExpiration(e, null, t);
3129
3084
  }
3130
3085
  async getToken(e, t = !1) {
@@ -3139,7 +3094,7 @@ class H {
3139
3094
  this.refreshToken = null;
3140
3095
  }
3141
3096
  async refresh(e, t) {
3142
- const { accessToken: r, refreshToken: i, expiresIn: s } = await zi(e, t);
3097
+ const { accessToken: r, refreshToken: i, expiresIn: s } = await Gi(e, t);
3143
3098
  this.updateTokensAndExpiration(r, i, Number(s));
3144
3099
  }
3145
3100
  updateTokensAndExpiration(e, t, r) {
@@ -3169,7 +3124,7 @@ class H {
3169
3124
  return Object.assign(new H(), this.toJSON());
3170
3125
  }
3171
3126
  _performRefresh() {
3172
- return I("not implemented");
3127
+ return b("not implemented");
3173
3128
  }
3174
3129
  }
3175
3130
  /**
@@ -3188,16 +3143,16 @@ class H {
3188
3143
  * See the License for the specific language governing permissions and
3189
3144
  * limitations under the License.
3190
3145
  */
3191
- function A(n, e) {
3146
+ function k(n, e) {
3192
3147
  h(typeof n == "string" || typeof n > "u", "internal-error", { appName: e });
3193
3148
  }
3194
- class w {
3149
+ class I {
3195
3150
  constructor(e) {
3196
- var { uid: t, auth: r, stsTokenManager: i } = e, s = qe(e, ["uid", "auth", "stsTokenManager"]);
3197
- this.providerId = "firebase", this.proactiveRefresh = new Vi(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 Ve(s.createdAt || void 0, s.lastLoginAt || void 0);
3151
+ var { uid: t, auth: r, stsTokenManager: i } = e, s = Ge(e, ["uid", "auth", "stsTokenManager"]);
3152
+ 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);
3198
3153
  }
3199
3154
  async getIdToken(e) {
3200
- const t = await X(this, this.stsTokenManager.getToken(this.auth, e));
3155
+ const t = await Q(this, this.stsTokenManager.getToken(this.auth, e));
3201
3156
  return h(
3202
3157
  t,
3203
3158
  this.auth,
@@ -3206,10 +3161,10 @@ class w {
3206
3161
  ), this.accessToken !== t && (this.accessToken = t, await this.auth._persistUserIfCurrent(this), this.auth._notifyListenersIfCurrent(this)), t;
3207
3162
  }
3208
3163
  getIdTokenResult(e) {
3209
- return $i(this, e);
3164
+ return Hi(this, e);
3210
3165
  }
3211
3166
  reload() {
3212
- return ji(this);
3167
+ return Wi(this);
3213
3168
  }
3214
3169
  _assign(e) {
3215
3170
  this !== e && (h(
@@ -3220,7 +3175,7 @@ class w {
3220
3175
  ), this.displayName = e.displayName, this.photoURL = e.photoURL, this.email = e.email, this.emailVerified = e.emailVerified, this.phoneNumber = e.phoneNumber, this.isAnonymous = e.isAnonymous, this.tenantId = e.tenantId, this.providerData = e.providerData.map((t) => Object.assign({}, t)), this.metadata._copy(e.metadata), this.stsTokenManager._assign(e.stsTokenManager));
3221
3176
  }
3222
3177
  _clone(e) {
3223
- const t = new w(Object.assign(Object.assign({}, this), { auth: e, stsTokenManager: this.stsTokenManager._clone() }));
3178
+ const t = new I(Object.assign(Object.assign({}, this), { auth: e, stsTokenManager: this.stsTokenManager._clone() }));
3224
3179
  return t.metadata._copy(this.metadata), t;
3225
3180
  }
3226
3181
  _onReload(e) {
@@ -3242,13 +3197,13 @@ class w {
3242
3197
  }
3243
3198
  async _updateTokensIfNecessary(e, t = !1) {
3244
3199
  let r = !1;
3245
- e.idToken && e.idToken !== this.stsTokenManager.accessToken && (this.stsTokenManager.updateFromServerResponse(e), r = !0), t && await me(this), await this.auth._persistUserIfCurrent(this), r && this.auth._notifyListenersIfCurrent(this);
3200
+ 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);
3246
3201
  }
3247
3202
  async delete() {
3248
- if (b(this.auth.app))
3249
- return Promise.reject(L(this.auth));
3203
+ if (v(this.auth.app))
3204
+ return Promise.reject(N(this.auth));
3250
3205
  const e = await this.getIdToken();
3251
- return await X(this, Bi(this.auth, { idToken: e })), this.stsTokenManager.clearRefreshToken(), this.auth.signOut();
3206
+ return await Q(this, $i(this.auth, { idToken: e })), this.stsTokenManager.clearRefreshToken(), this.auth.signOut();
3252
3207
  }
3253
3208
  toJSON() {
3254
3209
  return Object.assign(Object.assign({
@@ -3275,46 +3230,46 @@ class w {
3275
3230
  return this.stsTokenManager.refreshToken || "";
3276
3231
  }
3277
3232
  static _fromJSON(e, t) {
3278
- var r, i, s, a, c, o, u, l;
3279
- const d = (r = t.displayName) !== null && r !== void 0 ? r : void 0, f = (i = t.email) !== null && i !== void 0 ? i : void 0, g = (s = t.phoneNumber) !== null && s !== void 0 ? s : void 0, v = (a = t.photoURL) !== null && a !== void 0 ? a : void 0, tt = (c = t.tenantId) !== null && c !== void 0 ? c : void 0, Ee = (o = t._redirectEventId) !== null && o !== void 0 ? o : void 0, nt = (u = t.createdAt) !== null && u !== void 0 ? u : void 0, rt = (l = t.lastLoginAt) !== null && l !== void 0 ? l : void 0, { uid: Te, emailVerified: it, isAnonymous: st, providerData: Se, stsTokenManager: at } = t;
3233
+ var r, i, s, a, c, o, l, u;
3234
+ 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;
3280
3235
  h(
3281
- Te && at,
3236
+ Ee && st,
3282
3237
  e,
3283
3238
  "internal-error"
3284
3239
  /* AuthErrorCode.INTERNAL_ERROR */
3285
3240
  );
3286
- const Dn = H.fromJSON(this.name, at);
3241
+ const Dn = H.fromJSON(this.name, st);
3287
3242
  h(
3288
- typeof Te == "string",
3243
+ typeof Ee == "string",
3289
3244
  e,
3290
3245
  "internal-error"
3291
3246
  /* AuthErrorCode.INTERNAL_ERROR */
3292
- ), A(d, e.name), A(f, e.name), h(
3293
- typeof it == "boolean",
3247
+ ), k(d, e.name), k(p, e.name), h(
3248
+ typeof rt == "boolean",
3294
3249
  e,
3295
3250
  "internal-error"
3296
3251
  /* AuthErrorCode.INTERNAL_ERROR */
3297
3252
  ), h(
3298
- typeof st == "boolean",
3253
+ typeof it == "boolean",
3299
3254
  e,
3300
3255
  "internal-error"
3301
3256
  /* AuthErrorCode.INTERNAL_ERROR */
3302
- ), A(g, e.name), A(v, e.name), A(tt, e.name), A(Ee, e.name), A(nt, e.name), A(rt, e.name);
3303
- const ke = new w({
3304
- uid: Te,
3257
+ ), k(m, e.name), k(F, e.name), k(et, e.name), k(we, e.name), k(tt, e.name), k(nt, e.name);
3258
+ const Se = new I({
3259
+ uid: Ee,
3305
3260
  auth: e,
3306
- email: f,
3307
- emailVerified: it,
3261
+ email: p,
3262
+ emailVerified: rt,
3308
3263
  displayName: d,
3309
- isAnonymous: st,
3310
- photoURL: v,
3311
- phoneNumber: g,
3312
- tenantId: tt,
3264
+ isAnonymous: it,
3265
+ photoURL: F,
3266
+ phoneNumber: m,
3267
+ tenantId: et,
3313
3268
  stsTokenManager: Dn,
3314
- createdAt: nt,
3315
- lastLoginAt: rt
3269
+ createdAt: tt,
3270
+ lastLoginAt: nt
3316
3271
  });
3317
- return Se && Array.isArray(Se) && (ke.providerData = Se.map((Nn) => Object.assign({}, Nn))), Ee && (ke._redirectEventId = Ee), ke;
3272
+ return Te && Array.isArray(Te) && (Se.providerData = Te.map((Nn) => Object.assign({}, Nn))), we && (Se._redirectEventId = we), Se;
3318
3273
  }
3319
3274
  /**
3320
3275
  * Initialize a User from an idToken server response
@@ -3324,13 +3279,13 @@ class w {
3324
3279
  static async _fromIdTokenResponse(e, t, r = !1) {
3325
3280
  const i = new H();
3326
3281
  i.updateFromServerResponse(t);
3327
- const s = new w({
3282
+ const s = new I({
3328
3283
  uid: t.localId,
3329
3284
  auth: e,
3330
3285
  stsTokenManager: i,
3331
3286
  isAnonymous: r
3332
3287
  });
3333
- return await me(s), s;
3288
+ return await pe(s), s;
3334
3289
  }
3335
3290
  /**
3336
3291
  * Initialize a User from an idToken server response
@@ -3346,12 +3301,12 @@ class w {
3346
3301
  );
3347
3302
  const s = i.providerUserInfo !== void 0 ? on(i.providerUserInfo) : [], a = !(i.email && i.passwordHash) && !(s != null && s.length), c = new H();
3348
3303
  c.updateFromIdToken(r);
3349
- const o = new w({
3304
+ const o = new I({
3350
3305
  uid: i.localId,
3351
3306
  auth: e,
3352
3307
  stsTokenManager: c,
3353
3308
  isAnonymous: a
3354
- }), u = {
3309
+ }), l = {
3355
3310
  uid: i.localId,
3356
3311
  displayName: i.displayName || null,
3357
3312
  photoURL: i.photoUrl || null,
@@ -3360,10 +3315,10 @@ class w {
3360
3315
  phoneNumber: i.phoneNumber || null,
3361
3316
  tenantId: i.tenantId || null,
3362
3317
  providerData: s,
3363
- metadata: new Ve(i.createdAt, i.lastLoginAt),
3318
+ metadata: new He(i.createdAt, i.lastLoginAt),
3364
3319
  isAnonymous: !(i.email && i.passwordHash) && !(s != null && s.length)
3365
3320
  };
3366
- return Object.assign(o, u), o;
3321
+ return Object.assign(o, l), o;
3367
3322
  }
3368
3323
  }
3369
3324
  /**
@@ -3382,11 +3337,11 @@ class w {
3382
3337
  * See the License for the specific language governing permissions and
3383
3338
  * limitations under the License.
3384
3339
  */
3385
- const vt = /* @__PURE__ */ new Map();
3386
- function E(n) {
3387
- k(n instanceof Function, "Expected a class definition");
3388
- let e = vt.get(n);
3389
- return e ? (k(e instanceof n, "Instance stored in cache mismatched with class"), e) : (e = new n(), vt.set(n, e), e);
3340
+ const yt = /* @__PURE__ */ new Map();
3341
+ function w(n) {
3342
+ S(n instanceof Function, "Expected a class definition");
3343
+ let e = yt.get(n);
3344
+ return e ? (S(e instanceof n, "Instance stored in cache mismatched with class"), e) : (e = new n(), yt.set(n, e), e);
3390
3345
  }
3391
3346
  /**
3392
3347
  * @license
@@ -3427,7 +3382,7 @@ class cn {
3427
3382
  }
3428
3383
  }
3429
3384
  cn.type = "NONE";
3430
- const bt = cn;
3385
+ const vt = cn;
3431
3386
  /**
3432
3387
  * @license
3433
3388
  * Copyright 2019 Google LLC
@@ -3444,21 +3399,21 @@ const bt = cn;
3444
3399
  * See the License for the specific language governing permissions and
3445
3400
  * limitations under the License.
3446
3401
  */
3447
- function ae(n, e, t) {
3402
+ function oe(n, e, t) {
3448
3403
  return `firebase:${n}:${e}:${t}`;
3449
3404
  }
3450
3405
  class V {
3451
3406
  constructor(e, t, r) {
3452
3407
  this.persistence = e, this.auth = t, this.userKey = r;
3453
3408
  const { config: i, name: s } = this.auth;
3454
- this.fullUserKey = ae(this.userKey, i.apiKey, s), this.fullPersistenceKey = ae("persistence", i.apiKey, s), this.boundEventHandler = t._onStorageEvent.bind(t), this.persistence._addListener(this.fullUserKey, this.boundEventHandler);
3409
+ this.fullUserKey = oe(this.userKey, i.apiKey, s), this.fullPersistenceKey = oe("persistence", i.apiKey, s), this.boundEventHandler = t._onStorageEvent.bind(t), this.persistence._addListener(this.fullUserKey, this.boundEventHandler);
3455
3410
  }
3456
3411
  setCurrentUser(e) {
3457
3412
  return this.persistence._set(this.fullUserKey, e.toJSON());
3458
3413
  }
3459
3414
  async getCurrentUser() {
3460
3415
  const e = await this.persistence._get(this.fullUserKey);
3461
- return e ? w._fromJSON(this.auth, e) : null;
3416
+ return e ? I._fromJSON(this.auth, e) : null;
3462
3417
  }
3463
3418
  removeCurrentUser() {
3464
3419
  return this.persistence._remove(this.fullUserKey);
@@ -3478,29 +3433,29 @@ class V {
3478
3433
  }
3479
3434
  static async create(e, t, r = "authUser") {
3480
3435
  if (!t.length)
3481
- return new V(E(bt), e, r);
3482
- const i = (await Promise.all(t.map(async (u) => {
3483
- if (await u._isAvailable())
3484
- return u;
3485
- }))).filter((u) => u);
3486
- let s = i[0] || E(bt);
3487
- const a = ae(r, e.config.apiKey, e.name);
3436
+ return new V(w(vt), e, r);
3437
+ const i = (await Promise.all(t.map(async (l) => {
3438
+ if (await l._isAvailable())
3439
+ return l;
3440
+ }))).filter((l) => l);
3441
+ let s = i[0] || w(vt);
3442
+ const a = oe(r, e.config.apiKey, e.name);
3488
3443
  let c = null;
3489
- for (const u of t)
3444
+ for (const l of t)
3490
3445
  try {
3491
- const l = await u._get(a);
3492
- if (l) {
3493
- const d = w._fromJSON(e, l);
3494
- u !== s && (c = d), s = u;
3446
+ const u = await l._get(a);
3447
+ if (u) {
3448
+ const d = I._fromJSON(e, u);
3449
+ l !== s && (c = d), s = l;
3495
3450
  break;
3496
3451
  }
3497
3452
  } catch {
3498
3453
  }
3499
- const o = i.filter((u) => u._shouldAllowMigration);
3500
- return !s._shouldAllowMigration || !o.length ? new V(s, e, r) : (s = o[0], c && await s._set(a, c.toJSON()), await Promise.all(t.map(async (u) => {
3501
- if (u !== s)
3454
+ const o = i.filter((l) => l._shouldAllowMigration);
3455
+ return !s._shouldAllowMigration || !o.length ? new V(s, e, r) : (s = o[0], c && await s._set(a, c.toJSON()), await Promise.all(t.map(async (l) => {
3456
+ if (l !== s)
3502
3457
  try {
3503
- await u._remove(a);
3458
+ await l._remove(a);
3504
3459
  } catch {
3505
3460
  }
3506
3461
  })), new V(s, e, r));
@@ -3522,7 +3477,7 @@ class V {
3522
3477
  * See the License for the specific language governing permissions and
3523
3478
  * limitations under the License.
3524
3479
  */
3525
- function It(n) {
3480
+ function bt(n) {
3526
3481
  const e = n.toLowerCase();
3527
3482
  if (e.includes("opera/") || e.includes("opr/") || e.includes("opios/"))
3528
3483
  return "Opera";
@@ -3553,40 +3508,40 @@ function It(n) {
3553
3508
  }
3554
3509
  return "Other";
3555
3510
  }
3556
- function ln(n = m()) {
3511
+ function ln(n = g()) {
3557
3512
  return /firefox\//i.test(n);
3558
3513
  }
3559
- function un(n = m()) {
3514
+ function un(n = g()) {
3560
3515
  const e = n.toLowerCase();
3561
3516
  return e.includes("safari/") && !e.includes("chrome/") && !e.includes("crios/") && !e.includes("android");
3562
3517
  }
3563
- function dn(n = m()) {
3518
+ function dn(n = g()) {
3564
3519
  return /crios\//i.test(n);
3565
3520
  }
3566
- function hn(n = m()) {
3521
+ function hn(n = g()) {
3567
3522
  return /iemobile/i.test(n);
3568
3523
  }
3569
- function fn(n = m()) {
3524
+ function fn(n = g()) {
3570
3525
  return /android/i.test(n);
3571
3526
  }
3572
- function pn(n = m()) {
3527
+ function pn(n = g()) {
3573
3528
  return /blackberry/i.test(n);
3574
3529
  }
3575
- function mn(n = m()) {
3530
+ function mn(n = g()) {
3576
3531
  return /webos/i.test(n);
3577
3532
  }
3578
- function Xe(n = m()) {
3533
+ function Ye(n = g()) {
3579
3534
  return /iphone|ipad|ipod/i.test(n) || /macintosh/i.test(n) && /mobile/i.test(n);
3580
3535
  }
3581
- function qi(n = m()) {
3536
+ function Ki(n = g()) {
3582
3537
  var e;
3583
- return Xe(n) && !!(!((e = window.navigator) === null || e === void 0) && e.standalone);
3538
+ return Ye(n) && !!(!((e = window.navigator) === null || e === void 0) && e.standalone);
3584
3539
  }
3585
- function Ki() {
3586
- return dr() && document.documentMode === 10;
3540
+ function Ji() {
3541
+ return hr() && document.documentMode === 10;
3587
3542
  }
3588
- function gn(n = m()) {
3589
- return Xe(n) || fn(n) || mn(n) || pn(n) || /windows phone/i.test(n) || hn(n);
3543
+ function gn(n = g()) {
3544
+ return Ye(n) || fn(n) || mn(n) || pn(n) || /windows phone/i.test(n) || hn(n);
3590
3545
  }
3591
3546
  /**
3592
3547
  * @license
@@ -3608,16 +3563,16 @@ function _n(n, e = []) {
3608
3563
  let t;
3609
3564
  switch (n) {
3610
3565
  case "Browser":
3611
- t = It(m());
3566
+ t = bt(g());
3612
3567
  break;
3613
3568
  case "Worker":
3614
- t = `${It(m())}-${n}`;
3569
+ t = `${bt(g())}-${n}`;
3615
3570
  break;
3616
3571
  default:
3617
3572
  t = n;
3618
3573
  }
3619
3574
  const r = e.length ? e.join(",") : "FirebaseCore-web";
3620
- return `${t}/JsCore/${ee}/${r}`;
3575
+ return `${t}/JsCore/${te}/${r}`;
3621
3576
  }
3622
3577
  /**
3623
3578
  * @license
@@ -3635,7 +3590,7 @@ function _n(n, e = []) {
3635
3590
  * See the License for the specific language governing permissions and
3636
3591
  * limitations under the License.
3637
3592
  */
3638
- class Ji {
3593
+ class Yi {
3639
3594
  constructor(e) {
3640
3595
  this.auth = e, this.queue = [];
3641
3596
  }
@@ -3690,8 +3645,8 @@ class Ji {
3690
3645
  * See the License for the specific language governing permissions and
3691
3646
  * limitations under the License.
3692
3647
  */
3693
- async function Yi(n, e = {}) {
3694
- return G(n, "GET", "/v2/passwordPolicy", ve(n, e));
3648
+ async function Xi(n, e = {}) {
3649
+ return G(n, "GET", "/v2/passwordPolicy", ye(n, e));
3695
3650
  }
3696
3651
  /**
3697
3652
  * @license
@@ -3709,12 +3664,12 @@ async function Yi(n, e = {}) {
3709
3664
  * See the License for the specific language governing permissions and
3710
3665
  * limitations under the License.
3711
3666
  */
3712
- const Xi = 6;
3713
- class Qi {
3667
+ const Qi = 6;
3668
+ class Zi {
3714
3669
  constructor(e) {
3715
3670
  var t, r, i, s;
3716
3671
  const a = e.customStrengthOptions;
3717
- this.customStrengthOptions = {}, this.customStrengthOptions.minPasswordLength = (t = a.minPasswordLength) !== null && t !== void 0 ? t : Xi, 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;
3672
+ 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;
3718
3673
  }
3719
3674
  validatePassword(e) {
3720
3675
  var t, r, i, s, a, c;
@@ -3797,12 +3752,12 @@ class Qi {
3797
3752
  * See the License for the specific language governing permissions and
3798
3753
  * limitations under the License.
3799
3754
  */
3800
- class Zi {
3755
+ class es {
3801
3756
  constructor(e, t, r, i) {
3802
- this.app = e, this.heartbeatServiceProvider = t, this.appCheckServiceProvider = r, this.config = i, this.currentUser = null, this.emulatorConfig = null, this.operations = Promise.resolve(), this.authStateSubscription = new wt(this), this.idTokenSubscription = new wt(this), this.beforeStateQueue = new Ji(this), this.redirectUser = null, this.isProactiveRefreshEnabled = !1, this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION = 1, this._canInitEmulator = !0, this._isInitialized = !1, this._deleted = !1, this._initializationPromise = null, this._popupRedirectResolver = null, this._errorFactory = Zt, this._agentRecaptchaConfig = null, this._tenantRecaptchaConfigs = {}, this._projectPasswordPolicy = null, this._tenantPasswordPolicies = {}, this.lastNotifiedUid = void 0, this.languageCode = null, this.tenantId = null, this.settings = { appVerificationDisabledForTesting: !1 }, this.frameworks = [], this.name = e.name, this.clientVersion = i.sdkClientVersion;
3757
+ 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 = Zt, this._agentRecaptchaConfig = null, this._tenantRecaptchaConfigs = {}, this._projectPasswordPolicy = null, this._tenantPasswordPolicies = {}, this.lastNotifiedUid = void 0, this.languageCode = null, this.tenantId = null, this.settings = { appVerificationDisabledForTesting: !1 }, this.frameworks = [], this.name = e.name, this.clientVersion = i.sdkClientVersion;
3803
3758
  }
3804
3759
  _initializeWithPersistence(e, t) {
3805
- return t && (this._popupRedirectResolver = E(t)), this._initializationPromise = this.queue(async () => {
3760
+ return t && (this._popupRedirectResolver = w(t)), this._initializationPromise = this.queue(async () => {
3806
3761
  var r, i;
3807
3762
  if (!this._deleted && (this.persistenceManager = await V.create(this, e), !this._deleted)) {
3808
3763
  if (!((r = this._popupRedirectResolver) === null || r === void 0) && r._shouldInitProactively)
@@ -3835,7 +3790,7 @@ class Zi {
3835
3790
  }
3836
3791
  async initializeCurrentUserFromIdToken(e) {
3837
3792
  try {
3838
- const t = await an(this, { idToken: e }), r = await w._fromGetAccountInfoResponse(this, t, e);
3793
+ const t = await an(this, { idToken: e }), r = await I._fromGetAccountInfoResponse(this, t, e);
3839
3794
  await this.directlySetCurrentUser(r);
3840
3795
  } catch (t) {
3841
3796
  console.warn("FirebaseServerApp could not login user with provided authIdToken: ", t), await this.directlySetCurrentUser(null);
@@ -3843,7 +3798,7 @@ class Zi {
3843
3798
  }
3844
3799
  async initializeCurrentUser(e) {
3845
3800
  var t;
3846
- if (b(this.app)) {
3801
+ if (v(this.app)) {
3847
3802
  const a = this.app.settings.authIdToken;
3848
3803
  return a ? new Promise((c) => {
3849
3804
  setTimeout(() => this.initializeCurrentUserFromIdToken(a).then(c, c));
@@ -3885,7 +3840,7 @@ class Zi {
3885
3840
  }
3886
3841
  async reloadAndSetCurrentUserOrClear(e) {
3887
3842
  try {
3888
- await me(e);
3843
+ await pe(e);
3889
3844
  } catch (t) {
3890
3845
  if ((t == null ? void 0 : t.code) !== "auth/network-request-failed")
3891
3846
  return this.directlySetCurrentUser(null);
@@ -3893,14 +3848,14 @@ class Zi {
3893
3848
  return this.directlySetCurrentUser(e);
3894
3849
  }
3895
3850
  useDeviceLanguage() {
3896
- this.languageCode = Mi();
3851
+ this.languageCode = Ui();
3897
3852
  }
3898
3853
  async _delete() {
3899
3854
  this._deleted = !0;
3900
3855
  }
3901
3856
  async updateCurrentUser(e) {
3902
- if (b(this.app))
3903
- return Promise.reject(L(this));
3857
+ if (v(this.app))
3858
+ return Promise.reject(N(this));
3904
3859
  const t = e ? z(e) : null;
3905
3860
  return t && h(
3906
3861
  t.auth.config.apiKey === this.config.apiKey,
@@ -3921,15 +3876,15 @@ class Zi {
3921
3876
  });
3922
3877
  }
3923
3878
  async signOut() {
3924
- return b(this.app) ? Promise.reject(L(this)) : (await this.beforeStateQueue.runMiddleware(null), (this.redirectPersistenceManager || this._popupRedirectResolver) && await this._setRedirectUser(null), this._updateCurrentUser(
3879
+ return v(this.app) ? Promise.reject(N(this)) : (await this.beforeStateQueue.runMiddleware(null), (this.redirectPersistenceManager || this._popupRedirectResolver) && await this._setRedirectUser(null), this._updateCurrentUser(
3925
3880
  null,
3926
3881
  /* skipBeforeStateCallbacks */
3927
3882
  !0
3928
3883
  ));
3929
3884
  }
3930
3885
  setPersistence(e) {
3931
- return b(this.app) ? Promise.reject(L(this)) : this.queue(async () => {
3932
- await this.assertedPersistence.setPersistence(E(e));
3886
+ return v(this.app) ? Promise.reject(N(this)) : this.queue(async () => {
3887
+ await this.assertedPersistence.setPersistence(w(e));
3933
3888
  });
3934
3889
  }
3935
3890
  _getRecaptchaConfig() {
@@ -3944,14 +3899,14 @@ class Zi {
3944
3899
  return this.tenantId === null ? this._projectPasswordPolicy : this._tenantPasswordPolicies[this.tenantId];
3945
3900
  }
3946
3901
  async _updatePasswordPolicy() {
3947
- const e = await Yi(this), t = new Qi(e);
3902
+ const e = await Xi(this), t = new Zi(e);
3948
3903
  this.tenantId === null ? this._projectPasswordPolicy = t : this._tenantPasswordPolicies[this.tenantId] = t;
3949
3904
  }
3950
3905
  _getPersistence() {
3951
3906
  return this.assertedPersistence.persistence.type;
3952
3907
  }
3953
3908
  _updateErrorMap(e) {
3954
- this._errorFactory = new Q("auth", "Firebase", e());
3909
+ this._errorFactory = new Z("auth", "Firebase", e());
3955
3910
  }
3956
3911
  onAuthStateChanged(e, t, r) {
3957
3912
  return this.registerStateListener(this.authStateSubscription, e, t, r);
@@ -3984,7 +3939,7 @@ class Zi {
3984
3939
  token: e,
3985
3940
  idToken: t
3986
3941
  };
3987
- this.tenantId != null && (r.tenantId = this.tenantId), await Gi(this, r);
3942
+ this.tenantId != null && (r.tenantId = this.tenantId), await qi(this, r);
3988
3943
  }
3989
3944
  }
3990
3945
  toJSON() {
@@ -4002,7 +3957,7 @@ class Zi {
4002
3957
  }
4003
3958
  async getOrInitRedirectPersistenceManager(e) {
4004
3959
  if (!this.redirectPersistenceManager) {
4005
- const t = e && E(e) || this._popupRedirectResolver;
3960
+ const t = e && w(e) || this._popupRedirectResolver;
4006
3961
  h(
4007
3962
  t,
4008
3963
  this,
@@ -4010,7 +3965,7 @@ class Zi {
4010
3965
  /* AuthErrorCode.ARGUMENT_ERROR */
4011
3966
  ), this.redirectPersistenceManager = await V.create(
4012
3967
  this,
4013
- [E(t._redirectPersistence)],
3968
+ [w(t._redirectPersistence)],
4014
3969
  "redirectUser"
4015
3970
  /* KeyName.REDIRECT_USER */
4016
3971
  ), this.redirectUser = await this.redirectPersistenceManager.getCurrentUser();
@@ -4127,15 +4082,15 @@ class Zi {
4127
4082
  async _getAppCheckToken() {
4128
4083
  var e;
4129
4084
  const t = await ((e = this.appCheckServiceProvider.getImmediate({ optional: !0 })) === null || e === void 0 ? void 0 : e.getToken());
4130
- return t != null && t.error && Di(`Error while retrieving App Check token: ${t.error}`), t == null ? void 0 : t.token;
4085
+ return t != null && t.error && Ni(`Error while retrieving App Check token: ${t.error}`), t == null ? void 0 : t.token;
4131
4086
  }
4132
4087
  }
4133
- function be(n) {
4088
+ function ve(n) {
4134
4089
  return z(n);
4135
4090
  }
4136
- class wt {
4091
+ class It {
4137
4092
  constructor(e) {
4138
- this.auth = e, this.observer = null, this.addObserver = yr((t) => this.observer = t);
4093
+ this.auth = e, this.observer = null, this.addObserver = vr((t) => this.observer = t);
4139
4094
  }
4140
4095
  get next() {
4141
4096
  return h(
@@ -4162,7 +4117,7 @@ class wt {
4162
4117
  * See the License for the specific language governing permissions and
4163
4118
  * limitations under the License.
4164
4119
  */
4165
- let Qe = {
4120
+ let Xe = {
4166
4121
  async loadJS() {
4167
4122
  throw new Error("Unable to load external scripts");
4168
4123
  },
@@ -4170,16 +4125,16 @@ let Qe = {
4170
4125
  recaptchaEnterpriseScript: "",
4171
4126
  gapiScript: ""
4172
4127
  };
4173
- function es(n) {
4174
- Qe = n;
4175
- }
4176
4128
  function ts(n) {
4177
- return Qe.loadJS(n);
4129
+ Xe = n;
4130
+ }
4131
+ function ns(n) {
4132
+ return Xe.loadJS(n);
4178
4133
  }
4179
- function ns() {
4180
- return Qe.gapiScript;
4134
+ function rs() {
4135
+ return Xe.gapiScript;
4181
4136
  }
4182
- function rs(n) {
4137
+ function is(n) {
4183
4138
  return `__${n}${Math.floor(Math.random() * 1e6)}`;
4184
4139
  }
4185
4140
  /**
@@ -4198,13 +4153,13 @@ function rs(n) {
4198
4153
  * See the License for the specific language governing permissions and
4199
4154
  * limitations under the License.
4200
4155
  */
4201
- function is(n, e) {
4156
+ function ss(n, e) {
4202
4157
  const t = Kt(n, "auth");
4203
4158
  if (t.isInitialized()) {
4204
4159
  const i = t.getImmediate(), s = t.getOptions();
4205
- if (he(s, e ?? {}))
4160
+ if (de(s, e ?? {}))
4206
4161
  return i;
4207
- S(
4162
+ T(
4208
4163
  i,
4209
4164
  "already-initialized"
4210
4165
  /* AuthErrorCode.ALREADY_INITIALIZED */
@@ -4212,12 +4167,12 @@ function is(n, e) {
4212
4167
  }
4213
4168
  return t.initialize({ options: e });
4214
4169
  }
4215
- function ss(n, e) {
4216
- const t = (e == null ? void 0 : e.persistence) || [], r = (Array.isArray(t) ? t : [t]).map(E);
4170
+ function as(n, e) {
4171
+ const t = (e == null ? void 0 : e.persistence) || [], r = (Array.isArray(t) ? t : [t]).map(w);
4217
4172
  e != null && e.errorMap && n._updateErrorMap(e.errorMap), n._initializeWithPersistence(r, e == null ? void 0 : e.popupRedirectResolver);
4218
4173
  }
4219
- function as(n, e, t) {
4220
- const r = be(n);
4174
+ function os(n, e, t) {
4175
+ const r = ve(n);
4221
4176
  h(
4222
4177
  r._canInitEmulator,
4223
4178
  r,
@@ -4229,38 +4184,38 @@ function as(n, e, t) {
4229
4184
  "invalid-emulator-scheme"
4230
4185
  /* AuthErrorCode.INVALID_EMULATOR_SCHEME */
4231
4186
  );
4232
- const i = !1, s = yn(e), { host: a, port: c } = os(e), o = c === null ? "" : `:${c}`;
4187
+ const i = !1, s = yn(e), { host: a, port: c } = cs(e), o = c === null ? "" : `:${c}`;
4233
4188
  r.config.emulator = { url: `${s}//${a}${o}/` }, r.settings.appVerificationDisabledForTesting = !0, r.emulatorConfig = Object.freeze({
4234
4189
  host: a,
4235
4190
  port: c,
4236
4191
  protocol: s.replace(":", ""),
4237
4192
  options: Object.freeze({ disableWarnings: i })
4238
- }), cs();
4193
+ }), ls();
4239
4194
  }
4240
4195
  function yn(n) {
4241
4196
  const e = n.indexOf(":");
4242
4197
  return e < 0 ? "" : n.substr(0, e + 1);
4243
4198
  }
4244
- function os(n) {
4199
+ function cs(n) {
4245
4200
  const e = yn(n), t = /(\/\/)?([^?#/]+)/.exec(n.substr(e.length));
4246
4201
  if (!t)
4247
4202
  return { host: "", port: null };
4248
4203
  const r = t[2].split("@").pop() || "", i = /^(\[[^\]]+\])(:|$)/.exec(r);
4249
4204
  if (i) {
4250
4205
  const s = i[1];
4251
- return { host: s, port: Et(r.substr(s.length + 1)) };
4206
+ return { host: s, port: wt(r.substr(s.length + 1)) };
4252
4207
  } else {
4253
4208
  const [s, a] = r.split(":");
4254
- return { host: s, port: Et(a) };
4209
+ return { host: s, port: wt(a) };
4255
4210
  }
4256
4211
  }
4257
- function Et(n) {
4212
+ function wt(n) {
4258
4213
  if (!n)
4259
4214
  return null;
4260
4215
  const e = Number(n);
4261
4216
  return isNaN(e) ? null : e;
4262
4217
  }
4263
- function cs() {
4218
+ function ls() {
4264
4219
  function n() {
4265
4220
  const e = document.createElement("p"), t = e.style;
4266
4221
  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);
@@ -4294,19 +4249,19 @@ class vn {
4294
4249
  * @returns a JSON-serializable representation of this object.
4295
4250
  */
4296
4251
  toJSON() {
4297
- return I("not implemented");
4252
+ return b("not implemented");
4298
4253
  }
4299
4254
  /** @internal */
4300
4255
  _getIdTokenResponse(e) {
4301
- return I("not implemented");
4256
+ return b("not implemented");
4302
4257
  }
4303
4258
  /** @internal */
4304
4259
  _linkToIdToken(e, t) {
4305
- return I("not implemented");
4260
+ return b("not implemented");
4306
4261
  }
4307
4262
  /** @internal */
4308
4263
  _getReauthenticationResolver(e) {
4309
- return I("not implemented");
4264
+ return b("not implemented");
4310
4265
  }
4311
4266
  }
4312
4267
  /**
@@ -4326,7 +4281,7 @@ class vn {
4326
4281
  * limitations under the License.
4327
4282
  */
4328
4283
  async function j(n, e) {
4329
- return rn(n, "POST", "/v1/accounts:signInWithIdp", ve(n, e));
4284
+ return rn(n, "POST", "/v1/accounts:signInWithIdp", ye(n, e));
4330
4285
  }
4331
4286
  /**
4332
4287
  * @license
@@ -4344,15 +4299,15 @@ async function j(n, e) {
4344
4299
  * See the License for the specific language governing permissions and
4345
4300
  * limitations under the License.
4346
4301
  */
4347
- const ls = "http://localhost";
4348
- class x extends vn {
4302
+ const us = "http://localhost";
4303
+ class U extends vn {
4349
4304
  constructor() {
4350
4305
  super(...arguments), this.pendingToken = null;
4351
4306
  }
4352
4307
  /** @internal */
4353
4308
  static _fromParams(e) {
4354
- const t = new x(e.providerId, e.signInMethod);
4355
- return e.idToken || e.accessToken ? (e.idToken && (t.idToken = e.idToken), e.accessToken && (t.accessToken = e.accessToken), e.nonce && !e.pendingToken && (t.nonce = e.nonce), e.pendingToken && (t.pendingToken = e.pendingToken)) : e.oauthToken && e.oauthTokenSecret ? (t.accessToken = e.oauthToken, t.secret = e.oauthTokenSecret) : S(
4309
+ const t = new U(e.providerId, e.signInMethod);
4310
+ return e.idToken || e.accessToken ? (e.idToken && (t.idToken = e.idToken), e.accessToken && (t.accessToken = e.accessToken), e.nonce && !e.pendingToken && (t.nonce = e.nonce), e.pendingToken && (t.pendingToken = e.pendingToken)) : e.oauthToken && e.oauthTokenSecret ? (t.accessToken = e.oauthToken, t.secret = e.oauthTokenSecret) : T(
4356
4311
  "argument-error"
4357
4312
  /* AuthErrorCode.ARGUMENT_ERROR */
4358
4313
  ), t;
@@ -4379,10 +4334,10 @@ class x extends vn {
4379
4334
  * @returns If the JSON input does not represent an {@link AuthCredential}, null is returned.
4380
4335
  */
4381
4336
  static fromJSON(e) {
4382
- const t = typeof e == "string" ? JSON.parse(e) : e, { providerId: r, signInMethod: i } = t, s = qe(t, ["providerId", "signInMethod"]);
4337
+ const t = typeof e == "string" ? JSON.parse(e) : e, { providerId: r, signInMethod: i } = t, s = Ge(t, ["providerId", "signInMethod"]);
4383
4338
  if (!r || !i)
4384
4339
  return null;
4385
- const a = new x(r, i);
4340
+ const a = new U(r, i);
4386
4341
  return a.idToken = s.idToken || void 0, a.accessToken = s.accessToken || void 0, a.secret = s.secret, a.nonce = s.nonce, a.pendingToken = s.pendingToken || null, a;
4387
4342
  }
4388
4343
  /** @internal */
@@ -4402,14 +4357,14 @@ class x extends vn {
4402
4357
  }
4403
4358
  buildRequest() {
4404
4359
  const e = {
4405
- requestUri: ls,
4360
+ requestUri: us,
4406
4361
  returnSecureToken: !0
4407
4362
  };
4408
4363
  if (this.pendingToken)
4409
4364
  e.pendingToken = this.pendingToken;
4410
4365
  else {
4411
4366
  const t = {};
4412
- this.idToken && (t.id_token = this.idToken), this.accessToken && (t.access_token = this.accessToken), this.secret && (t.oauth_token_secret = this.secret), t.providerId = this.providerId, this.nonce && !this.pendingToken && (t.nonce = this.nonce), e.postBody = Z(t);
4367
+ this.idToken && (t.id_token = this.idToken), this.accessToken && (t.access_token = this.accessToken), this.secret && (t.oauth_token_secret = this.secret), t.providerId = this.providerId, this.nonce && !this.pendingToken && (t.nonce = this.nonce), e.postBody = ee(t);
4413
4368
  }
4414
4369
  return e;
4415
4370
  }
@@ -4483,7 +4438,7 @@ class bn {
4483
4438
  * See the License for the specific language governing permissions and
4484
4439
  * limitations under the License.
4485
4440
  */
4486
- class ne extends bn {
4441
+ class re extends bn {
4487
4442
  constructor() {
4488
4443
  super(...arguments), this.scopes = [];
4489
4444
  }
@@ -4518,7 +4473,7 @@ class ne extends bn {
4518
4473
  * See the License for the specific language governing permissions and
4519
4474
  * limitations under the License.
4520
4475
  */
4521
- class R extends ne {
4476
+ class A extends re {
4522
4477
  constructor() {
4523
4478
  super(
4524
4479
  "facebook.com"
@@ -4538,9 +4493,9 @@ class R extends ne {
4538
4493
  * @param accessToken - Facebook access token.
4539
4494
  */
4540
4495
  static credential(e) {
4541
- return x._fromParams({
4542
- providerId: R.PROVIDER_ID,
4543
- signInMethod: R.FACEBOOK_SIGN_IN_METHOD,
4496
+ return U._fromParams({
4497
+ providerId: A.PROVIDER_ID,
4498
+ signInMethod: A.FACEBOOK_SIGN_IN_METHOD,
4544
4499
  accessToken: e
4545
4500
  });
4546
4501
  }
@@ -4550,7 +4505,7 @@ class R extends ne {
4550
4505
  * @param userCredential - The user credential.
4551
4506
  */
4552
4507
  static credentialFromResult(e) {
4553
- return R.credentialFromTaggedObject(e);
4508
+ return A.credentialFromTaggedObject(e);
4554
4509
  }
4555
4510
  /**
4556
4511
  * Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was
@@ -4559,20 +4514,20 @@ class R extends ne {
4559
4514
  * @param userCredential - The user credential.
4560
4515
  */
4561
4516
  static credentialFromError(e) {
4562
- return R.credentialFromTaggedObject(e.customData || {});
4517
+ return A.credentialFromTaggedObject(e.customData || {});
4563
4518
  }
4564
4519
  static credentialFromTaggedObject({ _tokenResponse: e }) {
4565
4520
  if (!e || !("oauthAccessToken" in e) || !e.oauthAccessToken)
4566
4521
  return null;
4567
4522
  try {
4568
- return R.credential(e.oauthAccessToken);
4523
+ return A.credential(e.oauthAccessToken);
4569
4524
  } catch {
4570
4525
  return null;
4571
4526
  }
4572
4527
  }
4573
4528
  }
4574
- R.FACEBOOK_SIGN_IN_METHOD = "facebook.com";
4575
- R.PROVIDER_ID = "facebook.com";
4529
+ A.FACEBOOK_SIGN_IN_METHOD = "facebook.com";
4530
+ A.PROVIDER_ID = "facebook.com";
4576
4531
  /**
4577
4532
  * @license
4578
4533
  * Copyright 2020 Google LLC
@@ -4589,7 +4544,7 @@ R.PROVIDER_ID = "facebook.com";
4589
4544
  * See the License for the specific language governing permissions and
4590
4545
  * limitations under the License.
4591
4546
  */
4592
- class C extends ne {
4547
+ class C extends re {
4593
4548
  constructor() {
4594
4549
  super(
4595
4550
  "google.com"
@@ -4610,7 +4565,7 @@ class C extends ne {
4610
4565
  * @param accessToken - Google access token.
4611
4566
  */
4612
4567
  static credential(e, t) {
4613
- return x._fromParams({
4568
+ return U._fromParams({
4614
4569
  providerId: C.PROVIDER_ID,
4615
4570
  signInMethod: C.GOOGLE_SIGN_IN_METHOD,
4616
4571
  idToken: e,
@@ -4665,7 +4620,7 @@ C.PROVIDER_ID = "google.com";
4665
4620
  * See the License for the specific language governing permissions and
4666
4621
  * limitations under the License.
4667
4622
  */
4668
- class P extends ne {
4623
+ class R extends re {
4669
4624
  constructor() {
4670
4625
  super(
4671
4626
  "github.com"
@@ -4678,9 +4633,9 @@ class P extends ne {
4678
4633
  * @param accessToken - GitHub access token.
4679
4634
  */
4680
4635
  static credential(e) {
4681
- return x._fromParams({
4682
- providerId: P.PROVIDER_ID,
4683
- signInMethod: P.GITHUB_SIGN_IN_METHOD,
4636
+ return U._fromParams({
4637
+ providerId: R.PROVIDER_ID,
4638
+ signInMethod: R.GITHUB_SIGN_IN_METHOD,
4684
4639
  accessToken: e
4685
4640
  });
4686
4641
  }
@@ -4690,7 +4645,7 @@ class P extends ne {
4690
4645
  * @param userCredential - The user credential.
4691
4646
  */
4692
4647
  static credentialFromResult(e) {
4693
- return P.credentialFromTaggedObject(e);
4648
+ return R.credentialFromTaggedObject(e);
4694
4649
  }
4695
4650
  /**
4696
4651
  * Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was
@@ -4699,20 +4654,20 @@ class P extends ne {
4699
4654
  * @param userCredential - The user credential.
4700
4655
  */
4701
4656
  static credentialFromError(e) {
4702
- return P.credentialFromTaggedObject(e.customData || {});
4657
+ return R.credentialFromTaggedObject(e.customData || {});
4703
4658
  }
4704
4659
  static credentialFromTaggedObject({ _tokenResponse: e }) {
4705
4660
  if (!e || !("oauthAccessToken" in e) || !e.oauthAccessToken)
4706
4661
  return null;
4707
4662
  try {
4708
- return P.credential(e.oauthAccessToken);
4663
+ return R.credential(e.oauthAccessToken);
4709
4664
  } catch {
4710
4665
  return null;
4711
4666
  }
4712
4667
  }
4713
4668
  }
4714
- P.GITHUB_SIGN_IN_METHOD = "github.com";
4715
- P.PROVIDER_ID = "github.com";
4669
+ R.GITHUB_SIGN_IN_METHOD = "github.com";
4670
+ R.PROVIDER_ID = "github.com";
4716
4671
  /**
4717
4672
  * @license
4718
4673
  * Copyright 2020 Google LLC
@@ -4729,7 +4684,7 @@ P.PROVIDER_ID = "github.com";
4729
4684
  * See the License for the specific language governing permissions and
4730
4685
  * limitations under the License.
4731
4686
  */
4732
- class O extends ne {
4687
+ class P extends re {
4733
4688
  constructor() {
4734
4689
  super(
4735
4690
  "twitter.com"
@@ -4743,9 +4698,9 @@ class O extends ne {
4743
4698
  * @param secret - Twitter secret.
4744
4699
  */
4745
4700
  static credential(e, t) {
4746
- return x._fromParams({
4747
- providerId: O.PROVIDER_ID,
4748
- signInMethod: O.TWITTER_SIGN_IN_METHOD,
4701
+ return U._fromParams({
4702
+ providerId: P.PROVIDER_ID,
4703
+ signInMethod: P.TWITTER_SIGN_IN_METHOD,
4749
4704
  oauthToken: e,
4750
4705
  oauthTokenSecret: t
4751
4706
  });
@@ -4756,7 +4711,7 @@ class O extends ne {
4756
4711
  * @param userCredential - The user credential.
4757
4712
  */
4758
4713
  static credentialFromResult(e) {
4759
- return O.credentialFromTaggedObject(e);
4714
+ return P.credentialFromTaggedObject(e);
4760
4715
  }
4761
4716
  /**
4762
4717
  * Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was
@@ -4765,7 +4720,7 @@ class O extends ne {
4765
4720
  * @param userCredential - The user credential.
4766
4721
  */
4767
4722
  static credentialFromError(e) {
4768
- return O.credentialFromTaggedObject(e.customData || {});
4723
+ return P.credentialFromTaggedObject(e.customData || {});
4769
4724
  }
4770
4725
  static credentialFromTaggedObject({ _tokenResponse: e }) {
4771
4726
  if (!e)
@@ -4774,14 +4729,14 @@ class O extends ne {
4774
4729
  if (!t || !r)
4775
4730
  return null;
4776
4731
  try {
4777
- return O.credential(t, r);
4732
+ return P.credential(t, r);
4778
4733
  } catch {
4779
4734
  return null;
4780
4735
  }
4781
4736
  }
4782
4737
  }
4783
- O.TWITTER_SIGN_IN_METHOD = "twitter.com";
4784
- O.PROVIDER_ID = "twitter.com";
4738
+ P.TWITTER_SIGN_IN_METHOD = "twitter.com";
4739
+ P.PROVIDER_ID = "twitter.com";
4785
4740
  /**
4786
4741
  * @license
4787
4742
  * Copyright 2020 Google LLC
@@ -4798,13 +4753,13 @@ O.PROVIDER_ID = "twitter.com";
4798
4753
  * See the License for the specific language governing permissions and
4799
4754
  * limitations under the License.
4800
4755
  */
4801
- class F {
4756
+ class x {
4802
4757
  constructor(e) {
4803
4758
  this.user = e.user, this.providerId = e.providerId, this._tokenResponse = e._tokenResponse, this.operationType = e.operationType;
4804
4759
  }
4805
4760
  static async _fromIdTokenResponse(e, t, r, i = !1) {
4806
- const s = await w._fromIdTokenResponse(e, r, i), a = Tt(r);
4807
- return new F({
4761
+ const s = await I._fromIdTokenResponse(e, r, i), a = Et(r);
4762
+ return new x({
4808
4763
  user: s,
4809
4764
  providerId: a,
4810
4765
  _tokenResponse: r,
@@ -4817,8 +4772,8 @@ class F {
4817
4772
  /* reload */
4818
4773
  !0
4819
4774
  );
4820
- const i = Tt(r);
4821
- return new F({
4775
+ const i = Et(r);
4776
+ return new x({
4822
4777
  user: e,
4823
4778
  providerId: i,
4824
4779
  _tokenResponse: r,
@@ -4826,7 +4781,7 @@ class F {
4826
4781
  });
4827
4782
  }
4828
4783
  }
4829
- function Tt(n) {
4784
+ function Et(n) {
4830
4785
  return n.providerId ? n.providerId : "phoneNumber" in n ? "phone" : null;
4831
4786
  }
4832
4787
  /**
@@ -4845,10 +4800,10 @@ function Tt(n) {
4845
4800
  * See the License for the specific language governing permissions and
4846
4801
  * limitations under the License.
4847
4802
  */
4848
- class ge extends M {
4803
+ class me extends L {
4849
4804
  constructor(e, t, r, i) {
4850
4805
  var s;
4851
- super(t.code, t.message), this.operationType = r, this.user = i, Object.setPrototypeOf(this, ge.prototype), this.customData = {
4806
+ super(t.code, t.message), this.operationType = r, this.user = i, Object.setPrototypeOf(this, me.prototype), this.customData = {
4852
4807
  appName: e.name,
4853
4808
  tenantId: (s = e.tenantId) !== null && s !== void 0 ? s : void 0,
4854
4809
  _serverResponse: t.customData._serverResponse,
@@ -4856,17 +4811,17 @@ class ge extends M {
4856
4811
  };
4857
4812
  }
4858
4813
  static _fromErrorAndOperation(e, t, r, i) {
4859
- return new ge(e, t, r, i);
4814
+ return new me(e, t, r, i);
4860
4815
  }
4861
4816
  }
4862
4817
  function In(n, e, t, r) {
4863
4818
  return (e === "reauthenticate" ? t._getReauthenticationResolver(n) : t._getIdTokenResponse(n)).catch((s) => {
4864
- throw s.code === "auth/multi-factor-auth-required" ? ge._fromErrorAndOperation(n, s, e, r) : s;
4819
+ throw s.code === "auth/multi-factor-auth-required" ? me._fromErrorAndOperation(n, s, e, r) : s;
4865
4820
  });
4866
4821
  }
4867
- async function us(n, e, t = !1) {
4868
- const r = await X(n, e._linkToIdToken(n.auth, await n.getIdToken()), t);
4869
- return F._forOperation(n, "link", r);
4822
+ async function ds(n, e, t = !1) {
4823
+ const r = await Q(n, e._linkToIdToken(n.auth, await n.getIdToken()), t);
4824
+ return x._forOperation(n, "link", r);
4870
4825
  }
4871
4826
  /**
4872
4827
  * @license
@@ -4884,20 +4839,20 @@ async function us(n, e, t = !1) {
4884
4839
  * See the License for the specific language governing permissions and
4885
4840
  * limitations under the License.
4886
4841
  */
4887
- async function ds(n, e, t = !1) {
4842
+ async function hs(n, e, t = !1) {
4888
4843
  const { auth: r } = n;
4889
- if (b(r.app))
4890
- return Promise.reject(L(r));
4844
+ if (v(r.app))
4845
+ return Promise.reject(N(r));
4891
4846
  const i = "reauthenticate";
4892
4847
  try {
4893
- const s = await X(n, In(r, i, e, n), t);
4848
+ const s = await Q(n, In(r, i, e, n), t);
4894
4849
  h(
4895
4850
  s.idToken,
4896
4851
  r,
4897
4852
  "internal-error"
4898
4853
  /* AuthErrorCode.INTERNAL_ERROR */
4899
4854
  );
4900
- const a = Ye(s.idToken);
4855
+ const a = Je(s.idToken);
4901
4856
  h(
4902
4857
  a,
4903
4858
  r,
@@ -4910,9 +4865,9 @@ async function ds(n, e, t = !1) {
4910
4865
  r,
4911
4866
  "user-mismatch"
4912
4867
  /* AuthErrorCode.USER_MISMATCH */
4913
- ), F._forOperation(n, i, s);
4868
+ ), x._forOperation(n, i, s);
4914
4869
  } catch (s) {
4915
- throw (s == null ? void 0 : s.code) === "auth/user-not-found" && S(
4870
+ throw (s == null ? void 0 : s.code) === "auth/user-not-found" && T(
4916
4871
  r,
4917
4872
  "user-mismatch"
4918
4873
  /* AuthErrorCode.USER_MISMATCH */
@@ -4935,10 +4890,10 @@ async function ds(n, e, t = !1) {
4935
4890
  * See the License for the specific language governing permissions and
4936
4891
  * limitations under the License.
4937
4892
  */
4938
- async function hs(n, e, t = !1) {
4939
- if (b(n.app))
4940
- return Promise.reject(L(n));
4941
- const r = "signIn", i = await In(n, r, e), s = await F._fromIdTokenResponse(n, r, i);
4893
+ async function fs(n, e, t = !1) {
4894
+ if (v(n.app))
4895
+ return Promise.reject(N(n));
4896
+ const r = "signIn", i = await In(n, r, e), s = await x._fromIdTokenResponse(n, r, i);
4942
4897
  return t || await n._updateCurrentUser(s.user), s;
4943
4898
  }
4944
4899
  /**
@@ -4957,8 +4912,8 @@ async function hs(n, e, t = !1) {
4957
4912
  * See the License for the specific language governing permissions and
4958
4913
  * limitations under the License.
4959
4914
  */
4960
- async function fs(n, e) {
4961
- return rn(n, "POST", "/v1/accounts:signInWithCustomToken", ve(n, e));
4915
+ async function ps(n, e) {
4916
+ return rn(n, "POST", "/v1/accounts:signInWithCustomToken", ye(n, e));
4962
4917
  }
4963
4918
  /**
4964
4919
  * @license
@@ -4976,22 +4931,22 @@ async function fs(n, e) {
4976
4931
  * See the License for the specific language governing permissions and
4977
4932
  * limitations under the License.
4978
4933
  */
4979
- async function ps(n, e) {
4980
- if (b(n.app))
4981
- return Promise.reject(L(n));
4982
- const t = be(n), r = await fs(t, {
4934
+ async function ms(n, e) {
4935
+ if (v(n.app))
4936
+ return Promise.reject(N(n));
4937
+ const t = ve(n), r = await ps(t, {
4983
4938
  token: e,
4984
4939
  returnSecureToken: !0
4985
- }), i = await F._fromIdTokenResponse(t, "signIn", r);
4940
+ }), i = await x._fromIdTokenResponse(t, "signIn", r);
4986
4941
  return await t._updateCurrentUser(i.user), i;
4987
4942
  }
4988
- function ms(n, e, t, r) {
4943
+ function gs(n, e, t, r) {
4989
4944
  return z(n).onIdTokenChanged(e, t, r);
4990
4945
  }
4991
- function gs(n, e, t) {
4946
+ function _s(n, e, t) {
4992
4947
  return z(n).beforeAuthStateChanged(e, t);
4993
4948
  }
4994
- const _e = "__sak";
4949
+ const ge = "__sak";
4995
4950
  /**
4996
4951
  * @license
4997
4952
  * Copyright 2019 Google LLC
@@ -5014,7 +4969,7 @@ class wn {
5014
4969
  }
5015
4970
  _isAvailable() {
5016
4971
  try {
5017
- return this.storage ? (this.storage.setItem(_e, "1"), this.storage.removeItem(_e), Promise.resolve(!0)) : Promise.resolve(!1);
4972
+ return this.storage ? (this.storage.setItem(ge, "1"), this.storage.removeItem(ge), Promise.resolve(!0)) : Promise.resolve(!1);
5018
4973
  } catch {
5019
4974
  return Promise.resolve(!1);
5020
4975
  }
@@ -5049,7 +5004,7 @@ class wn {
5049
5004
  * See the License for the specific language governing permissions and
5050
5005
  * limitations under the License.
5051
5006
  */
5052
- const _s = 1e3, ys = 10;
5007
+ const ys = 1e3, vs = 10;
5053
5008
  class En extends wn {
5054
5009
  constructor() {
5055
5010
  super(
@@ -5077,7 +5032,7 @@ class En extends wn {
5077
5032
  const a = this.storage.getItem(r);
5078
5033
  !t && this.localCache[r] === a || this.notifyListeners(r, a);
5079
5034
  }, s = this.storage.getItem(r);
5080
- Ki() && s !== e.newValue && e.newValue !== e.oldValue ? setTimeout(i, ys) : i();
5035
+ Ji() && s !== e.newValue && e.newValue !== e.oldValue ? setTimeout(i, vs) : i();
5081
5036
  }
5082
5037
  notifyListeners(e, t) {
5083
5038
  this.localCache[e] = t;
@@ -5099,7 +5054,7 @@ class En extends wn {
5099
5054
  !0
5100
5055
  );
5101
5056
  });
5102
- }, _s);
5057
+ }, ys);
5103
5058
  }
5104
5059
  stopPolling() {
5105
5060
  this.pollTimer && (clearInterval(this.pollTimer), this.pollTimer = null);
@@ -5129,7 +5084,7 @@ class En extends wn {
5129
5084
  }
5130
5085
  }
5131
5086
  En.type = "LOCAL";
5132
- const vs = En;
5087
+ const bs = En;
5133
5088
  /**
5134
5089
  * @license
5135
5090
  * Copyright 2020 Google LLC
@@ -5177,7 +5132,7 @@ const Sn = Tn;
5177
5132
  * See the License for the specific language governing permissions and
5178
5133
  * limitations under the License.
5179
5134
  */
5180
- function bs(n) {
5135
+ function Is(n) {
5181
5136
  return Promise.all(n.map(async (e) => {
5182
5137
  try {
5183
5138
  return {
@@ -5208,7 +5163,7 @@ function bs(n) {
5208
5163
  * See the License for the specific language governing permissions and
5209
5164
  * limitations under the License.
5210
5165
  */
5211
- class Ie {
5166
+ class be {
5212
5167
  constructor(e) {
5213
5168
  this.eventTarget = e, this.handlersMap = {}, this.boundEventHandler = this.handleEvent.bind(this);
5214
5169
  }
@@ -5222,7 +5177,7 @@ class Ie {
5222
5177
  const t = this.receivers.find((i) => i.isListeningto(e));
5223
5178
  if (t)
5224
5179
  return t;
5225
- const r = new Ie(e);
5180
+ const r = new be(e);
5226
5181
  return this.receivers.push(r), r;
5227
5182
  }
5228
5183
  isListeningto(e) {
@@ -5247,7 +5202,7 @@ class Ie {
5247
5202
  eventId: r,
5248
5203
  eventType: i
5249
5204
  });
5250
- const c = Array.from(a).map(async (u) => u(t.origin, s)), o = await bs(c);
5205
+ const c = Array.from(a).map(async (l) => l(t.origin, s)), o = await Is(c);
5251
5206
  t.ports[0].postMessage({
5252
5207
  status: "done",
5253
5208
  eventId: r,
@@ -5276,7 +5231,7 @@ class Ie {
5276
5231
  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);
5277
5232
  }
5278
5233
  }
5279
- Ie.receivers = [];
5234
+ be.receivers = [];
5280
5235
  /**
5281
5236
  * @license
5282
5237
  * Copyright 2020 Google LLC
@@ -5293,7 +5248,7 @@ Ie.receivers = [];
5293
5248
  * See the License for the specific language governing permissions and
5294
5249
  * limitations under the License.
5295
5250
  */
5296
- function Ze(n = "", e = 10) {
5251
+ function Qe(n = "", e = 10) {
5297
5252
  let t = "";
5298
5253
  for (let r = 0; r < e; r++)
5299
5254
  t += Math.floor(Math.random() * 10);
@@ -5315,7 +5270,7 @@ function Ze(n = "", e = 10) {
5315
5270
  * See the License for the specific language governing permissions and
5316
5271
  * limitations under the License.
5317
5272
  */
5318
- class Is {
5273
+ class ws {
5319
5274
  constructor(e) {
5320
5275
  this.target = e, this.handlers = /* @__PURE__ */ new Set();
5321
5276
  }
@@ -5349,9 +5304,9 @@ class Is {
5349
5304
  );
5350
5305
  let s, a;
5351
5306
  return new Promise((c, o) => {
5352
- const u = Ze("", 20);
5307
+ const l = Qe("", 20);
5353
5308
  i.port1.start();
5354
- const l = setTimeout(() => {
5309
+ const u = setTimeout(() => {
5355
5310
  o(new Error(
5356
5311
  "unsupported_event"
5357
5312
  /* _MessageError.UNSUPPORTED_EVENT */
@@ -5360,11 +5315,11 @@ class Is {
5360
5315
  a = {
5361
5316
  messageChannel: i,
5362
5317
  onMessage(d) {
5363
- const f = d;
5364
- if (f.data.eventId === u)
5365
- switch (f.data.status) {
5318
+ const p = d;
5319
+ if (p.data.eventId === l)
5320
+ switch (p.data.status) {
5366
5321
  case "ack":
5367
- clearTimeout(l), s = setTimeout(
5322
+ clearTimeout(u), s = setTimeout(
5368
5323
  () => {
5369
5324
  o(new Error(
5370
5325
  "timeout"
@@ -5376,10 +5331,10 @@ class Is {
5376
5331
  );
5377
5332
  break;
5378
5333
  case "done":
5379
- clearTimeout(s), c(f.data.response);
5334
+ clearTimeout(s), c(p.data.response);
5380
5335
  break;
5381
5336
  default:
5382
- clearTimeout(l), clearTimeout(s), o(new Error(
5337
+ clearTimeout(u), clearTimeout(s), o(new Error(
5383
5338
  "invalid_response"
5384
5339
  /* _MessageError.INVALID_RESPONSE */
5385
5340
  ));
@@ -5388,7 +5343,7 @@ class Is {
5388
5343
  }
5389
5344
  }, this.handlers.add(a), i.port1.addEventListener("message", a.onMessage), this.target.postMessage({
5390
5345
  eventType: e,
5391
- eventId: u,
5346
+ eventId: l,
5392
5347
  data: t
5393
5348
  }, [i.port2]);
5394
5349
  }).finally(() => {
@@ -5415,7 +5370,7 @@ class Is {
5415
5370
  function y() {
5416
5371
  return window;
5417
5372
  }
5418
- function ws(n) {
5373
+ function Es(n) {
5419
5374
  y().location.href = n;
5420
5375
  }
5421
5376
  /**
@@ -5437,7 +5392,7 @@ function ws(n) {
5437
5392
  function kn() {
5438
5393
  return typeof y().WorkerGlobalScope < "u" && typeof y().importScripts == "function";
5439
5394
  }
5440
- async function Es() {
5395
+ async function Ts() {
5441
5396
  if (!(navigator != null && navigator.serviceWorker))
5442
5397
  return null;
5443
5398
  try {
@@ -5446,11 +5401,11 @@ async function Es() {
5446
5401
  return null;
5447
5402
  }
5448
5403
  }
5449
- function Ts() {
5404
+ function Ss() {
5450
5405
  var n;
5451
5406
  return ((n = navigator == null ? void 0 : navigator.serviceWorker) === null || n === void 0 ? void 0 : n.controller) || null;
5452
5407
  }
5453
- function Ss() {
5408
+ function ks() {
5454
5409
  return kn() ? self : null;
5455
5410
  }
5456
5411
  /**
@@ -5469,8 +5424,8 @@ function Ss() {
5469
5424
  * See the License for the specific language governing permissions and
5470
5425
  * limitations under the License.
5471
5426
  */
5472
- const An = "firebaseLocalStorageDb", ks = 1, ye = "firebaseLocalStorage", Rn = "fbase_key";
5473
- class re {
5427
+ const An = "firebaseLocalStorageDb", As = 1, _e = "firebaseLocalStorage", Cn = "fbase_key";
5428
+ class ie {
5474
5429
  constructor(e) {
5475
5430
  this.request = e;
5476
5431
  }
@@ -5484,55 +5439,55 @@ class re {
5484
5439
  });
5485
5440
  }
5486
5441
  }
5487
- function we(n, e) {
5488
- return n.transaction([ye], e ? "readwrite" : "readonly").objectStore(ye);
5442
+ function Ie(n, e) {
5443
+ return n.transaction([_e], e ? "readwrite" : "readonly").objectStore(_e);
5489
5444
  }
5490
- function As() {
5445
+ function Cs() {
5491
5446
  const n = indexedDB.deleteDatabase(An);
5492
- return new re(n).toPromise();
5447
+ return new ie(n).toPromise();
5493
5448
  }
5494
- function je() {
5495
- const n = indexedDB.open(An, ks);
5449
+ function Ve() {
5450
+ const n = indexedDB.open(An, As);
5496
5451
  return new Promise((e, t) => {
5497
5452
  n.addEventListener("error", () => {
5498
5453
  t(n.error);
5499
5454
  }), n.addEventListener("upgradeneeded", () => {
5500
5455
  const r = n.result;
5501
5456
  try {
5502
- r.createObjectStore(ye, { keyPath: Rn });
5457
+ r.createObjectStore(_e, { keyPath: Cn });
5503
5458
  } catch (i) {
5504
5459
  t(i);
5505
5460
  }
5506
5461
  }), n.addEventListener("success", async () => {
5507
5462
  const r = n.result;
5508
- r.objectStoreNames.contains(ye) ? e(r) : (r.close(), await As(), e(await je()));
5463
+ r.objectStoreNames.contains(_e) ? e(r) : (r.close(), await Cs(), e(await Ve()));
5509
5464
  });
5510
5465
  });
5511
5466
  }
5512
- async function St(n, e, t) {
5513
- const r = we(n, !0).put({
5514
- [Rn]: e,
5467
+ async function Tt(n, e, t) {
5468
+ const r = Ie(n, !0).put({
5469
+ [Cn]: e,
5515
5470
  value: t
5516
5471
  });
5517
- return new re(r).toPromise();
5472
+ return new ie(r).toPromise();
5518
5473
  }
5519
5474
  async function Rs(n, e) {
5520
- const t = we(n, !1).get(e), r = await new re(t).toPromise();
5475
+ const t = Ie(n, !1).get(e), r = await new ie(t).toPromise();
5521
5476
  return r === void 0 ? null : r.value;
5522
5477
  }
5523
- function kt(n, e) {
5524
- const t = we(n, !0).delete(e);
5525
- return new re(t).toPromise();
5478
+ function St(n, e) {
5479
+ const t = Ie(n, !0).delete(e);
5480
+ return new ie(t).toPromise();
5526
5481
  }
5527
- const Cs = 800, Ps = 3;
5528
- class Cn {
5482
+ const Ps = 800, Os = 3;
5483
+ class Rn {
5529
5484
  constructor() {
5530
5485
  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(() => {
5531
5486
  }, () => {
5532
5487
  });
5533
5488
  }
5534
5489
  async _openDb() {
5535
- return this.db ? this.db : (this.db = await je(), this.db);
5490
+ return this.db ? this.db : (this.db = await Ve(), this.db);
5536
5491
  }
5537
5492
  async _withRetries(e) {
5538
5493
  let t = 0;
@@ -5541,7 +5496,7 @@ class Cn {
5541
5496
  const r = await this._openDb();
5542
5497
  return await e(r);
5543
5498
  } catch (r) {
5544
- if (t++ > Ps)
5499
+ if (t++ > Os)
5545
5500
  throw r;
5546
5501
  this.db && (this.db.close(), this.db = void 0);
5547
5502
  }
@@ -5557,7 +5512,7 @@ class Cn {
5557
5512
  * As the worker we should listen to events from the main window.
5558
5513
  */
5559
5514
  async initializeReceiver() {
5560
- this.receiver = Ie._getInstance(Ss()), this.receiver._subscribe("keyChanged", async (e, t) => ({
5515
+ this.receiver = be._getInstance(ks()), this.receiver._subscribe("keyChanged", async (e, t) => ({
5561
5516
  keyProcessed: (await this._poll()).includes(t.key)
5562
5517
  })), this.receiver._subscribe("ping", async (e, t) => [
5563
5518
  "keyChanged"
@@ -5573,9 +5528,9 @@ class Cn {
5573
5528
  */
5574
5529
  async initializeSender() {
5575
5530
  var e, t;
5576
- if (this.activeServiceWorker = await Es(), !this.activeServiceWorker)
5531
+ if (this.activeServiceWorker = await Ts(), !this.activeServiceWorker)
5577
5532
  return;
5578
- this.sender = new Is(this.activeServiceWorker);
5533
+ this.sender = new ws(this.activeServiceWorker);
5579
5534
  const r = await this.sender._send(
5580
5535
  "ping",
5581
5536
  {},
@@ -5597,7 +5552,7 @@ class Cn {
5597
5552
  * @param key - Storage key which changed.
5598
5553
  */
5599
5554
  async notifyServiceWorker(e) {
5600
- if (!(!this.sender || !this.activeServiceWorker || Ts() !== this.activeServiceWorker))
5555
+ if (!(!this.sender || !this.activeServiceWorker || Ss() !== this.activeServiceWorker))
5601
5556
  try {
5602
5557
  await this.sender._send(
5603
5558
  "keyChanged",
@@ -5613,8 +5568,8 @@ class Cn {
5613
5568
  try {
5614
5569
  if (!indexedDB)
5615
5570
  return !1;
5616
- const e = await je();
5617
- return await St(e, _e, "1"), await kt(e, _e), !0;
5571
+ const e = await Ve();
5572
+ return await Tt(e, ge, "1"), await St(e, ge), !0;
5618
5573
  } catch {
5619
5574
  }
5620
5575
  return !1;
@@ -5628,19 +5583,19 @@ class Cn {
5628
5583
  }
5629
5584
  }
5630
5585
  async _set(e, t) {
5631
- return this._withPendingWrite(async () => (await this._withRetries((r) => St(r, e, t)), this.localCache[e] = t, this.notifyServiceWorker(e)));
5586
+ return this._withPendingWrite(async () => (await this._withRetries((r) => Tt(r, e, t)), this.localCache[e] = t, this.notifyServiceWorker(e)));
5632
5587
  }
5633
5588
  async _get(e) {
5634
5589
  const t = await this._withRetries((r) => Rs(r, e));
5635
5590
  return this.localCache[e] = t, t;
5636
5591
  }
5637
5592
  async _remove(e) {
5638
- return this._withPendingWrite(async () => (await this._withRetries((t) => kt(t, e)), delete this.localCache[e], this.notifyServiceWorker(e)));
5593
+ return this._withPendingWrite(async () => (await this._withRetries((t) => St(t, e)), delete this.localCache[e], this.notifyServiceWorker(e)));
5639
5594
  }
5640
5595
  async _poll() {
5641
5596
  const e = await this._withRetries((i) => {
5642
- const s = we(i, !1).getAll();
5643
- return new re(s).toPromise();
5597
+ const s = Ie(i, !1).getAll();
5598
+ return new ie(s).toPromise();
5644
5599
  });
5645
5600
  if (!e)
5646
5601
  return [];
@@ -5662,7 +5617,7 @@ class Cn {
5662
5617
  i(t);
5663
5618
  }
5664
5619
  startPolling() {
5665
- this.stopPolling(), this.pollTimer = setInterval(async () => this._poll(), Cs);
5620
+ this.stopPolling(), this.pollTimer = setInterval(async () => this._poll(), Ps);
5666
5621
  }
5667
5622
  stopPolling() {
5668
5623
  this.pollTimer && (clearInterval(this.pollTimer), this.pollTimer = null);
@@ -5674,9 +5629,9 @@ class Cn {
5674
5629
  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();
5675
5630
  }
5676
5631
  }
5677
- Cn.type = "LOCAL";
5678
- const Os = Cn;
5679
- new te(3e4, 6e4);
5632
+ Rn.type = "LOCAL";
5633
+ const Ds = Rn;
5634
+ new ne(3e4, 6e4);
5680
5635
  /**
5681
5636
  * @license
5682
5637
  * Copyright 2021 Google LLC
@@ -5693,8 +5648,8 @@ new te(3e4, 6e4);
5693
5648
  * See the License for the specific language governing permissions and
5694
5649
  * limitations under the License.
5695
5650
  */
5696
- function Ds(n, e) {
5697
- return e ? E(e) : (h(
5651
+ function Ns(n, e) {
5652
+ return e ? w(e) : (h(
5698
5653
  n._popupRedirectResolver,
5699
5654
  n,
5700
5655
  "argument-error"
@@ -5717,7 +5672,7 @@ function Ds(n, e) {
5717
5672
  * See the License for the specific language governing permissions and
5718
5673
  * limitations under the License.
5719
5674
  */
5720
- class et extends vn {
5675
+ class Ze extends vn {
5721
5676
  constructor(e) {
5722
5677
  super(
5723
5678
  "custom",
@@ -5747,26 +5702,26 @@ class et extends vn {
5747
5702
  return e && (t.idToken = e), t;
5748
5703
  }
5749
5704
  }
5750
- function Ns(n) {
5751
- return hs(n.auth, new et(n), n.bypassAuthState);
5752
- }
5753
5705
  function Ls(n) {
5706
+ return fs(n.auth, new Ze(n), n.bypassAuthState);
5707
+ }
5708
+ function Ms(n) {
5754
5709
  const { auth: e, user: t } = n;
5755
5710
  return h(
5756
5711
  t,
5757
5712
  e,
5758
5713
  "internal-error"
5759
5714
  /* AuthErrorCode.INTERNAL_ERROR */
5760
- ), ds(t, new et(n), n.bypassAuthState);
5715
+ ), hs(t, new Ze(n), n.bypassAuthState);
5761
5716
  }
5762
- async function Ms(n) {
5717
+ async function Us(n) {
5763
5718
  const { auth: e, user: t } = n;
5764
5719
  return h(
5765
5720
  t,
5766
5721
  e,
5767
5722
  "internal-error"
5768
5723
  /* AuthErrorCode.INTERNAL_ERROR */
5769
- ), us(t, new et(n), n.bypassAuthState);
5724
+ ), ds(t, new Ze(n), n.bypassAuthState);
5770
5725
  }
5771
5726
  /**
5772
5727
  * @license
@@ -5815,8 +5770,8 @@ class Pn {
5815
5770
  };
5816
5771
  try {
5817
5772
  this.resolve(await this.getIdpTask(c)(o));
5818
- } catch (u) {
5819
- this.reject(u);
5773
+ } catch (l) {
5774
+ this.reject(l);
5820
5775
  }
5821
5776
  }
5822
5777
  onError(e) {
@@ -5826,15 +5781,15 @@ class Pn {
5826
5781
  switch (e) {
5827
5782
  case "signInViaPopup":
5828
5783
  case "signInViaRedirect":
5829
- return Ns;
5784
+ return Ls;
5830
5785
  case "linkViaPopup":
5831
5786
  case "linkViaRedirect":
5832
- return Ms;
5787
+ return Us;
5833
5788
  case "reauthViaPopup":
5834
5789
  case "reauthViaRedirect":
5835
- return Ls;
5790
+ return Ms;
5836
5791
  default:
5837
- S(
5792
+ T(
5838
5793
  this.auth,
5839
5794
  "internal-error"
5840
5795
  /* AuthErrorCode.INTERNAL_ERROR */
@@ -5842,10 +5797,10 @@ class Pn {
5842
5797
  }
5843
5798
  }
5844
5799
  resolve(e) {
5845
- k(this.pendingPromise, "Pending promise was never set"), this.pendingPromise.resolve(e), this.unregisterAndCleanUp();
5800
+ S(this.pendingPromise, "Pending promise was never set"), this.pendingPromise.resolve(e), this.unregisterAndCleanUp();
5846
5801
  }
5847
5802
  reject(e) {
5848
- k(this.pendingPromise, "Pending promise was never set"), this.pendingPromise.reject(e), this.unregisterAndCleanUp();
5803
+ S(this.pendingPromise, "Pending promise was never set"), this.pendingPromise.reject(e), this.unregisterAndCleanUp();
5849
5804
  }
5850
5805
  unregisterAndCleanUp() {
5851
5806
  this.eventManager && this.eventManager.unregisterConsumer(this), this.pendingPromise = null, this.cleanUp();
@@ -5867,7 +5822,7 @@ class Pn {
5867
5822
  * See the License for the specific language governing permissions and
5868
5823
  * limitations under the License.
5869
5824
  */
5870
- const Us = new te(2e3, 1e4);
5825
+ const xs = new ne(2e3, 1e4);
5871
5826
  class B extends Pn {
5872
5827
  constructor(e, t, r, i, s) {
5873
5828
  super(e, t, i, s), this.provider = r, this.authWindow = null, this.pollId = null, B.currentPopupAction && B.currentPopupAction.cancel(), B.currentPopupAction = this;
@@ -5882,8 +5837,8 @@ class B extends Pn {
5882
5837
  ), e;
5883
5838
  }
5884
5839
  async onExecution() {
5885
- k(this.filter.length === 1, "Popup operations only handle one event");
5886
- const e = Ze();
5840
+ S(this.filter.length === 1, "Popup operations only handle one event");
5841
+ const e = Qe();
5887
5842
  this.authWindow = await this.resolver._openPopup(
5888
5843
  this.auth,
5889
5844
  this.provider,
@@ -5931,7 +5886,7 @@ class B extends Pn {
5931
5886
  );
5932
5887
  return;
5933
5888
  }
5934
- this.pollId = window.setTimeout(e, Us.get());
5889
+ this.pollId = window.setTimeout(e, xs.get());
5935
5890
  };
5936
5891
  e();
5937
5892
  }
@@ -5953,8 +5908,8 @@ B.currentPopupAction = null;
5953
5908
  * See the License for the specific language governing permissions and
5954
5909
  * limitations under the License.
5955
5910
  */
5956
- const xs = "pendingRedirect", oe = /* @__PURE__ */ new Map();
5957
- class Fs extends Pn {
5911
+ const Fs = "pendingRedirect", ce = /* @__PURE__ */ new Map();
5912
+ class Bs extends Pn {
5958
5913
  constructor(e, t, r = !1) {
5959
5914
  super(e, [
5960
5915
  "signInViaRedirect",
@@ -5969,17 +5924,17 @@ class Fs extends Pn {
5969
5924
  * just return it.
5970
5925
  */
5971
5926
  async execute() {
5972
- let e = oe.get(this.auth._key());
5927
+ let e = ce.get(this.auth._key());
5973
5928
  if (!e) {
5974
5929
  try {
5975
- const r = await Bs(this.resolver, this.auth) ? await super.execute() : null;
5930
+ const r = await $s(this.resolver, this.auth) ? await super.execute() : null;
5976
5931
  e = () => Promise.resolve(r);
5977
5932
  } catch (t) {
5978
5933
  e = () => Promise.reject(t);
5979
5934
  }
5980
- oe.set(this.auth._key(), e);
5935
+ ce.set(this.auth._key(), e);
5981
5936
  }
5982
- return this.bypassAuthState || oe.set(this.auth._key(), () => Promise.resolve(null)), e();
5937
+ return this.bypassAuthState || ce.set(this.auth._key(), () => Promise.resolve(null)), e();
5983
5938
  }
5984
5939
  async onAuthEvent(e) {
5985
5940
  if (e.type === "signInViaRedirect")
@@ -6000,26 +5955,26 @@ class Fs extends Pn {
6000
5955
  cleanUp() {
6001
5956
  }
6002
5957
  }
6003
- async function Bs(n, e) {
6004
- const t = Vs(e), r = Hs(n);
5958
+ async function $s(n, e) {
5959
+ const t = js(e), r = Vs(n);
6005
5960
  if (!await r._isAvailable())
6006
5961
  return !1;
6007
5962
  const i = await r._get(t) === "true";
6008
5963
  return await r._remove(t), i;
6009
5964
  }
6010
- function $s(n, e) {
6011
- oe.set(n._key(), e);
6012
- }
6013
- function Hs(n) {
6014
- return E(n._redirectPersistence);
5965
+ function Hs(n, e) {
5966
+ ce.set(n._key(), e);
6015
5967
  }
6016
5968
  function Vs(n) {
6017
- return ae(xs, n.config.apiKey, n.name);
5969
+ return w(n._redirectPersistence);
5970
+ }
5971
+ function js(n) {
5972
+ return oe(Fs, n.config.apiKey, n.name);
6018
5973
  }
6019
- async function js(n, e, t = !1) {
6020
- if (b(n.app))
6021
- return Promise.reject(L(n));
6022
- const r = be(n), i = Ds(r, e), a = await new Fs(r, i, t).execute();
5974
+ async function Ws(n, e, t = !1) {
5975
+ if (v(n.app))
5976
+ return Promise.reject(N(n));
5977
+ const r = ve(n), i = Ns(r, e), a = await new Bs(r, i, t).execute();
6023
5978
  return a && !t && (delete a.user._redirectEventId, await r._persistUserIfCurrent(a.user), await r._setRedirectUser(null, e)), a;
6024
5979
  }
6025
5980
  /**
@@ -6038,8 +5993,8 @@ async function js(n, e, t = !1) {
6038
5993
  * See the License for the specific language governing permissions and
6039
5994
  * limitations under the License.
6040
5995
  */
6041
- const Ws = 10 * 60 * 1e3;
6042
- class zs {
5996
+ const zs = 10 * 60 * 1e3;
5997
+ class Gs {
6043
5998
  constructor(e) {
6044
5999
  this.auth = e, this.cachedEventUids = /* @__PURE__ */ new Set(), this.consumers = /* @__PURE__ */ new Set(), this.queuedRedirectEvent = null, this.hasHandledPotentialRedirect = !1, this.lastProcessedEventTime = Date.now();
6045
6000
  }
@@ -6055,7 +6010,7 @@ class zs {
6055
6010
  let t = !1;
6056
6011
  return this.consumers.forEach((r) => {
6057
6012
  this.isEventForConsumer(e, r) && (t = !0, this.sendToConsumer(e, r), this.saveEventToCache(e));
6058
- }), this.hasHandledPotentialRedirect || !Gs(e) || (this.hasHandledPotentialRedirect = !0, t || (this.queuedRedirectEvent = e, t = !0)), t;
6013
+ }), this.hasHandledPotentialRedirect || !qs(e) || (this.hasHandledPotentialRedirect = !0, t || (this.queuedRedirectEvent = e, t = !0)), t;
6059
6014
  }
6060
6015
  sendToConsumer(e, t) {
6061
6016
  var r;
@@ -6070,19 +6025,19 @@ class zs {
6070
6025
  return t.filter.includes(e.type) && r;
6071
6026
  }
6072
6027
  hasEventBeenHandled(e) {
6073
- return Date.now() - this.lastProcessedEventTime >= Ws && this.cachedEventUids.clear(), this.cachedEventUids.has(At(e));
6028
+ return Date.now() - this.lastProcessedEventTime >= zs && this.cachedEventUids.clear(), this.cachedEventUids.has(kt(e));
6074
6029
  }
6075
6030
  saveEventToCache(e) {
6076
- this.cachedEventUids.add(At(e)), this.lastProcessedEventTime = Date.now();
6031
+ this.cachedEventUids.add(kt(e)), this.lastProcessedEventTime = Date.now();
6077
6032
  }
6078
6033
  }
6079
- function At(n) {
6034
+ function kt(n) {
6080
6035
  return [n.type, n.eventId, n.sessionId, n.tenantId].filter((e) => e).join("-");
6081
6036
  }
6082
6037
  function On({ type: n, error: e }) {
6083
6038
  return n === "unknown" && (e == null ? void 0 : e.code) === "auth/no-auth-event";
6084
6039
  }
6085
- function Gs(n) {
6040
+ function qs(n) {
6086
6041
  switch (n.type) {
6087
6042
  case "signInViaRedirect":
6088
6043
  case "linkViaRedirect":
@@ -6110,7 +6065,7 @@ function Gs(n) {
6110
6065
  * See the License for the specific language governing permissions and
6111
6066
  * limitations under the License.
6112
6067
  */
6113
- async function qs(n, e = {}) {
6068
+ async function Ks(n, e = {}) {
6114
6069
  return G(n, "GET", "/v1/projects", e);
6115
6070
  }
6116
6071
  /**
@@ -6129,32 +6084,32 @@ async function qs(n, e = {}) {
6129
6084
  * See the License for the specific language governing permissions and
6130
6085
  * limitations under the License.
6131
6086
  */
6132
- const Ks = /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/, Js = /^https?/;
6133
- async function Ys(n) {
6087
+ const Js = /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/, Ys = /^https?/;
6088
+ async function Xs(n) {
6134
6089
  if (n.config.emulator)
6135
6090
  return;
6136
- const { authorizedDomains: e } = await qs(n);
6091
+ const { authorizedDomains: e } = await Ks(n);
6137
6092
  for (const t of e)
6138
6093
  try {
6139
- if (Xs(t))
6094
+ if (Qs(t))
6140
6095
  return;
6141
6096
  } catch {
6142
6097
  }
6143
- S(
6098
+ T(
6144
6099
  n,
6145
6100
  "unauthorized-domain"
6146
6101
  /* AuthErrorCode.INVALID_ORIGIN */
6147
6102
  );
6148
6103
  }
6149
- function Xs(n) {
6150
- const e = He(), { protocol: t, hostname: r } = new URL(e);
6104
+ function Qs(n) {
6105
+ const e = $e(), { protocol: t, hostname: r } = new URL(e);
6151
6106
  if (n.startsWith("chrome-extension://")) {
6152
6107
  const a = new URL(n);
6153
6108
  return a.hostname === "" && r === "" ? t === "chrome-extension:" && n.replace("chrome-extension://", "") === e.replace("chrome-extension://", "") : t === "chrome-extension:" && a.hostname === r;
6154
6109
  }
6155
- if (!Js.test(t))
6110
+ if (!Ys.test(t))
6156
6111
  return !1;
6157
- if (Ks.test(n))
6112
+ if (Js.test(n))
6158
6113
  return r === n;
6159
6114
  const i = n.replace(/\./g, "\\.");
6160
6115
  return new RegExp("^(.+\\." + i + "|" + i + ")$", "i").test(r);
@@ -6175,8 +6130,8 @@ function Xs(n) {
6175
6130
  * See the License for the specific language governing permissions and
6176
6131
  * limitations under the License.
6177
6132
  */
6178
- const Qs = new te(3e4, 6e4);
6179
- function Rt() {
6133
+ const Zs = new ne(3e4, 6e4);
6134
+ function At() {
6180
6135
  const n = y().___jsl;
6181
6136
  if (n != null && n.H) {
6182
6137
  for (const e of Object.keys(n.H))
@@ -6185,22 +6140,22 @@ function Rt() {
6185
6140
  n.CP[t] = null;
6186
6141
  }
6187
6142
  }
6188
- function Zs(n) {
6143
+ function ea(n) {
6189
6144
  return new Promise((e, t) => {
6190
6145
  var r, i, s;
6191
6146
  function a() {
6192
- Rt(), gapi.load("gapi.iframes", {
6147
+ At(), gapi.load("gapi.iframes", {
6193
6148
  callback: () => {
6194
6149
  e(gapi.iframes.getContext());
6195
6150
  },
6196
6151
  ontimeout: () => {
6197
- Rt(), t(_(
6152
+ At(), t(_(
6198
6153
  n,
6199
6154
  "network-request-failed"
6200
6155
  /* AuthErrorCode.NETWORK_REQUEST_FAILED */
6201
6156
  ));
6202
6157
  },
6203
- timeout: Qs.get()
6158
+ timeout: Zs.get()
6204
6159
  });
6205
6160
  }
6206
6161
  if (!((i = (r = y().gapi) === null || r === void 0 ? void 0 : r.iframes) === null || i === void 0) && i.Iframe)
@@ -6208,22 +6163,22 @@ function Zs(n) {
6208
6163
  else if (!((s = y().gapi) === null || s === void 0) && s.load)
6209
6164
  a();
6210
6165
  else {
6211
- const c = rs("iframefcb");
6166
+ const c = is("iframefcb");
6212
6167
  return y()[c] = () => {
6213
6168
  gapi.load ? a() : t(_(
6214
6169
  n,
6215
6170
  "network-request-failed"
6216
6171
  /* AuthErrorCode.NETWORK_REQUEST_FAILED */
6217
6172
  ));
6218
- }, ts(`${ns()}?onload=${c}`).catch((o) => t(o));
6173
+ }, ns(`${rs()}?onload=${c}`).catch((o) => t(o));
6219
6174
  }
6220
6175
  }).catch((e) => {
6221
- throw ce = null, e;
6176
+ throw le = null, e;
6222
6177
  });
6223
6178
  }
6224
- let ce = null;
6225
- function ea(n) {
6226
- return ce = ce || Zs(n), ce;
6179
+ let le = null;
6180
+ function ta(n) {
6181
+ return le = le || ea(n), le;
6227
6182
  }
6228
6183
  /**
6229
6184
  * @license
@@ -6241,7 +6196,7 @@ function ea(n) {
6241
6196
  * See the License for the specific language governing permissions and
6242
6197
  * limitations under the License.
6243
6198
  */
6244
- const ta = new te(5e3, 15e3), na = "__/auth/iframe", ra = "emulator/auth/iframe", ia = {
6199
+ const na = new ne(5e3, 15e3), ra = "__/auth/iframe", ia = "emulator/auth/iframe", sa = {
6245
6200
  style: {
6246
6201
  position: "absolute",
6247
6202
  top: "-100px",
@@ -6250,13 +6205,13 @@ const ta = new te(5e3, 15e3), na = "__/auth/iframe", ra = "emulator/auth/iframe"
6250
6205
  },
6251
6206
  "aria-hidden": "true",
6252
6207
  tabindex: "-1"
6253
- }, sa = /* @__PURE__ */ new Map([
6208
+ }, aa = /* @__PURE__ */ new Map([
6254
6209
  ["identitytoolkit.googleapis.com", "p"],
6255
6210
  ["staging-identitytoolkit.sandbox.googleapis.com", "s"],
6256
6211
  ["test-identitytoolkit.sandbox.googleapis.com", "t"]
6257
6212
  // test
6258
6213
  ]);
6259
- function aa(n) {
6214
+ function oa(n) {
6260
6215
  const e = n.config;
6261
6216
  h(
6262
6217
  e.authDomain,
@@ -6264,17 +6219,17 @@ function aa(n) {
6264
6219
  "auth-domain-config-required"
6265
6220
  /* AuthErrorCode.MISSING_AUTH_DOMAIN */
6266
6221
  );
6267
- const t = e.emulator ? Je(e, ra) : `https://${n.config.authDomain}/${na}`, r = {
6222
+ const t = e.emulator ? Ke(e, ia) : `https://${n.config.authDomain}/${ra}`, r = {
6268
6223
  apiKey: e.apiKey,
6269
6224
  appName: n.name,
6270
- v: ee
6271
- }, i = sa.get(n.config.apiHost);
6225
+ v: te
6226
+ }, i = aa.get(n.config.apiHost);
6272
6227
  i && (r.eid = i);
6273
6228
  const s = n._getFrameworks();
6274
- return s.length && (r.fw = s.join(",")), `${t}?${Z(r).slice(1)}`;
6229
+ return s.length && (r.fw = s.join(",")), `${t}?${ee(r).slice(1)}`;
6275
6230
  }
6276
- async function oa(n) {
6277
- const e = await ea(n), t = y().gapi;
6231
+ async function ca(n) {
6232
+ const e = await ta(n), t = y().gapi;
6278
6233
  return h(
6279
6234
  t,
6280
6235
  n,
@@ -6282,9 +6237,9 @@ async function oa(n) {
6282
6237
  /* AuthErrorCode.INTERNAL_ERROR */
6283
6238
  ), e.open({
6284
6239
  where: document.body,
6285
- url: aa(n),
6240
+ url: oa(n),
6286
6241
  messageHandlersFilter: t.iframes.CROSS_ORIGIN_IFRAMES_FILTER,
6287
- attributes: ia,
6242
+ attributes: sa,
6288
6243
  dontclear: !0
6289
6244
  }, (r) => new Promise(async (i, s) => {
6290
6245
  await r.restyle({
@@ -6297,7 +6252,7 @@ async function oa(n) {
6297
6252
  /* AuthErrorCode.NETWORK_REQUEST_FAILED */
6298
6253
  ), c = y().setTimeout(() => {
6299
6254
  s(a);
6300
- }, ta.get());
6255
+ }, na.get());
6301
6256
  function o() {
6302
6257
  y().clearTimeout(c), i(r);
6303
6258
  }
@@ -6322,12 +6277,12 @@ async function oa(n) {
6322
6277
  * See the License for the specific language governing permissions and
6323
6278
  * limitations under the License.
6324
6279
  */
6325
- const ca = {
6280
+ const la = {
6326
6281
  location: "yes",
6327
6282
  resizable: "yes",
6328
6283
  statusbar: "yes",
6329
6284
  toolbar: "no"
6330
- }, la = 500, ua = 600, da = "_blank", ha = "http://localhost";
6285
+ }, ua = 500, da = 600, ha = "_blank", fa = "http://localhost";
6331
6286
  class Ct {
6332
6287
  constructor(e) {
6333
6288
  this.window = e, this.associatedEvent = null;
@@ -6340,20 +6295,20 @@ class Ct {
6340
6295
  }
6341
6296
  }
6342
6297
  }
6343
- function fa(n, e, t, r = la, i = ua) {
6298
+ function pa(n, e, t, r = ua, i = da) {
6344
6299
  const s = Math.max((window.screen.availHeight - i) / 2, 0).toString(), a = Math.max((window.screen.availWidth - r) / 2, 0).toString();
6345
6300
  let c = "";
6346
- const o = Object.assign(Object.assign({}, ca), {
6301
+ const o = Object.assign(Object.assign({}, la), {
6347
6302
  width: r.toString(),
6348
6303
  height: i.toString(),
6349
6304
  top: s,
6350
6305
  left: a
6351
- }), u = m().toLowerCase();
6352
- t && (c = dn(u) ? da : t), ln(u) && (e = e || ha, o.scrollbars = "yes");
6353
- const l = Object.entries(o).reduce((f, [g, v]) => `${f}${g}=${v},`, "");
6354
- if (qi(u) && c !== "_self")
6355
- return pa(e || "", c), new Ct(null);
6356
- const d = window.open(e || "", c, l);
6306
+ }), l = g().toLowerCase();
6307
+ t && (c = dn(l) ? ha : t), ln(l) && (e = e || fa, o.scrollbars = "yes");
6308
+ const u = Object.entries(o).reduce((p, [m, F]) => `${p}${m}=${F},`, "");
6309
+ if (Ki(l) && c !== "_self")
6310
+ return ma(e || "", c), new Ct(null);
6311
+ const d = window.open(e || "", c, u);
6357
6312
  h(
6358
6313
  d,
6359
6314
  n,
@@ -6366,7 +6321,7 @@ function fa(n, e, t, r = la, i = ua) {
6366
6321
  }
6367
6322
  return new Ct(d);
6368
6323
  }
6369
- function pa(n, e) {
6324
+ function ma(n, e) {
6370
6325
  const t = document.createElement("a");
6371
6326
  t.href = n, t.target = e;
6372
6327
  const r = document.createEvent("MouseEvent");
@@ -6388,8 +6343,8 @@ function pa(n, e) {
6388
6343
  * See the License for the specific language governing permissions and
6389
6344
  * limitations under the License.
6390
6345
  */
6391
- const ma = "__/auth/handler", ga = "emulator/auth/handler", _a = encodeURIComponent("fac");
6392
- async function Pt(n, e, t, r, i, s) {
6346
+ const ga = "__/auth/handler", _a = "emulator/auth/handler", ya = encodeURIComponent("fac");
6347
+ async function Rt(n, e, t, r, i, s) {
6393
6348
  h(
6394
6349
  n.config.authDomain,
6395
6350
  n,
@@ -6406,27 +6361,27 @@ async function Pt(n, e, t, r, i, s) {
6406
6361
  appName: n.name,
6407
6362
  authType: t,
6408
6363
  redirectUrl: r,
6409
- v: ee,
6364
+ v: te,
6410
6365
  eventId: i
6411
6366
  };
6412
6367
  if (e instanceof bn) {
6413
- e.setDefaultLanguage(n.languageCode), a.providerId = e.providerId || "", _r(e.getCustomParameters()) || (a.customParameters = JSON.stringify(e.getCustomParameters()));
6414
- for (const [l, d] of Object.entries({}))
6415
- a[l] = d;
6368
+ e.setDefaultLanguage(n.languageCode), a.providerId = e.providerId || "", yr(e.getCustomParameters()) || (a.customParameters = JSON.stringify(e.getCustomParameters()));
6369
+ for (const [u, d] of Object.entries({}))
6370
+ a[u] = d;
6416
6371
  }
6417
- if (e instanceof ne) {
6418
- const l = e.getScopes().filter((d) => d !== "");
6419
- l.length > 0 && (a.scopes = l.join(","));
6372
+ if (e instanceof re) {
6373
+ const u = e.getScopes().filter((d) => d !== "");
6374
+ u.length > 0 && (a.scopes = u.join(","));
6420
6375
  }
6421
6376
  n.tenantId && (a.tid = n.tenantId);
6422
6377
  const c = a;
6423
- for (const l of Object.keys(c))
6424
- c[l] === void 0 && delete c[l];
6425
- const o = await n._getAppCheckToken(), u = o ? `#${_a}=${encodeURIComponent(o)}` : "";
6426
- return `${ya(n)}?${Z(c).slice(1)}${u}`;
6378
+ for (const u of Object.keys(c))
6379
+ c[u] === void 0 && delete c[u];
6380
+ const o = await n._getAppCheckToken(), l = o ? `#${ya}=${encodeURIComponent(o)}` : "";
6381
+ return `${va(n)}?${ee(c).slice(1)}${l}`;
6427
6382
  }
6428
- function ya({ config: n }) {
6429
- return n.emulator ? Je(n, ga) : `https://${n.authDomain}/${ma}`;
6383
+ function va({ config: n }) {
6384
+ return n.emulator ? Ke(n, _a) : `https://${n.authDomain}/${ga}`;
6430
6385
  }
6431
6386
  /**
6432
6387
  * @license
@@ -6444,30 +6399,30 @@ function ya({ config: n }) {
6444
6399
  * See the License for the specific language governing permissions and
6445
6400
  * limitations under the License.
6446
6401
  */
6447
- const Ne = "webStorageSupport";
6448
- class va {
6402
+ const De = "webStorageSupport";
6403
+ class ba {
6449
6404
  constructor() {
6450
- this.eventManagers = {}, this.iframes = {}, this.originValidationPromises = {}, this._redirectPersistence = Sn, this._completeRedirectFn = js, this._overrideRedirectResult = $s;
6405
+ this.eventManagers = {}, this.iframes = {}, this.originValidationPromises = {}, this._redirectPersistence = Sn, this._completeRedirectFn = Ws, this._overrideRedirectResult = Hs;
6451
6406
  }
6452
6407
  // Wrapping in async even though we don't await anywhere in order
6453
6408
  // to make sure errors are raised as promise rejections
6454
6409
  async _openPopup(e, t, r, i) {
6455
6410
  var s;
6456
- k((s = this.eventManagers[e._key()]) === null || s === void 0 ? void 0 : s.manager, "_initialize() not called before _openPopup()");
6457
- const a = await Pt(e, t, r, He(), i);
6458
- return fa(e, a, Ze());
6411
+ S((s = this.eventManagers[e._key()]) === null || s === void 0 ? void 0 : s.manager, "_initialize() not called before _openPopup()");
6412
+ const a = await Rt(e, t, r, $e(), i);
6413
+ return pa(e, a, Qe());
6459
6414
  }
6460
6415
  async _openRedirect(e, t, r, i) {
6461
6416
  await this._originValidation(e);
6462
- const s = await Pt(e, t, r, He(), i);
6463
- return ws(s), new Promise(() => {
6417
+ const s = await Rt(e, t, r, $e(), i);
6418
+ return Es(s), new Promise(() => {
6464
6419
  });
6465
6420
  }
6466
6421
  _initialize(e) {
6467
6422
  const t = e._key();
6468
6423
  if (this.eventManagers[t]) {
6469
6424
  const { manager: i, promise: s } = this.eventManagers[t];
6470
- return i ? Promise.resolve(i) : (k(s, "If manager is not set, promise should be"), s);
6425
+ return i ? Promise.resolve(i) : (S(s, "If manager is not set, promise should be"), s);
6471
6426
  }
6472
6427
  const r = this.initAndGetManager(e);
6473
6428
  return this.eventManagers[t] = { promise: r }, r.catch(() => {
@@ -6475,7 +6430,7 @@ class va {
6475
6430
  }), r;
6476
6431
  }
6477
6432
  async initAndGetManager(e) {
6478
- const t = await oa(e), r = new zs(e);
6433
+ const t = await ca(e), r = new Gs(e);
6479
6434
  return t.register("authEvent", (i) => (h(
6480
6435
  i == null ? void 0 : i.authEvent,
6481
6436
  e,
@@ -6487,10 +6442,10 @@ class va {
6487
6442
  }), gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER), this.eventManagers[e._key()] = { manager: r }, this.iframes[e._key()] = t, r;
6488
6443
  }
6489
6444
  _isIframeWebStorageSupported(e, t) {
6490
- this.iframes[e._key()].send(Ne, { type: Ne }, (i) => {
6445
+ this.iframes[e._key()].send(De, { type: De }, (i) => {
6491
6446
  var s;
6492
- const a = (s = i == null ? void 0 : i[0]) === null || s === void 0 ? void 0 : s[Ne];
6493
- a !== void 0 && t(!!a), S(
6447
+ const a = (s = i == null ? void 0 : i[0]) === null || s === void 0 ? void 0 : s[De];
6448
+ a !== void 0 && t(!!a), T(
6494
6449
  e,
6495
6450
  "internal-error"
6496
6451
  /* AuthErrorCode.INTERNAL_ERROR */
@@ -6499,14 +6454,14 @@ class va {
6499
6454
  }
6500
6455
  _originValidation(e) {
6501
6456
  const t = e._key();
6502
- return this.originValidationPromises[t] || (this.originValidationPromises[t] = Ys(e)), this.originValidationPromises[t];
6457
+ return this.originValidationPromises[t] || (this.originValidationPromises[t] = Xs(e)), this.originValidationPromises[t];
6503
6458
  }
6504
6459
  get _shouldInitProactively() {
6505
- return gn() || un() || Xe();
6460
+ return gn() || un() || Ye();
6506
6461
  }
6507
6462
  }
6508
- const ba = va;
6509
- var Ot = "@firebase/auth", Dt = "1.7.9";
6463
+ const Ia = ba;
6464
+ var Pt = "@firebase/auth", Ot = "1.7.9";
6510
6465
  /**
6511
6466
  * @license
6512
6467
  * Copyright 2020 Google LLC
@@ -6523,7 +6478,7 @@ var Ot = "@firebase/auth", Dt = "1.7.9";
6523
6478
  * See the License for the specific language governing permissions and
6524
6479
  * limitations under the License.
6525
6480
  */
6526
- class Ia {
6481
+ class wa {
6527
6482
  constructor(e) {
6528
6483
  this.auth = e, this.internalListeners = /* @__PURE__ */ new Map();
6529
6484
  }
@@ -6574,7 +6529,7 @@ class Ia {
6574
6529
  * See the License for the specific language governing permissions and
6575
6530
  * limitations under the License.
6576
6531
  */
6577
- function wa(n) {
6532
+ function Ea(n) {
6578
6533
  switch (n) {
6579
6534
  case "Node":
6580
6535
  return "node";
@@ -6590,8 +6545,8 @@ function wa(n) {
6590
6545
  return;
6591
6546
  }
6592
6547
  }
6593
- function Ea(n) {
6594
- J(new W(
6548
+ function Ta(n) {
6549
+ Y(new W(
6595
6550
  "auth",
6596
6551
  (e, { options: t }) => {
6597
6552
  const r = e.getProvider("app").getImmediate(), i = e.getProvider("heartbeat"), s = e.getProvider("app-check-internal"), { apiKey: a, authDomain: c } = r.options;
@@ -6604,8 +6559,8 @@ function Ea(n) {
6604
6559
  tokenApiHost: "securetoken.googleapis.com",
6605
6560
  apiScheme: "https",
6606
6561
  sdkClientVersion: _n(n)
6607
- }, u = new Zi(r, i, s, o);
6608
- return ss(u, t), u;
6562
+ }, l = new es(r, i, s, o);
6563
+ return as(l, t), l;
6609
6564
  },
6610
6565
  "PUBLIC"
6611
6566
  /* ComponentType.PUBLIC */
@@ -6617,21 +6572,21 @@ function Ea(n) {
6617
6572
  "auth-internal"
6618
6573
  /* _ComponentName.AUTH_INTERNAL */
6619
6574
  ).initialize();
6620
- })), J(new W(
6575
+ })), Y(new W(
6621
6576
  "auth-internal",
6622
6577
  (e) => {
6623
- const t = be(e.getProvider(
6578
+ const t = ve(e.getProvider(
6624
6579
  "auth"
6625
6580
  /* _ComponentName.AUTH */
6626
6581
  ).getImmediate());
6627
- return ((r) => new Ia(r))(t);
6582
+ return ((r) => new wa(r))(t);
6628
6583
  },
6629
6584
  "PRIVATE"
6630
6585
  /* ComponentType.PRIVATE */
6631
6586
  ).setInstantiationMode(
6632
6587
  "EXPLICIT"
6633
6588
  /* InstantiationMode.EXPLICIT */
6634
- )), $(Ot, Dt, wa(n)), $(Ot, Dt, "esm2017");
6589
+ )), $(Pt, Ot, Ea(n)), $(Pt, Ot, "esm2017");
6635
6590
  }
6636
6591
  /**
6637
6592
  * @license
@@ -6649,47 +6604,47 @@ function Ea(n) {
6649
6604
  * See the License for the specific language governing permissions and
6650
6605
  * limitations under the License.
6651
6606
  */
6652
- const Ta = 5 * 60, Sa = Wt("authIdTokenMaxAge") || Ta;
6653
- let Nt = null;
6654
- const ka = (n) => async (e) => {
6607
+ const Sa = 5 * 60, ka = Wt("authIdTokenMaxAge") || Sa;
6608
+ let Dt = null;
6609
+ const Aa = (n) => async (e) => {
6655
6610
  const t = e && await e.getIdTokenResult(), r = t && ((/* @__PURE__ */ new Date()).getTime() - Date.parse(t.issuedAtTime)) / 1e3;
6656
- if (r && r > Sa)
6611
+ if (r && r > ka)
6657
6612
  return;
6658
6613
  const i = t == null ? void 0 : t.token;
6659
- Nt !== i && (Nt = i, await fetch(n, {
6614
+ Dt !== i && (Dt = i, await fetch(n, {
6660
6615
  method: i ? "POST" : "DELETE",
6661
6616
  headers: i ? {
6662
6617
  Authorization: `Bearer ${i}`
6663
6618
  } : {}
6664
6619
  }));
6665
6620
  };
6666
- function Aa(n = vi()) {
6621
+ function Ca(n = bi()) {
6667
6622
  const e = Kt(n, "auth");
6668
6623
  if (e.isInitialized())
6669
6624
  return e.getImmediate();
6670
- const t = is(n, {
6671
- popupRedirectResolver: ba,
6625
+ const t = ss(n, {
6626
+ popupRedirectResolver: Ia,
6672
6627
  persistence: [
6673
- Os,
6674
- vs,
6628
+ Ds,
6629
+ bs,
6675
6630
  Sn
6676
6631
  ]
6677
6632
  }), r = Wt("authTokenSyncURL");
6678
6633
  if (r && typeof isSecureContext == "boolean" && isSecureContext) {
6679
6634
  const s = new URL(r, location.origin);
6680
6635
  if (location.origin === s.origin) {
6681
- const a = ka(s.toString());
6682
- gs(t, a, () => a(t.currentUser)), ms(t, (c) => a(c));
6636
+ const a = Aa(s.toString());
6637
+ _s(t, a, () => a(t.currentUser)), gs(t, (c) => a(c));
6683
6638
  }
6684
6639
  }
6685
- const i = Vt("auth");
6686
- return i && as(t, `http://${i}`), t;
6640
+ const i = ar("auth");
6641
+ return i && os(t, `http://${i}`), t;
6687
6642
  }
6688
6643
  function Ra() {
6689
6644
  var n, e;
6690
6645
  return (e = (n = document.getElementsByTagName("head")) === null || n === void 0 ? void 0 : n[0]) !== null && e !== void 0 ? e : document;
6691
6646
  }
6692
- es({
6647
+ ts({
6693
6648
  loadJS(n) {
6694
6649
  return new Promise((e, t) => {
6695
6650
  const r = document.createElement("script");
@@ -6706,84 +6661,100 @@ es({
6706
6661
  recaptchaV2Script: "https://www.google.com/recaptcha/api.js",
6707
6662
  recaptchaEnterpriseScript: "https://www.google.com/recaptcha/enterprise.js?render="
6708
6663
  });
6709
- Ea(
6664
+ Ta(
6710
6665
  "Browser"
6711
6666
  /* ClientPlatform.BROWSER */
6712
6667
  );
6713
- const Ca = Ln({
6714
- history: Mn(),
6668
+ const Pa = Un({
6669
+ history: xn(),
6715
6670
  routes: [
6716
6671
  ...ue,
6717
- ...le,
6672
+ ...K,
6718
6673
  {
6719
6674
  path: "/forbidden",
6720
6675
  name: "mf-payment-forbidden",
6721
- component: () => import("./Forbidden-Dqw0MqyC.js")
6676
+ component: () => import("./Forbidden-CSTZjebc.js")
6722
6677
  }
6723
6678
  ]
6724
6679
  });
6725
- let Le, Me;
6726
- Ca.beforeEach(async (n) => {
6680
+ let Ne, Le;
6681
+ Pa.beforeEach(async (n) => {
6727
6682
  const {
6728
6683
  sessionUser: e,
6729
6684
  currentRestaurant: t,
6730
6685
  currentBusiness: r,
6731
6686
  readRestaurants: i,
6732
6687
  changeRestaurant: s
6733
- } = We();
6734
- if (n.name.startsWith("mf-payment-admin")) {
6688
+ } = je();
6689
+ if (n.name && n.name.startsWith("mf-payment-admin")) {
6735
6690
  if (!e.value) {
6736
- Le || (Le = new Promise((c) => {
6737
- const o = q(e, (u) => {
6738
- var l, d;
6739
- u && (o(), c(
6740
- (((l = e.value) == null ? void 0 : l.role.isStaff) || ((d = e.value) == null ? void 0 : d.role.isAdmin)) ?? !1
6691
+ Ne || (Ne = new Promise((c) => {
6692
+ const o = q(e, (l) => {
6693
+ var u, d;
6694
+ l && (o(), c(
6695
+ (((u = e.value) == null ? void 0 : u.role.isStaff) || ((d = e.value) == null ? void 0 : d.role.isAdmin)) ?? !1
6741
6696
  ));
6742
6697
  });
6743
6698
  }));
6744
- const a = await Le;
6699
+ const a = await Ne;
6745
6700
  return a || { name: "mf-payment-forbidden" };
6746
6701
  }
6747
6702
  return !0;
6748
6703
  }
6749
- return !r.value || !t.value ? (Me || (Me = Promise.all([
6704
+ return !r.value || !t.value ? (Le || (Le = Promise.all([
6750
6705
  new Promise(async (a) => {
6751
6706
  const c = q(r, (o) => {
6752
6707
  o && (c(), a(!0));
6753
6708
  });
6754
6709
  }),
6755
6710
  new Promise(async (a) => {
6756
- const c = q(t, (u) => {
6757
- u && (c(), a(!0));
6711
+ const c = q(t, (l) => {
6712
+ l && (c(), a(!0));
6758
6713
  }), o = await i();
6759
6714
  await s(o == null ? void 0 : o.at(0));
6760
6715
  })
6761
- ]).then((a) => !0)), Me) : !0;
6716
+ ]).then((a) => !0)), Le) : !0;
6762
6717
  });
6763
- const Pa = /* @__PURE__ */ Mt({
6718
+ const Oa = /* @__PURE__ */ Mt({
6764
6719
  __name: "AppSidebar",
6765
6720
  setup(n) {
6766
- const e = We(), t = Un(), { t: r } = zn(), i = $n(t.currentRoute.value.name);
6721
+ const e = je(), t = Fn(), { t: r } = zn(), i = $n(t.currentRoute.value.name);
6767
6722
  q(t.currentRoute, () => {
6768
6723
  let l = t.currentRoute.value.name;
6769
6724
  t.currentRoute.value.meta.parent && (l = t.currentRoute.value.meta.parent), i.value = l;
6770
6725
  });
6771
6726
  const s = ue.map((l) => {
6772
- var g, v;
6773
- if (!((g = l.meta) != null && g.sidebarDisplay) || l.meta.region && !((v = l.meta.region) != null && v[e.currentCountry.value]) || l.meta.section)
6727
+ var p, m;
6728
+ if (!((p = l.meta) != null && p.sidebarDisplay) || l.meta.region && !((m = l.meta.region) != null && m[e.currentCountry.value]) || l.meta.section)
6774
6729
  return;
6775
- const d = l.meta.sidebarDisplay, f = {
6776
- label: d.startsWith("i18n:") ? r(d.replaceAll("i18n:", "")) : d,
6730
+ const u = l.meta.sidebarDisplay, d = {
6731
+ label: u.startsWith("i18n:") ? r(u.replaceAll("i18n:", "")) : u,
6777
6732
  value: l.name,
6778
6733
  action: () => {
6779
6734
  if (t.currentRoute.value.name !== l.name)
6780
6735
  return t.push({ name: l.name });
6781
6736
  }
6782
6737
  };
6783
- return l.meta.sidebarNew && (f.badge = () => Hn(qn.FmPill, { label: "New" })), f;
6784
- }).filter((l) => !!l), a = le.map((l) => {
6785
- var d;
6786
- if ((d = l.meta) != null && d.sidebarDisplay && !l.meta.section)
6738
+ return l.meta.sidebarNew && (d.badge = () => Hn(qn.FmPill, { label: "New" })), d;
6739
+ }).filter((l) => !!l);
6740
+ function a(l, u) {
6741
+ return l.map((d) => {
6742
+ var p, m;
6743
+ return (p = d.meta) != null && p.useChildrenRoutes ? a(d.children || [], u) : (m = d.meta) != null && m.sidebarDisplay ? d.meta.section !== u ? [] : [
6744
+ {
6745
+ label: d.meta.sidebarDisplay.startsWith("i18n:") ? r(d.meta.sidebarDisplay.replaceAll("i18n:", "")) : d.meta.sidebarDisplay,
6746
+ value: d.name,
6747
+ action: () => {
6748
+ if (t.currentRoute.value.name !== d.name)
6749
+ return t.push({ name: d.name });
6750
+ }
6751
+ }
6752
+ ] : [];
6753
+ }).flat().filter((d) => !!d);
6754
+ }
6755
+ const c = K.map((l) => {
6756
+ var u;
6757
+ if ((u = l.meta) != null && u.sidebarDisplay && !l.meta.section)
6787
6758
  return {
6788
6759
  label: l.meta.sidebarDisplay.startsWith("i18n:") ? r(l.meta.sidebarDisplay.replaceAll("i18n:", "")) : l.meta.sidebarDisplay,
6789
6760
  value: l.name,
@@ -6792,30 +6763,8 @@ const Pa = /* @__PURE__ */ Mt({
6792
6763
  return t.push({ name: l.name });
6793
6764
  }
6794
6765
  };
6795
- }).filter((l) => !!l), c = (l) => ue.map((d) => {
6796
- var f;
6797
- if ((f = d.meta) != null && f.sidebarDisplay && d.meta.section === l)
6798
- return {
6799
- label: d.meta.sidebarDisplay.startsWith("i18n:") ? r(d.meta.sidebarDisplay.replaceAll("i18n:", "")) : d.meta.sidebarDisplay,
6800
- value: d.name,
6801
- action: () => {
6802
- if (t.currentRoute.value.name !== d.name)
6803
- return t.push({ name: d.name });
6804
- }
6805
- };
6806
- }).filter((d) => !!d), o = (l) => le.map((d) => {
6807
- var f;
6808
- if ((f = d.meta) != null && f.sidebarDisplay && d.meta.section === l)
6809
- return {
6810
- label: d.meta.sidebarDisplay,
6811
- value: d.name,
6812
- action: () => {
6813
- if (t.currentRoute.value.name !== d.name)
6814
- return t.push({ name: d.name });
6815
- }
6816
- };
6817
- }).filter((d) => !!d), u = Lt(() => {
6818
- var d, f;
6766
+ }).filter((l) => !!l), o = Lt(() => {
6767
+ var u, d;
6819
6768
  const l = [...s];
6820
6769
  return l.push({
6821
6770
  label: "",
@@ -6826,7 +6775,7 @@ const Pa = /* @__PURE__ */ Mt({
6826
6775
  icon: "credit_score",
6827
6776
  value: "divider",
6828
6777
  disabled: !0
6829
- }), l.push(...c("financing")), ((d = e.sessionUser.value) != null && d.role.isStaff || (f = e.sessionUser.value) != null && f.role.isAdmin) && (l.push({
6778
+ }), l.push(...a(ue, "financing")), ((u = e.sessionUser.value) != null && u.role.isStaff || (d = e.sessionUser.value) != null && d.role.isAdmin) && (l.push({
6830
6779
  label: "",
6831
6780
  value: "divider",
6832
6781
  disabled: !0
@@ -6835,7 +6784,7 @@ const Pa = /* @__PURE__ */ Mt({
6835
6784
  icon: "desktop_windows",
6836
6785
  value: "divider",
6837
6786
  disabled: !0
6838
- }), l.push(...o("device")), l.push({
6787
+ }), l.push(...a(K, "device")), l.push({
6839
6788
  label: "",
6840
6789
  value: "divider",
6841
6790
  disabled: !0
@@ -6844,7 +6793,7 @@ const Pa = /* @__PURE__ */ Mt({
6844
6793
  icon: "account_balance",
6845
6794
  value: "divider",
6846
6795
  disabled: !0
6847
- }), l.push(...o("payment-gateway")), l.push({
6796
+ }), l.push(...a(K, "payment-gateway")), l.push({
6848
6797
  label: "",
6849
6798
  value: "divider",
6850
6799
  disabled: !0
@@ -6853,34 +6802,34 @@ const Pa = /* @__PURE__ */ Mt({
6853
6802
  icon: "admin_panel_settings",
6854
6803
  value: "divider",
6855
6804
  disabled: !0
6856
- }), l.push(...a)), l;
6805
+ }), l.push(...c)), l;
6857
6806
  });
6858
- return (l, d) => {
6859
- const f = Ut("FmCollapsibleTabs");
6860
- return xt(), Ft(f, {
6807
+ return (l, u) => {
6808
+ const d = Ut("FmCollapsibleTabs");
6809
+ return xt(), Ft(d, {
6861
6810
  modelValue: i.value,
6862
- "onUpdate:modelValue": d[0] || (d[0] = (g) => i.value = g),
6863
- items: u.value,
6811
+ "onUpdate:modelValue": u[0] || (u[0] = (p) => i.value = p),
6812
+ items: o.value,
6864
6813
  class: "py-16 px-8 w-[240px]"
6865
6814
  }, null, 8, ["modelValue", "items"]);
6866
6815
  };
6867
6816
  }
6868
6817
  });
6869
- var Oa = { authClientId: "1a362d621873497b277ea55258cc82594ba148d235257f7bd44ea2acc132d8a4", googleMap: "AIzaSyA_isPR1-9bX7UmRiJIhsIRNNwdn6DdmW4", firebase: { apiKey: "AIzaSyAj8JdCHtP0Vc5vZobCfgoLzWxPIn0WUG4", authDomain: "feedme-dev-4c3ef.firebaseapp.com", databaseURL: "https://feedme-dev-4c3ef.firebaseio.com", projectId: "feedme-dev-4c3ef", storageBucket: "feedme-dev-4c3ef.appspot.com", messagingSenderId: "458797803788", appId: "1:458797803788:web:37f2af2926a84288f0c129", measurementId: "G-J2QG09D2Q7" }, assetBucketUrl: "feedme-dev-4c3ef.appspot.com" };
6870
- const $a = /* @__PURE__ */ Mt({
6818
+ 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" } };
6819
+ const Ba = /* @__PURE__ */ Mt({
6871
6820
  __name: "App",
6872
6821
  setup(n) {
6873
- const { state: e } = Qn(), t = We(), r = xn(), i = Jt(Oa.firebase);
6822
+ const { state: e } = Qn(), t = je(), r = Bn(), i = Jt(Da.firebase);
6874
6823
  async function s() {
6875
6824
  const a = t.sessionUser.value;
6876
6825
  if (!a || !a.token) return;
6877
- const c = await a.getCustomToken(), o = Aa(i);
6878
- await ps(o, c);
6826
+ const c = await a.getCustomToken(), o = Ca(i);
6827
+ await ms(o, c);
6879
6828
  }
6880
6829
  return s(), q(t.sessionUser, s), Vn(() => {
6881
6830
  e.isIframe && parent.postMessage({ event: "ready" }, "*");
6882
6831
  }), jn(() => {
6883
- t.registerSidebarComponent(Pa);
6832
+ t.registerSidebarComponent(Oa);
6884
6833
  }), (a, c) => {
6885
6834
  const o = Ut("RouterView");
6886
6835
  return xt(), Ft(o, {
@@ -6888,23 +6837,24 @@ const $a = /* @__PURE__ */ Mt({
6888
6837
  });
6889
6838
  };
6890
6839
  }
6891
- }), Ha = {
6892
- "en-US": Jn,
6893
- "zh-CN": Xn
6894
- }, Va = [...le, ...ue];
6840
+ }), $a = () => {
6841
+ const n = [{ "en-US": Jn, "zh-CN": Xn }, Mn], e = new Set(
6842
+ n.flatMap((t) => Object.keys(t))
6843
+ );
6844
+ return Array.from(e).reduce(
6845
+ (t, r) => {
6846
+ const i = r;
6847
+ return t[r] = n.reduce((s, a) => ({
6848
+ ...s,
6849
+ ...a[i] || {}
6850
+ }), {}), t;
6851
+ },
6852
+ {}
6853
+ );
6854
+ }, Ha = [...K, ...ue];
6895
6855
  export {
6896
- W as C,
6897
- M as F,
6898
- ee as S,
6899
- gt as _,
6900
- J as a,
6901
- Kt as b,
6902
- Fa as c,
6903
- vi as d,
6904
- Ba as e,
6905
- Va as f,
6906
- z as g,
6907
- $a as h,
6908
- Ha as i,
6909
- $ as r
6856
+ mt as _,
6857
+ Ba as a,
6858
+ $a as i,
6859
+ Ha as r
6910
6860
  };