@feedmepos/mf-connect 0.1.0-beta.5 → 0.1.0-beta.51

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 (112) hide show
  1. package/dist/Analytic-DP8oPOug.js +427 -0
  2. package/dist/{App-C8Qfnkhz.js → App-DSFvQRnz.js} +441 -420
  3. package/dist/AuditLogs-YSw2xsZw.js +1885 -0
  4. package/dist/Bin-Da_eermT.js +166 -0
  5. package/dist/{Broadcast-BK-1MQkL.js → Broadcast-DoNlWo4j.js} +13 -12
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BLzpFQoc.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DItda2cA.js} +6 -8
  7. package/dist/Card-CbxtYecE.js +896 -0
  8. package/dist/{Collections-TA4iW1r0.js → Collections-p1UhWf85.js} +27 -31
  9. package/dist/{Credit-Df9iFQjZ.js → Credit-DQta1iUA.js} +17 -16
  10. package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-DLnvDVgf.js +108 -0
  11. package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-CLFeMi0j.js +169 -0
  12. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-CEWFRlr3.js +2181 -0
  13. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-BCRVyPwl.js → EffectSheet.vue_vue_type_style_index_0_lang-BN5MFZTx.js} +6 -6
  14. package/dist/{Experience-ByLFXKn6.js → Experience-BnwKk_PO.js} +26 -25
  15. package/dist/{Game-B6Ez0pfW.js → Game-_4Hj3Yyt.js} +21 -20
  16. package/dist/Index-Bmz1R6hW.js +259 -0
  17. package/dist/Marketing-D0V260mx.js +20071 -0
  18. package/dist/{Member-TobP1ISp.js → Member-BIEihOp5.js} +4 -4
  19. package/dist/MemberList-C4EbD7jO.js +1598 -0
  20. package/dist/MemberTransactions-DvYurEaZ.js +45 -0
  21. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-CZ-w6iZi.js → MessageInput.vue_vue_type_script_setup_true_lang-vGMke4sb.js} +6 -6
  22. package/dist/{Mission-D9uTVo0G.js → Mission-C6gKiY9l.js} +97 -84
  23. package/dist/Overview-xqu1_7-7.js +1078 -0
  24. package/dist/{Point-4rDr-53e.js → Point-C02Z0_w5.js} +26 -25
  25. package/dist/{Promotion-BKO_dtQk.js → Promotion-BBfa32MT.js} +55 -48
  26. package/dist/Record-Bcj2D0fP.js +340 -0
  27. package/dist/Reward-BMvRwWnr.js +442 -0
  28. package/dist/RewardGroup.vue_vue_type_script_setup_true_lang-gt0h6XDa.js +150 -0
  29. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-CPw-z0L1.js +1637 -0
  30. package/dist/Segment-BpkWm7ah.js +568 -0
  31. package/dist/SelectItems.vue_vue_type_script_setup_true_lang-_t32qpAQ.js +181 -0
  32. package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-CWNF7Srw.js +147 -0
  33. package/dist/{Setting-B7oISD0D.js → Setting-QEqA9Sjr.js} +610 -586
  34. package/dist/Store-Bb5Qh_fa.js +1744 -0
  35. package/dist/{StoreRewards-AMxIYhjZ.js → StoreRewards-CqmFv4KN.js} +33 -32
  36. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-SGMgGM-I.js +939 -0
  37. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-B2szciPk.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-Bd63YQLw.js} +1 -1
  38. package/dist/{Tier-DkxdNj-K.js → Tier-BG4EQUN4.js} +327 -318
  39. package/dist/{Title-VFpCOsMO.js → Title-CLZYAG35.js} +199 -184
  40. package/dist/{Transaction-BgKD8n2L.js → Transaction-DxKmtuW2.js} +2 -2
  41. package/dist/UserRuleGroup.vue_vue_type_script_setup_true_lang-DWqf1lcK.js +130 -0
  42. package/dist/Voucher-BiBkN12U.js +353 -0
  43. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-Bv6ro9Ul.js +419 -0
  44. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-B2FGvyza.js → ZodTextField.vue_vue_type_script_setup_true_lang-DaN1_uKj.js} +1 -1
  45. package/dist/{app-DA-t-2Zt.js → app-BDYHz7bx.js} +1 -1
  46. package/dist/{app-DUl5dav5.js → app-BToiZpVg.js} +1758 -1496
  47. package/dist/app.js +1 -1
  48. package/dist/{business-CeCitOY4.js → business-Cdck2Mo8.js} +1 -1
  49. package/dist/{campaign-CcLM6e4s.js → campaign-U0MVzGkd.js} +2 -2
  50. package/dist/campaign-V6y28epS.js +1810 -0
  51. package/dist/campaign.enum-C2ZHkwav.js +20 -0
  52. package/dist/campaign.fn-C8hqL7sq.js +758 -0
  53. package/dist/collectible.enum-DPFWrwtU.js +19 -0
  54. package/dist/{collection.fn-CAEP7YxB.js → collection.fn-BUtvp8Q7.js} +2 -2
  55. package/dist/dto-CO3dr-5e.js +214 -0
  56. package/dist/{effect-Dt7rXOBy.js → effect-CTIglwNj.js} +9 -9
  57. package/dist/email-addresses-fTprqBTm.js +705 -0
  58. package/dist/{export-CyioiboQ.js → export-BNfnVhxu.js} +5 -5
  59. package/dist/{helper-FA_9AhGV.js → helper-BB4sHiiB.js} +1 -1
  60. package/dist/index-BZjpXQbO.js +32 -0
  61. package/dist/index-BnJgi3GR.js +54 -0
  62. package/dist/{index-DLN4Kzz_.js → index-BpmAtLiE.js} +1 -1
  63. package/dist/{index-igxrd5jC.js → index-ByUriI6F.js} +1500 -1479
  64. package/dist/{index-BiFueJiF.js → index-CUDAo9HK.js} +259 -193
  65. package/dist/index-CsaQJMAR.js +66 -0
  66. package/dist/{index-DbbO3wip.js → index-DHEtLTYr.js} +48 -4
  67. package/dist/{index-CCdXvb92.js → index-DTnTvdIA.js} +1 -1
  68. package/dist/{index-CyNdsVrw.js → index-DbzMtv9Z.js} +1 -1
  69. package/dist/index-DwbN8FHi.js +44 -0
  70. package/dist/index-czQ4GAtE.js +115 -0
  71. package/dist/{index-C20XBD7G.js → index-fkBcbLFu.js} +2192 -931
  72. package/dist/index-vh86FiIQ.js +10 -0
  73. package/dist/index-wzNzbg46.js +29000 -0
  74. package/dist/{index.esm2017-Dl_CdTcK.js → index.esm2017-OtiYpLFF.js} +33 -33
  75. package/dist/loading-D_NOvElg.js +71 -0
  76. package/dist/{membership-DFiY8aVd.js → membership-6M1ftDbz.js} +54 -46
  77. package/dist/money-D6phwlff.js +15 -0
  78. package/dist/number-CT9IX-wU.js +12 -0
  79. package/dist/objectid-DtS-zHmd.js +145 -0
  80. package/dist/{loading-CZ0fiViM.js → plugins-CFv-0uV9.js} +2990 -3062
  81. package/dist/remy-vue-client-Cpppk9h-.js +1693 -0
  82. package/dist/reward-B2aqMThx.js +36 -0
  83. package/dist/{rule-C3e1xTqN.js → rule-DxUsHy8Q.js} +180 -177
  84. package/dist/{rule-builder-MEVb_AiZ.js → rule-builder-BqkRAa1C.js} +1 -1
  85. package/dist/style.css +1 -1
  86. package/dist/{template-C2OKWd_e.js → template-5OZEG9e3.js} +5 -5
  87. package/dist/trigger-D7aLiQDF.js +144 -0
  88. package/dist/user-CMYgbV2m.js +54 -0
  89. package/dist/{vue-i18n-CjxDUnX6.js → vue-i18n-Cad7169E.js} +216 -216
  90. package/dist/{xlsx-CtXdl3ls.js → xlsx-rV-XTyJC.js} +1 -1
  91. package/package.json +9 -7
  92. package/dist/Analytic-C_ZFR5jh.js +0 -622
  93. package/dist/Card-C7dUFJKe.js +0 -825
  94. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-Bgl90veU.js +0 -2813
  95. package/dist/Marketing-BaqZUeVI.js +0 -316
  96. package/dist/MemberList-B9cutmEh.js +0 -1733
  97. package/dist/MemberTransactions-DRHA7AOF.js +0 -38
  98. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-BHCoDSTg.js +0 -1753
  99. package/dist/Segment-Dj8nc3AE.js +0 -437
  100. package/dist/Store-CJ3wcohQ.js +0 -1511
  101. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-wXUTfQQF.js +0 -890
  102. package/dist/Voucher-BbTLt8Pt.js +0 -490
  103. package/dist/dto-CRJma6eX.js +0 -2770
  104. package/dist/index-B1e0LtDe.js +0 -99
  105. package/dist/index-Be2ZYDy_.js +0 -298
  106. package/dist/index-CDkITvze.js +0 -762
  107. package/dist/index-CuvNtC_M.js +0 -61
  108. package/dist/index-DPP5F3bT.js +0 -206
  109. package/dist/index-Dbo3DDwp.js +0 -29193
  110. package/dist/money-D8hUEfP4.js +0 -15
  111. package/dist/number-DL3GAeVt.js +0 -12
  112. package/dist/user-Bm4KttFq.js +0 -37
@@ -1,113 +1,127 @@
1
- import { defineComponent as lt, ref as te, h as Q, watch as ut, resolveComponent as Yt, openBlock as ne, createBlock as dt, unref as P, computed as Ve, onMounted as Xt, createElementBlock as He, Fragment as Qt, createCommentVNode as $e, createVNode as Zt, createElementVNode as en, nextTick as tn } from "vue";
1
+ import { defineComponent as lt, ref as ne, h as B, watch as ut, resolveComponent as Yt, openBlock as ie, createBlock as dt, unref as P, computed as Ve, onMounted as Xt, createElementBlock as $e, Fragment as Qt, createCommentVNode as He, createVNode as Zt, createElementVNode as en, nextTick as tn } from "vue";
2
2
  import { useRouter as nn, useRoute as ht, RouterView as rn } from "vue-router";
3
3
  import { useCoreStore as We, FeedMeAuth as sn } from "@feedmepos/mf-common";
4
4
  import { u as on } from "./app-wDQR6dpb.js";
5
- import { u as an } from "./business-CeCitOY4.js";
6
- import "./index-CyNdsVrw.js";
7
- import { components as Z, useSnackbar as cn, useDialog as ln } from "@feedmepos/ui-library";
8
- import { u as un } from "./vue-i18n-CjxDUnX6.js";
9
- import { R as f } from "./app-DUl5dav5.js";
5
+ import { u as an } from "./business-Cdck2Mo8.js";
6
+ import "./index-DbzMtv9Z.js";
7
+ import { components as q, useSnackbar as cn, useDialog as ln } from "@feedmepos/ui-library";
8
+ import { u as un } from "./vue-i18n-Cad7169E.js";
9
+ import { R as h } from "./app-BToiZpVg.js";
10
10
  import { J as dn } from "./JsonViewer-v8_C7l5N.js";
11
- import { r as ye, L as hn, g as ft, i as fn, a as pn, _ as je, C as Ge, b as mn, S as z, c as w, d as j, E as be, e as gn, f as pt, h as _n, j as vn, k as mt, l as g, m as In, F as Re, n as Tn, q as K, o as wn, p as yn, s as En, t as kn, u as Sn } from "./index.esm2017-Dl_CdTcK.js";
11
+ import { r as ye, L as hn, g as ft, i as fn, a as pn, _ as je, C as Ge, b as mn, S as J, c as w, d as j, E as Se, e as gn, f as pt, h as _n, j as vn, k as mt, l as g, m as In, F as Re, n as Tn, q as Y, o as wn, p as yn, s as En, t as kn, u as bn } from "./index.esm2017-OtiYpLFF.js";
12
12
  import { _ as Pe } from "./tslib.es6-BCqqvLQ_.js";
