@feedmepos/mf-connect 0.1.38-beta.84 → 0.1.38-beta.86

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 (107) hide show
  1. package/dist/{Analytic-JNYAk4CC.js → Analytic-C3QLhhr1.js} +13 -13
  2. package/dist/{App-DmsDi2wy.js → App-BM42X8Bc.js} +595 -592
  3. package/dist/{AuditLogs-BXGKb27x.js → AuditLogs-C9YLLdwR.js} +9 -9
  4. package/dist/{Bin-B4A5OEWa.js → Bin-ujsok6ox.js} +8 -8
  5. package/dist/{Broadcast--KA6CzAt.js → Broadcast-DwJ0lTJL.js} +9 -9
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BLgbi9Ay.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BAOThPBZ.js} +6 -6
  7. package/dist/{Card-1LToO52r.js → Card-Cog8kI-h.js} +18 -18
  8. package/dist/{Collections-Bsh0d9Vt.js → Collections-CKpLacG0.js} +7 -7
  9. package/dist/{Credit-CDMm-DIO.js → Credit-B8vn9-XQ.js} +9 -9
  10. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-BVJYCoL_.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-B68fHxLk.js} +33 -33
  11. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-BubuNkFX.js → EffectSheet.vue_vue_type_style_index_0_lang-BMkTJfeq.js} +6 -6
  12. package/dist/{Experience-Bj9Qein1.js → Experience-CZh5yQE7.js} +9 -9
  13. package/dist/{FileSaver.min-QC_R9D8d.js → FileSaver.min-TDoZgwjv.js} +1 -1
  14. package/dist/{Game-1_RyyjSp.js → Game-B4IGlBuZ.js} +10 -10
  15. package/dist/{Grab-BcDuAzA4.js → Grab-CGCMfo5l.js} +8 -8
  16. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-BC_mSBKl.js → ImageInput.vue_vue_type_script_setup_true_lang-BEST_BzE.js} +1 -1
  17. package/dist/{Index-Bqjte7_5.js → Index-BtQDpaDl.js} +10 -10
  18. package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-DaD9zlKU.js → LocationPicker.vue_vue_type_script_setup_true_lang-_dtiqS22.js} +1 -1
  19. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-BJ4Nvy04.js → LottieAnimation.vue_vue_type_script_setup_true_lang-C6lOiXZo.js} +1 -1
  20. package/dist/{MainLayout-BeqXvRXR.js → MainLayout-CCWfceEw.js} +1 -1
  21. package/dist/{Marketing-DmTGoj3J.js → Marketing-BVctpRDr.js} +98 -97
  22. package/dist/{MarketingMaterialEdit-B9SmW25F.js → MarketingMaterialEdit-CuKXyUNM.js} +411 -410
  23. package/dist/{Member-DAWjFh1O.js → Member-CPW-noAm.js} +11 -11
  24. package/dist/{MemberList-P8M-8Zbj.js → MemberList-DPCwz9Xm.js} +26 -26
  25. package/dist/{MemberTransactions-BshW4hj3.js → MemberTransactions-BnThgkgf.js} +1 -1
  26. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-CtuaxcCE.js → MessageInput.vue_vue_type_script_setup_true_lang-uYwOH1Du.js} +9 -9
  27. package/dist/{Mission-ByNlmu_a.js → Mission-BduXkfTy.js} +10 -10
  28. package/dist/{Overview-DvG2OLhj.js → Overview-DtaIdMIj.js} +18 -18
  29. package/dist/{Point-DtCL1Tge.js → Point-DtjIbu5J.js} +9 -9
  30. package/dist/{Promotion-B54PNXRT.js → Promotion-Bxjw7Iac.js} +10 -10
  31. package/dist/{Queue-BU0DAPKs.js → Queue-dbh6eNyd.js} +10 -10
  32. package/dist/{Record-C_FsdGCx.js → Record-Dx31uV2f.js} +9 -9
  33. package/dist/{Review-xIPGVc1i.js → Review-OEmKjDCL.js} +4 -4
  34. package/dist/{ReviewFacebookCallback-DbMoj41Y.js → ReviewFacebookCallback-hS4e9pnS.js} +4 -4
  35. package/dist/{ReviewGoogleCallback-Gz04oqDQ.js → ReviewGoogleCallback-CFtvjjfe.js} +4 -4
  36. package/dist/{Reward-DqSz1odZ.js → Reward-E3avHwn3.js} +16 -16
  37. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-iycjfGJv.js → RewardGroup.vue_vue_type_script_setup_true_lang-Bs_Ydcgu.js} +11 -11
  38. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-D-DMk_q0.js → RuleGroup.vue_vue_type_script_setup_true_lang-_4AOLGM1.js} +14 -14
  39. package/dist/{Segment-D7PV1ffO.js → Segment-DYK5ArhM.js} +24 -24
  40. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-BQRM6r3r.js → SelectItems.vue_vue_type_script_setup_true_lang-CO4npY6n.js} +2 -2
  41. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-mcUrkTEx.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-COFUPWot.js} +12 -12
  42. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-B1b5-Zle.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-Cj3NUgnu.js} +4 -4
  43. package/dist/{Setting-BetOevCY.js → Setting-B0_oNLQu.js} +14 -14
  44. package/dist/{SettingAdvertisements-CxF11hkc.js → SettingAdvertisements-CxdmuEvF.js} +12 -12
  45. package/dist/{Store-DRPKpxqC.js → Store-YOa3U0aD.js} +21 -21
  46. package/dist/{StoreRewards-PdygaAMM.js → StoreRewards-2uDbKk47.js} +15 -15
  47. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-DauIR84r.js → StoreTransactions.vue_vue_type_script_setup_true_lang-CwREjTGl.js} +21 -21
  48. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-iuc9PY3R.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-DUykQn4h.js} +2 -2
  49. package/dist/{Tier-CG3J1vx1.js → Tier-NDxsbc2m.js} +23 -23
  50. package/dist/{Title-DW19FtBx.js → Title-Dcinkv87.js} +20 -20
  51. package/dist/{Transaction-DKNpK966.js → Transaction-D6-Lp_Ff.js} +2 -2
  52. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-CnJ0NaT1.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-CYBsobxf.js} +6 -6
  53. package/dist/{Voucher-BQ9VdAgX.js → Voucher-BbU1ZIVw.js} +13 -13
  54. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-DwoRNvwG.js → VoucherEditor.vue_vue_type_script_setup_true_lang-DrsZ7zME.js} +12 -12
  55. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-C73ImjeV.js → ZodTextField.vue_vue_type_script_setup_true_lang-CrAviByb.js} +2 -2
  56. package/dist/{app-C0qcZ_C3.js → app-BWFldX_d.js} +227 -227
  57. package/dist/app.js +1 -1
  58. package/dist/{business-DYnnKWrO.js → business-BCAlq8oY.js} +1 -1
  59. package/dist/{campaign-BBY__PcK.js → campaign-B096AFuK.js} +1 -1
  60. package/dist/{campaign-CKA9wEbZ.js → campaign-Drj2Z6Jn.js} +8 -8
  61. package/dist/{campaign.enum-Dxa81fhf.js → campaign.enum-BbFVaaKV.js} +1 -1
  62. package/dist/{campaign.fn-DjENPBfV.js → campaign.fn-BtwIHsju.js} +23 -23
  63. package/dist/{collectible.enum-oFDirUXs.js → collectible.enum-axN7HDxB.js} +1 -1
  64. package/dist/{collection.fn-8fcTEShb.js → collection.fn-C_6-ST-9.js} +2 -2
  65. package/dist/{dto-DilwadZt.js → dto-B3g8zebD.js} +4 -4
  66. package/dist/{duplicateCampaign-D1ZTNBe9.js → duplicateCampaign-C56LVR47.js} +2 -2
  67. package/dist/{effect-fupxOEt1.js → effect-B6jWG9MX.js} +1 -1
  68. package/dist/{email-addresses-CMS9HeG2.js → email-addresses-DzeLIT4Z.js} +2 -2
  69. package/dist/{export-RwlXa6Qv.js → export-B-f1Fy3c.js} +3 -3
  70. package/dist/{helper-DJCPv7PM.js → helper-GZmz60dV.js} +1 -1
  71. package/dist/{index-eRaU6Xac.js → index-BG5prXBx.js} +2 -2
  72. package/dist/{index-D2a9E657.js → index-Bbn2fjlu.js} +1 -1
  73. package/dist/index-BwRZJSAn.js +36 -0
  74. package/dist/{index-CjIoVmnU.js → index-C-0KBvqk.js} +1 -1
  75. package/dist/{index-2PEWUv3P.js → index-COMozQJ9.js} +3 -3
  76. package/dist/{index-DqCMuPw6.js → index-CWQEJ4v7.js} +1 -1
  77. package/dist/{index-C1zYngv4.js → index-CtK9zAMK.js} +3 -3
  78. package/dist/{index-BFsuyNQA.js → index-CxF9mi-l.js} +3 -3
  79. package/dist/{index-Bo94fQEb.js → index-D0YPb3ei.js} +1 -1
  80. package/dist/{index-Si3-mU1k.js → index-D1l-VEDs.js} +1 -1
  81. package/dist/{index-CdEle8Cv.js → index-DOb8JUVT.js} +1 -1
  82. package/dist/{index-BvB5G3bI.js → index-DQZ7Tl1m.js} +4 -4
  83. package/dist/{index-IMvedqa3.js → index-XvsgDLko.js} +1 -1
  84. package/dist/{index-BzbteuNi.js → index-mse5uWyZ.js} +6 -6
  85. package/dist/{index.esm2017-DboY2zyr.js → index.esm2017-DlOvWRsl.js} +1 -1
  86. package/dist/{loading-C4ajrnT4.js → loading-Cv6eF2pO.js} +1 -1
  87. package/dist/{lodash-BN85b-mv.js → lodash-DM26yDS-.js} +1 -1
  88. package/dist/{membership-1yNSUrBo.js → membership-BXXSi21x.js} +3 -3
  89. package/dist/{money-CpraQZps.js → money-BI22kwrB.js} +1 -1
  90. package/dist/{number-BviuRsPW.js → number-C5VwsV4p.js} +1 -1
  91. package/dist/objectid-gjDtRAFa.js +145 -0
  92. package/dist/{plugins-6gr3a6Jy.js → plugins-DPC31X3L.js} +3 -3
  93. package/dist/remy-D_Deb3ue.js +13 -0
  94. package/dist/{reward-CNSlRDZC.js → reward-BbYot1VR.js} +1 -1
  95. package/dist/{rule-B1dCQScJ.js → rule-CDeOgoOU.js} +3 -3
  96. package/dist/{rule-builder-Ch0AU-h6.js → rule-builder-D9RdlP0k.js} +1 -1
  97. package/dist/{template-DzgmoMMz.js → template-Bilhj8E_.js} +6 -6
  98. package/dist/{timezone-BM7x2HXX.js → timezone-BnMBWJA4.js} +2 -2
  99. package/dist/{trigger--f942qWD.js → trigger-mmIQLhyO.js} +5 -5
  100. package/dist/{usePagination-CdEsBI1Z.js → usePagination-CGQTKaBm.js} +1 -1
  101. package/dist/{user-DX2zCe2B.js → user-D8GJcZA1.js} +1 -1
  102. package/dist/{vue-i18n-Dq3IeM3R.js → vue-i18n-B1B0WjC5.js} +306 -306
  103. package/dist/{xlsx-7Dgnafdi.js → xlsx-CqGQ7oK_.js} +1 -1
  104. package/dist/{zod-Qa7M8fle.js → zod-BT5LlBcK.js} +1 -1
  105. package/package.json +1 -1
  106. package/dist/objectid-RJ2bzO-R.js +0 -145
  107. package/dist/remy-1dcYv-0_.js +0 -46
@@ -1,21 +1,23 @@
1
- import { defineComponent as ht, ref as te, h as B, computed as Ee, watch as ft, resolveComponent as Zt, openBlock as ne, createElementBlock as ke, createVNode as pt, unref as v, createElementVNode as ie, toDisplayString as je, onMounted as en, Fragment as tn, createBlock as nn, createCommentVNode as Ge, nextTick as rn } from "vue";
2
- import { useRouter as sn, useRoute as mt, RouterView as on } from "vue-router";
3
- import { useCoreStore as be, FeedMeAuth as an } from "@feedmepos/mf-common";
1
+ import { defineComponent as ft, ref as ie, h as z, computed as ke, watch as pt, resolveComponent as en, openBlock as K, createElementBlock as be, createVNode as mt, unref as v, createElementVNode as re, toDisplayString as Ge, onMounted as tn, Fragment as nn, createBlock as Be, createCommentVNode as ye, nextTick as rn } from "vue";
2
+ import { useRouter as sn, useRoute as gt, RouterView as on } from "vue-router";
3
+ import { useCoreStore as Se, FeedMeAuth as an } from "@feedmepos/mf-common";
4
4
  import { u as cn } from "./app-wDQR6dpb.js";
5
- import { u as ln } from "./business-DYnnKWrO.js";
6
- import "./index-IMvedqa3.js";
7
- import { components as z, useSnackbar as un, useDialog as dn } from "@feedmepos/ui-library";
8
- import { u as hn } from "./vue-i18n-Dq3IeM3R.js";
9
- import { C as Be, m as fn } from "./timezone-BM7x2HXX.js";
10
- import { R as f } from "./app-C0qcZ_C3.js";
5
+ import { u as ln } from "./business-BCAlq8oY.js";
6
+ import "./index-XvsgDLko.js";
7
+ import { components as q, useSnackbar as un, useDialog as dn } from "@feedmepos/ui-library";
8
+ import { u as hn } from "./vue-i18n-B1B0WjC5.js";
9
+ import { C as ze, m as fn } from "./timezone-BnMBWJA4.js";
10
+ import { R as f } from "./app-BWFldX_d.js";
11
11
  import { J as pn } from "./JsonViewer-v8_C7l5N.js";
12
- import { r as Se, L as mn, g as gt, i as gn, a as _n, _ as ze, C as qe, b as vn, S as J, c as E, d as j, E as Ce, e as In, f as _t, h as Tn, j as yn, k as vt, l as _, m as wn, F as Oe, n as En, q as Y, o as kn, p as bn, s as Sn, t as Rn, u as An } from "./index.esm2017-DboY2zyr.js";
13
- import { _ as Ne } from "./tslib.es6-BCqqvLQ_.js";
14
- import { S as Ke, c as Pn } from "./index-eRaU6Xac.js";
15
- const Cn = { class: "flex flex-col h-full justify-between py-16" }, On = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary text-center" }, Nn = /* @__PURE__ */ ht({
12
+ import { ChatPanel as mn } from "@feedmepos/mf-remy-panel";
13
+ import { u as gn } from "./remy-D_Deb3ue.js";
14
+ import { r as Re, L as _n, g as _t, i as vn, a as In, _ as qe, C as Ke, b as Tn, S as X, c as E, d as j, E as Oe, e as yn, f as vt, h as wn, j as En, k as It, l as _, m as kn, F as Ne, n as bn, q as Q, o as Sn, p as Rn, s as An, t as Pn, u as Cn } from "./index.esm2017-DlOvWRsl.js";
15
+ import { _ as Le } from "./tslib.es6-BCqqvLQ_.js";
16
+ import { S as Je, c as On } from "./index-BG5prXBx.js";
17
+ const Nn = { class: "flex flex-col h-full justify-between py-16" }, Ln = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary text-center" }, Mn = /* @__PURE__ */ ft({
16
18
  __name: "NavigationTab",
