@feedmepos/mf-connect 0.1.38-beta.20 → 0.1.38-beta.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Analytic-CcDS6jsq.js → Analytic-CpzRbw6Z.js} +13 -13
- package/dist/{App-CWu9XUGk.js → App-mXF5fxjZ.js} +303 -307
- package/dist/{AuditLogs-CuP9pTx6.js → AuditLogs-CMqOkUZr.js} +9 -9
- package/dist/{Bin-BAf8lxXh.js → Bin-8pdgFB9Z.js} +8 -8
- package/dist/{Broadcast-BlZYQhN_.js → Broadcast-BPbUMgv9.js} +9 -9
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-D-51jit9.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-B_J1oubC.js} +6 -6
- package/dist/{Card-CpgM1QmJ.js → Card-I1TPvKP2.js} +16 -16
- package/dist/{Collections-DefrQyM6.js → Collections-Bm7uK5bU.js} +6 -6
- package/dist/{Credit-AN9e1fe3.js → Credit-D0atXzoF.js} +9 -9
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-CFbgEftO.js +3109 -0
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-Cfuvs3k9.js → EffectSheet.vue_vue_type_style_index_0_lang-CKfJClbj.js} +6 -6
- package/dist/{Experience-BmkBr9Wo.js → Experience-yPl537Z0.js} +9 -9
- package/dist/{Game-D0Zq_RLI.js → Game-D51In5o6.js} +10 -10
- package/dist/Grab-CfFzOqVf.js +282 -0
- package/dist/{Index-Czl0WFLc.js → Index-e2fXLyP2.js} +10 -10
- package/dist/{Marketing-BK-hPBEY.js → Marketing-Co80L4R4.js} +7112 -5424
- package/dist/{Member-Bm6Nps1A.js → Member-Lbt60sle.js} +10 -10
- package/dist/{MemberList-gSz0_xhf.js → MemberList-BH4vPGKI.js} +25 -25
- package/dist/{MemberTransactions-bG1GW4vQ.js → MemberTransactions-DeuCZtvO.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-RXsv1Zxn.js → MessageInput.vue_vue_type_script_setup_true_lang-DhvpOc4l.js} +8 -8
- package/dist/{Mission-ubM2k057.js → Mission-flrnw4_V.js} +10 -10
- package/dist/{Overview-EDwgyv1G.js → Overview-BeSCDO-z.js} +18 -18
- package/dist/{Point-lfEwhadN.js → Point-CbPJF6zY.js} +9 -9
- package/dist/{Promotion-kLyPM-ZW.js → Promotion-ppwYxK04.js} +10 -10
- package/dist/{Queue-CHN_irk-.js → Queue-BSRSIphF.js} +10 -10
- package/dist/{Record-B1epFjVq.js → Record-A2ryIllF.js} +8 -8
- package/dist/{Reward-CFgpEe0I.js → Reward-RAkE3L2b.js} +15 -15
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-DmjkCsLo.js → RewardGroup.vue_vue_type_script_setup_true_lang-_TAl6moR.js} +11 -11
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-Cet6R04Y.js → RuleGroup.vue_vue_type_script_setup_true_lang-BZYLaJ1g.js} +13 -13
- package/dist/{Segment-Ls_9U5u_.js → Segment-CYVaOnLd.js} +22 -22
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-Bp940dCI.js → SelectItems.vue_vue_type_script_setup_true_lang-dKRYAPAC.js} +2 -2
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-B4hwYylS.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-BuxR6tGK.js} +11 -11
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-BfZc_niY.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-HZ-szV_4.js} +3 -3
- package/dist/{Setting-uyQqr9ip.js → Setting-BdVOv2fF.js} +11 -11
- package/dist/{Store-DalJR69o.js → Store-C2vl-tSY.js} +19 -19
- package/dist/{StoreRewards-BQidsrSZ.js → StoreRewards-OwfwKw4Z.js} +13 -13
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-qDWa4d1F.js → StoreTransactions.vue_vue_type_script_setup_true_lang-B7G-XEv7.js} +20 -20
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-gwXp0Hjs.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-C0Jw4qmp.js} +1 -1
- package/dist/{Tier-CKBHw7cz.js → Tier-CQWqWYQp.js} +20 -20
- package/dist/{Title-CTi1cRm-.js → Title-B03AazFm.js} +19 -19
- package/dist/{Transaction-DeTFReiT.js → Transaction-CsmWCDjS.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-NAkAMq_F.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-D9MhrUdC.js} +6 -6
- package/dist/{Voucher-CTSyAZzy.js → Voucher-BjTCDioi.js} +13 -13
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-CfTeP88u.js → VoucherEditor.vue_vue_type_script_setup_true_lang-D3cSsXPi.js} +10 -10
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-CA_ImtHl.js → ZodTextField.vue_vue_type_script_setup_true_lang-CcR6Ak9O.js} +1 -1
- package/dist/{app-w-4q1Z6B.js → app-8DN8-SZI.js} +1 -1
- package/dist/{app-qB1pFt4s.js → app-BZS8hbi4.js} +740 -676
- package/dist/app.js +1 -1
- package/dist/{business-BkQfFUlY.js → business-Oqy7tPH9.js} +1 -1
- package/dist/{campaign-gAFtWRib.js → campaign-BFjMsenC.js} +29 -25
- package/dist/{campaign-CeG1cCB8.js → campaign-Bpu-WkHc.js} +27 -14
- package/dist/{campaign.enum-B2dJjhNM.js → campaign.enum-tI-fq-RU.js} +3 -2
- package/dist/{campaign.fn-tl5RvMeV.js → campaign.fn-DnSyzNCW.js} +19 -19
- package/dist/{collectible.enum-CY9eRxkX.js → collectible.enum-BT9B1DAn.js} +1 -1
- package/dist/{collection.fn-B2Hvwvuu.js → collection.fn-Q0ICmTCt.js} +2 -2
- package/dist/{dto-Co4AIKbR.js → dto-BKZbH_5Z.js} +51 -39
- package/dist/{effect-DiTCEt6G.js → effect-Ev5GOyak.js} +1 -1
- package/dist/{email-addresses-BT_3l319.js → email-addresses-HSXm7NzC.js} +1 -1
- package/dist/{export-Bd2jDAtR.js → export-Dmw7vq5n.js} +3 -3
- package/dist/{helper-CqoHGb28.js → helper-DrBwjXJd.js} +1 -1
- package/dist/{index-36DwgmZf.js → index-B2HJgRP8.js} +1 -1
- package/dist/{index-BAV-rA7P.js → index-BJuCnCo9.js} +1 -1
- package/dist/{index-CRP4jCHY.js → index-CLEOWcJj.js} +1 -1
- package/dist/{index-DyvL5kq6.js → index-Crg_hMJc.js} +16 -16
- package/dist/{index-DXKkrcfL.js → index-Cvk2jznV.js} +1 -1
- package/dist/{index-CfzyafK2.js → index-D1XdOqxU.js} +1 -1
- package/dist/{index-C5i-XOQf.js → index-DCtGS9iJ.js} +845 -708
- package/dist/{index-B-uA3uhI.js → index-DYsVl8va.js} +3 -3
- package/dist/{index-XIhXoDT3.js → index-DbDvM2VB.js} +1 -1
- package/dist/{index-DtbGIrNt.js → index-DhP0hPJy.js} +573 -573
- package/dist/{index-DexZ1aal.js → index-SlOkYO1R.js} +1 -1
- package/dist/{index-BM-LCR8g.js → index-XDMj6KjH.js} +3 -3
- package/dist/{index-DJCcKPeB.js → index-YYhOm5p5.js} +182 -15
- package/dist/{index-BeIhvQ6n.js → index-paKrqchu.js} +3 -3
- package/dist/{index.esm2017-CtHdHJcr.js → index.esm2017-CKyZQ9bN.js} +1 -1
- package/dist/{loading-D8ZlHloH.js → loading-fAKR7hYD.js} +1 -1
- package/dist/{membership-ClBVQYK7.js → membership-CaZBYwW5.js} +3 -3
- package/dist/{money-CDKTQ8yS.js → money-DOhWY3sh.js} +1 -1
- package/dist/{number-BPciK26O.js → number-DGtIZHGZ.js} +1 -1
- package/dist/{objectid-D0dGefEu.js → objectid-C0hgqKv3.js} +5 -5
- package/dist/{plugins-C9BG1jBk.js → plugins-FfzNmwCE.js} +2 -2
- package/dist/{reward-FTxsUKPh.js → reward-DzIcFmd0.js} +1 -1
- package/dist/{rule-CV75o9HO.js → rule-DK-66nJF.js} +3 -3
- package/dist/{rule-builder-DqP-4BN0.js → rule-builder-BlS3MdnW.js} +16 -16
- package/dist/style.css +1 -1
- package/dist/{template-C3UHVrmq.js → template-Wtw44sTH.js} +4 -4
- package/dist/{timezone-DKZyKeHi.js → timezone-SzPXGYwV.js} +1 -1
- package/dist/{trigger-BQmDM-Va.js → trigger-CehCt6EJ.js} +4 -4
- package/dist/{user-Bar-w9NM.js → user-BRklsZN_.js} +1 -1
- package/dist/{vue-i18n-BrpZ37nb.js → vue-i18n-D8X2q1qS.js} +101 -101
- package/dist/{xlsx-DoO-sUSq.js → xlsx-Dzv15YMt.js} +166 -166
- package/package.json +1 -1
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-YyaQoLZN.js +0 -2188
- package/dist/remy-vue-client-Cpppk9h-.js +0 -1693
|
@@ -1,22 +1,21 @@
|
|
|
1
|
-
import { defineComponent as ht, ref as
|
|
1
|
+
import { defineComponent as ht, ref as te, h as B, computed as Ee, watch as ft, resolveComponent as Zt, openBlock as ne, createElementBlock as ke, createVNode as pt, unref as v, createElementVNode as ie, toDisplayString as We, onMounted as en, Fragment as tn, createBlock as nn, createCommentVNode as Ge, nextTick as rn } from "vue";
|
|
2
2
|
import { useRouter as sn, useRoute as mt, RouterView as on } from "vue-router";
|
|
3
3
|
import { useCoreStore as be, FeedMeAuth as an } from "@feedmepos/mf-common";
|
|
4
4
|
import { u as cn } from "./app-wDQR6dpb.js";
|
|
5
|
-
import { u as ln } from "./business-
|
|
6
|
-
import "./index-
|
|
5
|
+
import { u as ln } from "./business-Oqy7tPH9.js";
|
|
6
|
+
import "./index-SlOkYO1R.js";
|
|
7
7
|
import { components as z, useSnackbar as un, useDialog as dn } from "@feedmepos/ui-library";
|
|
8
|
-
import { u as hn } from "./vue-i18n-
|
|
9
|
-
import { C as Be, m as fn } from "./timezone-
|
|
10
|
-
import { R as f } from "./app-
|
|
8
|
+
import { u as hn } from "./vue-i18n-D8X2q1qS.js";
|
|
9
|
+
import { C as Be, m as fn } from "./timezone-SzPXGYwV.js";
|
|
10
|
+
import { R as f } from "./app-BZS8hbi4.js";
|
|
11
11
|
import { J as pn } from "./JsonViewer-v8_C7l5N.js";
|
|
12
|
-
import { r as Se, L as mn, g as gt, i as gn, a as _n, _ as ze, C as qe, b as vn, S as J, c as E, d as W, E as Ce, e as In, f as _t, h as Tn, j as yn, k as vt, l as _, m as wn, F as Oe, n as En, q as Y, o as kn, p as bn, s as Sn, t as Rn, u as Pn } from "./index.esm2017-
|
|
12
|
+
import { r as Se, L as mn, g as gt, i as gn, a as _n, _ as ze, C as qe, b as vn, S as J, c as E, d as W, E as Ce, e as In, f as _t, h as Tn, j as yn, k as vt, l as _, m as wn, F as Oe, n as En, q as Y, o as kn, p as bn, s as Sn, t as Rn, u as Pn } from "./index.esm2017-CKyZQ9bN.js";
|
|
13
13
|
import { _ as Ne } from "./tslib.es6-BCqqvLQ_.js";
|
|
14
|
-
import { S as Ke, c as An } from "./index-
|
|
15
|
-
|
|
16
|
-
const On = { class: "flex flex-col h-full justify-between py-16" }, Nn = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary text-center" }, Ln = /* @__PURE__ */ ht({
|
|
14
|
+
import { S as Ke, c as An } from "./index-XDMj6KjH.js";
|
|
15
|
+
const Cn = { class: "flex flex-col h-full justify-between py-16" }, On = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary text-center" }, Nn = /* @__PURE__ */ ht({
|
|
17
16
|
__name: "NavigationTab",
|
|
18
17
|
setup(n) {
|
|
19
|
-
const { t: e } = hn(), t =
|
|
18
|
+
const { t: e } = hn(), t = te(), i = [
|
|
20
19
|
{
|
|
21
20
|
label: e("connect.navigation.analytic"),
|
|
22
21
|
value: f["$connect-ANALYTIC"]
|
|
@@ -36,6 +35,10 @@ const On = { class: "flex flex-col h-full justify-between py-16" }, Nn = { class
|
|
|
36
35
|
{
|
|
37
36
|
label: e("connect.navigation.broadcast"),
|
|
38
37
|
value: f["$connect-CAMPAIGN_BROADCAST"]
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
label: e("connect.navigation.grab"),
|
|
41
|
+
value: f["$connect-CAMPAIGN_GRAB"]
|
|
39
42
|
}
|
|
40
43
|
]
|
|
41
44
|
},
|
|
@@ -142,22 +145,22 @@ const On = { class: "flex flex-col h-full justify-between py-16" }, Nn = { class
|
|
|
142
145
|
return (d, h) => {
|
|
143
146
|
var w;
|
|
144
147
|
const p = Zt("FmCollapsibleTabs");
|
|
145
|
-
return
|
|
148
|
+
return ne(), ke("div", Cn, [
|
|
146
149
|
pt(p, {
|
|
147
150
|
class: "border-fm-color-neutral-gray-100 border-r px-4",
|
|
148
151
|
"model-value": (w = v(t)) == null ? void 0 : w.toString(),
|
|
149
152
|
items: i,
|
|
150
153
|
"onUpdate:modelValue": l
|
|
151
154
|
}, null, 8, ["model-value"]),
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
+
ie("div", On, [
|
|
156
|
+
ie("div", null, "Timezone: " + We(v(a).split("/")[1].replace("_", " ")), 1),
|
|
157
|
+
ie("div", null, "(UTC" + We(v(fn).tz(v(a)).format("Z")) + ")", 1)
|
|
155
158
|
])
|
|
156
159
|
]);
|
|
157
160
|
};
|
|
158
161
|
}
|
|
159
162
|
});
|
|
160
|
-
var
|
|
163
|
+
var Ln = "firebase", Mn = "10.12.4";
|
|
161
164
|
/**
|
|
162
165
|
* @license
|
|
163
166
|
* Copyright 2020 Google LLC
|
|
@@ -174,13 +177,13 @@ var Mn = "firebase", Un = "10.12.4";
|
|
|
174
177
|
* See the License for the specific language governing permissions and
|
|
175
178
|
* limitations under the License.
|
|
176
179
|
*/
|
|
177
|
-
Se(
|
|
180
|
+
Se(Ln, Mn, "app");
|
|
178
181
|
function It() {
|
|
179
182
|
return {
|
|
180
183
|
"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."
|
|
181
184
|
};
|
|
182
185
|
}
|
|
183
|
-
const
|
|
186
|
+
const Un = It, Tt = new Ce("auth", "Firebase", It());
|
|
184
187
|
/**
|
|
185
188
|
* @license
|
|
186
189
|
* Copyright 2020 Google LLC
|
|
@@ -197,12 +200,12 @@ const Dn = It, Tt = new Ce("auth", "Firebase", It());
|
|
|
197
200
|
* See the License for the specific language governing permissions and
|
|
198
201
|
* limitations under the License.
|
|
199
202
|
*/
|
|
200
|
-
const
|
|
201
|
-
function
|
|
202
|
-
|
|
203
|
+
const ce = new mn("@firebase/auth");
|
|
204
|
+
function Dn(n, ...e) {
|
|
205
|
+
ce.logLevel <= vt.WARN && ce.warn(`Auth (${J}): ${n}`, ...e);
|
|
203
206
|
}
|
|
204
|
-
function
|
|
205
|
-
|
|
207
|
+
function re(n, ...e) {
|
|
208
|
+
ce.logLevel <= vt.ERROR && ce.error(`Auth (${J}): ${n}`, ...e);
|
|
206
209
|
}
|
|
207
210
|
/**
|
|
208
211
|
* @license
|
|
@@ -227,7 +230,7 @@ function T(n, ...e) {
|
|
|
227
230
|
return Le(n, ...e);
|
|
228
231
|
}
|
|
229
232
|
function yt(n, e, t) {
|
|
230
|
-
const i = Object.assign(Object.assign({},
|
|
233
|
+
const i = Object.assign(Object.assign({}, Un()), { [e]: t });
|
|
231
234
|
return new Ce("auth", "Firebase", i).create(e, {
|
|
232
235
|
appName: n.name
|
|
233
236
|
});
|
|
@@ -248,7 +251,7 @@ function u(n, e, ...t) {
|
|
|
248
251
|
}
|
|
249
252
|
function k(n) {
|
|
250
253
|
const e = "INTERNAL ASSERTION FAILED: " + n;
|
|
251
|
-
throw
|
|
254
|
+
throw re(e), new Error(e);
|
|
252
255
|
}
|
|
253
256
|
function P(n, e) {
|
|
254
257
|
n || k(e);
|
|
@@ -273,7 +276,7 @@ function Re() {
|
|
|
273
276
|
var n;
|
|
274
277
|
return typeof self < "u" && ((n = self.location) === null || n === void 0 ? void 0 : n.href) || "";
|
|
275
278
|
}
|
|
276
|
-
function
|
|
279
|
+
function Fn() {
|
|
277
280
|
return Je() === "http:" || Je() === "https:";
|
|
278
281
|
}
|
|
279
282
|
function Je() {
|
|
@@ -296,15 +299,15 @@ function Je() {
|
|
|
296
299
|
* See the License for the specific language governing permissions and
|
|
297
300
|
* limitations under the License.
|
|
298
301
|
*/
|
|
299
|
-
function
|
|
302
|
+
function xn() {
|
|
300
303
|
return typeof navigator < "u" && navigator && "onLine" in navigator && typeof navigator.onLine == "boolean" && // Apply only for traditional web apps and Chrome extensions.
|
|
301
304
|
// This is especially true for Cordova apps which have unreliable
|
|
302
305
|
// navigator.onLine behavior unless cordova-plugin-network-information is
|
|
303
306
|
// installed which overwrites the native navigator.onLine value and
|
|
304
307
|
// defines navigator.connection.
|
|
305
|
-
(
|
|
308
|
+
(Fn() || vn() || "connection" in navigator) ? navigator.onLine : !0;
|
|
306
309
|
}
|
|
307
|
-
function
|
|
310
|
+
function Vn() {
|
|
308
311
|
if (typeof navigator > "u")
|
|
309
312
|
return null;
|
|
310
313
|
const n = navigator;
|
|
@@ -337,7 +340,7 @@ class X {
|
|
|
337
340
|
this.shortDelay = e, this.longDelay = t, P(t > e, "Short delay should be less than long delay!"), this.isMobile = gn() || _n();
|
|
338
341
|
}
|
|
339
342
|
get() {
|
|
340
|
-
return
|
|
343
|
+
return xn() ? this.isMobile ? this.longDelay : this.shortDelay : Math.min(5e3, this.shortDelay);
|
|
341
344
|
}
|
|
342
345
|
}
|
|
343
346
|
/**
|
|
@@ -431,7 +434,7 @@ class wt {
|
|
|
431
434
|
* See the License for the specific language governing permissions and
|
|
432
435
|
* limitations under the License.
|
|
433
436
|
*/
|
|
434
|
-
const
|
|
437
|
+
const $n = {
|
|
435
438
|
// Custom token errors.
|
|
436
439
|
CREDENTIAL_MISMATCH: "custom-token-mismatch",
|
|
437
440
|
// This can only happen if the SDK sends a bad request.
|
|
@@ -522,8 +525,8 @@ const Hn = {
|
|
|
522
525
|
* See the License for the specific language governing permissions and
|
|
523
526
|
* limitations under the License.
|
|
524
527
|
*/
|
|
525
|
-
const
|
|
526
|
-
function
|
|
528
|
+
const Hn = new X(3e4, 6e4);
|
|
529
|
+
function fe(n, e) {
|
|
527
530
|
return n.tenantId && !e.tenantId ? Object.assign(Object.assign({}, e), { tenantId: n.tenantId }) : e;
|
|
528
531
|
}
|
|
529
532
|
async function G(n, e, t, i, r = {}) {
|
|
@@ -548,26 +551,26 @@ async function G(n, e, t, i, r = {}) {
|
|
|
548
551
|
}
|
|
549
552
|
async function Et(n, e, t) {
|
|
550
553
|
n._canInitEmulator = !1;
|
|
551
|
-
const i = Object.assign(Object.assign({},
|
|
554
|
+
const i = Object.assign(Object.assign({}, $n), e);
|
|
552
555
|
try {
|
|
553
|
-
const r = new
|
|
556
|
+
const r = new jn(n), s = await Promise.race([
|
|
554
557
|
t(),
|
|
555
558
|
r.promise
|
|
556
559
|
]);
|
|
557
560
|
r.clearNetworkTimeout();
|
|
558
561
|
const o = await s.json();
|
|
559
562
|
if ("needConfirmation" in o)
|
|
560
|
-
throw
|
|
563
|
+
throw ee(n, "account-exists-with-different-credential", o);
|
|
561
564
|
if (s.ok && !("errorMessage" in o))
|
|
562
565
|
return o;
|
|
563
566
|
{
|
|
564
567
|
const c = s.ok ? o.errorMessage : o.error.message, [a, l] = c.split(" : ");
|
|
565
568
|
if (a === "FEDERATED_USER_ID_ALREADY_LINKED")
|
|
566
|
-
throw
|
|
569
|
+
throw ee(n, "credential-already-in-use", o);
|
|
567
570
|
if (a === "EMAIL_EXISTS")
|
|
568
|
-
throw
|
|
571
|
+
throw ee(n, "email-already-in-use", o);
|
|
569
572
|
if (a === "USER_DISABLED")
|
|
570
|
-
throw
|
|
573
|
+
throw ee(n, "user-disabled", o);
|
|
571
574
|
const d = i[a] || a.toLowerCase().replace(/[_\s]+/g, "-");
|
|
572
575
|
if (l)
|
|
573
576
|
throw yt(n, d, l);
|
|
@@ -589,21 +592,21 @@ function bt(n, e, t, i) {
|
|
|
589
592
|
const r = `${e}${t}?${i}`;
|
|
590
593
|
return n.config.emulator ? Me(n.config, r) : `${n.config.apiScheme}://${r}`;
|
|
591
594
|
}
|
|
592
|
-
class
|
|
595
|
+
class jn {
|
|
593
596
|
constructor(e) {
|
|
594
597
|
this.auth = e, this.timer = null, this.promise = new Promise((t, i) => {
|
|
595
598
|
this.timer = setTimeout(() => i(T(
|
|
596
599
|
this.auth,
|
|
597
600
|
"network-request-failed"
|
|
598
601
|
/* AuthErrorCode.NETWORK_REQUEST_FAILED */
|
|
599
|
-
)),
|
|
602
|
+
)), Hn.get());
|
|
600
603
|
});
|
|
601
604
|
}
|
|
602
605
|
clearNetworkTimeout() {
|
|
603
606
|
clearTimeout(this.timer);
|
|
604
607
|
}
|
|
605
608
|
}
|
|
606
|
-
function
|
|
609
|
+
function ee(n, e, t) {
|
|
607
610
|
const i = {
|
|
608
611
|
appName: n.name
|
|
609
612
|
};
|
|
@@ -627,7 +630,7 @@ function te(n, e, t) {
|
|
|
627
630
|
* See the License for the specific language governing permissions and
|
|
628
631
|
* limitations under the License.
|
|
629
632
|
*/
|
|
630
|
-
async function
|
|
633
|
+
async function Wn(n, e) {
|
|
631
634
|
return G(n, "POST", "/v1/accounts:delete", e);
|
|
632
635
|
}
|
|
633
636
|
async function St(n, e) {
|
|
@@ -658,7 +661,7 @@ function q(n) {
|
|
|
658
661
|
} catch {
|
|
659
662
|
}
|
|
660
663
|
}
|
|
661
|
-
async function
|
|
664
|
+
async function Gn(n, e = !1) {
|
|
662
665
|
const t = W(n), i = await t.getIdToken(e), r = Ue(i);
|
|
663
666
|
u(
|
|
664
667
|
r && r.exp && r.auth_time && r.iat,
|
|
@@ -683,12 +686,12 @@ function ye(n) {
|
|
|
683
686
|
function Ue(n) {
|
|
684
687
|
const [e, t, i] = n.split(".");
|
|
685
688
|
if (e === void 0 || t === void 0 || i === void 0)
|
|
686
|
-
return
|
|
689
|
+
return re("JWT malformed, contained fewer than 3 sections"), null;
|
|
687
690
|
try {
|
|
688
691
|
const r = En(t);
|
|
689
|
-
return r ? JSON.parse(r) : (
|
|
692
|
+
return r ? JSON.parse(r) : (re("Failed to decode base64 JWT payload"), null);
|
|
690
693
|
} catch (r) {
|
|
691
|
-
return
|
|
694
|
+
return re("Caught error parsing JWT payload as JSON", r == null ? void 0 : r.toString()), null;
|
|
692
695
|
}
|
|
693
696
|
}
|
|
694
697
|
function Ye(n) {
|
|
@@ -729,10 +732,10 @@ async function K(n, e, t = !1) {
|
|
|
729
732
|
try {
|
|
730
733
|
return await e;
|
|
731
734
|
} catch (i) {
|
|
732
|
-
throw i instanceof Oe &&
|
|
735
|
+
throw i instanceof Oe && Bn(i) && n.auth.currentUser === n && await n.auth.signOut(), i;
|
|
733
736
|
}
|
|
734
737
|
}
|
|
735
|
-
function
|
|
738
|
+
function Bn({ code: n }) {
|
|
736
739
|
return n === "auth/user-disabled" || n === "auth/user-token-expired";
|
|
737
740
|
}
|
|
738
741
|
/**
|
|
@@ -751,7 +754,7 @@ function zn({ code: n }) {
|
|
|
751
754
|
* See the License for the specific language governing permissions and
|
|
752
755
|
* limitations under the License.
|
|
753
756
|
*/
|
|
754
|
-
class
|
|
757
|
+
class zn {
|
|
755
758
|
constructor(e) {
|
|
756
759
|
this.user = e, this.isRunning = !1, this.timerId = null, this.errorBackoff = 3e4;
|
|
757
760
|
}
|
|
@@ -846,7 +849,7 @@ class Pe {
|
|
|
846
849
|
* See the License for the specific language governing permissions and
|
|
847
850
|
* limitations under the License.
|
|
848
851
|
*/
|
|
849
|
-
async function
|
|
852
|
+
async function le(n) {
|
|
850
853
|
var e;
|
|
851
854
|
const t = n.auth, i = await n.getIdToken(), r = await K(n, St(t, { idToken: i }));
|
|
852
855
|
u(
|
|
@@ -857,7 +860,7 @@ async function ue(n) {
|
|
|
857
860
|
);
|
|
858
861
|
const s = r.users[0];
|
|
859
862
|
n._notifyReloadListener(s);
|
|
860
|
-
const o = !((e = s.providerUserInfo) === null || e === void 0) && e.length ? Rt(s.providerUserInfo) : [], c =
|
|
863
|
+
const o = !((e = s.providerUserInfo) === null || e === void 0) && e.length ? Rt(s.providerUserInfo) : [], c = Kn(n.providerData, o), a = n.isAnonymous, l = !(n.email && s.passwordHash) && !(c != null && c.length), d = a ? l : !1, h = {
|
|
861
864
|
uid: s.localId,
|
|
862
865
|
displayName: s.displayName || null,
|
|
863
866
|
photoURL: s.photoUrl || null,
|
|
@@ -871,11 +874,11 @@ async function ue(n) {
|
|
|
871
874
|
};
|
|
872
875
|
Object.assign(n, h);
|
|
873
876
|
}
|
|
874
|
-
async function
|
|
877
|
+
async function qn(n) {
|
|
875
878
|
const e = W(n);
|
|
876
|
-
await
|
|
879
|
+
await le(e), await e.auth._persistUserIfCurrent(e), e.auth._notifyListenersIfCurrent(e);
|
|
877
880
|
}
|
|
878
|
-
function
|
|
881
|
+
function Kn(n, e) {
|
|
879
882
|
return [...n.filter((i) => !e.some((r) => r.providerId === i.providerId)), ...e];
|
|
880
883
|
}
|
|
881
884
|
function Rt(n) {
|
|
@@ -907,7 +910,7 @@ function Rt(n) {
|
|
|
907
910
|
* See the License for the specific language governing permissions and
|
|
908
911
|
* limitations under the License.
|
|
909
912
|
*/
|
|
910
|
-
async function
|
|
913
|
+
async function Jn(n, e) {
|
|
911
914
|
const t = await Et(n, {}, async () => {
|
|
912
915
|
const i = Y({
|
|
913
916
|
grant_type: "refresh_token",
|
|
@@ -928,8 +931,8 @@ async function Yn(n, e) {
|
|
|
928
931
|
refreshToken: t.refresh_token
|
|
929
932
|
};
|
|
930
933
|
}
|
|
931
|
-
async function
|
|
932
|
-
return G(n, "POST", "/v2/accounts:revokeToken",
|
|
934
|
+
async function Yn(n, e) {
|
|
935
|
+
return G(n, "POST", "/v2/accounts:revokeToken", fe(n, e));
|
|
933
936
|
}
|
|
934
937
|
/**
|
|
935
938
|
* @license
|
|
@@ -992,7 +995,7 @@ class $ {
|
|
|
992
995
|
this.refreshToken = null;
|
|
993
996
|
}
|
|
994
997
|
async refresh(e, t) {
|
|
995
|
-
const { accessToken: i, refreshToken: r, expiresIn: s } = await
|
|
998
|
+
const { accessToken: i, refreshToken: r, expiresIn: s } = await Jn(e, t);
|
|
996
999
|
this.updateTokensAndExpiration(i, r, Number(s));
|
|
997
1000
|
}
|
|
998
1001
|
updateTokensAndExpiration(e, t, i) {
|
|
@@ -1047,7 +1050,7 @@ function A(n, e) {
|
|
|
1047
1050
|
class b {
|
|
1048
1051
|
constructor(e) {
|
|
1049
1052
|
var { uid: t, auth: i, stsTokenManager: r } = e, s = Ne(e, ["uid", "auth", "stsTokenManager"]);
|
|
1050
|
-
this.providerId = "firebase", this.proactiveRefresh = new
|
|
1053
|
+
this.providerId = "firebase", this.proactiveRefresh = new zn(this), this.reloadUserInfo = null, this.reloadListener = null, this.uid = t, this.auth = i, this.stsTokenManager = r, this.accessToken = r.accessToken, this.displayName = s.displayName || null, this.email = s.email || null, this.emailVerified = s.emailVerified || !1, this.phoneNumber = s.phoneNumber || null, this.photoURL = s.photoURL || null, this.isAnonymous = s.isAnonymous || !1, this.tenantId = s.tenantId || null, this.providerData = s.providerData ? [...s.providerData] : [], this.metadata = new Pe(s.createdAt || void 0, s.lastLoginAt || void 0);
|
|
1051
1054
|
}
|
|
1052
1055
|
async getIdToken(e) {
|
|
1053
1056
|
const t = await K(this, this.stsTokenManager.getToken(this.auth, e));
|
|
@@ -1059,10 +1062,10 @@ class b {
|
|
|
1059
1062
|
), this.accessToken !== t && (this.accessToken = t, await this.auth._persistUserIfCurrent(this), this.auth._notifyListenersIfCurrent(this)), t;
|
|
1060
1063
|
}
|
|
1061
1064
|
getIdTokenResult(e) {
|
|
1062
|
-
return
|
|
1065
|
+
return Gn(this, e);
|
|
1063
1066
|
}
|
|
1064
1067
|
reload() {
|
|
1065
|
-
return
|
|
1068
|
+
return qn(this);
|
|
1066
1069
|
}
|
|
1067
1070
|
_assign(e) {
|
|
1068
1071
|
this !== e && (u(
|
|
@@ -1095,13 +1098,13 @@ class b {
|
|
|
1095
1098
|
}
|
|
1096
1099
|
async _updateTokensIfNecessary(e, t = !1) {
|
|
1097
1100
|
let i = !1;
|
|
1098
|
-
e.idToken && e.idToken !== this.stsTokenManager.accessToken && (this.stsTokenManager.updateFromServerResponse(e), i = !0), t && await
|
|
1101
|
+
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);
|
|
1099
1102
|
}
|
|
1100
1103
|
async delete() {
|
|
1101
1104
|
if (E(this.auth.app))
|
|
1102
1105
|
return Promise.reject(M(this.auth));
|
|
1103
1106
|
const e = await this.getIdToken();
|
|
1104
|
-
return await K(this,
|
|
1107
|
+
return await K(this, Wn(this.auth, { idToken: e })), this.stsTokenManager.clearRefreshToken(), this.auth.signOut();
|
|
1105
1108
|
}
|
|
1106
1109
|
toJSON() {
|
|
1107
1110
|
return Object.assign(Object.assign({
|
|
@@ -1129,16 +1132,16 @@ class b {
|
|
|
1129
1132
|
}
|
|
1130
1133
|
static _fromJSON(e, t) {
|
|
1131
1134
|
var i, r, s, o, c, a, l, d;
|
|
1132
|
-
const h = (i = t.displayName) !== null && i !== void 0 ? i : void 0, p = (r = t.email) !== null && r !== void 0 ? r : void 0, w = (s = t.phoneNumber) !== null && s !== void 0 ? s : void 0, U = (o = t.photoURL) !== null && o !== void 0 ? o : void 0,
|
|
1135
|
+
const h = (i = t.displayName) !== null && i !== void 0 ? i : void 0, p = (r = t.email) !== null && r !== void 0 ? r : void 0, w = (s = t.phoneNumber) !== null && s !== void 0 ? s : void 0, U = (o = t.photoURL) !== null && o !== void 0 ? o : void 0, m = (c = t.tenantId) !== null && c !== void 0 ? c : void 0, g = (a = t._redirectEventId) !== null && a !== void 0 ? a : void 0, I = (l = t.createdAt) !== null && l !== void 0 ? l : void 0, x = (d = t.lastLoginAt) !== null && d !== void 0 ? d : void 0, { uid: ve, emailVerified: $e, isAnonymous: He, providerData: Ie, stsTokenManager: je } = t;
|
|
1133
1136
|
u(
|
|
1134
|
-
|
|
1137
|
+
ve && je,
|
|
1135
1138
|
e,
|
|
1136
1139
|
"internal-error"
|
|
1137
1140
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
1138
1141
|
);
|
|
1139
1142
|
const Xt = $.fromJSON(this.name, je);
|
|
1140
1143
|
u(
|
|
1141
|
-
typeof
|
|
1144
|
+
typeof ve == "string",
|
|
1142
1145
|
e,
|
|
1143
1146
|
"internal-error"
|
|
1144
1147
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
@@ -1152,9 +1155,9 @@ class b {
|
|
|
1152
1155
|
e,
|
|
1153
1156
|
"internal-error"
|
|
1154
1157
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
1155
|
-
), A(w, e.name), A(U, e.name), A(
|
|
1158
|
+
), A(w, e.name), A(U, e.name), A(m, e.name), A(g, e.name), A(I, e.name), A(x, e.name);
|
|
1156
1159
|
const Te = new b({
|
|
1157
|
-
uid:
|
|
1160
|
+
uid: ve,
|
|
1158
1161
|
auth: e,
|
|
1159
1162
|
email: p,
|
|
1160
1163
|
emailVerified: $e,
|
|
@@ -1162,12 +1165,12 @@ class b {
|
|
|
1162
1165
|
isAnonymous: He,
|
|
1163
1166
|
photoURL: U,
|
|
1164
1167
|
phoneNumber: w,
|
|
1165
|
-
tenantId:
|
|
1168
|
+
tenantId: m,
|
|
1166
1169
|
stsTokenManager: Xt,
|
|
1167
|
-
createdAt:
|
|
1168
|
-
lastLoginAt:
|
|
1170
|
+
createdAt: I,
|
|
1171
|
+
lastLoginAt: x
|
|
1169
1172
|
});
|
|
1170
|
-
return Ie && Array.isArray(Ie) && (Te.providerData = Ie.map((Qt) => Object.assign({}, Qt))),
|
|
1173
|
+
return Ie && Array.isArray(Ie) && (Te.providerData = Ie.map((Qt) => Object.assign({}, Qt))), g && (Te._redirectEventId = g), Te;
|
|
1171
1174
|
}
|
|
1172
1175
|
/**
|
|
1173
1176
|
* Initialize a User from an idToken server response
|
|
@@ -1183,7 +1186,7 @@ class b {
|
|
|
1183
1186
|
stsTokenManager: r,
|
|
1184
1187
|
isAnonymous: i
|
|
1185
1188
|
});
|
|
1186
|
-
return await
|
|
1189
|
+
return await le(s), s;
|
|
1187
1190
|
}
|
|
1188
1191
|
/**
|
|
1189
1192
|
* Initialize a User from an idToken server response
|
|
@@ -1297,14 +1300,14 @@ const Qe = Pt;
|
|
|
1297
1300
|
* See the License for the specific language governing permissions and
|
|
1298
1301
|
* limitations under the License.
|
|
1299
1302
|
*/
|
|
1300
|
-
function
|
|
1303
|
+
function se(n, e, t) {
|
|
1301
1304
|
return `firebase:${n}:${e}:${t}`;
|
|
1302
1305
|
}
|
|
1303
1306
|
class H {
|
|
1304
1307
|
constructor(e, t, i) {
|
|
1305
1308
|
this.persistence = e, this.auth = t, this.userKey = i;
|
|
1306
1309
|
const { config: r, name: s } = this.auth;
|
|
1307
|
-
this.fullUserKey =
|
|
1310
|
+
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);
|
|
1308
1311
|
}
|
|
1309
1312
|
setCurrentUser(e) {
|
|
1310
1313
|
return this.persistence._set(this.fullUserKey, e.toJSON());
|
|
@@ -1337,7 +1340,7 @@ class H {
|
|
|
1337
1340
|
return l;
|
|
1338
1341
|
}))).filter((l) => l);
|
|
1339
1342
|
let s = r[0] || S(Qe);
|
|
1340
|
-
const o =
|
|
1343
|
+
const o = se(i, e.config.apiKey, e.name);
|
|
1341
1344
|
let c = null;
|
|
1342
1345
|
for (const l of t)
|
|
1343
1346
|
try {
|
|
@@ -1428,20 +1431,20 @@ function Lt(n = _()) {
|
|
|
1428
1431
|
function Mt(n = _()) {
|
|
1429
1432
|
return /webos/i.test(n);
|
|
1430
1433
|
}
|
|
1431
|
-
function
|
|
1434
|
+
function pe(n = _()) {
|
|
1432
1435
|
return /iphone|ipad|ipod/i.test(n) || /macintosh/i.test(n) && /mobile/i.test(n);
|
|
1433
1436
|
}
|
|
1434
|
-
function
|
|
1437
|
+
function Xn(n = _()) {
|
|
1435
1438
|
var e;
|
|
1436
|
-
return
|
|
1439
|
+
return pe(n) && !!(!((e = window.navigator) === null || e === void 0) && e.standalone);
|
|
1437
1440
|
}
|
|
1438
|
-
function
|
|
1441
|
+
function Qn() {
|
|
1439
1442
|
return kn() && document.documentMode === 10;
|
|
1440
1443
|
}
|
|
1441
1444
|
function Ut(n = _()) {
|
|
1442
|
-
return
|
|
1445
|
+
return pe(n) || Nt(n) || Mt(n) || Lt(n) || /windows phone/i.test(n) || Ot(n);
|
|
1443
1446
|
}
|
|
1444
|
-
function
|
|
1447
|
+
function Zn() {
|
|
1445
1448
|
try {
|
|
1446
1449
|
return !!(window && window !== window.top);
|
|
1447
1450
|
} catch {
|
|
@@ -1495,7 +1498,7 @@ function Dt(n, e = []) {
|
|
|
1495
1498
|
* See the License for the specific language governing permissions and
|
|
1496
1499
|
* limitations under the License.
|
|
1497
1500
|
*/
|
|
1498
|
-
class
|
|
1501
|
+
class ei {
|
|
1499
1502
|
constructor(e) {
|
|
1500
1503
|
this.auth = e, this.queue = [];
|
|
1501
1504
|
}
|
|
@@ -1550,8 +1553,8 @@ class ti {
|
|
|
1550
1553
|
* See the License for the specific language governing permissions and
|
|
1551
1554
|
* limitations under the License.
|
|
1552
1555
|
*/
|
|
1553
|
-
async function
|
|
1554
|
-
return G(n, "GET", "/v2/passwordPolicy",
|
|
1556
|
+
async function ti(n, e = {}) {
|
|
1557
|
+
return G(n, "GET", "/v2/passwordPolicy", fe(n, e));
|
|
1555
1558
|
}
|
|
1556
1559
|
/**
|
|
1557
1560
|
* @license
|
|
@@ -1569,12 +1572,12 @@ async function ni(n, e = {}) {
|
|
|
1569
1572
|
* See the License for the specific language governing permissions and
|
|
1570
1573
|
* limitations under the License.
|
|
1571
1574
|
*/
|
|
1572
|
-
const
|
|
1573
|
-
class
|
|
1575
|
+
const ni = 6;
|
|
1576
|
+
class ii {
|
|
1574
1577
|
constructor(e) {
|
|
1575
1578
|
var t, i, r, s;
|
|
1576
1579
|
const o = e.customStrengthOptions;
|
|
1577
|
-
this.customStrengthOptions = {}, this.customStrengthOptions.minPasswordLength = (t = o.minPasswordLength) !== null && t !== void 0 ? t :
|
|
1580
|
+
this.customStrengthOptions = {}, this.customStrengthOptions.minPasswordLength = (t = o.minPasswordLength) !== null && t !== void 0 ? t : ni, o.maxPasswordLength && (this.customStrengthOptions.maxPasswordLength = o.maxPasswordLength), o.containsLowercaseCharacter !== void 0 && (this.customStrengthOptions.containsLowercaseLetter = o.containsLowercaseCharacter), o.containsUppercaseCharacter !== void 0 && (this.customStrengthOptions.containsUppercaseLetter = o.containsUppercaseCharacter), o.containsNumericCharacter !== void 0 && (this.customStrengthOptions.containsNumericCharacter = o.containsNumericCharacter), o.containsNonAlphanumericCharacter !== void 0 && (this.customStrengthOptions.containsNonAlphanumericCharacter = o.containsNonAlphanumericCharacter), this.enforcementState = e.enforcementState, this.enforcementState === "ENFORCEMENT_STATE_UNSPECIFIED" && (this.enforcementState = "OFF"), this.allowedNonAlphanumericCharacters = (r = (i = e.allowedNonAlphanumericCharacters) === null || i === void 0 ? void 0 : i.join("")) !== null && r !== void 0 ? r : "", this.forceUpgradeOnSignin = (s = e.forceUpgradeOnSignin) !== null && s !== void 0 ? s : !1, this.schemaVersion = e.schemaVersion;
|
|
1578
1581
|
}
|
|
1579
1582
|
validatePassword(e) {
|
|
1580
1583
|
var t, i, r, s, o, c;
|
|
@@ -1657,9 +1660,9 @@ class ri {
|
|
|
1657
1660
|
* See the License for the specific language governing permissions and
|
|
1658
1661
|
* limitations under the License.
|
|
1659
1662
|
*/
|
|
1660
|
-
class
|
|
1663
|
+
class ri {
|
|
1661
1664
|
constructor(e, t, i, r) {
|
|
1662
|
-
this.app = e, this.heartbeatServiceProvider = t, this.appCheckServiceProvider = i, this.config = r, this.currentUser = null, this.emulatorConfig = null, this.operations = Promise.resolve(), this.authStateSubscription = new et(this), this.idTokenSubscription = new et(this), this.beforeStateQueue = new
|
|
1665
|
+
this.app = e, this.heartbeatServiceProvider = t, this.appCheckServiceProvider = i, this.config = r, this.currentUser = null, this.emulatorConfig = null, this.operations = Promise.resolve(), this.authStateSubscription = new et(this), this.idTokenSubscription = new et(this), this.beforeStateQueue = new ei(this), this.redirectUser = null, this.isProactiveRefreshEnabled = !1, this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION = 1, this._canInitEmulator = !0, this._isInitialized = !1, this._deleted = !1, this._initializationPromise = null, this._popupRedirectResolver = null, this._errorFactory = Tt, this._agentRecaptchaConfig = null, this._tenantRecaptchaConfigs = {}, this._projectPasswordPolicy = null, this._tenantPasswordPolicies = {}, this.lastNotifiedUid = void 0, this.languageCode = null, this.tenantId = null, this.settings = { appVerificationDisabledForTesting: !1 }, this.frameworks = [], this.name = e.name, this.clientVersion = r.sdkClientVersion;
|
|
1663
1666
|
}
|
|
1664
1667
|
_initializeWithPersistence(e, t) {
|
|
1665
1668
|
return t && (this._popupRedirectResolver = S(t)), this._initializationPromise = this.queue(async () => {
|
|
@@ -1745,7 +1748,7 @@ class si {
|
|
|
1745
1748
|
}
|
|
1746
1749
|
async reloadAndSetCurrentUserOrClear(e) {
|
|
1747
1750
|
try {
|
|
1748
|
-
await
|
|
1751
|
+
await le(e);
|
|
1749
1752
|
} catch (t) {
|
|
1750
1753
|
if ((t == null ? void 0 : t.code) !== "auth/network-request-failed")
|
|
1751
1754
|
return this.directlySetCurrentUser(null);
|
|
@@ -1753,7 +1756,7 @@ class si {
|
|
|
1753
1756
|
return this.directlySetCurrentUser(e);
|
|
1754
1757
|
}
|
|
1755
1758
|
useDeviceLanguage() {
|
|
1756
|
-
this.languageCode =
|
|
1759
|
+
this.languageCode = Vn();
|
|
1757
1760
|
}
|
|
1758
1761
|
async _delete() {
|
|
1759
1762
|
this._deleted = !0;
|
|
@@ -1804,7 +1807,7 @@ class si {
|
|
|
1804
1807
|
return this.tenantId === null ? this._projectPasswordPolicy : this._tenantPasswordPolicies[this.tenantId];
|
|
1805
1808
|
}
|
|
1806
1809
|
async _updatePasswordPolicy() {
|
|
1807
|
-
const e = await
|
|
1810
|
+
const e = await ti(this), t = new ii(e);
|
|
1808
1811
|
this.tenantId === null ? this._projectPasswordPolicy = t : this._tenantPasswordPolicies[this.tenantId] = t;
|
|
1809
1812
|
}
|
|
1810
1813
|
_getPersistence() {
|
|
@@ -1844,7 +1847,7 @@ class si {
|
|
|
1844
1847
|
token: e,
|
|
1845
1848
|
idToken: t
|
|
1846
1849
|
};
|
|
1847
|
-
this.tenantId != null && (i.tenantId = this.tenantId), await
|
|
1850
|
+
this.tenantId != null && (i.tenantId = this.tenantId), await Yn(this, i);
|
|
1848
1851
|
}
|
|
1849
1852
|
}
|
|
1850
1853
|
toJSON() {
|
|
@@ -1987,10 +1990,10 @@ class si {
|
|
|
1987
1990
|
async _getAppCheckToken() {
|
|
1988
1991
|
var e;
|
|
1989
1992
|
const t = await ((e = this.appCheckServiceProvider.getImmediate({ optional: !0 })) === null || e === void 0 ? void 0 : e.getToken());
|
|
1990
|
-
return t != null && t.error &&
|
|
1993
|
+
return t != null && t.error && Dn(`Error while retrieving App Check token: ${t.error}`), t == null ? void 0 : t.token;
|
|
1991
1994
|
}
|
|
1992
1995
|
}
|
|
1993
|
-
function
|
|
1996
|
+
function me(n) {
|
|
1994
1997
|
return W(n);
|
|
1995
1998
|
}
|
|
1996
1999
|
class et {
|
|
@@ -2030,16 +2033,16 @@ let Fe = {
|
|
|
2030
2033
|
recaptchaEnterpriseScript: "",
|
|
2031
2034
|
gapiScript: ""
|
|
2032
2035
|
};
|
|
2033
|
-
function
|
|
2036
|
+
function si(n) {
|
|
2034
2037
|
Fe = n;
|
|
2035
2038
|
}
|
|
2036
|
-
function
|
|
2039
|
+
function oi(n) {
|
|
2037
2040
|
return Fe.loadJS(n);
|
|
2038
2041
|
}
|
|
2039
|
-
function
|
|
2042
|
+
function ai() {
|
|
2040
2043
|
return Fe.gapiScript;
|
|
2041
2044
|
}
|
|
2042
|
-
function
|
|
2045
|
+
function ci(n) {
|
|
2043
2046
|
return `__${n}${Math.floor(Math.random() * 1e6)}`;
|
|
2044
2047
|
}
|
|
2045
2048
|
/**
|
|
@@ -2058,7 +2061,7 @@ function li(n) {
|
|
|
2058
2061
|
* See the License for the specific language governing permissions and
|
|
2059
2062
|
* limitations under the License.
|
|
2060
2063
|
*/
|
|
2061
|
-
function
|
|
2064
|
+
function li(n, e) {
|
|
2062
2065
|
const t = _t(n, "auth");
|
|
2063
2066
|
if (t.isInitialized()) {
|
|
2064
2067
|
const r = t.getImmediate(), s = t.getOptions();
|
|
@@ -2072,12 +2075,12 @@ function ui(n, e) {
|
|
|
2072
2075
|
}
|
|
2073
2076
|
return t.initialize({ options: e });
|
|
2074
2077
|
}
|
|
2075
|
-
function
|
|
2078
|
+
function ui(n, e) {
|
|
2076
2079
|
const t = (e == null ? void 0 : e.persistence) || [], i = (Array.isArray(t) ? t : [t]).map(S);
|
|
2077
2080
|
e != null && e.errorMap && n._updateErrorMap(e.errorMap), n._initializeWithPersistence(i, e == null ? void 0 : e.popupRedirectResolver);
|
|
2078
2081
|
}
|
|
2079
|
-
function
|
|
2080
|
-
const i =
|
|
2082
|
+
function di(n, e, t) {
|
|
2083
|
+
const i = me(n);
|
|
2081
2084
|
u(
|
|
2082
2085
|
i._canInitEmulator,
|
|
2083
2086
|
i,
|
|
@@ -2089,19 +2092,19 @@ function hi(n, e, t) {
|
|
|
2089
2092
|
"invalid-emulator-scheme"
|
|
2090
2093
|
/* AuthErrorCode.INVALID_EMULATOR_SCHEME */
|
|
2091
2094
|
);
|
|
2092
|
-
const r = !1, s = Ft(e), { host: o, port: c } =
|
|
2095
|
+
const r = !1, s = Ft(e), { host: o, port: c } = hi(e), a = c === null ? "" : `:${c}`;
|
|
2093
2096
|
i.config.emulator = { url: `${s}//${o}${a}/` }, i.settings.appVerificationDisabledForTesting = !0, i.emulatorConfig = Object.freeze({
|
|
2094
2097
|
host: o,
|
|
2095
2098
|
port: c,
|
|
2096
2099
|
protocol: s.replace(":", ""),
|
|
2097
2100
|
options: Object.freeze({ disableWarnings: r })
|
|
2098
|
-
}),
|
|
2101
|
+
}), fi();
|
|
2099
2102
|
}
|
|
2100
2103
|
function Ft(n) {
|
|
2101
2104
|
const e = n.indexOf(":");
|
|
2102
2105
|
return e < 0 ? "" : n.substr(0, e + 1);
|
|
2103
2106
|
}
|
|
2104
|
-
function
|
|
2107
|
+
function hi(n) {
|
|
2105
2108
|
const e = Ft(n), t = /(\/\/)?([^?#/]+)/.exec(n.substr(e.length));
|
|
2106
2109
|
if (!t)
|
|
2107
2110
|
return { host: "", port: null };
|
|
@@ -2120,7 +2123,7 @@ function tt(n) {
|
|
|
2120
2123
|
const e = Number(n);
|
|
2121
2124
|
return isNaN(e) ? null : e;
|
|
2122
2125
|
}
|
|
2123
|
-
function
|
|
2126
|
+
function fi() {
|
|
2124
2127
|
function n() {
|
|
2125
2128
|
const e = document.createElement("p"), t = e.style;
|
|
2126
2129
|
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);
|
|
@@ -2186,7 +2189,7 @@ class xt {
|
|
|
2186
2189
|
* limitations under the License.
|
|
2187
2190
|
*/
|
|
2188
2191
|
async function j(n, e) {
|
|
2189
|
-
return kt(n, "POST", "/v1/accounts:signInWithIdp",
|
|
2192
|
+
return kt(n, "POST", "/v1/accounts:signInWithIdp", fe(n, e));
|
|
2190
2193
|
}
|
|
2191
2194
|
/**
|
|
2192
2195
|
* @license
|
|
@@ -2204,14 +2207,14 @@ async function j(n, e) {
|
|
|
2204
2207
|
* See the License for the specific language governing permissions and
|
|
2205
2208
|
* limitations under the License.
|
|
2206
2209
|
*/
|
|
2207
|
-
const
|
|
2208
|
-
class
|
|
2210
|
+
const pi = "http://localhost";
|
|
2211
|
+
class D extends xt {
|
|
2209
2212
|
constructor() {
|
|
2210
2213
|
super(...arguments), this.pendingToken = null;
|
|
2211
2214
|
}
|
|
2212
2215
|
/** @internal */
|
|
2213
2216
|
static _fromParams(e) {
|
|
2214
|
-
const t = new
|
|
2217
|
+
const t = new D(e.providerId, e.signInMethod);
|
|
2215
2218
|
return e.idToken || e.accessToken ? (e.idToken && (t.idToken = e.idToken), e.accessToken && (t.accessToken = e.accessToken), e.nonce && !e.pendingToken && (t.nonce = e.nonce), e.pendingToken && (t.pendingToken = e.pendingToken)) : e.oauthToken && e.oauthTokenSecret ? (t.accessToken = e.oauthToken, t.secret = e.oauthTokenSecret) : R(
|
|
2216
2219
|
"argument-error"
|
|
2217
2220
|
/* AuthErrorCode.ARGUMENT_ERROR */
|
|
@@ -2242,7 +2245,7 @@ class F extends xt {
|
|
|
2242
2245
|
const t = typeof e == "string" ? JSON.parse(e) : e, { providerId: i, signInMethod: r } = t, s = Ne(t, ["providerId", "signInMethod"]);
|
|
2243
2246
|
if (!i || !r)
|
|
2244
2247
|
return null;
|
|
2245
|
-
const o = new
|
|
2248
|
+
const o = new D(i, r);
|
|
2246
2249
|
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;
|
|
2247
2250
|
}
|
|
2248
2251
|
/** @internal */
|
|
@@ -2262,7 +2265,7 @@ class F extends xt {
|
|
|
2262
2265
|
}
|
|
2263
2266
|
buildRequest() {
|
|
2264
2267
|
const e = {
|
|
2265
|
-
requestUri:
|
|
2268
|
+
requestUri: pi,
|
|
2266
2269
|
returnSecureToken: !0
|
|
2267
2270
|
};
|
|
2268
2271
|
if (this.pendingToken)
|
|
@@ -2398,7 +2401,7 @@ class C extends Q {
|
|
|
2398
2401
|
* @param accessToken - Facebook access token.
|
|
2399
2402
|
*/
|
|
2400
2403
|
static credential(e) {
|
|
2401
|
-
return
|
|
2404
|
+
return D._fromParams({
|
|
2402
2405
|
providerId: C.PROVIDER_ID,
|
|
2403
2406
|
signInMethod: C.FACEBOOK_SIGN_IN_METHOD,
|
|
2404
2407
|
accessToken: e
|
|
@@ -2470,7 +2473,7 @@ class O extends Q {
|
|
|
2470
2473
|
* @param accessToken - Google access token.
|
|
2471
2474
|
*/
|
|
2472
2475
|
static credential(e, t) {
|
|
2473
|
-
return
|
|
2476
|
+
return D._fromParams({
|
|
2474
2477
|
providerId: O.PROVIDER_ID,
|
|
2475
2478
|
signInMethod: O.GOOGLE_SIGN_IN_METHOD,
|
|
2476
2479
|
idToken: e,
|
|
@@ -2538,7 +2541,7 @@ class N extends Q {
|
|
|
2538
2541
|
* @param accessToken - Github access token.
|
|
2539
2542
|
*/
|
|
2540
2543
|
static credential(e) {
|
|
2541
|
-
return
|
|
2544
|
+
return D._fromParams({
|
|
2542
2545
|
providerId: N.PROVIDER_ID,
|
|
2543
2546
|
signInMethod: N.GITHUB_SIGN_IN_METHOD,
|
|
2544
2547
|
accessToken: e
|
|
@@ -2603,7 +2606,7 @@ class L extends Q {
|
|
|
2603
2606
|
* @param secret - Twitter secret.
|
|
2604
2607
|
*/
|
|
2605
2608
|
static credential(e, t) {
|
|
2606
|
-
return
|
|
2609
|
+
return D._fromParams({
|
|
2607
2610
|
providerId: L.PROVIDER_ID,
|
|
2608
2611
|
signInMethod: L.TWITTER_SIGN_IN_METHOD,
|
|
2609
2612
|
oauthToken: e,
|
|
@@ -2658,13 +2661,13 @@ L.PROVIDER_ID = "twitter.com";
|
|
|
2658
2661
|
* See the License for the specific language governing permissions and
|
|
2659
2662
|
* limitations under the License.
|
|
2660
2663
|
*/
|
|
2661
|
-
class
|
|
2664
|
+
class F {
|
|
2662
2665
|
constructor(e) {
|
|
2663
2666
|
this.user = e.user, this.providerId = e.providerId, this._tokenResponse = e._tokenResponse, this.operationType = e.operationType;
|
|
2664
2667
|
}
|
|
2665
2668
|
static async _fromIdTokenResponse(e, t, i, r = !1) {
|
|
2666
2669
|
const s = await b._fromIdTokenResponse(e, i, r), o = nt(i);
|
|
2667
|
-
return new
|
|
2670
|
+
return new F({
|
|
2668
2671
|
user: s,
|
|
2669
2672
|
providerId: o,
|
|
2670
2673
|
_tokenResponse: i,
|
|
@@ -2678,7 +2681,7 @@ class x {
|
|
|
2678
2681
|
!0
|
|
2679
2682
|
);
|
|
2680
2683
|
const r = nt(i);
|
|
2681
|
-
return new
|
|
2684
|
+
return new F({
|
|
2682
2685
|
user: e,
|
|
2683
2686
|
providerId: r,
|
|
2684
2687
|
_tokenResponse: i,
|
|
@@ -2705,10 +2708,10 @@ function nt(n) {
|
|
|
2705
2708
|
* See the License for the specific language governing permissions and
|
|
2706
2709
|
* limitations under the License.
|
|
2707
2710
|
*/
|
|
2708
|
-
class
|
|
2711
|
+
class ue extends Oe {
|
|
2709
2712
|
constructor(e, t, i, r) {
|
|
2710
2713
|
var s;
|
|
2711
|
-
super(t.code, t.message), this.operationType = i, this.user = r, Object.setPrototypeOf(this,
|
|
2714
|
+
super(t.code, t.message), this.operationType = i, this.user = r, Object.setPrototypeOf(this, ue.prototype), this.customData = {
|
|
2712
2715
|
appName: e.name,
|
|
2713
2716
|
tenantId: (s = e.tenantId) !== null && s !== void 0 ? s : void 0,
|
|
2714
2717
|
_serverResponse: t.customData._serverResponse,
|
|
@@ -2716,17 +2719,17 @@ class de extends Oe {
|
|
|
2716
2719
|
};
|
|
2717
2720
|
}
|
|
2718
2721
|
static _fromErrorAndOperation(e, t, i, r) {
|
|
2719
|
-
return new
|
|
2722
|
+
return new ue(e, t, i, r);
|
|
2720
2723
|
}
|
|
2721
2724
|
}
|
|
2722
2725
|
function $t(n, e, t, i) {
|
|
2723
2726
|
return (e === "reauthenticate" ? t._getReauthenticationResolver(n) : t._getIdTokenResponse(n)).catch((s) => {
|
|
2724
|
-
throw s.code === "auth/multi-factor-auth-required" ?
|
|
2727
|
+
throw s.code === "auth/multi-factor-auth-required" ? ue._fromErrorAndOperation(n, s, e, i) : s;
|
|
2725
2728
|
});
|
|
2726
2729
|
}
|
|
2727
|
-
async function
|
|
2730
|
+
async function mi(n, e, t = !1) {
|
|
2728
2731
|
const i = await K(n, e._linkToIdToken(n.auth, await n.getIdToken()), t);
|
|
2729
|
-
return
|
|
2732
|
+
return F._forOperation(n, "link", i);
|
|
2730
2733
|
}
|
|
2731
2734
|
/**
|
|
2732
2735
|
* @license
|
|
@@ -2744,7 +2747,7 @@ async function gi(n, e, t = !1) {
|
|
|
2744
2747
|
* See the License for the specific language governing permissions and
|
|
2745
2748
|
* limitations under the License.
|
|
2746
2749
|
*/
|
|
2747
|
-
async function
|
|
2750
|
+
async function gi(n, e, t = !1) {
|
|
2748
2751
|
const { auth: i } = n;
|
|
2749
2752
|
if (E(i.app))
|
|
2750
2753
|
return Promise.reject(M(i));
|
|
@@ -2770,7 +2773,7 @@ async function _i(n, e, t = !1) {
|
|
|
2770
2773
|
i,
|
|
2771
2774
|
"user-mismatch"
|
|
2772
2775
|
/* AuthErrorCode.USER_MISMATCH */
|
|
2773
|
-
),
|
|
2776
|
+
), F._forOperation(n, r, s);
|
|
2774
2777
|
} catch (s) {
|
|
2775
2778
|
throw (s == null ? void 0 : s.code) === "auth/user-not-found" && R(
|
|
2776
2779
|
i,
|
|
@@ -2795,10 +2798,10 @@ async function _i(n, e, t = !1) {
|
|
|
2795
2798
|
* See the License for the specific language governing permissions and
|
|
2796
2799
|
* limitations under the License.
|
|
2797
2800
|
*/
|
|
2798
|
-
async function
|
|
2801
|
+
async function _i(n, e, t = !1) {
|
|
2799
2802
|
if (E(n.app))
|
|
2800
2803
|
return Promise.reject(M(n));
|
|
2801
|
-
const i = "signIn", r = await $t(n, i, e), s = await
|
|
2804
|
+
const i = "signIn", r = await $t(n, i, e), s = await F._fromIdTokenResponse(n, i, r);
|
|
2802
2805
|
return t || await n._updateCurrentUser(s.user), s;
|
|
2803
2806
|
}
|
|
2804
2807
|
/**
|
|
@@ -2817,8 +2820,8 @@ async function vi(n, e, t = !1) {
|
|
|
2817
2820
|
* See the License for the specific language governing permissions and
|
|
2818
2821
|
* limitations under the License.
|
|
2819
2822
|
*/
|
|
2820
|
-
async function
|
|
2821
|
-
return kt(n, "POST", "/v1/accounts:signInWithCustomToken",
|
|
2823
|
+
async function vi(n, e) {
|
|
2824
|
+
return kt(n, "POST", "/v1/accounts:signInWithCustomToken", fe(n, e));
|
|
2822
2825
|
}
|
|
2823
2826
|
/**
|
|
2824
2827
|
* @license
|
|
@@ -2836,22 +2839,22 @@ async function Ii(n, e) {
|
|
|
2836
2839
|
* See the License for the specific language governing permissions and
|
|
2837
2840
|
* limitations under the License.
|
|
2838
2841
|
*/
|
|
2839
|
-
async function
|
|
2842
|
+
async function Ii(n, e) {
|
|
2840
2843
|
if (E(n.app))
|
|
2841
2844
|
return Promise.reject(M(n));
|
|
2842
|
-
const t =
|
|
2845
|
+
const t = me(n), i = await vi(t, {
|
|
2843
2846
|
token: e,
|
|
2844
2847
|
returnSecureToken: !0
|
|
2845
|
-
}), r = await
|
|
2848
|
+
}), r = await F._fromIdTokenResponse(t, "signIn", i);
|
|
2846
2849
|
return await t._updateCurrentUser(r.user), r;
|
|
2847
2850
|
}
|
|
2848
|
-
function
|
|
2851
|
+
function Ti(n, e, t, i) {
|
|
2849
2852
|
return W(n).onIdTokenChanged(e, t, i);
|
|
2850
2853
|
}
|
|
2851
|
-
function
|
|
2854
|
+
function yi(n, e, t) {
|
|
2852
2855
|
return W(n).beforeAuthStateChanged(e, t);
|
|
2853
2856
|
}
|
|
2854
|
-
const
|
|
2857
|
+
const de = "__sak";
|
|
2855
2858
|
/**
|
|
2856
2859
|
* @license
|
|
2857
2860
|
* Copyright 2019 Google LLC
|
|
@@ -2874,7 +2877,7 @@ class Ht {
|
|
|
2874
2877
|
}
|
|
2875
2878
|
_isAvailable() {
|
|
2876
2879
|
try {
|
|
2877
|
-
return this.storage ? (this.storage.setItem(
|
|
2880
|
+
return this.storage ? (this.storage.setItem(de, "1"), this.storage.removeItem(de), Promise.resolve(!0)) : Promise.resolve(!1);
|
|
2878
2881
|
} catch {
|
|
2879
2882
|
return Promise.resolve(!1);
|
|
2880
2883
|
}
|
|
@@ -2909,18 +2912,18 @@ class Ht {
|
|
|
2909
2912
|
* See the License for the specific language governing permissions and
|
|
2910
2913
|
* limitations under the License.
|
|
2911
2914
|
*/
|
|
2912
|
-
function
|
|
2915
|
+
function wi() {
|
|
2913
2916
|
const n = _();
|
|
2914
|
-
return De(n) ||
|
|
2917
|
+
return De(n) || pe(n);
|
|
2915
2918
|
}
|
|
2916
|
-
const
|
|
2919
|
+
const Ei = 1e3, ki = 10;
|
|
2917
2920
|
class jt extends Ht {
|
|
2918
2921
|
constructor() {
|
|
2919
2922
|
super(
|
|
2920
2923
|
() => window.localStorage,
|
|
2921
2924
|
"LOCAL"
|
|
2922
2925
|
/* PersistenceType.LOCAL */
|
|
2923
|
-
), this.boundEventHandler = (e, t) => this.onStorageEvent(e, t), this.listeners = {}, this.localCache = {}, this.pollTimer = null, this.safariLocalStorageNotSynced =
|
|
2926
|
+
), this.boundEventHandler = (e, t) => this.onStorageEvent(e, t), this.listeners = {}, this.localCache = {}, this.pollTimer = null, this.safariLocalStorageNotSynced = wi() && Zn(), this.fallbackToPolling = Ut(), this._shouldAllowMigration = !0;
|
|
2924
2927
|
}
|
|
2925
2928
|
forAllChangedKeys(e) {
|
|
2926
2929
|
for (const t of Object.keys(this.listeners)) {
|
|
@@ -2947,7 +2950,7 @@ class jt extends Ht {
|
|
|
2947
2950
|
const o = this.storage.getItem(i);
|
|
2948
2951
|
!t && this.localCache[i] === o || this.notifyListeners(i, o);
|
|
2949
2952
|
}, s = this.storage.getItem(i);
|
|
2950
|
-
|
|
2953
|
+
Qn() && s !== e.newValue && e.newValue !== e.oldValue ? setTimeout(r, ki) : r();
|
|
2951
2954
|
}
|
|
2952
2955
|
notifyListeners(e, t) {
|
|
2953
2956
|
this.localCache[e] = t;
|
|
@@ -2969,7 +2972,7 @@ class jt extends Ht {
|
|
|
2969
2972
|
!0
|
|
2970
2973
|
);
|
|
2971
2974
|
});
|
|
2972
|
-
},
|
|
2975
|
+
}, Ei);
|
|
2973
2976
|
}
|
|
2974
2977
|
stopPolling() {
|
|
2975
2978
|
this.pollTimer && (clearInterval(this.pollTimer), this.pollTimer = null);
|
|
@@ -2999,7 +3002,7 @@ class jt extends Ht {
|
|
|
2999
3002
|
}
|
|
3000
3003
|
}
|
|
3001
3004
|
jt.type = "LOCAL";
|
|
3002
|
-
const
|
|
3005
|
+
const bi = jt;
|
|
3003
3006
|
/**
|
|
3004
3007
|
* @license
|
|
3005
3008
|
* Copyright 2020 Google LLC
|
|
@@ -3047,7 +3050,7 @@ const Gt = Wt;
|
|
|
3047
3050
|
* See the License for the specific language governing permissions and
|
|
3048
3051
|
* limitations under the License.
|
|
3049
3052
|
*/
|
|
3050
|
-
function
|
|
3053
|
+
function Si(n) {
|
|
3051
3054
|
return Promise.all(n.map(async (e) => {
|
|
3052
3055
|
try {
|
|
3053
3056
|
return {
|
|
@@ -3078,7 +3081,7 @@ function Ri(n) {
|
|
|
3078
3081
|
* See the License for the specific language governing permissions and
|
|
3079
3082
|
* limitations under the License.
|
|
3080
3083
|
*/
|
|
3081
|
-
class
|
|
3084
|
+
class ge {
|
|
3082
3085
|
constructor(e) {
|
|
3083
3086
|
this.eventTarget = e, this.handlersMap = {}, this.boundEventHandler = this.handleEvent.bind(this);
|
|
3084
3087
|
}
|
|
@@ -3092,7 +3095,7 @@ class _e {
|
|
|
3092
3095
|
const t = this.receivers.find((r) => r.isListeningto(e));
|
|
3093
3096
|
if (t)
|
|
3094
3097
|
return t;
|
|
3095
|
-
const i = new
|
|
3098
|
+
const i = new ge(e);
|
|
3096
3099
|
return this.receivers.push(i), i;
|
|
3097
3100
|
}
|
|
3098
3101
|
isListeningto(e) {
|
|
@@ -3117,7 +3120,7 @@ class _e {
|
|
|
3117
3120
|
eventId: i,
|
|
3118
3121
|
eventType: r
|
|
3119
3122
|
});
|
|
3120
|
-
const c = Array.from(o).map(async (l) => l(t.origin, s)), a = await
|
|
3123
|
+
const c = Array.from(o).map(async (l) => l(t.origin, s)), a = await Si(c);
|
|
3121
3124
|
t.ports[0].postMessage({
|
|
3122
3125
|
status: "done",
|
|
3123
3126
|
eventId: i,
|
|
@@ -3146,7 +3149,7 @@ class _e {
|
|
|
3146
3149
|
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);
|
|
3147
3150
|
}
|
|
3148
3151
|
}
|
|
3149
|
-
|
|
3152
|
+
ge.receivers = [];
|
|
3150
3153
|
/**
|
|
3151
3154
|
* @license
|
|
3152
3155
|
* Copyright 2020 Google LLC
|
|
@@ -3185,7 +3188,7 @@ function xe(n = "", e = 10) {
|
|
|
3185
3188
|
* See the License for the specific language governing permissions and
|
|
3186
3189
|
* limitations under the License.
|
|
3187
3190
|
*/
|
|
3188
|
-
class
|
|
3191
|
+
class Ri {
|
|
3189
3192
|
constructor(e) {
|
|
3190
3193
|
this.target = e, this.handlers = /* @__PURE__ */ new Set();
|
|
3191
3194
|
}
|
|
@@ -3285,7 +3288,7 @@ class Pi {
|
|
|
3285
3288
|
function y() {
|
|
3286
3289
|
return window;
|
|
3287
3290
|
}
|
|
3288
|
-
function
|
|
3291
|
+
function Pi(n) {
|
|
3289
3292
|
y().location.href = n;
|
|
3290
3293
|
}
|
|
3291
3294
|
/**
|
|
@@ -3307,7 +3310,7 @@ function Ai(n) {
|
|
|
3307
3310
|
function Bt() {
|
|
3308
3311
|
return typeof y().WorkerGlobalScope < "u" && typeof y().importScripts == "function";
|
|
3309
3312
|
}
|
|
3310
|
-
async function
|
|
3313
|
+
async function Ai() {
|
|
3311
3314
|
if (!(navigator != null && navigator.serviceWorker))
|
|
3312
3315
|
return null;
|
|
3313
3316
|
try {
|
|
@@ -3316,11 +3319,11 @@ async function Ci() {
|
|
|
3316
3319
|
return null;
|
|
3317
3320
|
}
|
|
3318
3321
|
}
|
|
3319
|
-
function
|
|
3322
|
+
function Ci() {
|
|
3320
3323
|
var n;
|
|
3321
3324
|
return ((n = navigator == null ? void 0 : navigator.serviceWorker) === null || n === void 0 ? void 0 : n.controller) || null;
|
|
3322
3325
|
}
|
|
3323
|
-
function
|
|
3326
|
+
function Oi() {
|
|
3324
3327
|
return Bt() ? self : null;
|
|
3325
3328
|
}
|
|
3326
3329
|
/**
|
|
@@ -3339,7 +3342,7 @@ function Ni() {
|
|
|
3339
3342
|
* See the License for the specific language governing permissions and
|
|
3340
3343
|
* limitations under the License.
|
|
3341
3344
|
*/
|
|
3342
|
-
const zt = "firebaseLocalStorageDb",
|
|
3345
|
+
const zt = "firebaseLocalStorageDb", Ni = 1, he = "firebaseLocalStorage", qt = "fbase_key";
|
|
3343
3346
|
class Z {
|
|
3344
3347
|
constructor(e) {
|
|
3345
3348
|
this.request = e;
|
|
@@ -3354,47 +3357,47 @@ class Z {
|
|
|
3354
3357
|
});
|
|
3355
3358
|
}
|
|
3356
3359
|
}
|
|
3357
|
-
function
|
|
3358
|
-
return n.transaction([
|
|
3360
|
+
function _e(n, e) {
|
|
3361
|
+
return n.transaction([he], e ? "readwrite" : "readonly").objectStore(he);
|
|
3359
3362
|
}
|
|
3360
|
-
function
|
|
3363
|
+
function Li() {
|
|
3361
3364
|
const n = indexedDB.deleteDatabase(zt);
|
|
3362
3365
|
return new Z(n).toPromise();
|
|
3363
3366
|
}
|
|
3364
3367
|
function Ae() {
|
|
3365
|
-
const n = indexedDB.open(zt,
|
|
3368
|
+
const n = indexedDB.open(zt, Ni);
|
|
3366
3369
|
return new Promise((e, t) => {
|
|
3367
3370
|
n.addEventListener("error", () => {
|
|
3368
3371
|
t(n.error);
|
|
3369
3372
|
}), n.addEventListener("upgradeneeded", () => {
|
|
3370
3373
|
const i = n.result;
|
|
3371
3374
|
try {
|
|
3372
|
-
i.createObjectStore(
|
|
3375
|
+
i.createObjectStore(he, { keyPath: qt });
|
|
3373
3376
|
} catch (r) {
|
|
3374
3377
|
t(r);
|
|
3375
3378
|
}
|
|
3376
3379
|
}), n.addEventListener("success", async () => {
|
|
3377
3380
|
const i = n.result;
|
|
3378
|
-
i.objectStoreNames.contains(
|
|
3381
|
+
i.objectStoreNames.contains(he) ? e(i) : (i.close(), await Li(), e(await Ae()));
|
|
3379
3382
|
});
|
|
3380
3383
|
});
|
|
3381
3384
|
}
|
|
3382
3385
|
async function it(n, e, t) {
|
|
3383
|
-
const i =
|
|
3386
|
+
const i = _e(n, !0).put({
|
|
3384
3387
|
[qt]: e,
|
|
3385
3388
|
value: t
|
|
3386
3389
|
});
|
|
3387
3390
|
return new Z(i).toPromise();
|
|
3388
3391
|
}
|
|
3389
|
-
async function
|
|
3390
|
-
const t =
|
|
3392
|
+
async function Mi(n, e) {
|
|
3393
|
+
const t = _e(n, !1).get(e), i = await new Z(t).toPromise();
|
|
3391
3394
|
return i === void 0 ? null : i.value;
|
|
3392
3395
|
}
|
|
3393
3396
|
function rt(n, e) {
|
|
3394
|
-
const t =
|
|
3397
|
+
const t = _e(n, !0).delete(e);
|
|
3395
3398
|
return new Z(t).toPromise();
|
|
3396
3399
|
}
|
|
3397
|
-
const
|
|
3400
|
+
const Ui = 800, Di = 3;
|
|
3398
3401
|
class Kt {
|
|
3399
3402
|
constructor() {
|
|
3400
3403
|
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(() => {
|
|
@@ -3411,7 +3414,7 @@ class Kt {
|
|
|
3411
3414
|
const i = await this._openDb();
|
|
3412
3415
|
return await e(i);
|
|
3413
3416
|
} catch (i) {
|
|
3414
|
-
if (t++ >
|
|
3417
|
+
if (t++ > Di)
|
|
3415
3418
|
throw i;
|
|
3416
3419
|
this.db && (this.db.close(), this.db = void 0);
|
|
3417
3420
|
}
|
|
@@ -3427,7 +3430,7 @@ class Kt {
|
|
|
3427
3430
|
* As the worker we should listen to events from the main window.
|
|
3428
3431
|
*/
|
|
3429
3432
|
async initializeReceiver() {
|
|
3430
|
-
this.receiver =
|
|
3433
|
+
this.receiver = ge._getInstance(Oi()), this.receiver._subscribe("keyChanged", async (e, t) => ({
|
|
3431
3434
|
keyProcessed: (await this._poll()).includes(t.key)
|
|
3432
3435
|
})), this.receiver._subscribe("ping", async (e, t) => [
|
|
3433
3436
|
"keyChanged"
|
|
@@ -3443,9 +3446,9 @@ class Kt {
|
|
|
3443
3446
|
*/
|
|
3444
3447
|
async initializeSender() {
|
|
3445
3448
|
var e, t;
|
|
3446
|
-
if (this.activeServiceWorker = await
|
|
3449
|
+
if (this.activeServiceWorker = await Ai(), !this.activeServiceWorker)
|
|
3447
3450
|
return;
|
|
3448
|
-
this.sender = new
|
|
3451
|
+
this.sender = new Ri(this.activeServiceWorker);
|
|
3449
3452
|
const i = await this.sender._send(
|
|
3450
3453
|
"ping",
|
|
3451
3454
|
{},
|
|
@@ -3467,7 +3470,7 @@ class Kt {
|
|
|
3467
3470
|
* @param key - Storage key which changed.
|
|
3468
3471
|
*/
|
|
3469
3472
|
async notifyServiceWorker(e) {
|
|
3470
|
-
if (!(!this.sender || !this.activeServiceWorker ||
|
|
3473
|
+
if (!(!this.sender || !this.activeServiceWorker || Ci() !== this.activeServiceWorker))
|
|
3471
3474
|
try {
|
|
3472
3475
|
await this.sender._send(
|
|
3473
3476
|
"keyChanged",
|
|
@@ -3484,7 +3487,7 @@ class Kt {
|
|
|
3484
3487
|
if (!indexedDB)
|
|
3485
3488
|
return !1;
|
|
3486
3489
|
const e = await Ae();
|
|
3487
|
-
return await it(e,
|
|
3490
|
+
return await it(e, de, "1"), await rt(e, de), !0;
|
|
3488
3491
|
} catch {
|
|
3489
3492
|
}
|
|
3490
3493
|
return !1;
|
|
@@ -3501,7 +3504,7 @@ class Kt {
|
|
|
3501
3504
|
return this._withPendingWrite(async () => (await this._withRetries((i) => it(i, e, t)), this.localCache[e] = t, this.notifyServiceWorker(e)));
|
|
3502
3505
|
}
|
|
3503
3506
|
async _get(e) {
|
|
3504
|
-
const t = await this._withRetries((i) =>
|
|
3507
|
+
const t = await this._withRetries((i) => Mi(i, e));
|
|
3505
3508
|
return this.localCache[e] = t, t;
|
|
3506
3509
|
}
|
|
3507
3510
|
async _remove(e) {
|
|
@@ -3509,7 +3512,7 @@ class Kt {
|
|
|
3509
3512
|
}
|
|
3510
3513
|
async _poll() {
|
|
3511
3514
|
const e = await this._withRetries((r) => {
|
|
3512
|
-
const s =
|
|
3515
|
+
const s = _e(r, !1).getAll();
|
|
3513
3516
|
return new Z(s).toPromise();
|
|
3514
3517
|
});
|
|
3515
3518
|
if (!e)
|
|
@@ -3532,7 +3535,7 @@ class Kt {
|
|
|
3532
3535
|
r(t);
|
|
3533
3536
|
}
|
|
3534
3537
|
startPolling() {
|
|
3535
|
-
this.stopPolling(), this.pollTimer = setInterval(async () => this._poll(),
|
|
3538
|
+
this.stopPolling(), this.pollTimer = setInterval(async () => this._poll(), Ui);
|
|
3536
3539
|
}
|
|
3537
3540
|
stopPolling() {
|
|
3538
3541
|
this.pollTimer && (clearInterval(this.pollTimer), this.pollTimer = null);
|
|
@@ -3545,7 +3548,7 @@ class Kt {
|
|
|
3545
3548
|
}
|
|
3546
3549
|
}
|
|
3547
3550
|
Kt.type = "LOCAL";
|
|
3548
|
-
const
|
|
3551
|
+
const Fi = Kt;
|
|
3549
3552
|
new X(3e4, 6e4);
|
|
3550
3553
|
/**
|
|
3551
3554
|
* @license
|
|
@@ -3563,7 +3566,7 @@ new X(3e4, 6e4);
|
|
|
3563
3566
|
* See the License for the specific language governing permissions and
|
|
3564
3567
|
* limitations under the License.
|
|
3565
3568
|
*/
|
|
3566
|
-
function
|
|
3569
|
+
function xi(n, e) {
|
|
3567
3570
|
return e ? S(e) : (u(
|
|
3568
3571
|
n._popupRedirectResolver,
|
|
3569
3572
|
n,
|
|
@@ -3617,26 +3620,26 @@ class Ve extends xt {
|
|
|
3617
3620
|
return e && (t.idToken = e), t;
|
|
3618
3621
|
}
|
|
3619
3622
|
}
|
|
3620
|
-
function
|
|
3621
|
-
return
|
|
3623
|
+
function Vi(n) {
|
|
3624
|
+
return _i(n.auth, new Ve(n), n.bypassAuthState);
|
|
3622
3625
|
}
|
|
3623
|
-
function
|
|
3626
|
+
function $i(n) {
|
|
3624
3627
|
const { auth: e, user: t } = n;
|
|
3625
3628
|
return u(
|
|
3626
3629
|
t,
|
|
3627
3630
|
e,
|
|
3628
3631
|
"internal-error"
|
|
3629
3632
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
3630
|
-
),
|
|
3633
|
+
), gi(t, new Ve(n), n.bypassAuthState);
|
|
3631
3634
|
}
|
|
3632
|
-
async function
|
|
3635
|
+
async function Hi(n) {
|
|
3633
3636
|
const { auth: e, user: t } = n;
|
|
3634
3637
|
return u(
|
|
3635
3638
|
t,
|
|
3636
3639
|
e,
|
|
3637
3640
|
"internal-error"
|
|
3638
3641
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
3639
|
-
),
|
|
3642
|
+
), mi(t, new Ve(n), n.bypassAuthState);
|
|
3640
3643
|
}
|
|
3641
3644
|
/**
|
|
3642
3645
|
* @license
|
|
@@ -3696,13 +3699,13 @@ class Jt {
|
|
|
3696
3699
|
switch (e) {
|
|
3697
3700
|
case "signInViaPopup":
|
|
3698
3701
|
case "signInViaRedirect":
|
|
3699
|
-
return
|
|
3702
|
+
return Vi;
|
|
3700
3703
|
case "linkViaPopup":
|
|
3701
3704
|
case "linkViaRedirect":
|
|
3702
|
-
return
|
|
3705
|
+
return Hi;
|
|
3703
3706
|
case "reauthViaPopup":
|
|
3704
3707
|
case "reauthViaRedirect":
|
|
3705
|
-
return
|
|
3708
|
+
return $i;
|
|
3706
3709
|
default:
|
|
3707
3710
|
R(
|
|
3708
3711
|
this.auth,
|
|
@@ -3737,7 +3740,7 @@ class Jt {
|
|
|
3737
3740
|
* See the License for the specific language governing permissions and
|
|
3738
3741
|
* limitations under the License.
|
|
3739
3742
|
*/
|
|
3740
|
-
const
|
|
3743
|
+
const ji = new X(2e3, 1e4);
|
|
3741
3744
|
class V extends Jt {
|
|
3742
3745
|
constructor(e, t, i, r, s) {
|
|
3743
3746
|
super(e, t, r, s), this.provider = i, this.authWindow = null, this.pollId = null, V.currentPopupAction && V.currentPopupAction.cancel(), V.currentPopupAction = this;
|
|
@@ -3801,7 +3804,7 @@ class V extends Jt {
|
|
|
3801
3804
|
);
|
|
3802
3805
|
return;
|
|
3803
3806
|
}
|
|
3804
|
-
this.pollId = window.setTimeout(e,
|
|
3807
|
+
this.pollId = window.setTimeout(e, ji.get());
|
|
3805
3808
|
};
|
|
3806
3809
|
e();
|
|
3807
3810
|
}
|
|
@@ -3823,8 +3826,8 @@ V.currentPopupAction = null;
|
|
|
3823
3826
|
* See the License for the specific language governing permissions and
|
|
3824
3827
|
* limitations under the License.
|
|
3825
3828
|
*/
|
|
3826
|
-
const
|
|
3827
|
-
class
|
|
3829
|
+
const Wi = "pendingRedirect", oe = /* @__PURE__ */ new Map();
|
|
3830
|
+
class Gi extends Jt {
|
|
3828
3831
|
constructor(e, t, i = !1) {
|
|
3829
3832
|
super(e, [
|
|
3830
3833
|
"signInViaRedirect",
|
|
@@ -3839,17 +3842,17 @@ class Bi extends Jt {
|
|
|
3839
3842
|
* just return it.
|
|
3840
3843
|
*/
|
|
3841
3844
|
async execute() {
|
|
3842
|
-
let e =
|
|
3845
|
+
let e = oe.get(this.auth._key());
|
|
3843
3846
|
if (!e) {
|
|
3844
3847
|
try {
|
|
3845
|
-
const i = await
|
|
3848
|
+
const i = await Bi(this.resolver, this.auth) ? await super.execute() : null;
|
|
3846
3849
|
e = () => Promise.resolve(i);
|
|
3847
3850
|
} catch (t) {
|
|
3848
3851
|
e = () => Promise.reject(t);
|
|
3849
3852
|
}
|
|
3850
|
-
|
|
3853
|
+
oe.set(this.auth._key(), e);
|
|
3851
3854
|
}
|
|
3852
|
-
return this.bypassAuthState ||
|
|
3855
|
+
return this.bypassAuthState || oe.set(this.auth._key(), () => Promise.resolve(null)), e();
|
|
3853
3856
|
}
|
|
3854
3857
|
async onAuthEvent(e) {
|
|
3855
3858
|
if (e.type === "signInViaRedirect")
|
|
@@ -3870,26 +3873,26 @@ class Bi extends Jt {
|
|
|
3870
3873
|
cleanUp() {
|
|
3871
3874
|
}
|
|
3872
3875
|
}
|
|
3873
|
-
async function
|
|
3874
|
-
const t =
|
|
3876
|
+
async function Bi(n, e) {
|
|
3877
|
+
const t = Ki(e), i = qi(n);
|
|
3875
3878
|
if (!await i._isAvailable())
|
|
3876
3879
|
return !1;
|
|
3877
3880
|
const r = await i._get(t) === "true";
|
|
3878
3881
|
return await i._remove(t), r;
|
|
3879
3882
|
}
|
|
3880
|
-
function
|
|
3881
|
-
|
|
3883
|
+
function zi(n, e) {
|
|
3884
|
+
oe.set(n._key(), e);
|
|
3882
3885
|
}
|
|
3883
|
-
function
|
|
3886
|
+
function qi(n) {
|
|
3884
3887
|
return S(n._redirectPersistence);
|
|
3885
3888
|
}
|
|
3886
|
-
function
|
|
3887
|
-
return
|
|
3889
|
+
function Ki(n) {
|
|
3890
|
+
return se(Wi, n.config.apiKey, n.name);
|
|
3888
3891
|
}
|
|
3889
|
-
async function
|
|
3892
|
+
async function Ji(n, e, t = !1) {
|
|
3890
3893
|
if (E(n.app))
|
|
3891
3894
|
return Promise.reject(M(n));
|
|
3892
|
-
const i =
|
|
3895
|
+
const i = me(n), r = xi(i, e), o = await new Gi(i, r, t).execute();
|
|
3893
3896
|
return o && !t && (delete o.user._redirectEventId, await i._persistUserIfCurrent(o.user), await i._setRedirectUser(null, e)), o;
|
|
3894
3897
|
}
|
|
3895
3898
|
/**
|
|
@@ -3908,8 +3911,8 @@ async function Yi(n, e, t = !1) {
|
|
|
3908
3911
|
* See the License for the specific language governing permissions and
|
|
3909
3912
|
* limitations under the License.
|
|
3910
3913
|
*/
|
|
3911
|
-
const
|
|
3912
|
-
class
|
|
3914
|
+
const Yi = 10 * 60 * 1e3;
|
|
3915
|
+
class Xi {
|
|
3913
3916
|
constructor(e) {
|
|
3914
3917
|
this.auth = e, this.cachedEventUids = /* @__PURE__ */ new Set(), this.consumers = /* @__PURE__ */ new Set(), this.queuedRedirectEvent = null, this.hasHandledPotentialRedirect = !1, this.lastProcessedEventTime = Date.now();
|
|
3915
3918
|
}
|
|
@@ -3925,7 +3928,7 @@ class Qi {
|
|
|
3925
3928
|
let t = !1;
|
|
3926
3929
|
return this.consumers.forEach((i) => {
|
|
3927
3930
|
this.isEventForConsumer(e, i) && (t = !0, this.sendToConsumer(e, i), this.saveEventToCache(e));
|
|
3928
|
-
}), this.hasHandledPotentialRedirect || !
|
|
3931
|
+
}), this.hasHandledPotentialRedirect || !Qi(e) || (this.hasHandledPotentialRedirect = !0, t || (this.queuedRedirectEvent = e, t = !0)), t;
|
|
3929
3932
|
}
|
|
3930
3933
|
sendToConsumer(e, t) {
|
|
3931
3934
|
var i;
|
|
@@ -3940,7 +3943,7 @@ class Qi {
|
|
|
3940
3943
|
return t.filter.includes(e.type) && i;
|
|
3941
3944
|
}
|
|
3942
3945
|
hasEventBeenHandled(e) {
|
|
3943
|
-
return Date.now() - this.lastProcessedEventTime >=
|
|
3946
|
+
return Date.now() - this.lastProcessedEventTime >= Yi && this.cachedEventUids.clear(), this.cachedEventUids.has(st(e));
|
|
3944
3947
|
}
|
|
3945
3948
|
saveEventToCache(e) {
|
|
3946
3949
|
this.cachedEventUids.add(st(e)), this.lastProcessedEventTime = Date.now();
|
|
@@ -3952,7 +3955,7 @@ function st(n) {
|
|
|
3952
3955
|
function Yt({ type: n, error: e }) {
|
|
3953
3956
|
return n === "unknown" && (e == null ? void 0 : e.code) === "auth/no-auth-event";
|
|
3954
3957
|
}
|
|
3955
|
-
function
|
|
3958
|
+
function Qi(n) {
|
|
3956
3959
|
switch (n.type) {
|
|
3957
3960
|
case "signInViaRedirect":
|
|
3958
3961
|
case "linkViaRedirect":
|
|
@@ -3980,7 +3983,7 @@ function Zi(n) {
|
|
|
3980
3983
|
* See the License for the specific language governing permissions and
|
|
3981
3984
|
* limitations under the License.
|
|
3982
3985
|
*/
|
|
3983
|
-
async function
|
|
3986
|
+
async function Zi(n, e = {}) {
|
|
3984
3987
|
return G(n, "GET", "/v1/projects", e);
|
|
3985
3988
|
}
|
|
3986
3989
|
/**
|
|
@@ -3999,14 +4002,14 @@ async function er(n, e = {}) {
|
|
|
3999
4002
|
* See the License for the specific language governing permissions and
|
|
4000
4003
|
* limitations under the License.
|
|
4001
4004
|
*/
|
|
4002
|
-
const
|
|
4003
|
-
async function
|
|
4005
|
+
const er = /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/, tr = /^https?/;
|
|
4006
|
+
async function nr(n) {
|
|
4004
4007
|
if (n.config.emulator)
|
|
4005
4008
|
return;
|
|
4006
|
-
const { authorizedDomains: e } = await
|
|
4009
|
+
const { authorizedDomains: e } = await Zi(n);
|
|
4007
4010
|
for (const t of e)
|
|
4008
4011
|
try {
|
|
4009
|
-
if (
|
|
4012
|
+
if (ir(t))
|
|
4010
4013
|
return;
|
|
4011
4014
|
} catch {
|
|
4012
4015
|
}
|
|
@@ -4016,15 +4019,15 @@ async function ir(n) {
|
|
|
4016
4019
|
/* AuthErrorCode.INVALID_ORIGIN */
|
|
4017
4020
|
);
|
|
4018
4021
|
}
|
|
4019
|
-
function
|
|
4022
|
+
function ir(n) {
|
|
4020
4023
|
const e = Re(), { protocol: t, hostname: i } = new URL(e);
|
|
4021
4024
|
if (n.startsWith("chrome-extension://")) {
|
|
4022
4025
|
const o = new URL(n);
|
|
4023
4026
|
return o.hostname === "" && i === "" ? t === "chrome-extension:" && n.replace("chrome-extension://", "") === e.replace("chrome-extension://", "") : t === "chrome-extension:" && o.hostname === i;
|
|
4024
4027
|
}
|
|
4025
|
-
if (!
|
|
4028
|
+
if (!tr.test(t))
|
|
4026
4029
|
return !1;
|
|
4027
|
-
if (
|
|
4030
|
+
if (er.test(n))
|
|
4028
4031
|
return i === n;
|
|
4029
4032
|
const r = n.replace(/\./g, "\\.");
|
|
4030
4033
|
return new RegExp("^(.+\\." + r + "|" + r + ")$", "i").test(i);
|
|
@@ -4045,7 +4048,7 @@ function rr(n) {
|
|
|
4045
4048
|
* See the License for the specific language governing permissions and
|
|
4046
4049
|
* limitations under the License.
|
|
4047
4050
|
*/
|
|
4048
|
-
const
|
|
4051
|
+
const rr = new X(3e4, 6e4);
|
|
4049
4052
|
function ot() {
|
|
4050
4053
|
const n = y().___jsl;
|
|
4051
4054
|
if (n != null && n.H) {
|
|
@@ -4055,7 +4058,7 @@ function ot() {
|
|
|
4055
4058
|
n.CP[t] = null;
|
|
4056
4059
|
}
|
|
4057
4060
|
}
|
|
4058
|
-
function
|
|
4061
|
+
function sr(n) {
|
|
4059
4062
|
return new Promise((e, t) => {
|
|
4060
4063
|
var i, r, s;
|
|
4061
4064
|
function o() {
|
|
@@ -4070,7 +4073,7 @@ function or(n) {
|
|
|
4070
4073
|
/* AuthErrorCode.NETWORK_REQUEST_FAILED */
|
|
4071
4074
|
));
|
|
4072
4075
|
},
|
|
4073
|
-
timeout:
|
|
4076
|
+
timeout: rr.get()
|
|
4074
4077
|
});
|
|
4075
4078
|
}
|
|
4076
4079
|
if (!((r = (i = y().gapi) === null || i === void 0 ? void 0 : i.iframes) === null || r === void 0) && r.Iframe)
|
|
@@ -4078,22 +4081,22 @@ function or(n) {
|
|
|
4078
4081
|
else if (!((s = y().gapi) === null || s === void 0) && s.load)
|
|
4079
4082
|
o();
|
|
4080
4083
|
else {
|
|
4081
|
-
const c =
|
|
4084
|
+
const c = ci("iframefcb");
|
|
4082
4085
|
return y()[c] = () => {
|
|
4083
4086
|
gapi.load ? o() : t(T(
|
|
4084
4087
|
n,
|
|
4085
4088
|
"network-request-failed"
|
|
4086
4089
|
/* AuthErrorCode.NETWORK_REQUEST_FAILED */
|
|
4087
4090
|
));
|
|
4088
|
-
},
|
|
4091
|
+
}, oi(`${ai()}?onload=${c}`).catch((a) => t(a));
|
|
4089
4092
|
}
|
|
4090
4093
|
}).catch((e) => {
|
|
4091
|
-
throw
|
|
4094
|
+
throw ae = null, e;
|
|
4092
4095
|
});
|
|
4093
4096
|
}
|
|
4094
|
-
let
|
|
4095
|
-
function
|
|
4096
|
-
return
|
|
4097
|
+
let ae = null;
|
|
4098
|
+
function or(n) {
|
|
4099
|
+
return ae = ae || sr(n), ae;
|
|
4097
4100
|
}
|
|
4098
4101
|
/**
|
|
4099
4102
|
* @license
|
|
@@ -4111,7 +4114,7 @@ function ar(n) {
|
|
|
4111
4114
|
* See the License for the specific language governing permissions and
|
|
4112
4115
|
* limitations under the License.
|
|
4113
4116
|
*/
|
|
4114
|
-
const
|
|
4117
|
+
const ar = new X(5e3, 15e3), cr = "__/auth/iframe", lr = "emulator/auth/iframe", ur = {
|
|
4115
4118
|
style: {
|
|
4116
4119
|
position: "absolute",
|
|
4117
4120
|
top: "-100px",
|
|
@@ -4120,13 +4123,13 @@ const cr = new X(5e3, 15e3), lr = "__/auth/iframe", ur = "emulator/auth/iframe",
|
|
|
4120
4123
|
},
|
|
4121
4124
|
"aria-hidden": "true",
|
|
4122
4125
|
tabindex: "-1"
|
|
4123
|
-
},
|
|
4126
|
+
}, dr = /* @__PURE__ */ new Map([
|
|
4124
4127
|
["identitytoolkit.googleapis.com", "p"],
|
|
4125
4128
|
["staging-identitytoolkit.sandbox.googleapis.com", "s"],
|
|
4126
4129
|
["test-identitytoolkit.sandbox.googleapis.com", "t"]
|
|
4127
4130
|
// test
|
|
4128
4131
|
]);
|
|
4129
|
-
function
|
|
4132
|
+
function hr(n) {
|
|
4130
4133
|
const e = n.config;
|
|
4131
4134
|
u(
|
|
4132
4135
|
e.authDomain,
|
|
@@ -4134,17 +4137,17 @@ function fr(n) {
|
|
|
4134
4137
|
"auth-domain-config-required"
|
|
4135
4138
|
/* AuthErrorCode.MISSING_AUTH_DOMAIN */
|
|
4136
4139
|
);
|
|
4137
|
-
const t = e.emulator ? Me(e,
|
|
4140
|
+
const t = e.emulator ? Me(e, lr) : `https://${n.config.authDomain}/${cr}`, i = {
|
|
4138
4141
|
apiKey: e.apiKey,
|
|
4139
4142
|
appName: n.name,
|
|
4140
4143
|
v: J
|
|
4141
|
-
}, r =
|
|
4144
|
+
}, r = dr.get(n.config.apiHost);
|
|
4142
4145
|
r && (i.eid = r);
|
|
4143
4146
|
const s = n._getFrameworks();
|
|
4144
4147
|
return s.length && (i.fw = s.join(",")), `${t}?${Y(i).slice(1)}`;
|
|
4145
4148
|
}
|
|
4146
|
-
async function
|
|
4147
|
-
const e = await
|
|
4149
|
+
async function fr(n) {
|
|
4150
|
+
const e = await or(n), t = y().gapi;
|
|
4148
4151
|
return u(
|
|
4149
4152
|
t,
|
|
4150
4153
|
n,
|
|
@@ -4152,9 +4155,9 @@ async function pr(n) {
|
|
|
4152
4155
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
4153
4156
|
), e.open({
|
|
4154
4157
|
where: document.body,
|
|
4155
|
-
url:
|
|
4158
|
+
url: hr(n),
|
|
4156
4159
|
messageHandlersFilter: t.iframes.CROSS_ORIGIN_IFRAMES_FILTER,
|
|
4157
|
-
attributes:
|
|
4160
|
+
attributes: ur,
|
|
4158
4161
|
dontclear: !0
|
|
4159
4162
|
}, (i) => new Promise(async (r, s) => {
|
|
4160
4163
|
await i.restyle({
|
|
@@ -4167,7 +4170,7 @@ async function pr(n) {
|
|
|
4167
4170
|
/* AuthErrorCode.NETWORK_REQUEST_FAILED */
|
|
4168
4171
|
), c = y().setTimeout(() => {
|
|
4169
4172
|
s(o);
|
|
4170
|
-
},
|
|
4173
|
+
}, ar.get());
|
|
4171
4174
|
function a() {
|
|
4172
4175
|
y().clearTimeout(c), r(i);
|
|
4173
4176
|
}
|
|
@@ -4192,12 +4195,12 @@ async function pr(n) {
|
|
|
4192
4195
|
* See the License for the specific language governing permissions and
|
|
4193
4196
|
* limitations under the License.
|
|
4194
4197
|
*/
|
|
4195
|
-
const
|
|
4198
|
+
const pr = {
|
|
4196
4199
|
location: "yes",
|
|
4197
4200
|
resizable: "yes",
|
|
4198
4201
|
statusbar: "yes",
|
|
4199
4202
|
toolbar: "no"
|
|
4200
|
-
},
|
|
4203
|
+
}, mr = 500, gr = 600, _r = "_blank", vr = "http://localhost";
|
|
4201
4204
|
class at {
|
|
4202
4205
|
constructor(e) {
|
|
4203
4206
|
this.window = e, this.associatedEvent = null;
|
|
@@ -4210,19 +4213,19 @@ class at {
|
|
|
4210
4213
|
}
|
|
4211
4214
|
}
|
|
4212
4215
|
}
|
|
4213
|
-
function
|
|
4216
|
+
function Ir(n, e, t, i = mr, r = gr) {
|
|
4214
4217
|
const s = Math.max((window.screen.availHeight - r) / 2, 0).toString(), o = Math.max((window.screen.availWidth - i) / 2, 0).toString();
|
|
4215
4218
|
let c = "";
|
|
4216
|
-
const a = Object.assign(Object.assign({},
|
|
4219
|
+
const a = Object.assign(Object.assign({}, pr), {
|
|
4217
4220
|
width: i.toString(),
|
|
4218
4221
|
height: r.toString(),
|
|
4219
4222
|
top: s,
|
|
4220
4223
|
left: o
|
|
4221
4224
|
}), l = _().toLowerCase();
|
|
4222
|
-
t && (c = Ct(l) ?
|
|
4225
|
+
t && (c = Ct(l) ? _r : t), At(l) && (e = e || vr, a.scrollbars = "yes");
|
|
4223
4226
|
const d = Object.entries(a).reduce((p, [w, U]) => `${p}${w}=${U},`, "");
|
|
4224
|
-
if (
|
|
4225
|
-
return
|
|
4227
|
+
if (Xn(l) && c !== "_self")
|
|
4228
|
+
return Tr(e || "", c), new at(null);
|
|
4226
4229
|
const h = window.open(e || "", c, d);
|
|
4227
4230
|
u(
|
|
4228
4231
|
h,
|
|
@@ -4236,7 +4239,7 @@ function Tr(n, e, t, i = gr, r = _r) {
|
|
|
4236
4239
|
}
|
|
4237
4240
|
return new at(h);
|
|
4238
4241
|
}
|
|
4239
|
-
function
|
|
4242
|
+
function Tr(n, e) {
|
|
4240
4243
|
const t = document.createElement("a");
|
|
4241
4244
|
t.href = n, t.target = e;
|
|
4242
4245
|
const i = document.createEvent("MouseEvent");
|
|
@@ -4258,7 +4261,7 @@ function yr(n, e) {
|
|
|
4258
4261
|
* See the License for the specific language governing permissions and
|
|
4259
4262
|
* limitations under the License.
|
|
4260
4263
|
*/
|
|
4261
|
-
const
|
|
4264
|
+
const yr = "__/auth/handler", wr = "emulator/auth/handler", Er = encodeURIComponent("fac");
|
|
4262
4265
|
async function ct(n, e, t, i, r, s) {
|
|
4263
4266
|
u(
|
|
4264
4267
|
n.config.authDomain,
|
|
@@ -4292,11 +4295,11 @@ async function ct(n, e, t, i, r, s) {
|
|
|
4292
4295
|
const c = o;
|
|
4293
4296
|
for (const d of Object.keys(c))
|
|
4294
4297
|
c[d] === void 0 && delete c[d];
|
|
4295
|
-
const a = await n._getAppCheckToken(), l = a ? `#${
|
|
4296
|
-
return `${
|
|
4298
|
+
const a = await n._getAppCheckToken(), l = a ? `#${Er}=${encodeURIComponent(a)}` : "";
|
|
4299
|
+
return `${kr(n)}?${Y(c).slice(1)}${l}`;
|
|
4297
4300
|
}
|
|
4298
|
-
function
|
|
4299
|
-
return n.emulator ? Me(n,
|
|
4301
|
+
function kr({ config: n }) {
|
|
4302
|
+
return n.emulator ? Me(n, wr) : `https://${n.authDomain}/${yr}`;
|
|
4300
4303
|
}
|
|
4301
4304
|
/**
|
|
4302
4305
|
* @license
|
|
@@ -4315,9 +4318,9 @@ function br({ config: n }) {
|
|
|
4315
4318
|
* limitations under the License.
|
|
4316
4319
|
*/
|
|
4317
4320
|
const we = "webStorageSupport";
|
|
4318
|
-
class
|
|
4321
|
+
class br {
|
|
4319
4322
|
constructor() {
|
|
4320
|
-
this.eventManagers = {}, this.iframes = {}, this.originValidationPromises = {}, this._redirectPersistence = Gt, this._completeRedirectFn =
|
|
4323
|
+
this.eventManagers = {}, this.iframes = {}, this.originValidationPromises = {}, this._redirectPersistence = Gt, this._completeRedirectFn = Ji, this._overrideRedirectResult = zi;
|
|
4321
4324
|
}
|
|
4322
4325
|
// Wrapping in async even though we don't await anywhere in order
|
|
4323
4326
|
// to make sure errors are raised as promise rejections
|
|
@@ -4325,12 +4328,12 @@ class Sr {
|
|
|
4325
4328
|
var s;
|
|
4326
4329
|
P((s = this.eventManagers[e._key()]) === null || s === void 0 ? void 0 : s.manager, "_initialize() not called before _openPopup()");
|
|
4327
4330
|
const o = await ct(e, t, i, Re(), r);
|
|
4328
|
-
return
|
|
4331
|
+
return Ir(e, o, xe());
|
|
4329
4332
|
}
|
|
4330
4333
|
async _openRedirect(e, t, i, r) {
|
|
4331
4334
|
await this._originValidation(e);
|
|
4332
4335
|
const s = await ct(e, t, i, Re(), r);
|
|
4333
|
-
return
|
|
4336
|
+
return Pi(s), new Promise(() => {
|
|
4334
4337
|
});
|
|
4335
4338
|
}
|
|
4336
4339
|
_initialize(e) {
|
|
@@ -4345,7 +4348,7 @@ class Sr {
|
|
|
4345
4348
|
}), i;
|
|
4346
4349
|
}
|
|
4347
4350
|
async initAndGetManager(e) {
|
|
4348
|
-
const t = await
|
|
4351
|
+
const t = await fr(e), i = new Xi(e);
|
|
4349
4352
|
return t.register("authEvent", (r) => (u(
|
|
4350
4353
|
r == null ? void 0 : r.authEvent,
|
|
4351
4354
|
e,
|
|
@@ -4369,13 +4372,13 @@ class Sr {
|
|
|
4369
4372
|
}
|
|
4370
4373
|
_originValidation(e) {
|
|
4371
4374
|
const t = e._key();
|
|
4372
|
-
return this.originValidationPromises[t] || (this.originValidationPromises[t] =
|
|
4375
|
+
return this.originValidationPromises[t] || (this.originValidationPromises[t] = nr(e)), this.originValidationPromises[t];
|
|
4373
4376
|
}
|
|
4374
4377
|
get _shouldInitProactively() {
|
|
4375
|
-
return Ut() || De() ||
|
|
4378
|
+
return Ut() || De() || pe();
|
|
4376
4379
|
}
|
|
4377
4380
|
}
|
|
4378
|
-
const
|
|
4381
|
+
const Sr = br;
|
|
4379
4382
|
var lt = "@firebase/auth", ut = "1.7.5";
|
|
4380
4383
|
/**
|
|
4381
4384
|
* @license
|
|
@@ -4393,7 +4396,7 @@ var lt = "@firebase/auth", ut = "1.7.5";
|
|
|
4393
4396
|
* See the License for the specific language governing permissions and
|
|
4394
4397
|
* limitations under the License.
|
|
4395
4398
|
*/
|
|
4396
|
-
class
|
|
4399
|
+
class Rr {
|
|
4397
4400
|
constructor(e) {
|
|
4398
4401
|
this.auth = e, this.internalListeners = /* @__PURE__ */ new Map();
|
|
4399
4402
|
}
|
|
@@ -4444,7 +4447,7 @@ class Pr {
|
|
|
4444
4447
|
* See the License for the specific language governing permissions and
|
|
4445
4448
|
* limitations under the License.
|
|
4446
4449
|
*/
|
|
4447
|
-
function
|
|
4450
|
+
function Pr(n) {
|
|
4448
4451
|
switch (n) {
|
|
4449
4452
|
case "Node":
|
|
4450
4453
|
return "node";
|
|
@@ -4460,7 +4463,7 @@ function Ar(n) {
|
|
|
4460
4463
|
return;
|
|
4461
4464
|
}
|
|
4462
4465
|
}
|
|
4463
|
-
function
|
|
4466
|
+
function Ar(n) {
|
|
4464
4467
|
ze(new qe(
|
|
4465
4468
|
"auth",
|
|
4466
4469
|
(e, { options: t }) => {
|
|
@@ -4474,8 +4477,8 @@ function Cr(n) {
|
|
|
4474
4477
|
tokenApiHost: "securetoken.googleapis.com",
|
|
4475
4478
|
apiScheme: "https",
|
|
4476
4479
|
sdkClientVersion: Dt(n)
|
|
4477
|
-
}, l = new
|
|
4478
|
-
return
|
|
4480
|
+
}, l = new ri(i, r, s, a);
|
|
4481
|
+
return ui(l, t), l;
|
|
4479
4482
|
},
|
|
4480
4483
|
"PUBLIC"
|
|
4481
4484
|
/* ComponentType.PUBLIC */
|
|
@@ -4490,18 +4493,18 @@ function Cr(n) {
|
|
|
4490
4493
|
})), ze(new qe(
|
|
4491
4494
|
"auth-internal",
|
|
4492
4495
|
(e) => {
|
|
4493
|
-
const t =
|
|
4496
|
+
const t = me(e.getProvider(
|
|
4494
4497
|
"auth"
|
|
4495
4498
|
/* _ComponentName.AUTH */
|
|
4496
4499
|
).getImmediate());
|
|
4497
|
-
return ((i) => new
|
|
4500
|
+
return ((i) => new Rr(i))(t);
|
|
4498
4501
|
},
|
|
4499
4502
|
"PRIVATE"
|
|
4500
4503
|
/* ComponentType.PRIVATE */
|
|
4501
4504
|
).setInstantiationMode(
|
|
4502
4505
|
"EXPLICIT"
|
|
4503
4506
|
/* InstantiationMode.EXPLICIT */
|
|
4504
|
-
)), Se(lt, ut,
|
|
4507
|
+
)), Se(lt, ut, Pr(n)), Se(lt, ut, "esm2017");
|
|
4505
4508
|
}
|
|
4506
4509
|
/**
|
|
4507
4510
|
* @license
|
|
@@ -4519,11 +4522,11 @@ function Cr(n) {
|
|
|
4519
4522
|
* See the License for the specific language governing permissions and
|
|
4520
4523
|
* limitations under the License.
|
|
4521
4524
|
*/
|
|
4522
|
-
const
|
|
4525
|
+
const Cr = 5 * 60, Or = gt("authIdTokenMaxAge") || Cr;
|
|
4523
4526
|
let dt = null;
|
|
4524
|
-
const
|
|
4527
|
+
const Nr = (n) => async (e) => {
|
|
4525
4528
|
const t = e && await e.getIdTokenResult(), i = t && ((/* @__PURE__ */ new Date()).getTime() - Date.parse(t.issuedAtTime)) / 1e3;
|
|
4526
|
-
if (i && i >
|
|
4529
|
+
if (i && i > Or)
|
|
4527
4530
|
return;
|
|
4528
4531
|
const r = t == null ? void 0 : t.token;
|
|
4529
4532
|
dt !== r && (dt = r, await fetch(n, {
|
|
@@ -4533,33 +4536,33 @@ const Lr = (n) => async (e) => {
|
|
|
4533
4536
|
} : {}
|
|
4534
4537
|
}));
|
|
4535
4538
|
};
|
|
4536
|
-
function
|
|
4539
|
+
function Lr(n = yn()) {
|
|
4537
4540
|
const e = _t(n, "auth");
|
|
4538
4541
|
if (e.isInitialized())
|
|
4539
4542
|
return e.getImmediate();
|
|
4540
|
-
const t =
|
|
4541
|
-
popupRedirectResolver:
|
|
4543
|
+
const t = li(n, {
|
|
4544
|
+
popupRedirectResolver: Sr,
|
|
4542
4545
|
persistence: [
|
|
4543
|
-
|
|
4544
|
-
|
|
4546
|
+
Fi,
|
|
4547
|
+
bi,
|
|
4545
4548
|
Gt
|
|
4546
4549
|
]
|
|
4547
4550
|
}), i = gt("authTokenSyncURL");
|
|
4548
4551
|
if (i && typeof isSecureContext == "boolean" && isSecureContext) {
|
|
4549
4552
|
const s = new URL(i, location.origin);
|
|
4550
4553
|
if (location.origin === s.origin) {
|
|
4551
|
-
const o =
|
|
4552
|
-
|
|
4554
|
+
const o = Nr(s.toString());
|
|
4555
|
+
yi(t, o, () => o(t.currentUser)), Ti(t, (c) => o(c));
|
|
4553
4556
|
}
|
|
4554
4557
|
}
|
|
4555
4558
|
const r = Tn("auth");
|
|
4556
|
-
return r &&
|
|
4559
|
+
return r && di(t, `http://${r}`), t;
|
|
4557
4560
|
}
|
|
4558
|
-
function
|
|
4561
|
+
function Mr() {
|
|
4559
4562
|
var n, e;
|
|
4560
4563
|
return (e = (n = document.getElementsByTagName("head")) === null || n === void 0 ? void 0 : n[0]) !== null && e !== void 0 ? e : document;
|
|
4561
4564
|
}
|
|
4562
|
-
|
|
4565
|
+
si({
|
|
4563
4566
|
loadJS(n) {
|
|
4564
4567
|
return new Promise((e, t) => {
|
|
4565
4568
|
const i = document.createElement("script");
|
|
@@ -4569,74 +4572,67 @@ oi({
|
|
|
4569
4572
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
4570
4573
|
);
|
|
4571
4574
|
s.customData = r, t(s);
|
|
4572
|
-
}, i.type = "text/javascript", i.charset = "UTF-8",
|
|
4575
|
+
}, i.type = "text/javascript", i.charset = "UTF-8", Mr().appendChild(i);
|
|
4573
4576
|
});
|
|
4574
4577
|
},
|
|
4575
4578
|
gapiScript: "https://apis.google.com/js/api.js",
|
|
4576
4579
|
recaptchaV2Script: "https://www.google.com/recaptcha/api.js",
|
|
4577
4580
|
recaptchaEnterpriseScript: "https://www.google.com/recaptcha/enterprise.js?render="
|
|
4578
4581
|
});
|
|
4579
|
-
|
|
4582
|
+
Ar(
|
|
4580
4583
|
"Browser"
|
|
4581
4584
|
/* ClientPlatform.BROWSER */
|
|
4582
4585
|
);
|
|
4583
|
-
var
|
|
4584
|
-
const
|
|
4586
|
+
var Ur = { firebase: { apiKey: "AIzaSyAj8JdCHtP0Vc5vZobCfgoLzWxPIn0WUG4", authDomain: "feedme-dev-4c3ef.firebaseapp.com", databaseURL: "https://feedme-dev-4c3ef.firebaseio.com", projectId: "feedme-dev-4c3ef", storageBucket: "feedme-dev-4c3ef.appspot.com", messagingSenderId: "458797803788", appId: "1:458797803788:web:37f2af2926a84288f0c129", measurementId: "G-J2QG09D2Q7" }, assetBucketUrl: "feedme-dev-4c3ef.appspot.com", importFilesBucketUrl: "feedme-dev-4c3ef.appspot.com", clientId: "1a362d621873497b277ea55258cc82594ba148d235257f7bd44ea2acc132d8a4" }, Dr = { authUrl: "https://portal-v2-dev.feedmeapi.com/", slackWebhookUrl: "https://hooks.slack.com/services/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", appUrl: "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" };
|
|
4587
|
+
const Fr = {
|
|
4585
4588
|
key: 1,
|
|
4586
4589
|
class: "h-full w-full"
|
|
4587
|
-
},
|
|
4590
|
+
}, xr = ["src"], Zr = /* @__PURE__ */ ht({
|
|
4588
4591
|
__name: "App",
|
|
4589
4592
|
setup(n) {
|
|
4590
|
-
const e = be(), t = cn(), i = ln(), r = un(), s = dn(), o = mt(), c =
|
|
4593
|
+
const e = be(), t = cn(), i = ln(), r = un(), s = dn(), o = mt(), c = te(o.query.showHeader !== "false"), a = te(!1), { currentBusiness: l } = be(), d = te(!1), h = Ee(() => i.version), p = Ee(() => {
|
|
4591
4594
|
const m = e.currentCountry.value || "MY", g = Ke.getIdToken(), I = l.value._id;
|
|
4592
|
-
return `${
|
|
4595
|
+
return `${Dr.marketingV1Portal}/b/${I}/marketing/overview?showHeader=false&country=${m}&token=${g}`;
|
|
4593
4596
|
});
|
|
4594
4597
|
async function w() {
|
|
4595
4598
|
if (Sn().length) {
|
|
4596
4599
|
console.warn("CONNECT: initFirebase: Firebase already initialized");
|
|
4597
4600
|
return;
|
|
4598
4601
|
}
|
|
4599
|
-
const m = Rn(
|
|
4600
|
-
await
|
|
4602
|
+
const m = Rn(Ur.firebase), g = await an.getCustomToken(), I = Lr();
|
|
4603
|
+
await Ii(I, g), Pn(m), console.log("initFirebase", m);
|
|
4601
4604
|
}
|
|
4602
4605
|
const U = async () => {
|
|
4603
|
-
d.value = !1, await rn(), console.log("forceRerender"), Ke.setBusinessId(l.value._id), await i.readPremium(), !a.value && h.value === "v2" ? e.registerSidebarComponent(
|
|
4606
|
+
d.value = !1, await rn(), console.log("forceRerender"), Ke.setBusinessId(l.value._id), await i.readPremium(), !a.value && h.value === "v2" ? e.registerSidebarComponent(Nn) : e.hideSidebarToggle(!0), await w(), a.value = !0, d.value = !0;
|
|
4604
4607
|
};
|
|
4605
|
-
async function ee() {
|
|
4606
|
-
var m;
|
|
4607
|
-
console.log("initRemyClient.."), await Cn.init({
|
|
4608
|
-
token: ((m = e.sessionUser.value) == null ? void 0 : m.token) || "",
|
|
4609
|
-
dev: xr.mode === "development"
|
|
4610
|
-
});
|
|
4611
|
-
}
|
|
4612
4608
|
return en(() => {
|
|
4613
4609
|
if (An.Config.setCountry(e.currentCountry.value || "MY"), t.initProvider(r, s), !c.value) {
|
|
4614
|
-
const m = document.getElementsByClassName("app-header")[0], g = document.getElementsByClassName("app-sidebar")[0], I = document.getElementsByClassName("app-container")[0],
|
|
4615
|
-
m == null || m.classList.add("!hidden"), g == null || g.classList.add("!pt-0"), I == null || I.classList.add("!pt-0"),
|
|
4610
|
+
const m = document.getElementsByClassName("app-header")[0], g = document.getElementsByClassName("app-sidebar")[0], I = document.getElementsByClassName("app-container")[0], x = document.getElementsByTagName("main")[0];
|
|
4611
|
+
m == null || m.classList.add("!hidden"), g == null || g.classList.add("!pt-0"), I == null || I.classList.add("!pt-0"), x == null || x.classList.add("!pt-0"), e.hideSidebarToggle(!0);
|
|
4616
4612
|
}
|
|
4617
|
-
l.value != null && (console.log("App mounted, forceRerender"), U())
|
|
4613
|
+
l.value != null && (console.log("App mounted, forceRerender"), U());
|
|
4618
4614
|
}), ft(
|
|
4619
4615
|
() => e.currentBusiness.value,
|
|
4620
4616
|
async (m, g) => {
|
|
4621
4617
|
console.log("Current business changed"), m != null && m._id != g._id && (console.log("forceRerender when business changes", m, g), U());
|
|
4622
4618
|
}
|
|
4623
|
-
), (m, g) => (
|
|
4624
|
-
v(d) && v(h) === "v2" ? (
|
|
4625
|
-
v(d) && v(h) !== "v2" ? (
|
|
4619
|
+
), (m, g) => (ne(), ke(tn, null, [
|
|
4620
|
+
v(d) && v(h) === "v2" ? (ne(), nn(v(on), { key: 0 })) : Ge("", !0),
|
|
4621
|
+
v(d) && v(h) !== "v2" ? (ne(), ke("div", Fr, [
|
|
4626
4622
|
pt(pn, {
|
|
4627
4623
|
json: { url: v(p) }
|
|
4628
4624
|
}, null, 8, ["json"]),
|
|
4629
|
-
|
|
4625
|
+
ie("iframe", {
|
|
4630
4626
|
allow: "clipboard-read; clipboard-write",
|
|
4631
4627
|
frameBorder: "0",
|
|
4632
4628
|
height: "100%",
|
|
4633
4629
|
width: "100%",
|
|
4634
4630
|
src: v(p)
|
|
4635
|
-
}, null, 8,
|
|
4631
|
+
}, null, 8, xr)
|
|
4636
4632
|
])) : Ge("", !0)
|
|
4637
4633
|
], 64));
|
|
4638
4634
|
}
|
|
4639
4635
|
});
|
|
4640
4636
|
export {
|
|
4641
|
-
|
|
4637
|
+
Zr as default
|
|
4642
4638
|
};
|