@feedmepos/mf-connect 0.1.98-beta.9 → 0.1.99-prod

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (121) hide show
  1. package/dist/Analytic-CmlJa1WX.js +426 -0
  2. package/dist/{App-CwMrP0Q-.js → App-D0thRELq.js} +807 -673
  3. package/dist/{Bin-sSw4Gatd.js → Bin-DnkPcZdC.js} +8 -8
  4. package/dist/{Broadcast-DH2Fpb-O.js → Broadcast-o6nSQOsx.js} +17 -18
  5. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-Cd47Mrej.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BPGzh4u8.js} +6 -5
  6. package/dist/{Card-D4YJZ_I8.js → Card-zjezSaRB.js} +19 -19
  7. package/dist/{Collections--8QcjuAp.js → Collections-48W_jFFS.js} +185 -197
  8. package/dist/{Credit-DgF3qd52.js → Credit-CYaCjNVK.js} +53 -54
  9. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-D3SnYlQ0.js +2223 -0
  10. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-BgHApZqm.js → EffectSheet.vue_vue_type_style_index_0_lang-CbpKQj-r.js} +6 -6
  11. package/dist/{Experience-DxtkVeS9.js → Experience-HmfLlywu.js} +34 -35
  12. package/dist/{FileSaver.min-BtPuPAIo.js → FileSaver.min-cDraiw9g.js} +1 -1
  13. package/dist/{Game-CbcrkUBh.js → Game-DHLdDQRi.js} +15 -16
  14. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-CqoO7N7r.js → ImageInput.vue_vue_type_script_setup_true_lang-DZrmFruC.js} +1 -1
  15. package/dist/{Index-BzPX7mr1.js → Index-CMm5L1Ph.js} +10 -10
  16. package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-mI-5po-a.js → LocationPicker.vue_vue_type_script_setup_true_lang-B6tGeGGC.js} +1 -1
  17. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-DyP3ipwX.js → LottieAnimation.vue_vue_type_script_setup_true_lang-CV4V9qlc.js} +1 -1
  18. package/dist/{MainLayout-gxkaZeZ-.js → MainLayout-iru8naVF.js} +1 -1
  19. package/dist/{Marketing-BlMjT0cP.js → Marketing-AP8z-pA0.js} +4 -4
  20. package/dist/{MarketingMaterialEdit-v0vGn3Lz.js → MarketingMaterialEdit-HYTdiTvs.js} +211 -214
  21. package/dist/{Member-BBUlAPqZ.js → Member-N_ks2GiW.js} +20 -20
  22. package/dist/{MemberList-DZJhULFD.js → MemberList-Cj8EfN0q.js} +51 -50
  23. package/dist/{MemberTransactions-CTBoDEg4.js → MemberTransactions-DUj4Fq6M.js} +1 -1
  24. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-nlYOP9gZ.js → MessageInput.vue_vue_type_script_setup_true_lang-ZD6_8BzX.js} +11 -11
  25. package/dist/{Mission-D_xjOnWO.js → Mission-DfZ0brqC.js} +34 -35
  26. package/dist/{Overview-C5-uSEJH.js → Overview-BnFPQbSg.js} +19 -19
  27. package/dist/Overview-kB_HApIc.js +969 -0
  28. package/dist/{Point-BmVyG_i-.js → Point-PsWJEEsn.js} +29 -30
  29. package/dist/{Promotion-BWmTkHyw.js → Promotion-BsNT1kOG.js} +105 -111
  30. package/dist/{Queue-Do2XlY5H.js → Queue-Cgw3PgEi.js} +43 -43
  31. package/dist/{Record-BIzUOikr.js → Record-DwzoIz3R.js} +10 -10
  32. package/dist/Review-kF2wLu5o.js +46 -0
  33. package/dist/ReviewFacebookCallback-B6RjqR5T.js +238 -0
  34. package/dist/ReviewGoogleCallback-DjLK1b4-.js +213 -0
  35. package/dist/{Reward-gCpIJIq9.js → Reward-C8O5U2NU.js} +17 -17
  36. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-Dkyz-W9m.js → RewardGroup.vue_vue_type_script_setup_true_lang-BqKABBF1.js} +12 -12
  37. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-DvNyurCW.js +1888 -0
  38. package/dist/{Segment-CZrzY2st.js → Segment-BtmeNQnL.js} +78 -77
  39. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-B1qAMtkn.js → SelectItems.vue_vue_type_script_setup_true_lang-P4wy1bqG.js} +3 -3
  40. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-Dc36wzB0.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-DQ93AOeI.js} +12 -12
  41. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-BtnF-BPt.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-B3P7Ob40.js} +4 -4
  42. package/dist/{Setting-JrI4ttI1.js → Setting-D1SQ6TKF.js} +248 -259
  43. package/dist/{SettingAdvertisements-iOOpEUlI.js → SettingAdvertisements-pUTX9uu3.js} +13 -13
  44. package/dist/Settings-Bbd3cMNH.js +228 -0
  45. package/dist/{Store-DbXKThJn.js → Store-Dgc-J8Q7.js} +24 -24
  46. package/dist/{StoreRewards-CfkwVw7d.js → StoreRewards-CJ090vEj.js} +16 -16
  47. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-B35vDFFq.js +1067 -0
  48. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-5Aazsvfa.js +142 -0
  49. package/dist/{Tier-BVrAqpWt.js → Tier-CKGyFDiY.js} +469 -544
  50. package/dist/{Title-DhumBh-S.js → Title-DXRex7t9.js} +92 -93
  51. package/dist/{Transaction-BQLge28p.js → Transaction-B1eC-Gln.js} +2 -2
  52. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-CSPaj2uN.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-B2GABNUx.js} +6 -6
  53. package/dist/{Voucher-DeB4YhvL.js → Voucher-Omh_kYVH.js} +27 -28
  54. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-BjUFEIlS.js → VoucherEditor.vue_vue_type_script_setup_true_lang-DD2WD_Vt.js} +12 -12
  55. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-BzrPUcC9.js → ZodTextField.vue_vue_type_script_setup_true_lang-CAtzo8zL.js} +2 -2
  56. package/dist/{app-BHIG18wW.js → app-D8i8XAyR.js} +1439 -1406
  57. package/dist/app.js +3 -4
  58. package/dist/{business-CCmy2VBj.js → business-6gZtKQ8L.js} +1 -1
  59. package/dist/{campaign-DiFdvcPE.js → campaign-DIgbywUy.js} +64 -114
  60. package/dist/{campaign-jofcGLi8.js → campaign-MPUFwgli.js} +7 -13
  61. package/dist/{campaign.enum-CBp5IeWz.js → campaign.enum-CSlbGhc-.js} +2 -3
  62. package/dist/{campaign.fn-BZ0Ivuwi.js → campaign.fn-BvxZt-0r.js} +65 -65
  63. package/dist/{collectible.enum-frp5wluZ.js → collectible.enum-20LKRFir.js} +1 -1
  64. package/dist/collection.fn-03oGQuF_.js +26 -0
  65. package/dist/dto-C5_Te4gk.js +216 -0
  66. package/dist/{effect-BegkMXTr.js → effect-CkurpNMu.js} +1 -1
  67. package/dist/{email-addresses-B0t3BKV6.js → email-addresses-CR8pgurp.js} +2 -2
  68. package/dist/{export-CGrchnsA.js → export-CfDeISbW.js} +3 -3
  69. package/dist/google-BQK68wbe.js +5 -0
  70. package/dist/{helper-CIYSBZvt.js → helper-BQYvN6FL.js} +1 -1
  71. package/dist/{index-Dg_OJTxE.js → index-6FvsyekG.js} +1 -1
  72. package/dist/index-ARC-NYFZ.js +55 -0
  73. package/dist/{index-Cv0pq7A_.js → index-C9j6OhgK.js} +302 -634
  74. package/dist/{index-BPh_k5rA.js → index-CH_QL_76.js} +3 -3
  75. package/dist/{index-DdAl4SK2.js → index-CJUzQG6t.js} +26 -17
  76. package/dist/{index-PmoP3mXP.js → index-Cv-DbZdw.js} +7 -7
  77. package/dist/{index-D4_JDL9j.js → index-D6wOnTAl.js} +3 -3
  78. package/dist/{index-CixwNfnv.js → index-D8vmbFE5.js} +1 -1
  79. package/dist/{index-DcE-11T-.js → index-DW7H-3z4.js} +1275 -1506
  80. package/dist/{index-C_6y8OES.js → index-Dcxjgr6s.js} +1 -1
  81. package/dist/{index-CF1RNy12.js → index-Dz130JVH.js} +1 -1
  82. package/dist/{index-BBgVfqVf.js → index-ERqXuFvQ.js} +1 -1
  83. package/dist/{index-C-2YkeBp.js → index-hTgJrZR8.js} +1968 -1996
  84. package/dist/{index.esm2017-QGfAIiCc.js → index.esm2017-DY9Lrb0O.js} +184 -184
  85. package/dist/{loading-Cql_LElt.js → loading-EnU7K0k3.js} +1 -1
  86. package/dist/{lodash-PMdIVUsY.js → lodash-Cr7KdLib.js} +1 -1
  87. package/dist/{membership-BHD1GQ45.js → membership-B1eIzQDB.js} +3 -3
  88. package/dist/{money-CASVly6f.js → money-DpUzzEJj.js} +1 -1
  89. package/dist/{number-dMI2x0jy.js → number-DAz9zOKI.js} +1 -1
  90. package/dist/object-qECH92oz.js +26 -0
  91. package/dist/objectid-LXOkMCkM.js +145 -0
  92. package/dist/{plugins-CnEVta3V.js → plugins-DJ13vaqz.js} +95 -94
  93. package/dist/{reward-vdrNMYrF.js → reward-Cmx_swM1.js} +1 -1
  94. package/dist/{rule-BLXUDFEw.js → rule-BCzySyr6.js} +487 -505
  95. package/dist/rule-builder-CDkWYBLG.js +102 -0
  96. package/dist/style.css +1 -1
  97. package/dist/template-DfnYZzoa.js +236 -0
  98. package/dist/{index-DzQCyuGA.js → timezone-Beb0XkZC.js} +20 -21
  99. package/dist/{trigger-Ccrh378a.js → trigger-BfQprjI-.js} +5 -5
  100. package/dist/{useMarketingMaterialActions-BQLBRa3G.js → useMarketingMaterialActions-CagN58AP.js} +3 -3
  101. package/dist/{usePagination-BjsffqjT.js → usePagination-XyeJR5ws.js} +1 -1
  102. package/dist/{user-B5jS1GLb.js → user-l2YG1VjD.js} +1 -1
  103. package/dist/{vue-i18n-CCjHlB6z.js → vue-i18n-DJXhpQga.js} +391 -391
  104. package/dist/{xlsx-DmBOvA2N.js → xlsx-DypdT1NW.js} +1 -1
  105. package/dist/{zod-DrYZ6KS4.js → zod-BM5P7Bti.js} +1 -1
  106. package/package.json +4 -8
  107. package/dist/AuditLogs-CAtlilma.js +0 -2013
  108. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-Bpr9KuHW.js +0 -3377
  109. package/dist/Grab-CDhmMNsL.js +0 -300
  110. package/dist/LoyaltyDashboard-BFjI3IWT.js +0 -1082
  111. package/dist/Review-D9cFDrhN.js +0 -1192
  112. package/dist/ReviewFacebookCallback-DbE8_6D3.js +0 -243
  113. package/dist/ReviewGoogleCallback-LMZgyopt.js +0 -208
  114. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-BEqgU70M.js +0 -1911
  115. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CNC_jNgW.js +0 -1130
  116. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-BBlCR4pN.js +0 -7007
  117. package/dist/duplicateCampaign-CxuNftok.js +0 -51
  118. package/dist/index-Dc-I4Jr-.js +0 -67
  119. package/dist/object-BYyQ0PZp.js +0 -18
  120. package/dist/objectid-Db_4Ays3.js +0 -145
  121. package/dist/template-CRjkIq3e.js +0 -188
@@ -1,21 +1,21 @@
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";
4
- import { u as cn } from "./app-wDQR6dpb.js";
5
- import { u as ln } from "./business-CCmy2VBj.js";
6
- import "./index-CF1RNy12.js";
7
- import { components as z, useSnackbar as un, useDialog as dn } from "@feedmepos/ui-library";
8
- import { u as hn } from "./vue-i18n-CCjHlB6z.js";
9
- import { C as Be, m as fn } from "./index-DzQCyuGA.js";
10
- import { R as f } from "./app-BHIG18wW.js";
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-QGfAIiCc.js";
13
- import { _ as Ne } from "./tslib.es6-BCqqvLQ_.js";
14
- import { S as Ke, c as Pn } from "./index-PmoP3mXP.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({
1
+ import { defineComponent as De, ref as ee, h as Y, computed as ne, watch as xe, resolveComponent as Z, openBlock as H, createElementBlock as pe, createVNode as S, unref as p, createElementVNode as _, toDisplayString as R, createBlock as Ne, withCtx as X, Fragment as It, renderList as cn, onMounted as ln, createCommentVNode as Ae, nextTick as un } from "vue";
2
+ import { useRouter as yt, useRoute as wt, RouterView as dn } from "vue-router";
3
+ import { useCoreStore as me, FeedMeAuth as hn } from "@feedmepos/mf-common";
4
+ import { u as fn } from "./app-wDQR6dpb.js";
5
+ import { u as pn } from "./business-6gZtKQ8L.js";
6
+ import "./index-Dz130JVH.js";
7
+ import { components as Q, useSnackbar as mn, useDialog as gn } from "@feedmepos/ui-library";
8
+ import { u as Tt } from "./vue-i18n-DJXhpQga.js";
9
+ import { C as Xe, m as _n } from "./timezone-Beb0XkZC.js";
10
+ import { R as f, A as vn, a as Qe } from "./app-D8i8XAyR.js";
11
+ import { J as In } from "./JsonViewer-v8_C7l5N.js";
12
+ import { r as Oe, L as yn, g as kt, i as wn, a as Tn, _ as Ze, C as et, b as kn, S as re, c as A, d as K, E as Fe, e as En, f as Et, h as bn, j as Sn, k as bt, l as y, m as Rn, F as Ve, n as An, q as se, o as Pn, p as Cn, s as Nn, t as On, u as Ln } from "./index.esm2017-DY9Lrb0O.js";
13
+ import { _ as $e } from "./tslib.es6-BCqqvLQ_.js";
14
+ import { S as tt, c as Mn } from "./index-Cv-DbZdw.js";
15
+ const Un = { class: "flex flex-col h-full justify-between py-16" }, Dn = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary text-center" }, xn = /* @__PURE__ */ De({
16
16
  __name: "NavigationTab",