17
19
  setup(n) {
18
- const { t: e } = hn(), t = te(), i = [
20
+ const { t: e } = hn(), t = ie(), i = [
19
21
  {
20
22
  label: e("connect.navigation.analytic"),
21
23
  value: f["$connect-ANALYTIC"]
@@ -61,7 +63,7 @@ const Cn = { class: "flex flex-col h-full justify-between py-16" }, On = { class
61
63
  {
62
64
  label: e("connect.navigation.point"),
63
65
  value: f["$connect-PROGRAM_POINT"],
64
- badge: () => B(z.FmPill, { variant: "premium" })
66
+ badge: () => z(q.FmPill, { variant: "premium" })
65
67
  },
66
68
  {
67
69
  label: e("connect.navigation.credit"),
@@ -70,7 +72,7 @@ const Cn = { class: "flex flex-col h-full justify-between py-16" }, On = { class
70
72
  {
71
73
  label: e("connect.navigation.game"),
72
74
  value: f["$connect-PROGRAM_GAME"],
73
- badge: () => B(z.FmPill, { variant: "premium" })
75
+ badge: () => z(q.FmPill, { variant: "premium" })
74
76
  },
75
77
  {
76
78
  label: "Mission",
@@ -89,19 +91,19 @@ const Cn = { class: "flex flex-col h-full justify-between py-16" }, On = { class
89
91
  {
90
92
  label: e("connect.navigation.segments"),
91
93
  value: f["$connect-LOYALTY_SEGMENT"],
92
- badge: () => B(z.FmPill, { variant: "premium" })
94
+ badge: () => z(q.FmPill, { variant: "premium" })
93
95
  },
94
96
  {
95
97
  label: e("connect.navigation.card"),
96
98
  value: f["$connect-LOYALTY_CARD"],
97
- badge: () => B(z.FmPill, { variant: "premium" })
99
+ badge: () => z(q.FmPill, { variant: "premium" })
98
100
  }
99
101
  ]
100
102
  },
101
103
  {
102
104
  label: e("connect.navigation.referral"),
103
105
  value: f["$connect-REFERRAL"],
104
- badge: () => B(z.FmPill, { variant: "premium" })
106
+ badge: () => z(q.FmPill, { variant: "premium" })
105
107
  },
106
108
  {
107
109
  label: e("connect.navigation.store"),
@@ -131,11 +133,11 @@ const Cn = { class: "flex flex-col h-full justify-between py-16" }, On = { class
131
133
  label: e("connect.navigation.bin"),
132
134
  value: f["$connect-BIN"]
133
135
  }
134
- ], r = sn(), s = mt(), o = i.reduce((d, h) => [...(h.children ?? []).map((p) => p.value), ...d, h.value], []), c = be(), a = Ee(() => {
136
+ ], r = sn(), s = gt(), o = i.reduce((d, h) => [...(h.children ?? []).map((p) => p.value), ...d, h.value], []), c = Se(), a = ke(() => {
135
137
  const d = c.currentCountry.value || "MY";
136
- return console.log(`[MF] Timezone set to: ${Be[d]}`), Be[d];
138
+ return console.log(`[MF] Timezone set to: ${ze[d]}`), ze[d];
137
139
  });
138
- ft(
140
+ pt(
139
141
  () => s,
140
142
  (d) => {
141
143
  const h = d.matched.map((p) => p.name).reverse();
@@ -143,28 +145,28 @@ const Cn = { class: "flex flex-col h-full justify-between py-16" }, On = { class
143
145
  },
144
146
  { immediate: !0 }
145
147
  );
146
- async function l(d) {
148
+ async function u(d) {
147
149
  await r.push({ name: d });
148
150
  }
149
151
  return (d, h) => {
150
- var w;
151
- const p = Zt("FmCollapsibleTabs");
152
- return ne(), ke("div", Cn, [
153
- pt(p, {
152
+ var I;
153
+ const p = en("FmCollapsibleTabs");
154
+ return K(), be("div", Nn, [
155
+ mt(p, {
154
156
  class: "border-fm-color-neutral-gray-100 border-r px-4",
155
- "model-value": (w = v(t)) == null ? void 0 : w.toString(),
157
+ "model-value": (I = v(t)) == null ? void 0 : I.toString(),
156
158
  items: i,
157
- "onUpdate:modelValue": l
159
+ "onUpdate:modelValue": u
158
160
  }, null, 8, ["model-value"]),
159
- ie("div", On, [
160
- ie("div", null, "Timezone: " + je(v(a).split("/")[1].replace("_", " ")), 1),
161
- ie("div", null, "(UTC" + je(v(fn).tz(v(a)).format("Z")) + ")", 1)
161
+ re("div", Ln, [
162
+ re("div", null, "Timezone: " + Ge(v(a).split("/")[1].replace("_", " ")), 1),
163
+ re("div", null, "(UTC" + Ge(v(fn).tz(v(a)).format("Z")) + ")", 1)
162
164
  ])
163
165
  ]);
164
166
  };
165
167
  }
166
168
  });
167
- var Ln = "firebase", Mn = "10.12.4";
169
+ var Un = "firebase", Dn = "10.12.4";
168
170
  /**
169
171
  * @license
170
172
  * Copyright 2020 Google LLC
@@ -181,13 +183,13 @@ var Ln = "firebase", Mn = "10.12.4";
181
183
  * See the License for the specific language governing permissions and
182
184
  * limitations under the License.
183
185
  */
184
- Se(Ln, Mn, "app");
185
- function It() {
186
+ Re(Un, Dn, "app");
187
+ function Tt() {
186
188
  return {
187
189
  "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."
188
190
  };
189
191
  }
190
- const Un = It, Tt = new Ce("auth", "Firebase", It());
192
+ const Fn = Tt, yt = new Oe("auth", "Firebase", Tt());
191
193
  /**
192
194
  * @license
193
195
  * Copyright 2020 Google LLC
@@ -204,12 +206,12 @@ const Un = It, Tt = new Ce("auth", "Firebase", It());
204
206
  * See the License for the specific language governing permissions and
205
207
  * limitations under the License.
206
208
  */
207
- const ce = new mn("@firebase/auth");
208
- function Dn(n, ...e) {
209
- ce.logLevel <= vt.WARN && ce.warn(`Auth (${J}): ${n}`, ...e);
209
+ const le = new _n("@firebase/auth");
210
+ function xn(n, ...e) {
211
+ le.logLevel <= It.WARN && le.warn(`Auth (${X}): ${n}`, ...e);
210
212
  }
211
- function re(n, ...e) {
212
- ce.logLevel <= vt.ERROR && ce.error(`Auth (${J}): ${n}`, ...e);
213
+ function se(n, ...e) {
214
+ le.logLevel <= It.ERROR && le.error(`Auth (${X}): ${n}`, ...e);
213
215
  }
214
216
  /**
215
217
  * @license
@@ -228,34 +230,34 @@ function re(n, ...e) {
228
230
  * limitations under the License.
229
231
  */
230
232
  function R(n, ...e) {
231
- throw Le(n, ...e);
233
+ throw Me(n, ...e);
232
234
  }
233
- function T(n, ...e) {
234
- return Le(n, ...e);
235
+ function y(n, ...e) {
236
+ return Me(n, ...e);
235
237
  }
236
- function yt(n, e, t) {
237
- const i = Object.assign(Object.assign({}, Un()), { [e]: t });
238
- return new Ce("auth", "Firebase", i).create(e, {
238
+ function wt(n, e, t) {
239
+ const i = Object.assign(Object.assign({}, Fn()), { [e]: t });
240
+ return new Oe("auth", "Firebase", i).create(e, {
239
241
  appName: n.name
240
242
  });
241
243
  }
242
244
  function M(n) {
243
- return yt(n, "operation-not-supported-in-this-environment", "Operations that alter the current user are not supported in conjunction with FirebaseServerApp");
245
+ return wt(n, "operation-not-supported-in-this-environment", "Operations that alter the current user are not supported in conjunction with FirebaseServerApp");
244
246
  }
245
- function Le(n, ...e) {
247
+ function Me(n, ...e) {
246
248
  if (typeof n != "string") {
247
249
  const t = e[0], i = [...e.slice(1)];
248
250
  return i[0] && (i[0].appName = n.name), n._errorFactory.create(t, ...i);
249
251
  }
250
- return Tt.create(n, ...e);
252
+ return yt.create(n, ...e);
251
253
  }
252
- function u(n, e, ...t) {
254
+ function l(n, e, ...t) {
253
255
  if (!n)
254
- throw Le(e, ...t);
256
+ throw Me(e, ...t);
255
257
  }
256
258
  function k(n) {
257
259
  const e = "INTERNAL ASSERTION FAILED: " + n;
258
- throw re(e), new Error(e);
260
+ throw se(e), new Error(e);
259
261
  }
260
262
  function A(n, e) {
261
263
  n || k(e);
@@ -276,14 +278,14 @@ function A(n, e) {
276
278
  * See the License for the specific language governing permissions and
277
279
  * limitations under the License.
278
280
  */
279
- function Re() {
281
+ function Ae() {
280
282
  var n;
281
283
  return typeof self < "u" && ((n = self.location) === null || n === void 0 ? void 0 : n.href) || "";
282
284
  }
283
- function Fn() {
284
- return Je() === "http:" || Je() === "https:";
285
+ function Vn() {
286
+ return Ye() === "http:" || Ye() === "https:";
285
287
  }
286
- function Je() {
288
+ function Ye() {
287
289
  var n;
288
290
  return typeof self < "u" && ((n = self.location) === null || n === void 0 ? void 0 : n.protocol) || null;
289
291
  }
@@ -303,15 +305,15 @@ function Je() {
303
305
  * See the License for the specific language governing permissions and
304
306
  * limitations under the License.
305
307
  */
306
- function xn() {
308
+ function $n() {
307
309
  return typeof navigator < "u" && navigator && "onLine" in navigator && typeof navigator.onLine == "boolean" && // Apply only for traditional web apps and Chrome extensions.
308
310
  // This is especially true for Cordova apps which have unreliable
309
311
  // navigator.onLine behavior unless cordova-plugin-network-information is
310
312
  // installed which overwrites the native navigator.onLine value and
311
313
  // defines navigator.connection.
312
- (Fn() || vn() || "connection" in navigator) ? navigator.onLine : !0;
314
+ (Vn() || Tn() || "connection" in navigator) ? navigator.onLine : !0;
313
315
  }
314
- function Vn() {
316
+ function Hn() {
315
317
  if (typeof navigator > "u")
316
318
  return null;
317
319
  const n = navigator;
@@ -339,12 +341,12 @@ function Vn() {
339
341
  * See the License for the specific language governing permissions and
340
342
  * limitations under the License.
341
343
  */
342
- class X {
344
+ class Z {
343
345
  constructor(e, t) {
344
- this.shortDelay = e, this.longDelay = t, A(t > e, "Short delay should be less than long delay!"), this.isMobile = gn() || _n();
346
+ this.shortDelay = e, this.longDelay = t, A(t > e, "Short delay should be less than long delay!"), this.isMobile = vn() || In();
345
347
  }
346
348
  get() {
347
- return xn() ? this.isMobile ? this.longDelay : this.shortDelay : Math.min(5e3, this.shortDelay);
349
+ return $n() ? this.isMobile ? this.longDelay : this.shortDelay : Math.min(5e3, this.shortDelay);
348
350
  }
349
351
  }
350
352
  /**
@@ -363,7 +365,7 @@ class X {
363
365
  * See the License for the specific language governing permissions and
364
366
  * limitations under the License.
365
367
  */
366
- function Me(n, e) {
368
+ function Ue(n, e) {
367
369
  A(n.emulator, "Emulator should always be set here");
368
370
  const { url: t } = n.emulator;
369
371
  return e ? `${t}${e.startsWith("/") ? e.slice(1) : e}` : t;
@@ -384,7 +386,7 @@ function Me(n, e) {
384
386
  * See the License for the specific language governing permissions and
385
387
  * limitations under the License.
386
388
  */
387
- class wt {
389
+ class Et {
388
390
  static initialize(e, t, i) {
389
391
  this.fetchImpl = e, t && (this.headersImpl = t), i && (this.responseImpl = i);
390
392
  }
@@ -438,7 +440,7 @@ class wt {
438
440
  * See the License for the specific language governing permissions and
439
441
  * limitations under the License.
440
442
  */
441
- const $n = {
443
+ const Wn = {
442
444
  // Custom token errors.
443
445
  CREDENTIAL_MISMATCH: "custom-token-mismatch",
444
446
  // This can only happen if the SDK sends a bad request.
@@ -529,93 +531,93 @@ const $n = {
529
531
  * See the License for the specific language governing permissions and
530
532
  * limitations under the License.
531
533
  */
532
- const Hn = new X(3e4, 6e4);
533
- function fe(n, e) {
534
+ const jn = new Z(3e4, 6e4);
535
+ function pe(n, e) {
534
536
  return n.tenantId && !e.tenantId ? Object.assign(Object.assign({}, e), { tenantId: n.tenantId }) : e;
535
537
  }
536
538
  async function G(n, e, t, i, r = {}) {
537
- return Et(n, r, async () => {
539
+ return kt(n, r, async () => {
538
540
  let s = {}, o = {};
539
541
  i && (e === "GET" ? o = i : s = {
540
542
  body: JSON.stringify(i)
541
543
  });
542
- const c = Y(Object.assign({ key: n.config.apiKey }, o)).slice(1), a = await n._getAdditionalHeaders();
544
+ const c = Q(Object.assign({ key: n.config.apiKey }, o)).slice(1), a = await n._getAdditionalHeaders();
543
545
  return a[
544
546
  "Content-Type"
545
547
  /* HttpHeader.CONTENT_TYPE */
546
548
  ] = "application/json", n.languageCode && (a[
547
549
  "X-Firebase-Locale"
548
550
  /* HttpHeader.X_FIREBASE_LOCALE */
549
- ] = n.languageCode), wt.fetch()(bt(n, n.config.apiHost, t, c), Object.assign({
551
+ ] = n.languageCode), Et.fetch()(St(n, n.config.apiHost, t, c), Object.assign({
550
552
  method: e,
551
553
  headers: a,
552
554
  referrerPolicy: "no-referrer"
553
555
  }, s));
554
556
  });
555
557
  }
556
- async function Et(n, e, t) {
558
+ async function kt(n, e, t) {
557
559
  n._canInitEmulator = !1;
558
- const i = Object.assign(Object.assign({}, $n), e);
560
+ const i = Object.assign(Object.assign({}, Wn), e);
559
561
  try {
560
- const r = new Wn(n), s = await Promise.race([
562
+ const r = new Gn(n), s = await Promise.race([
561
563
  t(),
562
564
  r.promise
563
565
  ]);
564
566
  r.clearNetworkTimeout();
565
567
  const o = await s.json();
566
568
  if ("needConfirmation" in o)
567
- throw ee(n, "account-exists-with-different-credential", o);
569
+ throw ne(n, "account-exists-with-different-credential", o);
568
570
  if (s.ok && !("errorMessage" in o))
569
571
  return o;
570
572
  {
571
- const c = s.ok ? o.errorMessage : o.error.message, [a, l] = c.split(" : ");
573
+ const c = s.ok ? o.errorMessage : o.error.message, [a, u] = c.split(" : ");
572
574
  if (a === "FEDERATED_USER_ID_ALREADY_LINKED")
573
- throw ee(n, "credential-already-in-use", o);
575
+ throw ne(n, "credential-already-in-use", o);
574
576
  if (a === "EMAIL_EXISTS")
575
- throw ee(n, "email-already-in-use", o);
577
+ throw ne(n, "email-already-in-use", o);
576
578
  if (a === "USER_DISABLED")
577
- throw ee(n, "user-disabled", o);
579
+ throw ne(n, "user-disabled", o);
578
580
  const d = i[a] || a.toLowerCase().replace(/[_\s]+/g, "-");
579
- if (l)
580
- throw yt(n, d, l);
581
+ if (u)
582
+ throw wt(n, d, u);
581
583
  R(n, d);
582
584
  }
583
585
  } catch (r) {
584
- if (r instanceof Oe)
586
+ if (r instanceof Ne)
585
587
  throw r;
586
588
  R(n, "network-request-failed", { message: String(r) });
587
589
  }
588
590
  }
589
- async function kt(n, e, t, i, r = {}) {
591
+ async function bt(n, e, t, i, r = {}) {
590
592
  const s = await G(n, e, t, i, r);
591
593
  return "mfaPendingCredential" in s && R(n, "multi-factor-auth-required", {
592
594
  _serverResponse: s
593
595
  }), s;
594
596
  }
595
- function bt(n, e, t, i) {
597
+ function St(n, e, t, i) {
596
598
  const r = `${e}${t}?${i}`;
597
- return n.config.emulator ? Me(n.config, r) : `${n.config.apiScheme}://${r}`;
599
+ return n.config.emulator ? Ue(n.config, r) : `${n.config.apiScheme}://${r}`;
598
600
  }
599
- class Wn {
601
+ class Gn {
600
602
  constructor(e) {
601
603
  this.auth = e, this.timer = null, this.promise = new Promise((t, i) => {
602
- this.timer = setTimeout(() => i(T(
604
+ this.timer = setTimeout(() => i(y(
603
605
  this.auth,
604
606
  "network-request-failed"
605
607
  /* AuthErrorCode.NETWORK_REQUEST_FAILED */
606
- )), Hn.get());
608
+ )), jn.get());
607
609
  });
608
610
  }
609
611
  clearNetworkTimeout() {
610
612
  clearTimeout(this.timer);
611
613
  }
612
614
  }
613
- function ee(n, e, t) {
615
+ function ne(n, e, t) {
614
616
  const i = {
615
617
  appName: n.name
616
618
  };
617
619
  t.email && (i.email = t.email), t.phoneNumber && (i.phoneNumber = t.phoneNumber);
618
- const r = T(n, e, i);
620
+ const r = y(n, e, i);
619
621
  return r.customData._tokenResponse = t, r;
620
622
  }
621
623
  /**
@@ -634,10 +636,10 @@ function ee(n, e, t) {
634
636
  * See the License for the specific language governing permissions and
635
637
  * limitations under the License.
636
638
  */
637
- async function jn(n, e) {
639
+ async function Bn(n, e) {
638
640
  return G(n, "POST", "/v1/accounts:delete", e);
639
641
  }
640
- async function St(n, e) {
642
+ async function Rt(n, e) {
641
643
  return G(n, "POST", "/v1/accounts:lookup", e);
642
644
  }
643
645
  /**
@@ -656,7 +658,7 @@ async function St(n, e) {
656
658
  * See the License for the specific language governing permissions and
657
659
  * limitations under the License.
658
660
  */
659
- function q(n) {
661
+ function J(n) {
660
662
  if (n)
661
663
  try {
662
664
  const e = new Date(Number(n));
@@ -665,9 +667,9 @@ function q(n) {
665
667
  } catch {
666
668
  }
667
669
  }
668
- async function Gn(n, e = !1) {
669
- const t = j(n), i = await t.getIdToken(e), r = Ue(i);
670
- u(
670
+ async function zn(n, e = !1) {
671
+ const t = j(n), i = await t.getIdToken(e), r = De(i);
672
+ l(
671
673
  r && r.exp && r.auth_time && r.iat,
672
674
  t.auth,
673
675
  "internal-error"
@@ -677,38 +679,38 @@ async function Gn(n, e = !1) {
677
679
  return {
678
680
  claims: r,
679
681
  token: i,
680
- authTime: q(ye(r.auth_time)),
681
- issuedAtTime: q(ye(r.iat)),
682
- expirationTime: q(ye(r.exp)),
682
+ authTime: J(we(r.auth_time)),
683
+ issuedAtTime: J(we(r.iat)),
684
+ expirationTime: J(we(r.exp)),
683
685
  signInProvider: o || null,
684
686
  signInSecondFactor: (s == null ? void 0 : s.sign_in_second_factor) || null
685
687
  };
686
688
  }
687
- function ye(n) {
689
+ function we(n) {
688
690
  return Number(n) * 1e3;
689
691
  }
690
- function Ue(n) {
692
+ function De(n) {
691
693
  const [e, t, i] = n.split(".");
692
694
  if (e === void 0 || t === void 0 || i === void 0)
693
- return re("JWT malformed, contained fewer than 3 sections"), null;
695
+ return se("JWT malformed, contained fewer than 3 sections"), null;
694
696
  try {
695
- const r = En(t);
696
- return r ? JSON.parse(r) : (re("Failed to decode base64 JWT payload"), null);
697
+ const r = bn(t);
698
+ return r ? JSON.parse(r) : (se("Failed to decode base64 JWT payload"), null);
697
699
  } catch (r) {
698
- return re("Caught error parsing JWT payload as JSON", r == null ? void 0 : r.toString()), null;
700
+ return se("Caught error parsing JWT payload as JSON", r == null ? void 0 : r.toString()), null;
699
701
  }
700
702
  }
701
- function Ye(n) {
702
- const e = Ue(n);
703
- return u(
703
+ function Xe(n) {
704
+ const e = De(n);
705
+ return l(
704
706
  e,
705
707
  "internal-error"
706
708
  /* AuthErrorCode.INTERNAL_ERROR */
707
- ), u(
709
+ ), l(
708
710
  typeof e.exp < "u",
709
711
  "internal-error"
710
712
  /* AuthErrorCode.INTERNAL_ERROR */
711
- ), u(
713
+ ), l(
712
714
  typeof e.iat < "u",
713
715
  "internal-error"
714
716
  /* AuthErrorCode.INTERNAL_ERROR */
@@ -730,16 +732,16 @@ function Ye(n) {
730
732
  * See the License for the specific language governing permissions and
731
733
  * limitations under the License.
732
734
  */
733
- async function K(n, e, t = !1) {
735
+ async function Y(n, e, t = !1) {
734
736
  if (t)
735
737
  return e;
736
738
  try {
737
739
  return await e;
738
740
  } catch (i) {
739
- throw i instanceof Oe && Bn(i) && n.auth.currentUser === n && await n.auth.signOut(), i;
741
+ throw i instanceof Ne && qn(i) && n.auth.currentUser === n && await n.auth.signOut(), i;
740
742
  }
741
743
  }
742
- function Bn({ code: n }) {
744
+ function qn({ code: n }) {
743
745
  return n === "auth/user-disabled" || n === "auth/user-token-expired";
744
746
  }
745
747
  /**
@@ -758,7 +760,7 @@ function Bn({ code: n }) {
758
760
  * See the License for the specific language governing permissions and
759
761
  * limitations under the License.
760
762
  */
761
- class zn {
763
+ class Kn {
762
764
  constructor(e) {
763
765
  this.user = e, this.isRunning = !1, this.timerId = null, this.errorBackoff = 3e4;
764
766
  }
@@ -820,12 +822,12 @@ class zn {
820
822
  * See the License for the specific language governing permissions and
821
823
  * limitations under the License.
822
824
  */
823
- class Ae {
825
+ class Pe {
824
826
  constructor(e, t) {
825
827
  this.createdAt = e, this.lastLoginAt = t, this._initializeTime();
826
828
  }
827
829
  _initializeTime() {
828
- this.lastSignInTime = q(this.lastLoginAt), this.creationTime = q(this.createdAt);
830
+ this.lastSignInTime = J(this.lastLoginAt), this.creationTime = J(this.createdAt);
829
831
  }
830
832
  _copy(e) {
831
833
  this.createdAt = e.createdAt, this.lastLoginAt = e.lastLoginAt, this._initializeTime();
@@ -853,10 +855,10 @@ class Ae {
853
855
  * See the License for the specific language governing permissions and
854
856
  * limitations under the License.
855
857
  */
856
- async function le(n) {
858
+ async function ue(n) {
857
859
  var e;
858
- const t = n.auth, i = await n.getIdToken(), r = await K(n, St(t, { idToken: i }));
859
- u(
860
+ const t = n.auth, i = await n.getIdToken(), r = await Y(n, Rt(t, { idToken: i }));
861
+ l(
860
862
  r == null ? void 0 : r.users.length,
861
863
  t,
862
864
  "internal-error"
@@ -864,7 +866,7 @@ async function le(n) {
864
866
  );
865
867
  const s = r.users[0];
866
868
  n._notifyReloadListener(s);
867
- const o = !((e = s.providerUserInfo) === null || e === void 0) && e.length ? Rt(s.providerUserInfo) : [], c = Kn(n.providerData, o), a = n.isAnonymous, l = !(n.email && s.passwordHash) && !(c != null && c.length), d = a ? l : !1, h = {
869
+ const o = !((e = s.providerUserInfo) === null || e === void 0) && e.length ? At(s.providerUserInfo) : [], c = Yn(n.providerData, o), a = n.isAnonymous, u = !(n.email && s.passwordHash) && !(c != null && c.length), d = a ? u : !1, h = {
868
870
  uid: s.localId,
869
871
  displayName: s.displayName || null,
870
872
  photoURL: s.photoUrl || null,
@@ -873,21 +875,21 @@ async function le(n) {
873
875
  phoneNumber: s.phoneNumber || null,
874
876
  tenantId: s.tenantId || null,
875
877
  providerData: c,
876
- metadata: new Ae(s.createdAt, s.lastLoginAt),
878
+ metadata: new Pe(s.createdAt, s.lastLoginAt),
877
879
  isAnonymous: d
878
880
  };
879
881
  Object.assign(n, h);
880
882
  }
881
- async function qn(n) {
883
+ async function Jn(n) {
882
884
  const e = j(n);
883
- await le(e), await e.auth._persistUserIfCurrent(e), e.auth._notifyListenersIfCurrent(e);
885
+ await ue(e), await e.auth._persistUserIfCurrent(e), e.auth._notifyListenersIfCurrent(e);
884
886
  }
885
- function Kn(n, e) {
887
+ function Yn(n, e) {
886
888
  return [...n.filter((i) => !e.some((r) => r.providerId === i.providerId)), ...e];
887
889
  }
888
- function Rt(n) {
890
+ function At(n) {
889
891
  return n.map((e) => {
890
- var { providerId: t } = e, i = Ne(e, ["providerId"]);
892
+ var { providerId: t } = e, i = Le(e, ["providerId"]);
891
893
  return {
892
894
  providerId: t,
893
895
  uid: i.rawId || "",
@@ -914,16 +916,16 @@ function Rt(n) {
914
916
  * See the License for the specific language governing permissions and
915
917
  * limitations under the License.
916
918
  */
917
- async function Jn(n, e) {
918
- const t = await Et(n, {}, async () => {
919
- const i = Y({
919
+ async function Xn(n, e) {
920
+ const t = await kt(n, {}, async () => {
921
+ const i = Q({
920
922
  grant_type: "refresh_token",
921
923
  refresh_token: e
922
- }).slice(1), { tokenApiHost: r, apiKey: s } = n.config, o = bt(n, r, "/v1/token", `key=${s}`), c = await n._getAdditionalHeaders();
924
+ }).slice(1), { tokenApiHost: r, apiKey: s } = n.config, o = St(n, r, "/v1/token", `key=${s}`), c = await n._getAdditionalHeaders();
923
925
  return c[
924
926
  "Content-Type"
925
927
  /* HttpHeader.CONTENT_TYPE */
926
- ] = "application/x-www-form-urlencoded", wt.fetch()(o, {
928
+ ] = "application/x-www-form-urlencoded", Et.fetch()(o, {
927
929
  method: "POST",
928
930
  headers: c,
929
931
  body: i
@@ -935,8 +937,8 @@ async function Jn(n, e) {
935
937
  refreshToken: t.refresh_token
936
938
  };
937
939
  }
938
- async function Yn(n, e) {
939
- return G(n, "POST", "/v2/accounts:revokeToken", fe(n, e));
940
+ async function Qn(n, e) {
941
+ return G(n, "POST", "/v2/accounts:revokeToken", pe(n, e));
940
942
  }
941
943
  /**
942
944
  * @license
@@ -962,33 +964,33 @@ class $ {
962
964
  return !this.expirationTime || Date.now() > this.expirationTime - 3e4;
963
965
  }
964
966
  updateFromServerResponse(e) {
965
- u(
967
+ l(
966
968
  e.idToken,
967
969
  "internal-error"
968
970
  /* AuthErrorCode.INTERNAL_ERROR */
969
- ), u(
971
+ ), l(
970
972
  typeof e.idToken < "u",
971
973
  "internal-error"
972
974
  /* AuthErrorCode.INTERNAL_ERROR */
973
- ), u(
975
+ ), l(
974
976
  typeof e.refreshToken < "u",
975
977
  "internal-error"
976
978
  /* AuthErrorCode.INTERNAL_ERROR */
977
979
  );
978
- const t = "expiresIn" in e && typeof e.expiresIn < "u" ? Number(e.expiresIn) : Ye(e.idToken);
980
+ const t = "expiresIn" in e && typeof e.expiresIn < "u" ? Number(e.expiresIn) : Xe(e.idToken);
979
981
  this.updateTokensAndExpiration(e.idToken, e.refreshToken, t);
980
982
  }
981
983
  updateFromIdToken(e) {
982
- u(
984
+ l(
983
985
  e.length !== 0,
984
986
  "internal-error"
985
987
  /* AuthErrorCode.INTERNAL_ERROR */
986
988
  );
987
- const t = Ye(e);
989
+ const t = Xe(e);
988
990
  this.updateTokensAndExpiration(e, null, t);
989
991
  }
990
992
  async getToken(e, t = !1) {
991
- return !t && this.accessToken && !this.isExpired ? this.accessToken : (u(
993
+ return !t && this.accessToken && !this.isExpired ? this.accessToken : (l(
992
994
  this.refreshToken,
993
995
  e,
994
996
  "user-token-expired"
@@ -999,7 +1001,7 @@ class $ {
999
1001
  this.refreshToken = null;
1000
1002
  }
1001
1003
  async refresh(e, t) {
1002
- const { accessToken: i, refreshToken: r, expiresIn: s } = await Jn(e, t);
1004
+ const { accessToken: i, refreshToken: r, expiresIn: s } = await Xn(e, t);
1003
1005
  this.updateTokensAndExpiration(i, r, Number(s));
1004
1006
  }
1005
1007
  updateTokensAndExpiration(e, t, i) {
@@ -1007,11 +1009,11 @@ class $ {
1007
1009
  }
1008
1010
  static fromJSON(e, t) {
1009
1011
  const { refreshToken: i, accessToken: r, expirationTime: s } = t, o = new $();
1010
- return i && (u(typeof i == "string", "internal-error", {
1012
+ return i && (l(typeof i == "string", "internal-error", {
1011
1013
  appName: e
1012
- }), o.refreshToken = i), r && (u(typeof r == "string", "internal-error", {
1014
+ }), o.refreshToken = i), r && (l(typeof r == "string", "internal-error", {
1013
1015
  appName: e
1014
- }), o.accessToken = r), s && (u(typeof s == "number", "internal-error", {
1016
+ }), o.accessToken = r), s && (l(typeof s == "number", "internal-error", {
1015
1017
  appName: e
1016
1018
  }), o.expirationTime = s), o;
1017
1019
  }
@@ -1049,16 +1051,16 @@ class $ {
1049
1051
  * limitations under the License.
1050
1052
  */
1051
1053
  function P(n, e) {
1052
- u(typeof n == "string" || typeof n > "u", "internal-error", { appName: e });
1054
+ l(typeof n == "string" || typeof n > "u", "internal-error", { appName: e });
1053
1055
  }
1054
1056
  class b {
1055
1057
  constructor(e) {
1056
- var { uid: t, auth: i, stsTokenManager: r } = e, s = Ne(e, ["uid", "auth", "stsTokenManager"]);
1057
- this.providerId = "firebase", this.proactiveRefresh = new zn(this), this.reloadUserInfo = null, this.reloadListener = null, this.uid = t, this.auth = i, this.stsTokenManager = r, this.accessToken = r.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 Ae(s.createdAt || void 0, s.lastLoginAt || void 0);
1058
+ var { uid: t, auth: i, stsTokenManager: r } = e, s = Le(e, ["uid", "auth", "stsTokenManager"]);
1059
+ this.providerId = "firebase", this.proactiveRefresh = new Kn(this), this.reloadUserInfo = null, this.reloadListener = null, this.uid = t, this.auth = i, this.stsTokenManager = r, this.accessToken = r.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 Pe(s.createdAt || void 0, s.lastLoginAt || void 0);
1058
1060
  }
1059
1061
  async getIdToken(e) {
1060
- const t = await K(this, this.stsTokenManager.getToken(this.auth, e));
1061
- return u(
1062
+ const t = await Y(this, this.stsTokenManager.getToken(this.auth, e));
1063
+ return l(
1062
1064
  t,
1063
1065
  this.auth,
1064
1066
  "internal-error"
@@ -1066,13 +1068,13 @@ class b {
1066
1068
  ), this.accessToken !== t && (this.accessToken = t, await this.auth._persistUserIfCurrent(this), this.auth._notifyListenersIfCurrent(this)), t;
1067
1069
  }
1068
1070
  getIdTokenResult(e) {
1069
- return Gn(this, e);
1071
+ return zn(this, e);
1070
1072
  }
1071
1073
  reload() {
1072
- return qn(this);
1074
+ return Jn(this);
1073
1075
  }
1074
1076
  _assign(e) {
1075
- this !== e && (u(
1077
+ this !== e && (l(
1076
1078
  this.uid === e.uid,
1077
1079
  this.auth,
1078
1080
  "internal-error"
@@ -1084,7 +1086,7 @@ class b {
1084
1086
  return t.metadata._copy(this.metadata), t;
1085
1087
  }
1086
1088
  _onReload(e) {
1087
- u(
1089
+ l(
1088
1090
  !this.reloadListener,
1089
1091
  this.auth,
1090
1092
  "internal-error"
@@ -1102,13 +1104,13 @@ class b {
1102
1104
  }
1103
1105
  async _updateTokensIfNecessary(e, t = !1) {
1104
1106
  let i = !1;
1105
- e.idToken && e.idToken !== this.stsTokenManager.accessToken && (this.stsTokenManager.updateFromServerResponse(e), i = !0), t && await le(this), await this.auth._persistUserIfCurrent(this), i && this.auth._notifyListenersIfCurrent(this);
1107
+ e.idToken && e.idToken !== this.stsTokenManager.accessToken && (this.stsTokenManager.updateFromServerResponse(e), i = !0), t && await ue(this), await this.auth._persistUserIfCurrent(this), i && this.auth._notifyListenersIfCurrent(this);
1106
1108
  }
1107
1109
  async delete() {
1108
1110
  if (E(this.auth.app))
1109
1111
  return Promise.reject(M(this.auth));
1110
1112
  const e = await this.getIdToken();
1111
- return await K(this, jn(this.auth, { idToken: e })), this.stsTokenManager.clearRefreshToken(), this.auth.signOut();
1113
+ return await Y(this, Bn(this.auth, { idToken: e })), this.stsTokenManager.clearRefreshToken(), this.auth.signOut();
1112
1114
  }
1113
1115
  toJSON() {
1114
1116
  return Object.assign(Object.assign({
@@ -1135,46 +1137,46 @@ class b {
1135
1137
  return this.stsTokenManager.refreshToken || "";
1136
1138
  }
1137
1139
  static _fromJSON(e, t) {
1138
- var i, r, s, o, c, a, l, d;
1139
- const h = (i = t.displayName) !== null && i !== void 0 ? i : void 0, p = (r = t.email) !== null && r !== void 0 ? r : void 0, w = (s = t.phoneNumber) !== null && s !== void 0 ? s : void 0, U = (o = t.photoURL) !== null && o !== void 0 ? o : void 0, m = (c = t.tenantId) !== null && c !== void 0 ? c : void 0, g = (a = t._redirectEventId) !== null && a !== void 0 ? a : void 0, I = (l = t.createdAt) !== null && l !== void 0 ? l : void 0, x = (d = t.lastLoginAt) !== null && d !== void 0 ? d : void 0, { uid: ve, emailVerified: $e, isAnonymous: He, providerData: Ie, stsTokenManager: We } = t;
1140
- u(
1141
- ve && We,
1140
+ var i, r, s, o, c, a, u, d;
1141
+ const h = (i = t.displayName) !== null && i !== void 0 ? i : void 0, p = (r = t.email) !== null && r !== void 0 ? r : void 0, I = (s = t.phoneNumber) !== null && s !== void 0 ? s : void 0, x = (o = t.photoURL) !== null && o !== void 0 ? o : void 0, B = (c = t.tenantId) !== null && c !== void 0 ? c : void 0, m = (a = t._redirectEventId) !== null && a !== void 0 ? a : void 0, g = (u = t.createdAt) !== null && u !== void 0 ? u : void 0, T = (d = t.lastLoginAt) !== null && d !== void 0 ? d : void 0, { uid: U, emailVerified: He, isAnonymous: We, providerData: Ie, stsTokenManager: je } = t;
1142
+ l(
1143
+ U && je,
1142
1144
  e,
1143
1145
  "internal-error"
1144
1146
  /* AuthErrorCode.INTERNAL_ERROR */
1145
1147
  );
1146
- const Xt = $.fromJSON(this.name, We);
1147
- u(
1148
- typeof ve == "string",
1148
+ const Qt = $.fromJSON(this.name, je);
1149
+ l(
1150
+ typeof U == "string",
1149
1151
  e,
1150
1152
  "internal-error"
1151
1153
  /* AuthErrorCode.INTERNAL_ERROR */
1152
- ), P(h, e.name), P(p, e.name), u(
1153
- typeof $e == "boolean",
1154
+ ), P(h, e.name), P(p, e.name), l(
1155
+ typeof He == "boolean",
1154
1156
  e,
1155
1157
  "internal-error"
1156
1158
  /* AuthErrorCode.INTERNAL_ERROR */
1157
- ), u(
1158
- typeof He == "boolean",
1159
+ ), l(
1160
+ typeof We == "boolean",
1159
1161
  e,
1160
1162
  "internal-error"
1161
1163
  /* AuthErrorCode.INTERNAL_ERROR */
1162
- ), P(w, e.name), P(U, e.name), P(m, e.name), P(g, e.name), P(I, e.name), P(x, e.name);
1164
+ ), P(I, e.name), P(x, e.name), P(B, e.name), P(m, e.name), P(g, e.name), P(T, e.name);
1163
1165
  const Te = new b({
1164
- uid: ve,
1166
+ uid: U,
1165
1167
  auth: e,
1166
1168
  email: p,
1167
- emailVerified: $e,
1169
+ emailVerified: He,
1168
1170
  displayName: h,
1169
- isAnonymous: He,
1170
- photoURL: U,
1171
- phoneNumber: w,
1172
- tenantId: m,
1173
- stsTokenManager: Xt,
1174
- createdAt: I,
1175
- lastLoginAt: x
1171
+ isAnonymous: We,
1172
+ photoURL: x,
1173
+ phoneNumber: I,
1174
+ tenantId: B,
1175
+ stsTokenManager: Qt,
1176
+ createdAt: g,
1177
+ lastLoginAt: T
1176
1178
  });
1177
- return Ie && Array.isArray(Ie) && (Te.providerData = Ie.map((Qt) => Object.assign({}, Qt))), g && (Te._redirectEventId = g), Te;
1179
+ return Ie && Array.isArray(Ie) && (Te.providerData = Ie.map((Zt) => Object.assign({}, Zt))), m && (Te._redirectEventId = m), Te;
1178
1180
  }
1179
1181
  /**
1180
1182
  * Initialize a User from an idToken server response
@@ -1190,7 +1192,7 @@ class b {
1190
1192
  stsTokenManager: r,
1191
1193
  isAnonymous: i
1192
1194
  });
1193
- return await le(s), s;
1195
+ return await ue(s), s;
1194
1196
  }
1195
1197
  /**
1196
1198
  * Initialize a User from an idToken server response
@@ -1199,19 +1201,19 @@ class b {
1199
1201
  */
1200
1202
  static async _fromGetAccountInfoResponse(e, t, i) {
1201
1203
  const r = t.users[0];
1202
- u(
1204
+ l(
1203
1205
  r.localId !== void 0,
1204
1206
  "internal-error"
1205
1207
  /* AuthErrorCode.INTERNAL_ERROR */
1206
1208
  );
1207
- const s = r.providerUserInfo !== void 0 ? Rt(r.providerUserInfo) : [], o = !(r.email && r.passwordHash) && !(s != null && s.length), c = new $();
1209
+ const s = r.providerUserInfo !== void 0 ? At(r.providerUserInfo) : [], o = !(r.email && r.passwordHash) && !(s != null && s.length), c = new $();
1208
1210
  c.updateFromIdToken(i);
1209
1211
  const a = new b({
1210
1212
  uid: r.localId,
1211
1213
  auth: e,
1212
1214
  stsTokenManager: c,
1213
1215
  isAnonymous: o
1214
- }), l = {
1216
+ }), u = {
1215
1217
  uid: r.localId,
1216
1218
  displayName: r.displayName || null,
1217
1219
  photoURL: r.photoUrl || null,
@@ -1220,10 +1222,10 @@ class b {
1220
1222
  phoneNumber: r.phoneNumber || null,
1221
1223
  tenantId: r.tenantId || null,
1222
1224
  providerData: s,
1223
- metadata: new Ae(r.createdAt, r.lastLoginAt),
1225
+ metadata: new Pe(r.createdAt, r.lastLoginAt),
1224
1226
  isAnonymous: !(r.email && r.passwordHash) && !(s != null && s.length)
1225
1227
  };
1226
- return Object.assign(a, l), a;
1228
+ return Object.assign(a, u), a;
1227
1229
  }
1228
1230
  }
1229
1231
  /**
@@ -1242,11 +1244,11 @@ class b {
1242
1244
  * See the License for the specific language governing permissions and
1243
1245
  * limitations under the License.
1244
1246
  */
1245
- const Xe = /* @__PURE__ */ new Map();
1247
+ const Qe = /* @__PURE__ */ new Map();
1246
1248
  function S(n) {
1247
1249
  A(n instanceof Function, "Expected a class definition");
1248
- let e = Xe.get(n);
1249
- return e ? (A(e instanceof n, "Instance stored in cache mismatched with class"), e) : (e = new n(), Xe.set(n, e), e);
1250
+ let e = Qe.get(n);
1251
+ return e ? (A(e instanceof n, "Instance stored in cache mismatched with class"), e) : (e = new n(), Qe.set(n, e), e);
1250
1252
  }
1251
1253
  /**
1252
1254
  * @license
@@ -1264,7 +1266,7 @@ function S(n) {
1264
1266
  * See the License for the specific language governing permissions and
1265
1267
  * limitations under the License.
1266
1268
  */
1267
- class At {
1269
+ class Pt {
1268
1270
  constructor() {
1269
1271
  this.type = "NONE", this.storage = {};
1270
1272
  }
@@ -1286,8 +1288,8 @@ class At {
1286
1288
  _removeListener(e, t) {
1287
1289
  }
1288
1290
  }
1289
- At.type = "NONE";
1290
- const Qe = At;
1291
+ Pt.type = "NONE";
1292
+ const Ze = Pt;
1291
1293
  /**
1292
1294
  * @license
1293
1295
  * Copyright 2019 Google LLC
@@ -1304,14 +1306,14 @@ const Qe = At;
1304
1306
  * See the License for the specific language governing permissions and
1305
1307
  * limitations under the License.
1306
1308
  */
1307
- function se(n, e, t) {
1309
+ function oe(n, e, t) {
1308
1310
  return `firebase:${n}:${e}:${t}`;
1309
1311
  }
1310
1312
  class H {
1311
1313
  constructor(e, t, i) {
1312
1314
  this.persistence = e, this.auth = t, this.userKey = i;
1313
1315
  const { config: r, name: s } = this.auth;
1314
- this.fullUserKey = se(this.userKey, r.apiKey, s), this.fullPersistenceKey = se("persistence", r.apiKey, s), this.boundEventHandler = t._onStorageEvent.bind(t), this.persistence._addListener(this.fullUserKey, this.boundEventHandler);
1316
+ this.fullUserKey = oe(this.userKey, r.apiKey, s), this.fullPersistenceKey = oe("persistence", r.apiKey, s), this.boundEventHandler = t._onStorageEvent.bind(t), this.persistence._addListener(this.fullUserKey, this.boundEventHandler);
1315
1317
  }
1316
1318
  setCurrentUser(e) {
1317
1319
  return this.persistence._set(this.fullUserKey, e.toJSON());
@@ -1338,29 +1340,29 @@ class H {
1338
1340
  }
1339
1341
  static async create(e, t, i = "authUser") {
1340
1342
  if (!t.length)
1341
- return new H(S(Qe), e, i);
1342
- const r = (await Promise.all(t.map(async (l) => {
1343
- if (await l._isAvailable())
1344
- return l;
1345
- }))).filter((l) => l);
1346
- let s = r[0] || S(Qe);
1347
- const o = se(i, e.config.apiKey, e.name);
1343
+ return new H(S(Ze), e, i);
1344
+ const r = (await Promise.all(t.map(async (u) => {
1345
+ if (await u._isAvailable())
1346
+ return u;
1347
+ }))).filter((u) => u);
1348
+ let s = r[0] || S(Ze);
1349
+ const o = oe(i, e.config.apiKey, e.name);
1348
1350
  let c = null;
1349
- for (const l of t)
1351
+ for (const u of t)
1350
1352
  try {
1351
- const d = await l._get(o);
1353
+ const d = await u._get(o);
1352
1354
  if (d) {
1353
1355
  const h = b._fromJSON(e, d);
1354
- l !== s && (c = h), s = l;
1356
+ u !== s && (c = h), s = u;
1355
1357
  break;
1356
1358
  }
1357
1359
  } catch {
1358
1360
  }
1359
- const a = r.filter((l) => l._shouldAllowMigration);
1360
- return !s._shouldAllowMigration || !a.length ? new H(s, e, i) : (s = a[0], c && await s._set(o, c.toJSON()), await Promise.all(t.map(async (l) => {
1361
- if (l !== s)
1361
+ const a = r.filter((u) => u._shouldAllowMigration);
1362
+ return !s._shouldAllowMigration || !a.length ? new H(s, e, i) : (s = a[0], c && await s._set(o, c.toJSON()), await Promise.all(t.map(async (u) => {
1363
+ if (u !== s)
1362
1364
  try {
1363
- await l._remove(o);
1365
+ await u._remove(o);
1364
1366
  } catch {
1365
1367
  }
1366
1368
  })), new H(s, e, i));
@@ -1382,29 +1384,29 @@ class H {
1382
1384
  * See the License for the specific language governing permissions and
1383
1385
  * limitations under the License.
1384
1386
  */
1385
- function Ze(n) {
1387
+ function et(n) {
1386
1388
  const e = n.toLowerCase();
1387
1389
  if (e.includes("opera/") || e.includes("opr/") || e.includes("opios/"))
1388
1390
  return "Opera";
1389
- if (Ot(e))
1391
+ if (Nt(e))
1390
1392
  return "IEMobile";
1391
1393
  if (e.includes("msie") || e.includes("trident/"))
1392
1394
  return "IE";
1393
1395
  if (e.includes("edge/"))
1394
1396
  return "Edge";
1395
- if (Pt(e))
1397
+ if (Ct(e))
1396
1398
  return "Firefox";
1397
1399
  if (e.includes("silk/"))
1398
1400
  return "Silk";
1399
- if (Lt(e))
1400
- return "Blackberry";
1401
1401
  if (Mt(e))
1402
+ return "Blackberry";
1403
+ if (Ut(e))
1402
1404
  return "Webos";
1403
- if (De(e))
1405
+ if (Fe(e))
1404
1406
  return "Safari";
1405
- if ((e.includes("chrome/") || Ct(e)) && !e.includes("edge/"))
1407
+ if ((e.includes("chrome/") || Ot(e)) && !e.includes("edge/"))
1406
1408
  return "Chrome";
1407
- if (Nt(e))
1409
+ if (Lt(e))
1408
1410
  return "Android";
1409
1411
  {
1410
1412
  const t = /([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/, i = n.match(t);
@@ -1413,42 +1415,42 @@ function Ze(n) {
1413
1415
  }
1414
1416
  return "Other";
1415
1417
  }
1416
- function Pt(n = _()) {
1418
+ function Ct(n = _()) {
1417
1419
  return /firefox\//i.test(n);
1418
1420
  }
1419
- function De(n = _()) {
1421
+ function Fe(n = _()) {
1420
1422
  const e = n.toLowerCase();
1421
1423
  return e.includes("safari/") && !e.includes("chrome/") && !e.includes("crios/") && !e.includes("android");
1422
1424
  }
1423
- function Ct(n = _()) {
1425
+ function Ot(n = _()) {
1424
1426
  return /crios\//i.test(n);
1425
1427
  }
1426
- function Ot(n = _()) {
1428
+ function Nt(n = _()) {
1427
1429
  return /iemobile/i.test(n);
1428
1430
  }
1429
- function Nt(n = _()) {
1431
+ function Lt(n = _()) {
1430
1432
  return /android/i.test(n);
1431
1433
  }
1432
- function Lt(n = _()) {
1434
+ function Mt(n = _()) {
1433
1435
  return /blackberry/i.test(n);
1434
1436
  }
1435
- function Mt(n = _()) {
1437
+ function Ut(n = _()) {
1436
1438
  return /webos/i.test(n);
1437
1439
  }
1438
- function pe(n = _()) {
1440
+ function me(n = _()) {
1439
1441
  return /iphone|ipad|ipod/i.test(n) || /macintosh/i.test(n) && /mobile/i.test(n);
1440
1442
  }
1441
- function Xn(n = _()) {
1443
+ function Zn(n = _()) {
1442
1444
  var e;
1443
- return pe(n) && !!(!((e = window.navigator) === null || e === void 0) && e.standalone);
1445
+ return me(n) && !!(!((e = window.navigator) === null || e === void 0) && e.standalone);
1444
1446
  }
1445
- function Qn() {
1446
- return kn() && document.documentMode === 10;
1447
+ function ei() {
1448
+ return Sn() && document.documentMode === 10;
1447
1449
  }
1448
- function Ut(n = _()) {
1449
- return pe(n) || Nt(n) || Mt(n) || Lt(n) || /windows phone/i.test(n) || Ot(n);
1450
+ function Dt(n = _()) {
1451
+ return me(n) || Lt(n) || Ut(n) || Mt(n) || /windows phone/i.test(n) || Nt(n);
1450
1452
  }
1451
- function Zn() {
1453
+ function ti() {
1452
1454
  try {
1453
1455
  return !!(window && window !== window.top);
1454
1456
  } catch {
@@ -1471,20 +1473,20 @@ function Zn() {
1471
1473
  * See the License for the specific language governing permissions and
1472
1474
  * limitations under the License.
1473
1475
  */
1474
- function Dt(n, e = []) {
1476
+ function Ft(n, e = []) {
1475
1477
  let t;
1476
1478
  switch (n) {
1477
1479
  case "Browser":
1478
- t = Ze(_());
1480
+ t = et(_());
1479
1481
  break;
1480
1482
  case "Worker":
1481
- t = `${Ze(_())}-${n}`;
1483
+ t = `${et(_())}-${n}`;
1482
1484
  break;
1483
1485
  default:
1484
1486
  t = n;
1485
1487
  }
1486
1488
  const i = e.length ? e.join(",") : "FirebaseCore-web";
1487
- return `${t}/JsCore/${J}/${i}`;
1489
+ return `${t}/JsCore/${X}/${i}`;
1488
1490
  }
1489
1491
  /**
1490
1492
  * @license
@@ -1502,7 +1504,7 @@ function Dt(n, e = []) {
1502
1504
  * See the License for the specific language governing permissions and
1503
1505
  * limitations under the License.
1504
1506
  */
1505
- class ei {
1507
+ class ni {
1506
1508
  constructor(e) {
1507
1509
  this.auth = e, this.queue = [];
1508
1510
  }
@@ -1557,8 +1559,8 @@ class ei {
1557
1559
  * See the License for the specific language governing permissions and
1558
1560
  * limitations under the License.
1559
1561
  */
1560
- async function ti(n, e = {}) {
1561
- return G(n, "GET", "/v2/passwordPolicy", fe(n, e));
1562
+ async function ii(n, e = {}) {
1563
+ return G(n, "GET", "/v2/passwordPolicy", pe(n, e));
1562
1564
  }
1563
1565
  /**
1564
1566
  * @license
@@ -1576,12 +1578,12 @@ async function ti(n, e = {}) {
1576
1578
  * See the License for the specific language governing permissions and
1577
1579
  * limitations under the License.
1578
1580
  */
1579
- const ni = 6;
1580
- class ii {
1581
+ const ri = 6;
1582
+ class si {
1581
1583
  constructor(e) {
1582
1584
  var t, i, r, s;
1583
1585
  const o = e.customStrengthOptions;
1584
- this.customStrengthOptions = {}, this.customStrengthOptions.minPasswordLength = (t = o.minPasswordLength) !== null && t !== void 0 ? t : ni, o.maxPasswordLength && (this.customStrengthOptions.maxPasswordLength = o.maxPasswordLength), o.containsLowercaseCharacter !== void 0 && (this.customStrengthOptions.containsLowercaseLetter = o.containsLowercaseCharacter), o.containsUppercaseCharacter !== void 0 && (this.customStrengthOptions.containsUppercaseLetter = o.containsUppercaseCharacter), o.containsNumericCharacter !== void 0 && (this.customStrengthOptions.containsNumericCharacter = o.containsNumericCharacter), o.containsNonAlphanumericCharacter !== void 0 && (this.customStrengthOptions.containsNonAlphanumericCharacter = o.containsNonAlphanumericCharacter), this.enforcementState = e.enforcementState, this.enforcementState === "ENFORCEMENT_STATE_UNSPECIFIED" && (this.enforcementState = "OFF"), this.allowedNonAlphanumericCharacters = (r = (i = e.allowedNonAlphanumericCharacters) === null || i === void 0 ? void 0 : i.join("")) !== null && r !== void 0 ? r : "", this.forceUpgradeOnSignin = (s = e.forceUpgradeOnSignin) !== null && s !== void 0 ? s : !1, this.schemaVersion = e.schemaVersion;
1586
+ this.customStrengthOptions = {}, this.customStrengthOptions.minPasswordLength = (t = o.minPasswordLength) !== null && t !== void 0 ? t : ri, o.maxPasswordLength && (this.customStrengthOptions.maxPasswordLength = o.maxPasswordLength), o.containsLowercaseCharacter !== void 0 && (this.customStrengthOptions.containsLowercaseLetter = o.containsLowercaseCharacter), o.containsUppercaseCharacter !== void 0 && (this.customStrengthOptions.containsUppercaseLetter = o.containsUppercaseCharacter), o.containsNumericCharacter !== void 0 && (this.customStrengthOptions.containsNumericCharacter = o.containsNumericCharacter), o.containsNonAlphanumericCharacter !== void 0 && (this.customStrengthOptions.containsNonAlphanumericCharacter = o.containsNonAlphanumericCharacter), this.enforcementState = e.enforcementState, this.enforcementState === "ENFORCEMENT_STATE_UNSPECIFIED" && (this.enforcementState = "OFF"), this.allowedNonAlphanumericCharacters = (r = (i = e.allowedNonAlphanumericCharacters) === null || i === void 0 ? void 0 : i.join("")) !== null && r !== void 0 ? r : "", this.forceUpgradeOnSignin = (s = e.forceUpgradeOnSignin) !== null && s !== void 0 ? s : !1, this.schemaVersion = e.schemaVersion;
1585
1587
  }
1586
1588
  validatePassword(e) {
1587
1589
  var t, i, r, s, o, c;
@@ -1664,9 +1666,9 @@ class ii {
1664
1666
  * See the License for the specific language governing permissions and
1665
1667
  * limitations under the License.
1666
1668
  */
1667
- class ri {
1669
+ class oi {
1668
1670
  constructor(e, t, i, r) {
1669
- this.app = e, this.heartbeatServiceProvider = t, this.appCheckServiceProvider = i, this.config = r, this.currentUser = null, this.emulatorConfig = null, this.operations = Promise.resolve(), this.authStateSubscription = new et(this), this.idTokenSubscription = new et(this), this.beforeStateQueue = new ei(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 = Tt, 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 = r.sdkClientVersion;
1671
+ this.app = e, this.heartbeatServiceProvider = t, this.appCheckServiceProvider = i, this.config = r, this.currentUser = null, this.emulatorConfig = null, this.operations = Promise.resolve(), this.authStateSubscription = new tt(this), this.idTokenSubscription = new tt(this), this.beforeStateQueue = new ni(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 = yt, 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 = r.sdkClientVersion;
1670
1672
  }
1671
1673
  _initializeWithPersistence(e, t) {
1672
1674
  return t && (this._popupRedirectResolver = S(t)), this._initializationPromise = this.queue(async () => {
@@ -1702,7 +1704,7 @@ class ri {
1702
1704
  }
1703
1705
  async initializeCurrentUserFromIdToken(e) {
1704
1706
  try {
1705
- const t = await St(this, { idToken: e }), i = await b._fromGetAccountInfoResponse(this, t, e);
1707
+ const t = await Rt(this, { idToken: e }), i = await b._fromGetAccountInfoResponse(this, t, e);
1706
1708
  await this.directlySetCurrentUser(i);
1707
1709
  } catch (t) {
1708
1710
  console.warn("FirebaseServerApp could not login user with provided authIdToken: ", t), await this.directlySetCurrentUser(null);
@@ -1734,7 +1736,7 @@ class ri {
1734
1736
  }
1735
1737
  return r ? this.reloadAndSetCurrentUserOrClear(r) : this.directlySetCurrentUser(null);
1736
1738
  }
1737
- return u(
1739
+ return l(
1738
1740
  this._popupRedirectResolver,
1739
1741
  this,
1740
1742
  "argument-error"
@@ -1752,7 +1754,7 @@ class ri {
1752
1754
  }
1753
1755
  async reloadAndSetCurrentUserOrClear(e) {
1754
1756
  try {
1755
- await le(e);
1757
+ await ue(e);
1756
1758
  } catch (t) {
1757
1759
  if ((t == null ? void 0 : t.code) !== "auth/network-request-failed")
1758
1760
  return this.directlySetCurrentUser(null);
@@ -1760,7 +1762,7 @@ class ri {
1760
1762
  return this.directlySetCurrentUser(e);
1761
1763
  }
1762
1764
  useDeviceLanguage() {
1763
- this.languageCode = Vn();
1765
+ this.languageCode = Hn();
1764
1766
  }
1765
1767
  async _delete() {
1766
1768
  this._deleted = !0;
@@ -1769,7 +1771,7 @@ class ri {
1769
1771
  if (E(this.app))
1770
1772
  return Promise.reject(M(this));
1771
1773
  const t = e ? j(e) : null;
1772
- return t && u(
1774
+ return t && l(
1773
1775
  t.auth.config.apiKey === this.config.apiKey,
1774
1776
  this,
1775
1777
  "invalid-user-token"
@@ -1778,7 +1780,7 @@ class ri {
1778
1780
  }
1779
1781
  async _updateCurrentUser(e, t = !1) {
1780
1782
  if (!this._deleted)
1781
- return e && u(
1783
+ return e && l(
1782
1784
  this.tenantId === e.tenantId,
1783
1785
  this,
1784
1786
  "tenant-id-mismatch"
@@ -1811,14 +1813,14 @@ class ri {
1811
1813
  return this.tenantId === null ? this._projectPasswordPolicy : this._tenantPasswordPolicies[this.tenantId];
1812
1814
  }
1813
1815
  async _updatePasswordPolicy() {
1814
- const e = await ti(this), t = new ii(e);
1816
+ const e = await ii(this), t = new si(e);
1815
1817
  this.tenantId === null ? this._projectPasswordPolicy = t : this._tenantPasswordPolicies[this.tenantId] = t;
1816
1818
  }
1817
1819
  _getPersistence() {
1818
1820
  return this.assertedPersistence.persistence.type;
1819
1821
  }
1820
1822
  _updateErrorMap(e) {
1821
- this._errorFactory = new Ce("auth", "Firebase", e());
1823
+ this._errorFactory = new Oe("auth", "Firebase", e());
1822
1824
  }
1823
1825
  onAuthStateChanged(e, t, i) {
1824
1826
  return this.registerStateListener(this.authStateSubscription, e, t, i);
@@ -1851,7 +1853,7 @@ class ri {
1851
1853
  token: e,
1852
1854
  idToken: t
1853
1855
  };
1854
- this.tenantId != null && (i.tenantId = this.tenantId), await Yn(this, i);
1856
+ this.tenantId != null && (i.tenantId = this.tenantId), await Qn(this, i);
1855
1857
  }
1856
1858
  }
1857
1859
  toJSON() {
@@ -1870,7 +1872,7 @@ class ri {
1870
1872
  async getOrInitRedirectPersistenceManager(e) {
1871
1873
  if (!this.redirectPersistenceManager) {
1872
1874
  const t = e && S(e) || this._popupRedirectResolver;
1873
- u(
1875
+ l(
1874
1876
  t,
1875
1877
  this,
1876
1878
  "argument-error"
@@ -1925,7 +1927,7 @@ class ri {
1925
1927
  const s = typeof t == "function" ? t : t.next.bind(t);
1926
1928
  let o = !1;
1927
1929
  const c = this._isInitialized ? Promise.resolve() : this._initializationPromise;
1928
- if (u(
1930
+ if (l(
1929
1931
  c,
1930
1932
  this,
1931
1933
  "internal-error"
@@ -1956,7 +1958,7 @@ class ri {
1956
1958
  return this.operations = this.operations.then(e, e), this.operations;
1957
1959
  }
1958
1960
  get assertedPersistence() {
1959
- return u(
1961
+ return l(
1960
1962
  this.persistenceManager,
1961
1963
  this,
1962
1964
  "internal-error"
@@ -1964,7 +1966,7 @@ class ri {
1964
1966
  ), this.persistenceManager;
1965
1967
  }
1966
1968
  _logFramework(e) {
1967
- !e || this.frameworks.includes(e) || (this.frameworks.push(e), this.frameworks.sort(), this.clientVersion = Dt(this.config.clientPlatform, this._getFrameworks()));
1969
+ !e || this.frameworks.includes(e) || (this.frameworks.push(e), this.frameworks.sort(), this.clientVersion = Ft(this.config.clientPlatform, this._getFrameworks()));
1968
1970
  }
1969
1971
  _getFrameworks() {
1970
1972
  return this.frameworks;
@@ -1994,18 +1996,18 @@ class ri {
1994
1996
  async _getAppCheckToken() {
1995
1997
  var e;
1996
1998
  const t = await ((e = this.appCheckServiceProvider.getImmediate({ optional: !0 })) === null || e === void 0 ? void 0 : e.getToken());
1997
- return t != null && t.error && Dn(`Error while retrieving App Check token: ${t.error}`), t == null ? void 0 : t.token;
1999
+ return t != null && t.error && xn(`Error while retrieving App Check token: ${t.error}`), t == null ? void 0 : t.token;
1998
2000
  }
1999
2001
  }
2000
- function me(n) {
2002
+ function ge(n) {
2001
2003
  return j(n);
2002
2004
  }
2003
- class et {
2005
+ class tt {
2004
2006
  constructor(e) {
2005
- this.auth = e, this.observer = null, this.addObserver = In((t) => this.observer = t);
2007
+ this.auth = e, this.observer = null, this.addObserver = yn((t) => this.observer = t);
2006
2008
  }
2007
2009
  get next() {
2008
- return u(
2010
+ return l(
2009
2011
  this.observer,
2010
2012
  this.auth,
2011
2013
  "internal-error"
@@ -2029,7 +2031,7 @@ class et {
2029
2031
  * See the License for the specific language governing permissions and
2030
2032
  * limitations under the License.
2031
2033
  */
2032
- let Fe = {
2034
+ let xe = {
2033
2035
  async loadJS() {
2034
2036
  throw new Error("Unable to load external scripts");
2035
2037
  },
@@ -2037,16 +2039,16 @@ let Fe = {
2037
2039
  recaptchaEnterpriseScript: "",
2038
2040
  gapiScript: ""
2039
2041
  };
2040
- function si(n) {
2041
- Fe = n;
2042
+ function ai(n) {
2043
+ xe = n;
2042
2044
  }
2043
- function oi(n) {
2044
- return Fe.loadJS(n);
2045
+ function ci(n) {
2046
+ return xe.loadJS(n);
2045
2047
  }
2046
- function ai() {
2047
- return Fe.gapiScript;
2048
+ function li() {
2049
+ return xe.gapiScript;
2048
2050
  }
2049
- function ci(n) {
2051
+ function ui(n) {
2050
2052
  return `__${n}${Math.floor(Math.random() * 1e6)}`;
2051
2053
  }
2052
2054
  /**
@@ -2065,11 +2067,11 @@ function ci(n) {
2065
2067
  * See the License for the specific language governing permissions and
2066
2068
  * limitations under the License.
2067
2069
  */
2068
- function li(n, e) {
2069
- const t = _t(n, "auth");
2070
+ function di(n, e) {
2071
+ const t = vt(n, "auth");
2070
2072
  if (t.isInitialized()) {
2071
2073
  const r = t.getImmediate(), s = t.getOptions();
2072
- if (wn(s, e ?? {}))
2074
+ if (kn(s, e ?? {}))
2073
2075
  return r;
2074
2076
  R(
2075
2077
  r,
@@ -2079,55 +2081,55 @@ function li(n, e) {
2079
2081
  }
2080
2082
  return t.initialize({ options: e });
2081
2083
  }
2082
- function ui(n, e) {
2084
+ function hi(n, e) {
2083
2085
  const t = (e == null ? void 0 : e.persistence) || [], i = (Array.isArray(t) ? t : [t]).map(S);
2084
2086
  e != null && e.errorMap && n._updateErrorMap(e.errorMap), n._initializeWithPersistence(i, e == null ? void 0 : e.popupRedirectResolver);
2085
2087
  }
2086
- function di(n, e, t) {
2087
- const i = me(n);
2088
- u(
2088
+ function fi(n, e, t) {
2089
+ const i = ge(n);
2090
+ l(
2089
2091
  i._canInitEmulator,
2090
2092
  i,
2091
2093
  "emulator-config-failed"
2092
2094
  /* AuthErrorCode.EMULATOR_CONFIG_FAILED */
2093
- ), u(
2095
+ ), l(
2094
2096
  /^https?:\/\//.test(e),
2095
2097
  i,
2096
2098
  "invalid-emulator-scheme"
2097
2099
  /* AuthErrorCode.INVALID_EMULATOR_SCHEME */
2098
2100
  );
2099
- const r = !1, s = Ft(e), { host: o, port: c } = hi(e), a = c === null ? "" : `:${c}`;
2101
+ const r = !1, s = xt(e), { host: o, port: c } = pi(e), a = c === null ? "" : `:${c}`;
2100
2102
  i.config.emulator = { url: `${s}//${o}${a}/` }, i.settings.appVerificationDisabledForTesting = !0, i.emulatorConfig = Object.freeze({
2101
2103
  host: o,
2102
2104
  port: c,
2103
2105
  protocol: s.replace(":", ""),
2104
2106
  options: Object.freeze({ disableWarnings: r })
2105
- }), fi();
2107
+ }), mi();
2106
2108
  }
2107
- function Ft(n) {
2109
+ function xt(n) {
2108
2110
  const e = n.indexOf(":");
2109
2111
  return e < 0 ? "" : n.substr(0, e + 1);
2110
2112
  }
2111
- function hi(n) {
2112
- const e = Ft(n), t = /(\/\/)?([^?#/]+)/.exec(n.substr(e.length));
2113
+ function pi(n) {
2114
+ const e = xt(n), t = /(\/\/)?([^?#/]+)/.exec(n.substr(e.length));
2113
2115
  if (!t)
2114
2116
  return { host: "", port: null };
2115
2117
  const i = t[2].split("@").pop() || "", r = /^(\[[^\]]+\])(:|$)/.exec(i);
2116
2118
  if (r) {
2117
2119
  const s = r[1];
2118
- return { host: s, port: tt(i.substr(s.length + 1)) };
2120
+ return { host: s, port: nt(i.substr(s.length + 1)) };
2119
2121
  } else {
2120
2122
  const [s, o] = i.split(":");
2121
- return { host: s, port: tt(o) };
2123
+ return { host: s, port: nt(o) };
2122
2124
  }
2123
2125
  }
2124
- function tt(n) {
2126
+ function nt(n) {
2125
2127
  if (!n)
2126
2128
  return null;
2127
2129
  const e = Number(n);
2128
2130
  return isNaN(e) ? null : e;
2129
2131
  }
2130
- function fi() {
2132
+ function mi() {
2131
2133
  function n() {
2132
2134
  const e = document.createElement("p"), t = e.style;
2133
2135
  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);
@@ -2150,7 +2152,7 @@ function fi() {
2150
2152
  * See the License for the specific language governing permissions and
2151
2153
  * limitations under the License.
2152
2154
  */
2153
- class xt {
2155
+ class Vt {
2154
2156
  /** @internal */
2155
2157
  constructor(e, t) {
2156
2158
  this.providerId = e, this.signInMethod = t;
@@ -2193,7 +2195,7 @@ class xt {
2193
2195
  * limitations under the License.
2194
2196
  */
2195
2197
  async function W(n, e) {
2196
- return kt(n, "POST", "/v1/accounts:signInWithIdp", fe(n, e));
2198
+ return bt(n, "POST", "/v1/accounts:signInWithIdp", pe(n, e));
2197
2199
  }
2198
2200
  /**
2199
2201
  * @license
@@ -2211,8 +2213,8 @@ async function W(n, e) {
2211
2213
  * See the License for the specific language governing permissions and
2212
2214
  * limitations under the License.
2213
2215
  */
2214
- const pi = "http://localhost";
2215
- class D extends xt {
2216
+ const gi = "http://localhost";
2217
+ class D extends Vt {
2216
2218
  constructor() {
2217
2219
  super(...arguments), this.pendingToken = null;
2218
2220
  }
@@ -2246,7 +2248,7 @@ class D extends xt {
2246
2248
  * @returns If the JSON input does not represent an {@link AuthCredential}, null is returned.
2247
2249
  */
2248
2250
  static fromJSON(e) {
2249
- const t = typeof e == "string" ? JSON.parse(e) : e, { providerId: i, signInMethod: r } = t, s = Ne(t, ["providerId", "signInMethod"]);
2251
+ const t = typeof e == "string" ? JSON.parse(e) : e, { providerId: i, signInMethod: r } = t, s = Le(t, ["providerId", "signInMethod"]);
2250
2252
  if (!i || !r)
2251
2253
  return null;
2252
2254
  const o = new D(i, r);
@@ -2269,14 +2271,14 @@ class D extends xt {
2269
2271
  }
2270
2272
  buildRequest() {
2271
2273
  const e = {
2272
- requestUri: pi,
2274
+ requestUri: gi,
2273
2275
  returnSecureToken: !0
2274
2276
  };
2275
2277
  if (this.pendingToken)
2276
2278
  e.pendingToken = this.pendingToken;
2277
2279
  else {
2278
2280
  const t = {};
2279
- 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 = Y(t);
2281
+ 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 = Q(t);
2280
2282
  }
2281
2283
  return e;
2282
2284
  }
@@ -2297,7 +2299,7 @@ class D extends xt {
2297
2299
  * See the License for the specific language governing permissions and
2298
2300
  * limitations under the License.
2299
2301
  */
2300
- class Vt {
2302
+ class $t {
2301
2303
  /**
2302
2304
  * Constructor for generic OAuth providers.
2303
2305
  *
@@ -2350,7 +2352,7 @@ class Vt {
2350
2352
  * See the License for the specific language governing permissions and
2351
2353
  * limitations under the License.
2352
2354
  */
2353
- class Q extends Vt {
2355
+ class ee extends $t {
2354
2356
  constructor() {
2355
2357
  super(...arguments), this.scopes = [];
2356
2358
  }
@@ -2385,7 +2387,7 @@ class Q extends Vt {
2385
2387
  * See the License for the specific language governing permissions and
2386
2388
  * limitations under the License.
2387
2389
  */
2388
- class C extends Q {
2390
+ class C extends ee {
2389
2391
  constructor() {
2390
2392
  super(
2391
2393
  "facebook.com"
@@ -2456,7 +2458,7 @@ C.PROVIDER_ID = "facebook.com";
2456
2458
  * See the License for the specific language governing permissions and
2457
2459
  * limitations under the License.
2458
2460
  */
2459
- class O extends Q {
2461
+ class O extends ee {
2460
2462
  constructor() {
2461
2463
  super(
2462
2464
  "google.com"
@@ -2532,7 +2534,7 @@ O.PROVIDER_ID = "google.com";
2532
2534
  * See the License for the specific language governing permissions and
2533
2535
  * limitations under the License.
2534
2536
  */
2535
- class N extends Q {
2537
+ class N extends ee {
2536
2538
  constructor() {
2537
2539
  super(
2538
2540
  "github.com"
@@ -2596,7 +2598,7 @@ N.PROVIDER_ID = "github.com";
2596
2598
  * See the License for the specific language governing permissions and
2597
2599
  * limitations under the License.
2598
2600
  */
2599
- class L extends Q {
2601
+ class L extends ee {
2600
2602
  constructor() {
2601
2603
  super(
2602
2604
  "twitter.com"
@@ -2670,7 +2672,7 @@ class F {
2670
2672
  this.user = e.user, this.providerId = e.providerId, this._tokenResponse = e._tokenResponse, this.operationType = e.operationType;
2671
2673
  }
2672
2674
  static async _fromIdTokenResponse(e, t, i, r = !1) {
2673
- const s = await b._fromIdTokenResponse(e, i, r), o = nt(i);
2675
+ const s = await b._fromIdTokenResponse(e, i, r), o = it(i);
2674
2676
  return new F({
2675
2677
  user: s,
2676
2678
  providerId: o,
@@ -2684,7 +2686,7 @@ class F {
2684
2686
  /* reload */
2685
2687
  !0
2686
2688
  );
2687
- const r = nt(i);
2689
+ const r = it(i);
2688
2690
  return new F({
2689
2691
  user: e,
2690
2692
  providerId: r,
@@ -2693,7 +2695,7 @@ class F {
2693
2695
  });
2694
2696
  }
2695
2697
  }
2696
- function nt(n) {
2698
+ function it(n) {
2697
2699
  return n.providerId ? n.providerId : "phoneNumber" in n ? "phone" : null;
2698
2700
  }
2699
2701
  /**
@@ -2712,10 +2714,10 @@ function nt(n) {
2712
2714
  * See the License for the specific language governing permissions and
2713
2715
  * limitations under the License.
2714
2716
  */
2715
- class ue extends Oe {
2717
+ class de extends Ne {
2716
2718
  constructor(e, t, i, r) {
2717
2719
  var s;
2718
- super(t.code, t.message), this.operationType = i, this.user = r, Object.setPrototypeOf(this, ue.prototype), this.customData = {
2720
+ super(t.code, t.message), this.operationType = i, this.user = r, Object.setPrototypeOf(this, de.prototype), this.customData = {
2719
2721
  appName: e.name,
2720
2722
  tenantId: (s = e.tenantId) !== null && s !== void 0 ? s : void 0,
2721
2723
  _serverResponse: t.customData._serverResponse,
@@ -2723,16 +2725,16 @@ class ue extends Oe {
2723
2725
  };
2724
2726
  }
2725
2727
  static _fromErrorAndOperation(e, t, i, r) {
2726
- return new ue(e, t, i, r);
2728
+ return new de(e, t, i, r);
2727
2729
  }
2728
2730
  }
2729
- function $t(n, e, t, i) {
2731
+ function Ht(n, e, t, i) {
2730
2732
  return (e === "reauthenticate" ? t._getReauthenticationResolver(n) : t._getIdTokenResponse(n)).catch((s) => {
2731
- throw s.code === "auth/multi-factor-auth-required" ? ue._fromErrorAndOperation(n, s, e, i) : s;
2733
+ throw s.code === "auth/multi-factor-auth-required" ? de._fromErrorAndOperation(n, s, e, i) : s;
2732
2734
  });
2733
2735
  }
2734
- async function mi(n, e, t = !1) {
2735
- const i = await K(n, e._linkToIdToken(n.auth, await n.getIdToken()), t);
2736
+ async function _i(n, e, t = !1) {
2737
+ const i = await Y(n, e._linkToIdToken(n.auth, await n.getIdToken()), t);
2736
2738
  return F._forOperation(n, "link", i);
2737
2739
  }
2738
2740
  /**
@@ -2751,28 +2753,28 @@ async function mi(n, e, t = !1) {
2751
2753
  * See the License for the specific language governing permissions and
2752
2754
  * limitations under the License.
2753
2755
  */
2754
- async function gi(n, e, t = !1) {
2756
+ async function vi(n, e, t = !1) {
2755
2757
  const { auth: i } = n;
2756
2758
  if (E(i.app))
2757
2759
  return Promise.reject(M(i));
2758
2760
  const r = "reauthenticate";
2759
2761
  try {
2760
- const s = await K(n, $t(i, r, e, n), t);
2761
- u(
2762
+ const s = await Y(n, Ht(i, r, e, n), t);
2763
+ l(
2762
2764
  s.idToken,
2763
2765
  i,
2764
2766
  "internal-error"
2765
2767
  /* AuthErrorCode.INTERNAL_ERROR */
2766
2768
  );
2767
- const o = Ue(s.idToken);
2768
- u(
2769
+ const o = De(s.idToken);
2770
+ l(
2769
2771
  o,
2770
2772
  i,
2771
2773
  "internal-error"
2772
2774
  /* AuthErrorCode.INTERNAL_ERROR */
2773
2775
  );
2774
2776
  const { sub: c } = o;
2775
- return u(
2777
+ return l(
2776
2778
  n.uid === c,
2777
2779
  i,
2778
2780
  "user-mismatch"
@@ -2802,10 +2804,10 @@ async function gi(n, e, t = !1) {
2802
2804
  * See the License for the specific language governing permissions and
2803
2805
  * limitations under the License.
2804
2806
  */
2805
- async function _i(n, e, t = !1) {
2807
+ async function Ii(n, e, t = !1) {
2806
2808
  if (E(n.app))
2807
2809
  return Promise.reject(M(n));
2808
- const i = "signIn", r = await $t(n, i, e), s = await F._fromIdTokenResponse(n, i, r);
2810
+ const i = "signIn", r = await Ht(n, i, e), s = await F._fromIdTokenResponse(n, i, r);
2809
2811
  return t || await n._updateCurrentUser(s.user), s;
2810
2812
  }
2811
2813
  /**
@@ -2824,8 +2826,8 @@ async function _i(n, e, t = !1) {
2824
2826
  * See the License for the specific language governing permissions and
2825
2827
  * limitations under the License.
2826
2828
  */
2827
- async function vi(n, e) {
2828
- return kt(n, "POST", "/v1/accounts:signInWithCustomToken", fe(n, e));
2829
+ async function Ti(n, e) {
2830
+ return bt(n, "POST", "/v1/accounts:signInWithCustomToken", pe(n, e));
2829
2831
  }
2830
2832
  /**
2831
2833
  * @license
@@ -2843,22 +2845,22 @@ async function vi(n, e) {
2843
2845
  * See the License for the specific language governing permissions and
2844
2846
  * limitations under the License.
2845
2847
  */
2846
- async function Ii(n, e) {
2848
+ async function yi(n, e) {
2847
2849
  if (E(n.app))
2848
2850
  return Promise.reject(M(n));
2849
- const t = me(n), i = await vi(t, {
2851
+ const t = ge(n), i = await Ti(t, {
2850
2852
  token: e,
2851
2853
  returnSecureToken: !0
2852
2854
  }), r = await F._fromIdTokenResponse(t, "signIn", i);
2853
2855
  return await t._updateCurrentUser(r.user), r;
2854
2856
  }
2855
- function Ti(n, e, t, i) {
2857
+ function wi(n, e, t, i) {
2856
2858
  return j(n).onIdTokenChanged(e, t, i);
2857
2859
  }
2858
- function yi(n, e, t) {
2860
+ function Ei(n, e, t) {
2859
2861
  return j(n).beforeAuthStateChanged(e, t);
2860
2862
  }
2861
- const de = "__sak";
2863
+ const he = "__sak";
2862
2864
  /**
2863
2865
  * @license
2864
2866
  * Copyright 2019 Google LLC
@@ -2875,13 +2877,13 @@ const de = "__sak";
2875
2877
  * See the License for the specific language governing permissions and
2876
2878
  * limitations under the License.
2877
2879
  */
2878
- class Ht {
2880
+ class Wt {
2879
2881
  constructor(e, t) {
2880
2882
  this.storageRetriever = e, this.type = t;
2881
2883
  }
2882
2884
  _isAvailable() {
2883
2885
  try {
2884
- return this.storage ? (this.storage.setItem(de, "1"), this.storage.removeItem(de), Promise.resolve(!0)) : Promise.resolve(!1);
2886
+ return this.storage ? (this.storage.setItem(he, "1"), this.storage.removeItem(he), Promise.resolve(!0)) : Promise.resolve(!1);
2885
2887
  } catch {
2886
2888
  return Promise.resolve(!1);
2887
2889
  }
@@ -2916,18 +2918,18 @@ class Ht {
2916
2918
  * See the License for the specific language governing permissions and
2917
2919
  * limitations under the License.
2918
2920
  */
2919
- function wi() {
2921
+ function ki() {
2920
2922
  const n = _();
2921
- return De(n) || pe(n);
2923
+ return Fe(n) || me(n);
2922
2924
  }
2923
- const Ei = 1e3, ki = 10;
2924
- class Wt extends Ht {
2925
+ const bi = 1e3, Si = 10;
2926
+ class jt extends Wt {
2925
2927
  constructor() {
2926
2928
  super(
2927
2929
  () => window.localStorage,
2928
2930
  "LOCAL"
2929
2931
  /* PersistenceType.LOCAL */
2930
- ), this.boundEventHandler = (e, t) => this.onStorageEvent(e, t), this.listeners = {}, this.localCache = {}, this.pollTimer = null, this.safariLocalStorageNotSynced = wi() && Zn(), this.fallbackToPolling = Ut(), this._shouldAllowMigration = !0;
2932
+ ), this.boundEventHandler = (e, t) => this.onStorageEvent(e, t), this.listeners = {}, this.localCache = {}, this.pollTimer = null, this.safariLocalStorageNotSynced = ki() && ti(), this.fallbackToPolling = Dt(), this._shouldAllowMigration = !0;
2931
2933
  }
2932
2934
  forAllChangedKeys(e) {
2933
2935
  for (const t of Object.keys(this.listeners)) {
@@ -2954,7 +2956,7 @@ class Wt extends Ht {
2954
2956
  const o = this.storage.getItem(i);
2955
2957
  !t && this.localCache[i] === o || this.notifyListeners(i, o);
2956
2958
  }, s = this.storage.getItem(i);
2957
- Qn() && s !== e.newValue && e.newValue !== e.oldValue ? setTimeout(r, ki) : r();
2959
+ ei() && s !== e.newValue && e.newValue !== e.oldValue ? setTimeout(r, Si) : r();
2958
2960
  }
2959
2961
  notifyListeners(e, t) {
2960
2962
  this.localCache[e] = t;
@@ -2976,7 +2978,7 @@ class Wt extends Ht {
2976
2978
  !0
2977
2979
  );
2978
2980
  });
2979
- }, Ei);
2981
+ }, bi);
2980
2982
  }
2981
2983
  stopPolling() {
2982
2984
  this.pollTimer && (clearInterval(this.pollTimer), this.pollTimer = null);
@@ -3005,8 +3007,8 @@ class Wt extends Ht {
3005
3007
  await super._remove(e), delete this.localCache[e];
3006
3008
  }
3007
3009
  }
3008
- Wt.type = "LOCAL";
3009
- const bi = Wt;
3010
+ jt.type = "LOCAL";
3011
+ const Ri = jt;
3010
3012
  /**
3011
3013
  * @license
3012
3014
  * Copyright 2020 Google LLC
@@ -3023,7 +3025,7 @@ const bi = Wt;
3023
3025
  * See the License for the specific language governing permissions and
3024
3026
  * limitations under the License.
3025
3027
  */
3026
- class jt extends Ht {
3028
+ class Gt extends Wt {
3027
3029
  constructor() {
3028
3030
  super(
3029
3031
  () => window.sessionStorage,
@@ -3036,8 +3038,8 @@ class jt extends Ht {
3036
3038
  _removeListener(e, t) {
3037
3039
  }
3038
3040
  }
3039
- jt.type = "SESSION";
3040
- const Gt = jt;
3041
+ Gt.type = "SESSION";
3042
+ const Bt = Gt;
3041
3043
  /**
3042
3044
  * @license
3043
3045
  * Copyright 2019 Google LLC
@@ -3054,7 +3056,7 @@ const Gt = jt;
3054
3056
  * See the License for the specific language governing permissions and
3055
3057
  * limitations under the License.
3056
3058
  */
3057
- function Si(n) {
3059
+ function Ai(n) {
3058
3060
  return Promise.all(n.map(async (e) => {
3059
3061
  try {
3060
3062
  return {
@@ -3085,7 +3087,7 @@ function Si(n) {
3085
3087
  * See the License for the specific language governing permissions and
3086
3088
  * limitations under the License.
3087
3089
  */
3088
- class ge {
3090
+ class _e {
3089
3091
  constructor(e) {
3090
3092
  this.eventTarget = e, this.handlersMap = {}, this.boundEventHandler = this.handleEvent.bind(this);
3091
3093
  }
@@ -3099,7 +3101,7 @@ class ge {
3099
3101
  const t = this.receivers.find((r) => r.isListeningto(e));
3100
3102
  if (t)
3101
3103
  return t;
3102
- const i = new ge(e);
3104
+ const i = new _e(e);
3103
3105
  return this.receivers.push(i), i;
3104
3106
  }
3105
3107
  isListeningto(e) {
@@ -3124,7 +3126,7 @@ class ge {
3124
3126
  eventId: i,
3125
3127
  eventType: r
3126
3128
  });
3127
- const c = Array.from(o).map(async (l) => l(t.origin, s)), a = await Si(c);
3129
+ const c = Array.from(o).map(async (u) => u(t.origin, s)), a = await Ai(c);
3128
3130
  t.ports[0].postMessage({
3129
3131
  status: "done",
3130
3132
  eventId: i,
@@ -3153,7 +3155,7 @@ class ge {
3153
3155
  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);
3154
3156
  }
3155
3157
  }
3156
- ge.receivers = [];
3158
+ _e.receivers = [];
3157
3159
  /**
3158
3160
  * @license
3159
3161
  * Copyright 2020 Google LLC
@@ -3170,7 +3172,7 @@ ge.receivers = [];
3170
3172
  * See the License for the specific language governing permissions and
3171
3173
  * limitations under the License.
3172
3174
  */
3173
- function xe(n = "", e = 10) {
3175
+ function Ve(n = "", e = 10) {
3174
3176
  let t = "";
3175
3177
  for (let i = 0; i < e; i++)
3176
3178
  t += Math.floor(Math.random() * 10);
@@ -3192,7 +3194,7 @@ function xe(n = "", e = 10) {
3192
3194
  * See the License for the specific language governing permissions and
3193
3195
  * limitations under the License.
3194
3196
  */
3195
- class Ri {
3197
+ class Pi {
3196
3198
  constructor(e) {
3197
3199
  this.target = e, this.handlers = /* @__PURE__ */ new Set();
3198
3200
  }
@@ -3226,7 +3228,7 @@ class Ri {
3226
3228
  );
3227
3229
  let s, o;
3228
3230
  return new Promise((c, a) => {
3229
- const l = xe("", 20);
3231
+ const u = Ve("", 20);
3230
3232
  r.port1.start();
3231
3233
  const d = setTimeout(() => {
3232
3234
  a(new Error(
@@ -3238,7 +3240,7 @@ class Ri {
3238
3240
  messageChannel: r,
3239
3241
  onMessage(h) {
3240
3242
  const p = h;
3241
- if (p.data.eventId === l)
3243
+ if (p.data.eventId === u)
3242
3244
  switch (p.data.status) {
3243
3245
  case "ack":
3244
3246
  clearTimeout(d), s = setTimeout(
@@ -3265,7 +3267,7 @@ class Ri {
3265
3267
  }
3266
3268
  }, this.handlers.add(o), r.port1.addEventListener("message", o.onMessage), this.target.postMessage({
3267
3269
  eventType: e,
3268
- eventId: l,
3270
+ eventId: u,
3269
3271
  data: t
3270
3272
  }, [r.port2]);
3271
3273
  }).finally(() => {
@@ -3289,11 +3291,11 @@ class Ri {
3289
3291
  * See the License for the specific language governing permissions and
3290
3292
  * limitations under the License.
3291
3293
  */
3292
- function y() {
3294
+ function w() {
3293
3295
  return window;
3294
3296
  }
3295
- function Ai(n) {
3296
- y().location.href = n;
3297
+ function Ci(n) {
3298
+ w().location.href = n;
3297
3299
  }
3298
3300
  /**
3299
3301
  * @license
@@ -3311,10 +3313,10 @@ function Ai(n) {
3311
3313
  * See the License for the specific language governing permissions and
3312
3314
  * limitations under the License.
3313
3315
  */
3314
- function Bt() {
3315
- return typeof y().WorkerGlobalScope < "u" && typeof y().importScripts == "function";
3316
+ function zt() {
3317
+ return typeof w().WorkerGlobalScope < "u" && typeof w().importScripts == "function";
3316
3318
  }
3317
- async function Pi() {
3319
+ async function Oi() {
3318
3320
  if (!(navigator != null && navigator.serviceWorker))
3319
3321
  return null;
3320
3322
  try {
@@ -3323,12 +3325,12 @@ async function Pi() {
3323
3325
  return null;
3324
3326
  }
3325
3327
  }
3326
- function Ci() {
3328
+ function Ni() {
3327
3329
  var n;
3328
3330
  return ((n = navigator == null ? void 0 : navigator.serviceWorker) === null || n === void 0 ? void 0 : n.controller) || null;
3329
3331
  }
3330
- function Oi() {
3331
- return Bt() ? self : null;
3332
+ function Li() {
3333
+ return zt() ? self : null;
3332
3334
  }
3333
3335
  /**
3334
3336
  * @license
@@ -3346,8 +3348,8 @@ function Oi() {
3346
3348
  * See the License for the specific language governing permissions and
3347
3349
  * limitations under the License.
3348
3350
  */
3349
- const zt = "firebaseLocalStorageDb", Ni = 1, he = "firebaseLocalStorage", qt = "fbase_key";
3350
- class Z {
3351
+ const qt = "firebaseLocalStorageDb", Mi = 1, fe = "firebaseLocalStorage", Kt = "fbase_key";
3352
+ class te {
3351
3353
  constructor(e) {
3352
3354
  this.request = e;
3353
3355
  }
@@ -3361,55 +3363,55 @@ class Z {
3361
3363
  });
3362
3364
  }
3363
3365
  }
3364
- function _e(n, e) {
3365
- return n.transaction([he], e ? "readwrite" : "readonly").objectStore(he);
3366
+ function ve(n, e) {
3367
+ return n.transaction([fe], e ? "readwrite" : "readonly").objectStore(fe);
3366
3368
  }
3367
- function Li() {
3368
- const n = indexedDB.deleteDatabase(zt);
3369
- return new Z(n).toPromise();
3369
+ function Ui() {
3370
+ const n = indexedDB.deleteDatabase(qt);
3371
+ return new te(n).toPromise();
3370
3372
  }
3371
- function Pe() {
3372
- const n = indexedDB.open(zt, Ni);
3373
+ function Ce() {
3374
+ const n = indexedDB.open(qt, Mi);
3373
3375
  return new Promise((e, t) => {
3374
3376
  n.addEventListener("error", () => {
3375
3377
  t(n.error);
3376
3378
  }), n.addEventListener("upgradeneeded", () => {
3377
3379
  const i = n.result;
3378
3380
  try {
3379
- i.createObjectStore(he, { keyPath: qt });
3381
+ i.createObjectStore(fe, { keyPath: Kt });
3380
3382
  } catch (r) {
3381
3383
  t(r);
3382
3384
  }
3383
3385
  }), n.addEventListener("success", async () => {
3384
3386
  const i = n.result;
3385
- i.objectStoreNames.contains(he) ? e(i) : (i.close(), await Li(), e(await Pe()));
3387
+ i.objectStoreNames.contains(fe) ? e(i) : (i.close(), await Ui(), e(await Ce()));
3386
3388
  });
3387
3389
  });
3388
3390
  }
3389
- async function it(n, e, t) {
3390
- const i = _e(n, !0).put({
3391
- [qt]: e,
3391
+ async function rt(n, e, t) {
3392
+ const i = ve(n, !0).put({
3393
+ [Kt]: e,
3392
3394
  value: t
3393
3395
  });
3394
- return new Z(i).toPromise();
3396
+ return new te(i).toPromise();
3395
3397
  }
3396
- async function Mi(n, e) {
3397
- const t = _e(n, !1).get(e), i = await new Z(t).toPromise();
3398
+ async function Di(n, e) {
3399
+ const t = ve(n, !1).get(e), i = await new te(t).toPromise();
3398
3400
  return i === void 0 ? null : i.value;
3399
3401
  }
3400
- function rt(n, e) {
3401
- const t = _e(n, !0).delete(e);
3402
- return new Z(t).toPromise();
3402
+ function st(n, e) {
3403
+ const t = ve(n, !0).delete(e);
3404
+ return new te(t).toPromise();
3403
3405
  }
3404
- const Ui = 800, Di = 3;
3405
- class Kt {
3406
+ const Fi = 800, xi = 3;
3407
+ class Jt {
3406
3408
  constructor() {
3407
3409
  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(() => {
3408
3410
  }, () => {
3409
3411
  });
3410
3412
  }
3411
3413
  async _openDb() {
3412
- return this.db ? this.db : (this.db = await Pe(), this.db);
3414
+ return this.db ? this.db : (this.db = await Ce(), this.db);
3413
3415
  }
3414
3416
  async _withRetries(e) {
3415
3417
  let t = 0;
@@ -3418,7 +3420,7 @@ class Kt {
3418
3420
  const i = await this._openDb();
3419
3421
  return await e(i);
3420
3422
  } catch (i) {
3421
- if (t++ > Di)
3423
+ if (t++ > xi)
3422
3424
  throw i;
3423
3425
  this.db && (this.db.close(), this.db = void 0);
3424
3426
  }
@@ -3428,13 +3430,13 @@ class Kt {
3428
3430
  * postMessage interface to send these events to the worker ourselves.
3429
3431
  */
3430
3432
  async initializeServiceWorkerMessaging() {
3431
- return Bt() ? this.initializeReceiver() : this.initializeSender();
3433
+ return zt() ? this.initializeReceiver() : this.initializeSender();
3432
3434
  }
3433
3435
  /**
3434
3436
  * As the worker we should listen to events from the main window.
3435
3437
  */
3436
3438
  async initializeReceiver() {
3437
- this.receiver = ge._getInstance(Oi()), this.receiver._subscribe("keyChanged", async (e, t) => ({
3439
+ this.receiver = _e._getInstance(Li()), this.receiver._subscribe("keyChanged", async (e, t) => ({
3438
3440
  keyProcessed: (await this._poll()).includes(t.key)
3439
3441
  })), this.receiver._subscribe("ping", async (e, t) => [
3440
3442
  "keyChanged"
@@ -3450,9 +3452,9 @@ class Kt {
3450
3452
  */
3451
3453
  async initializeSender() {
3452
3454
  var e, t;
3453
- if (this.activeServiceWorker = await Pi(), !this.activeServiceWorker)
3455
+ if (this.activeServiceWorker = await Oi(), !this.activeServiceWorker)
3454
3456
  return;
3455
- this.sender = new Ri(this.activeServiceWorker);
3457
+ this.sender = new Pi(this.activeServiceWorker);
3456
3458
  const i = await this.sender._send(
3457
3459
  "ping",
3458
3460
  {},
@@ -3474,7 +3476,7 @@ class Kt {
3474
3476
  * @param key - Storage key which changed.
3475
3477
  */
3476
3478
  async notifyServiceWorker(e) {
3477
- if (!(!this.sender || !this.activeServiceWorker || Ci() !== this.activeServiceWorker))
3479
+ if (!(!this.sender || !this.activeServiceWorker || Ni() !== this.activeServiceWorker))
3478
3480
  try {
3479
3481
  await this.sender._send(
3480
3482
  "keyChanged",
@@ -3490,8 +3492,8 @@ class Kt {
3490
3492
  try {
3491
3493
  if (!indexedDB)
3492
3494
  return !1;
3493
- const e = await Pe();
3494
- return await it(e, de, "1"), await rt(e, de), !0;
3495
+ const e = await Ce();
3496
+ return await rt(e, he, "1"), await st(e, he), !0;
3495
3497
  } catch {
3496
3498
  }
3497
3499
  return !1;
@@ -3505,19 +3507,19 @@ class Kt {
3505
3507
  }
3506
3508
  }
3507
3509
  async _set(e, t) {
3508
- return this._withPendingWrite(async () => (await this._withRetries((i) => it(i, e, t)), this.localCache[e] = t, this.notifyServiceWorker(e)));
3510
+ return this._withPendingWrite(async () => (await this._withRetries((i) => rt(i, e, t)), this.localCache[e] = t, this.notifyServiceWorker(e)));
3509
3511
  }
3510
3512
  async _get(e) {
3511
- const t = await this._withRetries((i) => Mi(i, e));
3513
+ const t = await this._withRetries((i) => Di(i, e));
3512
3514
  return this.localCache[e] = t, t;
3513
3515
  }
3514
3516
  async _remove(e) {
3515
- return this._withPendingWrite(async () => (await this._withRetries((t) => rt(t, e)), delete this.localCache[e], this.notifyServiceWorker(e)));
3517
+ return this._withPendingWrite(async () => (await this._withRetries((t) => st(t, e)), delete this.localCache[e], this.notifyServiceWorker(e)));
3516
3518
  }
3517
3519
  async _poll() {
3518
3520
  const e = await this._withRetries((r) => {
3519
- const s = _e(r, !1).getAll();
3520
- return new Z(s).toPromise();
3521
+ const s = ve(r, !1).getAll();
3522
+ return new te(s).toPromise();
3521
3523
  });
3522
3524
  if (!e)
3523
3525
  return [];
@@ -3539,7 +3541,7 @@ class Kt {
3539
3541
  r(t);
3540
3542
  }
3541
3543
  startPolling() {
3542
- this.stopPolling(), this.pollTimer = setInterval(async () => this._poll(), Ui);
3544
+ this.stopPolling(), this.pollTimer = setInterval(async () => this._poll(), Fi);
3543
3545
  }
3544
3546
  stopPolling() {
3545
3547
  this.pollTimer && (clearInterval(this.pollTimer), this.pollTimer = null);
@@ -3551,9 +3553,9 @@ class Kt {
3551
3553
  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();
3552
3554
  }
3553
3555
  }
3554
- Kt.type = "LOCAL";
3555
- const Fi = Kt;
3556
- new X(3e4, 6e4);
3556
+ Jt.type = "LOCAL";
3557
+ const Vi = Jt;
3558
+ new Z(3e4, 6e4);
3557
3559
  /**
3558
3560
  * @license
3559
3561
  * Copyright 2021 Google LLC
@@ -3570,8 +3572,8 @@ new X(3e4, 6e4);
3570
3572
  * See the License for the specific language governing permissions and
3571
3573
  * limitations under the License.
3572
3574
  */
3573
- function xi(n, e) {
3574
- return e ? S(e) : (u(
3575
+ function $i(n, e) {
3576
+ return e ? S(e) : (l(
3575
3577
  n._popupRedirectResolver,
3576
3578
  n,
3577
3579
  "argument-error"
@@ -3594,7 +3596,7 @@ function xi(n, e) {
3594
3596
  * See the License for the specific language governing permissions and
3595
3597
  * limitations under the License.
3596
3598
  */
3597
- class Ve extends xt {
3599
+ class $e extends Vt {
3598
3600
  constructor(e) {
3599
3601
  super(
3600
3602
  "custom",
@@ -3624,26 +3626,26 @@ class Ve extends xt {
3624
3626
  return e && (t.idToken = e), t;
3625
3627
  }
3626
3628
  }
3627
- function Vi(n) {
3628
- return _i(n.auth, new Ve(n), n.bypassAuthState);
3629
+ function Hi(n) {
3630
+ return Ii(n.auth, new $e(n), n.bypassAuthState);
3629
3631
  }
3630
- function $i(n) {
3632
+ function Wi(n) {
3631
3633
  const { auth: e, user: t } = n;
3632
- return u(
3634
+ return l(
3633
3635
  t,
3634
3636
  e,
3635
3637
  "internal-error"
3636
3638
  /* AuthErrorCode.INTERNAL_ERROR */
3637
- ), gi(t, new Ve(n), n.bypassAuthState);
3639
+ ), vi(t, new $e(n), n.bypassAuthState);
3638
3640
  }
3639
- async function Hi(n) {
3641
+ async function ji(n) {
3640
3642
  const { auth: e, user: t } = n;
3641
- return u(
3643
+ return l(
3642
3644
  t,
3643
3645
  e,
3644
3646
  "internal-error"
3645
3647
  /* AuthErrorCode.INTERNAL_ERROR */
3646
- ), mi(t, new Ve(n), n.bypassAuthState);
3648
+ ), _i(t, new $e(n), n.bypassAuthState);
3647
3649
  }
3648
3650
  /**
3649
3651
  * @license
@@ -3661,7 +3663,7 @@ async function Hi(n) {
3661
3663
  * See the License for the specific language governing permissions and
3662
3664
  * limitations under the License.
3663
3665
  */
3664
- class Jt {
3666
+ class Yt {
3665
3667
  constructor(e, t, i, r, s = !1) {
3666
3668
  this.auth = e, this.resolver = i, this.user = r, this.bypassAuthState = s, this.pendingPromise = null, this.eventManager = null, this.filter = Array.isArray(t) ? t : [t];
3667
3669
  }
@@ -3692,8 +3694,8 @@ class Jt {
3692
3694
  };
3693
3695
  try {
3694
3696
  this.resolve(await this.getIdpTask(c)(a));
3695
- } catch (l) {
3696
- this.reject(l);
3697
+ } catch (u) {
3698
+ this.reject(u);
3697
3699
  }
3698
3700
  }
3699
3701
  onError(e) {
@@ -3703,13 +3705,13 @@ class Jt {
3703
3705
  switch (e) {
3704
3706
  case "signInViaPopup":
3705
3707
  case "signInViaRedirect":
3706
- return Vi;
3708
+ return Hi;
3707
3709
  case "linkViaPopup":
3708
3710
  case "linkViaRedirect":
3709
- return Hi;
3711
+ return ji;
3710
3712
  case "reauthViaPopup":
3711
3713
  case "reauthViaRedirect":
3712
- return $i;
3714
+ return Wi;
3713
3715
  default:
3714
3716
  R(
3715
3717
  this.auth,
@@ -3744,14 +3746,14 @@ class Jt {
3744
3746
  * See the License for the specific language governing permissions and
3745
3747
  * limitations under the License.
3746
3748
  */
3747
- const Wi = new X(2e3, 1e4);
3748
- class V extends Jt {
3749
+ const Gi = new Z(2e3, 1e4);
3750
+ class V extends Yt {
3749
3751
  constructor(e, t, i, r, s) {
3750
3752
  super(e, t, r, s), this.provider = i, this.authWindow = null, this.pollId = null, V.currentPopupAction && V.currentPopupAction.cancel(), V.currentPopupAction = this;
3751
3753
  }
3752
3754
  async executeNotNull() {
3753
3755
  const e = await this.execute();
3754
- return u(
3756
+ return l(
3755
3757
  e,
3756
3758
  this.auth,
3757
3759
  "internal-error"
@@ -3760,7 +3762,7 @@ class V extends Jt {
3760
3762
  }
3761
3763
  async onExecution() {
3762
3764
  A(this.filter.length === 1, "Popup operations only handle one event");
3763
- const e = xe();
3765
+ const e = Ve();
3764
3766
  this.authWindow = await this.resolver._openPopup(
3765
3767
  this.auth,
3766
3768
  this.provider,
@@ -3770,7 +3772,7 @@ class V extends Jt {
3770
3772
  ), this.authWindow.associatedEvent = e, this.resolver._originValidation(this.auth).catch((t) => {
3771
3773
  this.reject(t);
3772
3774
  }), this.resolver._isIframeWebStorageSupported(this.auth, (t) => {
3773
- t || this.reject(T(
3775
+ t || this.reject(y(
3774
3776
  this.auth,
3775
3777
  "web-storage-unsupported"
3776
3778
  /* AuthErrorCode.WEB_STORAGE_UNSUPPORTED */
@@ -3782,7 +3784,7 @@ class V extends Jt {
3782
3784
  return ((e = this.authWindow) === null || e === void 0 ? void 0 : e.associatedEvent) || null;
3783
3785
  }
3784
3786
  cancel() {
3785
- this.reject(T(
3787
+ this.reject(y(
3786
3788
  this.auth,
3787
3789
  "cancelled-popup-request"
3788
3790
  /* AuthErrorCode.EXPIRED_POPUP_REQUEST */
@@ -3797,7 +3799,7 @@ class V extends Jt {
3797
3799
  if (!((i = (t = this.authWindow) === null || t === void 0 ? void 0 : t.window) === null || i === void 0) && i.closed) {
3798
3800
  this.pollId = window.setTimeout(
3799
3801
  () => {
3800
- this.pollId = null, this.reject(T(
3802
+ this.pollId = null, this.reject(y(
3801
3803
  this.auth,
3802
3804
  "popup-closed-by-user"
3803
3805
  /* AuthErrorCode.POPUP_CLOSED_BY_USER */
@@ -3808,7 +3810,7 @@ class V extends Jt {
3808
3810
  );
3809
3811
  return;
3810
3812
  }
3811
- this.pollId = window.setTimeout(e, Wi.get());
3813
+ this.pollId = window.setTimeout(e, Gi.get());
3812
3814
  };
3813
3815
  e();
3814
3816
  }
@@ -3830,8 +3832,8 @@ V.currentPopupAction = null;
3830
3832
  * See the License for the specific language governing permissions and
3831
3833
  * limitations under the License.
3832
3834
  */
3833
- const ji = "pendingRedirect", oe = /* @__PURE__ */ new Map();
3834
- class Gi extends Jt {
3835
+ const Bi = "pendingRedirect", ae = /* @__PURE__ */ new Map();
3836
+ class zi extends Yt {
3835
3837
  constructor(e, t, i = !1) {
3836
3838
  super(e, [
3837
3839
  "signInViaRedirect",
@@ -3846,17 +3848,17 @@ class Gi extends Jt {
3846
3848
  * just return it.
3847
3849
  */
3848
3850
  async execute() {
3849
- let e = oe.get(this.auth._key());
3851
+ let e = ae.get(this.auth._key());
3850
3852
  if (!e) {
3851
3853
  try {
3852
- const i = await Bi(this.resolver, this.auth) ? await super.execute() : null;
3854
+ const i = await qi(this.resolver, this.auth) ? await super.execute() : null;
3853
3855
  e = () => Promise.resolve(i);
3854
3856
  } catch (t) {
3855
3857
  e = () => Promise.reject(t);
3856
3858
  }
3857
- oe.set(this.auth._key(), e);
3859
+ ae.set(this.auth._key(), e);
3858
3860
  }
3859
- return this.bypassAuthState || oe.set(this.auth._key(), () => Promise.resolve(null)), e();
3861
+ return this.bypassAuthState || ae.set(this.auth._key(), () => Promise.resolve(null)), e();
3860
3862
  }
3861
3863
  async onAuthEvent(e) {
3862
3864
  if (e.type === "signInViaRedirect")
@@ -3877,26 +3879,26 @@ class Gi extends Jt {
3877
3879
  cleanUp() {
3878
3880
  }
3879
3881
  }
3880
- async function Bi(n, e) {
3881
- const t = Ki(e), i = qi(n);
3882
+ async function qi(n, e) {
3883
+ const t = Yi(e), i = Ji(n);
3882
3884
  if (!await i._isAvailable())
3883
3885
  return !1;
3884
3886
  const r = await i._get(t) === "true";
3885
3887
  return await i._remove(t), r;
3886
3888
  }
3887
- function zi(n, e) {
3888
- oe.set(n._key(), e);
3889
+ function Ki(n, e) {
3890
+ ae.set(n._key(), e);
3889
3891
  }
3890
- function qi(n) {
3892
+ function Ji(n) {
3891
3893
  return S(n._redirectPersistence);
3892
3894
  }
3893
- function Ki(n) {
3894
- return se(ji, n.config.apiKey, n.name);
3895
+ function Yi(n) {
3896
+ return oe(Bi, n.config.apiKey, n.name);
3895
3897
  }
3896
- async function Ji(n, e, t = !1) {
3898
+ async function Xi(n, e, t = !1) {
3897
3899
  if (E(n.app))
3898
3900
  return Promise.reject(M(n));
3899
- const i = me(n), r = xi(i, e), o = await new Gi(i, r, t).execute();
3901
+ const i = ge(n), r = $i(i, e), o = await new zi(i, r, t).execute();
3900
3902
  return o && !t && (delete o.user._redirectEventId, await i._persistUserIfCurrent(o.user), await i._setRedirectUser(null, e)), o;
3901
3903
  }
3902
3904
  /**
@@ -3915,8 +3917,8 @@ async function Ji(n, e, t = !1) {
3915
3917
  * See the License for the specific language governing permissions and
3916
3918
  * limitations under the License.
3917
3919
  */
3918
- const Yi = 10 * 60 * 1e3;
3919
- class Xi {
3920
+ const Qi = 10 * 60 * 1e3;
3921
+ class Zi {
3920
3922
  constructor(e) {
3921
3923
  this.auth = e, this.cachedEventUids = /* @__PURE__ */ new Set(), this.consumers = /* @__PURE__ */ new Set(), this.queuedRedirectEvent = null, this.hasHandledPotentialRedirect = !1, this.lastProcessedEventTime = Date.now();
3922
3924
  }
@@ -3932,13 +3934,13 @@ class Xi {
3932
3934
  let t = !1;
3933
3935
  return this.consumers.forEach((i) => {
3934
3936
  this.isEventForConsumer(e, i) && (t = !0, this.sendToConsumer(e, i), this.saveEventToCache(e));
3935
- }), this.hasHandledPotentialRedirect || !Qi(e) || (this.hasHandledPotentialRedirect = !0, t || (this.queuedRedirectEvent = e, t = !0)), t;
3937
+ }), this.hasHandledPotentialRedirect || !er(e) || (this.hasHandledPotentialRedirect = !0, t || (this.queuedRedirectEvent = e, t = !0)), t;
3936
3938
  }
3937
3939
  sendToConsumer(e, t) {
3938
3940
  var i;
3939
- if (e.error && !Yt(e)) {
3941
+ if (e.error && !Xt(e)) {
3940
3942
  const r = ((i = e.error.code) === null || i === void 0 ? void 0 : i.split("auth/")[1]) || "internal-error";
3941
- t.onError(T(this.auth, r));
3943
+ t.onError(y(this.auth, r));
3942
3944
  } else
3943
3945
  t.onAuthEvent(e);
3944
3946
  }
@@ -3947,26 +3949,26 @@ class Xi {
3947
3949
  return t.filter.includes(e.type) && i;
3948
3950
  }
3949
3951
  hasEventBeenHandled(e) {
3950
- return Date.now() - this.lastProcessedEventTime >= Yi && this.cachedEventUids.clear(), this.cachedEventUids.has(st(e));
3952
+ return Date.now() - this.lastProcessedEventTime >= Qi && this.cachedEventUids.clear(), this.cachedEventUids.has(ot(e));
3951
3953
  }
3952
3954
  saveEventToCache(e) {
3953
- this.cachedEventUids.add(st(e)), this.lastProcessedEventTime = Date.now();
3955
+ this.cachedEventUids.add(ot(e)), this.lastProcessedEventTime = Date.now();
3954
3956
  }
3955
3957
  }
3956
- function st(n) {
3958
+ function ot(n) {
3957
3959
  return [n.type, n.eventId, n.sessionId, n.tenantId].filter((e) => e).join("-");
3958
3960
  }
3959
- function Yt({ type: n, error: e }) {
3961
+ function Xt({ type: n, error: e }) {
3960
3962
  return n === "unknown" && (e == null ? void 0 : e.code) === "auth/no-auth-event";
3961
3963
  }
3962
- function Qi(n) {
3964
+ function er(n) {
3963
3965
  switch (n.type) {
3964
3966
  case "signInViaRedirect":
3965
3967
  case "linkViaRedirect":
3966
3968
  case "reauthViaRedirect":
3967
3969
  return !0;
3968
3970
  case "unknown":
3969
- return Yt(n);
3971
+ return Xt(n);
3970
3972
  default:
3971
3973
  return !1;
3972
3974
  }
@@ -3987,7 +3989,7 @@ function Qi(n) {
3987
3989
  * See the License for the specific language governing permissions and
3988
3990
  * limitations under the License.
3989
3991
  */
3990
- async function Zi(n, e = {}) {
3992
+ async function tr(n, e = {}) {
3991
3993
  return G(n, "GET", "/v1/projects", e);
3992
3994
  }
3993
3995
  /**
@@ -4006,14 +4008,14 @@ async function Zi(n, e = {}) {
4006
4008
  * See the License for the specific language governing permissions and
4007
4009
  * limitations under the License.
4008
4010
  */
4009
- const er = /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/, tr = /^https?/;
4010
- async function nr(n) {
4011
+ const nr = /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/, ir = /^https?/;
4012
+ async function rr(n) {
4011
4013
  if (n.config.emulator)
4012
4014
  return;
4013
- const { authorizedDomains: e } = await Zi(n);
4015
+ const { authorizedDomains: e } = await tr(n);
4014
4016
  for (const t of e)
4015
4017
  try {
4016
- if (ir(t))
4018
+ if (sr(t))
4017
4019
  return;
4018
4020
  } catch {
4019
4021
  }
@@ -4023,15 +4025,15 @@ async function nr(n) {
4023
4025
  /* AuthErrorCode.INVALID_ORIGIN */
4024
4026
  );
4025
4027
  }
4026
- function ir(n) {
4027
- const e = Re(), { protocol: t, hostname: i } = new URL(e);
4028
+ function sr(n) {
4029
+ const e = Ae(), { protocol: t, hostname: i } = new URL(e);
4028
4030
  if (n.startsWith("chrome-extension://")) {
4029
4031
  const o = new URL(n);
4030
4032
  return o.hostname === "" && i === "" ? t === "chrome-extension:" && n.replace("chrome-extension://", "") === e.replace("chrome-extension://", "") : t === "chrome-extension:" && o.hostname === i;
4031
4033
  }
4032
- if (!tr.test(t))
4034
+ if (!ir.test(t))
4033
4035
  return !1;
4034
- if (er.test(n))
4036
+ if (nr.test(n))
4035
4037
  return i === n;
4036
4038
  const r = n.replace(/\./g, "\\.");
4037
4039
  return new RegExp("^(.+\\." + r + "|" + r + ")$", "i").test(i);
@@ -4052,9 +4054,9 @@ function ir(n) {
4052
4054
  * See the License for the specific language governing permissions and
4053
4055
  * limitations under the License.
4054
4056
  */
4055
- const rr = new X(3e4, 6e4);
4056
- function ot() {
4057
- const n = y().___jsl;
4057
+ const or = new Z(3e4, 6e4);
4058
+ function at() {
4059
+ const n = w().___jsl;
4058
4060
  if (n != null && n.H) {
4059
4061
  for (const e of Object.keys(n.H))
4060
4062
  if (n.H[e].r = n.H[e].r || [], n.H[e].L = n.H[e].L || [], n.H[e].r = [...n.H[e].L], n.CP)
@@ -4062,45 +4064,45 @@ function ot() {
4062
4064
  n.CP[t] = null;
4063
4065
  }
4064
4066
  }
4065
- function sr(n) {
4067
+ function ar(n) {
4066
4068
  return new Promise((e, t) => {
4067
4069
  var i, r, s;
4068
4070
  function o() {
4069
- ot(), gapi.load("gapi.iframes", {
4071
+ at(), gapi.load("gapi.iframes", {
4070
4072
  callback: () => {
4071
4073
  e(gapi.iframes.getContext());
4072
4074
  },
4073
4075
  ontimeout: () => {
4074
- ot(), t(T(
4076
+ at(), t(y(
4075
4077
  n,
4076
4078
  "network-request-failed"
4077
4079
  /* AuthErrorCode.NETWORK_REQUEST_FAILED */
4078
4080
  ));
4079
4081
  },
4080
- timeout: rr.get()
4082
+ timeout: or.get()
4081
4083
  });
4082
4084
  }
4083
- if (!((r = (i = y().gapi) === null || i === void 0 ? void 0 : i.iframes) === null || r === void 0) && r.Iframe)
4085
+ if (!((r = (i = w().gapi) === null || i === void 0 ? void 0 : i.iframes) === null || r === void 0) && r.Iframe)
4084
4086
  e(gapi.iframes.getContext());
4085
- else if (!((s = y().gapi) === null || s === void 0) && s.load)
4087
+ else if (!((s = w().gapi) === null || s === void 0) && s.load)
4086
4088
  o();
4087
4089
  else {
4088
- const c = ci("iframefcb");
4089
- return y()[c] = () => {
4090
- gapi.load ? o() : t(T(
4090
+ const c = ui("iframefcb");
4091
+ return w()[c] = () => {
4092
+ gapi.load ? o() : t(y(
4091
4093
  n,
4092
4094
  "network-request-failed"
4093
4095
  /* AuthErrorCode.NETWORK_REQUEST_FAILED */
4094
4096
  ));
4095
- }, oi(`${ai()}?onload=${c}`).catch((a) => t(a));
4097
+ }, ci(`${li()}?onload=${c}`).catch((a) => t(a));
4096
4098
  }
4097
4099
  }).catch((e) => {
4098
- throw ae = null, e;
4100
+ throw ce = null, e;
4099
4101
  });
4100
4102
  }
4101
- let ae = null;
4102
- function or(n) {
4103
- return ae = ae || sr(n), ae;
4103
+ let ce = null;
4104
+ function cr(n) {
4105
+ return ce = ce || ar(n), ce;
4104
4106
  }
4105
4107
  /**
4106
4108
  * @license
@@ -4118,7 +4120,7 @@ function or(n) {
4118
4120
  * See the License for the specific language governing permissions and
4119
4121
  * limitations under the License.
4120
4122
  */
4121
- const ar = new X(5e3, 15e3), cr = "__/auth/iframe", lr = "emulator/auth/iframe", ur = {
4123
+ const lr = new Z(5e3, 15e3), ur = "__/auth/iframe", dr = "emulator/auth/iframe", hr = {
4122
4124
  style: {
4123
4125
  position: "absolute",
4124
4126
  top: "-100px",
@@ -4127,56 +4129,56 @@ const ar = new X(5e3, 15e3), cr = "__/auth/iframe", lr = "emulator/auth/iframe",
4127
4129
  },
4128
4130
  "aria-hidden": "true",
4129
4131
  tabindex: "-1"
4130
- }, dr = /* @__PURE__ */ new Map([
4132
+ }, fr = /* @__PURE__ */ new Map([
4131
4133
  ["identitytoolkit.googleapis.com", "p"],
4132
4134
  ["staging-identitytoolkit.sandbox.googleapis.com", "s"],
4133
4135
  ["test-identitytoolkit.sandbox.googleapis.com", "t"]
4134
4136
  // test
4135
4137
  ]);
4136
- function hr(n) {
4138
+ function pr(n) {
4137
4139
  const e = n.config;
4138
- u(
4140
+ l(
4139
4141
  e.authDomain,
4140
4142
  n,
4141
4143
  "auth-domain-config-required"
4142
4144
  /* AuthErrorCode.MISSING_AUTH_DOMAIN */
4143
4145
  );
4144
- const t = e.emulator ? Me(e, lr) : `https://${n.config.authDomain}/${cr}`, i = {
4146
+ const t = e.emulator ? Ue(e, dr) : `https://${n.config.authDomain}/${ur}`, i = {
4145
4147
  apiKey: e.apiKey,
4146
4148
  appName: n.name,
4147
- v: J
4148
- }, r = dr.get(n.config.apiHost);
4149
+ v: X
4150
+ }, r = fr.get(n.config.apiHost);
4149
4151
  r && (i.eid = r);
4150
4152
  const s = n._getFrameworks();
4151
- return s.length && (i.fw = s.join(",")), `${t}?${Y(i).slice(1)}`;
4153
+ return s.length && (i.fw = s.join(",")), `${t}?${Q(i).slice(1)}`;
4152
4154
  }
4153
- async function fr(n) {
4154
- const e = await or(n), t = y().gapi;
4155
- return u(
4155
+ async function mr(n) {
4156
+ const e = await cr(n), t = w().gapi;
4157
+ return l(
4156
4158
  t,
4157
4159
  n,
4158
4160
  "internal-error"
4159
4161
  /* AuthErrorCode.INTERNAL_ERROR */
4160
4162
  ), e.open({
4161
4163
  where: document.body,
4162
- url: hr(n),
4164
+ url: pr(n),
4163
4165
  messageHandlersFilter: t.iframes.CROSS_ORIGIN_IFRAMES_FILTER,
4164
- attributes: ur,
4166
+ attributes: hr,
4165
4167
  dontclear: !0
4166
4168
  }, (i) => new Promise(async (r, s) => {
4167
4169
  await i.restyle({
4168
4170
  // Prevent iframe from closing on mouse out.
4169
4171
  setHideOnLeave: !1
4170
4172
  });
4171
- const o = T(
4173
+ const o = y(
4172
4174
  n,
4173
4175
  "network-request-failed"
4174
4176
  /* AuthErrorCode.NETWORK_REQUEST_FAILED */
4175
- ), c = y().setTimeout(() => {
4177
+ ), c = w().setTimeout(() => {
4176
4178
  s(o);
4177
- }, ar.get());
4179
+ }, lr.get());
4178
4180
  function a() {
4179
- y().clearTimeout(c), r(i);
4181
+ w().clearTimeout(c), r(i);
4180
4182
  }
4181
4183
  i.ping(a).then(a, () => {
4182
4184
  s(o);
@@ -4199,13 +4201,13 @@ async function fr(n) {
4199
4201
  * See the License for the specific language governing permissions and
4200
4202
  * limitations under the License.
4201
4203
  */
4202
- const pr = {
4204
+ const gr = {
4203
4205
  location: "yes",
4204
4206
  resizable: "yes",
4205
4207
  statusbar: "yes",
4206
4208
  toolbar: "no"
4207
- }, mr = 500, gr = 600, _r = "_blank", vr = "http://localhost";
4208
- class at {
4209
+ }, _r = 500, vr = 600, Ir = "_blank", Tr = "http://localhost";
4210
+ class ct {
4209
4211
  constructor(e) {
4210
4212
  this.window = e, this.associatedEvent = null;
4211
4213
  }
@@ -4217,21 +4219,21 @@ class at {
4217
4219
  }
4218
4220
  }
4219
4221
  }
4220
- function Ir(n, e, t, i = mr, r = gr) {
4222
+ function yr(n, e, t, i = _r, r = vr) {
4221
4223
  const s = Math.max((window.screen.availHeight - r) / 2, 0).toString(), o = Math.max((window.screen.availWidth - i) / 2, 0).toString();
4222
4224
  let c = "";
4223
- const a = Object.assign(Object.assign({}, pr), {
4225
+ const a = Object.assign(Object.assign({}, gr), {
4224
4226
  width: i.toString(),
4225
4227
  height: r.toString(),
4226
4228
  top: s,
4227
4229
  left: o
4228
- }), l = _().toLowerCase();
4229
- t && (c = Ct(l) ? _r : t), Pt(l) && (e = e || vr, a.scrollbars = "yes");
4230
- const d = Object.entries(a).reduce((p, [w, U]) => `${p}${w}=${U},`, "");
4231
- if (Xn(l) && c !== "_self")
4232
- return Tr(e || "", c), new at(null);
4230
+ }), u = _().toLowerCase();
4231
+ t && (c = Ot(u) ? Ir : t), Ct(u) && (e = e || Tr, a.scrollbars = "yes");
4232
+ const d = Object.entries(a).reduce((p, [I, x]) => `${p}${I}=${x},`, "");
4233
+ if (Zn(u) && c !== "_self")
4234
+ return wr(e || "", c), new ct(null);
4233
4235
  const h = window.open(e || "", c, d);
4234
- u(
4236
+ l(
4235
4237
  h,
4236
4238
  n,
4237
4239
  "popup-blocked"
@@ -4241,9 +4243,9 @@ function Ir(n, e, t, i = mr, r = gr) {
4241
4243
  h.focus();
4242
4244
  } catch {
4243
4245
  }
4244
- return new at(h);
4246
+ return new ct(h);
4245
4247
  }
4246
- function Tr(n, e) {
4248
+ function wr(n, e) {
4247
4249
  const t = document.createElement("a");
4248
4250
  t.href = n, t.target = e;
4249
4251
  const i = document.createEvent("MouseEvent");
@@ -4265,14 +4267,14 @@ function Tr(n, e) {
4265
4267
  * See the License for the specific language governing permissions and
4266
4268
  * limitations under the License.
4267
4269
  */
4268
- const yr = "__/auth/handler", wr = "emulator/auth/handler", Er = encodeURIComponent("fac");
4269
- async function ct(n, e, t, i, r, s) {
4270
- u(
4270
+ const Er = "__/auth/handler", kr = "emulator/auth/handler", br = encodeURIComponent("fac");
4271
+ async function lt(n, e, t, i, r, s) {
4272
+ l(
4271
4273
  n.config.authDomain,
4272
4274
  n,
4273
4275
  "auth-domain-config-required"
4274
4276
  /* AuthErrorCode.MISSING_AUTH_DOMAIN */
4275
- ), u(
4277
+ ), l(
4276
4278
  n.config.apiKey,
4277
4279
  n,
4278
4280
  "invalid-api-key"
@@ -4283,15 +4285,15 @@ async function ct(n, e, t, i, r, s) {
4283
4285
  appName: n.name,
4284
4286
  authType: t,
4285
4287
  redirectUrl: i,
4286
- v: J,
4288
+ v: X,
4287
4289
  eventId: r
4288
4290
  };
4289
- if (e instanceof Vt) {
4290
- e.setDefaultLanguage(n.languageCode), o.providerId = e.providerId || "", bn(e.getCustomParameters()) || (o.customParameters = JSON.stringify(e.getCustomParameters()));
4291
+ if (e instanceof $t) {
4292
+ e.setDefaultLanguage(n.languageCode), o.providerId = e.providerId || "", Rn(e.getCustomParameters()) || (o.customParameters = JSON.stringify(e.getCustomParameters()));
4291
4293
  for (const [d, h] of Object.entries({}))
4292
4294
  o[d] = h;
4293
4295
  }
4294
- if (e instanceof Q) {
4296
+ if (e instanceof ee) {
4295
4297
  const d = e.getScopes().filter((h) => h !== "");
4296
4298
  d.length > 0 && (o.scopes = d.join(","));
4297
4299
  }
@@ -4299,11 +4301,11 @@ async function ct(n, e, t, i, r, s) {
4299
4301
  const c = o;
4300
4302
  for (const d of Object.keys(c))
4301
4303
  c[d] === void 0 && delete c[d];
4302
- const a = await n._getAppCheckToken(), l = a ? `#${Er}=${encodeURIComponent(a)}` : "";
4303
- return `${kr(n)}?${Y(c).slice(1)}${l}`;
4304
+ const a = await n._getAppCheckToken(), u = a ? `#${br}=${encodeURIComponent(a)}` : "";
4305
+ return `${Sr(n)}?${Q(c).slice(1)}${u}`;
4304
4306
  }
4305
- function kr({ config: n }) {
4306
- return n.emulator ? Me(n, wr) : `https://${n.authDomain}/${yr}`;
4307
+ function Sr({ config: n }) {
4308
+ return n.emulator ? Ue(n, kr) : `https://${n.authDomain}/${Er}`;
4307
4309
  }
4308
4310
  /**
4309
4311
  * @license
@@ -4321,23 +4323,23 @@ function kr({ config: n }) {
4321
4323
  * See the License for the specific language governing permissions and
4322
4324
  * limitations under the License.
4323
4325
  */
4324
- const we = "webStorageSupport";
4325
- class br {
4326
+ const Ee = "webStorageSupport";
4327
+ class Rr {
4326
4328
  constructor() {
4327
- this.eventManagers = {}, this.iframes = {}, this.originValidationPromises = {}, this._redirectPersistence = Gt, this._completeRedirectFn = Ji, this._overrideRedirectResult = zi;
4329
+ this.eventManagers = {}, this.iframes = {}, this.originValidationPromises = {}, this._redirectPersistence = Bt, this._completeRedirectFn = Xi, this._overrideRedirectResult = Ki;
4328
4330
  }
4329
4331
  // Wrapping in async even though we don't await anywhere in order
4330
4332
  // to make sure errors are raised as promise rejections
4331
4333
  async _openPopup(e, t, i, r) {
4332
4334
  var s;
4333
4335
  A((s = this.eventManagers[e._key()]) === null || s === void 0 ? void 0 : s.manager, "_initialize() not called before _openPopup()");
4334
- const o = await ct(e, t, i, Re(), r);
4335
- return Ir(e, o, xe());
4336
+ const o = await lt(e, t, i, Ae(), r);
4337
+ return yr(e, o, Ve());
4336
4338
  }
4337
4339
  async _openRedirect(e, t, i, r) {
4338
4340
  await this._originValidation(e);
4339
- const s = await ct(e, t, i, Re(), r);
4340
- return Ai(s), new Promise(() => {
4341
+ const s = await lt(e, t, i, Ae(), r);
4342
+ return Ci(s), new Promise(() => {
4341
4343
  });
4342
4344
  }
4343
4345
  _initialize(e) {
@@ -4352,8 +4354,8 @@ class br {
4352
4354
  }), i;
4353
4355
  }
4354
4356
  async initAndGetManager(e) {
4355
- const t = await fr(e), i = new Xi(e);
4356
- return t.register("authEvent", (r) => (u(
4357
+ const t = await mr(e), i = new Zi(e);
4358
+ return t.register("authEvent", (r) => (l(
4357
4359
  r == null ? void 0 : r.authEvent,
4358
4360
  e,
4359
4361
  "invalid-auth-event"
@@ -4364,9 +4366,9 @@ class br {
4364
4366
  }), gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER), this.eventManagers[e._key()] = { manager: i }, this.iframes[e._key()] = t, i;
4365
4367
  }
4366
4368
  _isIframeWebStorageSupported(e, t) {
4367
- this.iframes[e._key()].send(we, { type: we }, (r) => {
4369
+ this.iframes[e._key()].send(Ee, { type: Ee }, (r) => {
4368
4370
  var s;
4369
- const o = (s = r == null ? void 0 : r[0]) === null || s === void 0 ? void 0 : s[we];
4371
+ const o = (s = r == null ? void 0 : r[0]) === null || s === void 0 ? void 0 : s[Ee];
4370
4372
  o !== void 0 && t(!!o), R(
4371
4373
  e,
4372
4374
  "internal-error"
@@ -4376,14 +4378,14 @@ class br {
4376
4378
  }
4377
4379
  _originValidation(e) {
4378
4380
  const t = e._key();
4379
- return this.originValidationPromises[t] || (this.originValidationPromises[t] = nr(e)), this.originValidationPromises[t];
4381
+ return this.originValidationPromises[t] || (this.originValidationPromises[t] = rr(e)), this.originValidationPromises[t];
4380
4382
  }
4381
4383
  get _shouldInitProactively() {
4382
- return Ut() || De() || pe();
4384
+ return Dt() || Fe() || me();
4383
4385
  }
4384
4386
  }
4385
- const Sr = br;
4386
- var lt = "@firebase/auth", ut = "1.7.5";
4387
+ const Ar = Rr;
4388
+ var ut = "@firebase/auth", dt = "1.7.5";
4387
4389
  /**
4388
4390
  * @license
4389
4391
  * Copyright 2020 Google LLC
@@ -4400,7 +4402,7 @@ var lt = "@firebase/auth", ut = "1.7.5";
4400
4402
  * See the License for the specific language governing permissions and
4401
4403
  * limitations under the License.
4402
4404
  */
4403
- class Rr {
4405
+ class Pr {
4404
4406
  constructor(e) {
4405
4407
  this.auth = e, this.internalListeners = /* @__PURE__ */ new Map();
4406
4408
  }
@@ -4425,7 +4427,7 @@ class Rr {
4425
4427
  t && (this.internalListeners.delete(e), t(), this.updateProactiveRefresh());
4426
4428
  }
4427
4429
  assertAuthConfigured() {
4428
- u(
4430
+ l(
4429
4431
  this.auth._initializationPromise,
4430
4432
  "dependent-sdk-initialized-before-auth"
4431
4433
  /* AuthErrorCode.DEPENDENT_SDK_INIT_BEFORE_AUTH */
@@ -4451,7 +4453,7 @@ class Rr {
4451
4453
  * See the License for the specific language governing permissions and
4452
4454
  * limitations under the License.
4453
4455
  */
4454
- function Ar(n) {
4456
+ function Cr(n) {
4455
4457
  switch (n) {
4456
4458
  case "Node":
4457
4459
  return "node";
@@ -4467,12 +4469,12 @@ function Ar(n) {
4467
4469
  return;
4468
4470
  }
4469
4471
  }
4470
- function Pr(n) {
4471
- ze(new qe(
4472
+ function Or(n) {
4473
+ qe(new Ke(
4472
4474
  "auth",
4473
4475
  (e, { options: t }) => {
4474
4476
  const i = e.getProvider("app").getImmediate(), r = e.getProvider("heartbeat"), s = e.getProvider("app-check-internal"), { apiKey: o, authDomain: c } = i.options;
4475
- u(o && !o.includes(":"), "invalid-api-key", { appName: i.name });
4477
+ l(o && !o.includes(":"), "invalid-api-key", { appName: i.name });
4476
4478
  const a = {
4477
4479
  apiKey: o,
4478
4480
  authDomain: c,
@@ -4480,9 +4482,9 @@ function Pr(n) {
4480
4482
  apiHost: "identitytoolkit.googleapis.com",
4481
4483
  tokenApiHost: "securetoken.googleapis.com",
4482
4484
  apiScheme: "https",
4483
- sdkClientVersion: Dt(n)
4484
- }, l = new ri(i, r, s, a);
4485
- return ui(l, t), l;
4485
+ sdkClientVersion: Ft(n)
4486
+ }, u = new oi(i, r, s, a);
4487
+ return hi(u, t), u;
4486
4488
  },
4487
4489
  "PUBLIC"
4488
4490
  /* ComponentType.PUBLIC */
@@ -4494,21 +4496,21 @@ function Pr(n) {
4494
4496
  "auth-internal"
4495
4497
  /* _ComponentName.AUTH_INTERNAL */
4496
4498
  ).initialize();
4497
- })), ze(new qe(
4499
+ })), qe(new Ke(
4498
4500
  "auth-internal",
4499
4501
  (e) => {
4500
- const t = me(e.getProvider(
4502
+ const t = ge(e.getProvider(
4501
4503
  "auth"
4502
4504
  /* _ComponentName.AUTH */
4503
4505
  ).getImmediate());
4504
- return ((i) => new Rr(i))(t);
4506
+ return ((i) => new Pr(i))(t);
4505
4507
  },
4506
4508
  "PRIVATE"
4507
4509
  /* ComponentType.PRIVATE */
4508
4510
  ).setInstantiationMode(
4509
4511
  "EXPLICIT"
4510
4512
  /* InstantiationMode.EXPLICIT */
4511
- )), Se(lt, ut, Ar(n)), Se(lt, ut, "esm2017");
4513
+ )), Re(ut, dt, Cr(n)), Re(ut, dt, "esm2017");
4512
4514
  }
4513
4515
  /**
4514
4516
  * @license
@@ -4526,117 +4528,118 @@ function Pr(n) {
4526
4528
  * See the License for the specific language governing permissions and
4527
4529
  * limitations under the License.
4528
4530
  */
4529
- const Cr = 5 * 60, Or = gt("authIdTokenMaxAge") || Cr;
4530
- let dt = null;
4531
- const Nr = (n) => async (e) => {
4531
+ const Nr = 5 * 60, Lr = _t("authIdTokenMaxAge") || Nr;
4532
+ let ht = null;
4533
+ const Mr = (n) => async (e) => {
4532
4534
  const t = e && await e.getIdTokenResult(), i = t && ((/* @__PURE__ */ new Date()).getTime() - Date.parse(t.issuedAtTime)) / 1e3;
4533
- if (i && i > Or)
4535
+ if (i && i > Lr)
4534
4536
  return;
4535
4537
  const r = t == null ? void 0 : t.token;
4536
- dt !== r && (dt = r, await fetch(n, {
4538
+ ht !== r && (ht = r, await fetch(n, {
4537
4539
  method: r ? "POST" : "DELETE",
4538
4540
  headers: r ? {
4539
4541
  Authorization: `Bearer ${r}`
4540
4542
  } : {}
4541
4543
  }));
4542
4544
  };
4543
- function Lr(n = yn()) {
4544
- const e = _t(n, "auth");
4545
+ function Ur(n = En()) {
4546
+ const e = vt(n, "auth");
4545
4547
  if (e.isInitialized())
4546
4548
  return e.getImmediate();
4547
- const t = li(n, {
4548
- popupRedirectResolver: Sr,
4549
+ const t = di(n, {
4550
+ popupRedirectResolver: Ar,
4549
4551
  persistence: [
4550
- Fi,
4551
- bi,
4552
- Gt
4552
+ Vi,
4553
+ Ri,
4554
+ Bt
4553
4555
  ]
4554
- }), i = gt("authTokenSyncURL");
4556
+ }), i = _t("authTokenSyncURL");
4555
4557
  if (i && typeof isSecureContext == "boolean" && isSecureContext) {
4556
4558
  const s = new URL(i, location.origin);
4557
4559
  if (location.origin === s.origin) {
4558
- const o = Nr(s.toString());
4559
- yi(t, o, () => o(t.currentUser)), Ti(t, (c) => o(c));
4560
+ const o = Mr(s.toString());
4561
+ Ei(t, o, () => o(t.currentUser)), wi(t, (c) => o(c));
4560
4562
  }
4561
4563
  }
4562
- const r = Tn("auth");
4563
- return r && di(t, `http://${r}`), t;
4564
+ const r = wn("auth");
4565
+ return r && fi(t, `http://${r}`), t;
4564
4566
  }
4565
- function Mr() {
4567
+ function Dr() {
4566
4568
  var n, e;
4567
4569
  return (e = (n = document.getElementsByTagName("head")) === null || n === void 0 ? void 0 : n[0]) !== null && e !== void 0 ? e : document;
4568
4570
  }
4569
- si({
4571
+ ai({
4570
4572
  loadJS(n) {
4571
4573
  return new Promise((e, t) => {
4572
4574
  const i = document.createElement("script");
4573
4575
  i.setAttribute("src", n), i.onload = e, i.onerror = (r) => {
4574
- const s = T(
4576
+ const s = y(
4575
4577
  "internal-error"
4576
4578
  /* AuthErrorCode.INTERNAL_ERROR */
4577
4579
  );
4578
4580
  s.customData = r, t(s);
4579
- }, i.type = "text/javascript", i.charset = "UTF-8", Mr().appendChild(i);
4581
+ }, i.type = "text/javascript", i.charset = "UTF-8", Dr().appendChild(i);
4580
4582
  });
4581
4583
  },
4582
4584
  gapiScript: "https://apis.google.com/js/api.js",
4583
4585
  recaptchaV2Script: "https://www.google.com/recaptcha/api.js",
4584
4586
  recaptchaEnterpriseScript: "https://www.google.com/recaptcha/enterprise.js?render="
4585
4587
  });
4586
- Pr(
4588
+ Or(
4587
4589
  "Browser"
4588
4590
  /* ClientPlatform.BROWSER */
4589
4591
  );
4590
- var Ur = { 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", importFilesBucketUrl: "feedme-dev-4c3ef.appspot.com", clientId: "1a362d621873497b277ea55258cc82594ba148d235257f7bd44ea2acc132d8a4" }, Dr = { authUrl: "https://portal-v2-dev.feedmeapi.com/", slackWebhookUrl: "https://hooks.slack.com/services/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", appUrl: "feedmedev.vip", crmUrl: "crm.feedmedev.cc", paymentPortalUrl: "https://portal.feedmedev.cc/payment/payout-account", licensePortalUrl: "https://license.feedmedev.cc/", marketingV1Portal: "https://marketing-v1.feedmedev.cc", voucherAppUrl: "https://voucher.feedmedev.cc/" };
4591
- const Fr = {
4592
+ var Fr = { 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", importFilesBucketUrl: "feedme-dev-4c3ef.appspot.com", clientId: "1a362d621873497b277ea55258cc82594ba148d235257f7bd44ea2acc132d8a4" }, xr = { authUrl: "https://portal-v2-dev.feedmeapi.com/", slackWebhookUrl: "https://hooks.slack.com/services/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", appUrl: "feedmedev.vip", crmUrl: "crm.feedmedev.cc", paymentPortalUrl: "https://portal.feedmedev.cc/payment/payout-account", licensePortalUrl: "https://license.feedmedev.cc/", marketingV1Portal: "https://marketing-v1.feedmedev.cc", voucherAppUrl: "https://voucher.feedmedev.cc/" };
4593
+ const Vr = {
4592
4594
  key: 1,
4593
4595
  class: "h-full w-full"
4594
- }, xr = ["src"], Zr = /* @__PURE__ */ ht({
4596
+ }, $r = ["src"], is = /* @__PURE__ */ ft({
4595
4597
  __name: "App",
4596
4598
  setup(n) {
4597
- const e = be(), t = cn(), i = ln(), r = un(), s = dn(), o = mt(), c = te(o.query.showHeader !== "false"), a = te(!1), { currentBusiness: l } = be(), d = te(!1), h = Ee(() => i.version), p = Ee(() => {
4598
- const m = e.currentCountry.value || "MY", g = Ke.getIdToken(), I = l.value._id;
4599
- return `${Dr.marketingV1Portal}/b/${I}/marketing/overview?showHeader=false&country=${m}&token=${g}`;
4599
+ const e = Se(), t = cn(), i = ln(), r = un(), s = dn(), o = gt(), c = ie(o.query.showHeader !== "false"), a = ie(!1), u = gn(), { currentBusiness: d } = Se(), h = ie(!1), p = ke(() => i.version), I = ke(() => {
4600
+ const m = e.currentCountry.value || "MY", g = Je.getIdToken(), T = d.value._id;
4601
+ return `${xr.marketingV1Portal}/b/${T}/marketing/overview?showHeader=false&country=${m}&token=${g}`;
4600
4602
  });
4601
- async function w() {
4602
- if (Sn().length) {
4603
+ async function x() {
4604
+ if (An().length) {
4603
4605
  console.warn("CONNECT: initFirebase: Firebase already initialized");
4604
4606
  return;
4605
4607
  }
4606
- const m = Rn(Ur.firebase), g = await an.getCustomToken(), I = Lr();
4607
- await Ii(I, g), An(m), console.log("initFirebase", m);
4608
+ const m = Pn(Fr.firebase), g = await an.getCustomToken(), T = Ur();
4609
+ await yi(T, g), Cn(m), console.log("initFirebase", m);
4608
4610
  }
4609
- const U = async () => {
4610
- d.value = !1, await rn(), console.log("forceRerender"), Ke.setBusinessId(l.value._id), await i.readPremium(), !a.value && h.value === "v2" ? e.registerSidebarComponent(Nn) : e.hideSidebarToggle(!0), await w(), a.value = !0, d.value = !0;
4611
+ const B = async () => {
4612
+ h.value = !1, await rn(), console.log("forceRerender"), Je.setBusinessId(d.value._id), await i.readPremium(), !a.value && p.value === "v2" ? e.registerSidebarComponent(Mn) : e.hideSidebarToggle(!0), await x(), a.value = !0, h.value = !0;
4611
4613
  };
4612
- return en(() => {
4613
- if (Pn.Config.setCountry(e.currentCountry.value || "MY"), t.initProvider(r, s), !c.value) {
4614
- const m = document.getElementsByClassName("app-header")[0], g = document.getElementsByClassName("app-sidebar")[0], I = document.getElementsByClassName("app-container")[0], x = document.getElementsByTagName("main")[0];
4615
- m == null || m.classList.add("!hidden"), g == null || g.classList.add("!pt-0"), I == null || I.classList.add("!pt-0"), x == null || x.classList.add("!pt-0"), e.hideSidebarToggle(!0);
4614
+ return tn(() => {
4615
+ if (On.Config.setCountry(e.currentCountry.value || "MY"), t.initProvider(r, s), !c.value) {
4616
+ const m = document.getElementsByClassName("app-header")[0], g = document.getElementsByClassName("app-sidebar")[0], T = document.getElementsByClassName("app-container")[0], U = document.getElementsByTagName("main")[0];
4617
+ m == null || m.classList.add("!hidden"), g == null || g.classList.add("!pt-0"), T == null || T.classList.add("!pt-0"), U == null || U.classList.add("!pt-0"), e.hideSidebarToggle(!0);
4616
4618
  }
4617
- l.value != null && (console.log("App mounted, forceRerender"), U());
4618
- }), ft(
4619
+ d.value != null && (console.log("App mounted, forceRerender"), B());
4620
+ }), pt(
4619
4621
  () => e.currentBusiness.value,
4620
4622
  async (m, g) => {
4621
- console.log("Current business changed"), m != null && m._id != g._id && (console.log("forceRerender when business changes", m, g), U());
4623
+ console.log("Current business changed"), m != null && m._id != g._id && (console.log("forceRerender when business changes", m, g), B());
4622
4624
  }
4623
- ), (m, g) => (ne(), ke(tn, null, [
4624
- v(d) && v(h) === "v2" ? (ne(), nn(v(on), { key: 0 })) : Ge("", !0),
4625
- v(d) && v(h) !== "v2" ? (ne(), ke("div", Fr, [
4626
- pt(pn, {
4627
- json: { url: v(p) }
4625
+ ), (m, g) => (K(), be(nn, null, [
4626
+ v(h) && v(p) === "v2" ? (K(), Be(v(on), { key: 0 })) : ye("", !0),
4627
+ v(h) && v(p) !== "v2" ? (K(), be("div", Vr, [
4628
+ mt(pn, {
4629
+ json: { url: v(I) }
4628
4630
  }, null, 8, ["json"]),
4629
- ie("iframe", {
4631
+ re("iframe", {
4630
4632
  allow: "clipboard-read; clipboard-write",
4631
4633
  frameBorder: "0",
4632
4634
  height: "100%",
4633
4635
  width: "100%",
4634
- src: v(p)
4635
- }, null, 8, xr)
4636
- ])) : Ge("", !0)
4636
+ src: v(I)
4637
+ }, null, 8, $r)
4638
+ ])) : ye("", !0),
4639
+ v(u).dialogShowing ? (K(), Be(v(mn), { key: 2 })) : ye("", !0)
4637
4640
  ], 64));
4638
4641
  }
4639
4642
  });
4640
4643
  export {
4641
- Zr as default
4644
+ is as default
4642
4645
  };