13
- import { S as Be } from "./index-Dbo3DDwp.js";
14
- const bn = /* @__PURE__ */ lt({
13
+ import { S as Be, c as Sn } from "./index-wzNzbg46.js";
14
+ import { Y as Rn } from "./remy-vue-client-Cpppk9h-.js";
15
+ const Pn = /* @__PURE__ */ lt({
15
16
  __name: "NavigationTab",
16
17
  setup(n) {
17
- const { t: e } = un(), t = te(), i = [
18
+ const { t: e } = un(), t = ne(), i = [
18
19
  {
19
20
  label: e("connect.navigation.analytic"),
20
- value: f["$connect-ANALYTIC"]
21
+ value: h["$connect-ANALYTIC"]
21
22
  },
22
23
  {
23
24
  label: e("connect.navigation.campaign"),
24
- value: f["$connect-CAMPAIGN"],
25
+ value: h["$connect-CAMPAIGN"],
25
26
  children: [
26
27
  {
27
28
  label: e("connect.navigation.promotion"),
28
- value: f["$connect-CAMPAIGN_PROMOTION"]
29
+ value: h["$connect-CAMPAIGN_PROMOTION"]
29
30
  },
30
31
  {
31
32
  label: e("connect.navigation.voucher"),
32
- value: f["$connect-CAMPAIGN_VOUCHER"]
33
+ value: h["$connect-CAMPAIGN_VOUCHER"]
33
34
  },
34
35
  {
35
36
  label: e("connect.navigation.broadcast"),
36
- value: f["$connect-CAMPAIGN_BROADCAST"]
37
+ value: h["$connect-CAMPAIGN_BROADCAST"]
37
38
  }
38
39
  ]
39
40
  },
40
41
  {
41
42
  label: e("connect.navigation.program"),
42
- value: f["$connect-PROGRAM"],
43
+ value: h["$connect-PROGRAM"],
43
44
  children: [
44
45
  {
45
46
  label: e("connect.navigation.tier"),
46
- value: f["$connect-PROGRAM_TIER"]
47
+ value: h["$connect-PROGRAM_TIER"]
47
48
  },
48
49
  {
49
50
  label: e("connect.navigation.title"),
50
- value: f["$connect-PROGRAM_TITLE"]
51
+ value: h["$connect-PROGRAM_TITLE"]
51
52
  },
52
53
  {
53
54
  label: e("connect.navigation.experience"),
54
- value: f["$connect-PROGRAM_EXPERIENCE"]
55
+ value: h["$connect-PROGRAM_EXPERIENCE"]
55
56
  },
56
57
  {
57
58
  label: e("connect.navigation.point"),
58
- value: f["$connect-PROGRAM_POINT"],
59
- badge: () => Q(Z.FmPill, { variant: "premium" })
59
+ value: h["$connect-PROGRAM_POINT"],
60
+ badge: () => B(q.FmPill, { variant: "premium" })
60
61
  },
61
62
  {
62
63
  label: e("connect.navigation.credit"),
63
- value: f["$connect-PROGRAM_CREDIT"]
64
+ value: h["$connect-PROGRAM_CREDIT"]
64
65
  },
65
66
  {
66
67
  label: e("connect.navigation.game"),
67
- value: f["$connect-PROGRAM_GAME"],
68
- badge: () => Q(Z.FmPill, { variant: "premium" })
68
+ value: h["$connect-PROGRAM_GAME"],
69
+ badge: () => B(q.FmPill, { variant: "premium" })
69
70
  },
70
71
  {
71
72
  label: "Mission",
72
- value: f["$connect-PROGRAM_MISSION"]
73
+ value: h["$connect-PROGRAM_MISSION"]
73
74
  }
74
75
  ]
75
76
  },
76
77
  {
77
78
  label: e("connect.navigation.loyalty"),
78
- value: f["$connect-LOYALTY"],
79
+ value: h["$connect-LOYALTY"],
79
80
  children: [
80
81
  {
81
82
  label: e("connect.navigation.member"),
82
- value: f["$connect-LOYALTY_MEMBER_LIST"]
83
+ value: h["$connect-LOYALTY_MEMBER_LIST"]
83
84
  },
84
85
  {
85
86
  label: e("connect.navigation.segments"),
86
- value: f["$connect-LOYALTY_SEGMENT"],
87
- badge: () => Q(Z.FmPill, { variant: "premium" })
87
+ value: h["$connect-LOYALTY_SEGMENT"],
88
+ badge: () => B(q.FmPill, { variant: "premium" })
88
89
  },
89
90
  {
90
91
  label: e("connect.navigation.card"),
91
- value: f["$connect-LOYALTY_CARD"],
92
- badge: () => Q(Z.FmPill, { variant: "premium" })
92
+ value: h["$connect-LOYALTY_CARD"],
93
+ badge: () => B(q.FmPill, { variant: "premium" })
93
94
  }
94
95
  ]
95
96
  },
97
+ {
98
+ label: e("connect.navigation.referral"),
99
+ value: h["$connect-REFERRAL"],
100
+ badge: () => B(q.FmPill, { variant: "premium" })
101
+ },
96
102
  {
97
103
  label: e("connect.navigation.store"),
98
- value: f["$connect-STORE"]
104
+ value: h["$connect-STORE"]
99
105
  },
100
106
  {
101
107
  label: e("connect.navigation.transaction"),
102
- value: f["$connect-TRANSACTION"]
108
+ value: h["$connect-TRANSACTION"]
109
+ },
110
+ {
111
+ label: "Marketing material",
112
+ value: h["$connect-MARKETING"]
113
+ },
114
+ {
115
+ label: e("connect.navigation.auditLogs"),
116
+ value: h["$connect-AUDIT_LOGS"]
103
117
  },
104
- // {
105
- // label: 'Marketing material',
106
- // value: ROUTE_NAME['$connect-MARKETING'],
107
- // },
108
118
  {
109
119
  label: e("connect.navigation.setting"),
110
- value: f["$connect-SETTING"]
120
+ value: h["$connect-SETTING"]
121
+ },
122
+ {
123
+ label: e("connect.navigation.bin"),
124
+ value: h["$connect-BIN"]
111
125
  }
112
126
  ], r = nn(), s = ht(), o = i.reduce((a, l) => [...(l.children ?? []).map((d) => d.value), ...a, l.value], []);
113
127
  ut(
@@ -122,18 +136,18 @@ const bn = /* @__PURE__ */ lt({
122
136
  await r.push({ name: a });
123
137
  }
124
138
  return (a, l) => {
125
- var h;
139
+ var f;
126
140
  const d = Yt("FmCollapsibleTabs");
127
- return ne(), dt(d, {
141
+ return ie(), dt(d, {
128
142
  class: "border-fm-color-neutral-gray-100 border-r py-16 px-4",
129
- "model-value": (h = P(t)) == null ? void 0 : h.toString(),
143
+ "model-value": (f = P(t)) == null ? void 0 : f.toString(),
130
144
  items: i,
131
145
  "onUpdate:modelValue": c
132
146
  }, null, 8, ["model-value"]);
133
147
  };
134
148
  }
135
149
  });
136
- var Rn = "firebase", Pn = "10.12.4";
150
+ var An = "firebase", Cn = "10.12.4";
137
151
  /**
138
152
  * @license
139
153
  * Copyright 2020 Google LLC
@@ -150,13 +164,13 @@ var Rn = "firebase", Pn = "10.12.4";
150
164
  * See the License for the specific language governing permissions and
151
165
  * limitations under the License.
152
166
  */
153
- ye(Rn, Pn, "app");
167
+ ye(An, Cn, "app");
154
168
  function gt() {
155
169
  return {
156
170
  "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."
157
171
  };
158
172
  }
159
- const An = gt, _t = new be("auth", "Firebase", gt());
173
+ const On = gt, _t = new Se("auth", "Firebase", gt());
160
174
  /**
161
175
  * @license
162
176
  * Copyright 2020 Google LLC
@@ -173,12 +187,12 @@ const An = gt, _t = new be("auth", "Firebase", gt());
173
187
  * See the License for the specific language governing permissions and
174
188
  * limitations under the License.
175
189
  */
176
- const ae = new hn("@firebase/auth");
177
- function Cn(n, ...e) {
178
- ae.logLevel <= mt.WARN && ae.warn(`Auth (${z}): ${n}`, ...e);
190
+ const ce = new hn("@firebase/auth");
191
+ function Nn(n, ...e) {
192
+ ce.logLevel <= mt.WARN && ce.warn(`Auth (${J}): ${n}`, ...e);
179
193
  }
180
- function ie(n, ...e) {
181
- ae.logLevel <= mt.ERROR && ae.error(`Auth (${z}): ${n}`, ...e);
194
+ function re(n, ...e) {
195
+ ce.logLevel <= mt.ERROR && ce.error(`Auth (${J}): ${n}`, ...e);
182
196
  }
183
197
  /**
184
198
  * @license
@@ -196,15 +210,15 @@ function ie(n, ...e) {
196
210
  * See the License for the specific language governing permissions and
197
211
  * limitations under the License.
198
212
  */
199
- function S(n, ...e) {
213
+ function b(n, ...e) {
200
214
  throw Ae(n, ...e);
201
215
  }
202
216
  function I(n, ...e) {
203
217
  return Ae(n, ...e);
204
218
  }
205
219
  function vt(n, e, t) {
206
- const i = Object.assign(Object.assign({}, An()), { [e]: t });
207
- return new be("auth", "Firebase", i).create(e, {
220
+ const i = Object.assign(Object.assign({}, On()), { [e]: t });
221
+ return new Se("auth", "Firebase", i).create(e, {
208
222
  appName: n.name
209
223
  });
210
224
  }
@@ -224,9 +238,9 @@ function u(n, e, ...t) {
224
238
  }
225
239
  function y(n) {
226
240
  const e = "INTERNAL ASSERTION FAILED: " + n;
227
- throw ie(e), new Error(e);
241
+ throw re(e), new Error(e);
228
242
  }
229
- function b(n, e) {
243
+ function S(n, e) {
230
244
  n || y(e);
231
245
  }
232
246
  /**
@@ -249,7 +263,7 @@ function Ee() {
249
263
  var n;
250
264
  return typeof self < "u" && ((n = self.location) === null || n === void 0 ? void 0 : n.href) || "";
251
265
  }
252
- function On() {
266
+ function Ln() {
253
267
  return qe() === "http:" || qe() === "https:";
254
268
  }
255
269
  function qe() {
@@ -272,15 +286,15 @@ function qe() {
272
286
  * See the License for the specific language governing permissions and
273
287
  * limitations under the License.
274
288
  */
275
- function Nn() {
289
+ function Mn() {
276
290
  return typeof navigator < "u" && navigator && "onLine" in navigator && typeof navigator.onLine == "boolean" && // Apply only for traditional web apps and Chrome extensions.
277
291
  // This is especially true for Cordova apps which have unreliable
278
292
  // navigator.onLine behavior unless cordova-plugin-network-information is
279
293
  // installed which overwrites the native navigator.onLine value and
280
294
  // defines navigator.connection.
281
- (On() || mn() || "connection" in navigator) ? navigator.onLine : !0;
295
+ (Ln() || mn() || "connection" in navigator) ? navigator.onLine : !0;
282
296
  }
283
- function Ln() {
297
+ function Un() {
284
298
  if (typeof navigator > "u")
285
299
  return null;
286
300
  const n = navigator;
@@ -308,12 +322,12 @@ function Ln() {
308
322
  * See the License for the specific language governing permissions and
309
323
  * limitations under the License.
310
324
  */
311
- class J {
325
+ class X {
312
326
  constructor(e, t) {
313
- this.shortDelay = e, this.longDelay = t, b(t > e, "Short delay should be less than long delay!"), this.isMobile = fn() || pn();
327
+ this.shortDelay = e, this.longDelay = t, S(t > e, "Short delay should be less than long delay!"), this.isMobile = fn() || pn();
314
328
  }
315
329
  get() {
316
- return Nn() ? this.isMobile ? this.longDelay : this.shortDelay : Math.min(5e3, this.shortDelay);
330
+ return Mn() ? this.isMobile ? this.longDelay : this.shortDelay : Math.min(5e3, this.shortDelay);
317
331
  }
318
332
  }
319
333
  /**
@@ -333,7 +347,7 @@ class J {
333
347
  * limitations under the License.
334
348
  */
335
349
  function Ce(n, e) {
336
- b(n.emulator, "Emulator should always be set here");
350
+ S(n.emulator, "Emulator should always be set here");
337
351
  const { url: t } = n.emulator;
338
352
  return e ? `${t}${e.startsWith("/") ? e.slice(1) : e}` : t;
339
353
  }
@@ -407,7 +421,7 @@ class It {
407
421
  * See the License for the specific language governing permissions and
408
422
  * limitations under the License.
409
423
  */
410
- const Mn = {
424
+ const Dn = {
411
425
  // Custom token errors.
412
426
  CREDENTIAL_MISMATCH: "custom-token-mismatch",
413
427
  // This can only happen if the SDK sends a bad request.
@@ -498,8 +512,8 @@ const Mn = {
498
512
  * See the License for the specific language governing permissions and
499
513
  * limitations under the License.
500
514
  */
501
- const Un = new J(3e4, 6e4);
502
- function he(n, e) {
515
+ const Fn = new X(3e4, 6e4);
516
+ function fe(n, e) {
503
517
  return n.tenantId && !e.tenantId ? Object.assign(Object.assign({}, e), { tenantId: n.tenantId }) : e;
504
518
  }
505
519
  async function G(n, e, t, i, r = {}) {
@@ -508,7 +522,7 @@ async function G(n, e, t, i, r = {}) {
508
522
  i && (e === "GET" ? o = i : s = {
509
523
  body: JSON.stringify(i)
510
524
  });
511
- const c = K(Object.assign({ key: n.config.apiKey }, o)).slice(1), a = await n._getAdditionalHeaders();
525
+ const c = Y(Object.assign({ key: n.config.apiKey }, o)).slice(1), a = await n._getAdditionalHeaders();
512
526
  return a[
513
527
  "Content-Type"
514
528
  /* HttpHeader.CONTENT_TYPE */
@@ -524,40 +538,40 @@ async function G(n, e, t, i, r = {}) {
524
538
  }
525
539
  async function Tt(n, e, t) {
526
540
  n._canInitEmulator = !1;
527
- const i = Object.assign(Object.assign({}, Mn), e);
541
+ const i = Object.assign(Object.assign({}, Dn), e);
528
542
  try {
529
- const r = new Dn(n), s = await Promise.race([
543
+ const r = new xn(n), s = await Promise.race([
530
544
  t(),
531
545
  r.promise
532
546
  ]);
533
547
  r.clearNetworkTimeout();
534
548
  const o = await s.json();
535
549
  if ("needConfirmation" in o)
536
- throw ee(n, "account-exists-with-different-credential", o);
550
+ throw te(n, "account-exists-with-different-credential", o);
537
551
  if (s.ok && !("errorMessage" in o))
538
552
  return o;
539
553
  {
540
554
  const c = s.ok ? o.errorMessage : o.error.message, [a, l] = c.split(" : ");
541
555
  if (a === "FEDERATED_USER_ID_ALREADY_LINKED")
542
- throw ee(n, "credential-already-in-use", o);
556
+ throw te(n, "credential-already-in-use", o);
543
557
  if (a === "EMAIL_EXISTS")
544
- throw ee(n, "email-already-in-use", o);
558
+ throw te(n, "email-already-in-use", o);
545
559
  if (a === "USER_DISABLED")
546
- throw ee(n, "user-disabled", o);
560
+ throw te(n, "user-disabled", o);
547
561
  const d = i[a] || a.toLowerCase().replace(/[_\s]+/g, "-");
548
562
  if (l)
549
563
  throw vt(n, d, l);
550
- S(n, d);
564
+ b(n, d);
551
565
  }
552
566
  } catch (r) {
553
567
  if (r instanceof Re)
554
568
  throw r;
555
- S(n, "network-request-failed", { message: String(r) });
569
+ b(n, "network-request-failed", { message: String(r) });
556
570
  }
557
571
  }
558
572
  async function wt(n, e, t, i, r = {}) {
559
573
  const s = await G(n, e, t, i, r);
560
- return "mfaPendingCredential" in s && S(n, "multi-factor-auth-required", {
574
+ return "mfaPendingCredential" in s && b(n, "multi-factor-auth-required", {
561
575
  _serverResponse: s
562
576
  }), s;
563
577
  }
@@ -565,21 +579,21 @@ function yt(n, e, t, i) {
565
579
  const r = `${e}${t}?${i}`;
566
580
  return n.config.emulator ? Ce(n.config, r) : `${n.config.apiScheme}://${r}`;
567
581
  }
568
- class Dn {
582
+ class xn {
569
583
  constructor(e) {
570
584
  this.auth = e, this.timer = null, this.promise = new Promise((t, i) => {
571
585
  this.timer = setTimeout(() => i(I(
572
586
  this.auth,
573
587
  "network-request-failed"
574
588
  /* AuthErrorCode.NETWORK_REQUEST_FAILED */
575
- )), Un.get());
589
+ )), Fn.get());
576
590
  });
577
591
  }
578
592
  clearNetworkTimeout() {
579
593
  clearTimeout(this.timer);
580
594
  }
581
595
  }
582
- function ee(n, e, t) {
596
+ function te(n, e, t) {
583
597
  const i = {
584
598
  appName: n.name
585
599
  };
@@ -603,7 +617,7 @@ function ee(n, e, t) {
603
617
  * See the License for the specific language governing permissions and
604
618
  * limitations under the License.
605
619
  */
606
- async function Fn(n, e) {
620
+ async function Vn(n, e) {
607
621
  return G(n, "POST", "/v1/accounts:delete", e);
608
622
  }
609
623
  async function Et(n, e) {
@@ -625,7 +639,7 @@ async function Et(n, e) {
625
639
  * See the License for the specific language governing permissions and
626
640
  * limitations under the License.
627
641
  */
628
- function B(n) {
642
+ function z(n) {
629
643
  if (n)
630
644
  try {
631
645
  const e = new Date(Number(n));
@@ -634,7 +648,7 @@ function B(n) {
634
648
  } catch {
635
649
  }
636
650
  }
637
- async function xn(n, e = !1) {
651
+ async function $n(n, e = !1) {
638
652
  const t = j(n), i = await t.getIdToken(e), r = Oe(i);
639
653
  u(
640
654
  r && r.exp && r.auth_time && r.iat,
@@ -646,9 +660,9 @@ async function xn(n, e = !1) {
646
660
  return {
647
661
  claims: r,
648
662
  token: i,
649
- authTime: B(Te(r.auth_time)),
650
- issuedAtTime: B(Te(r.iat)),
651
- expirationTime: B(Te(r.exp)),
663
+ authTime: z(Te(r.auth_time)),
664
+ issuedAtTime: z(Te(r.iat)),
665
+ expirationTime: z(Te(r.exp)),
652
666
  signInProvider: o || null,
653
667
  signInSecondFactor: (s == null ? void 0 : s.sign_in_second_factor) || null
654
668
  };
@@ -659,12 +673,12 @@ function Te(n) {
659
673
  function Oe(n) {
660
674
  const [e, t, i] = n.split(".");
661
675
  if (e === void 0 || t === void 0 || i === void 0)
662
- return ie("JWT malformed, contained fewer than 3 sections"), null;
676
+ return re("JWT malformed, contained fewer than 3 sections"), null;
663
677
  try {
664
678
  const r = Tn(t);
665
- return r ? JSON.parse(r) : (ie("Failed to decode base64 JWT payload"), null);
679
+ return r ? JSON.parse(r) : (re("Failed to decode base64 JWT payload"), null);
666
680
  } catch (r) {
667
- return ie("Caught error parsing JWT payload as JSON", r == null ? void 0 : r.toString()), null;
681
+ return re("Caught error parsing JWT payload as JSON", r == null ? void 0 : r.toString()), null;
668
682
  }
669
683
  }
670
684
  function ze(n) {
@@ -699,16 +713,16 @@ function ze(n) {
699
713
  * See the License for the specific language governing permissions and
700
714
  * limitations under the License.
701
715
  */
702
- async function q(n, e, t = !1) {
716
+ async function K(n, e, t = !1) {
703
717
  if (t)
704
718
  return e;
705
719
  try {
706
720
  return await e;
707
721
  } catch (i) {
708
- throw i instanceof Re && Vn(i) && n.auth.currentUser === n && await n.auth.signOut(), i;
722
+ throw i instanceof Re && Hn(i) && n.auth.currentUser === n && await n.auth.signOut(), i;
709
723
  }
710
724
  }
711
- function Vn({ code: n }) {
725
+ function Hn({ code: n }) {
712
726
  return n === "auth/user-disabled" || n === "auth/user-token-expired";
713
727
  }
714
728
  /**
@@ -727,7 +741,7 @@ function Vn({ code: n }) {
727
741
  * See the License for the specific language governing permissions and
728
742
  * limitations under the License.
729
743
  */
730
- class Hn {
744
+ class Wn {
731
745
  constructor(e) {
732
746
  this.user = e, this.isRunning = !1, this.timerId = null, this.errorBackoff = 3e4;
733
747
  }
@@ -794,7 +808,7 @@ class ke {
794
808
  this.createdAt = e, this.lastLoginAt = t, this._initializeTime();
795
809
  }
796
810
  _initializeTime() {
797
- this.lastSignInTime = B(this.lastLoginAt), this.creationTime = B(this.createdAt);
811
+ this.lastSignInTime = z(this.lastLoginAt), this.creationTime = z(this.createdAt);
798
812
  }
799
813
  _copy(e) {
800
814
  this.createdAt = e.createdAt, this.lastLoginAt = e.lastLoginAt, this._initializeTime();
@@ -822,9 +836,9 @@ class ke {
822
836
  * See the License for the specific language governing permissions and
823
837
  * limitations under the License.
824
838
  */
825
- async function ce(n) {
839
+ async function le(n) {
826
840
  var e;
827
- const t = n.auth, i = await n.getIdToken(), r = await q(n, Et(t, { idToken: i }));
841
+ const t = n.auth, i = await n.getIdToken(), r = await K(n, Et(t, { idToken: i }));
828
842
  u(
829
843
  r == null ? void 0 : r.users.length,
830
844
  t,
@@ -833,7 +847,7 @@ async function ce(n) {
833
847
  );
834
848
  const s = r.users[0];
835
849
  n._notifyReloadListener(s);
836
- const o = !((e = s.providerUserInfo) === null || e === void 0) && e.length ? kt(s.providerUserInfo) : [], c = Wn(n.providerData, o), a = n.isAnonymous, l = !(n.email && s.passwordHash) && !(c != null && c.length), d = a ? l : !1, h = {
850
+ const o = !((e = s.providerUserInfo) === null || e === void 0) && e.length ? kt(s.providerUserInfo) : [], c = Gn(n.providerData, o), a = n.isAnonymous, l = !(n.email && s.passwordHash) && !(c != null && c.length), d = a ? l : !1, f = {
837
851
  uid: s.localId,
838
852
  displayName: s.displayName || null,
839
853
  photoURL: s.photoUrl || null,
@@ -845,13 +859,13 @@ async function ce(n) {
845
859
  metadata: new ke(s.createdAt, s.lastLoginAt),
846
860
  isAnonymous: d
847
861
  };
848
- Object.assign(n, h);
862
+ Object.assign(n, f);
849
863
  }
850
- async function $n(n) {
864
+ async function jn(n) {
851
865
  const e = j(n);
852
- await ce(e), await e.auth._persistUserIfCurrent(e), e.auth._notifyListenersIfCurrent(e);
866
+ await le(e), await e.auth._persistUserIfCurrent(e), e.auth._notifyListenersIfCurrent(e);
853
867
  }
854
- function Wn(n, e) {
868
+ function Gn(n, e) {
855
869
  return [...n.filter((i) => !e.some((r) => r.providerId === i.providerId)), ...e];
856
870
  }
857
871
  function kt(n) {
@@ -883,9 +897,9 @@ function kt(n) {
883
897
  * See the License for the specific language governing permissions and
884
898
  * limitations under the License.
885
899
  */
886
- async function jn(n, e) {
900
+ async function Bn(n, e) {
887
901
  const t = await Tt(n, {}, async () => {
888
- const i = K({
902
+ const i = Y({
889
903
  grant_type: "refresh_token",
890
904
  refresh_token: e
891
905
  }).slice(1), { tokenApiHost: r, apiKey: s } = n.config, o = yt(n, r, "/v1/token", `key=${s}`), c = await n._getAdditionalHeaders();
@@ -904,8 +918,8 @@ async function jn(n, e) {
904
918
  refreshToken: t.refresh_token
905
919
  };
906
920
  }
907
- async function Gn(n, e) {
908
- return G(n, "POST", "/v2/accounts:revokeToken", he(n, e));
921
+ async function qn(n, e) {
922
+ return G(n, "POST", "/v2/accounts:revokeToken", fe(n, e));
909
923
  }
910
924
  /**
911
925
  * @license
@@ -923,7 +937,7 @@ async function Gn(n, e) {
923
937
  * See the License for the specific language governing permissions and
924
938
  * limitations under the License.
925
939
  */
926
- class H {
940
+ class $ {
927
941
  constructor() {
928
942
  this.refreshToken = null, this.accessToken = null, this.expirationTime = null;
929
943
  }
@@ -968,14 +982,14 @@ class H {
968
982
  this.refreshToken = null;
969
983
  }
970
984
  async refresh(e, t) {
971
- const { accessToken: i, refreshToken: r, expiresIn: s } = await jn(e, t);
985
+ const { accessToken: i, refreshToken: r, expiresIn: s } = await Bn(e, t);
972
986
  this.updateTokensAndExpiration(i, r, Number(s));
973
987
  }
974
988
  updateTokensAndExpiration(e, t, i) {
975
989
  this.refreshToken = t || null, this.accessToken = e || null, this.expirationTime = Date.now() + i * 1e3;
976
990
  }
977
991
  static fromJSON(e, t) {
978
- const { refreshToken: i, accessToken: r, expirationTime: s } = t, o = new H();
992
+ const { refreshToken: i, accessToken: r, expirationTime: s } = t, o = new $();
979
993
  return i && (u(typeof i == "string", "internal-error", {
980
994
  appName: e
981
995
  }), o.refreshToken = i), r && (u(typeof r == "string", "internal-error", {
@@ -995,7 +1009,7 @@ class H {
995
1009
  this.accessToken = e.accessToken, this.refreshToken = e.refreshToken, this.expirationTime = e.expirationTime;
996
1010
  }
997
1011
  _clone() {
998
- return Object.assign(new H(), this.toJSON());
1012
+ return Object.assign(new $(), this.toJSON());
999
1013
  }
1000
1014
  _performRefresh() {
1001
1015
  return y("not implemented");
@@ -1023,10 +1037,10 @@ function R(n, e) {
1023
1037
  class E {
1024
1038
  constructor(e) {
1025
1039
  var { uid: t, auth: i, stsTokenManager: r } = e, s = Pe(e, ["uid", "auth", "stsTokenManager"]);
1026
- this.providerId = "firebase", this.proactiveRefresh = new Hn(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 ke(s.createdAt || void 0, s.lastLoginAt || void 0);
1040
+ this.providerId = "firebase", this.proactiveRefresh = new Wn(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 ke(s.createdAt || void 0, s.lastLoginAt || void 0);
1027
1041
  }
1028
1042
  async getIdToken(e) {
1029
- const t = await q(this, this.stsTokenManager.getToken(this.auth, e));
1043
+ const t = await K(this, this.stsTokenManager.getToken(this.auth, e));
1030
1044
  return u(
1031
1045
  t,
1032
1046
  this.auth,
@@ -1035,10 +1049,10 @@ class E {
1035
1049
  ), this.accessToken !== t && (this.accessToken = t, await this.auth._persistUserIfCurrent(this), this.auth._notifyListenersIfCurrent(this)), t;
1036
1050
  }
1037
1051
  getIdTokenResult(e) {
1038
- return xn(this, e);
1052
+ return $n(this, e);
1039
1053
  }
1040
1054
  reload() {
1041
- return $n(this);
1055
+ return jn(this);
1042
1056
  }
1043
1057
  _assign(e) {
1044
1058
  this !== e && (u(
@@ -1071,13 +1085,13 @@ class E {
1071
1085
  }
1072
1086
  async _updateTokensIfNecessary(e, t = !1) {
1073
1087
  let i = !1;
1074
- e.idToken && e.idToken !== this.stsTokenManager.accessToken && (this.stsTokenManager.updateFromServerResponse(e), i = !0), t && await ce(this), await this.auth._persistUserIfCurrent(this), i && this.auth._notifyListenersIfCurrent(this);
1088
+ 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);
1075
1089
  }
1076
1090
  async delete() {
1077
1091
  if (w(this.auth.app))
1078
1092
  return Promise.reject(L(this.auth));
1079
1093
  const e = await this.getIdToken();
1080
- return await q(this, Fn(this.auth, { idToken: e })), this.stsTokenManager.clearRefreshToken(), this.auth.signOut();
1094
+ return await K(this, Vn(this.auth, { idToken: e })), this.stsTokenManager.clearRefreshToken(), this.auth.signOut();
1081
1095
  }
1082
1096
  toJSON() {
1083
1097
  return Object.assign(Object.assign({
@@ -1105,20 +1119,20 @@ class E {
1105
1119
  }
1106
1120
  static _fromJSON(e, t) {
1107
1121
  var i, r, s, o, c, a, l, d;
1108
- const h = (i = t.displayName) !== null && i !== void 0 ? i : void 0, _ = (r = t.email) !== null && r !== void 0 ? r : void 0, F = (s = t.phoneNumber) !== null && s !== void 0 ? s : void 0, M = (o = t.photoURL) !== null && o !== void 0 ? o : void 0, p = (c = t.tenantId) !== null && c !== void 0 ? c : void 0, m = (a = t._redirectEventId) !== null && a !== void 0 ? a : void 0, v = (l = t.createdAt) !== null && l !== void 0 ? l : void 0, x = (d = t.lastLoginAt) !== null && d !== void 0 ? d : void 0, { uid: _e, emailVerified: De, isAnonymous: Fe, providerData: ve, stsTokenManager: xe } = t;
1122
+ const f = (i = t.displayName) !== null && i !== void 0 ? i : void 0, _ = (r = t.email) !== null && r !== void 0 ? r : void 0, x = (s = t.phoneNumber) !== null && s !== void 0 ? s : void 0, M = (o = t.photoURL) !== null && o !== void 0 ? o : void 0, ee = (c = t.tenantId) !== null && c !== void 0 ? c : void 0, p = (a = t._redirectEventId) !== null && a !== void 0 ? a : void 0, m = (l = t.createdAt) !== null && l !== void 0 ? l : void 0, v = (d = t.lastLoginAt) !== null && d !== void 0 ? d : void 0, { uid: U, emailVerified: De, isAnonymous: Fe, providerData: ve, stsTokenManager: xe } = t;
1109
1123
  u(
1110
- _e && xe,
1124
+ U && xe,
1111
1125
  e,
1112
1126
  "internal-error"
1113
1127
  /* AuthErrorCode.INTERNAL_ERROR */
1114
1128
  );
1115
- const Kt = H.fromJSON(this.name, xe);
1129
+ const Kt = $.fromJSON(this.name, xe);
1116
1130
  u(
1117
- typeof _e == "string",
1131
+ typeof U == "string",
1118
1132
  e,
1119
1133
  "internal-error"
1120
1134
  /* AuthErrorCode.INTERNAL_ERROR */
1121
- ), R(h, e.name), R(_, e.name), u(
1135
+ ), R(f, e.name), R(_, e.name), u(
1122
1136
  typeof De == "boolean",
1123
1137
  e,
1124
1138
  "internal-error"
@@ -1128,22 +1142,22 @@ class E {
1128
1142
  e,
1129
1143
  "internal-error"
1130
1144
  /* AuthErrorCode.INTERNAL_ERROR */
1131
- ), R(F, e.name), R(M, e.name), R(p, e.name), R(m, e.name), R(v, e.name), R(x, e.name);
1145
+ ), R(x, e.name), R(M, e.name), R(ee, e.name), R(p, e.name), R(m, e.name), R(v, e.name);
1132
1146
  const Ie = new E({
1133
- uid: _e,
1147
+ uid: U,
1134
1148
  auth: e,
1135
1149
  email: _,
1136
1150
  emailVerified: De,
1137
- displayName: h,
1151
+ displayName: f,
1138
1152
  isAnonymous: Fe,
1139
1153
  photoURL: M,
1140
- phoneNumber: F,
1141
- tenantId: p,
1154
+ phoneNumber: x,
1155
+ tenantId: ee,
1142
1156
  stsTokenManager: Kt,
1143
- createdAt: v,
1144
- lastLoginAt: x
1157
+ createdAt: m,
1158
+ lastLoginAt: v
1145
1159
  });
1146
- return ve && Array.isArray(ve) && (Ie.providerData = ve.map((Jt) => Object.assign({}, Jt))), m && (Ie._redirectEventId = m), Ie;
1160
+ return ve && Array.isArray(ve) && (Ie.providerData = ve.map((Jt) => Object.assign({}, Jt))), p && (Ie._redirectEventId = p), Ie;
1147
1161
  }
1148
1162
  /**
1149
1163
  * Initialize a User from an idToken server response
@@ -1151,7 +1165,7 @@ class E {
1151
1165
  * @param idTokenResponse
1152
1166
  */
1153
1167
  static async _fromIdTokenResponse(e, t, i = !1) {
1154
- const r = new H();
1168
+ const r = new $();
1155
1169
  r.updateFromServerResponse(t);
1156
1170
  const s = new E({
1157
1171
  uid: t.localId,
@@ -1159,7 +1173,7 @@ class E {
1159
1173
  stsTokenManager: r,
1160
1174
  isAnonymous: i
1161
1175
  });
1162
- return await ce(s), s;
1176
+ return await le(s), s;
1163
1177
  }
1164
1178
  /**
1165
1179
  * Initialize a User from an idToken server response
@@ -1173,7 +1187,7 @@ class E {
1173
1187
  "internal-error"
1174
1188
  /* AuthErrorCode.INTERNAL_ERROR */
1175
1189
  );
1176
- const s = r.providerUserInfo !== void 0 ? kt(r.providerUserInfo) : [], o = !(r.email && r.passwordHash) && !(s != null && s.length), c = new H();
1190
+ const s = r.providerUserInfo !== void 0 ? kt(r.providerUserInfo) : [], o = !(r.email && r.passwordHash) && !(s != null && s.length), c = new $();
1177
1191
  c.updateFromIdToken(i);
1178
1192
  const a = new E({
1179
1193
  uid: r.localId,
@@ -1213,9 +1227,9 @@ class E {
1213
1227
  */
1214
1228
  const Ke = /* @__PURE__ */ new Map();
1215
1229
  function k(n) {
1216
- b(n instanceof Function, "Expected a class definition");
1230
+ S(n instanceof Function, "Expected a class definition");
1217
1231
  let e = Ke.get(n);
1218
- return e ? (b(e instanceof n, "Instance stored in cache mismatched with class"), e) : (e = new n(), Ke.set(n, e), e);
1232
+ return e ? (S(e instanceof n, "Instance stored in cache mismatched with class"), e) : (e = new n(), Ke.set(n, e), e);
1219
1233
  }
1220
1234
  /**
1221
1235
  * @license
@@ -1233,7 +1247,7 @@ function k(n) {
1233
1247
  * See the License for the specific language governing permissions and
1234
1248
  * limitations under the License.
1235
1249
  */
1236
- class St {
1250
+ class bt {
1237
1251
  constructor() {
1238
1252
  this.type = "NONE", this.storage = {};
1239
1253
  }
@@ -1255,8 +1269,8 @@ class St {
1255
1269
  _removeListener(e, t) {
1256
1270
  }
1257
1271
  }
1258
- St.type = "NONE";
1259
- const Je = St;
1272
+ bt.type = "NONE";
1273
+ const Je = bt;
1260
1274
  /**
1261
1275
  * @license
1262
1276
  * Copyright 2019 Google LLC
@@ -1273,14 +1287,14 @@ const Je = St;
1273
1287
  * See the License for the specific language governing permissions and
1274
1288
  * limitations under the License.
1275
1289
  */
1276
- function re(n, e, t) {
1290
+ function se(n, e, t) {
1277
1291
  return `firebase:${n}:${e}:${t}`;
1278
1292
  }
1279
- class $ {
1293
+ class H {
1280
1294
  constructor(e, t, i) {
1281
1295
  this.persistence = e, this.auth = t, this.userKey = i;
1282
1296
  const { config: r, name: s } = this.auth;
1283
- this.fullUserKey = re(this.userKey, r.apiKey, s), this.fullPersistenceKey = re("persistence", r.apiKey, s), this.boundEventHandler = t._onStorageEvent.bind(t), this.persistence._addListener(this.fullUserKey, this.boundEventHandler);
1297
+ 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);
1284
1298
  }
1285
1299
  setCurrentUser(e) {
1286
1300
  return this.persistence._set(this.fullUserKey, e.toJSON());
@@ -1307,32 +1321,32 @@ class $ {
1307
1321
  }
1308
1322
  static async create(e, t, i = "authUser") {
1309
1323
  if (!t.length)
1310
- return new $(k(Je), e, i);
1324
+ return new H(k(Je), e, i);
1311
1325
  const r = (await Promise.all(t.map(async (l) => {
1312
1326
  if (await l._isAvailable())
1313
1327
  return l;
1314
1328
  }))).filter((l) => l);
1315
1329
  let s = r[0] || k(Je);
1316
- const o = re(i, e.config.apiKey, e.name);
1330
+ const o = se(i, e.config.apiKey, e.name);
1317
1331
  let c = null;
1318
1332
  for (const l of t)
1319
1333
  try {
1320
1334
  const d = await l._get(o);
1321
1335
  if (d) {
1322
- const h = E._fromJSON(e, d);
1323
- l !== s && (c = h), s = l;
1336
+ const f = E._fromJSON(e, d);
1337
+ l !== s && (c = f), s = l;
1324
1338
  break;
1325
1339
  }
1326
1340
  } catch {
1327
1341
  }
1328
1342
  const a = r.filter((l) => l._shouldAllowMigration);
1329
- return !s._shouldAllowMigration || !a.length ? new $(s, e, i) : (s = a[0], c && await s._set(o, c.toJSON()), await Promise.all(t.map(async (l) => {
1343
+ 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) => {
1330
1344
  if (l !== s)
1331
1345
  try {
1332
1346
  await l._remove(o);
1333
1347
  } catch {
1334
1348
  }
1335
- })), new $(s, e, i));
1349
+ })), new H(s, e, i));
1336
1350
  }
1337
1351
  }
1338
1352
  /**
@@ -1361,7 +1375,7 @@ function Ye(n) {
1361
1375
  return "IE";
1362
1376
  if (e.includes("edge/"))
1363
1377
  return "Edge";
1364
- if (bt(e))
1378
+ if (St(e))
1365
1379
  return "Firefox";
1366
1380
  if (e.includes("silk/"))
1367
1381
  return "Silk";
@@ -1382,7 +1396,7 @@ function Ye(n) {
1382
1396
  }
1383
1397
  return "Other";
1384
1398
  }
1385
- function bt(n = g()) {
1399
+ function St(n = g()) {
1386
1400
  return /firefox\//i.test(n);
1387
1401
  }
1388
1402
  function Ne(n = g()) {
@@ -1404,20 +1418,20 @@ function Ct(n = g()) {
1404
1418
  function Ot(n = g()) {
1405
1419
  return /webos/i.test(n);
1406
1420
  }
1407
- function fe(n = g()) {
1421
+ function pe(n = g()) {
1408
1422
  return /iphone|ipad|ipod/i.test(n) || /macintosh/i.test(n) && /mobile/i.test(n);
1409
1423
  }
1410
- function Bn(n = g()) {
1424
+ function zn(n = g()) {
1411
1425
  var e;
1412
- return fe(n) && !!(!((e = window.navigator) === null || e === void 0) && e.standalone);
1426
+ return pe(n) && !!(!((e = window.navigator) === null || e === void 0) && e.standalone);
1413
1427
  }
1414
- function qn() {
1428
+ function Kn() {
1415
1429
  return wn() && document.documentMode === 10;
1416
1430
  }
1417
1431
  function Nt(n = g()) {
1418
- return fe(n) || At(n) || Ot(n) || Ct(n) || /windows phone/i.test(n) || Pt(n);
1432
+ return pe(n) || At(n) || Ot(n) || Ct(n) || /windows phone/i.test(n) || Pt(n);
1419
1433
  }
1420
- function zn() {
1434
+ function Jn() {
1421
1435
  try {
1422
1436
  return !!(window && window !== window.top);
1423
1437
  } catch {
@@ -1453,7 +1467,7 @@ function Lt(n, e = []) {
1453
1467
  t = n;
1454
1468
  }
1455
1469
  const i = e.length ? e.join(",") : "FirebaseCore-web";
1456
- return `${t}/JsCore/${z}/${i}`;
1470
+ return `${t}/JsCore/${J}/${i}`;
1457
1471
  }
1458
1472
  /**
1459
1473
  * @license
@@ -1471,7 +1485,7 @@ function Lt(n, e = []) {
1471
1485
  * See the License for the specific language governing permissions and
1472
1486
  * limitations under the License.
1473
1487
  */
1474
- class Kn {
1488
+ class Yn {
1475
1489
  constructor(e) {
1476
1490
  this.auth = e, this.queue = [];
1477
1491
  }
@@ -1526,8 +1540,8 @@ class Kn {
1526
1540
  * See the License for the specific language governing permissions and
1527
1541
  * limitations under the License.
1528
1542
  */
1529
- async function Jn(n, e = {}) {
1530
- return G(n, "GET", "/v2/passwordPolicy", he(n, e));
1543
+ async function Xn(n, e = {}) {
1544
+ return G(n, "GET", "/v2/passwordPolicy", fe(n, e));
1531
1545
  }
1532
1546
  /**
1533
1547
  * @license
@@ -1545,12 +1559,12 @@ async function Jn(n, e = {}) {
1545
1559
  * See the License for the specific language governing permissions and
1546
1560
  * limitations under the License.
1547
1561
  */
1548
- const Yn = 6;
1549
- class Xn {
1562
+ const Qn = 6;
1563
+ class Zn {
1550
1564
  constructor(e) {
1551
1565
  var t, i, r, s;
1552
1566
  const o = e.customStrengthOptions;
1553
- this.customStrengthOptions = {}, this.customStrengthOptions.minPasswordLength = (t = o.minPasswordLength) !== null && t !== void 0 ? t : Yn, 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;
1567
+ this.customStrengthOptions = {}, this.customStrengthOptions.minPasswordLength = (t = o.minPasswordLength) !== null && t !== void 0 ? t : Qn, 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;
1554
1568
  }
1555
1569
  validatePassword(e) {
1556
1570
  var t, i, r, s, o, c;
@@ -1633,14 +1647,14 @@ class Xn {
1633
1647
  * See the License for the specific language governing permissions and
1634
1648
  * limitations under the License.
1635
1649
  */
1636
- class Qn {
1650
+ class ei {
1637
1651
  constructor(e, t, i, r) {
1638
- 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 Xe(this), this.idTokenSubscription = new Xe(this), this.beforeStateQueue = new Kn(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 = _t, 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;
1652
+ 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 Xe(this), this.idTokenSubscription = new Xe(this), this.beforeStateQueue = new Yn(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 = _t, 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;
1639
1653
  }
1640
1654
  _initializeWithPersistence(e, t) {
1641
1655
  return t && (this._popupRedirectResolver = k(t)), this._initializationPromise = this.queue(async () => {
1642
1656
  var i, r;
1643
- if (!this._deleted && (this.persistenceManager = await $.create(this, e), !this._deleted)) {
1657
+ if (!this._deleted && (this.persistenceManager = await H.create(this, e), !this._deleted)) {
1644
1658
  if (!((i = this._popupRedirectResolver) === null || i === void 0) && i._shouldInitProactively)
1645
1659
  try {
1646
1660
  await this._popupRedirectResolver._initialize(this);
@@ -1721,7 +1735,7 @@ class Qn {
1721
1735
  }
1722
1736
  async reloadAndSetCurrentUserOrClear(e) {
1723
1737
  try {
1724
- await ce(e);
1738
+ await le(e);
1725
1739
  } catch (t) {
1726
1740
  if ((t == null ? void 0 : t.code) !== "auth/network-request-failed")
1727
1741
  return this.directlySetCurrentUser(null);
@@ -1729,7 +1743,7 @@ class Qn {
1729
1743
  return this.directlySetCurrentUser(e);
1730
1744
  }
1731
1745
  useDeviceLanguage() {
1732
- this.languageCode = Ln();
1746
+ this.languageCode = Un();
1733
1747
  }
1734
1748
  async _delete() {
1735
1749
  this._deleted = !0;
@@ -1780,14 +1794,14 @@ class Qn {
1780
1794
  return this.tenantId === null ? this._projectPasswordPolicy : this._tenantPasswordPolicies[this.tenantId];
1781
1795
  }
1782
1796
  async _updatePasswordPolicy() {
1783
- const e = await Jn(this), t = new Xn(e);
1797
+ const e = await Xn(this), t = new Zn(e);
1784
1798
  this.tenantId === null ? this._projectPasswordPolicy = t : this._tenantPasswordPolicies[this.tenantId] = t;
1785
1799
  }
1786
1800
  _getPersistence() {
1787
1801
  return this.assertedPersistence.persistence.type;
1788
1802
  }
1789
1803
  _updateErrorMap(e) {
1790
- this._errorFactory = new be("auth", "Firebase", e());
1804
+ this._errorFactory = new Se("auth", "Firebase", e());
1791
1805
  }
1792
1806
  onAuthStateChanged(e, t, i) {
1793
1807
  return this.registerStateListener(this.authStateSubscription, e, t, i);
@@ -1820,7 +1834,7 @@ class Qn {
1820
1834
  token: e,
1821
1835
  idToken: t
1822
1836
  };
1823
- this.tenantId != null && (i.tenantId = this.tenantId), await Gn(this, i);
1837
+ this.tenantId != null && (i.tenantId = this.tenantId), await qn(this, i);
1824
1838
  }
1825
1839
  }
1826
1840
  toJSON() {
@@ -1844,7 +1858,7 @@ class Qn {
1844
1858
  this,
1845
1859
  "argument-error"
1846
1860
  /* AuthErrorCode.ARGUMENT_ERROR */
1847
- ), this.redirectPersistenceManager = await $.create(
1861
+ ), this.redirectPersistenceManager = await H.create(
1848
1862
  this,
1849
1863
  [k(t._redirectPersistence)],
1850
1864
  "redirectUser"
@@ -1963,10 +1977,10 @@ class Qn {
1963
1977
  async _getAppCheckToken() {
1964
1978
  var e;
1965
1979
  const t = await ((e = this.appCheckServiceProvider.getImmediate({ optional: !0 })) === null || e === void 0 ? void 0 : e.getToken());
1966
- return t != null && t.error && Cn(`Error while retrieving App Check token: ${t.error}`), t == null ? void 0 : t.token;
1980
+ return t != null && t.error && Nn(`Error while retrieving App Check token: ${t.error}`), t == null ? void 0 : t.token;
1967
1981
  }
1968
1982
  }
1969
- function pe(n) {
1983
+ function me(n) {
1970
1984
  return j(n);
1971
1985
  }
1972
1986
  class Xe {
@@ -2006,16 +2020,16 @@ let Le = {
2006
2020
  recaptchaEnterpriseScript: "",
2007
2021
  gapiScript: ""
2008
2022
  };
2009
- function Zn(n) {
2023
+ function ti(n) {
2010
2024
  Le = n;
2011
2025
  }
2012
- function ei(n) {
2026
+ function ni(n) {
2013
2027
  return Le.loadJS(n);
2014
2028
  }
2015
- function ti() {
2029
+ function ii() {
2016
2030
  return Le.gapiScript;
2017
2031
  }
2018
- function ni(n) {
2032
+ function ri(n) {
2019
2033
  return `__${n}${Math.floor(Math.random() * 1e6)}`;
2020
2034
  }
2021
2035
  /**
@@ -2034,13 +2048,13 @@ function ni(n) {
2034
2048
  * See the License for the specific language governing permissions and
2035
2049
  * limitations under the License.
2036
2050
  */
2037
- function ii(n, e) {
2051
+ function si(n, e) {
2038
2052
  const t = pt(n, "auth");
2039
2053
  if (t.isInitialized()) {
2040
2054
  const r = t.getImmediate(), s = t.getOptions();
2041
2055
  if (In(s, e ?? {}))
2042
2056
  return r;
2043
- S(
2057
+ b(
2044
2058
  r,
2045
2059
  "already-initialized"
2046
2060
  /* AuthErrorCode.ALREADY_INITIALIZED */
@@ -2048,12 +2062,12 @@ function ii(n, e) {
2048
2062
  }
2049
2063
  return t.initialize({ options: e });
2050
2064
  }
2051
- function ri(n, e) {
2065
+ function oi(n, e) {
2052
2066
  const t = (e == null ? void 0 : e.persistence) || [], i = (Array.isArray(t) ? t : [t]).map(k);
2053
2067
  e != null && e.errorMap && n._updateErrorMap(e.errorMap), n._initializeWithPersistence(i, e == null ? void 0 : e.popupRedirectResolver);
2054
2068
  }
2055
- function si(n, e, t) {
2056
- const i = pe(n);
2069
+ function ai(n, e, t) {
2070
+ const i = me(n);
2057
2071
  u(
2058
2072
  i._canInitEmulator,
2059
2073
  i,
@@ -2065,19 +2079,19 @@ function si(n, e, t) {
2065
2079
  "invalid-emulator-scheme"
2066
2080
  /* AuthErrorCode.INVALID_EMULATOR_SCHEME */
2067
2081
  );
2068
- const r = !1, s = Mt(e), { host: o, port: c } = oi(e), a = c === null ? "" : `:${c}`;
2082
+ const r = !1, s = Mt(e), { host: o, port: c } = ci(e), a = c === null ? "" : `:${c}`;
2069
2083
  i.config.emulator = { url: `${s}//${o}${a}/` }, i.settings.appVerificationDisabledForTesting = !0, i.emulatorConfig = Object.freeze({
2070
2084
  host: o,
2071
2085
  port: c,
2072
2086
  protocol: s.replace(":", ""),
2073
2087
  options: Object.freeze({ disableWarnings: r })
2074
- }), ai();
2088
+ }), li();
2075
2089
  }
2076
2090
  function Mt(n) {
2077
2091
  const e = n.indexOf(":");
2078
2092
  return e < 0 ? "" : n.substr(0, e + 1);
2079
2093
  }
2080
- function oi(n) {
2094
+ function ci(n) {
2081
2095
  const e = Mt(n), t = /(\/\/)?([^?#/]+)/.exec(n.substr(e.length));
2082
2096
  if (!t)
2083
2097
  return { host: "", port: null };
@@ -2096,7 +2110,7 @@ function Qe(n) {
2096
2110
  const e = Number(n);
2097
2111
  return isNaN(e) ? null : e;
2098
2112
  }
2099
- function ai() {
2113
+ function li() {
2100
2114
  function n() {
2101
2115
  const e = document.createElement("p"), t = e.style;
2102
2116
  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);
@@ -2162,7 +2176,7 @@ class Ut {
2162
2176
  * limitations under the License.
2163
2177
  */
2164
2178
  async function W(n, e) {
2165
- return wt(n, "POST", "/v1/accounts:signInWithIdp", he(n, e));
2179
+ return wt(n, "POST", "/v1/accounts:signInWithIdp", fe(n, e));
2166
2180
  }
2167
2181
  /**
2168
2182
  * @license
@@ -2180,15 +2194,15 @@ async function W(n, e) {
2180
2194
  * See the License for the specific language governing permissions and
2181
2195
  * limitations under the License.
2182
2196
  */
2183
- const ci = "http://localhost";
2184
- class U extends Ut {
2197
+ const ui = "http://localhost";
2198
+ class D extends Ut {
2185
2199
  constructor() {
2186
2200
  super(...arguments), this.pendingToken = null;
2187
2201
  }
2188
2202
  /** @internal */
2189
2203
  static _fromParams(e) {
2190
- const t = new U(e.providerId, e.signInMethod);
2191
- return e.idToken || e.accessToken ? (e.idToken && (t.idToken = e.idToken), e.accessToken && (t.accessToken = e.accessToken), e.nonce && !e.pendingToken && (t.nonce = e.nonce), e.pendingToken && (t.pendingToken = e.pendingToken)) : e.oauthToken && e.oauthTokenSecret ? (t.accessToken = e.oauthToken, t.secret = e.oauthTokenSecret) : S(
2204
+ const t = new D(e.providerId, e.signInMethod);
2205
+ 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) : b(
2192
2206
  "argument-error"
2193
2207
  /* AuthErrorCode.ARGUMENT_ERROR */
2194
2208
  ), t;
@@ -2218,7 +2232,7 @@ class U extends Ut {
2218
2232
  const t = typeof e == "string" ? JSON.parse(e) : e, { providerId: i, signInMethod: r } = t, s = Pe(t, ["providerId", "signInMethod"]);
2219
2233
  if (!i || !r)
2220
2234
  return null;
2221
- const o = new U(i, r);
2235
+ const o = new D(i, r);
2222
2236
  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;
2223
2237
  }
2224
2238
  /** @internal */
@@ -2238,14 +2252,14 @@ class U extends Ut {
2238
2252
  }
2239
2253
  buildRequest() {
2240
2254
  const e = {
2241
- requestUri: ci,
2255
+ requestUri: ui,
2242
2256
  returnSecureToken: !0
2243
2257
  };
2244
2258
  if (this.pendingToken)
2245
2259
  e.pendingToken = this.pendingToken;
2246
2260
  else {
2247
2261
  const t = {};
2248
- 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 = K(t);
2262
+ 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);
2249
2263
  }
2250
2264
  return e;
2251
2265
  }
@@ -2319,7 +2333,7 @@ class Dt {
2319
2333
  * See the License for the specific language governing permissions and
2320
2334
  * limitations under the License.
2321
2335
  */
2322
- class Y extends Dt {
2336
+ class Q extends Dt {
2323
2337
  constructor() {
2324
2338
  super(...arguments), this.scopes = [];
2325
2339
  }
@@ -2354,7 +2368,7 @@ class Y extends Dt {
2354
2368
  * See the License for the specific language governing permissions and
2355
2369
  * limitations under the License.
2356
2370
  */
2357
- class A extends Y {
2371
+ class A extends Q {
2358
2372
  constructor() {
2359
2373
  super(
2360
2374
  "facebook.com"
@@ -2374,7 +2388,7 @@ class A extends Y {
2374
2388
  * @param accessToken - Facebook access token.
2375
2389
  */
2376
2390
  static credential(e) {
2377
- return U._fromParams({
2391
+ return D._fromParams({
2378
2392
  providerId: A.PROVIDER_ID,
2379
2393
  signInMethod: A.FACEBOOK_SIGN_IN_METHOD,
2380
2394
  accessToken: e
@@ -2425,7 +2439,7 @@ A.PROVIDER_ID = "facebook.com";
2425
2439
  * See the License for the specific language governing permissions and
2426
2440
  * limitations under the License.
2427
2441
  */
2428
- class C extends Y {
2442
+ class C extends Q {
2429
2443
  constructor() {
2430
2444
  super(
2431
2445
  "google.com"
@@ -2446,7 +2460,7 @@ class C extends Y {
2446
2460
  * @param accessToken - Google access token.
2447
2461
  */
2448
2462
  static credential(e, t) {
2449
- return U._fromParams({
2463
+ return D._fromParams({
2450
2464
  providerId: C.PROVIDER_ID,
2451
2465
  signInMethod: C.GOOGLE_SIGN_IN_METHOD,
2452
2466
  idToken: e,
@@ -2501,7 +2515,7 @@ C.PROVIDER_ID = "google.com";
2501
2515
  * See the License for the specific language governing permissions and
2502
2516
  * limitations under the License.
2503
2517
  */
2504
- class O extends Y {
2518
+ class O extends Q {
2505
2519
  constructor() {
2506
2520
  super(
2507
2521
  "github.com"
@@ -2514,7 +2528,7 @@ class O extends Y {
2514
2528
  * @param accessToken - Github access token.
2515
2529
  */
2516
2530
  static credential(e) {
2517
- return U._fromParams({
2531
+ return D._fromParams({
2518
2532
  providerId: O.PROVIDER_ID,
2519
2533
  signInMethod: O.GITHUB_SIGN_IN_METHOD,
2520
2534
  accessToken: e
@@ -2565,7 +2579,7 @@ O.PROVIDER_ID = "github.com";
2565
2579
  * See the License for the specific language governing permissions and
2566
2580
  * limitations under the License.
2567
2581
  */
2568
- class N extends Y {
2582
+ class N extends Q {
2569
2583
  constructor() {
2570
2584
  super(
2571
2585
  "twitter.com"
@@ -2579,7 +2593,7 @@ class N extends Y {
2579
2593
  * @param secret - Twitter secret.
2580
2594
  */
2581
2595
  static credential(e, t) {
2582
- return U._fromParams({
2596
+ return D._fromParams({
2583
2597
  providerId: N.PROVIDER_ID,
2584
2598
  signInMethod: N.TWITTER_SIGN_IN_METHOD,
2585
2599
  oauthToken: e,
@@ -2634,13 +2648,13 @@ N.PROVIDER_ID = "twitter.com";
2634
2648
  * See the License for the specific language governing permissions and
2635
2649
  * limitations under the License.
2636
2650
  */
2637
- class D {
2651
+ class F {
2638
2652
  constructor(e) {
2639
2653
  this.user = e.user, this.providerId = e.providerId, this._tokenResponse = e._tokenResponse, this.operationType = e.operationType;
2640
2654
  }
2641
2655
  static async _fromIdTokenResponse(e, t, i, r = !1) {
2642
2656
  const s = await E._fromIdTokenResponse(e, i, r), o = Ze(i);
2643
- return new D({
2657
+ return new F({
2644
2658
  user: s,
2645
2659
  providerId: o,
2646
2660
  _tokenResponse: i,
@@ -2654,7 +2668,7 @@ class D {
2654
2668
  !0
2655
2669
  );
2656
2670
  const r = Ze(i);
2657
- return new D({
2671
+ return new F({
2658
2672
  user: e,
2659
2673
  providerId: r,
2660
2674
  _tokenResponse: i,
@@ -2681,10 +2695,10 @@ function Ze(n) {
2681
2695
  * See the License for the specific language governing permissions and
2682
2696
  * limitations under the License.
2683
2697
  */
2684
- class le extends Re {
2698
+ class ue extends Re {
2685
2699
  constructor(e, t, i, r) {
2686
2700
  var s;
2687
- super(t.code, t.message), this.operationType = i, this.user = r, Object.setPrototypeOf(this, le.prototype), this.customData = {
2701
+ super(t.code, t.message), this.operationType = i, this.user = r, Object.setPrototypeOf(this, ue.prototype), this.customData = {
2688
2702
  appName: e.name,
2689
2703
  tenantId: (s = e.tenantId) !== null && s !== void 0 ? s : void 0,
2690
2704
  _serverResponse: t.customData._serverResponse,
@@ -2692,17 +2706,17 @@ class le extends Re {
2692
2706
  };
2693
2707
  }
2694
2708
  static _fromErrorAndOperation(e, t, i, r) {
2695
- return new le(e, t, i, r);
2709
+ return new ue(e, t, i, r);
2696
2710
  }
2697
2711
  }
2698
2712
  function Ft(n, e, t, i) {
2699
2713
  return (e === "reauthenticate" ? t._getReauthenticationResolver(n) : t._getIdTokenResponse(n)).catch((s) => {
2700
- throw s.code === "auth/multi-factor-auth-required" ? le._fromErrorAndOperation(n, s, e, i) : s;
2714
+ throw s.code === "auth/multi-factor-auth-required" ? ue._fromErrorAndOperation(n, s, e, i) : s;
2701
2715
  });
2702
2716
  }
2703
- async function li(n, e, t = !1) {
2704
- const i = await q(n, e._linkToIdToken(n.auth, await n.getIdToken()), t);
2705
- return D._forOperation(n, "link", i);
2717
+ async function di(n, e, t = !1) {
2718
+ const i = await K(n, e._linkToIdToken(n.auth, await n.getIdToken()), t);
2719
+ return F._forOperation(n, "link", i);
2706
2720
  }
2707
2721
  /**
2708
2722
  * @license
@@ -2720,13 +2734,13 @@ async function li(n, e, t = !1) {
2720
2734
  * See the License for the specific language governing permissions and
2721
2735
  * limitations under the License.
2722
2736
  */
2723
- async function ui(n, e, t = !1) {
2737
+ async function hi(n, e, t = !1) {
2724
2738
  const { auth: i } = n;
2725
2739
  if (w(i.app))
2726
2740
  return Promise.reject(L(i));
2727
2741
  const r = "reauthenticate";
2728
2742
  try {
2729
- const s = await q(n, Ft(i, r, e, n), t);
2743
+ const s = await K(n, Ft(i, r, e, n), t);
2730
2744
  u(
2731
2745
  s.idToken,
2732
2746
  i,
@@ -2746,9 +2760,9 @@ async function ui(n, e, t = !1) {
2746
2760
  i,
2747
2761
  "user-mismatch"
2748
2762
  /* AuthErrorCode.USER_MISMATCH */
2749
- ), D._forOperation(n, r, s);
2763
+ ), F._forOperation(n, r, s);
2750
2764
  } catch (s) {
2751
- throw (s == null ? void 0 : s.code) === "auth/user-not-found" && S(
2765
+ throw (s == null ? void 0 : s.code) === "auth/user-not-found" && b(
2752
2766
  i,
2753
2767
  "user-mismatch"
2754
2768
  /* AuthErrorCode.USER_MISMATCH */
@@ -2771,10 +2785,10 @@ async function ui(n, e, t = !1) {
2771
2785
  * See the License for the specific language governing permissions and
2772
2786
  * limitations under the License.
2773
2787
  */
2774
- async function di(n, e, t = !1) {
2788
+ async function fi(n, e, t = !1) {
2775
2789
  if (w(n.app))
2776
2790
  return Promise.reject(L(n));
2777
- const i = "signIn", r = await Ft(n, i, e), s = await D._fromIdTokenResponse(n, i, r);
2791
+ const i = "signIn", r = await Ft(n, i, e), s = await F._fromIdTokenResponse(n, i, r);
2778
2792
  return t || await n._updateCurrentUser(s.user), s;
2779
2793
  }
2780
2794
  /**
@@ -2793,8 +2807,8 @@ async function di(n, e, t = !1) {
2793
2807
  * See the License for the specific language governing permissions and
2794
2808
  * limitations under the License.
2795
2809
  */
2796
- async function hi(n, e) {
2797
- return wt(n, "POST", "/v1/accounts:signInWithCustomToken", he(n, e));
2810
+ async function pi(n, e) {
2811
+ return wt(n, "POST", "/v1/accounts:signInWithCustomToken", fe(n, e));
2798
2812
  }
2799
2813
  /**
2800
2814
  * @license
@@ -2812,22 +2826,22 @@ async function hi(n, e) {
2812
2826
  * See the License for the specific language governing permissions and
2813
2827
  * limitations under the License.
2814
2828
  */
2815
- async function fi(n, e) {
2829
+ async function mi(n, e) {
2816
2830
  if (w(n.app))
2817
2831
  return Promise.reject(L(n));
2818
- const t = pe(n), i = await hi(t, {
2832
+ const t = me(n), i = await pi(t, {
2819
2833
  token: e,
2820
2834
  returnSecureToken: !0
2821
- }), r = await D._fromIdTokenResponse(t, "signIn", i);
2835
+ }), r = await F._fromIdTokenResponse(t, "signIn", i);
2822
2836
  return await t._updateCurrentUser(r.user), r;
2823
2837
  }
2824
- function pi(n, e, t, i) {
2838
+ function gi(n, e, t, i) {
2825
2839
  return j(n).onIdTokenChanged(e, t, i);
2826
2840
  }
2827
- function mi(n, e, t) {
2841
+ function _i(n, e, t) {
2828
2842
  return j(n).beforeAuthStateChanged(e, t);
2829
2843
  }
2830
- const ue = "__sak";
2844
+ const de = "__sak";
2831
2845
  /**
2832
2846
  * @license
2833
2847
  * Copyright 2019 Google LLC
@@ -2850,7 +2864,7 @@ class xt {
2850
2864
  }
2851
2865
  _isAvailable() {
2852
2866
  try {
2853
- return this.storage ? (this.storage.setItem(ue, "1"), this.storage.removeItem(ue), Promise.resolve(!0)) : Promise.resolve(!1);
2867
+ return this.storage ? (this.storage.setItem(de, "1"), this.storage.removeItem(de), Promise.resolve(!0)) : Promise.resolve(!1);
2854
2868
  } catch {
2855
2869
  return Promise.resolve(!1);
2856
2870
  }
@@ -2885,18 +2899,18 @@ class xt {
2885
2899
  * See the License for the specific language governing permissions and
2886
2900
  * limitations under the License.
2887
2901
  */
2888
- function gi() {
2902
+ function vi() {
2889
2903
  const n = g();
2890
- return Ne(n) || fe(n);
2904
+ return Ne(n) || pe(n);
2891
2905
  }
2892
- const _i = 1e3, vi = 10;
2906
+ const Ii = 1e3, Ti = 10;
2893
2907
  class Vt extends xt {
2894
2908
  constructor() {
2895
2909
  super(
2896
2910
  () => window.localStorage,
2897
2911
  "LOCAL"
2898
2912
  /* PersistenceType.LOCAL */
2899
- ), this.boundEventHandler = (e, t) => this.onStorageEvent(e, t), this.listeners = {}, this.localCache = {}, this.pollTimer = null, this.safariLocalStorageNotSynced = gi() && zn(), this.fallbackToPolling = Nt(), this._shouldAllowMigration = !0;
2913
+ ), this.boundEventHandler = (e, t) => this.onStorageEvent(e, t), this.listeners = {}, this.localCache = {}, this.pollTimer = null, this.safariLocalStorageNotSynced = vi() && Jn(), this.fallbackToPolling = Nt(), this._shouldAllowMigration = !0;
2900
2914
  }
2901
2915
  forAllChangedKeys(e) {
2902
2916
  for (const t of Object.keys(this.listeners)) {
@@ -2923,7 +2937,7 @@ class Vt extends xt {
2923
2937
  const o = this.storage.getItem(i);
2924
2938
  !t && this.localCache[i] === o || this.notifyListeners(i, o);
2925
2939
  }, s = this.storage.getItem(i);
2926
- qn() && s !== e.newValue && e.newValue !== e.oldValue ? setTimeout(r, vi) : r();
2940
+ Kn() && s !== e.newValue && e.newValue !== e.oldValue ? setTimeout(r, Ti) : r();
2927
2941
  }
2928
2942
  notifyListeners(e, t) {
2929
2943
  this.localCache[e] = t;
@@ -2945,7 +2959,7 @@ class Vt extends xt {
2945
2959
  !0
2946
2960
  );
2947
2961
  });
2948
- }, _i);
2962
+ }, Ii);
2949
2963
  }
2950
2964
  stopPolling() {
2951
2965
  this.pollTimer && (clearInterval(this.pollTimer), this.pollTimer = null);
@@ -2975,7 +2989,7 @@ class Vt extends xt {
2975
2989
  }
2976
2990
  }
2977
2991
  Vt.type = "LOCAL";
2978
- const Ii = Vt;
2992
+ const wi = Vt;
2979
2993
  /**
2980
2994
  * @license
2981
2995
  * Copyright 2020 Google LLC
@@ -2992,7 +3006,7 @@ const Ii = Vt;
2992
3006
  * See the License for the specific language governing permissions and
2993
3007
  * limitations under the License.
2994
3008
  */
2995
- class Ht extends xt {
3009
+ class $t extends xt {
2996
3010
  constructor() {
2997
3011
  super(
2998
3012
  () => window.sessionStorage,
@@ -3005,8 +3019,8 @@ class Ht extends xt {
3005
3019
  _removeListener(e, t) {
3006
3020
  }
3007
3021
  }
3008
- Ht.type = "SESSION";
3009
- const $t = Ht;
3022
+ $t.type = "SESSION";
3023
+ const Ht = $t;
3010
3024
  /**
3011
3025
  * @license
3012
3026
  * Copyright 2019 Google LLC
@@ -3023,7 +3037,7 @@ const $t = Ht;
3023
3037
  * See the License for the specific language governing permissions and
3024
3038
  * limitations under the License.
3025
3039
  */
3026
- function Ti(n) {
3040
+ function yi(n) {
3027
3041
  return Promise.all(n.map(async (e) => {
3028
3042
  try {
3029
3043
  return {
@@ -3054,7 +3068,7 @@ function Ti(n) {
3054
3068
  * See the License for the specific language governing permissions and
3055
3069
  * limitations under the License.
3056
3070
  */
3057
- class me {
3071
+ class ge {
3058
3072
  constructor(e) {
3059
3073
  this.eventTarget = e, this.handlersMap = {}, this.boundEventHandler = this.handleEvent.bind(this);
3060
3074
  }
@@ -3068,7 +3082,7 @@ class me {
3068
3082
  const t = this.receivers.find((r) => r.isListeningto(e));
3069
3083
  if (t)
3070
3084
  return t;
3071
- const i = new me(e);
3085
+ const i = new ge(e);
3072
3086
  return this.receivers.push(i), i;
3073
3087
  }
3074
3088
  isListeningto(e) {
@@ -3093,7 +3107,7 @@ class me {
3093
3107
  eventId: i,
3094
3108
  eventType: r
3095
3109
  });
3096
- const c = Array.from(o).map(async (l) => l(t.origin, s)), a = await Ti(c);
3110
+ const c = Array.from(o).map(async (l) => l(t.origin, s)), a = await yi(c);
3097
3111
  t.ports[0].postMessage({
3098
3112
  status: "done",
3099
3113
  eventId: i,
@@ -3122,7 +3136,7 @@ class me {
3122
3136
  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);
3123
3137
  }
3124
3138
  }
3125
- me.receivers = [];
3139
+ ge.receivers = [];
3126
3140
  /**
3127
3141
  * @license
3128
3142
  * Copyright 2020 Google LLC
@@ -3161,7 +3175,7 @@ function Me(n = "", e = 10) {
3161
3175
  * See the License for the specific language governing permissions and
3162
3176
  * limitations under the License.
3163
3177
  */
3164
- class wi {
3178
+ class Ei {
3165
3179
  constructor(e) {
3166
3180
  this.target = e, this.handlers = /* @__PURE__ */ new Set();
3167
3181
  }
@@ -3205,8 +3219,8 @@ class wi {
3205
3219
  }, i);
3206
3220
  o = {
3207
3221
  messageChannel: r,
3208
- onMessage(h) {
3209
- const _ = h;
3222
+ onMessage(f) {
3223
+ const _ = f;
3210
3224
  if (_.data.eventId === l)
3211
3225
  switch (_.data.status) {
3212
3226
  case "ack":
@@ -3261,7 +3275,7 @@ class wi {
3261
3275
  function T() {
3262
3276
  return window;
3263
3277
  }
3264
- function yi(n) {
3278
+ function ki(n) {
3265
3279
  T().location.href = n;
3266
3280
  }
3267
3281
  /**
@@ -3283,7 +3297,7 @@ function yi(n) {
3283
3297
  function Wt() {
3284
3298
  return typeof T().WorkerGlobalScope < "u" && typeof T().importScripts == "function";
3285
3299
  }
3286
- async function Ei() {
3300
+ async function bi() {
3287
3301
  if (!(navigator != null && navigator.serviceWorker))
3288
3302
  return null;
3289
3303
  try {
@@ -3292,11 +3306,11 @@ async function Ei() {
3292
3306
  return null;
3293
3307
  }
3294
3308
  }
3295
- function ki() {
3309
+ function Si() {
3296
3310
  var n;
3297
3311
  return ((n = navigator == null ? void 0 : navigator.serviceWorker) === null || n === void 0 ? void 0 : n.controller) || null;
3298
3312
  }
3299
- function Si() {
3313
+ function Ri() {
3300
3314
  return Wt() ? self : null;
3301
3315
  }
3302
3316
  /**
@@ -3315,8 +3329,8 @@ function Si() {
3315
3329
  * See the License for the specific language governing permissions and
3316
3330
  * limitations under the License.
3317
3331
  */
3318
- const jt = "firebaseLocalStorageDb", bi = 1, de = "firebaseLocalStorage", Gt = "fbase_key";
3319
- class X {
3332
+ const jt = "firebaseLocalStorageDb", Pi = 1, he = "firebaseLocalStorage", Gt = "fbase_key";
3333
+ class Z {
3320
3334
  constructor(e) {
3321
3335
  this.request = e;
3322
3336
  }
@@ -3330,47 +3344,47 @@ class X {
3330
3344
  });
3331
3345
  }
3332
3346
  }
3333
- function ge(n, e) {
3334
- return n.transaction([de], e ? "readwrite" : "readonly").objectStore(de);
3347
+ function _e(n, e) {
3348
+ return n.transaction([he], e ? "readwrite" : "readonly").objectStore(he);
3335
3349
  }
3336
- function Ri() {
3350
+ function Ai() {
3337
3351
  const n = indexedDB.deleteDatabase(jt);
3338
- return new X(n).toPromise();
3352
+ return new Z(n).toPromise();
3339
3353
  }
3340
- function Se() {
3341
- const n = indexedDB.open(jt, bi);
3354
+ function be() {
3355
+ const n = indexedDB.open(jt, Pi);
3342
3356
  return new Promise((e, t) => {
3343
3357
  n.addEventListener("error", () => {
3344
3358
  t(n.error);
3345
3359
  }), n.addEventListener("upgradeneeded", () => {
3346
3360
  const i = n.result;
3347
3361
  try {
3348
- i.createObjectStore(de, { keyPath: Gt });
3362
+ i.createObjectStore(he, { keyPath: Gt });
3349
3363
  } catch (r) {
3350
3364
  t(r);
3351
3365
  }
3352
3366
  }), n.addEventListener("success", async () => {
3353
3367
  const i = n.result;
3354
- i.objectStoreNames.contains(de) ? e(i) : (i.close(), await Ri(), e(await Se()));
3368
+ i.objectStoreNames.contains(he) ? e(i) : (i.close(), await Ai(), e(await be()));
3355
3369
  });
3356
3370
  });
3357
3371
  }
3358
3372
  async function et(n, e, t) {
3359
- const i = ge(n, !0).put({
3373
+ const i = _e(n, !0).put({
3360
3374
  [Gt]: e,
3361
3375
  value: t
3362
3376
  });
3363
- return new X(i).toPromise();
3377
+ return new Z(i).toPromise();
3364
3378
  }
3365
- async function Pi(n, e) {
3366
- const t = ge(n, !1).get(e), i = await new X(t).toPromise();
3379
+ async function Ci(n, e) {
3380
+ const t = _e(n, !1).get(e), i = await new Z(t).toPromise();
3367
3381
  return i === void 0 ? null : i.value;
3368
3382
  }
3369
3383
  function tt(n, e) {
3370
- const t = ge(n, !0).delete(e);
3371
- return new X(t).toPromise();
3384
+ const t = _e(n, !0).delete(e);
3385
+ return new Z(t).toPromise();
3372
3386
  }
3373
- const Ai = 800, Ci = 3;
3387
+ const Oi = 800, Ni = 3;
3374
3388
  class Bt {
3375
3389
  constructor() {
3376
3390
  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(() => {
@@ -3378,7 +3392,7 @@ class Bt {
3378
3392
  });
3379
3393
  }
3380
3394
  async _openDb() {
3381
- return this.db ? this.db : (this.db = await Se(), this.db);
3395
+ return this.db ? this.db : (this.db = await be(), this.db);
3382
3396
  }
3383
3397
  async _withRetries(e) {
3384
3398
  let t = 0;
@@ -3387,7 +3401,7 @@ class Bt {
3387
3401
  const i = await this._openDb();
3388
3402
  return await e(i);
3389
3403
  } catch (i) {
3390
- if (t++ > Ci)
3404
+ if (t++ > Ni)
3391
3405
  throw i;
3392
3406
  this.db && (this.db.close(), this.db = void 0);
3393
3407
  }
@@ -3403,7 +3417,7 @@ class Bt {
3403
3417
  * As the worker we should listen to events from the main window.
3404
3418
  */
3405
3419
  async initializeReceiver() {
3406
- this.receiver = me._getInstance(Si()), this.receiver._subscribe("keyChanged", async (e, t) => ({
3420
+ this.receiver = ge._getInstance(Ri()), this.receiver._subscribe("keyChanged", async (e, t) => ({
3407
3421
  keyProcessed: (await this._poll()).includes(t.key)
3408
3422
  })), this.receiver._subscribe("ping", async (e, t) => [
3409
3423
  "keyChanged"
@@ -3419,9 +3433,9 @@ class Bt {
3419
3433
  */
3420
3434
  async initializeSender() {
3421
3435
  var e, t;
3422
- if (this.activeServiceWorker = await Ei(), !this.activeServiceWorker)
3436
+ if (this.activeServiceWorker = await bi(), !this.activeServiceWorker)
3423
3437
  return;
3424
- this.sender = new wi(this.activeServiceWorker);
3438
+ this.sender = new Ei(this.activeServiceWorker);
3425
3439
  const i = await this.sender._send(
3426
3440
  "ping",
3427
3441
  {},
@@ -3443,7 +3457,7 @@ class Bt {
3443
3457
  * @param key - Storage key which changed.
3444
3458
  */
3445
3459
  async notifyServiceWorker(e) {
3446
- if (!(!this.sender || !this.activeServiceWorker || ki() !== this.activeServiceWorker))
3460
+ if (!(!this.sender || !this.activeServiceWorker || Si() !== this.activeServiceWorker))
3447
3461
  try {
3448
3462
  await this.sender._send(
3449
3463
  "keyChanged",
@@ -3459,8 +3473,8 @@ class Bt {
3459
3473
  try {
3460
3474
  if (!indexedDB)
3461
3475
  return !1;
3462
- const e = await Se();
3463
- return await et(e, ue, "1"), await tt(e, ue), !0;
3476
+ const e = await be();
3477
+ return await et(e, de, "1"), await tt(e, de), !0;
3464
3478
  } catch {
3465
3479
  }
3466
3480
  return !1;
@@ -3477,7 +3491,7 @@ class Bt {
3477
3491
  return this._withPendingWrite(async () => (await this._withRetries((i) => et(i, e, t)), this.localCache[e] = t, this.notifyServiceWorker(e)));
3478
3492
  }
3479
3493
  async _get(e) {
3480
- const t = await this._withRetries((i) => Pi(i, e));
3494
+ const t = await this._withRetries((i) => Ci(i, e));
3481
3495
  return this.localCache[e] = t, t;
3482
3496
  }
3483
3497
  async _remove(e) {
@@ -3485,8 +3499,8 @@ class Bt {
3485
3499
  }
3486
3500
  async _poll() {
3487
3501
  const e = await this._withRetries((r) => {
3488
- const s = ge(r, !1).getAll();
3489
- return new X(s).toPromise();
3502
+ const s = _e(r, !1).getAll();
3503
+ return new Z(s).toPromise();
3490
3504
  });
3491
3505
  if (!e)
3492
3506
  return [];
@@ -3508,7 +3522,7 @@ class Bt {
3508
3522
  r(t);
3509
3523
  }
3510
3524
  startPolling() {
3511
- this.stopPolling(), this.pollTimer = setInterval(async () => this._poll(), Ai);
3525
+ this.stopPolling(), this.pollTimer = setInterval(async () => this._poll(), Oi);
3512
3526
  }
3513
3527
  stopPolling() {
3514
3528
  this.pollTimer && (clearInterval(this.pollTimer), this.pollTimer = null);
@@ -3521,8 +3535,8 @@ class Bt {
3521
3535
  }
3522
3536
  }
3523
3537
  Bt.type = "LOCAL";
3524
- const Oi = Bt;
3525
- new J(3e4, 6e4);
3538
+ const Li = Bt;
3539
+ new X(3e4, 6e4);
3526
3540
  /**
3527
3541
  * @license
3528
3542
  * Copyright 2021 Google LLC
@@ -3539,7 +3553,7 @@ new J(3e4, 6e4);
3539
3553
  * See the License for the specific language governing permissions and
3540
3554
  * limitations under the License.
3541
3555
  */
3542
- function Ni(n, e) {
3556
+ function Mi(n, e) {
3543
3557
  return e ? k(e) : (u(
3544
3558
  n._popupRedirectResolver,
3545
3559
  n,
@@ -3593,26 +3607,26 @@ class Ue extends Ut {
3593
3607
  return e && (t.idToken = e), t;
3594
3608
  }
3595
3609
  }
3596
- function Li(n) {
3597
- return di(n.auth, new Ue(n), n.bypassAuthState);
3610
+ function Ui(n) {
3611
+ return fi(n.auth, new Ue(n), n.bypassAuthState);
3598
3612
  }
3599
- function Mi(n) {
3613
+ function Di(n) {
3600
3614
  const { auth: e, user: t } = n;
3601
3615
  return u(
3602
3616
  t,
3603
3617
  e,
3604
3618
  "internal-error"
3605
3619
  /* AuthErrorCode.INTERNAL_ERROR */
3606
- ), ui(t, new Ue(n), n.bypassAuthState);
3620
+ ), hi(t, new Ue(n), n.bypassAuthState);
3607
3621
  }
3608
- async function Ui(n) {
3622
+ async function Fi(n) {
3609
3623
  const { auth: e, user: t } = n;
3610
3624
  return u(
3611
3625
  t,
3612
3626
  e,
3613
3627
  "internal-error"
3614
3628
  /* AuthErrorCode.INTERNAL_ERROR */
3615
- ), li(t, new Ue(n), n.bypassAuthState);
3629
+ ), di(t, new Ue(n), n.bypassAuthState);
3616
3630
  }
3617
3631
  /**
3618
3632
  * @license
@@ -3672,15 +3686,15 @@ class qt {
3672
3686
  switch (e) {
3673
3687
  case "signInViaPopup":
3674
3688
  case "signInViaRedirect":
3675
- return Li;
3689
+ return Ui;
3676
3690
  case "linkViaPopup":
3677
3691
  case "linkViaRedirect":
3678
- return Ui;
3692
+ return Fi;
3679
3693
  case "reauthViaPopup":
3680
3694
  case "reauthViaRedirect":
3681
- return Mi;
3695
+ return Di;
3682
3696
  default:
3683
- S(
3697
+ b(
3684
3698
  this.auth,
3685
3699
  "internal-error"
3686
3700
  /* AuthErrorCode.INTERNAL_ERROR */
@@ -3688,10 +3702,10 @@ class qt {
3688
3702
  }
3689
3703
  }
3690
3704
  resolve(e) {
3691
- b(this.pendingPromise, "Pending promise was never set"), this.pendingPromise.resolve(e), this.unregisterAndCleanUp();
3705
+ S(this.pendingPromise, "Pending promise was never set"), this.pendingPromise.resolve(e), this.unregisterAndCleanUp();
3692
3706
  }
3693
3707
  reject(e) {
3694
- b(this.pendingPromise, "Pending promise was never set"), this.pendingPromise.reject(e), this.unregisterAndCleanUp();
3708
+ S(this.pendingPromise, "Pending promise was never set"), this.pendingPromise.reject(e), this.unregisterAndCleanUp();
3695
3709
  }
3696
3710
  unregisterAndCleanUp() {
3697
3711
  this.eventManager && this.eventManager.unregisterConsumer(this), this.pendingPromise = null, this.cleanUp();
@@ -3713,7 +3727,7 @@ class qt {
3713
3727
  * See the License for the specific language governing permissions and
3714
3728
  * limitations under the License.
3715
3729
  */
3716
- const Di = new J(2e3, 1e4);
3730
+ const xi = new X(2e3, 1e4);
3717
3731
  class V extends qt {
3718
3732
  constructor(e, t, i, r, s) {
3719
3733
  super(e, t, r, s), this.provider = i, this.authWindow = null, this.pollId = null, V.currentPopupAction && V.currentPopupAction.cancel(), V.currentPopupAction = this;
@@ -3728,7 +3742,7 @@ class V extends qt {
3728
3742
  ), e;
3729
3743
  }
3730
3744
  async onExecution() {
3731
- b(this.filter.length === 1, "Popup operations only handle one event");
3745
+ S(this.filter.length === 1, "Popup operations only handle one event");
3732
3746
  const e = Me();
3733
3747
  this.authWindow = await this.resolver._openPopup(
3734
3748
  this.auth,
@@ -3777,7 +3791,7 @@ class V extends qt {
3777
3791
  );
3778
3792
  return;
3779
3793
  }
3780
- this.pollId = window.setTimeout(e, Di.get());
3794
+ this.pollId = window.setTimeout(e, xi.get());
3781
3795
  };
3782
3796
  e();
3783
3797
  }
@@ -3799,8 +3813,8 @@ V.currentPopupAction = null;
3799
3813
  * See the License for the specific language governing permissions and
3800
3814
  * limitations under the License.
3801
3815
  */
3802
- const Fi = "pendingRedirect", se = /* @__PURE__ */ new Map();
3803
- class xi extends qt {
3816
+ const Vi = "pendingRedirect", oe = /* @__PURE__ */ new Map();
3817
+ class $i extends qt {
3804
3818
  constructor(e, t, i = !1) {
3805
3819
  super(e, [
3806
3820
  "signInViaRedirect",
@@ -3815,17 +3829,17 @@ class xi extends qt {
3815
3829
  * just return it.
3816
3830
  */
3817
3831
  async execute() {
3818
- let e = se.get(this.auth._key());
3832
+ let e = oe.get(this.auth._key());
3819
3833
  if (!e) {
3820
3834
  try {
3821
- const i = await Vi(this.resolver, this.auth) ? await super.execute() : null;
3835
+ const i = await Hi(this.resolver, this.auth) ? await super.execute() : null;
3822
3836
  e = () => Promise.resolve(i);
3823
3837
  } catch (t) {
3824
3838
  e = () => Promise.reject(t);
3825
3839
  }
3826
- se.set(this.auth._key(), e);
3840
+ oe.set(this.auth._key(), e);
3827
3841
  }
3828
- return this.bypassAuthState || se.set(this.auth._key(), () => Promise.resolve(null)), e();
3842
+ return this.bypassAuthState || oe.set(this.auth._key(), () => Promise.resolve(null)), e();
3829
3843
  }
3830
3844
  async onAuthEvent(e) {
3831
3845
  if (e.type === "signInViaRedirect")
@@ -3846,26 +3860,26 @@ class xi extends qt {
3846
3860
  cleanUp() {
3847
3861
  }
3848
3862
  }
3849
- async function Vi(n, e) {
3850
- const t = Wi(e), i = $i(n);
3863
+ async function Hi(n, e) {
3864
+ const t = Gi(e), i = ji(n);
3851
3865
  if (!await i._isAvailable())
3852
3866
  return !1;
3853
3867
  const r = await i._get(t) === "true";
3854
3868
  return await i._remove(t), r;
3855
3869
  }
3856
- function Hi(n, e) {
3857
- se.set(n._key(), e);
3870
+ function Wi(n, e) {
3871
+ oe.set(n._key(), e);
3858
3872
  }
3859
- function $i(n) {
3873
+ function ji(n) {
3860
3874
  return k(n._redirectPersistence);
3861
3875
  }
3862
- function Wi(n) {
3863
- return re(Fi, n.config.apiKey, n.name);
3876
+ function Gi(n) {
3877
+ return se(Vi, n.config.apiKey, n.name);
3864
3878
  }
3865
- async function ji(n, e, t = !1) {
3879
+ async function Bi(n, e, t = !1) {
3866
3880
  if (w(n.app))
3867
3881
  return Promise.reject(L(n));
3868
- const i = pe(n), r = Ni(i, e), o = await new xi(i, r, t).execute();
3882
+ const i = me(n), r = Mi(i, e), o = await new $i(i, r, t).execute();
3869
3883
  return o && !t && (delete o.user._redirectEventId, await i._persistUserIfCurrent(o.user), await i._setRedirectUser(null, e)), o;
3870
3884
  }
3871
3885
  /**
@@ -3884,8 +3898,8 @@ async function ji(n, e, t = !1) {
3884
3898
  * See the License for the specific language governing permissions and
3885
3899
  * limitations under the License.
3886
3900
  */
3887
- const Gi = 10 * 60 * 1e3;
3888
- class Bi {
3901
+ const qi = 10 * 60 * 1e3;
3902
+ class zi {
3889
3903
  constructor(e) {
3890
3904
  this.auth = e, this.cachedEventUids = /* @__PURE__ */ new Set(), this.consumers = /* @__PURE__ */ new Set(), this.queuedRedirectEvent = null, this.hasHandledPotentialRedirect = !1, this.lastProcessedEventTime = Date.now();
3891
3905
  }
@@ -3901,7 +3915,7 @@ class Bi {
3901
3915
  let t = !1;
3902
3916
  return this.consumers.forEach((i) => {
3903
3917
  this.isEventForConsumer(e, i) && (t = !0, this.sendToConsumer(e, i), this.saveEventToCache(e));
3904
- }), this.hasHandledPotentialRedirect || !qi(e) || (this.hasHandledPotentialRedirect = !0, t || (this.queuedRedirectEvent = e, t = !0)), t;
3918
+ }), this.hasHandledPotentialRedirect || !Ki(e) || (this.hasHandledPotentialRedirect = !0, t || (this.queuedRedirectEvent = e, t = !0)), t;
3905
3919
  }
3906
3920
  sendToConsumer(e, t) {
3907
3921
  var i;
@@ -3916,7 +3930,7 @@ class Bi {
3916
3930
  return t.filter.includes(e.type) && i;
3917
3931
  }
3918
3932
  hasEventBeenHandled(e) {
3919
- return Date.now() - this.lastProcessedEventTime >= Gi && this.cachedEventUids.clear(), this.cachedEventUids.has(nt(e));
3933
+ return Date.now() - this.lastProcessedEventTime >= qi && this.cachedEventUids.clear(), this.cachedEventUids.has(nt(e));
3920
3934
  }
3921
3935
  saveEventToCache(e) {
3922
3936
  this.cachedEventUids.add(nt(e)), this.lastProcessedEventTime = Date.now();
@@ -3928,7 +3942,7 @@ function nt(n) {
3928
3942
  function zt({ type: n, error: e }) {
3929
3943
  return n === "unknown" && (e == null ? void 0 : e.code) === "auth/no-auth-event";
3930
3944
  }
3931
- function qi(n) {
3945
+ function Ki(n) {
3932
3946
  switch (n.type) {
3933
3947
  case "signInViaRedirect":
3934
3948
  case "linkViaRedirect":
@@ -3956,7 +3970,7 @@ function qi(n) {
3956
3970
  * See the License for the specific language governing permissions and
3957
3971
  * limitations under the License.
3958
3972
  */
3959
- async function zi(n, e = {}) {
3973
+ async function Ji(n, e = {}) {
3960
3974
  return G(n, "GET", "/v1/projects", e);
3961
3975
  }
3962
3976
  /**
@@ -3975,32 +3989,32 @@ async function zi(n, e = {}) {
3975
3989
  * See the License for the specific language governing permissions and
3976
3990
  * limitations under the License.
3977
3991
  */
3978
- const Ki = /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/, Ji = /^https?/;
3979
- async function Yi(n) {
3992
+ const Yi = /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/, Xi = /^https?/;
3993
+ async function Qi(n) {
3980
3994
  if (n.config.emulator)
3981
3995
  return;
3982
- const { authorizedDomains: e } = await zi(n);
3996
+ const { authorizedDomains: e } = await Ji(n);
3983
3997
  for (const t of e)
3984
3998
  try {
3985
- if (Xi(t))
3999
+ if (Zi(t))
3986
4000
  return;
3987
4001
  } catch {
3988
4002
  }
3989
- S(
4003
+ b(
3990
4004
  n,
3991
4005
  "unauthorized-domain"
3992
4006
  /* AuthErrorCode.INVALID_ORIGIN */
3993
4007
  );
3994
4008
  }
3995
- function Xi(n) {
4009
+ function Zi(n) {
3996
4010
  const e = Ee(), { protocol: t, hostname: i } = new URL(e);
3997
4011
  if (n.startsWith("chrome-extension://")) {
3998
4012
  const o = new URL(n);
3999
4013
  return o.hostname === "" && i === "" ? t === "chrome-extension:" && n.replace("chrome-extension://", "") === e.replace("chrome-extension://", "") : t === "chrome-extension:" && o.hostname === i;
4000
4014
  }
4001
- if (!Ji.test(t))
4015
+ if (!Xi.test(t))
4002
4016
  return !1;
4003
- if (Ki.test(n))
4017
+ if (Yi.test(n))
4004
4018
  return i === n;
4005
4019
  const r = n.replace(/\./g, "\\.");
4006
4020
  return new RegExp("^(.+\\." + r + "|" + r + ")$", "i").test(i);
@@ -4021,7 +4035,7 @@ function Xi(n) {
4021
4035
  * See the License for the specific language governing permissions and
4022
4036
  * limitations under the License.
4023
4037
  */
4024
- const Qi = new J(3e4, 6e4);
4038
+ const er = new X(3e4, 6e4);
4025
4039
  function it() {
4026
4040
  const n = T().___jsl;
4027
4041
  if (n != null && n.H) {
@@ -4031,7 +4045,7 @@ function it() {
4031
4045
  n.CP[t] = null;
4032
4046
  }
4033
4047
  }
4034
- function Zi(n) {
4048
+ function tr(n) {
4035
4049
  return new Promise((e, t) => {
4036
4050
  var i, r, s;
4037
4051
  function o() {
@@ -4046,7 +4060,7 @@ function Zi(n) {
4046
4060
  /* AuthErrorCode.NETWORK_REQUEST_FAILED */
4047
4061
  ));
4048
4062
  },
4049
- timeout: Qi.get()
4063
+ timeout: er.get()
4050
4064
  });
4051
4065
  }
4052
4066
  if (!((r = (i = T().gapi) === null || i === void 0 ? void 0 : i.iframes) === null || r === void 0) && r.Iframe)
@@ -4054,22 +4068,22 @@ function Zi(n) {
4054
4068
  else if (!((s = T().gapi) === null || s === void 0) && s.load)
4055
4069
  o();
4056
4070
  else {
4057
- const c = ni("iframefcb");
4071
+ const c = ri("iframefcb");
4058
4072
  return T()[c] = () => {
4059
4073
  gapi.load ? o() : t(I(
4060
4074
  n,
4061
4075
  "network-request-failed"
4062
4076
  /* AuthErrorCode.NETWORK_REQUEST_FAILED */
4063
4077
  ));
4064
- }, ei(`${ti()}?onload=${c}`).catch((a) => t(a));
4078
+ }, ni(`${ii()}?onload=${c}`).catch((a) => t(a));
4065
4079
  }
4066
4080
  }).catch((e) => {
4067
- throw oe = null, e;
4081
+ throw ae = null, e;
4068
4082
  });
4069
4083
  }
4070
- let oe = null;
4071
- function er(n) {
4072
- return oe = oe || Zi(n), oe;
4084
+ let ae = null;
4085
+ function nr(n) {
4086
+ return ae = ae || tr(n), ae;
4073
4087
  }
4074
4088
  /**
4075
4089
  * @license
@@ -4087,7 +4101,7 @@ function er(n) {
4087
4101
  * See the License for the specific language governing permissions and
4088
4102
  * limitations under the License.
4089
4103
  */
4090
- const tr = new J(5e3, 15e3), nr = "__/auth/iframe", ir = "emulator/auth/iframe", rr = {
4104
+ const ir = new X(5e3, 15e3), rr = "__/auth/iframe", sr = "emulator/auth/iframe", or = {
4091
4105
  style: {
4092
4106
  position: "absolute",
4093
4107
  top: "-100px",
@@ -4096,13 +4110,13 @@ const tr = new J(5e3, 15e3), nr = "__/auth/iframe", ir = "emulator/auth/iframe",
4096
4110
  },
4097
4111
  "aria-hidden": "true",
4098
4112
  tabindex: "-1"
4099
- }, sr = /* @__PURE__ */ new Map([
4113
+ }, ar = /* @__PURE__ */ new Map([
4100
4114
  ["identitytoolkit.googleapis.com", "p"],
4101
4115
  ["staging-identitytoolkit.sandbox.googleapis.com", "s"],
4102
4116
  ["test-identitytoolkit.sandbox.googleapis.com", "t"]
4103
4117
  // test
4104
4118
  ]);
4105
- function or(n) {
4119
+ function cr(n) {
4106
4120
  const e = n.config;
4107
4121
  u(
4108
4122
  e.authDomain,
@@ -4110,17 +4124,17 @@ function or(n) {
4110
4124
  "auth-domain-config-required"
4111
4125
  /* AuthErrorCode.MISSING_AUTH_DOMAIN */
4112
4126
  );
4113
- const t = e.emulator ? Ce(e, ir) : `https://${n.config.authDomain}/${nr}`, i = {
4127
+ const t = e.emulator ? Ce(e, sr) : `https://${n.config.authDomain}/${rr}`, i = {
4114
4128
  apiKey: e.apiKey,
4115
4129
  appName: n.name,
4116
- v: z
4117
- }, r = sr.get(n.config.apiHost);
4130
+ v: J
4131
+ }, r = ar.get(n.config.apiHost);
4118
4132
  r && (i.eid = r);
4119
4133
  const s = n._getFrameworks();
4120
- return s.length && (i.fw = s.join(",")), `${t}?${K(i).slice(1)}`;
4134
+ return s.length && (i.fw = s.join(",")), `${t}?${Y(i).slice(1)}`;
4121
4135
  }
4122
- async function ar(n) {
4123
- const e = await er(n), t = T().gapi;
4136
+ async function lr(n) {
4137
+ const e = await nr(n), t = T().gapi;
4124
4138
  return u(
4125
4139
  t,
4126
4140
  n,
@@ -4128,9 +4142,9 @@ async function ar(n) {
4128
4142
  /* AuthErrorCode.INTERNAL_ERROR */
4129
4143
  ), e.open({
4130
4144
  where: document.body,
4131
- url: or(n),
4145
+ url: cr(n),
4132
4146
  messageHandlersFilter: t.iframes.CROSS_ORIGIN_IFRAMES_FILTER,
4133
- attributes: rr,
4147
+ attributes: or,
4134
4148
  dontclear: !0
4135
4149
  }, (i) => new Promise(async (r, s) => {
4136
4150
  await i.restyle({
@@ -4143,7 +4157,7 @@ async function ar(n) {
4143
4157
  /* AuthErrorCode.NETWORK_REQUEST_FAILED */
4144
4158
  ), c = T().setTimeout(() => {
4145
4159
  s(o);
4146
- }, tr.get());
4160
+ }, ir.get());
4147
4161
  function a() {
4148
4162
  T().clearTimeout(c), r(i);
4149
4163
  }
@@ -4168,12 +4182,12 @@ async function ar(n) {
4168
4182
  * See the License for the specific language governing permissions and
4169
4183
  * limitations under the License.
4170
4184
  */
4171
- const cr = {
4185
+ const ur = {
4172
4186
  location: "yes",
4173
4187
  resizable: "yes",
4174
4188
  statusbar: "yes",
4175
4189
  toolbar: "no"
4176
- }, lr = 500, ur = 600, dr = "_blank", hr = "http://localhost";
4190
+ }, dr = 500, hr = 600, fr = "_blank", pr = "http://localhost";
4177
4191
  class rt {
4178
4192
  constructor(e) {
4179
4193
  this.window = e, this.associatedEvent = null;
@@ -4186,33 +4200,33 @@ class rt {
4186
4200
  }
4187
4201
  }
4188
4202
  }
4189
- function fr(n, e, t, i = lr, r = ur) {
4203
+ function mr(n, e, t, i = dr, r = hr) {
4190
4204
  const s = Math.max((window.screen.availHeight - r) / 2, 0).toString(), o = Math.max((window.screen.availWidth - i) / 2, 0).toString();
4191
4205
  let c = "";
4192
- const a = Object.assign(Object.assign({}, cr), {
4206
+ const a = Object.assign(Object.assign({}, ur), {
4193
4207
  width: i.toString(),
4194
4208
  height: r.toString(),
4195
4209
  top: s,
4196
4210
  left: o
4197
4211
  }), l = g().toLowerCase();
4198
- t && (c = Rt(l) ? dr : t), bt(l) && (e = e || hr, a.scrollbars = "yes");
4199
- const d = Object.entries(a).reduce((_, [F, M]) => `${_}${F}=${M},`, "");
4200
- if (Bn(l) && c !== "_self")
4201
- return pr(e || "", c), new rt(null);
4202
- const h = window.open(e || "", c, d);
4212
+ t && (c = Rt(l) ? fr : t), St(l) && (e = e || pr, a.scrollbars = "yes");
4213
+ const d = Object.entries(a).reduce((_, [x, M]) => `${_}${x}=${M},`, "");
4214
+ if (zn(l) && c !== "_self")
4215
+ return gr(e || "", c), new rt(null);
4216
+ const f = window.open(e || "", c, d);
4203
4217
  u(
4204
- h,
4218
+ f,
4205
4219
  n,
4206
4220
  "popup-blocked"
4207
4221
  /* AuthErrorCode.POPUP_BLOCKED */
4208
4222
  );
4209
4223
  try {
4210
- h.focus();
4224
+ f.focus();
4211
4225
  } catch {
4212
4226
  }
4213
- return new rt(h);
4227
+ return new rt(f);
4214
4228
  }
4215
- function pr(n, e) {
4229
+ function gr(n, e) {
4216
4230
  const t = document.createElement("a");
4217
4231
  t.href = n, t.target = e;
4218
4232
  const i = document.createEvent("MouseEvent");
@@ -4234,7 +4248,7 @@ function pr(n, e) {
4234
4248
  * See the License for the specific language governing permissions and
4235
4249
  * limitations under the License.
4236
4250
  */
4237
- const mr = "__/auth/handler", gr = "emulator/auth/handler", _r = encodeURIComponent("fac");
4251
+ const _r = "__/auth/handler", vr = "emulator/auth/handler", Ir = encodeURIComponent("fac");
4238
4252
  async function st(n, e, t, i, r, s) {
4239
4253
  u(
4240
4254
  n.config.authDomain,
@@ -4252,27 +4266,27 @@ async function st(n, e, t, i, r, s) {
4252
4266
  appName: n.name,
4253
4267
  authType: t,
4254
4268
  redirectUrl: i,
4255
- v: z,
4269
+ v: J,
4256
4270
  eventId: r
4257
4271
  };
4258
4272
  if (e instanceof Dt) {
4259
4273
  e.setDefaultLanguage(n.languageCode), o.providerId = e.providerId || "", yn(e.getCustomParameters()) || (o.customParameters = JSON.stringify(e.getCustomParameters()));
4260
- for (const [d, h] of Object.entries({}))
4261
- o[d] = h;
4274
+ for (const [d, f] of Object.entries({}))
4275
+ o[d] = f;
4262
4276
  }
4263
- if (e instanceof Y) {
4264
- const d = e.getScopes().filter((h) => h !== "");
4277
+ if (e instanceof Q) {
4278
+ const d = e.getScopes().filter((f) => f !== "");
4265
4279
  d.length > 0 && (o.scopes = d.join(","));
4266
4280
  }
4267
4281
  n.tenantId && (o.tid = n.tenantId);
4268
4282
  const c = o;
4269
4283
  for (const d of Object.keys(c))
4270
4284
  c[d] === void 0 && delete c[d];
4271
- const a = await n._getAppCheckToken(), l = a ? `#${_r}=${encodeURIComponent(a)}` : "";
4272
- return `${vr(n)}?${K(c).slice(1)}${l}`;
4285
+ const a = await n._getAppCheckToken(), l = a ? `#${Ir}=${encodeURIComponent(a)}` : "";
4286
+ return `${Tr(n)}?${Y(c).slice(1)}${l}`;
4273
4287
  }
4274
- function vr({ config: n }) {
4275
- return n.emulator ? Ce(n, gr) : `https://${n.authDomain}/${mr}`;
4288
+ function Tr({ config: n }) {
4289
+ return n.emulator ? Ce(n, vr) : `https://${n.authDomain}/${_r}`;
4276
4290
  }
4277
4291
  /**
4278
4292
  * @license
@@ -4291,29 +4305,29 @@ function vr({ config: n }) {
4291
4305
  * limitations under the License.
4292
4306
  */
4293
4307
  const we = "webStorageSupport";
4294
- class Ir {
4308
+ class wr {
4295
4309
  constructor() {
4296
- this.eventManagers = {}, this.iframes = {}, this.originValidationPromises = {}, this._redirectPersistence = $t, this._completeRedirectFn = ji, this._overrideRedirectResult = Hi;
4310
+ this.eventManagers = {}, this.iframes = {}, this.originValidationPromises = {}, this._redirectPersistence = Ht, this._completeRedirectFn = Bi, this._overrideRedirectResult = Wi;
4297
4311
  }
4298
4312
  // Wrapping in async even though we don't await anywhere in order
4299
4313
  // to make sure errors are raised as promise rejections
4300
4314
  async _openPopup(e, t, i, r) {
4301
4315
  var s;
4302
- b((s = this.eventManagers[e._key()]) === null || s === void 0 ? void 0 : s.manager, "_initialize() not called before _openPopup()");
4316
+ S((s = this.eventManagers[e._key()]) === null || s === void 0 ? void 0 : s.manager, "_initialize() not called before _openPopup()");
4303
4317
  const o = await st(e, t, i, Ee(), r);
4304
- return fr(e, o, Me());
4318
+ return mr(e, o, Me());
4305
4319
  }
4306
4320
  async _openRedirect(e, t, i, r) {
4307
4321
  await this._originValidation(e);
4308
4322
  const s = await st(e, t, i, Ee(), r);
4309
- return yi(s), new Promise(() => {
4323
+ return ki(s), new Promise(() => {
4310
4324
  });
4311
4325
  }
4312
4326
  _initialize(e) {
4313
4327
  const t = e._key();
4314
4328
  if (this.eventManagers[t]) {
4315
4329
  const { manager: r, promise: s } = this.eventManagers[t];
4316
- return r ? Promise.resolve(r) : (b(s, "If manager is not set, promise should be"), s);
4330
+ return r ? Promise.resolve(r) : (S(s, "If manager is not set, promise should be"), s);
4317
4331
  }
4318
4332
  const i = this.initAndGetManager(e);
4319
4333
  return this.eventManagers[t] = { promise: i }, i.catch(() => {
@@ -4321,7 +4335,7 @@ class Ir {
4321
4335
  }), i;
4322
4336
  }
4323
4337
  async initAndGetManager(e) {
4324
- const t = await ar(e), i = new Bi(e);
4338
+ const t = await lr(e), i = new zi(e);
4325
4339
  return t.register("authEvent", (r) => (u(
4326
4340
  r == null ? void 0 : r.authEvent,
4327
4341
  e,
@@ -4336,7 +4350,7 @@ class Ir {
4336
4350
  this.iframes[e._key()].send(we, { type: we }, (r) => {
4337
4351
  var s;
4338
4352
  const o = (s = r == null ? void 0 : r[0]) === null || s === void 0 ? void 0 : s[we];
4339
- o !== void 0 && t(!!o), S(
4353
+ o !== void 0 && t(!!o), b(
4340
4354
  e,
4341
4355
  "internal-error"
4342
4356
  /* AuthErrorCode.INTERNAL_ERROR */
@@ -4345,13 +4359,13 @@ class Ir {
4345
4359
  }
4346
4360
  _originValidation(e) {
4347
4361
  const t = e._key();
4348
- return this.originValidationPromises[t] || (this.originValidationPromises[t] = Yi(e)), this.originValidationPromises[t];
4362
+ return this.originValidationPromises[t] || (this.originValidationPromises[t] = Qi(e)), this.originValidationPromises[t];
4349
4363
  }
4350
4364
  get _shouldInitProactively() {
4351
- return Nt() || Ne() || fe();
4365
+ return Nt() || Ne() || pe();
4352
4366
  }
4353
4367
  }
4354
- const Tr = Ir;
4368
+ const yr = wr;
4355
4369
  var ot = "@firebase/auth", at = "1.7.5";
4356
4370
  /**
4357
4371
  * @license
@@ -4369,7 +4383,7 @@ var ot = "@firebase/auth", at = "1.7.5";
4369
4383
  * See the License for the specific language governing permissions and
4370
4384
  * limitations under the License.
4371
4385
  */
4372
- class wr {
4386
+ class Er {
4373
4387
  constructor(e) {
4374
4388
  this.auth = e, this.internalListeners = /* @__PURE__ */ new Map();
4375
4389
  }
@@ -4420,7 +4434,7 @@ class wr {
4420
4434
  * See the License for the specific language governing permissions and
4421
4435
  * limitations under the License.
4422
4436
  */
4423
- function yr(n) {
4437
+ function kr(n) {
4424
4438
  switch (n) {
4425
4439
  case "Node":
4426
4440
  return "node";
@@ -4436,7 +4450,7 @@ function yr(n) {
4436
4450
  return;
4437
4451
  }
4438
4452
  }
4439
- function Er(n) {
4453
+ function br(n) {
4440
4454
  je(new Ge(
4441
4455
  "auth",
4442
4456
  (e, { options: t }) => {
@@ -4450,8 +4464,8 @@ function Er(n) {
4450
4464
  tokenApiHost: "securetoken.googleapis.com",
4451
4465
  apiScheme: "https",
4452
4466
  sdkClientVersion: Lt(n)
4453
- }, l = new Qn(i, r, s, a);
4454
- return ri(l, t), l;
4467
+ }, l = new ei(i, r, s, a);
4468
+ return oi(l, t), l;
4455
4469
  },
4456
4470
  "PUBLIC"
4457
4471
  /* ComponentType.PUBLIC */
@@ -4466,18 +4480,18 @@ function Er(n) {
4466
4480
  })), je(new Ge(
4467
4481
  "auth-internal",
4468
4482
  (e) => {
4469
- const t = pe(e.getProvider(
4483
+ const t = me(e.getProvider(
4470
4484
  "auth"
4471
4485
  /* _ComponentName.AUTH */
4472
4486
  ).getImmediate());
4473
- return ((i) => new wr(i))(t);
4487
+ return ((i) => new Er(i))(t);
4474
4488
  },
4475
4489
  "PRIVATE"
4476
4490
  /* ComponentType.PRIVATE */
4477
4491
  ).setInstantiationMode(
4478
4492
  "EXPLICIT"
4479
4493
  /* InstantiationMode.EXPLICIT */
4480
- )), ye(ot, at, yr(n)), ye(ot, at, "esm2017");
4494
+ )), ye(ot, at, kr(n)), ye(ot, at, "esm2017");
4481
4495
  }
4482
4496
  /**
4483
4497
  * @license
@@ -4495,11 +4509,11 @@ function Er(n) {
4495
4509
  * See the License for the specific language governing permissions and
4496
4510
  * limitations under the License.
4497
4511
  */
4498
- const kr = 5 * 60, Sr = ft("authIdTokenMaxAge") || kr;
4512
+ const Sr = 5 * 60, Rr = ft("authIdTokenMaxAge") || Sr;
4499
4513
  let ct = null;
4500
- const br = (n) => async (e) => {
4514
+ const Pr = (n) => async (e) => {
4501
4515
  const t = e && await e.getIdTokenResult(), i = t && ((/* @__PURE__ */ new Date()).getTime() - Date.parse(t.issuedAtTime)) / 1e3;
4502
- if (i && i > Sr)
4516
+ if (i && i > Rr)
4503
4517
  return;
4504
4518
  const r = t == null ? void 0 : t.token;
4505
4519
  ct !== r && (ct = r, await fetch(n, {
@@ -4509,33 +4523,33 @@ const br = (n) => async (e) => {
4509
4523
  } : {}
4510
4524
  }));
4511
4525
  };
4512
- function Rr(n = vn()) {
4526
+ function Ar(n = vn()) {
4513
4527
  const e = pt(n, "auth");
4514
4528
  if (e.isInitialized())
4515
4529
  return e.getImmediate();
4516
- const t = ii(n, {
4517
- popupRedirectResolver: Tr,
4530
+ const t = si(n, {
4531
+ popupRedirectResolver: yr,
4518
4532
  persistence: [
4519
- Oi,
4520
- Ii,
4521
- $t
4533
+ Li,
4534
+ wi,
4535
+ Ht
4522
4536
  ]
4523
4537
  }), i = ft("authTokenSyncURL");
4524
4538
  if (i && typeof isSecureContext == "boolean" && isSecureContext) {
4525
4539
  const s = new URL(i, location.origin);
4526
4540
  if (location.origin === s.origin) {
4527
- const o = br(s.toString());
4528
- mi(t, o, () => o(t.currentUser)), pi(t, (c) => o(c));
4541
+ const o = Pr(s.toString());
4542
+ _i(t, o, () => o(t.currentUser)), gi(t, (c) => o(c));
4529
4543
  }
4530
4544
  }
4531
4545
  const r = _n("auth");
4532
- return r && si(t, `http://${r}`), t;
4546
+ return r && ai(t, `http://${r}`), t;
4533
4547
  }
4534
- function Pr() {
4548
+ function Cr() {
4535
4549
  var n, e;
4536
4550
  return (e = (n = document.getElementsByTagName("head")) === null || n === void 0 ? void 0 : n[0]) !== null && e !== void 0 ? e : document;
4537
4551
  }
4538
- Zn({
4552
+ ti({
4539
4553
  loadJS(n) {
4540
4554
  return new Promise((e, t) => {
4541
4555
  const i = document.createElement("script");
@@ -4545,53 +4559,60 @@ Zn({
4545
4559
  /* AuthErrorCode.INTERNAL_ERROR */
4546
4560
  );
4547
4561
  s.customData = r, t(s);
4548
- }, i.type = "text/javascript", i.charset = "UTF-8", Pr().appendChild(i);
4562
+ }, i.type = "text/javascript", i.charset = "UTF-8", Cr().appendChild(i);
4549
4563
  });
4550
4564
  },
4551
4565
  gapiScript: "https://apis.google.com/js/api.js",
4552
4566
  recaptchaV2Script: "https://www.google.com/recaptcha/api.js",
4553
4567
  recaptchaEnterpriseScript: "https://www.google.com/recaptcha/enterprise.js?render="
4554
4568
  });
4555
- Er(
4569
+ br(
4556
4570
  "Browser"
4557
4571
  /* ClientPlatform.BROWSER */
4558
4572
  );
4559
- var Ar = { 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", clientId: "1a362d621873497b277ea55258cc82594ba148d235257f7bd44ea2acc132d8a4" }, Cr = { authUrl: "https://portal-v2-dev.feedmeapi.com/", slackWebhookUrl: "https://hooks.slack.com/services/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", appUrl: "member.feedmedev.cc", crmUrl: "crm.feedmedev.cc", paymentPortalUrl: "https://portal.feedmedev.cc/payment/payout-account", marketingV1Portal: "https://marketing-v1.feedmedev.cc" };
4560
- const Or = {
4573
+ var Or = { 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", clientId: "1a362d621873497b277ea55258cc82594ba148d235257f7bd44ea2acc132d8a4" }, Nr = { authUrl: "https://portal-v2-dev.feedmeapi.com/", slackWebhookUrl: "https://hooks.slack.com/services/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", appUrl: "member.feedmedev.cc", crmUrl: "crm.feedmedev.cc", paymentPortalUrl: "https://portal.feedmedev.cc/payment/payout-account", licensePortalUrl: "https://license.feedmedev.cc/", marketingV1Portal: "https://marketing-v1.feedmedev.cc" }, Lr = { mode: "development", appMode: "mf" };
4574
+ const Mr = {
4561
4575
  key: 1,
4562
4576
  class: "h-full w-full"
4563
- }, Nr = ["src"], qr = /* @__PURE__ */ lt({
4577
+ }, Ur = ["src"], Yr = /* @__PURE__ */ lt({
4564
4578
  __name: "App",
4565
4579
  setup(n) {
4566
- const e = We(), t = on(), i = an(), r = cn(), s = ln(), o = ht(), c = te(o.query.showHeader !== "false"), a = te(!1), { currentBusiness: l } = We(), d = te(!1), h = Ve(() => i.version), _ = Ve(() => {
4580
+ const e = We(), t = on(), i = an(), r = cn(), s = ln(), o = ht(), c = ne(o.query.showHeader !== "false"), a = ne(!1), { currentBusiness: l } = We(), d = ne(!1), f = Ve(() => i.version), _ = Ve(() => {
4567
4581
  const p = e.currentCountry.value || "MY", m = Be.getIdToken(), v = l.value._id;
4568
- return `${Cr.marketingV1Portal}/b/${v}/marketing/overview?showHeader=false&country=${p}&token=${m}`;
4582
+ return `${Nr.marketingV1Portal}/b/${v}/marketing/overview?showHeader=false&country=${p}&token=${m}`;
4569
4583
  });
4570
- async function F() {
4584
+ async function x() {
4571
4585
  if (En().length) {
4572
4586
  console.warn("CONNECT: initFirebase: Firebase already initialized");
4573
4587
  return;
4574
4588
  }
4575
- const p = kn(Ar.firebase), m = await sn.getCustomToken(), v = Rr();
4576
- await fi(v, m), Sn(p), console.log("initFirebase", p);
4589
+ const p = kn(Or.firebase), m = await sn.getCustomToken(), v = Ar();
4590
+ await mi(v, m), bn(p), console.log("initFirebase", p);
4577
4591
  }
4578
4592
  const M = async () => {
4579
- d.value = !1, await tn(), console.log("forceRerender"), Be.setBusinessId(l.value._id), await i.readPremium(), !a.value && h.value === "v2" ? e.registerSidebarComponent(bn) : e.hideSidebarToggle(!0), await F(), a.value = !0, d.value = !0;
4593
+ d.value = !1, await tn(), console.log("forceRerender"), Be.setBusinessId(l.value._id), await i.readPremium(), !a.value && f.value === "v2" ? e.registerSidebarComponent(Pn) : e.hideSidebarToggle(!0), await x(), a.value = !0, d.value = !0;
4580
4594
  };
4595
+ async function ee() {
4596
+ var p;
4597
+ console.log("initRemyClient.."), await Rn.init({
4598
+ token: ((p = e.sessionUser.value) == null ? void 0 : p.token) || "",
4599
+ dev: Lr.mode === "development"
4600
+ });
4601
+ }
4581
4602
  return Xt(() => {
4582
- if (t.initProvider(r, s), !c.value) {
4583
- const p = document.getElementsByClassName("app-header")[0], m = document.getElementsByClassName("app-sidebar")[0], v = document.getElementsByClassName("app-container")[0], x = document.getElementsByTagName("main")[0];
4584
- p == null || p.classList.add("!hidden"), m == null || m.classList.add("!pt-0"), v == null || v.classList.add("!pt-0"), x == null || x.classList.add("!pt-0"), e.hideSidebarToggle(!0);
4603
+ if (Sn.Config.setCountry(e.currentCountry.value || "MY"), t.initProvider(r, s), !c.value) {
4604
+ const p = document.getElementsByClassName("app-header")[0], m = document.getElementsByClassName("app-sidebar")[0], v = document.getElementsByClassName("app-container")[0], U = document.getElementsByTagName("main")[0];
4605
+ p == null || p.classList.add("!hidden"), m == null || m.classList.add("!pt-0"), v == null || v.classList.add("!pt-0"), U == null || U.classList.add("!pt-0"), e.hideSidebarToggle(!0);
4585
4606
  }
4586
- l.value != null && (console.log("App mounted, forceRerender"), M());
4607
+ l.value != null && (console.log("App mounted, forceRerender"), M()), ee();
4587
4608
  }), ut(
4588
4609
  () => e.currentBusiness.value,
4589
4610
  async (p, m) => {
4590
4611
  console.log("Current business changed"), p != null && p._id != m._id && (console.log("forceRerender when business changes", p, m), M());
4591
4612
  }
4592
- ), (p, m) => (ne(), He(Qt, null, [
4593
- P(d) && P(h) === "v2" ? (ne(), dt(P(rn), { key: 0 })) : $e("", !0),
4594
- P(d) && P(h) !== "v2" ? (ne(), He("div", Or, [
4613
+ ), (p, m) => (ie(), $e(Qt, null, [
4614
+ P(d) && P(f) === "v2" ? (ie(), dt(P(rn), { key: 0 })) : He("", !0),
4615
+ P(d) && P(f) !== "v2" ? (ie(), $e("div", Mr, [
4595
4616
  Zt(dn, {
4596
4617
  json: { url: P(_) }
4597
4618
  }, null, 8, ["json"]),
@@ -4601,11 +4622,11 @@ const Or = {
4601
4622
  height: "100%",
4602
4623
  width: "100%",
4603
4624
  src: P(_)
4604
- }, null, 8, Nr)
4605
- ])) : $e("", !0)
4625
+ }, null, 8, Ur)
4626
+ ])) : He("", !0)
4606
4627
  ], 64));
4607
4628
  }
4608
4629
  });
4609
4630
  export {
4610
- qr as default
4631
+ Yr as default
4611
4632
  };