@feedmepos/mf-connect 0.1.0-beta.10 → 0.1.0-beta.12
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-C2-4u2yH.js → Analytic-CkcawjWK.js} +9 -9
- package/dist/{App-DmykeD-2.js → App-D75gIHWI.js} +206 -206
- package/dist/{Broadcast-CVSdWXtW.js → Broadcast-xVE5hCw_.js} +8 -8
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CVAMJ8sv.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-Aq2Cb3fP.js} +8 -8
- package/dist/{Card-BfXdhTHA.js → Card-DssmCHMD.js} +126 -126
- package/dist/{Collections-DUkp9ZHF.js → Collections-_N8BDx7q.js} +4 -4
- package/dist/{Credit-CURHQyop.js → Credit-ojE-jm0m.js} +8 -8
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-C1fve2qV.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-DgEJar3j.js} +24 -24
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-BbwKVlD_.js → EffectSheet.vue_vue_type_style_index_0_lang-DI-T8Axq.js} +6 -6
- package/dist/{Experience-BdP9mxmR.js → Experience-D8mF2t8j.js} +8 -8
- package/dist/{Game-D0ftlM8B.js → Game-CVv729v4.js} +8 -8
- package/dist/{Marketing-Cx5vHclz.js → Marketing-BvPYaaef.js} +5 -5
- package/dist/{Member-DlLjhYm0.js → Member-CtddRogh.js} +4 -4
- package/dist/MemberList-Dy14iRIh.js +1040 -0
- package/dist/{MemberTransactions-uk4y715x.js → MemberTransactions-BbyYs7s5.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-D_cnth62.js → MessageInput.vue_vue_type_script_setup_true_lang-CJl9ykLm.js} +2 -2
- package/dist/{Mission-BOZ4ot7j.js → Mission-D23417gf.js} +8 -8
- package/dist/{Point-DeUNlqgR.js → Point-rFotgy4u.js} +8 -8
- package/dist/{Promotion-D2TeBSaa.js → Promotion-DkYE1TNO.js} +9 -9
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-CPE5vXy1.js → RuleGroup.vue_vue_type_script_setup_true_lang-2hPafP6H.js} +226 -217
- package/dist/{Segment-Bpztc0m1.js → Segment-ClACuFLG.js} +13 -13
- package/dist/{Setting-Ghmu9Gnu.js → Setting-C-NxDsVM.js} +8 -8
- package/dist/{Store-Cqbbk60_.js → Store-fH21d8aK.js} +13 -13
- package/dist/{StoreRewards-D-1Xh051.js → StoreRewards-DEFi4kOl.js} +12 -12
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-bq82uuQc.js → StoreTransactions.vue_vue_type_script_setup_true_lang-ClcB1q9v.js} +10 -10
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-eD0EMNP4.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-B95z7YUi.js} +1 -1
- package/dist/{Tier-CYdYsdK1.js → Tier-DJFOrtfI.js} +15 -15
- package/dist/{Title-BZ67XSFT.js → Title-DmFbAPR7.js} +15 -15
- package/dist/{Transaction-DNZ7lFuI.js → Transaction-C9m1dpGz.js} +2 -2
- package/dist/{Voucher-D7-_uxNG.js → Voucher-Dd7mzT1K.js} +11 -11
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-CGwfPMQI.js → ZodTextField.vue_vue_type_script_setup_true_lang-Bfa4Zyug.js} +1 -1
- package/dist/{app-aHtU03wY.js → app-BmmvN8Ma.js} +1 -1
- package/dist/{app-B10WM9lt.js → app-Cxjp8TQf.js} +24 -24
- package/dist/app.js +1 -1
- package/dist/{business-CM7mW9ky.js → business-BTKr2sRX.js} +1 -1
- package/dist/{campaign-CZSE010m.js → campaign-CAxypog1.js} +2 -2
- package/dist/{collection.fn-DsQxhJ5y.js → collection.fn-N_O-bdfW.js} +2 -2
- package/dist/{dto-CqPaIeHy.js → dto-BFUnKAcz.js} +75 -75
- package/dist/{effect-DFRCKbCt.js → effect-DJUl5gih.js} +1 -1
- package/dist/{email-addresses-CoYtDZ9y.js → email-addresses-C7JTF21K.js} +1 -1
- package/dist/{export-BUlA7ky_.js → export-Bj5seGe2.js} +3 -3
- package/dist/{helper-D2KMlxhC.js → helper-C7svCYuA.js} +1 -1
- package/dist/{index-BJCZGfWR.js → index--_NXzrci.js} +1 -1
- package/dist/{index--PW5KlQP.js → index-AjJl4iA1.js} +1 -1
- package/dist/{index-BRCBOuYm.js → index-BN0hRe9Z.js} +1 -1
- package/dist/{index-B6ex0y85.js → index-BZFm1_Hu.js} +2 -2
- package/dist/{index-C5VPhg6s.js → index-CNZoOa-T.js} +3 -3
- package/dist/{index-CHA2pfMg.js → index-CUmB18pA.js} +1 -1
- package/dist/{index-cwvor9Mx.js → index-DKnQ0PNa.js} +319 -304
- package/dist/{index-CGIUsnvn.js → index-DNvVa7hp.js} +1 -1
- package/dist/{index-92WiqC9N.js → index-DTdR02Is.js} +3 -3
- package/dist/{index-CrDMyiBJ.js → index-DYuaSkbb.js} +5 -5
- package/dist/{index-Cjr1l2pS.js → index-Dpp_zk4I.js} +5 -5
- package/dist/{index-L25Y7bkQ.js → index-vCwQaqZ6.js} +2 -2
- package/dist/{index.esm2017-DV7QIJQE.js → index.esm2017-EENxvUQ9.js} +1 -1
- package/dist/{loading-CaggJY9X.js → loading-CsgL8F3g.js} +4 -4
- package/dist/{membership-De1a4_zX.js → membership-DNApJdJm.js} +3 -3
- package/dist/{money-B9FqlMJE.js → money-BhrnRE53.js} +1 -1
- package/dist/{number-vfzCfGHZ.js → number-NCDh9FJ_.js} +1 -1
- package/dist/{rule-BIOoreWl.js → rule-47bDdocS.js} +179 -177
- package/dist/{rule-builder-BnzVHbIT.js → rule-builder-0DCTMpBm.js} +1 -1
- package/dist/{template-3uWl9GjH.js → template-CsVeh5_K.js} +4 -4
- package/dist/{usePagination-BhzvOtav.js → usePagination-Kd1dOEuD.js} +1 -1
- package/dist/{vue-i18n-dYn7i0H0.js → vue-i18n-DFkxbLGR.js} +320 -320
- package/package.json +1 -1
- package/dist/MemberList-DLShUegL.js +0 -1036
|
@@ -2,16 +2,16 @@ import { defineComponent as lt, ref as te, h as Q, watch as ut, resolveComponent
|
|
|
2
2
|
import { useRouter as nn, useRoute as ht, RouterView as rn } from "vue-router";
|
|
3
3
|
import { useCoreStore as We, FeedMeAuth as sn } from "@feedmepos/mf-common";
|
|
4
4
|
import { u as on } from "./app-wDQR6dpb.js";
|
|
5
|
-
import { u as an } from "./business-
|
|
6
|
-
import "./index-
|
|
5
|
+
import { u as an } from "./business-BTKr2sRX.js";
|
|
6
|
+
import "./index-CUmB18pA.js";
|
|
7
7
|
import { components as Z, useSnackbar as cn, useDialog as ln } from "@feedmepos/ui-library";
|
|
8
|
-
import { u as un } from "./vue-i18n-
|
|
9
|
-
import { R as f } from "./app-
|
|
8
|
+
import { u as un } from "./vue-i18n-DFkxbLGR.js";
|
|
9
|
+
import { R as f } from "./app-Cxjp8TQf.js";
|
|
10
10
|
import { J as dn } from "./JsonViewer-v8_C7l5N.js";
|
|
11
|
-
import { r as ye, L as hn, g as ft, i as fn, a as pn, _ as je, C as Ge, b as mn, S as z, c as w, d as j, E as be, e as gn, f as pt, h as _n, j as vn, k as mt, l as g, m as In, F as Re, n as Tn, q as K, o as wn, p as yn, s as En, t as kn, u as Sn } from "./index.esm2017-
|
|
11
|
+
import { r as ye, L as hn, g as ft, i as fn, a as pn, _ as je, C as Ge, b as mn, S as z, c as w, d as j, E as be, e as gn, f as pt, h as _n, j as vn, k as mt, l as g, m as In, F as Re, n as Tn, q as K, o as wn, p as yn, s as En, t as kn, u as Sn } from "./index.esm2017-EENxvUQ9.js";
|
|
12
12
|
import { _ as Pe } from "./tslib.es6-BCqqvLQ_.js";
|
|
13
|
-
import { S as Be } from "./index-
|
|
14
|
-
const
|
|
13
|
+
import { S as Be, c as bn } from "./index-DTdR02Is.js";
|
|
14
|
+
const Rn = /* @__PURE__ */ lt({
|
|
15
15
|
__name: "NavigationTab",
|
|
16
16
|
setup(n) {
|
|
17
17
|
const { t: e } = un(), t = te(), i = [
|
|
@@ -133,7 +133,7 @@ const bn = /* @__PURE__ */ lt({
|
|
|
133
133
|
};
|
|
134
134
|
}
|
|
135
135
|
});
|
|
136
|
-
var
|
|
136
|
+
var Pn = "firebase", An = "10.12.4";
|
|
137
137
|
/**
|
|
138
138
|
* @license
|
|
139
139
|
* Copyright 2020 Google LLC
|
|
@@ -150,13 +150,13 @@ var Rn = "firebase", Pn = "10.12.4";
|
|
|
150
150
|
* See the License for the specific language governing permissions and
|
|
151
151
|
* limitations under the License.
|
|
152
152
|
*/
|
|
153
|
-
ye(
|
|
153
|
+
ye(Pn, An, "app");
|
|
154
154
|
function gt() {
|
|
155
155
|
return {
|
|
156
156
|
"dependent-sdk-initialized-before-auth": "Another Firebase SDK was initialized and is trying to use Auth before Auth is initialized. Please be sure to call `initializeAuth` or `getAuth` before starting any other Firebase SDK."
|
|
157
157
|
};
|
|
158
158
|
}
|
|
159
|
-
const
|
|
159
|
+
const Cn = gt, _t = new be("auth", "Firebase", gt());
|
|
160
160
|
/**
|
|
161
161
|
* @license
|
|
162
162
|
* Copyright 2020 Google LLC
|
|
@@ -174,7 +174,7 @@ const An = gt, _t = new be("auth", "Firebase", gt());
|
|
|
174
174
|
* limitations under the License.
|
|
175
175
|
*/
|
|
176
176
|
const ae = new hn("@firebase/auth");
|
|
177
|
-
function
|
|
177
|
+
function On(n, ...e) {
|
|
178
178
|
ae.logLevel <= mt.WARN && ae.warn(`Auth (${z}): ${n}`, ...e);
|
|
179
179
|
}
|
|
180
180
|
function ie(n, ...e) {
|
|
@@ -203,7 +203,7 @@ function I(n, ...e) {
|
|
|
203
203
|
return Ae(n, ...e);
|
|
204
204
|
}
|
|
205
205
|
function vt(n, e, t) {
|
|
206
|
-
const i = Object.assign(Object.assign({},
|
|
206
|
+
const i = Object.assign(Object.assign({}, Cn()), { [e]: t });
|
|
207
207
|
return new be("auth", "Firebase", i).create(e, {
|
|
208
208
|
appName: n.name
|
|
209
209
|
});
|
|
@@ -249,7 +249,7 @@ function Ee() {
|
|
|
249
249
|
var n;
|
|
250
250
|
return typeof self < "u" && ((n = self.location) === null || n === void 0 ? void 0 : n.href) || "";
|
|
251
251
|
}
|
|
252
|
-
function
|
|
252
|
+
function Nn() {
|
|
253
253
|
return qe() === "http:" || qe() === "https:";
|
|
254
254
|
}
|
|
255
255
|
function qe() {
|
|
@@ -272,15 +272,15 @@ function qe() {
|
|
|
272
272
|
* See the License for the specific language governing permissions and
|
|
273
273
|
* limitations under the License.
|
|
274
274
|
*/
|
|
275
|
-
function
|
|
275
|
+
function Ln() {
|
|
276
276
|
return typeof navigator < "u" && navigator && "onLine" in navigator && typeof navigator.onLine == "boolean" && // Apply only for traditional web apps and Chrome extensions.
|
|
277
277
|
// This is especially true for Cordova apps which have unreliable
|
|
278
278
|
// navigator.onLine behavior unless cordova-plugin-network-information is
|
|
279
279
|
// installed which overwrites the native navigator.onLine value and
|
|
280
280
|
// defines navigator.connection.
|
|
281
|
-
(
|
|
281
|
+
(Nn() || mn() || "connection" in navigator) ? navigator.onLine : !0;
|
|
282
282
|
}
|
|
283
|
-
function
|
|
283
|
+
function Mn() {
|
|
284
284
|
if (typeof navigator > "u")
|
|
285
285
|
return null;
|
|
286
286
|
const n = navigator;
|
|
@@ -313,7 +313,7 @@ class J {
|
|
|
313
313
|
this.shortDelay = e, this.longDelay = t, b(t > e, "Short delay should be less than long delay!"), this.isMobile = fn() || pn();
|
|
314
314
|
}
|
|
315
315
|
get() {
|
|
316
|
-
return
|
|
316
|
+
return Ln() ? this.isMobile ? this.longDelay : this.shortDelay : Math.min(5e3, this.shortDelay);
|
|
317
317
|
}
|
|
318
318
|
}
|
|
319
319
|
/**
|
|
@@ -407,7 +407,7 @@ class It {
|
|
|
407
407
|
* See the License for the specific language governing permissions and
|
|
408
408
|
* limitations under the License.
|
|
409
409
|
*/
|
|
410
|
-
const
|
|
410
|
+
const Un = {
|
|
411
411
|
// Custom token errors.
|
|
412
412
|
CREDENTIAL_MISMATCH: "custom-token-mismatch",
|
|
413
413
|
// This can only happen if the SDK sends a bad request.
|
|
@@ -498,7 +498,7 @@ const Mn = {
|
|
|
498
498
|
* See the License for the specific language governing permissions and
|
|
499
499
|
* limitations under the License.
|
|
500
500
|
*/
|
|
501
|
-
const
|
|
501
|
+
const Dn = new J(3e4, 6e4);
|
|
502
502
|
function he(n, e) {
|
|
503
503
|
return n.tenantId && !e.tenantId ? Object.assign(Object.assign({}, e), { tenantId: n.tenantId }) : e;
|
|
504
504
|
}
|
|
@@ -524,9 +524,9 @@ async function G(n, e, t, i, r = {}) {
|
|
|
524
524
|
}
|
|
525
525
|
async function Tt(n, e, t) {
|
|
526
526
|
n._canInitEmulator = !1;
|
|
527
|
-
const i = Object.assign(Object.assign({},
|
|
527
|
+
const i = Object.assign(Object.assign({}, Un), e);
|
|
528
528
|
try {
|
|
529
|
-
const r = new
|
|
529
|
+
const r = new Fn(n), s = await Promise.race([
|
|
530
530
|
t(),
|
|
531
531
|
r.promise
|
|
532
532
|
]);
|
|
@@ -565,14 +565,14 @@ function yt(n, e, t, i) {
|
|
|
565
565
|
const r = `${e}${t}?${i}`;
|
|
566
566
|
return n.config.emulator ? Ce(n.config, r) : `${n.config.apiScheme}://${r}`;
|
|
567
567
|
}
|
|
568
|
-
class
|
|
568
|
+
class Fn {
|
|
569
569
|
constructor(e) {
|
|
570
570
|
this.auth = e, this.timer = null, this.promise = new Promise((t, i) => {
|
|
571
571
|
this.timer = setTimeout(() => i(I(
|
|
572
572
|
this.auth,
|
|
573
573
|
"network-request-failed"
|
|
574
574
|
/* AuthErrorCode.NETWORK_REQUEST_FAILED */
|
|
575
|
-
)),
|
|
575
|
+
)), Dn.get());
|
|
576
576
|
});
|
|
577
577
|
}
|
|
578
578
|
clearNetworkTimeout() {
|
|
@@ -603,7 +603,7 @@ function ee(n, e, t) {
|
|
|
603
603
|
* See the License for the specific language governing permissions and
|
|
604
604
|
* limitations under the License.
|
|
605
605
|
*/
|
|
606
|
-
async function
|
|
606
|
+
async function xn(n, e) {
|
|
607
607
|
return G(n, "POST", "/v1/accounts:delete", e);
|
|
608
608
|
}
|
|
609
609
|
async function Et(n, e) {
|
|
@@ -634,7 +634,7 @@ function B(n) {
|
|
|
634
634
|
} catch {
|
|
635
635
|
}
|
|
636
636
|
}
|
|
637
|
-
async function
|
|
637
|
+
async function Vn(n, e = !1) {
|
|
638
638
|
const t = j(n), i = await t.getIdToken(e), r = Oe(i);
|
|
639
639
|
u(
|
|
640
640
|
r && r.exp && r.auth_time && r.iat,
|
|
@@ -705,10 +705,10 @@ async function q(n, e, t = !1) {
|
|
|
705
705
|
try {
|
|
706
706
|
return await e;
|
|
707
707
|
} catch (i) {
|
|
708
|
-
throw i instanceof Re &&
|
|
708
|
+
throw i instanceof Re && Hn(i) && n.auth.currentUser === n && await n.auth.signOut(), i;
|
|
709
709
|
}
|
|
710
710
|
}
|
|
711
|
-
function
|
|
711
|
+
function Hn({ code: n }) {
|
|
712
712
|
return n === "auth/user-disabled" || n === "auth/user-token-expired";
|
|
713
713
|
}
|
|
714
714
|
/**
|
|
@@ -727,7 +727,7 @@ function Vn({ code: n }) {
|
|
|
727
727
|
* See the License for the specific language governing permissions and
|
|
728
728
|
* limitations under the License.
|
|
729
729
|
*/
|
|
730
|
-
class
|
|
730
|
+
class $n {
|
|
731
731
|
constructor(e) {
|
|
732
732
|
this.user = e, this.isRunning = !1, this.timerId = null, this.errorBackoff = 3e4;
|
|
733
733
|
}
|
|
@@ -833,7 +833,7 @@ async function ce(n) {
|
|
|
833
833
|
);
|
|
834
834
|
const s = r.users[0];
|
|
835
835
|
n._notifyReloadListener(s);
|
|
836
|
-
const o = !((e = s.providerUserInfo) === null || e === void 0) && e.length ? kt(s.providerUserInfo) : [], c =
|
|
836
|
+
const o = !((e = s.providerUserInfo) === null || e === void 0) && e.length ? kt(s.providerUserInfo) : [], c = jn(n.providerData, o), a = n.isAnonymous, l = !(n.email && s.passwordHash) && !(c != null && c.length), d = a ? l : !1, h = {
|
|
837
837
|
uid: s.localId,
|
|
838
838
|
displayName: s.displayName || null,
|
|
839
839
|
photoURL: s.photoUrl || null,
|
|
@@ -847,11 +847,11 @@ async function ce(n) {
|
|
|
847
847
|
};
|
|
848
848
|
Object.assign(n, h);
|
|
849
849
|
}
|
|
850
|
-
async function
|
|
850
|
+
async function Wn(n) {
|
|
851
851
|
const e = j(n);
|
|
852
852
|
await ce(e), await e.auth._persistUserIfCurrent(e), e.auth._notifyListenersIfCurrent(e);
|
|
853
853
|
}
|
|
854
|
-
function
|
|
854
|
+
function jn(n, e) {
|
|
855
855
|
return [...n.filter((i) => !e.some((r) => r.providerId === i.providerId)), ...e];
|
|
856
856
|
}
|
|
857
857
|
function kt(n) {
|
|
@@ -883,7 +883,7 @@ function kt(n) {
|
|
|
883
883
|
* See the License for the specific language governing permissions and
|
|
884
884
|
* limitations under the License.
|
|
885
885
|
*/
|
|
886
|
-
async function
|
|
886
|
+
async function Gn(n, e) {
|
|
887
887
|
const t = await Tt(n, {}, async () => {
|
|
888
888
|
const i = K({
|
|
889
889
|
grant_type: "refresh_token",
|
|
@@ -904,7 +904,7 @@ async function jn(n, e) {
|
|
|
904
904
|
refreshToken: t.refresh_token
|
|
905
905
|
};
|
|
906
906
|
}
|
|
907
|
-
async function
|
|
907
|
+
async function Bn(n, e) {
|
|
908
908
|
return G(n, "POST", "/v2/accounts:revokeToken", he(n, e));
|
|
909
909
|
}
|
|
910
910
|
/**
|
|
@@ -968,7 +968,7 @@ class H {
|
|
|
968
968
|
this.refreshToken = null;
|
|
969
969
|
}
|
|
970
970
|
async refresh(e, t) {
|
|
971
|
-
const { accessToken: i, refreshToken: r, expiresIn: s } = await
|
|
971
|
+
const { accessToken: i, refreshToken: r, expiresIn: s } = await Gn(e, t);
|
|
972
972
|
this.updateTokensAndExpiration(i, r, Number(s));
|
|
973
973
|
}
|
|
974
974
|
updateTokensAndExpiration(e, t, i) {
|
|
@@ -1023,7 +1023,7 @@ function R(n, e) {
|
|
|
1023
1023
|
class E {
|
|
1024
1024
|
constructor(e) {
|
|
1025
1025
|
var { uid: t, auth: i, stsTokenManager: r } = e, s = Pe(e, ["uid", "auth", "stsTokenManager"]);
|
|
1026
|
-
this.providerId = "firebase", this.proactiveRefresh = new
|
|
1026
|
+
this.providerId = "firebase", this.proactiveRefresh = new $n(this), this.reloadUserInfo = null, this.reloadListener = null, this.uid = t, this.auth = i, this.stsTokenManager = r, this.accessToken = r.accessToken, this.displayName = s.displayName || null, this.email = s.email || null, this.emailVerified = s.emailVerified || !1, this.phoneNumber = s.phoneNumber || null, this.photoURL = s.photoURL || null, this.isAnonymous = s.isAnonymous || !1, this.tenantId = s.tenantId || null, this.providerData = s.providerData ? [...s.providerData] : [], this.metadata = new ke(s.createdAt || void 0, s.lastLoginAt || void 0);
|
|
1027
1027
|
}
|
|
1028
1028
|
async getIdToken(e) {
|
|
1029
1029
|
const t = await q(this, this.stsTokenManager.getToken(this.auth, e));
|
|
@@ -1035,10 +1035,10 @@ class E {
|
|
|
1035
1035
|
), this.accessToken !== t && (this.accessToken = t, await this.auth._persistUserIfCurrent(this), this.auth._notifyListenersIfCurrent(this)), t;
|
|
1036
1036
|
}
|
|
1037
1037
|
getIdTokenResult(e) {
|
|
1038
|
-
return
|
|
1038
|
+
return Vn(this, e);
|
|
1039
1039
|
}
|
|
1040
1040
|
reload() {
|
|
1041
|
-
return
|
|
1041
|
+
return Wn(this);
|
|
1042
1042
|
}
|
|
1043
1043
|
_assign(e) {
|
|
1044
1044
|
this !== e && (u(
|
|
@@ -1077,7 +1077,7 @@ class E {
|
|
|
1077
1077
|
if (w(this.auth.app))
|
|
1078
1078
|
return Promise.reject(L(this.auth));
|
|
1079
1079
|
const e = await this.getIdToken();
|
|
1080
|
-
return await q(this,
|
|
1080
|
+
return await q(this, xn(this.auth, { idToken: e })), this.stsTokenManager.clearRefreshToken(), this.auth.signOut();
|
|
1081
1081
|
}
|
|
1082
1082
|
toJSON() {
|
|
1083
1083
|
return Object.assign(Object.assign({
|
|
@@ -1407,17 +1407,17 @@ function Ot(n = g()) {
|
|
|
1407
1407
|
function fe(n = g()) {
|
|
1408
1408
|
return /iphone|ipad|ipod/i.test(n) || /macintosh/i.test(n) && /mobile/i.test(n);
|
|
1409
1409
|
}
|
|
1410
|
-
function
|
|
1410
|
+
function qn(n = g()) {
|
|
1411
1411
|
var e;
|
|
1412
1412
|
return fe(n) && !!(!((e = window.navigator) === null || e === void 0) && e.standalone);
|
|
1413
1413
|
}
|
|
1414
|
-
function
|
|
1414
|
+
function zn() {
|
|
1415
1415
|
return wn() && document.documentMode === 10;
|
|
1416
1416
|
}
|
|
1417
1417
|
function Nt(n = g()) {
|
|
1418
1418
|
return fe(n) || At(n) || Ot(n) || Ct(n) || /windows phone/i.test(n) || Pt(n);
|
|
1419
1419
|
}
|
|
1420
|
-
function
|
|
1420
|
+
function Kn() {
|
|
1421
1421
|
try {
|
|
1422
1422
|
return !!(window && window !== window.top);
|
|
1423
1423
|
} catch {
|
|
@@ -1471,7 +1471,7 @@ function Lt(n, e = []) {
|
|
|
1471
1471
|
* See the License for the specific language governing permissions and
|
|
1472
1472
|
* limitations under the License.
|
|
1473
1473
|
*/
|
|
1474
|
-
class
|
|
1474
|
+
class Jn {
|
|
1475
1475
|
constructor(e) {
|
|
1476
1476
|
this.auth = e, this.queue = [];
|
|
1477
1477
|
}
|
|
@@ -1526,7 +1526,7 @@ class Kn {
|
|
|
1526
1526
|
* See the License for the specific language governing permissions and
|
|
1527
1527
|
* limitations under the License.
|
|
1528
1528
|
*/
|
|
1529
|
-
async function
|
|
1529
|
+
async function Yn(n, e = {}) {
|
|
1530
1530
|
return G(n, "GET", "/v2/passwordPolicy", he(n, e));
|
|
1531
1531
|
}
|
|
1532
1532
|
/**
|
|
@@ -1545,12 +1545,12 @@ async function Jn(n, e = {}) {
|
|
|
1545
1545
|
* See the License for the specific language governing permissions and
|
|
1546
1546
|
* limitations under the License.
|
|
1547
1547
|
*/
|
|
1548
|
-
const
|
|
1549
|
-
class
|
|
1548
|
+
const Xn = 6;
|
|
1549
|
+
class Qn {
|
|
1550
1550
|
constructor(e) {
|
|
1551
1551
|
var t, i, r, s;
|
|
1552
1552
|
const o = e.customStrengthOptions;
|
|
1553
|
-
this.customStrengthOptions = {}, this.customStrengthOptions.minPasswordLength = (t = o.minPasswordLength) !== null && t !== void 0 ? t :
|
|
1553
|
+
this.customStrengthOptions = {}, this.customStrengthOptions.minPasswordLength = (t = o.minPasswordLength) !== null && t !== void 0 ? t : Xn, o.maxPasswordLength && (this.customStrengthOptions.maxPasswordLength = o.maxPasswordLength), o.containsLowercaseCharacter !== void 0 && (this.customStrengthOptions.containsLowercaseLetter = o.containsLowercaseCharacter), o.containsUppercaseCharacter !== void 0 && (this.customStrengthOptions.containsUppercaseLetter = o.containsUppercaseCharacter), o.containsNumericCharacter !== void 0 && (this.customStrengthOptions.containsNumericCharacter = o.containsNumericCharacter), o.containsNonAlphanumericCharacter !== void 0 && (this.customStrengthOptions.containsNonAlphanumericCharacter = o.containsNonAlphanumericCharacter), this.enforcementState = e.enforcementState, this.enforcementState === "ENFORCEMENT_STATE_UNSPECIFIED" && (this.enforcementState = "OFF"), this.allowedNonAlphanumericCharacters = (r = (i = e.allowedNonAlphanumericCharacters) === null || i === void 0 ? void 0 : i.join("")) !== null && r !== void 0 ? r : "", this.forceUpgradeOnSignin = (s = e.forceUpgradeOnSignin) !== null && s !== void 0 ? s : !1, this.schemaVersion = e.schemaVersion;
|
|
1554
1554
|
}
|
|
1555
1555
|
validatePassword(e) {
|
|
1556
1556
|
var t, i, r, s, o, c;
|
|
@@ -1633,9 +1633,9 @@ class Xn {
|
|
|
1633
1633
|
* See the License for the specific language governing permissions and
|
|
1634
1634
|
* limitations under the License.
|
|
1635
1635
|
*/
|
|
1636
|
-
class
|
|
1636
|
+
class Zn {
|
|
1637
1637
|
constructor(e, t, i, r) {
|
|
1638
|
-
this.app = e, this.heartbeatServiceProvider = t, this.appCheckServiceProvider = i, this.config = r, this.currentUser = null, this.emulatorConfig = null, this.operations = Promise.resolve(), this.authStateSubscription = new Xe(this), this.idTokenSubscription = new Xe(this), this.beforeStateQueue = new
|
|
1638
|
+
this.app = e, this.heartbeatServiceProvider = t, this.appCheckServiceProvider = i, this.config = r, this.currentUser = null, this.emulatorConfig = null, this.operations = Promise.resolve(), this.authStateSubscription = new Xe(this), this.idTokenSubscription = new Xe(this), this.beforeStateQueue = new Jn(this), this.redirectUser = null, this.isProactiveRefreshEnabled = !1, this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION = 1, this._canInitEmulator = !0, this._isInitialized = !1, this._deleted = !1, this._initializationPromise = null, this._popupRedirectResolver = null, this._errorFactory = _t, this._agentRecaptchaConfig = null, this._tenantRecaptchaConfigs = {}, this._projectPasswordPolicy = null, this._tenantPasswordPolicies = {}, this.lastNotifiedUid = void 0, this.languageCode = null, this.tenantId = null, this.settings = { appVerificationDisabledForTesting: !1 }, this.frameworks = [], this.name = e.name, this.clientVersion = r.sdkClientVersion;
|
|
1639
1639
|
}
|
|
1640
1640
|
_initializeWithPersistence(e, t) {
|
|
1641
1641
|
return t && (this._popupRedirectResolver = k(t)), this._initializationPromise = this.queue(async () => {
|
|
@@ -1729,7 +1729,7 @@ class Qn {
|
|
|
1729
1729
|
return this.directlySetCurrentUser(e);
|
|
1730
1730
|
}
|
|
1731
1731
|
useDeviceLanguage() {
|
|
1732
|
-
this.languageCode =
|
|
1732
|
+
this.languageCode = Mn();
|
|
1733
1733
|
}
|
|
1734
1734
|
async _delete() {
|
|
1735
1735
|
this._deleted = !0;
|
|
@@ -1780,7 +1780,7 @@ class Qn {
|
|
|
1780
1780
|
return this.tenantId === null ? this._projectPasswordPolicy : this._tenantPasswordPolicies[this.tenantId];
|
|
1781
1781
|
}
|
|
1782
1782
|
async _updatePasswordPolicy() {
|
|
1783
|
-
const e = await
|
|
1783
|
+
const e = await Yn(this), t = new Qn(e);
|
|
1784
1784
|
this.tenantId === null ? this._projectPasswordPolicy = t : this._tenantPasswordPolicies[this.tenantId] = t;
|
|
1785
1785
|
}
|
|
1786
1786
|
_getPersistence() {
|
|
@@ -1820,7 +1820,7 @@ class Qn {
|
|
|
1820
1820
|
token: e,
|
|
1821
1821
|
idToken: t
|
|
1822
1822
|
};
|
|
1823
|
-
this.tenantId != null && (i.tenantId = this.tenantId), await
|
|
1823
|
+
this.tenantId != null && (i.tenantId = this.tenantId), await Bn(this, i);
|
|
1824
1824
|
}
|
|
1825
1825
|
}
|
|
1826
1826
|
toJSON() {
|
|
@@ -1963,7 +1963,7 @@ class Qn {
|
|
|
1963
1963
|
async _getAppCheckToken() {
|
|
1964
1964
|
var e;
|
|
1965
1965
|
const t = await ((e = this.appCheckServiceProvider.getImmediate({ optional: !0 })) === null || e === void 0 ? void 0 : e.getToken());
|
|
1966
|
-
return t != null && t.error &&
|
|
1966
|
+
return t != null && t.error && On(`Error while retrieving App Check token: ${t.error}`), t == null ? void 0 : t.token;
|
|
1967
1967
|
}
|
|
1968
1968
|
}
|
|
1969
1969
|
function pe(n) {
|
|
@@ -2006,16 +2006,16 @@ let Le = {
|
|
|
2006
2006
|
recaptchaEnterpriseScript: "",
|
|
2007
2007
|
gapiScript: ""
|
|
2008
2008
|
};
|
|
2009
|
-
function
|
|
2009
|
+
function ei(n) {
|
|
2010
2010
|
Le = n;
|
|
2011
2011
|
}
|
|
2012
|
-
function
|
|
2012
|
+
function ti(n) {
|
|
2013
2013
|
return Le.loadJS(n);
|
|
2014
2014
|
}
|
|
2015
|
-
function
|
|
2015
|
+
function ni() {
|
|
2016
2016
|
return Le.gapiScript;
|
|
2017
2017
|
}
|
|
2018
|
-
function
|
|
2018
|
+
function ii(n) {
|
|
2019
2019
|
return `__${n}${Math.floor(Math.random() * 1e6)}`;
|
|
2020
2020
|
}
|
|
2021
2021
|
/**
|
|
@@ -2034,7 +2034,7 @@ function ni(n) {
|
|
|
2034
2034
|
* See the License for the specific language governing permissions and
|
|
2035
2035
|
* limitations under the License.
|
|
2036
2036
|
*/
|
|
2037
|
-
function
|
|
2037
|
+
function ri(n, e) {
|
|
2038
2038
|
const t = pt(n, "auth");
|
|
2039
2039
|
if (t.isInitialized()) {
|
|
2040
2040
|
const r = t.getImmediate(), s = t.getOptions();
|
|
@@ -2048,11 +2048,11 @@ function ii(n, e) {
|
|
|
2048
2048
|
}
|
|
2049
2049
|
return t.initialize({ options: e });
|
|
2050
2050
|
}
|
|
2051
|
-
function
|
|
2051
|
+
function si(n, e) {
|
|
2052
2052
|
const t = (e == null ? void 0 : e.persistence) || [], i = (Array.isArray(t) ? t : [t]).map(k);
|
|
2053
2053
|
e != null && e.errorMap && n._updateErrorMap(e.errorMap), n._initializeWithPersistence(i, e == null ? void 0 : e.popupRedirectResolver);
|
|
2054
2054
|
}
|
|
2055
|
-
function
|
|
2055
|
+
function oi(n, e, t) {
|
|
2056
2056
|
const i = pe(n);
|
|
2057
2057
|
u(
|
|
2058
2058
|
i._canInitEmulator,
|
|
@@ -2065,19 +2065,19 @@ function si(n, e, t) {
|
|
|
2065
2065
|
"invalid-emulator-scheme"
|
|
2066
2066
|
/* AuthErrorCode.INVALID_EMULATOR_SCHEME */
|
|
2067
2067
|
);
|
|
2068
|
-
const r = !1, s = Mt(e), { host: o, port: c } =
|
|
2068
|
+
const r = !1, s = Mt(e), { host: o, port: c } = ai(e), a = c === null ? "" : `:${c}`;
|
|
2069
2069
|
i.config.emulator = { url: `${s}//${o}${a}/` }, i.settings.appVerificationDisabledForTesting = !0, i.emulatorConfig = Object.freeze({
|
|
2070
2070
|
host: o,
|
|
2071
2071
|
port: c,
|
|
2072
2072
|
protocol: s.replace(":", ""),
|
|
2073
2073
|
options: Object.freeze({ disableWarnings: r })
|
|
2074
|
-
}),
|
|
2074
|
+
}), ci();
|
|
2075
2075
|
}
|
|
2076
2076
|
function Mt(n) {
|
|
2077
2077
|
const e = n.indexOf(":");
|
|
2078
2078
|
return e < 0 ? "" : n.substr(0, e + 1);
|
|
2079
2079
|
}
|
|
2080
|
-
function
|
|
2080
|
+
function ai(n) {
|
|
2081
2081
|
const e = Mt(n), t = /(\/\/)?([^?#/]+)/.exec(n.substr(e.length));
|
|
2082
2082
|
if (!t)
|
|
2083
2083
|
return { host: "", port: null };
|
|
@@ -2096,7 +2096,7 @@ function Qe(n) {
|
|
|
2096
2096
|
const e = Number(n);
|
|
2097
2097
|
return isNaN(e) ? null : e;
|
|
2098
2098
|
}
|
|
2099
|
-
function
|
|
2099
|
+
function ci() {
|
|
2100
2100
|
function n() {
|
|
2101
2101
|
const e = document.createElement("p"), t = e.style;
|
|
2102
2102
|
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);
|
|
@@ -2180,7 +2180,7 @@ async function W(n, e) {
|
|
|
2180
2180
|
* See the License for the specific language governing permissions and
|
|
2181
2181
|
* limitations under the License.
|
|
2182
2182
|
*/
|
|
2183
|
-
const
|
|
2183
|
+
const li = "http://localhost";
|
|
2184
2184
|
class U extends Ut {
|
|
2185
2185
|
constructor() {
|
|
2186
2186
|
super(...arguments), this.pendingToken = null;
|
|
@@ -2238,7 +2238,7 @@ class U extends Ut {
|
|
|
2238
2238
|
}
|
|
2239
2239
|
buildRequest() {
|
|
2240
2240
|
const e = {
|
|
2241
|
-
requestUri:
|
|
2241
|
+
requestUri: li,
|
|
2242
2242
|
returnSecureToken: !0
|
|
2243
2243
|
};
|
|
2244
2244
|
if (this.pendingToken)
|
|
@@ -2700,7 +2700,7 @@ function Ft(n, e, t, i) {
|
|
|
2700
2700
|
throw s.code === "auth/multi-factor-auth-required" ? le._fromErrorAndOperation(n, s, e, i) : s;
|
|
2701
2701
|
});
|
|
2702
2702
|
}
|
|
2703
|
-
async function
|
|
2703
|
+
async function ui(n, e, t = !1) {
|
|
2704
2704
|
const i = await q(n, e._linkToIdToken(n.auth, await n.getIdToken()), t);
|
|
2705
2705
|
return D._forOperation(n, "link", i);
|
|
2706
2706
|
}
|
|
@@ -2720,7 +2720,7 @@ async function li(n, e, t = !1) {
|
|
|
2720
2720
|
* See the License for the specific language governing permissions and
|
|
2721
2721
|
* limitations under the License.
|
|
2722
2722
|
*/
|
|
2723
|
-
async function
|
|
2723
|
+
async function di(n, e, t = !1) {
|
|
2724
2724
|
const { auth: i } = n;
|
|
2725
2725
|
if (w(i.app))
|
|
2726
2726
|
return Promise.reject(L(i));
|
|
@@ -2771,7 +2771,7 @@ async function ui(n, e, t = !1) {
|
|
|
2771
2771
|
* See the License for the specific language governing permissions and
|
|
2772
2772
|
* limitations under the License.
|
|
2773
2773
|
*/
|
|
2774
|
-
async function
|
|
2774
|
+
async function hi(n, e, t = !1) {
|
|
2775
2775
|
if (w(n.app))
|
|
2776
2776
|
return Promise.reject(L(n));
|
|
2777
2777
|
const i = "signIn", r = await Ft(n, i, e), s = await D._fromIdTokenResponse(n, i, r);
|
|
@@ -2793,7 +2793,7 @@ async function di(n, e, t = !1) {
|
|
|
2793
2793
|
* See the License for the specific language governing permissions and
|
|
2794
2794
|
* limitations under the License.
|
|
2795
2795
|
*/
|
|
2796
|
-
async function
|
|
2796
|
+
async function fi(n, e) {
|
|
2797
2797
|
return wt(n, "POST", "/v1/accounts:signInWithCustomToken", he(n, e));
|
|
2798
2798
|
}
|
|
2799
2799
|
/**
|
|
@@ -2812,19 +2812,19 @@ async function hi(n, e) {
|
|
|
2812
2812
|
* See the License for the specific language governing permissions and
|
|
2813
2813
|
* limitations under the License.
|
|
2814
2814
|
*/
|
|
2815
|
-
async function
|
|
2815
|
+
async function pi(n, e) {
|
|
2816
2816
|
if (w(n.app))
|
|
2817
2817
|
return Promise.reject(L(n));
|
|
2818
|
-
const t = pe(n), i = await
|
|
2818
|
+
const t = pe(n), i = await fi(t, {
|
|
2819
2819
|
token: e,
|
|
2820
2820
|
returnSecureToken: !0
|
|
2821
2821
|
}), r = await D._fromIdTokenResponse(t, "signIn", i);
|
|
2822
2822
|
return await t._updateCurrentUser(r.user), r;
|
|
2823
2823
|
}
|
|
2824
|
-
function
|
|
2824
|
+
function mi(n, e, t, i) {
|
|
2825
2825
|
return j(n).onIdTokenChanged(e, t, i);
|
|
2826
2826
|
}
|
|
2827
|
-
function
|
|
2827
|
+
function gi(n, e, t) {
|
|
2828
2828
|
return j(n).beforeAuthStateChanged(e, t);
|
|
2829
2829
|
}
|
|
2830
2830
|
const ue = "__sak";
|
|
@@ -2885,18 +2885,18 @@ class xt {
|
|
|
2885
2885
|
* See the License for the specific language governing permissions and
|
|
2886
2886
|
* limitations under the License.
|
|
2887
2887
|
*/
|
|
2888
|
-
function
|
|
2888
|
+
function _i() {
|
|
2889
2889
|
const n = g();
|
|
2890
2890
|
return Ne(n) || fe(n);
|
|
2891
2891
|
}
|
|
2892
|
-
const
|
|
2892
|
+
const vi = 1e3, Ii = 10;
|
|
2893
2893
|
class Vt extends xt {
|
|
2894
2894
|
constructor() {
|
|
2895
2895
|
super(
|
|
2896
2896
|
() => window.localStorage,
|
|
2897
2897
|
"LOCAL"
|
|
2898
2898
|
/* PersistenceType.LOCAL */
|
|
2899
|
-
), this.boundEventHandler = (e, t) => this.onStorageEvent(e, t), this.listeners = {}, this.localCache = {}, this.pollTimer = null, this.safariLocalStorageNotSynced =
|
|
2899
|
+
), this.boundEventHandler = (e, t) => this.onStorageEvent(e, t), this.listeners = {}, this.localCache = {}, this.pollTimer = null, this.safariLocalStorageNotSynced = _i() && Kn(), this.fallbackToPolling = Nt(), this._shouldAllowMigration = !0;
|
|
2900
2900
|
}
|
|
2901
2901
|
forAllChangedKeys(e) {
|
|
2902
2902
|
for (const t of Object.keys(this.listeners)) {
|
|
@@ -2923,7 +2923,7 @@ class Vt extends xt {
|
|
|
2923
2923
|
const o = this.storage.getItem(i);
|
|
2924
2924
|
!t && this.localCache[i] === o || this.notifyListeners(i, o);
|
|
2925
2925
|
}, s = this.storage.getItem(i);
|
|
2926
|
-
|
|
2926
|
+
zn() && s !== e.newValue && e.newValue !== e.oldValue ? setTimeout(r, Ii) : r();
|
|
2927
2927
|
}
|
|
2928
2928
|
notifyListeners(e, t) {
|
|
2929
2929
|
this.localCache[e] = t;
|
|
@@ -2945,7 +2945,7 @@ class Vt extends xt {
|
|
|
2945
2945
|
!0
|
|
2946
2946
|
);
|
|
2947
2947
|
});
|
|
2948
|
-
},
|
|
2948
|
+
}, vi);
|
|
2949
2949
|
}
|
|
2950
2950
|
stopPolling() {
|
|
2951
2951
|
this.pollTimer && (clearInterval(this.pollTimer), this.pollTimer = null);
|
|
@@ -2975,7 +2975,7 @@ class Vt extends xt {
|
|
|
2975
2975
|
}
|
|
2976
2976
|
}
|
|
2977
2977
|
Vt.type = "LOCAL";
|
|
2978
|
-
const
|
|
2978
|
+
const Ti = Vt;
|
|
2979
2979
|
/**
|
|
2980
2980
|
* @license
|
|
2981
2981
|
* Copyright 2020 Google LLC
|
|
@@ -3023,7 +3023,7 @@ const $t = Ht;
|
|
|
3023
3023
|
* See the License for the specific language governing permissions and
|
|
3024
3024
|
* limitations under the License.
|
|
3025
3025
|
*/
|
|
3026
|
-
function
|
|
3026
|
+
function wi(n) {
|
|
3027
3027
|
return Promise.all(n.map(async (e) => {
|
|
3028
3028
|
try {
|
|
3029
3029
|
return {
|
|
@@ -3093,7 +3093,7 @@ class me {
|
|
|
3093
3093
|
eventId: i,
|
|
3094
3094
|
eventType: r
|
|
3095
3095
|
});
|
|
3096
|
-
const c = Array.from(o).map(async (l) => l(t.origin, s)), a = await
|
|
3096
|
+
const c = Array.from(o).map(async (l) => l(t.origin, s)), a = await wi(c);
|
|
3097
3097
|
t.ports[0].postMessage({
|
|
3098
3098
|
status: "done",
|
|
3099
3099
|
eventId: i,
|
|
@@ -3161,7 +3161,7 @@ function Me(n = "", e = 10) {
|
|
|
3161
3161
|
* See the License for the specific language governing permissions and
|
|
3162
3162
|
* limitations under the License.
|
|
3163
3163
|
*/
|
|
3164
|
-
class
|
|
3164
|
+
class yi {
|
|
3165
3165
|
constructor(e) {
|
|
3166
3166
|
this.target = e, this.handlers = /* @__PURE__ */ new Set();
|
|
3167
3167
|
}
|
|
@@ -3261,7 +3261,7 @@ class wi {
|
|
|
3261
3261
|
function T() {
|
|
3262
3262
|
return window;
|
|
3263
3263
|
}
|
|
3264
|
-
function
|
|
3264
|
+
function Ei(n) {
|
|
3265
3265
|
T().location.href = n;
|
|
3266
3266
|
}
|
|
3267
3267
|
/**
|
|
@@ -3283,7 +3283,7 @@ function yi(n) {
|
|
|
3283
3283
|
function Wt() {
|
|
3284
3284
|
return typeof T().WorkerGlobalScope < "u" && typeof T().importScripts == "function";
|
|
3285
3285
|
}
|
|
3286
|
-
async function
|
|
3286
|
+
async function ki() {
|
|
3287
3287
|
if (!(navigator != null && navigator.serviceWorker))
|
|
3288
3288
|
return null;
|
|
3289
3289
|
try {
|
|
@@ -3292,11 +3292,11 @@ async function Ei() {
|
|
|
3292
3292
|
return null;
|
|
3293
3293
|
}
|
|
3294
3294
|
}
|
|
3295
|
-
function
|
|
3295
|
+
function Si() {
|
|
3296
3296
|
var n;
|
|
3297
3297
|
return ((n = navigator == null ? void 0 : navigator.serviceWorker) === null || n === void 0 ? void 0 : n.controller) || null;
|
|
3298
3298
|
}
|
|
3299
|
-
function
|
|
3299
|
+
function bi() {
|
|
3300
3300
|
return Wt() ? self : null;
|
|
3301
3301
|
}
|
|
3302
3302
|
/**
|
|
@@ -3315,7 +3315,7 @@ function Si() {
|
|
|
3315
3315
|
* See the License for the specific language governing permissions and
|
|
3316
3316
|
* limitations under the License.
|
|
3317
3317
|
*/
|
|
3318
|
-
const jt = "firebaseLocalStorageDb",
|
|
3318
|
+
const jt = "firebaseLocalStorageDb", Ri = 1, de = "firebaseLocalStorage", Gt = "fbase_key";
|
|
3319
3319
|
class X {
|
|
3320
3320
|
constructor(e) {
|
|
3321
3321
|
this.request = e;
|
|
@@ -3333,12 +3333,12 @@ class X {
|
|
|
3333
3333
|
function ge(n, e) {
|
|
3334
3334
|
return n.transaction([de], e ? "readwrite" : "readonly").objectStore(de);
|
|
3335
3335
|
}
|
|
3336
|
-
function
|
|
3336
|
+
function Pi() {
|
|
3337
3337
|
const n = indexedDB.deleteDatabase(jt);
|
|
3338
3338
|
return new X(n).toPromise();
|
|
3339
3339
|
}
|
|
3340
3340
|
function Se() {
|
|
3341
|
-
const n = indexedDB.open(jt,
|
|
3341
|
+
const n = indexedDB.open(jt, Ri);
|
|
3342
3342
|
return new Promise((e, t) => {
|
|
3343
3343
|
n.addEventListener("error", () => {
|
|
3344
3344
|
t(n.error);
|
|
@@ -3351,7 +3351,7 @@ function Se() {
|
|
|
3351
3351
|
}
|
|
3352
3352
|
}), n.addEventListener("success", async () => {
|
|
3353
3353
|
const i = n.result;
|
|
3354
|
-
i.objectStoreNames.contains(de) ? e(i) : (i.close(), await
|
|
3354
|
+
i.objectStoreNames.contains(de) ? e(i) : (i.close(), await Pi(), e(await Se()));
|
|
3355
3355
|
});
|
|
3356
3356
|
});
|
|
3357
3357
|
}
|
|
@@ -3362,7 +3362,7 @@ async function et(n, e, t) {
|
|
|
3362
3362
|
});
|
|
3363
3363
|
return new X(i).toPromise();
|
|
3364
3364
|
}
|
|
3365
|
-
async function
|
|
3365
|
+
async function Ai(n, e) {
|
|
3366
3366
|
const t = ge(n, !1).get(e), i = await new X(t).toPromise();
|
|
3367
3367
|
return i === void 0 ? null : i.value;
|
|
3368
3368
|
}
|
|
@@ -3370,7 +3370,7 @@ function tt(n, e) {
|
|
|
3370
3370
|
const t = ge(n, !0).delete(e);
|
|
3371
3371
|
return new X(t).toPromise();
|
|
3372
3372
|
}
|
|
3373
|
-
const
|
|
3373
|
+
const Ci = 800, Oi = 3;
|
|
3374
3374
|
class Bt {
|
|
3375
3375
|
constructor() {
|
|
3376
3376
|
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(() => {
|
|
@@ -3387,7 +3387,7 @@ class Bt {
|
|
|
3387
3387
|
const i = await this._openDb();
|
|
3388
3388
|
return await e(i);
|
|
3389
3389
|
} catch (i) {
|
|
3390
|
-
if (t++ >
|
|
3390
|
+
if (t++ > Oi)
|
|
3391
3391
|
throw i;
|
|
3392
3392
|
this.db && (this.db.close(), this.db = void 0);
|
|
3393
3393
|
}
|
|
@@ -3403,7 +3403,7 @@ class Bt {
|
|
|
3403
3403
|
* As the worker we should listen to events from the main window.
|
|
3404
3404
|
*/
|
|
3405
3405
|
async initializeReceiver() {
|
|
3406
|
-
this.receiver = me._getInstance(
|
|
3406
|
+
this.receiver = me._getInstance(bi()), this.receiver._subscribe("keyChanged", async (e, t) => ({
|
|
3407
3407
|
keyProcessed: (await this._poll()).includes(t.key)
|
|
3408
3408
|
})), this.receiver._subscribe("ping", async (e, t) => [
|
|
3409
3409
|
"keyChanged"
|
|
@@ -3419,9 +3419,9 @@ class Bt {
|
|
|
3419
3419
|
*/
|
|
3420
3420
|
async initializeSender() {
|
|
3421
3421
|
var e, t;
|
|
3422
|
-
if (this.activeServiceWorker = await
|
|
3422
|
+
if (this.activeServiceWorker = await ki(), !this.activeServiceWorker)
|
|
3423
3423
|
return;
|
|
3424
|
-
this.sender = new
|
|
3424
|
+
this.sender = new yi(this.activeServiceWorker);
|
|
3425
3425
|
const i = await this.sender._send(
|
|
3426
3426
|
"ping",
|
|
3427
3427
|
{},
|
|
@@ -3443,7 +3443,7 @@ class Bt {
|
|
|
3443
3443
|
* @param key - Storage key which changed.
|
|
3444
3444
|
*/
|
|
3445
3445
|
async notifyServiceWorker(e) {
|
|
3446
|
-
if (!(!this.sender || !this.activeServiceWorker ||
|
|
3446
|
+
if (!(!this.sender || !this.activeServiceWorker || Si() !== this.activeServiceWorker))
|
|
3447
3447
|
try {
|
|
3448
3448
|
await this.sender._send(
|
|
3449
3449
|
"keyChanged",
|
|
@@ -3477,7 +3477,7 @@ class Bt {
|
|
|
3477
3477
|
return this._withPendingWrite(async () => (await this._withRetries((i) => et(i, e, t)), this.localCache[e] = t, this.notifyServiceWorker(e)));
|
|
3478
3478
|
}
|
|
3479
3479
|
async _get(e) {
|
|
3480
|
-
const t = await this._withRetries((i) =>
|
|
3480
|
+
const t = await this._withRetries((i) => Ai(i, e));
|
|
3481
3481
|
return this.localCache[e] = t, t;
|
|
3482
3482
|
}
|
|
3483
3483
|
async _remove(e) {
|
|
@@ -3508,7 +3508,7 @@ class Bt {
|
|
|
3508
3508
|
r(t);
|
|
3509
3509
|
}
|
|
3510
3510
|
startPolling() {
|
|
3511
|
-
this.stopPolling(), this.pollTimer = setInterval(async () => this._poll(),
|
|
3511
|
+
this.stopPolling(), this.pollTimer = setInterval(async () => this._poll(), Ci);
|
|
3512
3512
|
}
|
|
3513
3513
|
stopPolling() {
|
|
3514
3514
|
this.pollTimer && (clearInterval(this.pollTimer), this.pollTimer = null);
|
|
@@ -3521,7 +3521,7 @@ class Bt {
|
|
|
3521
3521
|
}
|
|
3522
3522
|
}
|
|
3523
3523
|
Bt.type = "LOCAL";
|
|
3524
|
-
const
|
|
3524
|
+
const Ni = Bt;
|
|
3525
3525
|
new J(3e4, 6e4);
|
|
3526
3526
|
/**
|
|
3527
3527
|
* @license
|
|
@@ -3539,7 +3539,7 @@ new J(3e4, 6e4);
|
|
|
3539
3539
|
* See the License for the specific language governing permissions and
|
|
3540
3540
|
* limitations under the License.
|
|
3541
3541
|
*/
|
|
3542
|
-
function
|
|
3542
|
+
function Li(n, e) {
|
|
3543
3543
|
return e ? k(e) : (u(
|
|
3544
3544
|
n._popupRedirectResolver,
|
|
3545
3545
|
n,
|
|
@@ -3593,26 +3593,26 @@ class Ue extends Ut {
|
|
|
3593
3593
|
return e && (t.idToken = e), t;
|
|
3594
3594
|
}
|
|
3595
3595
|
}
|
|
3596
|
-
function Li(n) {
|
|
3597
|
-
return di(n.auth, new Ue(n), n.bypassAuthState);
|
|
3598
|
-
}
|
|
3599
3596
|
function Mi(n) {
|
|
3597
|
+
return hi(n.auth, new Ue(n), n.bypassAuthState);
|
|
3598
|
+
}
|
|
3599
|
+
function Ui(n) {
|
|
3600
3600
|
const { auth: e, user: t } = n;
|
|
3601
3601
|
return u(
|
|
3602
3602
|
t,
|
|
3603
3603
|
e,
|
|
3604
3604
|
"internal-error"
|
|
3605
3605
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
3606
|
-
),
|
|
3606
|
+
), di(t, new Ue(n), n.bypassAuthState);
|
|
3607
3607
|
}
|
|
3608
|
-
async function
|
|
3608
|
+
async function Di(n) {
|
|
3609
3609
|
const { auth: e, user: t } = n;
|
|
3610
3610
|
return u(
|
|
3611
3611
|
t,
|
|
3612
3612
|
e,
|
|
3613
3613
|
"internal-error"
|
|
3614
3614
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
3615
|
-
),
|
|
3615
|
+
), ui(t, new Ue(n), n.bypassAuthState);
|
|
3616
3616
|
}
|
|
3617
3617
|
/**
|
|
3618
3618
|
* @license
|
|
@@ -3672,13 +3672,13 @@ class qt {
|
|
|
3672
3672
|
switch (e) {
|
|
3673
3673
|
case "signInViaPopup":
|
|
3674
3674
|
case "signInViaRedirect":
|
|
3675
|
-
return
|
|
3675
|
+
return Mi;
|
|
3676
3676
|
case "linkViaPopup":
|
|
3677
3677
|
case "linkViaRedirect":
|
|
3678
|
-
return
|
|
3678
|
+
return Di;
|
|
3679
3679
|
case "reauthViaPopup":
|
|
3680
3680
|
case "reauthViaRedirect":
|
|
3681
|
-
return
|
|
3681
|
+
return Ui;
|
|
3682
3682
|
default:
|
|
3683
3683
|
S(
|
|
3684
3684
|
this.auth,
|
|
@@ -3713,7 +3713,7 @@ class qt {
|
|
|
3713
3713
|
* See the License for the specific language governing permissions and
|
|
3714
3714
|
* limitations under the License.
|
|
3715
3715
|
*/
|
|
3716
|
-
const
|
|
3716
|
+
const Fi = new J(2e3, 1e4);
|
|
3717
3717
|
class V extends qt {
|
|
3718
3718
|
constructor(e, t, i, r, s) {
|
|
3719
3719
|
super(e, t, r, s), this.provider = i, this.authWindow = null, this.pollId = null, V.currentPopupAction && V.currentPopupAction.cancel(), V.currentPopupAction = this;
|
|
@@ -3777,7 +3777,7 @@ class V extends qt {
|
|
|
3777
3777
|
);
|
|
3778
3778
|
return;
|
|
3779
3779
|
}
|
|
3780
|
-
this.pollId = window.setTimeout(e,
|
|
3780
|
+
this.pollId = window.setTimeout(e, Fi.get());
|
|
3781
3781
|
};
|
|
3782
3782
|
e();
|
|
3783
3783
|
}
|
|
@@ -3799,8 +3799,8 @@ V.currentPopupAction = null;
|
|
|
3799
3799
|
* See the License for the specific language governing permissions and
|
|
3800
3800
|
* limitations under the License.
|
|
3801
3801
|
*/
|
|
3802
|
-
const
|
|
3803
|
-
class
|
|
3802
|
+
const xi = "pendingRedirect", se = /* @__PURE__ */ new Map();
|
|
3803
|
+
class Vi extends qt {
|
|
3804
3804
|
constructor(e, t, i = !1) {
|
|
3805
3805
|
super(e, [
|
|
3806
3806
|
"signInViaRedirect",
|
|
@@ -3818,7 +3818,7 @@ class xi extends qt {
|
|
|
3818
3818
|
let e = se.get(this.auth._key());
|
|
3819
3819
|
if (!e) {
|
|
3820
3820
|
try {
|
|
3821
|
-
const i = await
|
|
3821
|
+
const i = await Hi(this.resolver, this.auth) ? await super.execute() : null;
|
|
3822
3822
|
e = () => Promise.resolve(i);
|
|
3823
3823
|
} catch (t) {
|
|
3824
3824
|
e = () => Promise.reject(t);
|
|
@@ -3846,26 +3846,26 @@ class xi extends qt {
|
|
|
3846
3846
|
cleanUp() {
|
|
3847
3847
|
}
|
|
3848
3848
|
}
|
|
3849
|
-
async function
|
|
3850
|
-
const t =
|
|
3849
|
+
async function Hi(n, e) {
|
|
3850
|
+
const t = ji(e), i = Wi(n);
|
|
3851
3851
|
if (!await i._isAvailable())
|
|
3852
3852
|
return !1;
|
|
3853
3853
|
const r = await i._get(t) === "true";
|
|
3854
3854
|
return await i._remove(t), r;
|
|
3855
3855
|
}
|
|
3856
|
-
function
|
|
3856
|
+
function $i(n, e) {
|
|
3857
3857
|
se.set(n._key(), e);
|
|
3858
3858
|
}
|
|
3859
|
-
function
|
|
3859
|
+
function Wi(n) {
|
|
3860
3860
|
return k(n._redirectPersistence);
|
|
3861
3861
|
}
|
|
3862
|
-
function
|
|
3863
|
-
return re(
|
|
3862
|
+
function ji(n) {
|
|
3863
|
+
return re(xi, n.config.apiKey, n.name);
|
|
3864
3864
|
}
|
|
3865
|
-
async function
|
|
3865
|
+
async function Gi(n, e, t = !1) {
|
|
3866
3866
|
if (w(n.app))
|
|
3867
3867
|
return Promise.reject(L(n));
|
|
3868
|
-
const i = pe(n), r =
|
|
3868
|
+
const i = pe(n), r = Li(i, e), o = await new Vi(i, r, t).execute();
|
|
3869
3869
|
return o && !t && (delete o.user._redirectEventId, await i._persistUserIfCurrent(o.user), await i._setRedirectUser(null, e)), o;
|
|
3870
3870
|
}
|
|
3871
3871
|
/**
|
|
@@ -3884,8 +3884,8 @@ async function ji(n, e, t = !1) {
|
|
|
3884
3884
|
* See the License for the specific language governing permissions and
|
|
3885
3885
|
* limitations under the License.
|
|
3886
3886
|
*/
|
|
3887
|
-
const
|
|
3888
|
-
class
|
|
3887
|
+
const Bi = 10 * 60 * 1e3;
|
|
3888
|
+
class qi {
|
|
3889
3889
|
constructor(e) {
|
|
3890
3890
|
this.auth = e, this.cachedEventUids = /* @__PURE__ */ new Set(), this.consumers = /* @__PURE__ */ new Set(), this.queuedRedirectEvent = null, this.hasHandledPotentialRedirect = !1, this.lastProcessedEventTime = Date.now();
|
|
3891
3891
|
}
|
|
@@ -3901,7 +3901,7 @@ class Bi {
|
|
|
3901
3901
|
let t = !1;
|
|
3902
3902
|
return this.consumers.forEach((i) => {
|
|
3903
3903
|
this.isEventForConsumer(e, i) && (t = !0, this.sendToConsumer(e, i), this.saveEventToCache(e));
|
|
3904
|
-
}), this.hasHandledPotentialRedirect || !
|
|
3904
|
+
}), this.hasHandledPotentialRedirect || !zi(e) || (this.hasHandledPotentialRedirect = !0, t || (this.queuedRedirectEvent = e, t = !0)), t;
|
|
3905
3905
|
}
|
|
3906
3906
|
sendToConsumer(e, t) {
|
|
3907
3907
|
var i;
|
|
@@ -3916,7 +3916,7 @@ class Bi {
|
|
|
3916
3916
|
return t.filter.includes(e.type) && i;
|
|
3917
3917
|
}
|
|
3918
3918
|
hasEventBeenHandled(e) {
|
|
3919
|
-
return Date.now() - this.lastProcessedEventTime >=
|
|
3919
|
+
return Date.now() - this.lastProcessedEventTime >= Bi && this.cachedEventUids.clear(), this.cachedEventUids.has(nt(e));
|
|
3920
3920
|
}
|
|
3921
3921
|
saveEventToCache(e) {
|
|
3922
3922
|
this.cachedEventUids.add(nt(e)), this.lastProcessedEventTime = Date.now();
|
|
@@ -3928,7 +3928,7 @@ function nt(n) {
|
|
|
3928
3928
|
function zt({ type: n, error: e }) {
|
|
3929
3929
|
return n === "unknown" && (e == null ? void 0 : e.code) === "auth/no-auth-event";
|
|
3930
3930
|
}
|
|
3931
|
-
function
|
|
3931
|
+
function zi(n) {
|
|
3932
3932
|
switch (n.type) {
|
|
3933
3933
|
case "signInViaRedirect":
|
|
3934
3934
|
case "linkViaRedirect":
|
|
@@ -3956,7 +3956,7 @@ function qi(n) {
|
|
|
3956
3956
|
* See the License for the specific language governing permissions and
|
|
3957
3957
|
* limitations under the License.
|
|
3958
3958
|
*/
|
|
3959
|
-
async function
|
|
3959
|
+
async function Ki(n, e = {}) {
|
|
3960
3960
|
return G(n, "GET", "/v1/projects", e);
|
|
3961
3961
|
}
|
|
3962
3962
|
/**
|
|
@@ -3975,14 +3975,14 @@ async function zi(n, e = {}) {
|
|
|
3975
3975
|
* See the License for the specific language governing permissions and
|
|
3976
3976
|
* limitations under the License.
|
|
3977
3977
|
*/
|
|
3978
|
-
const
|
|
3979
|
-
async function
|
|
3978
|
+
const Ji = /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/, Yi = /^https?/;
|
|
3979
|
+
async function Xi(n) {
|
|
3980
3980
|
if (n.config.emulator)
|
|
3981
3981
|
return;
|
|
3982
|
-
const { authorizedDomains: e } = await
|
|
3982
|
+
const { authorizedDomains: e } = await Ki(n);
|
|
3983
3983
|
for (const t of e)
|
|
3984
3984
|
try {
|
|
3985
|
-
if (
|
|
3985
|
+
if (Qi(t))
|
|
3986
3986
|
return;
|
|
3987
3987
|
} catch {
|
|
3988
3988
|
}
|
|
@@ -3992,15 +3992,15 @@ async function Yi(n) {
|
|
|
3992
3992
|
/* AuthErrorCode.INVALID_ORIGIN */
|
|
3993
3993
|
);
|
|
3994
3994
|
}
|
|
3995
|
-
function
|
|
3995
|
+
function Qi(n) {
|
|
3996
3996
|
const e = Ee(), { protocol: t, hostname: i } = new URL(e);
|
|
3997
3997
|
if (n.startsWith("chrome-extension://")) {
|
|
3998
3998
|
const o = new URL(n);
|
|
3999
3999
|
return o.hostname === "" && i === "" ? t === "chrome-extension:" && n.replace("chrome-extension://", "") === e.replace("chrome-extension://", "") : t === "chrome-extension:" && o.hostname === i;
|
|
4000
4000
|
}
|
|
4001
|
-
if (!
|
|
4001
|
+
if (!Yi.test(t))
|
|
4002
4002
|
return !1;
|
|
4003
|
-
if (
|
|
4003
|
+
if (Ji.test(n))
|
|
4004
4004
|
return i === n;
|
|
4005
4005
|
const r = n.replace(/\./g, "\\.");
|
|
4006
4006
|
return new RegExp("^(.+\\." + r + "|" + r + ")$", "i").test(i);
|
|
@@ -4021,7 +4021,7 @@ function Xi(n) {
|
|
|
4021
4021
|
* See the License for the specific language governing permissions and
|
|
4022
4022
|
* limitations under the License.
|
|
4023
4023
|
*/
|
|
4024
|
-
const
|
|
4024
|
+
const Zi = new J(3e4, 6e4);
|
|
4025
4025
|
function it() {
|
|
4026
4026
|
const n = T().___jsl;
|
|
4027
4027
|
if (n != null && n.H) {
|
|
@@ -4031,7 +4031,7 @@ function it() {
|
|
|
4031
4031
|
n.CP[t] = null;
|
|
4032
4032
|
}
|
|
4033
4033
|
}
|
|
4034
|
-
function
|
|
4034
|
+
function er(n) {
|
|
4035
4035
|
return new Promise((e, t) => {
|
|
4036
4036
|
var i, r, s;
|
|
4037
4037
|
function o() {
|
|
@@ -4046,7 +4046,7 @@ function Zi(n) {
|
|
|
4046
4046
|
/* AuthErrorCode.NETWORK_REQUEST_FAILED */
|
|
4047
4047
|
));
|
|
4048
4048
|
},
|
|
4049
|
-
timeout:
|
|
4049
|
+
timeout: Zi.get()
|
|
4050
4050
|
});
|
|
4051
4051
|
}
|
|
4052
4052
|
if (!((r = (i = T().gapi) === null || i === void 0 ? void 0 : i.iframes) === null || r === void 0) && r.Iframe)
|
|
@@ -4054,22 +4054,22 @@ function Zi(n) {
|
|
|
4054
4054
|
else if (!((s = T().gapi) === null || s === void 0) && s.load)
|
|
4055
4055
|
o();
|
|
4056
4056
|
else {
|
|
4057
|
-
const c =
|
|
4057
|
+
const c = ii("iframefcb");
|
|
4058
4058
|
return T()[c] = () => {
|
|
4059
4059
|
gapi.load ? o() : t(I(
|
|
4060
4060
|
n,
|
|
4061
4061
|
"network-request-failed"
|
|
4062
4062
|
/* AuthErrorCode.NETWORK_REQUEST_FAILED */
|
|
4063
4063
|
));
|
|
4064
|
-
},
|
|
4064
|
+
}, ti(`${ni()}?onload=${c}`).catch((a) => t(a));
|
|
4065
4065
|
}
|
|
4066
4066
|
}).catch((e) => {
|
|
4067
4067
|
throw oe = null, e;
|
|
4068
4068
|
});
|
|
4069
4069
|
}
|
|
4070
4070
|
let oe = null;
|
|
4071
|
-
function
|
|
4072
|
-
return oe = oe ||
|
|
4071
|
+
function tr(n) {
|
|
4072
|
+
return oe = oe || er(n), oe;
|
|
4073
4073
|
}
|
|
4074
4074
|
/**
|
|
4075
4075
|
* @license
|
|
@@ -4087,7 +4087,7 @@ function er(n) {
|
|
|
4087
4087
|
* See the License for the specific language governing permissions and
|
|
4088
4088
|
* limitations under the License.
|
|
4089
4089
|
*/
|
|
4090
|
-
const
|
|
4090
|
+
const nr = new J(5e3, 15e3), ir = "__/auth/iframe", rr = "emulator/auth/iframe", sr = {
|
|
4091
4091
|
style: {
|
|
4092
4092
|
position: "absolute",
|
|
4093
4093
|
top: "-100px",
|
|
@@ -4096,13 +4096,13 @@ const tr = new J(5e3, 15e3), nr = "__/auth/iframe", ir = "emulator/auth/iframe",
|
|
|
4096
4096
|
},
|
|
4097
4097
|
"aria-hidden": "true",
|
|
4098
4098
|
tabindex: "-1"
|
|
4099
|
-
},
|
|
4099
|
+
}, or = /* @__PURE__ */ new Map([
|
|
4100
4100
|
["identitytoolkit.googleapis.com", "p"],
|
|
4101
4101
|
["staging-identitytoolkit.sandbox.googleapis.com", "s"],
|
|
4102
4102
|
["test-identitytoolkit.sandbox.googleapis.com", "t"]
|
|
4103
4103
|
// test
|
|
4104
4104
|
]);
|
|
4105
|
-
function
|
|
4105
|
+
function ar(n) {
|
|
4106
4106
|
const e = n.config;
|
|
4107
4107
|
u(
|
|
4108
4108
|
e.authDomain,
|
|
@@ -4110,17 +4110,17 @@ function or(n) {
|
|
|
4110
4110
|
"auth-domain-config-required"
|
|
4111
4111
|
/* AuthErrorCode.MISSING_AUTH_DOMAIN */
|
|
4112
4112
|
);
|
|
4113
|
-
const t = e.emulator ? Ce(e,
|
|
4113
|
+
const t = e.emulator ? Ce(e, rr) : `https://${n.config.authDomain}/${ir}`, i = {
|
|
4114
4114
|
apiKey: e.apiKey,
|
|
4115
4115
|
appName: n.name,
|
|
4116
4116
|
v: z
|
|
4117
|
-
}, r =
|
|
4117
|
+
}, r = or.get(n.config.apiHost);
|
|
4118
4118
|
r && (i.eid = r);
|
|
4119
4119
|
const s = n._getFrameworks();
|
|
4120
4120
|
return s.length && (i.fw = s.join(",")), `${t}?${K(i).slice(1)}`;
|
|
4121
4121
|
}
|
|
4122
|
-
async function
|
|
4123
|
-
const e = await
|
|
4122
|
+
async function cr(n) {
|
|
4123
|
+
const e = await tr(n), t = T().gapi;
|
|
4124
4124
|
return u(
|
|
4125
4125
|
t,
|
|
4126
4126
|
n,
|
|
@@ -4128,9 +4128,9 @@ async function ar(n) {
|
|
|
4128
4128
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
4129
4129
|
), e.open({
|
|
4130
4130
|
where: document.body,
|
|
4131
|
-
url:
|
|
4131
|
+
url: ar(n),
|
|
4132
4132
|
messageHandlersFilter: t.iframes.CROSS_ORIGIN_IFRAMES_FILTER,
|
|
4133
|
-
attributes:
|
|
4133
|
+
attributes: sr,
|
|
4134
4134
|
dontclear: !0
|
|
4135
4135
|
}, (i) => new Promise(async (r, s) => {
|
|
4136
4136
|
await i.restyle({
|
|
@@ -4143,7 +4143,7 @@ async function ar(n) {
|
|
|
4143
4143
|
/* AuthErrorCode.NETWORK_REQUEST_FAILED */
|
|
4144
4144
|
), c = T().setTimeout(() => {
|
|
4145
4145
|
s(o);
|
|
4146
|
-
},
|
|
4146
|
+
}, nr.get());
|
|
4147
4147
|
function a() {
|
|
4148
4148
|
T().clearTimeout(c), r(i);
|
|
4149
4149
|
}
|
|
@@ -4168,12 +4168,12 @@ async function ar(n) {
|
|
|
4168
4168
|
* See the License for the specific language governing permissions and
|
|
4169
4169
|
* limitations under the License.
|
|
4170
4170
|
*/
|
|
4171
|
-
const
|
|
4171
|
+
const lr = {
|
|
4172
4172
|
location: "yes",
|
|
4173
4173
|
resizable: "yes",
|
|
4174
4174
|
statusbar: "yes",
|
|
4175
4175
|
toolbar: "no"
|
|
4176
|
-
},
|
|
4176
|
+
}, ur = 500, dr = 600, hr = "_blank", fr = "http://localhost";
|
|
4177
4177
|
class rt {
|
|
4178
4178
|
constructor(e) {
|
|
4179
4179
|
this.window = e, this.associatedEvent = null;
|
|
@@ -4186,19 +4186,19 @@ class rt {
|
|
|
4186
4186
|
}
|
|
4187
4187
|
}
|
|
4188
4188
|
}
|
|
4189
|
-
function
|
|
4189
|
+
function pr(n, e, t, i = ur, r = dr) {
|
|
4190
4190
|
const s = Math.max((window.screen.availHeight - r) / 2, 0).toString(), o = Math.max((window.screen.availWidth - i) / 2, 0).toString();
|
|
4191
4191
|
let c = "";
|
|
4192
|
-
const a = Object.assign(Object.assign({},
|
|
4192
|
+
const a = Object.assign(Object.assign({}, lr), {
|
|
4193
4193
|
width: i.toString(),
|
|
4194
4194
|
height: r.toString(),
|
|
4195
4195
|
top: s,
|
|
4196
4196
|
left: o
|
|
4197
4197
|
}), l = g().toLowerCase();
|
|
4198
|
-
t && (c = Rt(l) ?
|
|
4198
|
+
t && (c = Rt(l) ? hr : t), bt(l) && (e = e || fr, a.scrollbars = "yes");
|
|
4199
4199
|
const d = Object.entries(a).reduce((_, [F, M]) => `${_}${F}=${M},`, "");
|
|
4200
|
-
if (
|
|
4201
|
-
return
|
|
4200
|
+
if (qn(l) && c !== "_self")
|
|
4201
|
+
return mr(e || "", c), new rt(null);
|
|
4202
4202
|
const h = window.open(e || "", c, d);
|
|
4203
4203
|
u(
|
|
4204
4204
|
h,
|
|
@@ -4212,7 +4212,7 @@ function fr(n, e, t, i = lr, r = ur) {
|
|
|
4212
4212
|
}
|
|
4213
4213
|
return new rt(h);
|
|
4214
4214
|
}
|
|
4215
|
-
function
|
|
4215
|
+
function mr(n, e) {
|
|
4216
4216
|
const t = document.createElement("a");
|
|
4217
4217
|
t.href = n, t.target = e;
|
|
4218
4218
|
const i = document.createEvent("MouseEvent");
|
|
@@ -4234,7 +4234,7 @@ function pr(n, e) {
|
|
|
4234
4234
|
* See the License for the specific language governing permissions and
|
|
4235
4235
|
* limitations under the License.
|
|
4236
4236
|
*/
|
|
4237
|
-
const
|
|
4237
|
+
const gr = "__/auth/handler", _r = "emulator/auth/handler", vr = encodeURIComponent("fac");
|
|
4238
4238
|
async function st(n, e, t, i, r, s) {
|
|
4239
4239
|
u(
|
|
4240
4240
|
n.config.authDomain,
|
|
@@ -4268,11 +4268,11 @@ async function st(n, e, t, i, r, s) {
|
|
|
4268
4268
|
const c = o;
|
|
4269
4269
|
for (const d of Object.keys(c))
|
|
4270
4270
|
c[d] === void 0 && delete c[d];
|
|
4271
|
-
const a = await n._getAppCheckToken(), l = a ? `#${
|
|
4272
|
-
return `${
|
|
4271
|
+
const a = await n._getAppCheckToken(), l = a ? `#${vr}=${encodeURIComponent(a)}` : "";
|
|
4272
|
+
return `${Ir(n)}?${K(c).slice(1)}${l}`;
|
|
4273
4273
|
}
|
|
4274
|
-
function
|
|
4275
|
-
return n.emulator ? Ce(n,
|
|
4274
|
+
function Ir({ config: n }) {
|
|
4275
|
+
return n.emulator ? Ce(n, _r) : `https://${n.authDomain}/${gr}`;
|
|
4276
4276
|
}
|
|
4277
4277
|
/**
|
|
4278
4278
|
* @license
|
|
@@ -4291,9 +4291,9 @@ function vr({ config: n }) {
|
|
|
4291
4291
|
* limitations under the License.
|
|
4292
4292
|
*/
|
|
4293
4293
|
const we = "webStorageSupport";
|
|
4294
|
-
class
|
|
4294
|
+
class Tr {
|
|
4295
4295
|
constructor() {
|
|
4296
|
-
this.eventManagers = {}, this.iframes = {}, this.originValidationPromises = {}, this._redirectPersistence = $t, this._completeRedirectFn =
|
|
4296
|
+
this.eventManagers = {}, this.iframes = {}, this.originValidationPromises = {}, this._redirectPersistence = $t, this._completeRedirectFn = Gi, this._overrideRedirectResult = $i;
|
|
4297
4297
|
}
|
|
4298
4298
|
// Wrapping in async even though we don't await anywhere in order
|
|
4299
4299
|
// to make sure errors are raised as promise rejections
|
|
@@ -4301,12 +4301,12 @@ class Ir {
|
|
|
4301
4301
|
var s;
|
|
4302
4302
|
b((s = this.eventManagers[e._key()]) === null || s === void 0 ? void 0 : s.manager, "_initialize() not called before _openPopup()");
|
|
4303
4303
|
const o = await st(e, t, i, Ee(), r);
|
|
4304
|
-
return
|
|
4304
|
+
return pr(e, o, Me());
|
|
4305
4305
|
}
|
|
4306
4306
|
async _openRedirect(e, t, i, r) {
|
|
4307
4307
|
await this._originValidation(e);
|
|
4308
4308
|
const s = await st(e, t, i, Ee(), r);
|
|
4309
|
-
return
|
|
4309
|
+
return Ei(s), new Promise(() => {
|
|
4310
4310
|
});
|
|
4311
4311
|
}
|
|
4312
4312
|
_initialize(e) {
|
|
@@ -4321,7 +4321,7 @@ class Ir {
|
|
|
4321
4321
|
}), i;
|
|
4322
4322
|
}
|
|
4323
4323
|
async initAndGetManager(e) {
|
|
4324
|
-
const t = await
|
|
4324
|
+
const t = await cr(e), i = new qi(e);
|
|
4325
4325
|
return t.register("authEvent", (r) => (u(
|
|
4326
4326
|
r == null ? void 0 : r.authEvent,
|
|
4327
4327
|
e,
|
|
@@ -4345,13 +4345,13 @@ class Ir {
|
|
|
4345
4345
|
}
|
|
4346
4346
|
_originValidation(e) {
|
|
4347
4347
|
const t = e._key();
|
|
4348
|
-
return this.originValidationPromises[t] || (this.originValidationPromises[t] =
|
|
4348
|
+
return this.originValidationPromises[t] || (this.originValidationPromises[t] = Xi(e)), this.originValidationPromises[t];
|
|
4349
4349
|
}
|
|
4350
4350
|
get _shouldInitProactively() {
|
|
4351
4351
|
return Nt() || Ne() || fe();
|
|
4352
4352
|
}
|
|
4353
4353
|
}
|
|
4354
|
-
const
|
|
4354
|
+
const wr = Tr;
|
|
4355
4355
|
var ot = "@firebase/auth", at = "1.7.5";
|
|
4356
4356
|
/**
|
|
4357
4357
|
* @license
|
|
@@ -4369,7 +4369,7 @@ var ot = "@firebase/auth", at = "1.7.5";
|
|
|
4369
4369
|
* See the License for the specific language governing permissions and
|
|
4370
4370
|
* limitations under the License.
|
|
4371
4371
|
*/
|
|
4372
|
-
class
|
|
4372
|
+
class yr {
|
|
4373
4373
|
constructor(e) {
|
|
4374
4374
|
this.auth = e, this.internalListeners = /* @__PURE__ */ new Map();
|
|
4375
4375
|
}
|
|
@@ -4420,7 +4420,7 @@ class wr {
|
|
|
4420
4420
|
* See the License for the specific language governing permissions and
|
|
4421
4421
|
* limitations under the License.
|
|
4422
4422
|
*/
|
|
4423
|
-
function
|
|
4423
|
+
function Er(n) {
|
|
4424
4424
|
switch (n) {
|
|
4425
4425
|
case "Node":
|
|
4426
4426
|
return "node";
|
|
@@ -4436,7 +4436,7 @@ function yr(n) {
|
|
|
4436
4436
|
return;
|
|
4437
4437
|
}
|
|
4438
4438
|
}
|
|
4439
|
-
function
|
|
4439
|
+
function kr(n) {
|
|
4440
4440
|
je(new Ge(
|
|
4441
4441
|
"auth",
|
|
4442
4442
|
(e, { options: t }) => {
|
|
@@ -4450,8 +4450,8 @@ function Er(n) {
|
|
|
4450
4450
|
tokenApiHost: "securetoken.googleapis.com",
|
|
4451
4451
|
apiScheme: "https",
|
|
4452
4452
|
sdkClientVersion: Lt(n)
|
|
4453
|
-
}, l = new
|
|
4454
|
-
return
|
|
4453
|
+
}, l = new Zn(i, r, s, a);
|
|
4454
|
+
return si(l, t), l;
|
|
4455
4455
|
},
|
|
4456
4456
|
"PUBLIC"
|
|
4457
4457
|
/* ComponentType.PUBLIC */
|
|
@@ -4470,14 +4470,14 @@ function Er(n) {
|
|
|
4470
4470
|
"auth"
|
|
4471
4471
|
/* _ComponentName.AUTH */
|
|
4472
4472
|
).getImmediate());
|
|
4473
|
-
return ((i) => new
|
|
4473
|
+
return ((i) => new yr(i))(t);
|
|
4474
4474
|
},
|
|
4475
4475
|
"PRIVATE"
|
|
4476
4476
|
/* ComponentType.PRIVATE */
|
|
4477
4477
|
).setInstantiationMode(
|
|
4478
4478
|
"EXPLICIT"
|
|
4479
4479
|
/* InstantiationMode.EXPLICIT */
|
|
4480
|
-
)), ye(ot, at,
|
|
4480
|
+
)), ye(ot, at, Er(n)), ye(ot, at, "esm2017");
|
|
4481
4481
|
}
|
|
4482
4482
|
/**
|
|
4483
4483
|
* @license
|
|
@@ -4495,11 +4495,11 @@ function Er(n) {
|
|
|
4495
4495
|
* See the License for the specific language governing permissions and
|
|
4496
4496
|
* limitations under the License.
|
|
4497
4497
|
*/
|
|
4498
|
-
const
|
|
4498
|
+
const Sr = 5 * 60, br = ft("authIdTokenMaxAge") || Sr;
|
|
4499
4499
|
let ct = null;
|
|
4500
|
-
const
|
|
4500
|
+
const Rr = (n) => async (e) => {
|
|
4501
4501
|
const t = e && await e.getIdTokenResult(), i = t && ((/* @__PURE__ */ new Date()).getTime() - Date.parse(t.issuedAtTime)) / 1e3;
|
|
4502
|
-
if (i && i >
|
|
4502
|
+
if (i && i > br)
|
|
4503
4503
|
return;
|
|
4504
4504
|
const r = t == null ? void 0 : t.token;
|
|
4505
4505
|
ct !== r && (ct = r, await fetch(n, {
|
|
@@ -4509,33 +4509,33 @@ const br = (n) => async (e) => {
|
|
|
4509
4509
|
} : {}
|
|
4510
4510
|
}));
|
|
4511
4511
|
};
|
|
4512
|
-
function
|
|
4512
|
+
function Pr(n = vn()) {
|
|
4513
4513
|
const e = pt(n, "auth");
|
|
4514
4514
|
if (e.isInitialized())
|
|
4515
4515
|
return e.getImmediate();
|
|
4516
|
-
const t =
|
|
4517
|
-
popupRedirectResolver:
|
|
4516
|
+
const t = ri(n, {
|
|
4517
|
+
popupRedirectResolver: wr,
|
|
4518
4518
|
persistence: [
|
|
4519
|
-
|
|
4520
|
-
|
|
4519
|
+
Ni,
|
|
4520
|
+
Ti,
|
|
4521
4521
|
$t
|
|
4522
4522
|
]
|
|
4523
4523
|
}), i = ft("authTokenSyncURL");
|
|
4524
4524
|
if (i && typeof isSecureContext == "boolean" && isSecureContext) {
|
|
4525
4525
|
const s = new URL(i, location.origin);
|
|
4526
4526
|
if (location.origin === s.origin) {
|
|
4527
|
-
const o =
|
|
4528
|
-
|
|
4527
|
+
const o = Rr(s.toString());
|
|
4528
|
+
gi(t, o, () => o(t.currentUser)), mi(t, (c) => o(c));
|
|
4529
4529
|
}
|
|
4530
4530
|
}
|
|
4531
4531
|
const r = _n("auth");
|
|
4532
|
-
return r &&
|
|
4532
|
+
return r && oi(t, `http://${r}`), t;
|
|
4533
4533
|
}
|
|
4534
|
-
function
|
|
4534
|
+
function Ar() {
|
|
4535
4535
|
var n, e;
|
|
4536
4536
|
return (e = (n = document.getElementsByTagName("head")) === null || n === void 0 ? void 0 : n[0]) !== null && e !== void 0 ? e : document;
|
|
4537
4537
|
}
|
|
4538
|
-
|
|
4538
|
+
ei({
|
|
4539
4539
|
loadJS(n) {
|
|
4540
4540
|
return new Promise((e, t) => {
|
|
4541
4541
|
const i = document.createElement("script");
|
|
@@ -4545,41 +4545,41 @@ Zn({
|
|
|
4545
4545
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
4546
4546
|
);
|
|
4547
4547
|
s.customData = r, t(s);
|
|
4548
|
-
}, i.type = "text/javascript", i.charset = "UTF-8",
|
|
4548
|
+
}, i.type = "text/javascript", i.charset = "UTF-8", Ar().appendChild(i);
|
|
4549
4549
|
});
|
|
4550
4550
|
},
|
|
4551
4551
|
gapiScript: "https://apis.google.com/js/api.js",
|
|
4552
4552
|
recaptchaV2Script: "https://www.google.com/recaptcha/api.js",
|
|
4553
4553
|
recaptchaEnterpriseScript: "https://www.google.com/recaptcha/enterprise.js?render="
|
|
4554
4554
|
});
|
|
4555
|
-
|
|
4555
|
+
kr(
|
|
4556
4556
|
"Browser"
|
|
4557
4557
|
/* ClientPlatform.BROWSER */
|
|
4558
4558
|
);
|
|
4559
|
-
var
|
|
4560
|
-
const
|
|
4559
|
+
var Cr = { firebase: { apiKey: "AIzaSyAj8JdCHtP0Vc5vZobCfgoLzWxPIn0WUG4", authDomain: "feedme-dev-4c3ef.firebaseapp.com", databaseURL: "https://feedme-dev-4c3ef.firebaseio.com", projectId: "feedme-dev-4c3ef", storageBucket: "feedme-dev-4c3ef.appspot.com", messagingSenderId: "458797803788", appId: "1:458797803788:web:37f2af2926a84288f0c129", measurementId: "G-J2QG09D2Q7" }, assetBucketUrl: "feedme-dev-4c3ef.appspot.com", clientId: "1a362d621873497b277ea55258cc82594ba148d235257f7bd44ea2acc132d8a4" }, Or = { authUrl: "https://portal-v2-dev.feedmeapi.com/", slackWebhookUrl: "https://hooks.slack.com/services/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", appUrl: "member.feedmedev.cc", crmUrl: "crm.feedmedev.cc", paymentPortalUrl: "https://portal.feedmedev.cc/payment/payout-account", marketingV1Portal: "https://marketing-v1.feedmedev.cc" };
|
|
4560
|
+
const Nr = {
|
|
4561
4561
|
key: 1,
|
|
4562
4562
|
class: "h-full w-full"
|
|
4563
|
-
},
|
|
4563
|
+
}, Lr = ["src"], zr = /* @__PURE__ */ lt({
|
|
4564
4564
|
__name: "App",
|
|
4565
4565
|
setup(n) {
|
|
4566
4566
|
const e = We(), t = on(), i = an(), r = cn(), s = ln(), o = ht(), c = te(o.query.showHeader !== "false"), a = te(!1), { currentBusiness: l } = We(), d = te(!1), h = Ve(() => i.version), _ = Ve(() => {
|
|
4567
4567
|
const p = e.currentCountry.value || "MY", m = Be.getIdToken(), v = l.value._id;
|
|
4568
|
-
return `${
|
|
4568
|
+
return `${Or.marketingV1Portal}/b/${v}/marketing/overview?showHeader=false&country=${p}&token=${m}`;
|
|
4569
4569
|
});
|
|
4570
4570
|
async function F() {
|
|
4571
4571
|
if (En().length) {
|
|
4572
4572
|
console.warn("CONNECT: initFirebase: Firebase already initialized");
|
|
4573
4573
|
return;
|
|
4574
4574
|
}
|
|
4575
|
-
const p = kn(
|
|
4576
|
-
await
|
|
4575
|
+
const p = kn(Cr.firebase), m = await sn.getCustomToken(), v = Pr();
|
|
4576
|
+
await pi(v, m), Sn(p), console.log("initFirebase", p);
|
|
4577
4577
|
}
|
|
4578
4578
|
const M = async () => {
|
|
4579
|
-
d.value = !1, await tn(), console.log("forceRerender"), Be.setBusinessId(l.value._id), await i.readPremium(), !a.value && h.value === "v2" ? e.registerSidebarComponent(
|
|
4579
|
+
d.value = !1, await tn(), console.log("forceRerender"), Be.setBusinessId(l.value._id), await i.readPremium(), !a.value && h.value === "v2" ? e.registerSidebarComponent(Rn) : e.hideSidebarToggle(!0), await F(), a.value = !0, d.value = !0;
|
|
4580
4580
|
};
|
|
4581
4581
|
return Xt(() => {
|
|
4582
|
-
if (t.initProvider(r, s), !c.value) {
|
|
4582
|
+
if (bn.Config.setCountry(e.currentCountry.value || "MY"), t.initProvider(r, s), !c.value) {
|
|
4583
4583
|
const p = document.getElementsByClassName("app-header")[0], m = document.getElementsByClassName("app-sidebar")[0], v = document.getElementsByClassName("app-container")[0], x = document.getElementsByTagName("main")[0];
|
|
4584
4584
|
p == null || p.classList.add("!hidden"), m == null || m.classList.add("!pt-0"), v == null || v.classList.add("!pt-0"), x == null || x.classList.add("!pt-0"), e.hideSidebarToggle(!0);
|
|
4585
4585
|
}
|
|
@@ -4591,7 +4591,7 @@ const Or = {
|
|
|
4591
4591
|
}
|
|
4592
4592
|
), (p, m) => (ne(), He(Qt, null, [
|
|
4593
4593
|
P(d) && P(h) === "v2" ? (ne(), dt(P(rn), { key: 0 })) : $e("", !0),
|
|
4594
|
-
P(d) && P(h) !== "v2" ? (ne(), He("div",
|
|
4594
|
+
P(d) && P(h) !== "v2" ? (ne(), He("div", Nr, [
|
|
4595
4595
|
Zt(dn, {
|
|
4596
4596
|
json: { url: P(_) }
|
|
4597
4597
|
}, null, 8, ["json"]),
|
|
@@ -4601,11 +4601,11 @@ const Or = {
|
|
|
4601
4601
|
height: "100%",
|
|
4602
4602
|
width: "100%",
|
|
4603
4603
|
src: P(_)
|
|
4604
|
-
}, null, 8,
|
|
4604
|
+
}, null, 8, Lr)
|
|
4605
4605
|
])) : $e("", !0)
|
|
4606
4606
|
], 64));
|
|
4607
4607
|
}
|
|
4608
4608
|
});
|
|
4609
4609
|
export {
|
|
4610
|
-
|
|
4610
|
+
zr as default
|
|
4611
4611
|
};
|