17
17
  setup(n) {
18
- const { t: e } = hn(), t = te(), i = [
18
+ const { t: e } = Tt(), t = ee(), i = [
19
19
  {
20
20
  label: e("connect.navigation.analytic"),
21
21
  value: f["$connect-ANALYTIC"]
@@ -35,10 +35,6 @@ const Cn = { class: "flex flex-col h-full justify-between py-16" }, On = { class
35
35
  {
36
36
  label: e("connect.navigation.broadcast"),
37
37
  value: f["$connect-CAMPAIGN_BROADCAST"]
38
- },
39
- {
40
- label: e("connect.navigation.grab"),
41
- value: f["$connect-CAMPAIGN_GRAB"]
42
38
  }
43
39
  ]
44
40
  },
@@ -61,7 +57,7 @@ const Cn = { class: "flex flex-col h-full justify-between py-16" }, On = { class
61
57
  {
62
58
  label: e("connect.navigation.point"),
63
59
  value: f["$connect-PROGRAM_POINT"],
64
- badge: () => B(z.FmPill, { variant: "premium" })
60
+ badge: () => Y(Q.FmPill, { variant: "premium" })
65
61
  },
66
62
  {
67
63
  label: e("connect.navigation.credit"),
@@ -70,7 +66,7 @@ const Cn = { class: "flex flex-col h-full justify-between py-16" }, On = { class
70
66
  {
71
67
  label: e("connect.navigation.game"),
72
68
  value: f["$connect-PROGRAM_GAME"],
73
- badge: () => B(z.FmPill, { variant: "premium" })
69
+ badge: () => Y(Q.FmPill, { variant: "premium" })
74
70
  },
75
71
  {
76
72
  label: "Mission",
@@ -89,19 +85,19 @@ const Cn = { class: "flex flex-col h-full justify-between py-16" }, On = { class
89
85
  {
90
86
  label: e("connect.navigation.segments"),
91
87
  value: f["$connect-LOYALTY_SEGMENT"],
92
- badge: () => B(z.FmPill, { variant: "premium" })
88
+ badge: () => Y(Q.FmPill, { variant: "premium" })
93
89
  },
94
90
  {
95
91
  label: e("connect.navigation.card"),
96
92
  value: f["$connect-LOYALTY_CARD"],
97
- badge: () => B(z.FmPill, { variant: "premium" })
93
+ badge: () => Y(Q.FmPill, { variant: "premium" })
98
94
  }
99
95
  ]
100
96
  },
101
97
  {
102
98
  label: e("connect.navigation.referral"),
103
99
  value: f["$connect-REFERRAL"],
104
- badge: () => B(z.FmPill, { variant: "premium" })
100
+ badge: () => Y(Q.FmPill, { variant: "premium" })
105
101
  },
106
102
  {
107
103
  label: e("connect.navigation.store"),
@@ -115,10 +111,6 @@ const Cn = { class: "flex flex-col h-full justify-between py-16" }, On = { class
115
111
  label: e("connect.navigation.marketingMaterials"),
116
112
  value: f["$connect-MARKETING"]
117
113
  },
118
- {
119
- label: e("connect.navigation.auditLogs"),
120
- value: f["$connect-AUDIT_LOGS"]
121
- },
122
114
  {
123
115
  label: e("connect.navigation.review"),
124
116
  value: f["$connect-REVIEW"]
@@ -131,15 +123,15 @@ const Cn = { class: "flex flex-col h-full justify-between py-16" }, On = { class
131
123
  label: e("connect.navigation.bin"),
132
124
  value: f["$connect-BIN"]
133
125
  }
134
- ], r = sn(), s = mt(), o = i.reduce((d, h) => [...(h.children ?? []).map((p) => p.value), ...d, h.value], []), c = be(), a = Ee(() => {
126
+ ], r = yt(), s = wt(), o = i.reduce((d, h) => [...(h.children ?? []).map((m) => m.value), ...d, h.value], []), c = me(), a = ne(() => {
135
127
  const d = c.currentCountry.value || "MY";
136
- return console.log(`[MF] Timezone set to: ${Be[d]}`), Be[d];
128
+ return console.log(`[MF] Timezone set to: ${Xe[d]}`), Xe[d];
137
129
  });
138
- ft(
130
+ xe(
139
131
  () => s,
140
132
  (d) => {
141
- const h = d.matched.map((p) => p.name).reverse();
142
- t.value = h.find((p) => o.includes(p));
133
+ const h = d.matched.map((m) => m.name).reverse();
134
+ t.value = h.find((m) => o.includes(m));
143
135
  },
144
136
  { immediate: !0 }
145
137
  );
@@ -147,24 +139,165 @@ const Cn = { class: "flex flex-col h-full justify-between py-16" }, On = { class
147
139
  await r.push({ name: d });
148
140
  }
149
141
  return (d, h) => {
150
- var w;
151
- const p = Zt("FmCollapsibleTabs");
152
- return ne(), ke("div", Cn, [
153
- pt(p, {
142
+ var I;
143
+ const m = Z("FmCollapsibleTabs");
144
+ return H(), pe("div", Un, [
145
+ S(m, {
154
146
  class: "border-fm-color-neutral-gray-100 border-r px-4",
155
- "model-value": (w = v(t)) == null ? void 0 : w.toString(),
147
+ "model-value": (I = p(t)) == null ? void 0 : I.toString(),
156
148
  items: i,
157
149
  "onUpdate:modelValue": l
158
150
  }, 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)
151
+ _("div", Dn, [
152
+ _("div", null, "Timezone: " + R(p(a).split("/")[1].replace("_", " ")), 1),
153
+ _("div", null, "(UTC" + R(p(_n).tz(p(a)).format("Z")) + ")", 1)
162
154
  ])
163
155
  ]);
164
156
  };
165
157
  }
158
+ }), St = "feedme_connect_marketing_promo_hidden";
159
+ function Fn() {
160
+ try {
161
+ return localStorage.getItem(St) !== null;
162
+ } catch {
163
+ return !1;
164
+ }
165
+ }
166
+ function Vn() {
167
+ try {
168
+ localStorage.setItem(St, (/* @__PURE__ */ new Date()).toISOString());
169
+ } catch {
170
+ }
171
+ }
172
+ const $n = { class: "flex flex-col gap-12" }, Hn = { class: "fm-corner-radius-xxl bg-fm-color-primary-oats flex items-start gap-4 self-start px-12 py-4" }, jn = { class: "fm-typo-en-body-sm-600 text-fm-color-primary" }, Wn = { class: "fm-typo-en-title-sm-800 max-w-[560px] leading-[42px]" }, Bn = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary max-w-[600px]" }, Gn = { class: "flex flex-col gap-24 pb-8" }, zn = { class: "grid grid-cols-1 gap-16 sm:grid-cols-3 md:grid-cols-3 lg:grid-cols-3" }, qn = { class: "fm-corner-radius-sm bg-fm-color-primary-oats flex h-40 w-40 shrink-0 items-center justify-center" }, Kn = { class: "fm-typo-en-body-lg-600" }, Jn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-tertiary" }, Yn = { class: "shrink-0" }, Xn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Qn = { class: "flex w-full flex-col gap-12 px-[16px]" }, Zn = { class: "flex flex-wrap items-center gap-12" }, ei = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-tertiary" }, ti = /* @__PURE__ */ De({
173
+ __name: "AiMarketingPromoDialog",
174
+ setup(n) {
175
+ let e = !1;
176
+ const { t } = Tt(), i = yt(), { sessionUser: r, currentCountry: s } = me(), o = ee(!1), c = [
177
+ { key: "completeContent", icon: "layers" },
178
+ { key: "realContext", icon: "storefront" },
179
+ { key: "socialFormat", icon: "aspect_ratio" }
180
+ ], a = ne(() => {
181
+ var w;
182
+ const I = ((w = r.value) == null ? void 0 : w.permissions) ?? [];
183
+ return vn(
184
+ [
185
+ {
186
+ action: Qe.Action.manage,
187
+ subject: Qe.Subject.Business.crm_marketingMaterial
188
+ }
189
+ ],
190
+ I
191
+ ).granted;
192
+ }), l = ne(
193
+ () => s.value === "MY" && a.value
194
+ );
195
+ let d = !1;
196
+ xe(
197
+ l,
198
+ (I) => {
199
+ d || !I || (d = !0, !(Fn() || e) && (e = !0, o.value = !0));
200
+ },
201
+ { immediate: !0 }
202
+ );
203
+ async function h() {
204
+ o.value = !1, await i.push({ name: f["$connect-MARKETING"] });
205
+ }
206
+ function m() {
207
+ Vn(), o.value = !1;
208
+ }
209
+ return (I, w) => {
210
+ const g = Z("FmIcon"), v = Z("FmCard"), T = Z("FmButton"), M = Z("FmDialog");
211
+ return H(), Ne(M, {
212
+ modelValue: o.value,
213
+ "onUpdate:modelValue": w[0] || (w[0] = (k) => o.value = k),
214
+ "min-width": "min(500px, calc(100% - 48px))",
215
+ "max-width": "min(860px, calc(100% - 48px))",
216
+ "max-height": "90vh",
217
+ "dismiss-away": ""
218
+ }, {
219
+ "dialog-header": X(() => [
220
+ _("div", $n, [
221
+ _("div", Hn, [
222
+ S(g, {
223
+ name: "auto_awesome",
224
+ size: "sm",
225
+ color: "primary"
226
+ }),
227
+ _("span", jn, R(p(t)("connect.marketing.whatsNew.badge")), 1)
228
+ ]),
229
+ _("h1", Wn, R(p(t)("connect.marketing.whatsNew.title")), 1),
230
+ _("p", Bn, R(p(t)("connect.marketing.whatsNew.subtitle")), 1)
231
+ ])
232
+ ]),
233
+ "dialog-footer": X(() => [
234
+ _("div", Qn, [
235
+ _("div", Zn, [
236
+ S(T, {
237
+ variant: "primary",
238
+ size: "lg",
239
+ label: p(t)("connect.marketing.whatsNew.cta"),
240
+ "append-icon": "arrow_forward",
241
+ onClick: h
242
+ }, null, 8, ["label"]),
243
+ S(T, {
244
+ variant: "tertiary",
245
+ size: "lg",
246
+ label: p(t)("connect.marketing.whatsNew.dismiss"),
247
+ onClick: m
248
+ }, null, 8, ["label"])
249
+ ]),
250
+ _("div", ei, R(p(t)("connect.marketing.whatsNew.footnote")), 1)
251
+ ])
252
+ ]),
253
+ default: X(() => [
254
+ _("div", Gn, [
255
+ _("div", zn, [
256
+ (H(), pe(It, null, cn(c, (k) => S(v, {
257
+ key: k.key,
258
+ variant: "outlined",
259
+ class: "!h-full flex flex-col gap-8 p-16"
260
+ }, {
261
+ default: X(() => [
262
+ _("div", qn, [
263
+ S(g, {
264
+ name: k.icon,
265
+ size: "md",
266
+ color: "primary"
267
+ }, null, 8, ["name"])
268
+ ]),
269
+ _("div", Kn, R(p(t)(`connect.marketing.whatsNew.benefits.${k.key}.title`)), 1),
270
+ _("div", Jn, R(p(t)(
271
+ `connect.marketing.whatsNew.benefits.${k.key}.description`
272
+ )), 1)
273
+ ]),
274
+ _: 2
275
+ }, 1024)), 64))
276
+ ]),
277
+ S(v, {
278
+ variant: "outlined",
279
+ class: "flex items-start gap-12 p-16"
280
+ }, {
281
+ default: X(() => [
282
+ _("div", Yn, [
283
+ S(g, {
284
+ name: "lightbulb",
285
+ size: "md",
286
+ color: "primary"
287
+ })
288
+ ]),
289
+ _("p", Xn, R(p(t)("connect.marketing.whatsNew.callout")), 1)
290
+ ]),
291
+ _: 1
292
+ })
293
+ ])
294
+ ]),
295
+ _: 1
296
+ }, 8, ["modelValue"]);
297
+ };
298
+ }
166
299
  });
167
- var Ln = "firebase", Mn = "10.12.4";
300
+ var ni = "firebase", ii = "10.12.4";
168
301
  /**
169
302
  * @license
170
303
  * Copyright 2020 Google LLC
@@ -181,13 +314,13 @@ var Ln = "firebase", Mn = "10.12.4";
181
314
  * See the License for the specific language governing permissions and
182
315
  * limitations under the License.
183
316
  */
184
- Se(Ln, Mn, "app");
185
- function It() {
317
+ Oe(ni, ii, "app");
318
+ function Rt() {
186
319
  return {
187
320
  "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
321
  };
189
322
  }
190
- const Un = It, Tt = new Ce("auth", "Firebase", It());
323
+ const ri = Rt, At = new Fe("auth", "Firebase", Rt());
191
324
  /**
192
325
  * @license
193
326
  * Copyright 2020 Google LLC
@@ -204,12 +337,12 @@ const Un = It, Tt = new Ce("auth", "Firebase", It());
204
337
  * See the License for the specific language governing permissions and
205
338
  * limitations under the License.
206
339
  */
207
- const ce = new mn("@firebase/auth");
208
- function Dn(n, ...e) {
209
- ce.logLevel <= vt.WARN && ce.warn(`Auth (${J}): ${n}`, ...e);
340
+ const ge = new yn("@firebase/auth");
341
+ function si(n, ...e) {
342
+ ge.logLevel <= bt.WARN && ge.warn(`Auth (${re}): ${n}`, ...e);
210
343
  }
211
- function re(n, ...e) {
212
- ce.logLevel <= vt.ERROR && ce.error(`Auth (${J}): ${n}`, ...e);
344
+ function ue(n, ...e) {
345
+ ge.logLevel <= bt.ERROR && ge.error(`Auth (${re}): ${n}`, ...e);
213
346
  }
214
347
  /**
215
348
  * @license
@@ -227,38 +360,38 @@ function re(n, ...e) {
227
360
  * See the License for the specific language governing permissions and
228
361
  * limitations under the License.
229
362
  */
230
- function R(n, ...e) {
231
- throw Le(n, ...e);
363
+ function O(n, ...e) {
364
+ throw He(n, ...e);
232
365
  }
233
- function T(n, ...e) {
234
- return Le(n, ...e);
366
+ function E(n, ...e) {
367
+ return He(n, ...e);
235
368
  }
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, {
369
+ function Pt(n, e, t) {
370
+ const i = Object.assign(Object.assign({}, ri()), { [e]: t });
371
+ return new Fe("auth", "Firebase", i).create(e, {
239
372
  appName: n.name
240
373
  });
241
374
  }
242
- 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");
375
+ function $(n) {
376
+ return Pt(n, "operation-not-supported-in-this-environment", "Operations that alter the current user are not supported in conjunction with FirebaseServerApp");
244
377
  }
245
- function Le(n, ...e) {
378
+ function He(n, ...e) {
246
379
  if (typeof n != "string") {
247
380
  const t = e[0], i = [...e.slice(1)];
248
381
  return i[0] && (i[0].appName = n.name), n._errorFactory.create(t, ...i);
249
382
  }
250
- return Tt.create(n, ...e);
383
+ return At.create(n, ...e);
251
384
  }
252
385
  function u(n, e, ...t) {
253
386
  if (!n)
254
- throw Le(e, ...t);
387
+ throw He(e, ...t);
255
388
  }
256
- function k(n) {
389
+ function P(n) {
257
390
  const e = "INTERNAL ASSERTION FAILED: " + n;
258
- throw re(e), new Error(e);
391
+ throw ue(e), new Error(e);
259
392
  }
260
- function A(n, e) {
261
- n || k(e);
393
+ function L(n, e) {
394
+ n || P(e);
262
395
  }
263
396
  /**
264
397
  * @license
@@ -276,14 +409,14 @@ function A(n, e) {
276
409
  * See the License for the specific language governing permissions and
277
410
  * limitations under the License.
278
411
  */
279
- function Re() {
412
+ function Le() {
280
413
  var n;
281
414
  return typeof self < "u" && ((n = self.location) === null || n === void 0 ? void 0 : n.href) || "";
282
415
  }
283
- function Fn() {
284
- return Je() === "http:" || Je() === "https:";
416
+ function oi() {
417
+ return nt() === "http:" || nt() === "https:";
285
418
  }
286
- function Je() {
419
+ function nt() {
287
420
  var n;
288
421
  return typeof self < "u" && ((n = self.location) === null || n === void 0 ? void 0 : n.protocol) || null;
289
422
  }
@@ -303,15 +436,15 @@ function Je() {
303
436
  * See the License for the specific language governing permissions and
304
437
  * limitations under the License.
305
438
  */
306
- function xn() {
439
+ function ai() {
307
440
  return typeof navigator < "u" && navigator && "onLine" in navigator && typeof navigator.onLine == "boolean" && // Apply only for traditional web apps and Chrome extensions.
308
441
  // This is especially true for Cordova apps which have unreliable
309
442
  // navigator.onLine behavior unless cordova-plugin-network-information is
310
443
  // installed which overwrites the native navigator.onLine value and
311
444
  // defines navigator.connection.
312
- (Fn() || vn() || "connection" in navigator) ? navigator.onLine : !0;
445
+ (oi() || kn() || "connection" in navigator) ? navigator.onLine : !0;
313
446
  }
314
- function Vn() {
447
+ function ci() {
315
448
  if (typeof navigator > "u")
316
449
  return null;
317
450
  const n = navigator;
@@ -339,12 +472,12 @@ function Vn() {
339
472
  * See the License for the specific language governing permissions and
340
473
  * limitations under the License.
341
474
  */
342
- class X {
475
+ class oe {
343
476
  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();
477
+ this.shortDelay = e, this.longDelay = t, L(t > e, "Short delay should be less than long delay!"), this.isMobile = wn() || Tn();
345
478
  }
346
479
  get() {
347
- return xn() ? this.isMobile ? this.longDelay : this.shortDelay : Math.min(5e3, this.shortDelay);
480
+ return ai() ? this.isMobile ? this.longDelay : this.shortDelay : Math.min(5e3, this.shortDelay);
348
481
  }
349
482
  }
350
483
  /**
@@ -363,8 +496,8 @@ class X {
363
496
  * See the License for the specific language governing permissions and
364
497
  * limitations under the License.
365
498
  */
366
- function Me(n, e) {
367
- A(n.emulator, "Emulator should always be set here");
499
+ function je(n, e) {
500
+ L(n.emulator, "Emulator should always be set here");
368
501
  const { url: t } = n.emulator;
369
502
  return e ? `${t}${e.startsWith("/") ? e.slice(1) : e}` : t;
370
503
  }
@@ -384,7 +517,7 @@ function Me(n, e) {
384
517
  * See the License for the specific language governing permissions and
385
518
  * limitations under the License.
386
519
  */
387
- class wt {
520
+ class Ct {
388
521
  static initialize(e, t, i) {
389
522
  this.fetchImpl = e, t && (this.headersImpl = t), i && (this.responseImpl = i);
390
523
  }
@@ -397,7 +530,7 @@ class wt {
397
530
  return globalThis.fetch;
398
531
  if (typeof fetch < "u")
399
532
  return fetch;
400
- k("Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill");
533
+ P("Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill");
401
534
  }
402
535
  static headers() {
403
536
  if (this.headersImpl)
@@ -408,7 +541,7 @@ class wt {
408
541
  return globalThis.Headers;
409
542
  if (typeof Headers < "u")
410
543
  return Headers;
411
- k("Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill");
544
+ P("Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill");
412
545
  }
413
546
  static response() {
414
547
  if (this.responseImpl)
@@ -419,7 +552,7 @@ class wt {
419
552
  return globalThis.Response;
420
553
  if (typeof Response < "u")
421
554
  return Response;
422
- k("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill");
555
+ P("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill");
423
556
  }
424
557
  }
425
558
  /**
@@ -438,7 +571,7 @@ class wt {
438
571
  * See the License for the specific language governing permissions and
439
572
  * limitations under the License.
440
573
  */
441
- const $n = {
574
+ const li = {
442
575
  // Custom token errors.
443
576
  CREDENTIAL_MISMATCH: "custom-token-mismatch",
444
577
  // This can only happen if the SDK sends a bad request.
@@ -529,93 +662,93 @@ const $n = {
529
662
  * See the License for the specific language governing permissions and
530
663
  * limitations under the License.
531
664
  */
532
- const Hn = new X(3e4, 6e4);
533
- function fe(n, e) {
665
+ const ui = new oe(3e4, 6e4);
666
+ function we(n, e) {
534
667
  return n.tenantId && !e.tenantId ? Object.assign(Object.assign({}, e), { tenantId: n.tenantId }) : e;
535
668
  }
536
- async function G(n, e, t, i, r = {}) {
537
- return Et(n, r, async () => {
669
+ async function J(n, e, t, i, r = {}) {
670
+ return Nt(n, r, async () => {
538
671
  let s = {}, o = {};
539
672
  i && (e === "GET" ? o = i : s = {
540
673
  body: JSON.stringify(i)
541
674
  });
542
- const c = Y(Object.assign({ key: n.config.apiKey }, o)).slice(1), a = await n._getAdditionalHeaders();
675
+ const c = se(Object.assign({ key: n.config.apiKey }, o)).slice(1), a = await n._getAdditionalHeaders();
543
676
  return a[
544
677
  "Content-Type"
545
678
  /* HttpHeader.CONTENT_TYPE */
546
679
  ] = "application/json", n.languageCode && (a[
547
680
  "X-Firebase-Locale"
548
681
  /* HttpHeader.X_FIREBASE_LOCALE */
549
- ] = n.languageCode), wt.fetch()(bt(n, n.config.apiHost, t, c), Object.assign({
682
+ ] = n.languageCode), Ct.fetch()(Lt(n, n.config.apiHost, t, c), Object.assign({
550
683
  method: e,
551
684
  headers: a,
552
685
  referrerPolicy: "no-referrer"
553
686
  }, s));
554
687
  });
555
688
  }
556
- async function Et(n, e, t) {
689
+ async function Nt(n, e, t) {
557
690
  n._canInitEmulator = !1;
558
- const i = Object.assign(Object.assign({}, $n), e);
691
+ const i = Object.assign(Object.assign({}, li), e);
559
692
  try {
560
- const r = new Wn(n), s = await Promise.race([
693
+ const r = new di(n), s = await Promise.race([
561
694
  t(),
562
695
  r.promise
563
696
  ]);
564
697
  r.clearNetworkTimeout();
565
698
  const o = await s.json();
566
699
  if ("needConfirmation" in o)
567
- throw ee(n, "account-exists-with-different-credential", o);
700
+ throw le(n, "account-exists-with-different-credential", o);
568
701
  if (s.ok && !("errorMessage" in o))
569
702
  return o;
570
703
  {
571
704
  const c = s.ok ? o.errorMessage : o.error.message, [a, l] = c.split(" : ");
572
705
  if (a === "FEDERATED_USER_ID_ALREADY_LINKED")
573
- throw ee(n, "credential-already-in-use", o);
706
+ throw le(n, "credential-already-in-use", o);
574
707
  if (a === "EMAIL_EXISTS")
575
- throw ee(n, "email-already-in-use", o);
708
+ throw le(n, "email-already-in-use", o);
576
709
  if (a === "USER_DISABLED")
577
- throw ee(n, "user-disabled", o);
710
+ throw le(n, "user-disabled", o);
578
711
  const d = i[a] || a.toLowerCase().replace(/[_\s]+/g, "-");
579
712
  if (l)
580
- throw yt(n, d, l);
581
- R(n, d);
713
+ throw Pt(n, d, l);
714
+ O(n, d);
582
715
  }
583
716
  } catch (r) {
584
- if (r instanceof Oe)
717
+ if (r instanceof Ve)
585
718
  throw r;
586
- R(n, "network-request-failed", { message: String(r) });
719
+ O(n, "network-request-failed", { message: String(r) });
587
720
  }
588
721
  }
589
- async function kt(n, e, t, i, r = {}) {
590
- const s = await G(n, e, t, i, r);
591
- return "mfaPendingCredential" in s && R(n, "multi-factor-auth-required", {
722
+ async function Ot(n, e, t, i, r = {}) {
723
+ const s = await J(n, e, t, i, r);
724
+ return "mfaPendingCredential" in s && O(n, "multi-factor-auth-required", {
592
725
  _serverResponse: s
593
726
  }), s;
594
727
  }
595
- function bt(n, e, t, i) {
728
+ function Lt(n, e, t, i) {
596
729
  const r = `${e}${t}?${i}`;
597
- return n.config.emulator ? Me(n.config, r) : `${n.config.apiScheme}://${r}`;
730
+ return n.config.emulator ? je(n.config, r) : `${n.config.apiScheme}://${r}`;
598
731
  }
599
- class Wn {
732
+ class di {
600
733
  constructor(e) {
601
734
  this.auth = e, this.timer = null, this.promise = new Promise((t, i) => {
602
- this.timer = setTimeout(() => i(T(
735
+ this.timer = setTimeout(() => i(E(
603
736
  this.auth,
604
737
  "network-request-failed"
605
738
  /* AuthErrorCode.NETWORK_REQUEST_FAILED */
606
- )), Hn.get());
739
+ )), ui.get());
607
740
  });
608
741
  }
609
742
  clearNetworkTimeout() {
610
743
  clearTimeout(this.timer);
611
744
  }
612
745
  }
613
- function ee(n, e, t) {
746
+ function le(n, e, t) {
614
747
  const i = {
615
748
  appName: n.name
616
749
  };
617
750
  t.email && (i.email = t.email), t.phoneNumber && (i.phoneNumber = t.phoneNumber);
618
- const r = T(n, e, i);
751
+ const r = E(n, e, i);
619
752
  return r.customData._tokenResponse = t, r;
620
753
  }
621
754
  /**
@@ -634,11 +767,11 @@ function ee(n, e, t) {
634
767
  * See the License for the specific language governing permissions and
635
768
  * limitations under the License.
636
769
  */
637
- async function jn(n, e) {
638
- return G(n, "POST", "/v1/accounts:delete", e);
770
+ async function hi(n, e) {
771
+ return J(n, "POST", "/v1/accounts:delete", e);
639
772
  }
640
- async function St(n, e) {
641
- return G(n, "POST", "/v1/accounts:lookup", e);
773
+ async function Mt(n, e) {
774
+ return J(n, "POST", "/v1/accounts:lookup", e);
642
775
  }
643
776
  /**
644
777
  * @license
@@ -656,7 +789,7 @@ async function St(n, e) {
656
789
  * See the License for the specific language governing permissions and
657
790
  * limitations under the License.
658
791
  */
659
- function q(n) {
792
+ function te(n) {
660
793
  if (n)
661
794
  try {
662
795
  const e = new Date(Number(n));
@@ -665,8 +798,8 @@ function q(n) {
665
798
  } catch {
666
799
  }
667
800
  }
668
- async function Gn(n, e = !1) {
669
- const t = j(n), i = await t.getIdToken(e), r = Ue(i);
801
+ async function fi(n, e = !1) {
802
+ const t = K(n), i = await t.getIdToken(e), r = We(i);
670
803
  u(
671
804
  r && r.exp && r.auth_time && r.iat,
672
805
  t.auth,
@@ -677,29 +810,29 @@ async function Gn(n, e = !1) {
677
810
  return {
678
811
  claims: r,
679
812
  token: i,
680
- authTime: q(ye(r.auth_time)),
681
- issuedAtTime: q(ye(r.iat)),
682
- expirationTime: q(ye(r.exp)),
813
+ authTime: te(Pe(r.auth_time)),
814
+ issuedAtTime: te(Pe(r.iat)),
815
+ expirationTime: te(Pe(r.exp)),
683
816
  signInProvider: o || null,
684
817
  signInSecondFactor: (s == null ? void 0 : s.sign_in_second_factor) || null
685
818
  };
686
819
  }
687
- function ye(n) {
820
+ function Pe(n) {
688
821
  return Number(n) * 1e3;
689
822
  }
690
- function Ue(n) {
823
+ function We(n) {
691
824
  const [e, t, i] = n.split(".");
692
825
  if (e === void 0 || t === void 0 || i === void 0)
693
- return re("JWT malformed, contained fewer than 3 sections"), null;
826
+ return ue("JWT malformed, contained fewer than 3 sections"), null;
694
827
  try {
695
- const r = En(t);
696
- return r ? JSON.parse(r) : (re("Failed to decode base64 JWT payload"), null);
828
+ const r = An(t);
829
+ return r ? JSON.parse(r) : (ue("Failed to decode base64 JWT payload"), null);
697
830
  } catch (r) {
698
- return re("Caught error parsing JWT payload as JSON", r == null ? void 0 : r.toString()), null;
831
+ return ue("Caught error parsing JWT payload as JSON", r == null ? void 0 : r.toString()), null;
699
832
  }
700
833
  }
701
- function Ye(n) {
702
- const e = Ue(n);
834
+ function it(n) {
835
+ const e = We(n);
703
836
  return u(
704
837
  e,
705
838
  "internal-error"
@@ -730,16 +863,16 @@ function Ye(n) {
730
863
  * See the License for the specific language governing permissions and
731
864
  * limitations under the License.
732
865
  */
733
- async function K(n, e, t = !1) {
866
+ async function ie(n, e, t = !1) {
734
867
  if (t)
735
868
  return e;
736
869
  try {
737
870
  return await e;
738
871
  } catch (i) {
739
- throw i instanceof Oe && Bn(i) && n.auth.currentUser === n && await n.auth.signOut(), i;
872
+ throw i instanceof Ve && pi(i) && n.auth.currentUser === n && await n.auth.signOut(), i;
740
873
  }
741
874
  }
742
- function Bn({ code: n }) {
875
+ function pi({ code: n }) {
743
876
  return n === "auth/user-disabled" || n === "auth/user-token-expired";
744
877
  }
745
878
  /**
@@ -758,7 +891,7 @@ function Bn({ code: n }) {
758
891
  * See the License for the specific language governing permissions and
759
892
  * limitations under the License.
760
893
  */
761
- class zn {
894
+ class mi {
762
895
  constructor(e) {
763
896
  this.user = e, this.isRunning = !1, this.timerId = null, this.errorBackoff = 3e4;
764
897
  }
@@ -820,12 +953,12 @@ class zn {
820
953
  * See the License for the specific language governing permissions and
821
954
  * limitations under the License.
822
955
  */
823
- class Ae {
956
+ class Me {
824
957
  constructor(e, t) {
825
958
  this.createdAt = e, this.lastLoginAt = t, this._initializeTime();
826
959
  }
827
960
  _initializeTime() {
828
- this.lastSignInTime = q(this.lastLoginAt), this.creationTime = q(this.createdAt);
961
+ this.lastSignInTime = te(this.lastLoginAt), this.creationTime = te(this.createdAt);
829
962
  }
830
963
  _copy(e) {
831
964
  this.createdAt = e.createdAt, this.lastLoginAt = e.lastLoginAt, this._initializeTime();
@@ -853,9 +986,9 @@ class Ae {
853
986
  * See the License for the specific language governing permissions and
854
987
  * limitations under the License.
855
988
  */
856
- async function le(n) {
989
+ async function _e(n) {
857
990
  var e;
858
- const t = n.auth, i = await n.getIdToken(), r = await K(n, St(t, { idToken: i }));
991
+ const t = n.auth, i = await n.getIdToken(), r = await ie(n, Mt(t, { idToken: i }));
859
992
  u(
860
993
  r == null ? void 0 : r.users.length,
861
994
  t,
@@ -864,7 +997,7 @@ async function le(n) {
864
997
  );
865
998
  const s = r.users[0];
866
999
  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 = {
1000
+ const o = !((e = s.providerUserInfo) === null || e === void 0) && e.length ? Ut(s.providerUserInfo) : [], c = _i(n.providerData, o), a = n.isAnonymous, l = !(n.email && s.passwordHash) && !(c != null && c.length), d = a ? l : !1, h = {
868
1001
  uid: s.localId,
869
1002
  displayName: s.displayName || null,
870
1003
  photoURL: s.photoUrl || null,
@@ -873,21 +1006,21 @@ async function le(n) {
873
1006
  phoneNumber: s.phoneNumber || null,
874
1007
  tenantId: s.tenantId || null,
875
1008
  providerData: c,
876
- metadata: new Ae(s.createdAt, s.lastLoginAt),
1009
+ metadata: new Me(s.createdAt, s.lastLoginAt),
877
1010
  isAnonymous: d
878
1011
  };
879
1012
  Object.assign(n, h);
880
1013
  }
881
- async function qn(n) {
882
- const e = j(n);
883
- await le(e), await e.auth._persistUserIfCurrent(e), e.auth._notifyListenersIfCurrent(e);
1014
+ async function gi(n) {
1015
+ const e = K(n);
1016
+ await _e(e), await e.auth._persistUserIfCurrent(e), e.auth._notifyListenersIfCurrent(e);
884
1017
  }
885
- function Kn(n, e) {
1018
+ function _i(n, e) {
886
1019
  return [...n.filter((i) => !e.some((r) => r.providerId === i.providerId)), ...e];
887
1020
  }
888
- function Rt(n) {
1021
+ function Ut(n) {
889
1022
  return n.map((e) => {
890
- var { providerId: t } = e, i = Ne(e, ["providerId"]);
1023
+ var { providerId: t } = e, i = $e(e, ["providerId"]);
891
1024
  return {
892
1025
  providerId: t,
893
1026
  uid: i.rawId || "",
@@ -914,16 +1047,16 @@ function Rt(n) {
914
1047
  * See the License for the specific language governing permissions and
915
1048
  * limitations under the License.
916
1049
  */
917
- async function Jn(n, e) {
918
- const t = await Et(n, {}, async () => {
919
- const i = Y({
1050
+ async function vi(n, e) {
1051
+ const t = await Nt(n, {}, async () => {
1052
+ const i = se({
920
1053
  grant_type: "refresh_token",
921
1054
  refresh_token: e
922
- }).slice(1), { tokenApiHost: r, apiKey: s } = n.config, o = bt(n, r, "/v1/token", `key=${s}`), c = await n._getAdditionalHeaders();
1055
+ }).slice(1), { tokenApiHost: r, apiKey: s } = n.config, o = Lt(n, r, "/v1/token", `key=${s}`), c = await n._getAdditionalHeaders();
923
1056
  return c[
924
1057
  "Content-Type"
925
1058
  /* HttpHeader.CONTENT_TYPE */
926
- ] = "application/x-www-form-urlencoded", wt.fetch()(o, {
1059
+ ] = "application/x-www-form-urlencoded", Ct.fetch()(o, {
927
1060
  method: "POST",
928
1061
  headers: c,
929
1062
  body: i
@@ -935,8 +1068,8 @@ async function Jn(n, e) {
935
1068
  refreshToken: t.refresh_token
936
1069
  };
937
1070
  }
938
- async function Yn(n, e) {
939
- return G(n, "POST", "/v2/accounts:revokeToken", fe(n, e));
1071
+ async function Ii(n, e) {
1072
+ return J(n, "POST", "/v2/accounts:revokeToken", we(n, e));
940
1073
  }
941
1074
  /**
942
1075
  * @license
@@ -954,7 +1087,7 @@ async function Yn(n, e) {
954
1087
  * See the License for the specific language governing permissions and
955
1088
  * limitations under the License.
956
1089
  */
957
- class $ {
1090
+ class G {
958
1091
  constructor() {
959
1092
  this.refreshToken = null, this.accessToken = null, this.expirationTime = null;
960
1093
  }
@@ -975,7 +1108,7 @@ class $ {
975
1108
  "internal-error"
976
1109
  /* AuthErrorCode.INTERNAL_ERROR */
977
1110
  );
978
- const t = "expiresIn" in e && typeof e.expiresIn < "u" ? Number(e.expiresIn) : Ye(e.idToken);
1111
+ const t = "expiresIn" in e && typeof e.expiresIn < "u" ? Number(e.expiresIn) : it(e.idToken);
979
1112
  this.updateTokensAndExpiration(e.idToken, e.refreshToken, t);
980
1113
  }
981
1114
  updateFromIdToken(e) {
@@ -984,7 +1117,7 @@ class $ {
984
1117
  "internal-error"
985
1118
  /* AuthErrorCode.INTERNAL_ERROR */
986
1119
  );
987
- const t = Ye(e);
1120
+ const t = it(e);
988
1121
  this.updateTokensAndExpiration(e, null, t);
989
1122
  }
990
1123
  async getToken(e, t = !1) {
@@ -999,14 +1132,14 @@ class $ {
999
1132
  this.refreshToken = null;
1000
1133
  }
1001
1134
  async refresh(e, t) {
1002
- const { accessToken: i, refreshToken: r, expiresIn: s } = await Jn(e, t);
1135
+ const { accessToken: i, refreshToken: r, expiresIn: s } = await vi(e, t);
1003
1136
  this.updateTokensAndExpiration(i, r, Number(s));
1004
1137
  }
1005
1138
  updateTokensAndExpiration(e, t, i) {
1006
1139
  this.refreshToken = t || null, this.accessToken = e || null, this.expirationTime = Date.now() + i * 1e3;
1007
1140
  }
1008
1141
  static fromJSON(e, t) {
1009
- const { refreshToken: i, accessToken: r, expirationTime: s } = t, o = new $();
1142
+ const { refreshToken: i, accessToken: r, expirationTime: s } = t, o = new G();
1010
1143
  return i && (u(typeof i == "string", "internal-error", {
1011
1144
  appName: e
1012
1145
  }), o.refreshToken = i), r && (u(typeof r == "string", "internal-error", {
@@ -1026,10 +1159,10 @@ class $ {
1026
1159
  this.accessToken = e.accessToken, this.refreshToken = e.refreshToken, this.expirationTime = e.expirationTime;
1027
1160
  }
1028
1161
  _clone() {
1029
- return Object.assign(new $(), this.toJSON());
1162
+ return Object.assign(new G(), this.toJSON());
1030
1163
  }
1031
1164
  _performRefresh() {
1032
- return k("not implemented");
1165
+ return P("not implemented");
1033
1166
  }
1034
1167
  }
1035
1168
  /**
@@ -1048,16 +1181,16 @@ class $ {
1048
1181
  * See the License for the specific language governing permissions and
1049
1182
  * limitations under the License.
1050
1183
  */
1051
- function P(n, e) {
1184
+ function U(n, e) {
1052
1185
  u(typeof n == "string" || typeof n > "u", "internal-error", { appName: e });
1053
1186
  }
1054
- class b {
1187
+ class C {
1055
1188
  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);
1189
+ var { uid: t, auth: i, stsTokenManager: r } = e, s = $e(e, ["uid", "auth", "stsTokenManager"]);
1190
+ this.providerId = "firebase", this.proactiveRefresh = new mi(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 Me(s.createdAt || void 0, s.lastLoginAt || void 0);
1058
1191
  }
1059
1192
  async getIdToken(e) {
1060
- const t = await K(this, this.stsTokenManager.getToken(this.auth, e));
1193
+ const t = await ie(this, this.stsTokenManager.getToken(this.auth, e));
1061
1194
  return u(
1062
1195
  t,
1063
1196
  this.auth,
@@ -1066,10 +1199,10 @@ class b {
1066
1199
  ), this.accessToken !== t && (this.accessToken = t, await this.auth._persistUserIfCurrent(this), this.auth._notifyListenersIfCurrent(this)), t;
1067
1200
  }
1068
1201
  getIdTokenResult(e) {
1069
- return Gn(this, e);
1202
+ return fi(this, e);
1070
1203
  }
1071
1204
  reload() {
1072
- return qn(this);
1205
+ return gi(this);
1073
1206
  }
1074
1207
  _assign(e) {
1075
1208
  this !== e && (u(
@@ -1080,7 +1213,7 @@ class b {
1080
1213
  ), this.displayName = e.displayName, this.photoURL = e.photoURL, this.email = e.email, this.emailVerified = e.emailVerified, this.phoneNumber = e.phoneNumber, this.isAnonymous = e.isAnonymous, this.tenantId = e.tenantId, this.providerData = e.providerData.map((t) => Object.assign({}, t)), this.metadata._copy(e.metadata), this.stsTokenManager._assign(e.stsTokenManager));
1081
1214
  }
1082
1215
  _clone(e) {
1083
- const t = new b(Object.assign(Object.assign({}, this), { auth: e, stsTokenManager: this.stsTokenManager._clone() }));
1216
+ const t = new C(Object.assign(Object.assign({}, this), { auth: e, stsTokenManager: this.stsTokenManager._clone() }));
1084
1217
  return t.metadata._copy(this.metadata), t;
1085
1218
  }
1086
1219
  _onReload(e) {
@@ -1102,13 +1235,13 @@ class b {
1102
1235
  }
1103
1236
  async _updateTokensIfNecessary(e, t = !1) {
1104
1237
  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);
1238
+ e.idToken && e.idToken !== this.stsTokenManager.accessToken && (this.stsTokenManager.updateFromServerResponse(e), i = !0), t && await _e(this), await this.auth._persistUserIfCurrent(this), i && this.auth._notifyListenersIfCurrent(this);
1106
1239
  }
1107
1240
  async delete() {
1108
- if (E(this.auth.app))
1109
- return Promise.reject(M(this.auth));
1241
+ if (A(this.auth.app))
1242
+ return Promise.reject($(this.auth));
1110
1243
  const e = await this.getIdToken();
1111
- return await K(this, jn(this.auth, { idToken: e })), this.stsTokenManager.clearRefreshToken(), this.auth.signOut();
1244
+ return await ie(this, hi(this.auth, { idToken: e })), this.stsTokenManager.clearRefreshToken(), this.auth.signOut();
1112
1245
  }
1113
1246
  toJSON() {
1114
1247
  return Object.assign(Object.assign({
@@ -1136,45 +1269,45 @@ class b {
1136
1269
  }
1137
1270
  static _fromJSON(e, t) {
1138
1271
  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;
1272
+ const h = (i = t.displayName) !== null && i !== void 0 ? i : void 0, m = (r = t.email) !== null && r !== void 0 ? r : void 0, I = (s = t.phoneNumber) !== null && s !== void 0 ? s : void 0, w = (o = t.photoURL) !== null && o !== void 0 ? o : void 0, g = (c = t.tenantId) !== null && c !== void 0 ? c : void 0, v = (a = t._redirectEventId) !== null && a !== void 0 ? a : void 0, T = (l = t.createdAt) !== null && l !== void 0 ? l : void 0, M = (d = t.lastLoginAt) !== null && d !== void 0 ? d : void 0, { uid: k, emailVerified: Ke, isAnonymous: Je, providerData: Se, stsTokenManager: Ye } = t;
1140
1273
  u(
1141
- ve && We,
1274
+ k && Ye,
1142
1275
  e,
1143
1276
  "internal-error"
1144
1277
  /* AuthErrorCode.INTERNAL_ERROR */
1145
1278
  );
1146
- const Xt = $.fromJSON(this.name, We);
1279
+ const on = G.fromJSON(this.name, Ye);
1147
1280
  u(
1148
- typeof ve == "string",
1281
+ typeof k == "string",
1149
1282
  e,
1150
1283
  "internal-error"
1151
1284
  /* AuthErrorCode.INTERNAL_ERROR */
1152
- ), P(h, e.name), P(p, e.name), u(
1153
- typeof $e == "boolean",
1285
+ ), U(h, e.name), U(m, e.name), u(
1286
+ typeof Ke == "boolean",
1154
1287
  e,
1155
1288
  "internal-error"
1156
1289
  /* AuthErrorCode.INTERNAL_ERROR */
1157
1290
  ), u(
1158
- typeof He == "boolean",
1291
+ typeof Je == "boolean",
1159
1292
  e,
1160
1293
  "internal-error"
1161
1294
  /* 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);
1163
- const Te = new b({
1164
- uid: ve,
1295
+ ), U(I, e.name), U(w, e.name), U(g, e.name), U(v, e.name), U(T, e.name), U(M, e.name);
1296
+ const Re = new C({
1297
+ uid: k,
1165
1298
  auth: e,
1166
- email: p,
1167
- emailVerified: $e,
1299
+ email: m,
1300
+ emailVerified: Ke,
1168
1301
  displayName: h,
1169
- isAnonymous: He,
1170
- photoURL: U,
1171
- phoneNumber: w,
1172
- tenantId: m,
1173
- stsTokenManager: Xt,
1174
- createdAt: I,
1175
- lastLoginAt: x
1302
+ isAnonymous: Je,
1303
+ photoURL: w,
1304
+ phoneNumber: I,
1305
+ tenantId: g,
1306
+ stsTokenManager: on,
1307
+ createdAt: T,
1308
+ lastLoginAt: M
1176
1309
  });
1177
- return Ie && Array.isArray(Ie) && (Te.providerData = Ie.map((Qt) => Object.assign({}, Qt))), g && (Te._redirectEventId = g), Te;
1310
+ return Se && Array.isArray(Se) && (Re.providerData = Se.map((an) => Object.assign({}, an))), v && (Re._redirectEventId = v), Re;
1178
1311
  }
1179
1312
  /**
1180
1313
  * Initialize a User from an idToken server response
@@ -1182,15 +1315,15 @@ class b {
1182
1315
  * @param idTokenResponse
1183
1316
  */
1184
1317
  static async _fromIdTokenResponse(e, t, i = !1) {
1185
- const r = new $();
1318
+ const r = new G();
1186
1319
  r.updateFromServerResponse(t);
1187
- const s = new b({
1320
+ const s = new C({
1188
1321
  uid: t.localId,
1189
1322
  auth: e,
1190
1323
  stsTokenManager: r,
1191
1324
  isAnonymous: i
1192
1325
  });
1193
- return await le(s), s;
1326
+ return await _e(s), s;
1194
1327
  }
1195
1328
  /**
1196
1329
  * Initialize a User from an idToken server response
@@ -1204,9 +1337,9 @@ class b {
1204
1337
  "internal-error"
1205
1338
  /* AuthErrorCode.INTERNAL_ERROR */
1206
1339
  );
1207
- const s = r.providerUserInfo !== void 0 ? Rt(r.providerUserInfo) : [], o = !(r.email && r.passwordHash) && !(s != null && s.length), c = new $();
1340
+ const s = r.providerUserInfo !== void 0 ? Ut(r.providerUserInfo) : [], o = !(r.email && r.passwordHash) && !(s != null && s.length), c = new G();
1208
1341
  c.updateFromIdToken(i);
1209
- const a = new b({
1342
+ const a = new C({
1210
1343
  uid: r.localId,
1211
1344
  auth: e,
1212
1345
  stsTokenManager: c,
@@ -1220,7 +1353,7 @@ class b {
1220
1353
  phoneNumber: r.phoneNumber || null,
1221
1354
  tenantId: r.tenantId || null,
1222
1355
  providerData: s,
1223
- metadata: new Ae(r.createdAt, r.lastLoginAt),
1356
+ metadata: new Me(r.createdAt, r.lastLoginAt),
1224
1357
  isAnonymous: !(r.email && r.passwordHash) && !(s != null && s.length)
1225
1358
  };
1226
1359
  return Object.assign(a, l), a;
@@ -1242,11 +1375,11 @@ class b {
1242
1375
  * See the License for the specific language governing permissions and
1243
1376
  * limitations under the License.
1244
1377
  */
1245
- const Xe = /* @__PURE__ */ new Map();
1246
- function S(n) {
1247
- 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);
1378
+ const rt = /* @__PURE__ */ new Map();
1379
+ function N(n) {
1380
+ L(n instanceof Function, "Expected a class definition");
1381
+ let e = rt.get(n);
1382
+ return e ? (L(e instanceof n, "Instance stored in cache mismatched with class"), e) : (e = new n(), rt.set(n, e), e);
1250
1383
  }
1251
1384
  /**
1252
1385
  * @license
@@ -1264,7 +1397,7 @@ function S(n) {
1264
1397
  * See the License for the specific language governing permissions and
1265
1398
  * limitations under the License.
1266
1399
  */
1267
- class At {
1400
+ class Dt {
1268
1401
  constructor() {
1269
1402
  this.type = "NONE", this.storage = {};
1270
1403
  }
@@ -1286,8 +1419,8 @@ class At {
1286
1419
  _removeListener(e, t) {
1287
1420
  }
1288
1421
  }
1289
- At.type = "NONE";
1290
- const Qe = At;
1422
+ Dt.type = "NONE";
1423
+ const st = Dt;
1291
1424
  /**
1292
1425
  * @license
1293
1426
  * Copyright 2019 Google LLC
@@ -1304,21 +1437,21 @@ const Qe = At;
1304
1437
  * See the License for the specific language governing permissions and
1305
1438
  * limitations under the License.
1306
1439
  */
1307
- function se(n, e, t) {
1440
+ function de(n, e, t) {
1308
1441
  return `firebase:${n}:${e}:${t}`;
1309
1442
  }
1310
- class H {
1443
+ class z {
1311
1444
  constructor(e, t, i) {
1312
1445
  this.persistence = e, this.auth = t, this.userKey = i;
1313
1446
  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);
1447
+ this.fullUserKey = de(this.userKey, r.apiKey, s), this.fullPersistenceKey = de("persistence", r.apiKey, s), this.boundEventHandler = t._onStorageEvent.bind(t), this.persistence._addListener(this.fullUserKey, this.boundEventHandler);
1315
1448
  }
1316
1449
  setCurrentUser(e) {
1317
1450
  return this.persistence._set(this.fullUserKey, e.toJSON());
1318
1451
  }
1319
1452
  async getCurrentUser() {
1320
1453
  const e = await this.persistence._get(this.fullUserKey);
1321
- return e ? b._fromJSON(this.auth, e) : null;
1454
+ return e ? C._fromJSON(this.auth, e) : null;
1322
1455
  }
1323
1456
  removeCurrentUser() {
1324
1457
  return this.persistence._remove(this.fullUserKey);
@@ -1338,32 +1471,32 @@ class H {
1338
1471
  }
1339
1472
  static async create(e, t, i = "authUser") {
1340
1473
  if (!t.length)
1341
- return new H(S(Qe), e, i);
1474
+ return new z(N(st), e, i);
1342
1475
  const r = (await Promise.all(t.map(async (l) => {
1343
1476
  if (await l._isAvailable())
1344
1477
  return l;
1345
1478
  }))).filter((l) => l);
1346
- let s = r[0] || S(Qe);
1347
- const o = se(i, e.config.apiKey, e.name);
1479
+ let s = r[0] || N(st);
1480
+ const o = de(i, e.config.apiKey, e.name);
1348
1481
  let c = null;
1349
1482
  for (const l of t)
1350
1483
  try {
1351
1484
  const d = await l._get(o);
1352
1485
  if (d) {
1353
- const h = b._fromJSON(e, d);
1486
+ const h = C._fromJSON(e, d);
1354
1487
  l !== s && (c = h), s = l;
1355
1488
  break;
1356
1489
  }
1357
1490
  } catch {
1358
1491
  }
1359
1492
  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) => {
1493
+ return !s._shouldAllowMigration || !a.length ? new z(s, e, i) : (s = a[0], c && await s._set(o, c.toJSON()), await Promise.all(t.map(async (l) => {
1361
1494
  if (l !== s)
1362
1495
  try {
1363
1496
  await l._remove(o);
1364
1497
  } catch {
1365
1498
  }
1366
- })), new H(s, e, i));
1499
+ })), new z(s, e, i));
1367
1500
  }
1368
1501
  }
1369
1502
  /**
@@ -1382,29 +1515,29 @@ class H {
1382
1515
  * See the License for the specific language governing permissions and
1383
1516
  * limitations under the License.
1384
1517
  */
1385
- function Ze(n) {
1518
+ function ot(n) {
1386
1519
  const e = n.toLowerCase();
1387
1520
  if (e.includes("opera/") || e.includes("opr/") || e.includes("opios/"))
1388
1521
  return "Opera";
1389
- if (Ot(e))
1522
+ if (Vt(e))
1390
1523
  return "IEMobile";
1391
1524
  if (e.includes("msie") || e.includes("trident/"))
1392
1525
  return "IE";
1393
1526
  if (e.includes("edge/"))
1394
1527
  return "Edge";
1395
- if (Pt(e))
1528
+ if (xt(e))
1396
1529
  return "Firefox";
1397
1530
  if (e.includes("silk/"))
1398
1531
  return "Silk";
1399
- if (Lt(e))
1532
+ if (Ht(e))
1400
1533
  return "Blackberry";
1401
- if (Mt(e))
1534
+ if (jt(e))
1402
1535
  return "Webos";
1403
- if (De(e))
1536
+ if (Be(e))
1404
1537
  return "Safari";
1405
- if ((e.includes("chrome/") || Ct(e)) && !e.includes("edge/"))
1538
+ if ((e.includes("chrome/") || Ft(e)) && !e.includes("edge/"))
1406
1539
  return "Chrome";
1407
- if (Nt(e))
1540
+ if ($t(e))
1408
1541
  return "Android";
1409
1542
  {
1410
1543
  const t = /([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/, i = n.match(t);
@@ -1413,42 +1546,42 @@ function Ze(n) {
1413
1546
  }
1414
1547
  return "Other";
1415
1548
  }
1416
- function Pt(n = _()) {
1549
+ function xt(n = y()) {
1417
1550
  return /firefox\//i.test(n);
1418
1551
  }
1419
- function De(n = _()) {
1552
+ function Be(n = y()) {
1420
1553
  const e = n.toLowerCase();
1421
1554
  return e.includes("safari/") && !e.includes("chrome/") && !e.includes("crios/") && !e.includes("android");
1422
1555
  }
1423
- function Ct(n = _()) {
1556
+ function Ft(n = y()) {
1424
1557
  return /crios\//i.test(n);
1425
1558
  }
1426
- function Ot(n = _()) {
1559
+ function Vt(n = y()) {
1427
1560
  return /iemobile/i.test(n);
1428
1561
  }
1429
- function Nt(n = _()) {
1562
+ function $t(n = y()) {
1430
1563
  return /android/i.test(n);
1431
1564
  }
1432
- function Lt(n = _()) {
1565
+ function Ht(n = y()) {
1433
1566
  return /blackberry/i.test(n);
1434
1567
  }
1435
- function Mt(n = _()) {
1568
+ function jt(n = y()) {
1436
1569
  return /webos/i.test(n);
1437
1570
  }
1438
- function pe(n = _()) {
1571
+ function Te(n = y()) {
1439
1572
  return /iphone|ipad|ipod/i.test(n) || /macintosh/i.test(n) && /mobile/i.test(n);
1440
1573
  }
1441
- function Xn(n = _()) {
1574
+ function yi(n = y()) {
1442
1575
  var e;
1443
- return pe(n) && !!(!((e = window.navigator) === null || e === void 0) && e.standalone);
1576
+ return Te(n) && !!(!((e = window.navigator) === null || e === void 0) && e.standalone);
1444
1577
  }
1445
- function Qn() {
1446
- return kn() && document.documentMode === 10;
1578
+ function wi() {
1579
+ return Pn() && document.documentMode === 10;
1447
1580
  }
1448
- function Ut(n = _()) {
1449
- return pe(n) || Nt(n) || Mt(n) || Lt(n) || /windows phone/i.test(n) || Ot(n);
1581
+ function Wt(n = y()) {
1582
+ return Te(n) || $t(n) || jt(n) || Ht(n) || /windows phone/i.test(n) || Vt(n);
1450
1583
  }
1451
- function Zn() {
1584
+ function Ti() {
1452
1585
  try {
1453
1586
  return !!(window && window !== window.top);
1454
1587
  } catch {
@@ -1471,20 +1604,20 @@ function Zn() {
1471
1604
  * See the License for the specific language governing permissions and
1472
1605
  * limitations under the License.
1473
1606
  */
1474
- function Dt(n, e = []) {
1607
+ function Bt(n, e = []) {
1475
1608
  let t;
1476
1609
  switch (n) {
1477
1610
  case "Browser":
1478
- t = Ze(_());
1611
+ t = ot(y());
1479
1612
  break;
1480
1613
  case "Worker":
1481
- t = `${Ze(_())}-${n}`;
1614
+ t = `${ot(y())}-${n}`;
1482
1615
  break;
1483
1616
  default:
1484
1617
  t = n;
1485
1618
  }
1486
1619
  const i = e.length ? e.join(",") : "FirebaseCore-web";
1487
- return `${t}/JsCore/${J}/${i}`;
1620
+ return `${t}/JsCore/${re}/${i}`;
1488
1621
  }
1489
1622
  /**
1490
1623
  * @license
@@ -1502,7 +1635,7 @@ function Dt(n, e = []) {
1502
1635
  * See the License for the specific language governing permissions and
1503
1636
  * limitations under the License.
1504
1637
  */
1505
- class ei {
1638
+ class ki {
1506
1639
  constructor(e) {
1507
1640
  this.auth = e, this.queue = [];
1508
1641
  }
@@ -1557,8 +1690,8 @@ class ei {
1557
1690
  * See the License for the specific language governing permissions and
1558
1691
  * limitations under the License.
1559
1692
  */
1560
- async function ti(n, e = {}) {
1561
- return G(n, "GET", "/v2/passwordPolicy", fe(n, e));
1693
+ async function Ei(n, e = {}) {
1694
+ return J(n, "GET", "/v2/passwordPolicy", we(n, e));
1562
1695
  }
1563
1696
  /**
1564
1697
  * @license
@@ -1576,12 +1709,12 @@ async function ti(n, e = {}) {
1576
1709
  * See the License for the specific language governing permissions and
1577
1710
  * limitations under the License.
1578
1711
  */
1579
- const ni = 6;
1580
- class ii {
1712
+ const bi = 6;
1713
+ class Si {
1581
1714
  constructor(e) {
1582
1715
  var t, i, r, s;
1583
1716
  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;
1717
+ this.customStrengthOptions = {}, this.customStrengthOptions.minPasswordLength = (t = o.minPasswordLength) !== null && t !== void 0 ? t : bi, 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
1718
  }
1586
1719
  validatePassword(e) {
1587
1720
  var t, i, r, s, o, c;
@@ -1664,14 +1797,14 @@ class ii {
1664
1797
  * See the License for the specific language governing permissions and
1665
1798
  * limitations under the License.
1666
1799
  */
1667
- class ri {
1800
+ class Ri {
1668
1801
  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;
1802
+ 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 at(this), this.idTokenSubscription = new at(this), this.beforeStateQueue = new ki(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 = At, 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
1803
  }
1671
1804
  _initializeWithPersistence(e, t) {
1672
- return t && (this._popupRedirectResolver = S(t)), this._initializationPromise = this.queue(async () => {
1805
+ return t && (this._popupRedirectResolver = N(t)), this._initializationPromise = this.queue(async () => {
1673
1806
  var i, r;
1674
- if (!this._deleted && (this.persistenceManager = await H.create(this, e), !this._deleted)) {
1807
+ if (!this._deleted && (this.persistenceManager = await z.create(this, e), !this._deleted)) {
1675
1808
  if (!((i = this._popupRedirectResolver) === null || i === void 0) && i._shouldInitProactively)
1676
1809
  try {
1677
1810
  await this._popupRedirectResolver._initialize(this);
@@ -1702,7 +1835,7 @@ class ri {
1702
1835
  }
1703
1836
  async initializeCurrentUserFromIdToken(e) {
1704
1837
  try {
1705
- const t = await St(this, { idToken: e }), i = await b._fromGetAccountInfoResponse(this, t, e);
1838
+ const t = await Mt(this, { idToken: e }), i = await C._fromGetAccountInfoResponse(this, t, e);
1706
1839
  await this.directlySetCurrentUser(i);
1707
1840
  } catch (t) {
1708
1841
  console.warn("FirebaseServerApp could not login user with provided authIdToken: ", t), await this.directlySetCurrentUser(null);
@@ -1710,7 +1843,7 @@ class ri {
1710
1843
  }
1711
1844
  async initializeCurrentUser(e) {
1712
1845
  var t;
1713
- if (E(this.app)) {
1846
+ if (A(this.app)) {
1714
1847
  const o = this.app.settings.authIdToken;
1715
1848
  return o ? new Promise((c) => {
1716
1849
  setTimeout(() => this.initializeCurrentUserFromIdToken(o).then(c, c));
@@ -1752,7 +1885,7 @@ class ri {
1752
1885
  }
1753
1886
  async reloadAndSetCurrentUserOrClear(e) {
1754
1887
  try {
1755
- await le(e);
1888
+ await _e(e);
1756
1889
  } catch (t) {
1757
1890
  if ((t == null ? void 0 : t.code) !== "auth/network-request-failed")
1758
1891
  return this.directlySetCurrentUser(null);
@@ -1760,15 +1893,15 @@ class ri {
1760
1893
  return this.directlySetCurrentUser(e);
1761
1894
  }
1762
1895
  useDeviceLanguage() {
1763
- this.languageCode = Vn();
1896
+ this.languageCode = ci();
1764
1897
  }
1765
1898
  async _delete() {
1766
1899
  this._deleted = !0;
1767
1900
  }
1768
1901
  async updateCurrentUser(e) {
1769
- if (E(this.app))
1770
- return Promise.reject(M(this));
1771
- const t = e ? j(e) : null;
1902
+ if (A(this.app))
1903
+ return Promise.reject($(this));
1904
+ const t = e ? K(e) : null;
1772
1905
  return t && u(
1773
1906
  t.auth.config.apiKey === this.config.apiKey,
1774
1907
  this,
@@ -1788,15 +1921,15 @@ class ri {
1788
1921
  });
1789
1922
  }
1790
1923
  async signOut() {
1791
- return E(this.app) ? Promise.reject(M(this)) : (await this.beforeStateQueue.runMiddleware(null), (this.redirectPersistenceManager || this._popupRedirectResolver) && await this._setRedirectUser(null), this._updateCurrentUser(
1924
+ return A(this.app) ? Promise.reject($(this)) : (await this.beforeStateQueue.runMiddleware(null), (this.redirectPersistenceManager || this._popupRedirectResolver) && await this._setRedirectUser(null), this._updateCurrentUser(
1792
1925
  null,
1793
1926
  /* skipBeforeStateCallbacks */
1794
1927
  !0
1795
1928
  ));
1796
1929
  }
1797
1930
  setPersistence(e) {
1798
- return E(this.app) ? Promise.reject(M(this)) : this.queue(async () => {
1799
- await this.assertedPersistence.setPersistence(S(e));
1931
+ return A(this.app) ? Promise.reject($(this)) : this.queue(async () => {
1932
+ await this.assertedPersistence.setPersistence(N(e));
1800
1933
  });
1801
1934
  }
1802
1935
  _getRecaptchaConfig() {
@@ -1811,14 +1944,14 @@ class ri {
1811
1944
  return this.tenantId === null ? this._projectPasswordPolicy : this._tenantPasswordPolicies[this.tenantId];
1812
1945
  }
1813
1946
  async _updatePasswordPolicy() {
1814
- const e = await ti(this), t = new ii(e);
1947
+ const e = await Ei(this), t = new Si(e);
1815
1948
  this.tenantId === null ? this._projectPasswordPolicy = t : this._tenantPasswordPolicies[this.tenantId] = t;
1816
1949
  }
1817
1950
  _getPersistence() {
1818
1951
  return this.assertedPersistence.persistence.type;
1819
1952
  }
1820
1953
  _updateErrorMap(e) {
1821
- this._errorFactory = new Ce("auth", "Firebase", e());
1954
+ this._errorFactory = new Fe("auth", "Firebase", e());
1822
1955
  }
1823
1956
  onAuthStateChanged(e, t, i) {
1824
1957
  return this.registerStateListener(this.authStateSubscription, e, t, i);
@@ -1851,7 +1984,7 @@ class ri {
1851
1984
  token: e,
1852
1985
  idToken: t
1853
1986
  };
1854
- this.tenantId != null && (i.tenantId = this.tenantId), await Yn(this, i);
1987
+ this.tenantId != null && (i.tenantId = this.tenantId), await Ii(this, i);
1855
1988
  }
1856
1989
  }
1857
1990
  toJSON() {
@@ -1869,15 +2002,15 @@ class ri {
1869
2002
  }
1870
2003
  async getOrInitRedirectPersistenceManager(e) {
1871
2004
  if (!this.redirectPersistenceManager) {
1872
- const t = e && S(e) || this._popupRedirectResolver;
2005
+ const t = e && N(e) || this._popupRedirectResolver;
1873
2006
  u(
1874
2007
  t,
1875
2008
  this,
1876
2009
  "argument-error"
1877
2010
  /* AuthErrorCode.ARGUMENT_ERROR */
1878
- ), this.redirectPersistenceManager = await H.create(
2011
+ ), this.redirectPersistenceManager = await z.create(
1879
2012
  this,
1880
- [S(t._redirectPersistence)],
2013
+ [N(t._redirectPersistence)],
1881
2014
  "redirectUser"
1882
2015
  /* KeyName.REDIRECT_USER */
1883
2016
  ), this.redirectUser = await this.redirectPersistenceManager.getCurrentUser();
@@ -1964,7 +2097,7 @@ class ri {
1964
2097
  ), this.persistenceManager;
1965
2098
  }
1966
2099
  _logFramework(e) {
1967
- !e || this.frameworks.includes(e) || (this.frameworks.push(e), this.frameworks.sort(), this.clientVersion = Dt(this.config.clientPlatform, this._getFrameworks()));
2100
+ !e || this.frameworks.includes(e) || (this.frameworks.push(e), this.frameworks.sort(), this.clientVersion = Bt(this.config.clientPlatform, this._getFrameworks()));
1968
2101
  }
1969
2102
  _getFrameworks() {
1970
2103
  return this.frameworks;
@@ -1994,15 +2127,15 @@ class ri {
1994
2127
  async _getAppCheckToken() {
1995
2128
  var e;
1996
2129
  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;
2130
+ return t != null && t.error && si(`Error while retrieving App Check token: ${t.error}`), t == null ? void 0 : t.token;
1998
2131
  }
1999
2132
  }
2000
- function me(n) {
2001
- return j(n);
2133
+ function ke(n) {
2134
+ return K(n);
2002
2135
  }
2003
- class et {
2136
+ class at {
2004
2137
  constructor(e) {
2005
- this.auth = e, this.observer = null, this.addObserver = In((t) => this.observer = t);
2138
+ this.auth = e, this.observer = null, this.addObserver = En((t) => this.observer = t);
2006
2139
  }
2007
2140
  get next() {
2008
2141
  return u(
@@ -2029,7 +2162,7 @@ class et {
2029
2162
  * See the License for the specific language governing permissions and
2030
2163
  * limitations under the License.
2031
2164
  */
2032
- let Fe = {
2165
+ let Ge = {
2033
2166
  async loadJS() {
2034
2167
  throw new Error("Unable to load external scripts");
2035
2168
  },
@@ -2037,16 +2170,16 @@ let Fe = {
2037
2170
  recaptchaEnterpriseScript: "",
2038
2171
  gapiScript: ""
2039
2172
  };
2040
- function si(n) {
2041
- Fe = n;
2173
+ function Ai(n) {
2174
+ Ge = n;
2042
2175
  }
2043
- function oi(n) {
2044
- return Fe.loadJS(n);
2176
+ function Pi(n) {
2177
+ return Ge.loadJS(n);
2045
2178
  }
2046
- function ai() {
2047
- return Fe.gapiScript;
2179
+ function Ci() {
2180
+ return Ge.gapiScript;
2048
2181
  }
2049
- function ci(n) {
2182
+ function Ni(n) {
2050
2183
  return `__${n}${Math.floor(Math.random() * 1e6)}`;
2051
2184
  }
2052
2185
  /**
@@ -2065,13 +2198,13 @@ function ci(n) {
2065
2198
  * See the License for the specific language governing permissions and
2066
2199
  * limitations under the License.
2067
2200
  */
2068
- function li(n, e) {
2069
- const t = _t(n, "auth");
2201
+ function Oi(n, e) {
2202
+ const t = Et(n, "auth");
2070
2203
  if (t.isInitialized()) {
2071
2204
  const r = t.getImmediate(), s = t.getOptions();
2072
- if (wn(s, e ?? {}))
2205
+ if (Rn(s, e ?? {}))
2073
2206
  return r;
2074
- R(
2207
+ O(
2075
2208
  r,
2076
2209
  "already-initialized"
2077
2210
  /* AuthErrorCode.ALREADY_INITIALIZED */
@@ -2079,12 +2212,12 @@ function li(n, e) {
2079
2212
  }
2080
2213
  return t.initialize({ options: e });
2081
2214
  }
2082
- function ui(n, e) {
2083
- const t = (e == null ? void 0 : e.persistence) || [], i = (Array.isArray(t) ? t : [t]).map(S);
2215
+ function Li(n, e) {
2216
+ const t = (e == null ? void 0 : e.persistence) || [], i = (Array.isArray(t) ? t : [t]).map(N);
2084
2217
  e != null && e.errorMap && n._updateErrorMap(e.errorMap), n._initializeWithPersistence(i, e == null ? void 0 : e.popupRedirectResolver);
2085
2218
  }
2086
- function di(n, e, t) {
2087
- const i = me(n);
2219
+ function Mi(n, e, t) {
2220
+ const i = ke(n);
2088
2221
  u(
2089
2222
  i._canInitEmulator,
2090
2223
  i,
@@ -2096,38 +2229,38 @@ function di(n, e, t) {
2096
2229
  "invalid-emulator-scheme"
2097
2230
  /* AuthErrorCode.INVALID_EMULATOR_SCHEME */
2098
2231
  );
2099
- const r = !1, s = Ft(e), { host: o, port: c } = hi(e), a = c === null ? "" : `:${c}`;
2232
+ const r = !1, s = Gt(e), { host: o, port: c } = Ui(e), a = c === null ? "" : `:${c}`;
2100
2233
  i.config.emulator = { url: `${s}//${o}${a}/` }, i.settings.appVerificationDisabledForTesting = !0, i.emulatorConfig = Object.freeze({
2101
2234
  host: o,
2102
2235
  port: c,
2103
2236
  protocol: s.replace(":", ""),
2104
2237
  options: Object.freeze({ disableWarnings: r })
2105
- }), fi();
2238
+ }), Di();
2106
2239
  }
2107
- function Ft(n) {
2240
+ function Gt(n) {
2108
2241
  const e = n.indexOf(":");
2109
2242
  return e < 0 ? "" : n.substr(0, e + 1);
2110
2243
  }
2111
- function hi(n) {
2112
- const e = Ft(n), t = /(\/\/)?([^?#/]+)/.exec(n.substr(e.length));
2244
+ function Ui(n) {
2245
+ const e = Gt(n), t = /(\/\/)?([^?#/]+)/.exec(n.substr(e.length));
2113
2246
  if (!t)
2114
2247
  return { host: "", port: null };
2115
2248
  const i = t[2].split("@").pop() || "", r = /^(\[[^\]]+\])(:|$)/.exec(i);
2116
2249
  if (r) {
2117
2250
  const s = r[1];
2118
- return { host: s, port: tt(i.substr(s.length + 1)) };
2251
+ return { host: s, port: ct(i.substr(s.length + 1)) };
2119
2252
  } else {
2120
2253
  const [s, o] = i.split(":");
2121
- return { host: s, port: tt(o) };
2254
+ return { host: s, port: ct(o) };
2122
2255
  }
2123
2256
  }
2124
- function tt(n) {
2257
+ function ct(n) {
2125
2258
  if (!n)
2126
2259
  return null;
2127
2260
  const e = Number(n);
2128
2261
  return isNaN(e) ? null : e;
2129
2262
  }
2130
- function fi() {
2263
+ function Di() {
2131
2264
  function n() {
2132
2265
  const e = document.createElement("p"), t = e.style;
2133
2266
  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 +2283,7 @@ function fi() {
2150
2283
  * See the License for the specific language governing permissions and
2151
2284
  * limitations under the License.
2152
2285
  */
2153
- class xt {
2286
+ class zt {
2154
2287
  /** @internal */
2155
2288
  constructor(e, t) {
2156
2289
  this.providerId = e, this.signInMethod = t;
@@ -2161,19 +2294,19 @@ class xt {
2161
2294
  * @returns a JSON-serializable representation of this object.
2162
2295
  */
2163
2296
  toJSON() {
2164
- return k("not implemented");
2297
+ return P("not implemented");
2165
2298
  }
2166
2299
  /** @internal */
2167
2300
  _getIdTokenResponse(e) {
2168
- return k("not implemented");
2301
+ return P("not implemented");
2169
2302
  }
2170
2303
  /** @internal */
2171
2304
  _linkToIdToken(e, t) {
2172
- return k("not implemented");
2305
+ return P("not implemented");
2173
2306
  }
2174
2307
  /** @internal */
2175
2308
  _getReauthenticationResolver(e) {
2176
- return k("not implemented");
2309
+ return P("not implemented");
2177
2310
  }
2178
2311
  }
2179
2312
  /**
@@ -2192,8 +2325,8 @@ class xt {
2192
2325
  * See the License for the specific language governing permissions and
2193
2326
  * limitations under the License.
2194
2327
  */
2195
- async function W(n, e) {
2196
- return kt(n, "POST", "/v1/accounts:signInWithIdp", fe(n, e));
2328
+ async function q(n, e) {
2329
+ return Ot(n, "POST", "/v1/accounts:signInWithIdp", we(n, e));
2197
2330
  }
2198
2331
  /**
2199
2332
  * @license
@@ -2211,15 +2344,15 @@ async function W(n, e) {
2211
2344
  * See the License for the specific language governing permissions and
2212
2345
  * limitations under the License.
2213
2346
  */
2214
- const pi = "http://localhost";
2215
- class D extends xt {
2347
+ const xi = "http://localhost";
2348
+ class j extends zt {
2216
2349
  constructor() {
2217
2350
  super(...arguments), this.pendingToken = null;
2218
2351
  }
2219
2352
  /** @internal */
2220
2353
  static _fromParams(e) {
2221
- const t = new D(e.providerId, e.signInMethod);
2222
- return e.idToken || e.accessToken ? (e.idToken && (t.idToken = e.idToken), e.accessToken && (t.accessToken = e.accessToken), e.nonce && !e.pendingToken && (t.nonce = e.nonce), e.pendingToken && (t.pendingToken = e.pendingToken)) : e.oauthToken && e.oauthTokenSecret ? (t.accessToken = e.oauthToken, t.secret = e.oauthTokenSecret) : R(
2354
+ const t = new j(e.providerId, e.signInMethod);
2355
+ return e.idToken || e.accessToken ? (e.idToken && (t.idToken = e.idToken), e.accessToken && (t.accessToken = e.accessToken), e.nonce && !e.pendingToken && (t.nonce = e.nonce), e.pendingToken && (t.pendingToken = e.pendingToken)) : e.oauthToken && e.oauthTokenSecret ? (t.accessToken = e.oauthToken, t.secret = e.oauthTokenSecret) : O(
2223
2356
  "argument-error"
2224
2357
  /* AuthErrorCode.ARGUMENT_ERROR */
2225
2358
  ), t;
@@ -2246,37 +2379,37 @@ class D extends xt {
2246
2379
  * @returns If the JSON input does not represent an {@link AuthCredential}, null is returned.
2247
2380
  */
2248
2381
  static fromJSON(e) {
2249
- const t = typeof e == "string" ? JSON.parse(e) : e, { providerId: i, signInMethod: r } = t, s = Ne(t, ["providerId", "signInMethod"]);
2382
+ const t = typeof e == "string" ? JSON.parse(e) : e, { providerId: i, signInMethod: r } = t, s = $e(t, ["providerId", "signInMethod"]);
2250
2383
  if (!i || !r)
2251
2384
  return null;
2252
- const o = new D(i, r);
2385
+ const o = new j(i, r);
2253
2386
  return o.idToken = s.idToken || void 0, o.accessToken = s.accessToken || void 0, o.secret = s.secret, o.nonce = s.nonce, o.pendingToken = s.pendingToken || null, o;
2254
2387
  }
2255
2388
  /** @internal */
2256
2389
  _getIdTokenResponse(e) {
2257
2390
  const t = this.buildRequest();
2258
- return W(e, t);
2391
+ return q(e, t);
2259
2392
  }
2260
2393
  /** @internal */
2261
2394
  _linkToIdToken(e, t) {
2262
2395
  const i = this.buildRequest();
2263
- return i.idToken = t, W(e, i);
2396
+ return i.idToken = t, q(e, i);
2264
2397
  }
2265
2398
  /** @internal */
2266
2399
  _getReauthenticationResolver(e) {
2267
2400
  const t = this.buildRequest();
2268
- return t.autoCreate = !1, W(e, t);
2401
+ return t.autoCreate = !1, q(e, t);
2269
2402
  }
2270
2403
  buildRequest() {
2271
2404
  const e = {
2272
- requestUri: pi,
2405
+ requestUri: xi,
2273
2406
  returnSecureToken: !0
2274
2407
  };
2275
2408
  if (this.pendingToken)
2276
2409
  e.pendingToken = this.pendingToken;
2277
2410
  else {
2278
2411
  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);
2412
+ 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 = se(t);
2280
2413
  }
2281
2414
  return e;
2282
2415
  }
@@ -2297,7 +2430,7 @@ class D extends xt {
2297
2430
  * See the License for the specific language governing permissions and
2298
2431
  * limitations under the License.
2299
2432
  */
2300
- class Vt {
2433
+ class qt {
2301
2434
  /**
2302
2435
  * Constructor for generic OAuth providers.
2303
2436
  *
@@ -2350,7 +2483,7 @@ class Vt {
2350
2483
  * See the License for the specific language governing permissions and
2351
2484
  * limitations under the License.
2352
2485
  */
2353
- class Q extends Vt {
2486
+ class ae extends qt {
2354
2487
  constructor() {
2355
2488
  super(...arguments), this.scopes = [];
2356
2489
  }
@@ -2385,7 +2518,7 @@ class Q extends Vt {
2385
2518
  * See the License for the specific language governing permissions and
2386
2519
  * limitations under the License.
2387
2520
  */
2388
- class C extends Q {
2521
+ class D extends ae {
2389
2522
  constructor() {
2390
2523
  super(
2391
2524
  "facebook.com"
@@ -2405,9 +2538,9 @@ class C extends Q {
2405
2538
  * @param accessToken - Facebook access token.
2406
2539
  */
2407
2540
  static credential(e) {
2408
- return D._fromParams({
2409
- providerId: C.PROVIDER_ID,
2410
- signInMethod: C.FACEBOOK_SIGN_IN_METHOD,
2541
+ return j._fromParams({
2542
+ providerId: D.PROVIDER_ID,
2543
+ signInMethod: D.FACEBOOK_SIGN_IN_METHOD,
2411
2544
  accessToken: e
2412
2545
  });
2413
2546
  }
@@ -2417,7 +2550,7 @@ class C extends Q {
2417
2550
  * @param userCredential - The user credential.
2418
2551
  */
2419
2552
  static credentialFromResult(e) {
2420
- return C.credentialFromTaggedObject(e);
2553
+ return D.credentialFromTaggedObject(e);
2421
2554
  }
2422
2555
  /**
2423
2556
  * Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was
@@ -2426,20 +2559,20 @@ class C extends Q {
2426
2559
  * @param userCredential - The user credential.
2427
2560
  */
2428
2561
  static credentialFromError(e) {
2429
- return C.credentialFromTaggedObject(e.customData || {});
2562
+ return D.credentialFromTaggedObject(e.customData || {});
2430
2563
  }
2431
2564
  static credentialFromTaggedObject({ _tokenResponse: e }) {
2432
2565
  if (!e || !("oauthAccessToken" in e) || !e.oauthAccessToken)
2433
2566
  return null;
2434
2567
  try {
2435
- return C.credential(e.oauthAccessToken);
2568
+ return D.credential(e.oauthAccessToken);
2436
2569
  } catch {
2437
2570
  return null;
2438
2571
  }
2439
2572
  }
2440
2573
  }
2441
- C.FACEBOOK_SIGN_IN_METHOD = "facebook.com";
2442
- C.PROVIDER_ID = "facebook.com";
2574
+ D.FACEBOOK_SIGN_IN_METHOD = "facebook.com";
2575
+ D.PROVIDER_ID = "facebook.com";
2443
2576
  /**
2444
2577
  * @license
2445
2578
  * Copyright 2020 Google LLC
@@ -2456,7 +2589,7 @@ C.PROVIDER_ID = "facebook.com";
2456
2589
  * See the License for the specific language governing permissions and
2457
2590
  * limitations under the License.
2458
2591
  */
2459
- class O extends Q {
2592
+ class x extends ae {
2460
2593
  constructor() {
2461
2594
  super(
2462
2595
  "google.com"
@@ -2477,9 +2610,9 @@ class O extends Q {
2477
2610
  * @param accessToken - Google access token.
2478
2611
  */
2479
2612
  static credential(e, t) {
2480
- return D._fromParams({
2481
- providerId: O.PROVIDER_ID,
2482
- signInMethod: O.GOOGLE_SIGN_IN_METHOD,
2613
+ return j._fromParams({
2614
+ providerId: x.PROVIDER_ID,
2615
+ signInMethod: x.GOOGLE_SIGN_IN_METHOD,
2483
2616
  idToken: e,
2484
2617
  accessToken: t
2485
2618
  });
@@ -2490,7 +2623,7 @@ class O extends Q {
2490
2623
  * @param userCredential - The user credential.
2491
2624
  */
2492
2625
  static credentialFromResult(e) {
2493
- return O.credentialFromTaggedObject(e);
2626
+ return x.credentialFromTaggedObject(e);
2494
2627
  }
2495
2628
  /**
2496
2629
  * Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was
@@ -2499,7 +2632,7 @@ class O extends Q {
2499
2632
  * @param userCredential - The user credential.
2500
2633
  */
2501
2634
  static credentialFromError(e) {
2502
- return O.credentialFromTaggedObject(e.customData || {});
2635
+ return x.credentialFromTaggedObject(e.customData || {});
2503
2636
  }
2504
2637
  static credentialFromTaggedObject({ _tokenResponse: e }) {
2505
2638
  if (!e)
@@ -2508,14 +2641,14 @@ class O extends Q {
2508
2641
  if (!t && !i)
2509
2642
  return null;
2510
2643
  try {
2511
- return O.credential(t, i);
2644
+ return x.credential(t, i);
2512
2645
  } catch {
2513
2646
  return null;
2514
2647
  }
2515
2648
  }
2516
2649
  }
2517
- O.GOOGLE_SIGN_IN_METHOD = "google.com";
2518
- O.PROVIDER_ID = "google.com";
2650
+ x.GOOGLE_SIGN_IN_METHOD = "google.com";
2651
+ x.PROVIDER_ID = "google.com";
2519
2652
  /**
2520
2653
  * @license
2521
2654
  * Copyright 2020 Google LLC
@@ -2532,7 +2665,7 @@ O.PROVIDER_ID = "google.com";
2532
2665
  * See the License for the specific language governing permissions and
2533
2666
  * limitations under the License.
2534
2667
  */
2535
- class N extends Q {
2668
+ class F extends ae {
2536
2669
  constructor() {
2537
2670
  super(
2538
2671
  "github.com"
@@ -2545,9 +2678,9 @@ class N extends Q {
2545
2678
  * @param accessToken - Github access token.
2546
2679
  */
2547
2680
  static credential(e) {
2548
- return D._fromParams({
2549
- providerId: N.PROVIDER_ID,
2550
- signInMethod: N.GITHUB_SIGN_IN_METHOD,
2681
+ return j._fromParams({
2682
+ providerId: F.PROVIDER_ID,
2683
+ signInMethod: F.GITHUB_SIGN_IN_METHOD,
2551
2684
  accessToken: e
2552
2685
  });
2553
2686
  }
@@ -2557,7 +2690,7 @@ class N extends Q {
2557
2690
  * @param userCredential - The user credential.
2558
2691
  */
2559
2692
  static credentialFromResult(e) {
2560
- return N.credentialFromTaggedObject(e);
2693
+ return F.credentialFromTaggedObject(e);
2561
2694
  }
2562
2695
  /**
2563
2696
  * Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was
@@ -2566,20 +2699,20 @@ class N extends Q {
2566
2699
  * @param userCredential - The user credential.
2567
2700
  */
2568
2701
  static credentialFromError(e) {
2569
- return N.credentialFromTaggedObject(e.customData || {});
2702
+ return F.credentialFromTaggedObject(e.customData || {});
2570
2703
  }
2571
2704
  static credentialFromTaggedObject({ _tokenResponse: e }) {
2572
2705
  if (!e || !("oauthAccessToken" in e) || !e.oauthAccessToken)
2573
2706
  return null;
2574
2707
  try {
2575
- return N.credential(e.oauthAccessToken);
2708
+ return F.credential(e.oauthAccessToken);
2576
2709
  } catch {
2577
2710
  return null;
2578
2711
  }
2579
2712
  }
2580
2713
  }
2581
- N.GITHUB_SIGN_IN_METHOD = "github.com";
2582
- N.PROVIDER_ID = "github.com";
2714
+ F.GITHUB_SIGN_IN_METHOD = "github.com";
2715
+ F.PROVIDER_ID = "github.com";
2583
2716
  /**
2584
2717
  * @license
2585
2718
  * Copyright 2020 Google LLC
@@ -2596,7 +2729,7 @@ N.PROVIDER_ID = "github.com";
2596
2729
  * See the License for the specific language governing permissions and
2597
2730
  * limitations under the License.
2598
2731
  */
2599
- class L extends Q {
2732
+ class V extends ae {
2600
2733
  constructor() {
2601
2734
  super(
2602
2735
  "twitter.com"
@@ -2610,9 +2743,9 @@ class L extends Q {
2610
2743
  * @param secret - Twitter secret.
2611
2744
  */
2612
2745
  static credential(e, t) {
2613
- return D._fromParams({
2614
- providerId: L.PROVIDER_ID,
2615
- signInMethod: L.TWITTER_SIGN_IN_METHOD,
2746
+ return j._fromParams({
2747
+ providerId: V.PROVIDER_ID,
2748
+ signInMethod: V.TWITTER_SIGN_IN_METHOD,
2616
2749
  oauthToken: e,
2617
2750
  oauthTokenSecret: t
2618
2751
  });
@@ -2623,7 +2756,7 @@ class L extends Q {
2623
2756
  * @param userCredential - The user credential.
2624
2757
  */
2625
2758
  static credentialFromResult(e) {
2626
- return L.credentialFromTaggedObject(e);
2759
+ return V.credentialFromTaggedObject(e);
2627
2760
  }
2628
2761
  /**
2629
2762
  * Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was
@@ -2632,7 +2765,7 @@ class L extends Q {
2632
2765
  * @param userCredential - The user credential.
2633
2766
  */
2634
2767
  static credentialFromError(e) {
2635
- return L.credentialFromTaggedObject(e.customData || {});
2768
+ return V.credentialFromTaggedObject(e.customData || {});
2636
2769
  }
2637
2770
  static credentialFromTaggedObject({ _tokenResponse: e }) {
2638
2771
  if (!e)
@@ -2641,14 +2774,14 @@ class L extends Q {
2641
2774
  if (!t || !i)
2642
2775
  return null;
2643
2776
  try {
2644
- return L.credential(t, i);
2777
+ return V.credential(t, i);
2645
2778
  } catch {
2646
2779
  return null;
2647
2780
  }
2648
2781
  }
2649
2782
  }
2650
- L.TWITTER_SIGN_IN_METHOD = "twitter.com";
2651
- L.PROVIDER_ID = "twitter.com";
2783
+ V.TWITTER_SIGN_IN_METHOD = "twitter.com";
2784
+ V.PROVIDER_ID = "twitter.com";
2652
2785
  /**
2653
2786
  * @license
2654
2787
  * Copyright 2020 Google LLC
@@ -2665,13 +2798,13 @@ L.PROVIDER_ID = "twitter.com";
2665
2798
  * See the License for the specific language governing permissions and
2666
2799
  * limitations under the License.
2667
2800
  */
2668
- class F {
2801
+ class W {
2669
2802
  constructor(e) {
2670
2803
  this.user = e.user, this.providerId = e.providerId, this._tokenResponse = e._tokenResponse, this.operationType = e.operationType;
2671
2804
  }
2672
2805
  static async _fromIdTokenResponse(e, t, i, r = !1) {
2673
- const s = await b._fromIdTokenResponse(e, i, r), o = nt(i);
2674
- return new F({
2806
+ const s = await C._fromIdTokenResponse(e, i, r), o = lt(i);
2807
+ return new W({
2675
2808
  user: s,
2676
2809
  providerId: o,
2677
2810
  _tokenResponse: i,
@@ -2684,8 +2817,8 @@ class F {
2684
2817
  /* reload */
2685
2818
  !0
2686
2819
  );
2687
- const r = nt(i);
2688
- return new F({
2820
+ const r = lt(i);
2821
+ return new W({
2689
2822
  user: e,
2690
2823
  providerId: r,
2691
2824
  _tokenResponse: i,
@@ -2693,7 +2826,7 @@ class F {
2693
2826
  });
2694
2827
  }
2695
2828
  }
2696
- function nt(n) {
2829
+ function lt(n) {
2697
2830
  return n.providerId ? n.providerId : "phoneNumber" in n ? "phone" : null;
2698
2831
  }
2699
2832
  /**
@@ -2712,10 +2845,10 @@ function nt(n) {
2712
2845
  * See the License for the specific language governing permissions and
2713
2846
  * limitations under the License.
2714
2847
  */
2715
- class ue extends Oe {
2848
+ class ve extends Ve {
2716
2849
  constructor(e, t, i, r) {
2717
2850
  var s;
2718
- super(t.code, t.message), this.operationType = i, this.user = r, Object.setPrototypeOf(this, ue.prototype), this.customData = {
2851
+ super(t.code, t.message), this.operationType = i, this.user = r, Object.setPrototypeOf(this, ve.prototype), this.customData = {
2719
2852
  appName: e.name,
2720
2853
  tenantId: (s = e.tenantId) !== null && s !== void 0 ? s : void 0,
2721
2854
  _serverResponse: t.customData._serverResponse,
@@ -2723,17 +2856,17 @@ class ue extends Oe {
2723
2856
  };
2724
2857
  }
2725
2858
  static _fromErrorAndOperation(e, t, i, r) {
2726
- return new ue(e, t, i, r);
2859
+ return new ve(e, t, i, r);
2727
2860
  }
2728
2861
  }
2729
- function $t(n, e, t, i) {
2862
+ function Kt(n, e, t, i) {
2730
2863
  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;
2864
+ throw s.code === "auth/multi-factor-auth-required" ? ve._fromErrorAndOperation(n, s, e, i) : s;
2732
2865
  });
2733
2866
  }
2734
- async function mi(n, e, t = !1) {
2735
- const i = await K(n, e._linkToIdToken(n.auth, await n.getIdToken()), t);
2736
- return F._forOperation(n, "link", i);
2867
+ async function Fi(n, e, t = !1) {
2868
+ const i = await ie(n, e._linkToIdToken(n.auth, await n.getIdToken()), t);
2869
+ return W._forOperation(n, "link", i);
2737
2870
  }
2738
2871
  /**
2739
2872
  * @license
@@ -2751,20 +2884,20 @@ async function mi(n, e, t = !1) {
2751
2884
  * See the License for the specific language governing permissions and
2752
2885
  * limitations under the License.
2753
2886
  */
2754
- async function gi(n, e, t = !1) {
2887
+ async function Vi(n, e, t = !1) {
2755
2888
  const { auth: i } = n;
2756
- if (E(i.app))
2757
- return Promise.reject(M(i));
2889
+ if (A(i.app))
2890
+ return Promise.reject($(i));
2758
2891
  const r = "reauthenticate";
2759
2892
  try {
2760
- const s = await K(n, $t(i, r, e, n), t);
2893
+ const s = await ie(n, Kt(i, r, e, n), t);
2761
2894
  u(
2762
2895
  s.idToken,
2763
2896
  i,
2764
2897
  "internal-error"
2765
2898
  /* AuthErrorCode.INTERNAL_ERROR */
2766
2899
  );
2767
- const o = Ue(s.idToken);
2900
+ const o = We(s.idToken);
2768
2901
  u(
2769
2902
  o,
2770
2903
  i,
@@ -2777,9 +2910,9 @@ async function gi(n, e, t = !1) {
2777
2910
  i,
2778
2911
  "user-mismatch"
2779
2912
  /* AuthErrorCode.USER_MISMATCH */
2780
- ), F._forOperation(n, r, s);
2913
+ ), W._forOperation(n, r, s);
2781
2914
  } catch (s) {
2782
- throw (s == null ? void 0 : s.code) === "auth/user-not-found" && R(
2915
+ throw (s == null ? void 0 : s.code) === "auth/user-not-found" && O(
2783
2916
  i,
2784
2917
  "user-mismatch"
2785
2918
  /* AuthErrorCode.USER_MISMATCH */
@@ -2802,10 +2935,10 @@ async function gi(n, e, t = !1) {
2802
2935
  * See the License for the specific language governing permissions and
2803
2936
  * limitations under the License.
2804
2937
  */
2805
- async function _i(n, e, t = !1) {
2806
- if (E(n.app))
2807
- return Promise.reject(M(n));
2808
- const i = "signIn", r = await $t(n, i, e), s = await F._fromIdTokenResponse(n, i, r);
2938
+ async function $i(n, e, t = !1) {
2939
+ if (A(n.app))
2940
+ return Promise.reject($(n));
2941
+ const i = "signIn", r = await Kt(n, i, e), s = await W._fromIdTokenResponse(n, i, r);
2809
2942
  return t || await n._updateCurrentUser(s.user), s;
2810
2943
  }
2811
2944
  /**
@@ -2824,8 +2957,8 @@ async function _i(n, e, t = !1) {
2824
2957
  * See the License for the specific language governing permissions and
2825
2958
  * limitations under the License.
2826
2959
  */
2827
- async function vi(n, e) {
2828
- return kt(n, "POST", "/v1/accounts:signInWithCustomToken", fe(n, e));
2960
+ async function Hi(n, e) {
2961
+ return Ot(n, "POST", "/v1/accounts:signInWithCustomToken", we(n, e));
2829
2962
  }
2830
2963
  /**
2831
2964
  * @license
@@ -2843,22 +2976,22 @@ async function vi(n, e) {
2843
2976
  * See the License for the specific language governing permissions and
2844
2977
  * limitations under the License.
2845
2978
  */
2846
- async function Ii(n, e) {
2847
- if (E(n.app))
2848
- return Promise.reject(M(n));
2849
- const t = me(n), i = await vi(t, {
2979
+ async function ji(n, e) {
2980
+ if (A(n.app))
2981
+ return Promise.reject($(n));
2982
+ const t = ke(n), i = await Hi(t, {
2850
2983
  token: e,
2851
2984
  returnSecureToken: !0
2852
- }), r = await F._fromIdTokenResponse(t, "signIn", i);
2985
+ }), r = await W._fromIdTokenResponse(t, "signIn", i);
2853
2986
  return await t._updateCurrentUser(r.user), r;
2854
2987
  }
2855
- function Ti(n, e, t, i) {
2856
- return j(n).onIdTokenChanged(e, t, i);
2988
+ function Wi(n, e, t, i) {
2989
+ return K(n).onIdTokenChanged(e, t, i);
2857
2990
  }
2858
- function yi(n, e, t) {
2859
- return j(n).beforeAuthStateChanged(e, t);
2991
+ function Bi(n, e, t) {
2992
+ return K(n).beforeAuthStateChanged(e, t);
2860
2993
  }
2861
- const de = "__sak";
2994
+ const Ie = "__sak";
2862
2995
  /**
2863
2996
  * @license
2864
2997
  * Copyright 2019 Google LLC
@@ -2875,13 +3008,13 @@ const de = "__sak";
2875
3008
  * See the License for the specific language governing permissions and
2876
3009
  * limitations under the License.
2877
3010
  */
2878
- class Ht {
3011
+ class Jt {
2879
3012
  constructor(e, t) {
2880
3013
  this.storageRetriever = e, this.type = t;
2881
3014
  }
2882
3015
  _isAvailable() {
2883
3016
  try {
2884
- return this.storage ? (this.storage.setItem(de, "1"), this.storage.removeItem(de), Promise.resolve(!0)) : Promise.resolve(!1);
3017
+ return this.storage ? (this.storage.setItem(Ie, "1"), this.storage.removeItem(Ie), Promise.resolve(!0)) : Promise.resolve(!1);
2885
3018
  } catch {
2886
3019
  return Promise.resolve(!1);
2887
3020
  }
@@ -2916,18 +3049,18 @@ class Ht {
2916
3049
  * See the License for the specific language governing permissions and
2917
3050
  * limitations under the License.
2918
3051
  */
2919
- function wi() {
2920
- const n = _();
2921
- return De(n) || pe(n);
3052
+ function Gi() {
3053
+ const n = y();
3054
+ return Be(n) || Te(n);
2922
3055
  }
2923
- const Ei = 1e3, ki = 10;
2924
- class Wt extends Ht {
3056
+ const zi = 1e3, qi = 10;
3057
+ class Yt extends Jt {
2925
3058
  constructor() {
2926
3059
  super(
2927
3060
  () => window.localStorage,
2928
3061
  "LOCAL"
2929
3062
  /* 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;
3063
+ ), this.boundEventHandler = (e, t) => this.onStorageEvent(e, t), this.listeners = {}, this.localCache = {}, this.pollTimer = null, this.safariLocalStorageNotSynced = Gi() && Ti(), this.fallbackToPolling = Wt(), this._shouldAllowMigration = !0;
2931
3064
  }
2932
3065
  forAllChangedKeys(e) {
2933
3066
  for (const t of Object.keys(this.listeners)) {
@@ -2954,7 +3087,7 @@ class Wt extends Ht {
2954
3087
  const o = this.storage.getItem(i);
2955
3088
  !t && this.localCache[i] === o || this.notifyListeners(i, o);
2956
3089
  }, s = this.storage.getItem(i);
2957
- Qn() && s !== e.newValue && e.newValue !== e.oldValue ? setTimeout(r, ki) : r();
3090
+ wi() && s !== e.newValue && e.newValue !== e.oldValue ? setTimeout(r, qi) : r();
2958
3091
  }
2959
3092
  notifyListeners(e, t) {
2960
3093
  this.localCache[e] = t;
@@ -2976,7 +3109,7 @@ class Wt extends Ht {
2976
3109
  !0
2977
3110
  );
2978
3111
  });
2979
- }, Ei);
3112
+ }, zi);
2980
3113
  }
2981
3114
  stopPolling() {
2982
3115
  this.pollTimer && (clearInterval(this.pollTimer), this.pollTimer = null);
@@ -3005,8 +3138,8 @@ class Wt extends Ht {
3005
3138
  await super._remove(e), delete this.localCache[e];
3006
3139
  }
3007
3140
  }
3008
- Wt.type = "LOCAL";
3009
- const bi = Wt;
3141
+ Yt.type = "LOCAL";
3142
+ const Ki = Yt;
3010
3143
  /**
3011
3144
  * @license
3012
3145
  * Copyright 2020 Google LLC
@@ -3023,7 +3156,7 @@ const bi = Wt;
3023
3156
  * See the License for the specific language governing permissions and
3024
3157
  * limitations under the License.
3025
3158
  */
3026
- class jt extends Ht {
3159
+ class Xt extends Jt {
3027
3160
  constructor() {
3028
3161
  super(
3029
3162
  () => window.sessionStorage,
@@ -3036,8 +3169,8 @@ class jt extends Ht {
3036
3169
  _removeListener(e, t) {
3037
3170
  }
3038
3171
  }
3039
- jt.type = "SESSION";
3040
- const Gt = jt;
3172
+ Xt.type = "SESSION";
3173
+ const Qt = Xt;
3041
3174
  /**
3042
3175
  * @license
3043
3176
  * Copyright 2019 Google LLC
@@ -3054,7 +3187,7 @@ const Gt = jt;
3054
3187
  * See the License for the specific language governing permissions and
3055
3188
  * limitations under the License.
3056
3189
  */
3057
- function Si(n) {
3190
+ function Ji(n) {
3058
3191
  return Promise.all(n.map(async (e) => {
3059
3192
  try {
3060
3193
  return {
@@ -3085,7 +3218,7 @@ function Si(n) {
3085
3218
  * See the License for the specific language governing permissions and
3086
3219
  * limitations under the License.
3087
3220
  */
3088
- class ge {
3221
+ class Ee {
3089
3222
  constructor(e) {
3090
3223
  this.eventTarget = e, this.handlersMap = {}, this.boundEventHandler = this.handleEvent.bind(this);
3091
3224
  }
@@ -3099,7 +3232,7 @@ class ge {
3099
3232
  const t = this.receivers.find((r) => r.isListeningto(e));
3100
3233
  if (t)
3101
3234
  return t;
3102
- const i = new ge(e);
3235
+ const i = new Ee(e);
3103
3236
  return this.receivers.push(i), i;
3104
3237
  }
3105
3238
  isListeningto(e) {
@@ -3124,7 +3257,7 @@ class ge {
3124
3257
  eventId: i,
3125
3258
  eventType: r
3126
3259
  });
3127
- const c = Array.from(o).map(async (l) => l(t.origin, s)), a = await Si(c);
3260
+ const c = Array.from(o).map(async (l) => l(t.origin, s)), a = await Ji(c);
3128
3261
  t.ports[0].postMessage({
3129
3262
  status: "done",
3130
3263
  eventId: i,
@@ -3153,7 +3286,7 @@ class ge {
3153
3286
  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
3287
  }
3155
3288
  }
3156
- ge.receivers = [];
3289
+ Ee.receivers = [];
3157
3290
  /**
3158
3291
  * @license
3159
3292
  * Copyright 2020 Google LLC
@@ -3170,7 +3303,7 @@ ge.receivers = [];
3170
3303
  * See the License for the specific language governing permissions and
3171
3304
  * limitations under the License.
3172
3305
  */
3173
- function xe(n = "", e = 10) {
3306
+ function ze(n = "", e = 10) {
3174
3307
  let t = "";
3175
3308
  for (let i = 0; i < e; i++)
3176
3309
  t += Math.floor(Math.random() * 10);
@@ -3192,7 +3325,7 @@ function xe(n = "", e = 10) {
3192
3325
  * See the License for the specific language governing permissions and
3193
3326
  * limitations under the License.
3194
3327
  */
3195
- class Ri {
3328
+ class Yi {
3196
3329
  constructor(e) {
3197
3330
  this.target = e, this.handlers = /* @__PURE__ */ new Set();
3198
3331
  }
@@ -3226,7 +3359,7 @@ class Ri {
3226
3359
  );
3227
3360
  let s, o;
3228
3361
  return new Promise((c, a) => {
3229
- const l = xe("", 20);
3362
+ const l = ze("", 20);
3230
3363
  r.port1.start();
3231
3364
  const d = setTimeout(() => {
3232
3365
  a(new Error(
@@ -3237,9 +3370,9 @@ class Ri {
3237
3370
  o = {
3238
3371
  messageChannel: r,
3239
3372
  onMessage(h) {
3240
- const p = h;
3241
- if (p.data.eventId === l)
3242
- switch (p.data.status) {
3373
+ const m = h;
3374
+ if (m.data.eventId === l)
3375
+ switch (m.data.status) {
3243
3376
  case "ack":
3244
3377
  clearTimeout(d), s = setTimeout(
3245
3378
  () => {
@@ -3253,7 +3386,7 @@ class Ri {
3253
3386
  );
3254
3387
  break;
3255
3388
  case "done":
3256
- clearTimeout(s), c(p.data.response);
3389
+ clearTimeout(s), c(m.data.response);
3257
3390
  break;
3258
3391
  default:
3259
3392
  clearTimeout(d), clearTimeout(s), a(new Error(
@@ -3289,11 +3422,11 @@ class Ri {
3289
3422
  * See the License for the specific language governing permissions and
3290
3423
  * limitations under the License.
3291
3424
  */
3292
- function y() {
3425
+ function b() {
3293
3426
  return window;
3294
3427
  }
3295
- function Ai(n) {
3296
- y().location.href = n;
3428
+ function Xi(n) {
3429
+ b().location.href = n;
3297
3430
  }
3298
3431
  /**
3299
3432
  * @license
@@ -3311,10 +3444,10 @@ function Ai(n) {
3311
3444
  * See the License for the specific language governing permissions and
3312
3445
  * limitations under the License.
3313
3446
  */
3314
- function Bt() {
3315
- return typeof y().WorkerGlobalScope < "u" && typeof y().importScripts == "function";
3447
+ function Zt() {
3448
+ return typeof b().WorkerGlobalScope < "u" && typeof b().importScripts == "function";
3316
3449
  }
3317
- async function Pi() {
3450
+ async function Qi() {
3318
3451
  if (!(navigator != null && navigator.serviceWorker))
3319
3452
  return null;
3320
3453
  try {
@@ -3323,12 +3456,12 @@ async function Pi() {
3323
3456
  return null;
3324
3457
  }
3325
3458
  }
3326
- function Ci() {
3459
+ function Zi() {
3327
3460
  var n;
3328
3461
  return ((n = navigator == null ? void 0 : navigator.serviceWorker) === null || n === void 0 ? void 0 : n.controller) || null;
3329
3462
  }
3330
- function Oi() {
3331
- return Bt() ? self : null;
3463
+ function er() {
3464
+ return Zt() ? self : null;
3332
3465
  }
3333
3466
  /**
3334
3467
  * @license
@@ -3346,8 +3479,8 @@ function Oi() {
3346
3479
  * See the License for the specific language governing permissions and
3347
3480
  * limitations under the License.
3348
3481
  */
3349
- const zt = "firebaseLocalStorageDb", Ni = 1, he = "firebaseLocalStorage", qt = "fbase_key";
3350
- class Z {
3482
+ const en = "firebaseLocalStorageDb", tr = 1, ye = "firebaseLocalStorage", tn = "fbase_key";
3483
+ class ce {
3351
3484
  constructor(e) {
3352
3485
  this.request = e;
3353
3486
  }
@@ -3361,55 +3494,55 @@ class Z {
3361
3494
  });
3362
3495
  }
3363
3496
  }
3364
- function _e(n, e) {
3365
- return n.transaction([he], e ? "readwrite" : "readonly").objectStore(he);
3497
+ function be(n, e) {
3498
+ return n.transaction([ye], e ? "readwrite" : "readonly").objectStore(ye);
3366
3499
  }
3367
- function Li() {
3368
- const n = indexedDB.deleteDatabase(zt);
3369
- return new Z(n).toPromise();
3500
+ function nr() {
3501
+ const n = indexedDB.deleteDatabase(en);
3502
+ return new ce(n).toPromise();
3370
3503
  }
3371
- function Pe() {
3372
- const n = indexedDB.open(zt, Ni);
3504
+ function Ue() {
3505
+ const n = indexedDB.open(en, tr);
3373
3506
  return new Promise((e, t) => {
3374
3507
  n.addEventListener("error", () => {
3375
3508
  t(n.error);
3376
3509
  }), n.addEventListener("upgradeneeded", () => {
3377
3510
  const i = n.result;
3378
3511
  try {
3379
- i.createObjectStore(he, { keyPath: qt });
3512
+ i.createObjectStore(ye, { keyPath: tn });
3380
3513
  } catch (r) {
3381
3514
  t(r);
3382
3515
  }
3383
3516
  }), n.addEventListener("success", async () => {
3384
3517
  const i = n.result;
3385
- i.objectStoreNames.contains(he) ? e(i) : (i.close(), await Li(), e(await Pe()));
3518
+ i.objectStoreNames.contains(ye) ? e(i) : (i.close(), await nr(), e(await Ue()));
3386
3519
  });
3387
3520
  });
3388
3521
  }
3389
- async function it(n, e, t) {
3390
- const i = _e(n, !0).put({
3391
- [qt]: e,
3522
+ async function ut(n, e, t) {
3523
+ const i = be(n, !0).put({
3524
+ [tn]: e,
3392
3525
  value: t
3393
3526
  });
3394
- return new Z(i).toPromise();
3527
+ return new ce(i).toPromise();
3395
3528
  }
3396
- async function Mi(n, e) {
3397
- const t = _e(n, !1).get(e), i = await new Z(t).toPromise();
3529
+ async function ir(n, e) {
3530
+ const t = be(n, !1).get(e), i = await new ce(t).toPromise();
3398
3531
  return i === void 0 ? null : i.value;
3399
3532
  }
3400
- function rt(n, e) {
3401
- const t = _e(n, !0).delete(e);
3402
- return new Z(t).toPromise();
3533
+ function dt(n, e) {
3534
+ const t = be(n, !0).delete(e);
3535
+ return new ce(t).toPromise();
3403
3536
  }
3404
- const Ui = 800, Di = 3;
3405
- class Kt {
3537
+ const rr = 800, sr = 3;
3538
+ class nn {
3406
3539
  constructor() {
3407
3540
  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
3541
  }, () => {
3409
3542
  });
3410
3543
  }
3411
3544
  async _openDb() {
3412
- return this.db ? this.db : (this.db = await Pe(), this.db);
3545
+ return this.db ? this.db : (this.db = await Ue(), this.db);
3413
3546
  }
3414
3547
  async _withRetries(e) {
3415
3548
  let t = 0;
@@ -3418,7 +3551,7 @@ class Kt {
3418
3551
  const i = await this._openDb();
3419
3552
  return await e(i);
3420
3553
  } catch (i) {
3421
- if (t++ > Di)
3554
+ if (t++ > sr)
3422
3555
  throw i;
3423
3556
  this.db && (this.db.close(), this.db = void 0);
3424
3557
  }
@@ -3428,13 +3561,13 @@ class Kt {
3428
3561
  * postMessage interface to send these events to the worker ourselves.
3429
3562
  */
3430
3563
  async initializeServiceWorkerMessaging() {
3431
- return Bt() ? this.initializeReceiver() : this.initializeSender();
3564
+ return Zt() ? this.initializeReceiver() : this.initializeSender();
3432
3565
  }
3433
3566
  /**
3434
3567
  * As the worker we should listen to events from the main window.
3435
3568
  */
3436
3569
  async initializeReceiver() {
3437
- this.receiver = ge._getInstance(Oi()), this.receiver._subscribe("keyChanged", async (e, t) => ({
3570
+ this.receiver = Ee._getInstance(er()), this.receiver._subscribe("keyChanged", async (e, t) => ({
3438
3571
  keyProcessed: (await this._poll()).includes(t.key)
3439
3572
  })), this.receiver._subscribe("ping", async (e, t) => [
3440
3573
  "keyChanged"
@@ -3450,9 +3583,9 @@ class Kt {
3450
3583
  */
3451
3584
  async initializeSender() {
3452
3585
  var e, t;
3453
- if (this.activeServiceWorker = await Pi(), !this.activeServiceWorker)
3586
+ if (this.activeServiceWorker = await Qi(), !this.activeServiceWorker)
3454
3587
  return;
3455
- this.sender = new Ri(this.activeServiceWorker);
3588
+ this.sender = new Yi(this.activeServiceWorker);
3456
3589
  const i = await this.sender._send(
3457
3590
  "ping",
3458
3591
  {},
@@ -3474,7 +3607,7 @@ class Kt {
3474
3607
  * @param key - Storage key which changed.
3475
3608
  */
3476
3609
  async notifyServiceWorker(e) {
3477
- if (!(!this.sender || !this.activeServiceWorker || Ci() !== this.activeServiceWorker))
3610
+ if (!(!this.sender || !this.activeServiceWorker || Zi() !== this.activeServiceWorker))
3478
3611
  try {
3479
3612
  await this.sender._send(
3480
3613
  "keyChanged",
@@ -3490,8 +3623,8 @@ class Kt {
3490
3623
  try {
3491
3624
  if (!indexedDB)
3492
3625
  return !1;
3493
- const e = await Pe();
3494
- return await it(e, de, "1"), await rt(e, de), !0;
3626
+ const e = await Ue();
3627
+ return await ut(e, Ie, "1"), await dt(e, Ie), !0;
3495
3628
  } catch {
3496
3629
  }
3497
3630
  return !1;
@@ -3505,19 +3638,19 @@ class Kt {
3505
3638
  }
3506
3639
  }
3507
3640
  async _set(e, t) {
3508
- return this._withPendingWrite(async () => (await this._withRetries((i) => it(i, e, t)), this.localCache[e] = t, this.notifyServiceWorker(e)));
3641
+ return this._withPendingWrite(async () => (await this._withRetries((i) => ut(i, e, t)), this.localCache[e] = t, this.notifyServiceWorker(e)));
3509
3642
  }
3510
3643
  async _get(e) {
3511
- const t = await this._withRetries((i) => Mi(i, e));
3644
+ const t = await this._withRetries((i) => ir(i, e));
3512
3645
  return this.localCache[e] = t, t;
3513
3646
  }
3514
3647
  async _remove(e) {
3515
- return this._withPendingWrite(async () => (await this._withRetries((t) => rt(t, e)), delete this.localCache[e], this.notifyServiceWorker(e)));
3648
+ return this._withPendingWrite(async () => (await this._withRetries((t) => dt(t, e)), delete this.localCache[e], this.notifyServiceWorker(e)));
3516
3649
  }
3517
3650
  async _poll() {
3518
3651
  const e = await this._withRetries((r) => {
3519
- const s = _e(r, !1).getAll();
3520
- return new Z(s).toPromise();
3652
+ const s = be(r, !1).getAll();
3653
+ return new ce(s).toPromise();
3521
3654
  });
3522
3655
  if (!e)
3523
3656
  return [];
@@ -3539,7 +3672,7 @@ class Kt {
3539
3672
  r(t);
3540
3673
  }
3541
3674
  startPolling() {
3542
- this.stopPolling(), this.pollTimer = setInterval(async () => this._poll(), Ui);
3675
+ this.stopPolling(), this.pollTimer = setInterval(async () => this._poll(), rr);
3543
3676
  }
3544
3677
  stopPolling() {
3545
3678
  this.pollTimer && (clearInterval(this.pollTimer), this.pollTimer = null);
@@ -3551,9 +3684,9 @@ class Kt {
3551
3684
  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
3685
  }
3553
3686
  }
3554
- Kt.type = "LOCAL";
3555
- const Fi = Kt;
3556
- new X(3e4, 6e4);
3687
+ nn.type = "LOCAL";
3688
+ const or = nn;
3689
+ new oe(3e4, 6e4);
3557
3690
  /**
3558
3691
  * @license
3559
3692
  * Copyright 2021 Google LLC
@@ -3570,8 +3703,8 @@ new X(3e4, 6e4);
3570
3703
  * See the License for the specific language governing permissions and
3571
3704
  * limitations under the License.
3572
3705
  */
3573
- function xi(n, e) {
3574
- return e ? S(e) : (u(
3706
+ function ar(n, e) {
3707
+ return e ? N(e) : (u(
3575
3708
  n._popupRedirectResolver,
3576
3709
  n,
3577
3710
  "argument-error"
@@ -3594,7 +3727,7 @@ function xi(n, e) {
3594
3727
  * See the License for the specific language governing permissions and
3595
3728
  * limitations under the License.
3596
3729
  */
3597
- class Ve extends xt {
3730
+ class qe extends zt {
3598
3731
  constructor(e) {
3599
3732
  super(
3600
3733
  "custom",
@@ -3603,13 +3736,13 @@ class Ve extends xt {
3603
3736
  ), this.params = e;
3604
3737
  }
3605
3738
  _getIdTokenResponse(e) {
3606
- return W(e, this._buildIdpRequest());
3739
+ return q(e, this._buildIdpRequest());
3607
3740
  }
3608
3741
  _linkToIdToken(e, t) {
3609
- return W(e, this._buildIdpRequest(t));
3742
+ return q(e, this._buildIdpRequest(t));
3610
3743
  }
3611
3744
  _getReauthenticationResolver(e) {
3612
- return W(e, this._buildIdpRequest());
3745
+ return q(e, this._buildIdpRequest());
3613
3746
  }
3614
3747
  _buildIdpRequest(e) {
3615
3748
  const t = {
@@ -3624,26 +3757,26 @@ class Ve extends xt {
3624
3757
  return e && (t.idToken = e), t;
3625
3758
  }
3626
3759
  }
3627
- function Vi(n) {
3628
- return _i(n.auth, new Ve(n), n.bypassAuthState);
3760
+ function cr(n) {
3761
+ return $i(n.auth, new qe(n), n.bypassAuthState);
3629
3762
  }
3630
- function $i(n) {
3763
+ function lr(n) {
3631
3764
  const { auth: e, user: t } = n;
3632
3765
  return u(
3633
3766
  t,
3634
3767
  e,
3635
3768
  "internal-error"
3636
3769
  /* AuthErrorCode.INTERNAL_ERROR */
3637
- ), gi(t, new Ve(n), n.bypassAuthState);
3770
+ ), Vi(t, new qe(n), n.bypassAuthState);
3638
3771
  }
3639
- async function Hi(n) {
3772
+ async function ur(n) {
3640
3773
  const { auth: e, user: t } = n;
3641
3774
  return u(
3642
3775
  t,
3643
3776
  e,
3644
3777
  "internal-error"
3645
3778
  /* AuthErrorCode.INTERNAL_ERROR */
3646
- ), mi(t, new Ve(n), n.bypassAuthState);
3779
+ ), Fi(t, new qe(n), n.bypassAuthState);
3647
3780
  }
3648
3781
  /**
3649
3782
  * @license
@@ -3661,7 +3794,7 @@ async function Hi(n) {
3661
3794
  * See the License for the specific language governing permissions and
3662
3795
  * limitations under the License.
3663
3796
  */
3664
- class Jt {
3797
+ class rn {
3665
3798
  constructor(e, t, i, r, s = !1) {
3666
3799
  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
3800
  }
@@ -3703,15 +3836,15 @@ class Jt {
3703
3836
  switch (e) {
3704
3837
  case "signInViaPopup":
3705
3838
  case "signInViaRedirect":
3706
- return Vi;
3839
+ return cr;
3707
3840
  case "linkViaPopup":
3708
3841
  case "linkViaRedirect":
3709
- return Hi;
3842
+ return ur;
3710
3843
  case "reauthViaPopup":
3711
3844
  case "reauthViaRedirect":
3712
- return $i;
3845
+ return lr;
3713
3846
  default:
3714
- R(
3847
+ O(
3715
3848
  this.auth,
3716
3849
  "internal-error"
3717
3850
  /* AuthErrorCode.INTERNAL_ERROR */
@@ -3719,10 +3852,10 @@ class Jt {
3719
3852
  }
3720
3853
  }
3721
3854
  resolve(e) {
3722
- A(this.pendingPromise, "Pending promise was never set"), this.pendingPromise.resolve(e), this.unregisterAndCleanUp();
3855
+ L(this.pendingPromise, "Pending promise was never set"), this.pendingPromise.resolve(e), this.unregisterAndCleanUp();
3723
3856
  }
3724
3857
  reject(e) {
3725
- A(this.pendingPromise, "Pending promise was never set"), this.pendingPromise.reject(e), this.unregisterAndCleanUp();
3858
+ L(this.pendingPromise, "Pending promise was never set"), this.pendingPromise.reject(e), this.unregisterAndCleanUp();
3726
3859
  }
3727
3860
  unregisterAndCleanUp() {
3728
3861
  this.eventManager && this.eventManager.unregisterConsumer(this), this.pendingPromise = null, this.cleanUp();
@@ -3744,10 +3877,10 @@ class Jt {
3744
3877
  * See the License for the specific language governing permissions and
3745
3878
  * limitations under the License.
3746
3879
  */
3747
- const Wi = new X(2e3, 1e4);
3748
- class V extends Jt {
3880
+ const dr = new oe(2e3, 1e4);
3881
+ class B extends rn {
3749
3882
  constructor(e, t, i, r, s) {
3750
- super(e, t, r, s), this.provider = i, this.authWindow = null, this.pollId = null, V.currentPopupAction && V.currentPopupAction.cancel(), V.currentPopupAction = this;
3883
+ super(e, t, r, s), this.provider = i, this.authWindow = null, this.pollId = null, B.currentPopupAction && B.currentPopupAction.cancel(), B.currentPopupAction = this;
3751
3884
  }
3752
3885
  async executeNotNull() {
3753
3886
  const e = await this.execute();
@@ -3759,8 +3892,8 @@ class V extends Jt {
3759
3892
  ), e;
3760
3893
  }
3761
3894
  async onExecution() {
3762
- A(this.filter.length === 1, "Popup operations only handle one event");
3763
- const e = xe();
3895
+ L(this.filter.length === 1, "Popup operations only handle one event");
3896
+ const e = ze();
3764
3897
  this.authWindow = await this.resolver._openPopup(
3765
3898
  this.auth,
3766
3899
  this.provider,
@@ -3770,7 +3903,7 @@ class V extends Jt {
3770
3903
  ), this.authWindow.associatedEvent = e, this.resolver._originValidation(this.auth).catch((t) => {
3771
3904
  this.reject(t);
3772
3905
  }), this.resolver._isIframeWebStorageSupported(this.auth, (t) => {
3773
- t || this.reject(T(
3906
+ t || this.reject(E(
3774
3907
  this.auth,
3775
3908
  "web-storage-unsupported"
3776
3909
  /* AuthErrorCode.WEB_STORAGE_UNSUPPORTED */
@@ -3782,14 +3915,14 @@ class V extends Jt {
3782
3915
  return ((e = this.authWindow) === null || e === void 0 ? void 0 : e.associatedEvent) || null;
3783
3916
  }
3784
3917
  cancel() {
3785
- this.reject(T(
3918
+ this.reject(E(
3786
3919
  this.auth,
3787
3920
  "cancelled-popup-request"
3788
3921
  /* AuthErrorCode.EXPIRED_POPUP_REQUEST */
3789
3922
  ));
3790
3923
  }
3791
3924
  cleanUp() {
3792
- this.authWindow && this.authWindow.close(), this.pollId && window.clearTimeout(this.pollId), this.authWindow = null, this.pollId = null, V.currentPopupAction = null;
3925
+ this.authWindow && this.authWindow.close(), this.pollId && window.clearTimeout(this.pollId), this.authWindow = null, this.pollId = null, B.currentPopupAction = null;
3793
3926
  }
3794
3927
  pollUserCancellation() {
3795
3928
  const e = () => {
@@ -3797,7 +3930,7 @@ class V extends Jt {
3797
3930
  if (!((i = (t = this.authWindow) === null || t === void 0 ? void 0 : t.window) === null || i === void 0) && i.closed) {
3798
3931
  this.pollId = window.setTimeout(
3799
3932
  () => {
3800
- this.pollId = null, this.reject(T(
3933
+ this.pollId = null, this.reject(E(
3801
3934
  this.auth,
3802
3935
  "popup-closed-by-user"
3803
3936
  /* AuthErrorCode.POPUP_CLOSED_BY_USER */
@@ -3808,12 +3941,12 @@ class V extends Jt {
3808
3941
  );
3809
3942
  return;
3810
3943
  }
3811
- this.pollId = window.setTimeout(e, Wi.get());
3944
+ this.pollId = window.setTimeout(e, dr.get());
3812
3945
  };
3813
3946
  e();
3814
3947
  }
3815
3948
  }
3816
- V.currentPopupAction = null;
3949
+ B.currentPopupAction = null;
3817
3950
  /**
3818
3951
  * @license
3819
3952
  * Copyright 2020 Google LLC
@@ -3830,8 +3963,8 @@ V.currentPopupAction = null;
3830
3963
  * See the License for the specific language governing permissions and
3831
3964
  * limitations under the License.
3832
3965
  */
3833
- const ji = "pendingRedirect", oe = /* @__PURE__ */ new Map();
3834
- class Gi extends Jt {
3966
+ const hr = "pendingRedirect", he = /* @__PURE__ */ new Map();
3967
+ class fr extends rn {
3835
3968
  constructor(e, t, i = !1) {
3836
3969
  super(e, [
3837
3970
  "signInViaRedirect",
@@ -3846,17 +3979,17 @@ class Gi extends Jt {
3846
3979
  * just return it.
3847
3980
  */
3848
3981
  async execute() {
3849
- let e = oe.get(this.auth._key());
3982
+ let e = he.get(this.auth._key());
3850
3983
  if (!e) {
3851
3984
  try {
3852
- const i = await Bi(this.resolver, this.auth) ? await super.execute() : null;
3985
+ const i = await pr(this.resolver, this.auth) ? await super.execute() : null;
3853
3986
  e = () => Promise.resolve(i);
3854
3987
  } catch (t) {
3855
3988
  e = () => Promise.reject(t);
3856
3989
  }
3857
- oe.set(this.auth._key(), e);
3990
+ he.set(this.auth._key(), e);
3858
3991
  }
3859
- return this.bypassAuthState || oe.set(this.auth._key(), () => Promise.resolve(null)), e();
3992
+ return this.bypassAuthState || he.set(this.auth._key(), () => Promise.resolve(null)), e();
3860
3993
  }
3861
3994
  async onAuthEvent(e) {
3862
3995
  if (e.type === "signInViaRedirect")
@@ -3877,26 +4010,26 @@ class Gi extends Jt {
3877
4010
  cleanUp() {
3878
4011
  }
3879
4012
  }
3880
- async function Bi(n, e) {
3881
- const t = Ki(e), i = qi(n);
4013
+ async function pr(n, e) {
4014
+ const t = _r(e), i = gr(n);
3882
4015
  if (!await i._isAvailable())
3883
4016
  return !1;
3884
4017
  const r = await i._get(t) === "true";
3885
4018
  return await i._remove(t), r;
3886
4019
  }
3887
- function zi(n, e) {
3888
- oe.set(n._key(), e);
4020
+ function mr(n, e) {
4021
+ he.set(n._key(), e);
3889
4022
  }
3890
- function qi(n) {
3891
- return S(n._redirectPersistence);
4023
+ function gr(n) {
4024
+ return N(n._redirectPersistence);
3892
4025
  }
3893
- function Ki(n) {
3894
- return se(ji, n.config.apiKey, n.name);
4026
+ function _r(n) {
4027
+ return de(hr, n.config.apiKey, n.name);
3895
4028
  }
3896
- async function Ji(n, e, t = !1) {
3897
- if (E(n.app))
3898
- return Promise.reject(M(n));
3899
- const i = me(n), r = xi(i, e), o = await new Gi(i, r, t).execute();
4029
+ async function vr(n, e, t = !1) {
4030
+ if (A(n.app))
4031
+ return Promise.reject($(n));
4032
+ const i = ke(n), r = ar(i, e), o = await new fr(i, r, t).execute();
3900
4033
  return o && !t && (delete o.user._redirectEventId, await i._persistUserIfCurrent(o.user), await i._setRedirectUser(null, e)), o;
3901
4034
  }
3902
4035
  /**
@@ -3915,8 +4048,8 @@ async function Ji(n, e, t = !1) {
3915
4048
  * See the License for the specific language governing permissions and
3916
4049
  * limitations under the License.
3917
4050
  */
3918
- const Yi = 10 * 60 * 1e3;
3919
- class Xi {
4051
+ const Ir = 10 * 60 * 1e3;
4052
+ class yr {
3920
4053
  constructor(e) {
3921
4054
  this.auth = e, this.cachedEventUids = /* @__PURE__ */ new Set(), this.consumers = /* @__PURE__ */ new Set(), this.queuedRedirectEvent = null, this.hasHandledPotentialRedirect = !1, this.lastProcessedEventTime = Date.now();
3922
4055
  }
@@ -3932,13 +4065,13 @@ class Xi {
3932
4065
  let t = !1;
3933
4066
  return this.consumers.forEach((i) => {
3934
4067
  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;
4068
+ }), this.hasHandledPotentialRedirect || !wr(e) || (this.hasHandledPotentialRedirect = !0, t || (this.queuedRedirectEvent = e, t = !0)), t;
3936
4069
  }
3937
4070
  sendToConsumer(e, t) {
3938
4071
  var i;
3939
- if (e.error && !Yt(e)) {
4072
+ if (e.error && !sn(e)) {
3940
4073
  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));
4074
+ t.onError(E(this.auth, r));
3942
4075
  } else
3943
4076
  t.onAuthEvent(e);
3944
4077
  }
@@ -3947,26 +4080,26 @@ class Xi {
3947
4080
  return t.filter.includes(e.type) && i;
3948
4081
  }
3949
4082
  hasEventBeenHandled(e) {
3950
- return Date.now() - this.lastProcessedEventTime >= Yi && this.cachedEventUids.clear(), this.cachedEventUids.has(st(e));
4083
+ return Date.now() - this.lastProcessedEventTime >= Ir && this.cachedEventUids.clear(), this.cachedEventUids.has(ht(e));
3951
4084
  }
3952
4085
  saveEventToCache(e) {
3953
- this.cachedEventUids.add(st(e)), this.lastProcessedEventTime = Date.now();
4086
+ this.cachedEventUids.add(ht(e)), this.lastProcessedEventTime = Date.now();
3954
4087
  }
3955
4088
  }
3956
- function st(n) {
4089
+ function ht(n) {
3957
4090
  return [n.type, n.eventId, n.sessionId, n.tenantId].filter((e) => e).join("-");
3958
4091
  }
3959
- function Yt({ type: n, error: e }) {
4092
+ function sn({ type: n, error: e }) {
3960
4093
  return n === "unknown" && (e == null ? void 0 : e.code) === "auth/no-auth-event";
3961
4094
  }
3962
- function Qi(n) {
4095
+ function wr(n) {
3963
4096
  switch (n.type) {
3964
4097
  case "signInViaRedirect":
3965
4098
  case "linkViaRedirect":
3966
4099
  case "reauthViaRedirect":
3967
4100
  return !0;
3968
4101
  case "unknown":
3969
- return Yt(n);
4102
+ return sn(n);
3970
4103
  default:
3971
4104
  return !1;
3972
4105
  }
@@ -3987,8 +4120,8 @@ function Qi(n) {
3987
4120
  * See the License for the specific language governing permissions and
3988
4121
  * limitations under the License.
3989
4122
  */
3990
- async function Zi(n, e = {}) {
3991
- return G(n, "GET", "/v1/projects", e);
4123
+ async function Tr(n, e = {}) {
4124
+ return J(n, "GET", "/v1/projects", e);
3992
4125
  }
3993
4126
  /**
3994
4127
  * @license
@@ -4006,32 +4139,32 @@ async function Zi(n, e = {}) {
4006
4139
  * See the License for the specific language governing permissions and
4007
4140
  * limitations under the License.
4008
4141
  */
4009
- const er = /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/, tr = /^https?/;
4010
- async function nr(n) {
4142
+ const kr = /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/, Er = /^https?/;
4143
+ async function br(n) {
4011
4144
  if (n.config.emulator)
4012
4145
  return;
4013
- const { authorizedDomains: e } = await Zi(n);
4146
+ const { authorizedDomains: e } = await Tr(n);
4014
4147
  for (const t of e)
4015
4148
  try {
4016
- if (ir(t))
4149
+ if (Sr(t))
4017
4150
  return;
4018
4151
  } catch {
4019
4152
  }
4020
- R(
4153
+ O(
4021
4154
  n,
4022
4155
  "unauthorized-domain"
4023
4156
  /* AuthErrorCode.INVALID_ORIGIN */
4024
4157
  );
4025
4158
  }
4026
- function ir(n) {
4027
- const e = Re(), { protocol: t, hostname: i } = new URL(e);
4159
+ function Sr(n) {
4160
+ const e = Le(), { protocol: t, hostname: i } = new URL(e);
4028
4161
  if (n.startsWith("chrome-extension://")) {
4029
4162
  const o = new URL(n);
4030
4163
  return o.hostname === "" && i === "" ? t === "chrome-extension:" && n.replace("chrome-extension://", "") === e.replace("chrome-extension://", "") : t === "chrome-extension:" && o.hostname === i;
4031
4164
  }
4032
- if (!tr.test(t))
4165
+ if (!Er.test(t))
4033
4166
  return !1;
4034
- if (er.test(n))
4167
+ if (kr.test(n))
4035
4168
  return i === n;
4036
4169
  const r = n.replace(/\./g, "\\.");
4037
4170
  return new RegExp("^(.+\\." + r + "|" + r + ")$", "i").test(i);
@@ -4052,9 +4185,9 @@ function ir(n) {
4052
4185
  * See the License for the specific language governing permissions and
4053
4186
  * limitations under the License.
4054
4187
  */
4055
- const rr = new X(3e4, 6e4);
4056
- function ot() {
4057
- const n = y().___jsl;
4188
+ const Rr = new oe(3e4, 6e4);
4189
+ function ft() {
4190
+ const n = b().___jsl;
4058
4191
  if (n != null && n.H) {
4059
4192
  for (const e of Object.keys(n.H))
4060
4193
  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 +4195,45 @@ function ot() {
4062
4195
  n.CP[t] = null;
4063
4196
  }
4064
4197
  }
4065
- function sr(n) {
4198
+ function Ar(n) {
4066
4199
  return new Promise((e, t) => {
4067
4200
  var i, r, s;
4068
4201
  function o() {
4069
- ot(), gapi.load("gapi.iframes", {
4202
+ ft(), gapi.load("gapi.iframes", {
4070
4203
  callback: () => {
4071
4204
  e(gapi.iframes.getContext());
4072
4205
  },
4073
4206
  ontimeout: () => {
4074
- ot(), t(T(
4207
+ ft(), t(E(
4075
4208
  n,
4076
4209
  "network-request-failed"
4077
4210
  /* AuthErrorCode.NETWORK_REQUEST_FAILED */
4078
4211
  ));
4079
4212
  },
4080
- timeout: rr.get()
4213
+ timeout: Rr.get()
4081
4214
  });
4082
4215
  }
4083
- if (!((r = (i = y().gapi) === null || i === void 0 ? void 0 : i.iframes) === null || r === void 0) && r.Iframe)
4216
+ if (!((r = (i = b().gapi) === null || i === void 0 ? void 0 : i.iframes) === null || r === void 0) && r.Iframe)
4084
4217
  e(gapi.iframes.getContext());
4085
- else if (!((s = y().gapi) === null || s === void 0) && s.load)
4218
+ else if (!((s = b().gapi) === null || s === void 0) && s.load)
4086
4219
  o();
4087
4220
  else {
4088
- const c = ci("iframefcb");
4089
- return y()[c] = () => {
4090
- gapi.load ? o() : t(T(
4221
+ const c = Ni("iframefcb");
4222
+ return b()[c] = () => {
4223
+ gapi.load ? o() : t(E(
4091
4224
  n,
4092
4225
  "network-request-failed"
4093
4226
  /* AuthErrorCode.NETWORK_REQUEST_FAILED */
4094
4227
  ));
4095
- }, oi(`${ai()}?onload=${c}`).catch((a) => t(a));
4228
+ }, Pi(`${Ci()}?onload=${c}`).catch((a) => t(a));
4096
4229
  }
4097
4230
  }).catch((e) => {
4098
- throw ae = null, e;
4231
+ throw fe = null, e;
4099
4232
  });
4100
4233
  }
4101
- let ae = null;
4102
- function or(n) {
4103
- return ae = ae || sr(n), ae;
4234
+ let fe = null;
4235
+ function Pr(n) {
4236
+ return fe = fe || Ar(n), fe;
4104
4237
  }
4105
4238
  /**
4106
4239
  * @license
@@ -4118,7 +4251,7 @@ function or(n) {
4118
4251
  * See the License for the specific language governing permissions and
4119
4252
  * limitations under the License.
4120
4253
  */
4121
- const ar = new X(5e3, 15e3), cr = "__/auth/iframe", lr = "emulator/auth/iframe", ur = {
4254
+ const Cr = new oe(5e3, 15e3), Nr = "__/auth/iframe", Or = "emulator/auth/iframe", Lr = {
4122
4255
  style: {
4123
4256
  position: "absolute",
4124
4257
  top: "-100px",
@@ -4127,13 +4260,13 @@ const ar = new X(5e3, 15e3), cr = "__/auth/iframe", lr = "emulator/auth/iframe",
4127
4260
  },
4128
4261
  "aria-hidden": "true",
4129
4262
  tabindex: "-1"
4130
- }, dr = /* @__PURE__ */ new Map([
4263
+ }, Mr = /* @__PURE__ */ new Map([
4131
4264
  ["identitytoolkit.googleapis.com", "p"],
4132
4265
  ["staging-identitytoolkit.sandbox.googleapis.com", "s"],
4133
4266
  ["test-identitytoolkit.sandbox.googleapis.com", "t"]
4134
4267
  // test
4135
4268
  ]);
4136
- function hr(n) {
4269
+ function Ur(n) {
4137
4270
  const e = n.config;
4138
4271
  u(
4139
4272
  e.authDomain,
@@ -4141,17 +4274,17 @@ function hr(n) {
4141
4274
  "auth-domain-config-required"
4142
4275
  /* AuthErrorCode.MISSING_AUTH_DOMAIN */
4143
4276
  );
4144
- const t = e.emulator ? Me(e, lr) : `https://${n.config.authDomain}/${cr}`, i = {
4277
+ const t = e.emulator ? je(e, Or) : `https://${n.config.authDomain}/${Nr}`, i = {
4145
4278
  apiKey: e.apiKey,
4146
4279
  appName: n.name,
4147
- v: J
4148
- }, r = dr.get(n.config.apiHost);
4280
+ v: re
4281
+ }, r = Mr.get(n.config.apiHost);
4149
4282
  r && (i.eid = r);
4150
4283
  const s = n._getFrameworks();
4151
- return s.length && (i.fw = s.join(",")), `${t}?${Y(i).slice(1)}`;
4284
+ return s.length && (i.fw = s.join(",")), `${t}?${se(i).slice(1)}`;
4152
4285
  }
4153
- async function fr(n) {
4154
- const e = await or(n), t = y().gapi;
4286
+ async function Dr(n) {
4287
+ const e = await Pr(n), t = b().gapi;
4155
4288
  return u(
4156
4289
  t,
4157
4290
  n,
@@ -4159,24 +4292,24 @@ async function fr(n) {
4159
4292
  /* AuthErrorCode.INTERNAL_ERROR */
4160
4293
  ), e.open({
4161
4294
  where: document.body,
4162
- url: hr(n),
4295
+ url: Ur(n),
4163
4296
  messageHandlersFilter: t.iframes.CROSS_ORIGIN_IFRAMES_FILTER,
4164
- attributes: ur,
4297
+ attributes: Lr,
4165
4298
  dontclear: !0
4166
4299
  }, (i) => new Promise(async (r, s) => {
4167
4300
  await i.restyle({
4168
4301
  // Prevent iframe from closing on mouse out.
4169
4302
  setHideOnLeave: !1
4170
4303
  });
4171
- const o = T(
4304
+ const o = E(
4172
4305
  n,
4173
4306
  "network-request-failed"
4174
4307
  /* AuthErrorCode.NETWORK_REQUEST_FAILED */
4175
- ), c = y().setTimeout(() => {
4308
+ ), c = b().setTimeout(() => {
4176
4309
  s(o);
4177
- }, ar.get());
4310
+ }, Cr.get());
4178
4311
  function a() {
4179
- y().clearTimeout(c), r(i);
4312
+ b().clearTimeout(c), r(i);
4180
4313
  }
4181
4314
  i.ping(a).then(a, () => {
4182
4315
  s(o);
@@ -4199,13 +4332,13 @@ async function fr(n) {
4199
4332
  * See the License for the specific language governing permissions and
4200
4333
  * limitations under the License.
4201
4334
  */
4202
- const pr = {
4335
+ const xr = {
4203
4336
  location: "yes",
4204
4337
  resizable: "yes",
4205
4338
  statusbar: "yes",
4206
4339
  toolbar: "no"
4207
- }, mr = 500, gr = 600, _r = "_blank", vr = "http://localhost";
4208
- class at {
4340
+ }, Fr = 500, Vr = 600, $r = "_blank", Hr = "http://localhost";
4341
+ class pt {
4209
4342
  constructor(e) {
4210
4343
  this.window = e, this.associatedEvent = null;
4211
4344
  }
@@ -4217,19 +4350,19 @@ class at {
4217
4350
  }
4218
4351
  }
4219
4352
  }
4220
- function Ir(n, e, t, i = mr, r = gr) {
4353
+ function jr(n, e, t, i = Fr, r = Vr) {
4221
4354
  const s = Math.max((window.screen.availHeight - r) / 2, 0).toString(), o = Math.max((window.screen.availWidth - i) / 2, 0).toString();
4222
4355
  let c = "";
4223
- const a = Object.assign(Object.assign({}, pr), {
4356
+ const a = Object.assign(Object.assign({}, xr), {
4224
4357
  width: i.toString(),
4225
4358
  height: r.toString(),
4226
4359
  top: s,
4227
4360
  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);
4361
+ }), l = y().toLowerCase();
4362
+ t && (c = Ft(l) ? $r : t), xt(l) && (e = e || Hr, a.scrollbars = "yes");
4363
+ const d = Object.entries(a).reduce((m, [I, w]) => `${m}${I}=${w},`, "");
4364
+ if (yi(l) && c !== "_self")
4365
+ return Wr(e || "", c), new pt(null);
4233
4366
  const h = window.open(e || "", c, d);
4234
4367
  u(
4235
4368
  h,
@@ -4241,9 +4374,9 @@ function Ir(n, e, t, i = mr, r = gr) {
4241
4374
  h.focus();
4242
4375
  } catch {
4243
4376
  }
4244
- return new at(h);
4377
+ return new pt(h);
4245
4378
  }
4246
- function Tr(n, e) {
4379
+ function Wr(n, e) {
4247
4380
  const t = document.createElement("a");
4248
4381
  t.href = n, t.target = e;
4249
4382
  const i = document.createEvent("MouseEvent");
@@ -4265,8 +4398,8 @@ function Tr(n, e) {
4265
4398
  * See the License for the specific language governing permissions and
4266
4399
  * limitations under the License.
4267
4400
  */
4268
- const yr = "__/auth/handler", wr = "emulator/auth/handler", Er = encodeURIComponent("fac");
4269
- async function ct(n, e, t, i, r, s) {
4401
+ const Br = "__/auth/handler", Gr = "emulator/auth/handler", zr = encodeURIComponent("fac");
4402
+ async function mt(n, e, t, i, r, s) {
4270
4403
  u(
4271
4404
  n.config.authDomain,
4272
4405
  n,
@@ -4283,15 +4416,15 @@ async function ct(n, e, t, i, r, s) {
4283
4416
  appName: n.name,
4284
4417
  authType: t,
4285
4418
  redirectUrl: i,
4286
- v: J,
4419
+ v: re,
4287
4420
  eventId: r
4288
4421
  };
4289
- if (e instanceof Vt) {
4290
- e.setDefaultLanguage(n.languageCode), o.providerId = e.providerId || "", bn(e.getCustomParameters()) || (o.customParameters = JSON.stringify(e.getCustomParameters()));
4422
+ if (e instanceof qt) {
4423
+ e.setDefaultLanguage(n.languageCode), o.providerId = e.providerId || "", Cn(e.getCustomParameters()) || (o.customParameters = JSON.stringify(e.getCustomParameters()));
4291
4424
  for (const [d, h] of Object.entries({}))
4292
4425
  o[d] = h;
4293
4426
  }
4294
- if (e instanceof Q) {
4427
+ if (e instanceof ae) {
4295
4428
  const d = e.getScopes().filter((h) => h !== "");
4296
4429
  d.length > 0 && (o.scopes = d.join(","));
4297
4430
  }
@@ -4299,11 +4432,11 @@ async function ct(n, e, t, i, r, s) {
4299
4432
  const c = o;
4300
4433
  for (const d of Object.keys(c))
4301
4434
  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}`;
4435
+ const a = await n._getAppCheckToken(), l = a ? `#${zr}=${encodeURIComponent(a)}` : "";
4436
+ return `${qr(n)}?${se(c).slice(1)}${l}`;
4304
4437
  }
4305
- function kr({ config: n }) {
4306
- return n.emulator ? Me(n, wr) : `https://${n.authDomain}/${yr}`;
4438
+ function qr({ config: n }) {
4439
+ return n.emulator ? je(n, Gr) : `https://${n.authDomain}/${Br}`;
4307
4440
  }
4308
4441
  /**
4309
4442
  * @license
@@ -4321,30 +4454,30 @@ function kr({ config: n }) {
4321
4454
  * See the License for the specific language governing permissions and
4322
4455
  * limitations under the License.
4323
4456
  */
4324
- const we = "webStorageSupport";
4325
- class br {
4457
+ const Ce = "webStorageSupport";
4458
+ class Kr {
4326
4459
  constructor() {
4327
- this.eventManagers = {}, this.iframes = {}, this.originValidationPromises = {}, this._redirectPersistence = Gt, this._completeRedirectFn = Ji, this._overrideRedirectResult = zi;
4460
+ this.eventManagers = {}, this.iframes = {}, this.originValidationPromises = {}, this._redirectPersistence = Qt, this._completeRedirectFn = vr, this._overrideRedirectResult = mr;
4328
4461
  }
4329
4462
  // Wrapping in async even though we don't await anywhere in order
4330
4463
  // to make sure errors are raised as promise rejections
4331
4464
  async _openPopup(e, t, i, r) {
4332
4465
  var s;
4333
- 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());
4466
+ L((s = this.eventManagers[e._key()]) === null || s === void 0 ? void 0 : s.manager, "_initialize() not called before _openPopup()");
4467
+ const o = await mt(e, t, i, Le(), r);
4468
+ return jr(e, o, ze());
4336
4469
  }
4337
4470
  async _openRedirect(e, t, i, r) {
4338
4471
  await this._originValidation(e);
4339
- const s = await ct(e, t, i, Re(), r);
4340
- return Ai(s), new Promise(() => {
4472
+ const s = await mt(e, t, i, Le(), r);
4473
+ return Xi(s), new Promise(() => {
4341
4474
  });
4342
4475
  }
4343
4476
  _initialize(e) {
4344
4477
  const t = e._key();
4345
4478
  if (this.eventManagers[t]) {
4346
4479
  const { manager: r, promise: s } = this.eventManagers[t];
4347
- return r ? Promise.resolve(r) : (A(s, "If manager is not set, promise should be"), s);
4480
+ return r ? Promise.resolve(r) : (L(s, "If manager is not set, promise should be"), s);
4348
4481
  }
4349
4482
  const i = this.initAndGetManager(e);
4350
4483
  return this.eventManagers[t] = { promise: i }, i.catch(() => {
@@ -4352,7 +4485,7 @@ class br {
4352
4485
  }), i;
4353
4486
  }
4354
4487
  async initAndGetManager(e) {
4355
- const t = await fr(e), i = new Xi(e);
4488
+ const t = await Dr(e), i = new yr(e);
4356
4489
  return t.register("authEvent", (r) => (u(
4357
4490
  r == null ? void 0 : r.authEvent,
4358
4491
  e,
@@ -4364,10 +4497,10 @@ class br {
4364
4497
  }), gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER), this.eventManagers[e._key()] = { manager: i }, this.iframes[e._key()] = t, i;
4365
4498
  }
4366
4499
  _isIframeWebStorageSupported(e, t) {
4367
- this.iframes[e._key()].send(we, { type: we }, (r) => {
4500
+ this.iframes[e._key()].send(Ce, { type: Ce }, (r) => {
4368
4501
  var s;
4369
- const o = (s = r == null ? void 0 : r[0]) === null || s === void 0 ? void 0 : s[we];
4370
- o !== void 0 && t(!!o), R(
4502
+ const o = (s = r == null ? void 0 : r[0]) === null || s === void 0 ? void 0 : s[Ce];
4503
+ o !== void 0 && t(!!o), O(
4371
4504
  e,
4372
4505
  "internal-error"
4373
4506
  /* AuthErrorCode.INTERNAL_ERROR */
@@ -4376,14 +4509,14 @@ class br {
4376
4509
  }
4377
4510
  _originValidation(e) {
4378
4511
  const t = e._key();
4379
- return this.originValidationPromises[t] || (this.originValidationPromises[t] = nr(e)), this.originValidationPromises[t];
4512
+ return this.originValidationPromises[t] || (this.originValidationPromises[t] = br(e)), this.originValidationPromises[t];
4380
4513
  }
4381
4514
  get _shouldInitProactively() {
4382
- return Ut() || De() || pe();
4515
+ return Wt() || Be() || Te();
4383
4516
  }
4384
4517
  }
4385
- const Sr = br;
4386
- var lt = "@firebase/auth", ut = "1.7.5";
4518
+ const Jr = Kr;
4519
+ var gt = "@firebase/auth", _t = "1.7.5";
4387
4520
  /**
4388
4521
  * @license
4389
4522
  * Copyright 2020 Google LLC
@@ -4400,7 +4533,7 @@ var lt = "@firebase/auth", ut = "1.7.5";
4400
4533
  * See the License for the specific language governing permissions and
4401
4534
  * limitations under the License.
4402
4535
  */
4403
- class Rr {
4536
+ class Yr {
4404
4537
  constructor(e) {
4405
4538
  this.auth = e, this.internalListeners = /* @__PURE__ */ new Map();
4406
4539
  }
@@ -4451,7 +4584,7 @@ class Rr {
4451
4584
  * See the License for the specific language governing permissions and
4452
4585
  * limitations under the License.
4453
4586
  */
4454
- function Ar(n) {
4587
+ function Xr(n) {
4455
4588
  switch (n) {
4456
4589
  case "Node":
4457
4590
  return "node";
@@ -4467,8 +4600,8 @@ function Ar(n) {
4467
4600
  return;
4468
4601
  }
4469
4602
  }
4470
- function Pr(n) {
4471
- ze(new qe(
4603
+ function Qr(n) {
4604
+ Ze(new et(
4472
4605
  "auth",
4473
4606
  (e, { options: t }) => {
4474
4607
  const i = e.getProvider("app").getImmediate(), r = e.getProvider("heartbeat"), s = e.getProvider("app-check-internal"), { apiKey: o, authDomain: c } = i.options;
@@ -4480,9 +4613,9 @@ function Pr(n) {
4480
4613
  apiHost: "identitytoolkit.googleapis.com",
4481
4614
  tokenApiHost: "securetoken.googleapis.com",
4482
4615
  apiScheme: "https",
4483
- sdkClientVersion: Dt(n)
4484
- }, l = new ri(i, r, s, a);
4485
- return ui(l, t), l;
4616
+ sdkClientVersion: Bt(n)
4617
+ }, l = new Ri(i, r, s, a);
4618
+ return Li(l, t), l;
4486
4619
  },
4487
4620
  "PUBLIC"
4488
4621
  /* ComponentType.PUBLIC */
@@ -4494,21 +4627,21 @@ function Pr(n) {
4494
4627
  "auth-internal"
4495
4628
  /* _ComponentName.AUTH_INTERNAL */
4496
4629
  ).initialize();
4497
- })), ze(new qe(
4630
+ })), Ze(new et(
4498
4631
  "auth-internal",
4499
4632
  (e) => {
4500
- const t = me(e.getProvider(
4633
+ const t = ke(e.getProvider(
4501
4634
  "auth"
4502
4635
  /* _ComponentName.AUTH */
4503
4636
  ).getImmediate());
4504
- return ((i) => new Rr(i))(t);
4637
+ return ((i) => new Yr(i))(t);
4505
4638
  },
4506
4639
  "PRIVATE"
4507
4640
  /* ComponentType.PRIVATE */
4508
4641
  ).setInstantiationMode(
4509
4642
  "EXPLICIT"
4510
4643
  /* InstantiationMode.EXPLICIT */
4511
- )), Se(lt, ut, Ar(n)), Se(lt, ut, "esm2017");
4644
+ )), Oe(gt, _t, Xr(n)), Oe(gt, _t, "esm2017");
4512
4645
  }
4513
4646
  /**
4514
4647
  * @license
@@ -4526,117 +4659,118 @@ function Pr(n) {
4526
4659
  * See the License for the specific language governing permissions and
4527
4660
  * limitations under the License.
4528
4661
  */
4529
- const Cr = 5 * 60, Or = gt("authIdTokenMaxAge") || Cr;
4530
- let dt = null;
4531
- const Nr = (n) => async (e) => {
4662
+ const Zr = 5 * 60, es = kt("authIdTokenMaxAge") || Zr;
4663
+ let vt = null;
4664
+ const ts = (n) => async (e) => {
4532
4665
  const t = e && await e.getIdTokenResult(), i = t && ((/* @__PURE__ */ new Date()).getTime() - Date.parse(t.issuedAtTime)) / 1e3;
4533
- if (i && i > Or)
4666
+ if (i && i > es)
4534
4667
  return;
4535
4668
  const r = t == null ? void 0 : t.token;
4536
- dt !== r && (dt = r, await fetch(n, {
4669
+ vt !== r && (vt = r, await fetch(n, {
4537
4670
  method: r ? "POST" : "DELETE",
4538
4671
  headers: r ? {
4539
4672
  Authorization: `Bearer ${r}`
4540
4673
  } : {}
4541
4674
  }));
4542
4675
  };
4543
- function Lr(n = yn()) {
4544
- const e = _t(n, "auth");
4676
+ function ns(n = Sn()) {
4677
+ const e = Et(n, "auth");
4545
4678
  if (e.isInitialized())
4546
4679
  return e.getImmediate();
4547
- const t = li(n, {
4548
- popupRedirectResolver: Sr,
4680
+ const t = Oi(n, {
4681
+ popupRedirectResolver: Jr,
4549
4682
  persistence: [
4550
- Fi,
4551
- bi,
4552
- Gt
4683
+ or,
4684
+ Ki,
4685
+ Qt
4553
4686
  ]
4554
- }), i = gt("authTokenSyncURL");
4687
+ }), i = kt("authTokenSyncURL");
4555
4688
  if (i && typeof isSecureContext == "boolean" && isSecureContext) {
4556
4689
  const s = new URL(i, location.origin);
4557
4690
  if (location.origin === s.origin) {
4558
- const o = Nr(s.toString());
4559
- yi(t, o, () => o(t.currentUser)), Ti(t, (c) => o(c));
4691
+ const o = ts(s.toString());
4692
+ Bi(t, o, () => o(t.currentUser)), Wi(t, (c) => o(c));
4560
4693
  }
4561
4694
  }
4562
- const r = Tn("auth");
4563
- return r && di(t, `http://${r}`), t;
4695
+ const r = bn("auth");
4696
+ return r && Mi(t, `http://${r}`), t;
4564
4697
  }
4565
- function Mr() {
4698
+ function is() {
4566
4699
  var n, e;
4567
4700
  return (e = (n = document.getElementsByTagName("head")) === null || n === void 0 ? void 0 : n[0]) !== null && e !== void 0 ? e : document;
4568
4701
  }
4569
- si({
4702
+ Ai({
4570
4703
  loadJS(n) {
4571
4704
  return new Promise((e, t) => {
4572
4705
  const i = document.createElement("script");
4573
4706
  i.setAttribute("src", n), i.onload = e, i.onerror = (r) => {
4574
- const s = T(
4707
+ const s = E(
4575
4708
  "internal-error"
4576
4709
  /* AuthErrorCode.INTERNAL_ERROR */
4577
4710
  );
4578
4711
  s.customData = r, t(s);
4579
- }, i.type = "text/javascript", i.charset = "UTF-8", Mr().appendChild(i);
4712
+ }, i.type = "text/javascript", i.charset = "UTF-8", is().appendChild(i);
4580
4713
  });
4581
4714
  },
4582
4715
  gapiScript: "https://apis.google.com/js/api.js",
4583
4716
  recaptchaV2Script: "https://www.google.com/recaptcha/api.js",
4584
4717
  recaptchaEnterpriseScript: "https://www.google.com/recaptcha/enterprise.js?render="
4585
4718
  });
4586
- Pr(
4719
+ Qr(
4587
4720
  "Browser"
4588
4721
  /* ClientPlatform.BROWSER */
4589
4722
  );
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
- key: 1,
4723
+ var rs = { firebase: { apiKey: "AIzaSyA_isPR1-9bX7UmRiJIhsIRNNwdn6DdmW4", authDomain: "feedme-253402.firebaseapp.com", databaseURL: "https://feedme-253402.firebaseio.com", projectId: "feedme-253402", storageBucket: "image.feedme.cc", messagingSenderId: "128512026847", appId: "1:128512026847:web:7c5c8ab7e8b90502dc616a", measurementId: "G-LTKS7N2HQS" }, assetBucketUrl: "static.feedme.cc", importFilesBucketUrl: "feedme-253402.appspot.com", clientId: "d5f8840d63dbb758b6c4ee2a5e8b013d15dd25e242c457481326062b83962476" }, ss = { authUrl: "https://portal-v2.feedmeapi.com/", slackWebhookUrl: "https://hooks.slack.com/services/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", appUrl: "member.feedme.cc", crmUrl: "crm.feedme.cc", paymentPortalUrl: "https://portal.feedme.cc/payment/payout-account", licensePortalUrl: "https://license.feedme.cc/", marketingV1Portal: "https://marketing-v1.feedme.cc", voucherAppUrl: "https://voucher.feedme.cc/" };
4724
+ const os = {
4725
+ key: 2,
4593
4726
  class: "h-full w-full"
4594
- }, xr = ["src"], Zr = /* @__PURE__ */ ht({
4727
+ }, as = ["src"], Ts = /* @__PURE__ */ De({
4595
4728
  __name: "App",
4596
4729
  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}`;
4730
+ const e = me(), t = fn(), i = pn(), r = mn(), s = gn(), o = wt(), c = ee(o.query.showHeader !== "false"), a = ee(!1), { currentBusiness: l } = me(), d = ee(!1), h = ne(() => i.version), m = ne(() => {
4731
+ const g = e.currentCountry.value || "MY", v = tt.getIdToken(), T = l.value._id;
4732
+ return `${ss.marketingV1Portal}/b/${T}/marketing/overview?showHeader=false&country=${g}&token=${v}`;
4600
4733
  });
4601
- async function w() {
4602
- if (Sn().length) {
4734
+ async function I() {
4735
+ if (Nn().length) {
4603
4736
  console.warn("CONNECT: initFirebase: Firebase already initialized");
4604
4737
  return;
4605
4738
  }
4606
- const m = Rn(Ur.firebase), g = await an.getCustomToken(), I = Lr();
4607
- await Ii(I, g), An(m), console.log("initFirebase", m);
4739
+ const g = On(rs.firebase), v = await hn.getCustomToken(), T = ns();
4740
+ await ji(T, v), Ln(g), console.log("initFirebase", g);
4608
4741
  }
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;
4742
+ const w = async () => {
4743
+ d.value = !1, await un(), console.log("forceRerender"), tt.setBusinessId(l.value._id), await i.readPremium(), !a.value && h.value === "v2" ? e.registerSidebarComponent(xn) : e.hideSidebarToggle(!0), await I(), a.value = !0, d.value = !0;
4611
4744
  };
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);
4745
+ return ln(() => {
4746
+ if (Mn.Config.setCountry(e.currentCountry.value || "MY"), t.initProvider(r, s), !c.value) {
4747
+ const g = document.getElementsByClassName("app-header")[0], v = document.getElementsByClassName("app-sidebar")[0], T = document.getElementsByClassName("app-container")[0], M = document.getElementsByTagName("main")[0];
4748
+ g == null || g.classList.add("!hidden"), v == null || v.classList.add("!pt-0"), T == null || T.classList.add("!pt-0"), M == null || M.classList.add("!pt-0"), e.hideSidebarToggle(!0);
4616
4749
  }
4617
- l.value != null && (console.log("App mounted, forceRerender"), U());
4618
- }), ft(
4750
+ l.value != null && (console.log("App mounted, forceRerender"), w());
4751
+ }), xe(
4619
4752
  () => e.currentBusiness.value,
4620
- async (m, g) => {
4621
- console.log("Current business changed"), m != null && m._id != g._id && (console.log("forceRerender when business changes", m, g), U());
4753
+ async (g, v) => {
4754
+ console.log("Current business changed"), g != null && g._id != v._id && (console.log("forceRerender when business changes", g, v), w());
4622
4755
  }
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) }
4756
+ ), (g, v) => (H(), pe(It, null, [
4757
+ p(d) && p(h) === "v2" ? (H(), Ne(p(dn), { key: 0 })) : Ae("", !0),
4758
+ p(d) && p(h) === "v2" && p(c) ? (H(), Ne(ti, { key: 1 })) : Ae("", !0),
4759
+ p(d) && p(h) !== "v2" ? (H(), pe("div", os, [
4760
+ S(In, {
4761
+ json: { url: p(m) }
4628
4762
  }, null, 8, ["json"]),
4629
- ie("iframe", {
4763
+ _("iframe", {
4630
4764
  allow: "clipboard-read; clipboard-write",
4631
4765
  frameBorder: "0",
4632
4766
  height: "100%",
4633
4767
  width: "100%",
4634
- src: v(p)
4635
- }, null, 8, xr)
4636
- ])) : Ge("", !0)
4768
+ src: p(m)
4769
+ }, null, 8, as)
4770
+ ])) : Ae("", !0)
4637
4771
  ], 64));
4638
4772
  }
4639
4773
  });
4640
4774
  export {
4641
- Zr as default
4775
+ Ts as default
4642
4776
  };