@feedmepos/mf-payment 1.5.1 → 1.5.3
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/{OnboardForm-B1CUhfcf.js → OnboardForm-BLxVABrA.js} +1 -1
- package/dist/{OnboardForm-BZzPn2e6.js → OnboardForm-DTQEt2Pz.js} +1 -1
- package/dist/{PayoutAccount-DyukM49K.js → PayoutAccount-8yHMX1mn.js} +1 -1
- package/dist/{PayoutAccount-BWiAJkvR.js → PayoutAccount-DYCgVojx.js} +1 -1
- package/dist/{app-Bx6EdPRX.js → app-fguDtz2A.js} +453 -463
- package/dist/app.js +4 -5
- package/dist/package.json +1 -1
- package/dist/{payout-account-D0SSJ463.js → payout-account-B8iW-4-O.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
const qn = {
|
|
1
|
+
import { createRouter as Nn, createWebHistory as Ln, useRouter as Mn, useRoute as Un } from "vue-router";
|
|
2
|
+
import { computed as Nt, watch as q, defineComponent as Lt, ref as xn, resolveComponent as Mt, openBlock as Ut, createBlock as xt, h as Bn, onMounted as Fn, onBeforeMount as $n, unref as Hn } from "vue";
|
|
3
|
+
import { useCoreStore as Ve, useI18n as Vn } from "@feedmepos/mf-common";
|
|
4
|
+
import { defineStore as jn } from "pinia";
|
|
5
|
+
import { components as Wn } from "@feedmepos/ui-library";
|
|
6
|
+
const zn = {
|
|
8
7
|
components: {
|
|
9
8
|
select: "Select filter entity",
|
|
10
9
|
restaurant: "Restaurant",
|
|
@@ -179,9 +178,9 @@ const qn = {
|
|
|
179
178
|
service2: "SoftPOS Card Payment"
|
|
180
179
|
}
|
|
181
180
|
}
|
|
182
|
-
},
|
|
183
|
-
payment:
|
|
184
|
-
},
|
|
181
|
+
}, Gn = {
|
|
182
|
+
payment: zn
|
|
183
|
+
}, qn = {
|
|
185
184
|
components: {
|
|
186
185
|
select: "选择筛选对象",
|
|
187
186
|
restaurant: "餐厅",
|
|
@@ -356,8 +355,8 @@ const qn = {
|
|
|
356
355
|
service2: "SoftPOS银行卡支付"
|
|
357
356
|
}
|
|
358
357
|
}
|
|
359
|
-
},
|
|
360
|
-
payment:
|
|
358
|
+
}, Kn = {
|
|
359
|
+
payment: qn
|
|
361
360
|
}, K = [
|
|
362
361
|
{
|
|
363
362
|
path: "/admin/restaurants",
|
|
@@ -384,7 +383,7 @@ const qn = {
|
|
|
384
383
|
sidebarDisplay: "Payout Accounts",
|
|
385
384
|
section: "payment-gateway"
|
|
386
385
|
},
|
|
387
|
-
component: () => import("./PayoutAccount-
|
|
386
|
+
component: () => import("./PayoutAccount-DYCgVojx.js")
|
|
388
387
|
},
|
|
389
388
|
{
|
|
390
389
|
path: "/admin/payout-accounts/:accountId",
|
|
@@ -411,7 +410,7 @@ const qn = {
|
|
|
411
410
|
meta: {
|
|
412
411
|
parent: "mf-payment-admin.onboard-submission"
|
|
413
412
|
},
|
|
414
|
-
component: () => import("./OnboardForm-
|
|
413
|
+
component: () => import("./OnboardForm-BLxVABrA.js")
|
|
415
414
|
},
|
|
416
415
|
{
|
|
417
416
|
path: "/admin/terminal/pos",
|
|
@@ -509,7 +508,7 @@ const qn = {
|
|
|
509
508
|
},
|
|
510
509
|
component: () => import("./SettlementTransactions-Ch9jeQU6.js")
|
|
511
510
|
}
|
|
512
|
-
],
|
|
511
|
+
], je = [
|
|
513
512
|
{
|
|
514
513
|
path: "",
|
|
515
514
|
redirect: { name: "mf-payment-payout-account" }
|
|
@@ -517,7 +516,7 @@ const qn = {
|
|
|
517
516
|
{
|
|
518
517
|
path: "/payout-account",
|
|
519
518
|
name: "mf-payment-payout-account",
|
|
520
|
-
component: () => import("./PayoutAccount-
|
|
519
|
+
component: () => import("./PayoutAccount-8yHMX1mn.js"),
|
|
521
520
|
meta: {
|
|
522
521
|
sidebarDisplay: "i18n:payment.routes.payout_account"
|
|
523
522
|
}
|
|
@@ -535,7 +534,7 @@ const qn = {
|
|
|
535
534
|
path: "/onboard-submission/:type/:submission?",
|
|
536
535
|
name: "mf-payment-onboard-submission-form",
|
|
537
536
|
props: !0,
|
|
538
|
-
component: () => import("./OnboardForm-
|
|
537
|
+
component: () => import("./OnboardForm-DTQEt2Pz.js"),
|
|
539
538
|
meta: {
|
|
540
539
|
parent: "mf-payment-onboard-submission"
|
|
541
540
|
}
|
|
@@ -590,9 +589,7 @@ const qn = {
|
|
|
590
589
|
// path: `/financing${route.path}`,
|
|
591
590
|
// })),
|
|
592
591
|
// },
|
|
593
|
-
]
|
|
594
|
-
console.log(Nn);
|
|
595
|
-
const Xn = zn("mf-payment-iframe", () => {
|
|
592
|
+
], Jn = jn("mf-payment-iframe", () => {
|
|
596
593
|
const n = {
|
|
597
594
|
isIframe: !1
|
|
598
595
|
}, e = Nt(() => n);
|
|
@@ -644,7 +641,7 @@ const Bt = function(n) {
|
|
|
644
641
|
i < 128 ? e[t++] = i : i < 2048 ? (e[t++] = i >> 6 | 192, e[t++] = i & 63 | 128) : (i & 64512) === 55296 && r + 1 < n.length && (n.charCodeAt(r + 1) & 64512) === 56320 ? (i = 65536 + ((i & 1023) << 10) + (n.charCodeAt(++r) & 1023), e[t++] = i >> 18 | 240, e[t++] = i >> 12 & 63 | 128, e[t++] = i >> 6 & 63 | 128, e[t++] = i & 63 | 128) : (e[t++] = i >> 12 | 224, e[t++] = i >> 6 & 63 | 128, e[t++] = i & 63 | 128);
|
|
645
642
|
}
|
|
646
643
|
return e;
|
|
647
|
-
},
|
|
644
|
+
}, Yn = function(n) {
|
|
648
645
|
const e = [];
|
|
649
646
|
let t = 0, r = 0;
|
|
650
647
|
for (; t < n.length; ) {
|
|
@@ -748,7 +745,7 @@ const Bt = function(n) {
|
|
|
748
745
|
* @return string representing the decoded value.
|
|
749
746
|
*/
|
|
750
747
|
decodeString(n, e) {
|
|
751
|
-
return this.HAS_NATIVE_SUPPORT && !e ? atob(n) :
|
|
748
|
+
return this.HAS_NATIVE_SUPPORT && !e ? atob(n) : Yn(this.decodeStringToByteArray(n, e));
|
|
752
749
|
},
|
|
753
750
|
/**
|
|
754
751
|
* Base64-decode a string.
|
|
@@ -775,7 +772,7 @@ const Bt = function(n) {
|
|
|
775
772
|
++i;
|
|
776
773
|
const d = i < n.length ? t[n.charAt(i)] : 64;
|
|
777
774
|
if (++i, s == null || c == null || l == null || d == null)
|
|
778
|
-
throw new
|
|
775
|
+
throw new Xn();
|
|
779
776
|
const p = s << 2 | c >> 4;
|
|
780
777
|
if (r.push(p), l !== 64) {
|
|
781
778
|
const m = c << 4 & 240 | l >> 2;
|
|
@@ -800,16 +797,16 @@ const Bt = function(n) {
|
|
|
800
797
|
}
|
|
801
798
|
}
|
|
802
799
|
};
|
|
803
|
-
class
|
|
800
|
+
class Xn extends Error {
|
|
804
801
|
constructor() {
|
|
805
802
|
super(...arguments), this.name = "DecodeBase64StringError";
|
|
806
803
|
}
|
|
807
804
|
}
|
|
808
|
-
const
|
|
805
|
+
const Qn = function(n) {
|
|
809
806
|
const e = Bt(n);
|
|
810
807
|
return Ft.encodeByteArray(e, !0);
|
|
811
808
|
}, $t = function(n) {
|
|
812
|
-
return
|
|
809
|
+
return Qn(n).replace(/\./g, "");
|
|
813
810
|
}, Ht = function(n) {
|
|
814
811
|
try {
|
|
815
812
|
return Ft.decodeString(n, !0);
|
|
@@ -834,7 +831,7 @@ const er = function(n) {
|
|
|
834
831
|
* See the License for the specific language governing permissions and
|
|
835
832
|
* limitations under the License.
|
|
836
833
|
*/
|
|
837
|
-
function
|
|
834
|
+
function Zn() {
|
|
838
835
|
if (typeof self < "u")
|
|
839
836
|
return self;
|
|
840
837
|
if (typeof window < "u")
|
|
@@ -859,13 +856,13 @@ function tr() {
|
|
|
859
856
|
* See the License for the specific language governing permissions and
|
|
860
857
|
* limitations under the License.
|
|
861
858
|
*/
|
|
862
|
-
const
|
|
859
|
+
const er = () => Zn().__FIREBASE_DEFAULTS__, tr = () => {
|
|
863
860
|
if (typeof process > "u" || typeof process.env > "u")
|
|
864
861
|
return;
|
|
865
862
|
const n = process.env.__FIREBASE_DEFAULTS__;
|
|
866
863
|
if (n)
|
|
867
864
|
return JSON.parse(n);
|
|
868
|
-
},
|
|
865
|
+
}, nr = () => {
|
|
869
866
|
if (typeof document > "u")
|
|
870
867
|
return;
|
|
871
868
|
let n;
|
|
@@ -878,12 +875,12 @@ const nr = () => tr().__FIREBASE_DEFAULTS__, rr = () => {
|
|
|
878
875
|
return e && JSON.parse(e);
|
|
879
876
|
}, We = () => {
|
|
880
877
|
try {
|
|
881
|
-
return
|
|
878
|
+
return er() || tr() || nr();
|
|
882
879
|
} catch (n) {
|
|
883
880
|
console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${n}`);
|
|
884
881
|
return;
|
|
885
882
|
}
|
|
886
|
-
},
|
|
883
|
+
}, rr = (n) => {
|
|
887
884
|
var e, t;
|
|
888
885
|
return (t = (e = We()) === null || e === void 0 ? void 0 : e.emulatorHosts) === null || t === void 0 ? void 0 : t[n];
|
|
889
886
|
}, Vt = () => {
|
|
@@ -909,7 +906,7 @@ const nr = () => tr().__FIREBASE_DEFAULTS__, rr = () => {
|
|
|
909
906
|
* See the License for the specific language governing permissions and
|
|
910
907
|
* limitations under the License.
|
|
911
908
|
*/
|
|
912
|
-
class
|
|
909
|
+
class ir {
|
|
913
910
|
constructor() {
|
|
914
911
|
this.reject = () => {
|
|
915
912
|
}, this.resolve = () => {
|
|
@@ -948,33 +945,33 @@ class ar {
|
|
|
948
945
|
function g() {
|
|
949
946
|
return typeof navigator < "u" && typeof navigator.userAgent == "string" ? navigator.userAgent : "";
|
|
950
947
|
}
|
|
951
|
-
function
|
|
948
|
+
function sr() {
|
|
952
949
|
return typeof window < "u" && // @ts-ignore Setting up an broadly applicable index signature for Window
|
|
953
950
|
// just to deal with this case would probably be a bad idea.
|
|
954
951
|
!!(window.cordova || window.phonegap || window.PhoneGap) && /ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(g());
|
|
955
952
|
}
|
|
956
|
-
function
|
|
953
|
+
function ar() {
|
|
957
954
|
return typeof navigator < "u" && navigator.userAgent === "Cloudflare-Workers";
|
|
958
955
|
}
|
|
959
|
-
function
|
|
956
|
+
function or() {
|
|
960
957
|
const n = typeof chrome == "object" ? chrome.runtime : typeof browser == "object" ? browser.runtime : void 0;
|
|
961
958
|
return typeof n == "object" && n.id !== void 0;
|
|
962
959
|
}
|
|
963
|
-
function
|
|
960
|
+
function cr() {
|
|
964
961
|
return typeof navigator == "object" && navigator.product === "ReactNative";
|
|
965
962
|
}
|
|
966
|
-
function
|
|
963
|
+
function lr() {
|
|
967
964
|
const n = g();
|
|
968
965
|
return n.indexOf("MSIE ") >= 0 || n.indexOf("Trident/") >= 0;
|
|
969
966
|
}
|
|
970
|
-
function
|
|
967
|
+
function ur() {
|
|
971
968
|
try {
|
|
972
969
|
return typeof indexedDB == "object";
|
|
973
970
|
} catch {
|
|
974
971
|
return !1;
|
|
975
972
|
}
|
|
976
973
|
}
|
|
977
|
-
function
|
|
974
|
+
function dr() {
|
|
978
975
|
return new Promise((n, e) => {
|
|
979
976
|
try {
|
|
980
977
|
let t = !0;
|
|
@@ -1008,10 +1005,10 @@ function fr() {
|
|
|
1008
1005
|
* See the License for the specific language governing permissions and
|
|
1009
1006
|
* limitations under the License.
|
|
1010
1007
|
*/
|
|
1011
|
-
const
|
|
1008
|
+
const hr = "FirebaseError";
|
|
1012
1009
|
class L extends Error {
|
|
1013
1010
|
constructor(e, t, r) {
|
|
1014
|
-
super(t), this.code = e, this.customData = r, this.name =
|
|
1011
|
+
super(t), this.code = e, this.customData = r, this.name = hr, Object.setPrototypeOf(this, L.prototype), Error.captureStackTrace && Error.captureStackTrace(this, Z.prototype.create);
|
|
1015
1012
|
}
|
|
1016
1013
|
}
|
|
1017
1014
|
class Z {
|
|
@@ -1019,24 +1016,24 @@ class Z {
|
|
|
1019
1016
|
this.service = e, this.serviceName = t, this.errors = r;
|
|
1020
1017
|
}
|
|
1021
1018
|
create(e, ...t) {
|
|
1022
|
-
const r = t[0] || {}, i = `${this.service}/${e}`, s = this.errors[e], a = s ?
|
|
1019
|
+
const r = t[0] || {}, i = `${this.service}/${e}`, s = this.errors[e], a = s ? fr(s, r) : "Error", c = `${this.serviceName}: ${a} (${i}).`;
|
|
1023
1020
|
return new L(i, c, r);
|
|
1024
1021
|
}
|
|
1025
1022
|
}
|
|
1026
|
-
function
|
|
1027
|
-
return n.replace(
|
|
1023
|
+
function fr(n, e) {
|
|
1024
|
+
return n.replace(pr, (t, r) => {
|
|
1028
1025
|
const i = e[r];
|
|
1029
1026
|
return i != null ? String(i) : `<${r}?>`;
|
|
1030
1027
|
});
|
|
1031
1028
|
}
|
|
1032
|
-
const
|
|
1033
|
-
function
|
|
1029
|
+
const pr = /\{\$([^}]+)}/g;
|
|
1030
|
+
function mr(n) {
|
|
1034
1031
|
for (const e in n)
|
|
1035
1032
|
if (Object.prototype.hasOwnProperty.call(n, e))
|
|
1036
1033
|
return !1;
|
|
1037
1034
|
return !0;
|
|
1038
1035
|
}
|
|
1039
|
-
function
|
|
1036
|
+
function ue(n, e) {
|
|
1040
1037
|
if (n === e)
|
|
1041
1038
|
return !0;
|
|
1042
1039
|
const t = Object.keys(n), r = Object.keys(e);
|
|
@@ -1045,7 +1042,7 @@ function de(n, e) {
|
|
|
1045
1042
|
return !1;
|
|
1046
1043
|
const s = n[i], a = e[i];
|
|
1047
1044
|
if (at(s) && at(a)) {
|
|
1048
|
-
if (!
|
|
1045
|
+
if (!ue(s, a))
|
|
1049
1046
|
return !1;
|
|
1050
1047
|
} else if (s !== a)
|
|
1051
1048
|
return !1;
|
|
@@ -1082,11 +1079,11 @@ function ee(n) {
|
|
|
1082
1079
|
}) : e.push(encodeURIComponent(t) + "=" + encodeURIComponent(r));
|
|
1083
1080
|
return e.length ? "&" + e.join("&") : "";
|
|
1084
1081
|
}
|
|
1085
|
-
function
|
|
1086
|
-
const t = new
|
|
1082
|
+
function gr(n, e) {
|
|
1083
|
+
const t = new _r(n, e);
|
|
1087
1084
|
return t.subscribe.bind(t);
|
|
1088
1085
|
}
|
|
1089
|
-
class
|
|
1086
|
+
class _r {
|
|
1090
1087
|
/**
|
|
1091
1088
|
* @param executor Function which can make calls to a single Observer
|
|
1092
1089
|
* as a proxy.
|
|
@@ -1124,7 +1121,7 @@ class vr {
|
|
|
1124
1121
|
let i;
|
|
1125
1122
|
if (e === void 0 && t === void 0 && r === void 0)
|
|
1126
1123
|
throw new Error("Missing Observer.");
|
|
1127
|
-
|
|
1124
|
+
yr(e, [
|
|
1128
1125
|
"next",
|
|
1129
1126
|
"error",
|
|
1130
1127
|
"complete"
|
|
@@ -1132,7 +1129,7 @@ class vr {
|
|
|
1132
1129
|
next: e,
|
|
1133
1130
|
error: t,
|
|
1134
1131
|
complete: r
|
|
1135
|
-
}, i.next === void 0 && (i.next =
|
|
1132
|
+
}, i.next === void 0 && (i.next = Se), i.error === void 0 && (i.error = Se), i.complete === void 0 && (i.complete = Se);
|
|
1136
1133
|
const s = this.unsubscribeOne.bind(this, this.observers.length);
|
|
1137
1134
|
return this.finalized && this.task.then(() => {
|
|
1138
1135
|
try {
|
|
@@ -1170,7 +1167,7 @@ class vr {
|
|
|
1170
1167
|
}));
|
|
1171
1168
|
}
|
|
1172
1169
|
}
|
|
1173
|
-
function
|
|
1170
|
+
function yr(n, e) {
|
|
1174
1171
|
if (typeof n != "object" || n === null)
|
|
1175
1172
|
return !1;
|
|
1176
1173
|
for (const t of e)
|
|
@@ -1178,7 +1175,7 @@ function br(n, e) {
|
|
|
1178
1175
|
return !0;
|
|
1179
1176
|
return !1;
|
|
1180
1177
|
}
|
|
1181
|
-
function
|
|
1178
|
+
function Se() {
|
|
1182
1179
|
}
|
|
1183
1180
|
/**
|
|
1184
1181
|
* @license
|
|
@@ -1255,7 +1252,7 @@ const M = "[DEFAULT]";
|
|
|
1255
1252
|
* See the License for the specific language governing permissions and
|
|
1256
1253
|
* limitations under the License.
|
|
1257
1254
|
*/
|
|
1258
|
-
class
|
|
1255
|
+
class vr {
|
|
1259
1256
|
constructor(e, t) {
|
|
1260
1257
|
this.name = e, this.container = t, this.component = null, this.instances = /* @__PURE__ */ new Map(), this.instancesDeferred = /* @__PURE__ */ new Map(), this.instancesOptions = /* @__PURE__ */ new Map(), this.onInitCallbacks = /* @__PURE__ */ new Map();
|
|
1261
1258
|
}
|
|
@@ -1266,7 +1263,7 @@ class Ir {
|
|
|
1266
1263
|
get(e) {
|
|
1267
1264
|
const t = this.normalizeInstanceIdentifier(e);
|
|
1268
1265
|
if (!this.instancesDeferred.has(t)) {
|
|
1269
|
-
const r = new
|
|
1266
|
+
const r = new ir();
|
|
1270
1267
|
if (this.instancesDeferred.set(t, r), this.isInitialized(t) || this.shouldAutoInitialize())
|
|
1271
1268
|
try {
|
|
1272
1269
|
const i = this.getOrInitializeService({
|
|
@@ -1306,7 +1303,7 @@ class Ir {
|
|
|
1306
1303
|
if (this.component)
|
|
1307
1304
|
throw Error(`Component for ${this.name} has already been provided`);
|
|
1308
1305
|
if (this.component = e, !!this.shouldAutoInitialize()) {
|
|
1309
|
-
if (
|
|
1306
|
+
if (Ir(e))
|
|
1310
1307
|
try {
|
|
1311
1308
|
this.getOrInitializeService({ instanceIdentifier: M });
|
|
1312
1309
|
} catch {
|
|
@@ -1393,7 +1390,7 @@ class Ir {
|
|
|
1393
1390
|
getOrInitializeService({ instanceIdentifier: e, options: t = {} }) {
|
|
1394
1391
|
let r = this.instances.get(e);
|
|
1395
1392
|
if (!r && this.component && (r = this.component.instanceFactory(this.container, {
|
|
1396
|
-
instanceIdentifier:
|
|
1393
|
+
instanceIdentifier: br(e),
|
|
1397
1394
|
options: t
|
|
1398
1395
|
}), this.instances.set(e, r), this.instancesOptions.set(e, t), this.invokeOnInitCallbacks(r, e), this.component.onInstanceCreated))
|
|
1399
1396
|
try {
|
|
@@ -1409,10 +1406,10 @@ class Ir {
|
|
|
1409
1406
|
return !!this.component && this.component.instantiationMode !== "EXPLICIT";
|
|
1410
1407
|
}
|
|
1411
1408
|
}
|
|
1412
|
-
function
|
|
1409
|
+
function br(n) {
|
|
1413
1410
|
return n === M ? void 0 : n;
|
|
1414
1411
|
}
|
|
1415
|
-
function
|
|
1412
|
+
function Ir(n) {
|
|
1416
1413
|
return n.instantiationMode === "EAGER";
|
|
1417
1414
|
}
|
|
1418
1415
|
/**
|
|
@@ -1431,7 +1428,7 @@ function Er(n) {
|
|
|
1431
1428
|
* See the License for the specific language governing permissions and
|
|
1432
1429
|
* limitations under the License.
|
|
1433
1430
|
*/
|
|
1434
|
-
class
|
|
1431
|
+
class wr {
|
|
1435
1432
|
constructor(e) {
|
|
1436
1433
|
this.name = e, this.providers = /* @__PURE__ */ new Map();
|
|
1437
1434
|
}
|
|
@@ -1463,7 +1460,7 @@ class Tr {
|
|
|
1463
1460
|
getProvider(e) {
|
|
1464
1461
|
if (this.providers.has(e))
|
|
1465
1462
|
return this.providers.get(e);
|
|
1466
|
-
const t = new
|
|
1463
|
+
const t = new vr(e, this);
|
|
1467
1464
|
return this.providers.set(e, t), t;
|
|
1468
1465
|
}
|
|
1469
1466
|
getProviders() {
|
|
@@ -1490,23 +1487,23 @@ var f;
|
|
|
1490
1487
|
(function(n) {
|
|
1491
1488
|
n[n.DEBUG = 0] = "DEBUG", n[n.VERBOSE = 1] = "VERBOSE", n[n.INFO = 2] = "INFO", n[n.WARN = 3] = "WARN", n[n.ERROR = 4] = "ERROR", n[n.SILENT = 5] = "SILENT";
|
|
1492
1489
|
})(f || (f = {}));
|
|
1493
|
-
const
|
|
1490
|
+
const Er = {
|
|
1494
1491
|
debug: f.DEBUG,
|
|
1495
1492
|
verbose: f.VERBOSE,
|
|
1496
1493
|
info: f.INFO,
|
|
1497
1494
|
warn: f.WARN,
|
|
1498
1495
|
error: f.ERROR,
|
|
1499
1496
|
silent: f.SILENT
|
|
1500
|
-
},
|
|
1497
|
+
}, Tr = f.INFO, Sr = {
|
|
1501
1498
|
[f.DEBUG]: "log",
|
|
1502
1499
|
[f.VERBOSE]: "log",
|
|
1503
1500
|
[f.INFO]: "info",
|
|
1504
1501
|
[f.WARN]: "warn",
|
|
1505
1502
|
[f.ERROR]: "error"
|
|
1506
|
-
},
|
|
1503
|
+
}, kr = (n, e, ...t) => {
|
|
1507
1504
|
if (e < n.logLevel)
|
|
1508
1505
|
return;
|
|
1509
|
-
const r = (/* @__PURE__ */ new Date()).toISOString(), i =
|
|
1506
|
+
const r = (/* @__PURE__ */ new Date()).toISOString(), i = Sr[e];
|
|
1510
1507
|
if (i)
|
|
1511
1508
|
console[i](`[${r}] ${n.name}:`, ...t);
|
|
1512
1509
|
else
|
|
@@ -1520,7 +1517,7 @@ class Wt {
|
|
|
1520
1517
|
* @param name The name that the logs will be associated with
|
|
1521
1518
|
*/
|
|
1522
1519
|
constructor(e) {
|
|
1523
|
-
this.name = e, this._logLevel =
|
|
1520
|
+
this.name = e, this._logLevel = Tr, this._logHandler = kr, this._userLogHandler = null;
|
|
1524
1521
|
}
|
|
1525
1522
|
get logLevel() {
|
|
1526
1523
|
return this._logLevel;
|
|
@@ -1532,7 +1529,7 @@ class Wt {
|
|
|
1532
1529
|
}
|
|
1533
1530
|
// Workaround for setter/getter having to be the same type.
|
|
1534
1531
|
setLogLevel(e) {
|
|
1535
|
-
this._logLevel = typeof e == "string" ?
|
|
1532
|
+
this._logLevel = typeof e == "string" ? Er[e] : e;
|
|
1536
1533
|
}
|
|
1537
1534
|
get logHandler() {
|
|
1538
1535
|
return this._logHandler;
|
|
@@ -1567,9 +1564,9 @@ class Wt {
|
|
|
1567
1564
|
this._userLogHandler && this._userLogHandler(this, f.ERROR, ...e), this._logHandler(this, f.ERROR, ...e);
|
|
1568
1565
|
}
|
|
1569
1566
|
}
|
|
1570
|
-
const
|
|
1567
|
+
const Ar = (n, e) => e.some((t) => n instanceof t);
|
|
1571
1568
|
let ot, ct;
|
|
1572
|
-
function
|
|
1569
|
+
function Rr() {
|
|
1573
1570
|
return ot || (ot = [
|
|
1574
1571
|
IDBDatabase,
|
|
1575
1572
|
IDBObjectStore,
|
|
@@ -1578,15 +1575,15 @@ function Pr() {
|
|
|
1578
1575
|
IDBTransaction
|
|
1579
1576
|
]);
|
|
1580
1577
|
}
|
|
1581
|
-
function
|
|
1578
|
+
function Cr() {
|
|
1582
1579
|
return ct || (ct = [
|
|
1583
1580
|
IDBCursor.prototype.advance,
|
|
1584
1581
|
IDBCursor.prototype.continue,
|
|
1585
1582
|
IDBCursor.prototype.continuePrimaryKey
|
|
1586
1583
|
]);
|
|
1587
1584
|
}
|
|
1588
|
-
const zt = /* @__PURE__ */ new WeakMap(),
|
|
1589
|
-
function
|
|
1585
|
+
const zt = /* @__PURE__ */ new WeakMap(), Le = /* @__PURE__ */ new WeakMap(), Gt = /* @__PURE__ */ new WeakMap(), ke = /* @__PURE__ */ new WeakMap(), ze = /* @__PURE__ */ new WeakMap();
|
|
1586
|
+
function Pr(n) {
|
|
1590
1587
|
const e = new Promise((t, r) => {
|
|
1591
1588
|
const i = () => {
|
|
1592
1589
|
n.removeEventListener("success", s), n.removeEventListener("error", a);
|
|
@@ -1602,8 +1599,8 @@ function Dr(n) {
|
|
|
1602
1599
|
}).catch(() => {
|
|
1603
1600
|
}), ze.set(e, n), e;
|
|
1604
1601
|
}
|
|
1605
|
-
function
|
|
1606
|
-
if (
|
|
1602
|
+
function Or(n) {
|
|
1603
|
+
if (Le.has(n))
|
|
1607
1604
|
return;
|
|
1608
1605
|
const e = new Promise((t, r) => {
|
|
1609
1606
|
const i = () => {
|
|
@@ -1615,13 +1612,13 @@ function Nr(n) {
|
|
|
1615
1612
|
};
|
|
1616
1613
|
n.addEventListener("complete", s), n.addEventListener("error", a), n.addEventListener("abort", a);
|
|
1617
1614
|
});
|
|
1618
|
-
|
|
1615
|
+
Le.set(n, e);
|
|
1619
1616
|
}
|
|
1620
|
-
let
|
|
1617
|
+
let Me = {
|
|
1621
1618
|
get(n, e, t) {
|
|
1622
1619
|
if (n instanceof IDBTransaction) {
|
|
1623
1620
|
if (e === "done")
|
|
1624
|
-
return
|
|
1621
|
+
return Le.get(n);
|
|
1625
1622
|
if (e === "objectStoreNames")
|
|
1626
1623
|
return n.objectStoreNames || Gt.get(n);
|
|
1627
1624
|
if (e === "store")
|
|
@@ -1636,32 +1633,32 @@ let Ue = {
|
|
|
1636
1633
|
return n instanceof IDBTransaction && (e === "done" || e === "store") ? !0 : e in n;
|
|
1637
1634
|
}
|
|
1638
1635
|
};
|
|
1639
|
-
function
|
|
1640
|
-
|
|
1636
|
+
function Dr(n) {
|
|
1637
|
+
Me = n(Me);
|
|
1641
1638
|
}
|
|
1642
|
-
function
|
|
1639
|
+
function Nr(n) {
|
|
1643
1640
|
return n === IDBDatabase.prototype.transaction && !("objectStoreNames" in IDBTransaction.prototype) ? function(e, ...t) {
|
|
1644
|
-
const r = n.call(
|
|
1641
|
+
const r = n.call(Ae(this), e, ...t);
|
|
1645
1642
|
return Gt.set(r, e.sort ? e.sort() : [e]), O(r);
|
|
1646
|
-
} :
|
|
1647
|
-
return n.apply(
|
|
1643
|
+
} : Cr().includes(n) ? function(...e) {
|
|
1644
|
+
return n.apply(Ae(this), e), O(zt.get(this));
|
|
1648
1645
|
} : function(...e) {
|
|
1649
|
-
return O(n.apply(
|
|
1646
|
+
return O(n.apply(Ae(this), e));
|
|
1650
1647
|
};
|
|
1651
1648
|
}
|
|
1652
|
-
function
|
|
1653
|
-
return typeof n == "function" ?
|
|
1649
|
+
function Lr(n) {
|
|
1650
|
+
return typeof n == "function" ? Nr(n) : (n instanceof IDBTransaction && Or(n), Ar(n, Rr()) ? new Proxy(n, Me) : n);
|
|
1654
1651
|
}
|
|
1655
1652
|
function O(n) {
|
|
1656
1653
|
if (n instanceof IDBRequest)
|
|
1657
|
-
return
|
|
1658
|
-
if (
|
|
1659
|
-
return
|
|
1660
|
-
const e =
|
|
1661
|
-
return e !== n && (
|
|
1662
|
-
}
|
|
1663
|
-
const
|
|
1664
|
-
function
|
|
1654
|
+
return Pr(n);
|
|
1655
|
+
if (ke.has(n))
|
|
1656
|
+
return ke.get(n);
|
|
1657
|
+
const e = Lr(n);
|
|
1658
|
+
return e !== n && (ke.set(n, e), ze.set(e, n)), e;
|
|
1659
|
+
}
|
|
1660
|
+
const Ae = (n) => ze.get(n);
|
|
1661
|
+
function Mr(n, e, { blocked: t, upgrade: r, blocking: i, terminated: s } = {}) {
|
|
1665
1662
|
const a = indexedDB.open(n, e), c = O(a);
|
|
1666
1663
|
return r && a.addEventListener("upgradeneeded", (o) => {
|
|
1667
1664
|
r(O(a.result), o.oldVersion, o.newVersion, O(a.transaction), o);
|
|
@@ -1675,16 +1672,16 @@ function xr(n, e, { blocked: t, upgrade: r, blocking: i, terminated: s } = {}) {
|
|
|
1675
1672
|
}).catch(() => {
|
|
1676
1673
|
}), c;
|
|
1677
1674
|
}
|
|
1678
|
-
const
|
|
1675
|
+
const Ur = ["get", "getKey", "getAll", "getAllKeys", "count"], xr = ["put", "add", "delete", "clear"], Re = /* @__PURE__ */ new Map();
|
|
1679
1676
|
function lt(n, e) {
|
|
1680
1677
|
if (!(n instanceof IDBDatabase && !(e in n) && typeof e == "string"))
|
|
1681
1678
|
return;
|
|
1682
|
-
if (
|
|
1683
|
-
return
|
|
1684
|
-
const t = e.replace(/FromIndex$/, ""), r = e !== t, i =
|
|
1679
|
+
if (Re.get(e))
|
|
1680
|
+
return Re.get(e);
|
|
1681
|
+
const t = e.replace(/FromIndex$/, ""), r = e !== t, i = xr.includes(t);
|
|
1685
1682
|
if (
|
|
1686
1683
|
// Bail if the target doesn't exist on the target. Eg, getAll isn't in Edge.
|
|
1687
|
-
!(t in (r ? IDBIndex : IDBObjectStore).prototype) || !(i ||
|
|
1684
|
+
!(t in (r ? IDBIndex : IDBObjectStore).prototype) || !(i || Ur.includes(t))
|
|
1688
1685
|
)
|
|
1689
1686
|
return;
|
|
1690
1687
|
const s = async function(a, ...c) {
|
|
@@ -1695,9 +1692,9 @@ function lt(n, e) {
|
|
|
1695
1692
|
i && o.done
|
|
1696
1693
|
]))[0];
|
|
1697
1694
|
};
|
|
1698
|
-
return
|
|
1695
|
+
return Re.set(e, s), s;
|
|
1699
1696
|
}
|
|
1700
|
-
|
|
1697
|
+
Dr((n) => ({
|
|
1701
1698
|
...n,
|
|
1702
1699
|
get: (e, t, r) => lt(e, t) || n.get(e, t, r),
|
|
1703
1700
|
has: (e, t) => !!lt(e, t) || n.has(e, t)
|
|
@@ -1718,7 +1715,7 @@ Lr((n) => ({
|
|
|
1718
1715
|
* See the License for the specific language governing permissions and
|
|
1719
1716
|
* limitations under the License.
|
|
1720
1717
|
*/
|
|
1721
|
-
class
|
|
1718
|
+
class Br {
|
|
1722
1719
|
constructor(e) {
|
|
1723
1720
|
this.container = e;
|
|
1724
1721
|
}
|
|
@@ -1726,7 +1723,7 @@ class $r {
|
|
|
1726
1723
|
// auth token refresh, and installations will send this string.
|
|
1727
1724
|
getPlatformInfoString() {
|
|
1728
1725
|
return this.container.getProviders().map((t) => {
|
|
1729
|
-
if (
|
|
1726
|
+
if (Fr(t)) {
|
|
1730
1727
|
const r = t.getImmediate();
|
|
1731
1728
|
return `${r.library}/${r.version}`;
|
|
1732
1729
|
} else
|
|
@@ -1734,11 +1731,11 @@ class $r {
|
|
|
1734
1731
|
}).filter((t) => t).join(" ");
|
|
1735
1732
|
}
|
|
1736
1733
|
}
|
|
1737
|
-
function
|
|
1734
|
+
function Fr(n) {
|
|
1738
1735
|
const e = n.getComponent();
|
|
1739
1736
|
return (e == null ? void 0 : e.type) === "VERSION";
|
|
1740
1737
|
}
|
|
1741
|
-
const
|
|
1738
|
+
const Ue = "@firebase/app", ut = "0.10.13";
|
|
1742
1739
|
/**
|
|
1743
1740
|
* @license
|
|
1744
1741
|
* Copyright 2019 Google LLC
|
|
@@ -1755,7 +1752,7 @@ const xe = "@firebase/app", ut = "0.10.13";
|
|
|
1755
1752
|
* See the License for the specific language governing permissions and
|
|
1756
1753
|
* limitations under the License.
|
|
1757
1754
|
*/
|
|
1758
|
-
const E = new Wt("@firebase/app"),
|
|
1755
|
+
const E = new Wt("@firebase/app"), $r = "@firebase/app-compat", Hr = "@firebase/analytics-compat", Vr = "@firebase/analytics", jr = "@firebase/app-check-compat", Wr = "@firebase/app-check", zr = "@firebase/auth", Gr = "@firebase/auth-compat", qr = "@firebase/database", Kr = "@firebase/data-connect", Jr = "@firebase/database-compat", Yr = "@firebase/functions", Xr = "@firebase/functions-compat", Qr = "@firebase/installations", Zr = "@firebase/installations-compat", ei = "@firebase/messaging", ti = "@firebase/messaging-compat", ni = "@firebase/performance", ri = "@firebase/performance-compat", ii = "@firebase/remote-config", si = "@firebase/remote-config-compat", ai = "@firebase/storage", oi = "@firebase/storage-compat", ci = "@firebase/firestore", li = "@firebase/vertexai-preview", ui = "@firebase/firestore-compat", di = "firebase", hi = "10.14.1";
|
|
1759
1756
|
/**
|
|
1760
1757
|
* @license
|
|
1761
1758
|
* Copyright 2019 Google LLC
|
|
@@ -1772,35 +1769,35 @@ const E = new Wt("@firebase/app"), Vr = "@firebase/app-compat", jr = "@firebase/
|
|
|
1772
1769
|
* See the License for the specific language governing permissions and
|
|
1773
1770
|
* limitations under the License.
|
|
1774
1771
|
*/
|
|
1775
|
-
const
|
|
1776
|
-
[
|
|
1777
|
-
[
|
|
1778
|
-
[
|
|
1779
|
-
[
|
|
1780
|
-
[
|
|
1781
|
-
[
|
|
1782
|
-
[
|
|
1783
|
-
[
|
|
1784
|
-
[
|
|
1785
|
-
[
|
|
1786
|
-
[
|
|
1787
|
-
[
|
|
1788
|
-
[
|
|
1789
|
-
[
|
|
1790
|
-
[
|
|
1791
|
-
[
|
|
1792
|
-
[
|
|
1793
|
-
[
|
|
1794
|
-
[
|
|
1795
|
-
[
|
|
1796
|
-
[
|
|
1797
|
-
[
|
|
1798
|
-
[
|
|
1799
|
-
[
|
|
1800
|
-
[
|
|
1801
|
-
[
|
|
1772
|
+
const xe = "[DEFAULT]", fi = {
|
|
1773
|
+
[Ue]: "fire-core",
|
|
1774
|
+
[$r]: "fire-core-compat",
|
|
1775
|
+
[Vr]: "fire-analytics",
|
|
1776
|
+
[Hr]: "fire-analytics-compat",
|
|
1777
|
+
[Wr]: "fire-app-check",
|
|
1778
|
+
[jr]: "fire-app-check-compat",
|
|
1779
|
+
[zr]: "fire-auth",
|
|
1780
|
+
[Gr]: "fire-auth-compat",
|
|
1781
|
+
[qr]: "fire-rtdb",
|
|
1782
|
+
[Kr]: "fire-data-connect",
|
|
1783
|
+
[Jr]: "fire-rtdb-compat",
|
|
1784
|
+
[Yr]: "fire-fn",
|
|
1785
|
+
[Xr]: "fire-fn-compat",
|
|
1786
|
+
[Qr]: "fire-iid",
|
|
1787
|
+
[Zr]: "fire-iid-compat",
|
|
1788
|
+
[ei]: "fire-fcm",
|
|
1789
|
+
[ti]: "fire-fcm-compat",
|
|
1790
|
+
[ni]: "fire-perf",
|
|
1791
|
+
[ri]: "fire-perf-compat",
|
|
1792
|
+
[ii]: "fire-rc",
|
|
1793
|
+
[si]: "fire-rc-compat",
|
|
1794
|
+
[ai]: "fire-gcs",
|
|
1795
|
+
[oi]: "fire-gcs-compat",
|
|
1796
|
+
[ci]: "fire-fst",
|
|
1797
|
+
[ui]: "fire-fst-compat",
|
|
1798
|
+
[li]: "fire-vertex",
|
|
1802
1799
|
"fire-js": "fire-js",
|
|
1803
|
-
[
|
|
1800
|
+
[di]: "fire-js-all"
|
|
1804
1801
|
};
|
|
1805
1802
|
/**
|
|
1806
1803
|
* @license
|
|
@@ -1818,7 +1815,7 @@ const Be = "[DEFAULT]", mi = {
|
|
|
1818
1815
|
* See the License for the specific language governing permissions and
|
|
1819
1816
|
* limitations under the License.
|
|
1820
1817
|
*/
|
|
1821
|
-
const
|
|
1818
|
+
const de = /* @__PURE__ */ new Map(), pi = /* @__PURE__ */ new Map(), Be = /* @__PURE__ */ new Map();
|
|
1822
1819
|
function dt(n, e) {
|
|
1823
1820
|
try {
|
|
1824
1821
|
n.container.addComponent(e);
|
|
@@ -1828,12 +1825,12 @@ function dt(n, e) {
|
|
|
1828
1825
|
}
|
|
1829
1826
|
function Y(n) {
|
|
1830
1827
|
const e = n.name;
|
|
1831
|
-
if (
|
|
1828
|
+
if (Be.has(e))
|
|
1832
1829
|
return E.debug(`There were multiple attempts to register component ${e}.`), !1;
|
|
1833
|
-
|
|
1834
|
-
for (const t of
|
|
1830
|
+
Be.set(e, n);
|
|
1831
|
+
for (const t of de.values())
|
|
1835
1832
|
dt(t, n);
|
|
1836
|
-
for (const t of
|
|
1833
|
+
for (const t of pi.values())
|
|
1837
1834
|
dt(t, n);
|
|
1838
1835
|
return !0;
|
|
1839
1836
|
}
|
|
@@ -1860,7 +1857,7 @@ function v(n) {
|
|
|
1860
1857
|
* See the License for the specific language governing permissions and
|
|
1861
1858
|
* limitations under the License.
|
|
1862
1859
|
*/
|
|
1863
|
-
const
|
|
1860
|
+
const mi = {
|
|
1864
1861
|
"no-app": "No Firebase App '{$appName}' has been created - call initializeApp() first",
|
|
1865
1862
|
"bad-app-name": "Illegal App name: '{$appName}'",
|
|
1866
1863
|
"duplicate-app": "Firebase App named '{$appName}' already exists with different options or config",
|
|
@@ -1875,7 +1872,7 @@ const _i = {
|
|
|
1875
1872
|
"idb-delete": "Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}.",
|
|
1876
1873
|
"finalization-registry-not-supported": "FirebaseServerApp deleteOnDeref field defined but the JS runtime does not support FinalizationRegistry.",
|
|
1877
1874
|
"invalid-server-app-environment": "FirebaseServerApp is not for use in browser environments."
|
|
1878
|
-
}, D = new Z("app", "Firebase",
|
|
1875
|
+
}, D = new Z("app", "Firebase", mi);
|
|
1879
1876
|
/**
|
|
1880
1877
|
* @license
|
|
1881
1878
|
* Copyright 2019 Google LLC
|
|
@@ -1892,7 +1889,7 @@ const _i = {
|
|
|
1892
1889
|
* See the License for the specific language governing permissions and
|
|
1893
1890
|
* limitations under the License.
|
|
1894
1891
|
*/
|
|
1895
|
-
class
|
|
1892
|
+
class gi {
|
|
1896
1893
|
constructor(e, t, r) {
|
|
1897
1894
|
this._isDeleted = !1, this._options = Object.assign({}, e), this._config = Object.assign({}, t), this._name = t.name, this._automaticDataCollectionEnabled = t.automaticDataCollectionEnabled, this._container = r, this.container.addComponent(new W(
|
|
1898
1895
|
"app",
|
|
@@ -1950,11 +1947,11 @@ class yi {
|
|
|
1950
1947
|
* See the License for the specific language governing permissions and
|
|
1951
1948
|
* limitations under the License.
|
|
1952
1949
|
*/
|
|
1953
|
-
const te =
|
|
1950
|
+
const te = hi;
|
|
1954
1951
|
function Kt(n, e = {}) {
|
|
1955
1952
|
let t = n;
|
|
1956
1953
|
typeof e != "object" && (e = { name: e });
|
|
1957
|
-
const r = Object.assign({ name:
|
|
1954
|
+
const r = Object.assign({ name: xe, automaticDataCollectionEnabled: !1 }, e), i = r.name;
|
|
1958
1955
|
if (typeof i != "string" || !i)
|
|
1959
1956
|
throw D.create("bad-app-name", {
|
|
1960
1957
|
appName: String(i)
|
|
@@ -1964,21 +1961,21 @@ function Kt(n, e = {}) {
|
|
|
1964
1961
|
"no-options"
|
|
1965
1962
|
/* AppError.NO_OPTIONS */
|
|
1966
1963
|
);
|
|
1967
|
-
const s =
|
|
1964
|
+
const s = de.get(i);
|
|
1968
1965
|
if (s) {
|
|
1969
|
-
if (
|
|
1966
|
+
if (ue(t, s.options) && ue(r, s.config))
|
|
1970
1967
|
return s;
|
|
1971
1968
|
throw D.create("duplicate-app", { appName: i });
|
|
1972
1969
|
}
|
|
1973
|
-
const a = new
|
|
1974
|
-
for (const o of
|
|
1970
|
+
const a = new wr(i);
|
|
1971
|
+
for (const o of Be.values())
|
|
1975
1972
|
a.addComponent(o);
|
|
1976
|
-
const c = new
|
|
1977
|
-
return
|
|
1973
|
+
const c = new gi(t, r, a);
|
|
1974
|
+
return de.set(i, c), c;
|
|
1978
1975
|
}
|
|
1979
|
-
function
|
|
1980
|
-
const e =
|
|
1981
|
-
if (!e && n ===
|
|
1976
|
+
function _i(n = xe) {
|
|
1977
|
+
const e = de.get(n);
|
|
1978
|
+
if (!e && n === xe && Vt())
|
|
1982
1979
|
return Kt();
|
|
1983
1980
|
if (!e)
|
|
1984
1981
|
throw D.create("no-app", { appName: n });
|
|
@@ -1986,7 +1983,7 @@ function vi(n = Be) {
|
|
|
1986
1983
|
}
|
|
1987
1984
|
function $(n, e, t) {
|
|
1988
1985
|
var r;
|
|
1989
|
-
let i = (r =
|
|
1986
|
+
let i = (r = fi[n]) !== null && r !== void 0 ? r : n;
|
|
1990
1987
|
t && (i += `-${t}`);
|
|
1991
1988
|
const s = i.match(/\s|\//), a = e.match(/\s|\//);
|
|
1992
1989
|
if (s || a) {
|
|
@@ -2019,10 +2016,10 @@ function $(n, e, t) {
|
|
|
2019
2016
|
* See the License for the specific language governing permissions and
|
|
2020
2017
|
* limitations under the License.
|
|
2021
2018
|
*/
|
|
2022
|
-
const
|
|
2023
|
-
let
|
|
2019
|
+
const yi = "firebase-heartbeat-database", vi = 1, X = "firebase-heartbeat-store";
|
|
2020
|
+
let Ce = null;
|
|
2024
2021
|
function Jt() {
|
|
2025
|
-
return
|
|
2022
|
+
return Ce || (Ce = Mr(yi, vi, {
|
|
2026
2023
|
upgrade: (n, e) => {
|
|
2027
2024
|
switch (e) {
|
|
2028
2025
|
case 0:
|
|
@@ -2037,9 +2034,9 @@ function Jt() {
|
|
|
2037
2034
|
throw D.create("idb-open", {
|
|
2038
2035
|
originalErrorMessage: n.message
|
|
2039
2036
|
});
|
|
2040
|
-
})),
|
|
2037
|
+
})), Ce;
|
|
2041
2038
|
}
|
|
2042
|
-
async function
|
|
2039
|
+
async function bi(n) {
|
|
2043
2040
|
try {
|
|
2044
2041
|
const t = (await Jt()).transaction(X), r = await t.objectStore(X).get(Yt(n));
|
|
2045
2042
|
return await t.done, r;
|
|
@@ -2088,12 +2085,12 @@ function Yt(n) {
|
|
|
2088
2085
|
* See the License for the specific language governing permissions and
|
|
2089
2086
|
* limitations under the License.
|
|
2090
2087
|
*/
|
|
2091
|
-
const
|
|
2092
|
-
class
|
|
2088
|
+
const Ii = 1024, wi = 30 * 24 * 60 * 60 * 1e3;
|
|
2089
|
+
class Ei {
|
|
2093
2090
|
constructor(e) {
|
|
2094
2091
|
this.container = e, this._heartbeatsCache = null;
|
|
2095
2092
|
const t = this.container.getProvider("app").getImmediate();
|
|
2096
|
-
this._storage = new
|
|
2093
|
+
this._storage = new Si(t), this._heartbeatsCachePromise = this._storage.read().then((r) => (this._heartbeatsCache = r, r));
|
|
2097
2094
|
}
|
|
2098
2095
|
/**
|
|
2099
2096
|
* Called to report a heartbeat. The function will generate
|
|
@@ -2108,7 +2105,7 @@ class Si {
|
|
|
2108
2105
|
const i = this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(), s = ft();
|
|
2109
2106
|
return ((e = this._heartbeatsCache) === null || e === void 0 ? void 0 : e.heartbeats) == null && (this._heartbeatsCache = await this._heartbeatsCachePromise, ((t = this._heartbeatsCache) === null || t === void 0 ? void 0 : t.heartbeats) == null) || this._heartbeatsCache.lastSentHeartbeatDate === s || this._heartbeatsCache.heartbeats.some((a) => a.date === s) ? void 0 : (this._heartbeatsCache.heartbeats.push({ date: s, agent: i }), this._heartbeatsCache.heartbeats = this._heartbeatsCache.heartbeats.filter((a) => {
|
|
2110
2107
|
const c = new Date(a.date).valueOf();
|
|
2111
|
-
return Date.now() - c <=
|
|
2108
|
+
return Date.now() - c <= wi;
|
|
2112
2109
|
}), this._storage.overwrite(this._heartbeatsCache));
|
|
2113
2110
|
} catch (r) {
|
|
2114
2111
|
E.warn(r);
|
|
@@ -2126,7 +2123,7 @@ class Si {
|
|
|
2126
2123
|
try {
|
|
2127
2124
|
if (this._heartbeatsCache === null && await this._heartbeatsCachePromise, ((e = this._heartbeatsCache) === null || e === void 0 ? void 0 : e.heartbeats) == null || this._heartbeatsCache.heartbeats.length === 0)
|
|
2128
2125
|
return "";
|
|
2129
|
-
const t = ft(), { heartbeatsToSend: r, unsentEntries: i } =
|
|
2126
|
+
const t = ft(), { heartbeatsToSend: r, unsentEntries: i } = Ti(this._heartbeatsCache.heartbeats), s = $t(JSON.stringify({ version: 2, heartbeats: r }));
|
|
2130
2127
|
return this._heartbeatsCache.lastSentHeartbeatDate = t, i.length > 0 ? (this._heartbeatsCache.heartbeats = i, await this._storage.overwrite(this._heartbeatsCache)) : (this._heartbeatsCache.heartbeats = [], this._storage.overwrite(this._heartbeatsCache)), s;
|
|
2131
2128
|
} catch (t) {
|
|
2132
2129
|
return E.warn(t), "";
|
|
@@ -2136,7 +2133,7 @@ class Si {
|
|
|
2136
2133
|
function ft() {
|
|
2137
2134
|
return (/* @__PURE__ */ new Date()).toISOString().substring(0, 10);
|
|
2138
2135
|
}
|
|
2139
|
-
function
|
|
2136
|
+
function Ti(n, e = Ii) {
|
|
2140
2137
|
const t = [];
|
|
2141
2138
|
let r = n.slice();
|
|
2142
2139
|
for (const i of n) {
|
|
@@ -2160,19 +2157,19 @@ function ki(n, e = Ei) {
|
|
|
2160
2157
|
unsentEntries: r
|
|
2161
2158
|
};
|
|
2162
2159
|
}
|
|
2163
|
-
class
|
|
2160
|
+
class Si {
|
|
2164
2161
|
constructor(e) {
|
|
2165
2162
|
this.app = e, this._canUseIndexedDBPromise = this.runIndexedDBEnvironmentCheck();
|
|
2166
2163
|
}
|
|
2167
2164
|
async runIndexedDBEnvironmentCheck() {
|
|
2168
|
-
return
|
|
2165
|
+
return ur() ? dr().then(() => !0).catch(() => !1) : !1;
|
|
2169
2166
|
}
|
|
2170
2167
|
/**
|
|
2171
2168
|
* Read all heartbeats.
|
|
2172
2169
|
*/
|
|
2173
2170
|
async read() {
|
|
2174
2171
|
if (await this._canUseIndexedDBPromise) {
|
|
2175
|
-
const t = await
|
|
2172
|
+
const t = await bi(this.app);
|
|
2176
2173
|
return t != null && t.heartbeats ? t : { heartbeats: [] };
|
|
2177
2174
|
} else
|
|
2178
2175
|
return { heartbeats: [] };
|
|
@@ -2227,21 +2224,21 @@ function pt(n) {
|
|
|
2227
2224
|
* See the License for the specific language governing permissions and
|
|
2228
2225
|
* limitations under the License.
|
|
2229
2226
|
*/
|
|
2230
|
-
function
|
|
2227
|
+
function ki(n) {
|
|
2231
2228
|
Y(new W(
|
|
2232
2229
|
"platform-logger",
|
|
2233
|
-
(e) => new
|
|
2230
|
+
(e) => new Br(e),
|
|
2234
2231
|
"PRIVATE"
|
|
2235
2232
|
/* ComponentType.PRIVATE */
|
|
2236
2233
|
)), Y(new W(
|
|
2237
2234
|
"heartbeat",
|
|
2238
|
-
(e) => new
|
|
2235
|
+
(e) => new Ei(e),
|
|
2239
2236
|
"PRIVATE"
|
|
2240
2237
|
/* ComponentType.PRIVATE */
|
|
2241
|
-
)), $(
|
|
2238
|
+
)), $(Ue, ut, n), $(Ue, ut, "esm2017"), $("fire-js", "");
|
|
2242
2239
|
}
|
|
2243
|
-
|
|
2244
|
-
var
|
|
2240
|
+
ki("");
|
|
2241
|
+
var Ai = "firebase", Ri = "10.14.1";
|
|
2245
2242
|
/**
|
|
2246
2243
|
* @license
|
|
2247
2244
|
* Copyright 2020 Google LLC
|
|
@@ -2258,7 +2255,7 @@ var Ci = "firebase", Pi = "10.14.1";
|
|
|
2258
2255
|
* See the License for the specific language governing permissions and
|
|
2259
2256
|
* limitations under the License.
|
|
2260
2257
|
*/
|
|
2261
|
-
$(
|
|
2258
|
+
$(Ai, Ri, "app");
|
|
2262
2259
|
var mt = function() {
|
|
2263
2260
|
return mt = Object.assign || function(e) {
|
|
2264
2261
|
for (var t, r = 1, i = arguments.length; r < i; r++) {
|
|
@@ -2281,7 +2278,7 @@ function Xt() {
|
|
|
2281
2278
|
"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."
|
|
2282
2279
|
};
|
|
2283
2280
|
}
|
|
2284
|
-
const
|
|
2281
|
+
const Ci = Xt, Qt = new Z("auth", "Firebase", Xt());
|
|
2285
2282
|
/**
|
|
2286
2283
|
* @license
|
|
2287
2284
|
* Copyright 2020 Google LLC
|
|
@@ -2298,12 +2295,12 @@ const Oi = Xt, Qt = new Z("auth", "Firebase", Xt());
|
|
|
2298
2295
|
* See the License for the specific language governing permissions and
|
|
2299
2296
|
* limitations under the License.
|
|
2300
2297
|
*/
|
|
2301
|
-
const
|
|
2302
|
-
function
|
|
2303
|
-
|
|
2298
|
+
const he = new Wt("@firebase/auth");
|
|
2299
|
+
function Pi(n, ...e) {
|
|
2300
|
+
he.logLevel <= f.WARN && he.warn(`Auth (${te}): ${n}`, ...e);
|
|
2304
2301
|
}
|
|
2305
2302
|
function ae(n, ...e) {
|
|
2306
|
-
|
|
2303
|
+
he.logLevel <= f.ERROR && he.error(`Auth (${te}): ${n}`, ...e);
|
|
2307
2304
|
}
|
|
2308
2305
|
/**
|
|
2309
2306
|
* @license
|
|
@@ -2328,7 +2325,7 @@ function _(n, ...e) {
|
|
|
2328
2325
|
return qe(n, ...e);
|
|
2329
2326
|
}
|
|
2330
2327
|
function Zt(n, e, t) {
|
|
2331
|
-
const r = Object.assign(Object.assign({},
|
|
2328
|
+
const r = Object.assign(Object.assign({}, Ci()), { [e]: t });
|
|
2332
2329
|
return new Z("auth", "Firebase", r).create(e, {
|
|
2333
2330
|
appName: n.name
|
|
2334
2331
|
});
|
|
@@ -2370,11 +2367,11 @@ function S(n, e) {
|
|
|
2370
2367
|
* See the License for the specific language governing permissions and
|
|
2371
2368
|
* limitations under the License.
|
|
2372
2369
|
*/
|
|
2373
|
-
function
|
|
2370
|
+
function Fe() {
|
|
2374
2371
|
var n;
|
|
2375
2372
|
return typeof self < "u" && ((n = self.location) === null || n === void 0 ? void 0 : n.href) || "";
|
|
2376
2373
|
}
|
|
2377
|
-
function
|
|
2374
|
+
function Oi() {
|
|
2378
2375
|
return gt() === "http:" || gt() === "https:";
|
|
2379
2376
|
}
|
|
2380
2377
|
function gt() {
|
|
@@ -2397,15 +2394,15 @@ function gt() {
|
|
|
2397
2394
|
* See the License for the specific language governing permissions and
|
|
2398
2395
|
* limitations under the License.
|
|
2399
2396
|
*/
|
|
2400
|
-
function
|
|
2397
|
+
function Di() {
|
|
2401
2398
|
return typeof navigator < "u" && navigator && "onLine" in navigator && typeof navigator.onLine == "boolean" && // Apply only for traditional web apps and Chrome extensions.
|
|
2402
2399
|
// This is especially true for Cordova apps which have unreliable
|
|
2403
2400
|
// navigator.onLine behavior unless cordova-plugin-network-information is
|
|
2404
2401
|
// installed which overwrites the native navigator.onLine value and
|
|
2405
2402
|
// defines navigator.connection.
|
|
2406
|
-
(
|
|
2403
|
+
(Oi() || or() || "connection" in navigator) ? navigator.onLine : !0;
|
|
2407
2404
|
}
|
|
2408
|
-
function
|
|
2405
|
+
function Ni() {
|
|
2409
2406
|
if (typeof navigator > "u")
|
|
2410
2407
|
return null;
|
|
2411
2408
|
const n = navigator;
|
|
@@ -2435,10 +2432,10 @@ function Mi() {
|
|
|
2435
2432
|
*/
|
|
2436
2433
|
class ne {
|
|
2437
2434
|
constructor(e, t) {
|
|
2438
|
-
this.shortDelay = e, this.longDelay = t, S(t > e, "Short delay should be less than long delay!"), this.isMobile =
|
|
2435
|
+
this.shortDelay = e, this.longDelay = t, S(t > e, "Short delay should be less than long delay!"), this.isMobile = sr() || cr();
|
|
2439
2436
|
}
|
|
2440
2437
|
get() {
|
|
2441
|
-
return
|
|
2438
|
+
return Di() ? this.isMobile ? this.longDelay : this.shortDelay : Math.min(5e3, this.shortDelay);
|
|
2442
2439
|
}
|
|
2443
2440
|
}
|
|
2444
2441
|
/**
|
|
@@ -2532,7 +2529,7 @@ class en {
|
|
|
2532
2529
|
* See the License for the specific language governing permissions and
|
|
2533
2530
|
* limitations under the License.
|
|
2534
2531
|
*/
|
|
2535
|
-
const
|
|
2532
|
+
const Li = {
|
|
2536
2533
|
// Custom token errors.
|
|
2537
2534
|
CREDENTIAL_MISMATCH: "custom-token-mismatch",
|
|
2538
2535
|
// This can only happen if the SDK sends a bad request.
|
|
@@ -2623,8 +2620,8 @@ const Ui = {
|
|
|
2623
2620
|
* See the License for the specific language governing permissions and
|
|
2624
2621
|
* limitations under the License.
|
|
2625
2622
|
*/
|
|
2626
|
-
const
|
|
2627
|
-
function
|
|
2623
|
+
const Mi = new ne(3e4, 6e4);
|
|
2624
|
+
function _e(n, e) {
|
|
2628
2625
|
return n.tenantId && !e.tenantId ? Object.assign(Object.assign({}, e), { tenantId: n.tenantId }) : e;
|
|
2629
2626
|
}
|
|
2630
2627
|
async function G(n, e, t, r, i = {}) {
|
|
@@ -2645,14 +2642,14 @@ async function G(n, e, t, r, i = {}) {
|
|
|
2645
2642
|
method: e,
|
|
2646
2643
|
headers: o
|
|
2647
2644
|
}, s);
|
|
2648
|
-
return
|
|
2645
|
+
return ar() || (l.referrerPolicy = "no-referrer"), en.fetch()(rn(n, n.config.apiHost, t, c), l);
|
|
2649
2646
|
});
|
|
2650
2647
|
}
|
|
2651
2648
|
async function tn(n, e, t) {
|
|
2652
2649
|
n._canInitEmulator = !1;
|
|
2653
|
-
const r = Object.assign(Object.assign({},
|
|
2650
|
+
const r = Object.assign(Object.assign({}, Li), e);
|
|
2654
2651
|
try {
|
|
2655
|
-
const i = new
|
|
2652
|
+
const i = new Ui(n), s = await Promise.race([
|
|
2656
2653
|
t(),
|
|
2657
2654
|
i.promise
|
|
2658
2655
|
]);
|
|
@@ -2691,14 +2688,14 @@ function rn(n, e, t, r) {
|
|
|
2691
2688
|
const i = `${e}${t}?${r}`;
|
|
2692
2689
|
return n.config.emulator ? Ke(n.config, i) : `${n.config.apiScheme}://${i}`;
|
|
2693
2690
|
}
|
|
2694
|
-
class
|
|
2691
|
+
class Ui {
|
|
2695
2692
|
constructor(e) {
|
|
2696
2693
|
this.auth = e, this.timer = null, this.promise = new Promise((t, r) => {
|
|
2697
2694
|
this.timer = setTimeout(() => r(_(
|
|
2698
2695
|
this.auth,
|
|
2699
2696
|
"network-request-failed"
|
|
2700
2697
|
/* AuthErrorCode.NETWORK_REQUEST_FAILED */
|
|
2701
|
-
)),
|
|
2698
|
+
)), Mi.get());
|
|
2702
2699
|
});
|
|
2703
2700
|
}
|
|
2704
2701
|
clearNetworkTimeout() {
|
|
@@ -2729,7 +2726,7 @@ function se(n, e, t) {
|
|
|
2729
2726
|
* See the License for the specific language governing permissions and
|
|
2730
2727
|
* limitations under the License.
|
|
2731
2728
|
*/
|
|
2732
|
-
async function
|
|
2729
|
+
async function xi(n, e) {
|
|
2733
2730
|
return G(n, "POST", "/v1/accounts:delete", e);
|
|
2734
2731
|
}
|
|
2735
2732
|
async function sn(n, e) {
|
|
@@ -2760,7 +2757,7 @@ function J(n) {
|
|
|
2760
2757
|
} catch {
|
|
2761
2758
|
}
|
|
2762
2759
|
}
|
|
2763
|
-
async function
|
|
2760
|
+
async function Bi(n, e = !1) {
|
|
2764
2761
|
const t = z(n), r = await t.getIdToken(e), i = Je(r);
|
|
2765
2762
|
h(
|
|
2766
2763
|
i && i.exp && i.auth_time && i.iat,
|
|
@@ -2772,14 +2769,14 @@ async function $i(n, e = !1) {
|
|
|
2772
2769
|
return {
|
|
2773
2770
|
claims: i,
|
|
2774
2771
|
token: r,
|
|
2775
|
-
authTime: J(
|
|
2776
|
-
issuedAtTime: J(
|
|
2777
|
-
expirationTime: J(
|
|
2772
|
+
authTime: J(Pe(i.auth_time)),
|
|
2773
|
+
issuedAtTime: J(Pe(i.iat)),
|
|
2774
|
+
expirationTime: J(Pe(i.exp)),
|
|
2778
2775
|
signInProvider: a || null,
|
|
2779
2776
|
signInSecondFactor: (s == null ? void 0 : s.sign_in_second_factor) || null
|
|
2780
2777
|
};
|
|
2781
2778
|
}
|
|
2782
|
-
function
|
|
2779
|
+
function Pe(n) {
|
|
2783
2780
|
return Number(n) * 1e3;
|
|
2784
2781
|
}
|
|
2785
2782
|
function Je(n) {
|
|
@@ -2831,10 +2828,10 @@ async function Q(n, e, t = !1) {
|
|
|
2831
2828
|
try {
|
|
2832
2829
|
return await e;
|
|
2833
2830
|
} catch (r) {
|
|
2834
|
-
throw r instanceof L &&
|
|
2831
|
+
throw r instanceof L && Fi(r) && n.auth.currentUser === n && await n.auth.signOut(), r;
|
|
2835
2832
|
}
|
|
2836
2833
|
}
|
|
2837
|
-
function
|
|
2834
|
+
function Fi({ code: n }) {
|
|
2838
2835
|
return n === "auth/user-disabled" || n === "auth/user-token-expired";
|
|
2839
2836
|
}
|
|
2840
2837
|
/**
|
|
@@ -2853,7 +2850,7 @@ function Hi({ code: n }) {
|
|
|
2853
2850
|
* See the License for the specific language governing permissions and
|
|
2854
2851
|
* limitations under the License.
|
|
2855
2852
|
*/
|
|
2856
|
-
class
|
|
2853
|
+
class $i {
|
|
2857
2854
|
constructor(e) {
|
|
2858
2855
|
this.user = e, this.isRunning = !1, this.timerId = null, this.errorBackoff = 3e4;
|
|
2859
2856
|
}
|
|
@@ -2915,7 +2912,7 @@ class Vi {
|
|
|
2915
2912
|
* See the License for the specific language governing permissions and
|
|
2916
2913
|
* limitations under the License.
|
|
2917
2914
|
*/
|
|
2918
|
-
class
|
|
2915
|
+
class $e {
|
|
2919
2916
|
constructor(e, t) {
|
|
2920
2917
|
this.createdAt = e, this.lastLoginAt = t, this._initializeTime();
|
|
2921
2918
|
}
|
|
@@ -2948,7 +2945,7 @@ class He {
|
|
|
2948
2945
|
* See the License for the specific language governing permissions and
|
|
2949
2946
|
* limitations under the License.
|
|
2950
2947
|
*/
|
|
2951
|
-
async function
|
|
2948
|
+
async function fe(n) {
|
|
2952
2949
|
var e;
|
|
2953
2950
|
const t = n.auth, r = await n.getIdToken(), i = await Q(n, sn(t, { idToken: r }));
|
|
2954
2951
|
h(
|
|
@@ -2959,7 +2956,7 @@ async function pe(n) {
|
|
|
2959
2956
|
);
|
|
2960
2957
|
const s = i.users[0];
|
|
2961
2958
|
n._notifyReloadListener(s);
|
|
2962
|
-
const a = !((e = s.providerUserInfo) === null || e === void 0) && e.length ? an(s.providerUserInfo) : [], c =
|
|
2959
|
+
const a = !((e = s.providerUserInfo) === null || e === void 0) && e.length ? an(s.providerUserInfo) : [], c = Vi(n.providerData, a), o = n.isAnonymous, l = !(n.email && s.passwordHash) && !(c != null && c.length), u = o ? l : !1, d = {
|
|
2963
2960
|
uid: s.localId,
|
|
2964
2961
|
displayName: s.displayName || null,
|
|
2965
2962
|
photoURL: s.photoUrl || null,
|
|
@@ -2968,16 +2965,16 @@ async function pe(n) {
|
|
|
2968
2965
|
phoneNumber: s.phoneNumber || null,
|
|
2969
2966
|
tenantId: s.tenantId || null,
|
|
2970
2967
|
providerData: c,
|
|
2971
|
-
metadata: new
|
|
2968
|
+
metadata: new $e(s.createdAt, s.lastLoginAt),
|
|
2972
2969
|
isAnonymous: u
|
|
2973
2970
|
};
|
|
2974
2971
|
Object.assign(n, d);
|
|
2975
2972
|
}
|
|
2976
|
-
async function
|
|
2973
|
+
async function Hi(n) {
|
|
2977
2974
|
const e = z(n);
|
|
2978
|
-
await
|
|
2975
|
+
await fe(e), await e.auth._persistUserIfCurrent(e), e.auth._notifyListenersIfCurrent(e);
|
|
2979
2976
|
}
|
|
2980
|
-
function
|
|
2977
|
+
function Vi(n, e) {
|
|
2981
2978
|
return [...n.filter((r) => !e.some((i) => i.providerId === r.providerId)), ...e];
|
|
2982
2979
|
}
|
|
2983
2980
|
function an(n) {
|
|
@@ -3009,7 +3006,7 @@ function an(n) {
|
|
|
3009
3006
|
* See the License for the specific language governing permissions and
|
|
3010
3007
|
* limitations under the License.
|
|
3011
3008
|
*/
|
|
3012
|
-
async function
|
|
3009
|
+
async function ji(n, e) {
|
|
3013
3010
|
const t = await tn(n, {}, async () => {
|
|
3014
3011
|
const r = ee({
|
|
3015
3012
|
grant_type: "refresh_token",
|
|
@@ -3030,8 +3027,8 @@ async function zi(n, e) {
|
|
|
3030
3027
|
refreshToken: t.refresh_token
|
|
3031
3028
|
};
|
|
3032
3029
|
}
|
|
3033
|
-
async function
|
|
3034
|
-
return G(n, "POST", "/v2/accounts:revokeToken",
|
|
3030
|
+
async function Wi(n, e) {
|
|
3031
|
+
return G(n, "POST", "/v2/accounts:revokeToken", _e(n, e));
|
|
3035
3032
|
}
|
|
3036
3033
|
/**
|
|
3037
3034
|
* @license
|
|
@@ -3094,7 +3091,7 @@ class H {
|
|
|
3094
3091
|
this.refreshToken = null;
|
|
3095
3092
|
}
|
|
3096
3093
|
async refresh(e, t) {
|
|
3097
|
-
const { accessToken: r, refreshToken: i, expiresIn: s } = await
|
|
3094
|
+
const { accessToken: r, refreshToken: i, expiresIn: s } = await ji(e, t);
|
|
3098
3095
|
this.updateTokensAndExpiration(r, i, Number(s));
|
|
3099
3096
|
}
|
|
3100
3097
|
updateTokensAndExpiration(e, t, r) {
|
|
@@ -3149,7 +3146,7 @@ function k(n, e) {
|
|
|
3149
3146
|
class I {
|
|
3150
3147
|
constructor(e) {
|
|
3151
3148
|
var { uid: t, auth: r, stsTokenManager: i } = e, s = Ge(e, ["uid", "auth", "stsTokenManager"]);
|
|
3152
|
-
this.providerId = "firebase", this.proactiveRefresh = new
|
|
3149
|
+
this.providerId = "firebase", this.proactiveRefresh = new $i(this), this.reloadUserInfo = null, this.reloadListener = null, this.uid = t, this.auth = r, this.stsTokenManager = i, this.accessToken = i.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 $e(s.createdAt || void 0, s.lastLoginAt || void 0);
|
|
3153
3150
|
}
|
|
3154
3151
|
async getIdToken(e) {
|
|
3155
3152
|
const t = await Q(this, this.stsTokenManager.getToken(this.auth, e));
|
|
@@ -3161,10 +3158,10 @@ class I {
|
|
|
3161
3158
|
), this.accessToken !== t && (this.accessToken = t, await this.auth._persistUserIfCurrent(this), this.auth._notifyListenersIfCurrent(this)), t;
|
|
3162
3159
|
}
|
|
3163
3160
|
getIdTokenResult(e) {
|
|
3164
|
-
return
|
|
3161
|
+
return Bi(this, e);
|
|
3165
3162
|
}
|
|
3166
3163
|
reload() {
|
|
3167
|
-
return
|
|
3164
|
+
return Hi(this);
|
|
3168
3165
|
}
|
|
3169
3166
|
_assign(e) {
|
|
3170
3167
|
this !== e && (h(
|
|
@@ -3197,13 +3194,13 @@ class I {
|
|
|
3197
3194
|
}
|
|
3198
3195
|
async _updateTokensIfNecessary(e, t = !1) {
|
|
3199
3196
|
let r = !1;
|
|
3200
|
-
e.idToken && e.idToken !== this.stsTokenManager.accessToken && (this.stsTokenManager.updateFromServerResponse(e), r = !0), t && await
|
|
3197
|
+
e.idToken && e.idToken !== this.stsTokenManager.accessToken && (this.stsTokenManager.updateFromServerResponse(e), r = !0), t && await fe(this), await this.auth._persistUserIfCurrent(this), r && this.auth._notifyListenersIfCurrent(this);
|
|
3201
3198
|
}
|
|
3202
3199
|
async delete() {
|
|
3203
3200
|
if (v(this.auth.app))
|
|
3204
3201
|
return Promise.reject(N(this.auth));
|
|
3205
3202
|
const e = await this.getIdToken();
|
|
3206
|
-
return await Q(this,
|
|
3203
|
+
return await Q(this, xi(this.auth, { idToken: e })), this.stsTokenManager.clearRefreshToken(), this.auth.signOut();
|
|
3207
3204
|
}
|
|
3208
3205
|
toJSON() {
|
|
3209
3206
|
return Object.assign(Object.assign({
|
|
@@ -3231,16 +3228,16 @@ class I {
|
|
|
3231
3228
|
}
|
|
3232
3229
|
static _fromJSON(e, t) {
|
|
3233
3230
|
var r, i, s, a, c, o, l, u;
|
|
3234
|
-
const d = (r = t.displayName) !== null && r !== void 0 ? r : void 0, p = (i = t.email) !== null && i !== void 0 ? i : void 0, m = (s = t.phoneNumber) !== null && s !== void 0 ? s : void 0, B = (a = t.photoURL) !== null && a !== void 0 ? a : void 0, et = (c = t.tenantId) !== null && c !== void 0 ? c : void 0,
|
|
3231
|
+
const d = (r = t.displayName) !== null && r !== void 0 ? r : void 0, p = (i = t.email) !== null && i !== void 0 ? i : void 0, m = (s = t.phoneNumber) !== null && s !== void 0 ? s : void 0, B = (a = t.photoURL) !== null && a !== void 0 ? a : void 0, et = (c = t.tenantId) !== null && c !== void 0 ? c : void 0, Ie = (o = t._redirectEventId) !== null && o !== void 0 ? o : void 0, tt = (l = t.createdAt) !== null && l !== void 0 ? l : void 0, nt = (u = t.lastLoginAt) !== null && u !== void 0 ? u : void 0, { uid: we, emailVerified: rt, isAnonymous: it, providerData: Ee, stsTokenManager: st } = t;
|
|
3235
3232
|
h(
|
|
3236
|
-
|
|
3233
|
+
we && st,
|
|
3237
3234
|
e,
|
|
3238
3235
|
"internal-error"
|
|
3239
3236
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
3240
3237
|
);
|
|
3241
3238
|
const On = H.fromJSON(this.name, st);
|
|
3242
3239
|
h(
|
|
3243
|
-
typeof
|
|
3240
|
+
typeof we == "string",
|
|
3244
3241
|
e,
|
|
3245
3242
|
"internal-error"
|
|
3246
3243
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
@@ -3254,9 +3251,9 @@ class I {
|
|
|
3254
3251
|
e,
|
|
3255
3252
|
"internal-error"
|
|
3256
3253
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
3257
|
-
), k(m, e.name), k(B, e.name), k(et, e.name), k(
|
|
3258
|
-
const
|
|
3259
|
-
uid:
|
|
3254
|
+
), k(m, e.name), k(B, e.name), k(et, e.name), k(Ie, e.name), k(tt, e.name), k(nt, e.name);
|
|
3255
|
+
const Te = new I({
|
|
3256
|
+
uid: we,
|
|
3260
3257
|
auth: e,
|
|
3261
3258
|
email: p,
|
|
3262
3259
|
emailVerified: rt,
|
|
@@ -3269,7 +3266,7 @@ class I {
|
|
|
3269
3266
|
createdAt: tt,
|
|
3270
3267
|
lastLoginAt: nt
|
|
3271
3268
|
});
|
|
3272
|
-
return
|
|
3269
|
+
return Ee && Array.isArray(Ee) && (Te.providerData = Ee.map((Dn) => Object.assign({}, Dn))), Ie && (Te._redirectEventId = Ie), Te;
|
|
3273
3270
|
}
|
|
3274
3271
|
/**
|
|
3275
3272
|
* Initialize a User from an idToken server response
|
|
@@ -3285,7 +3282,7 @@ class I {
|
|
|
3285
3282
|
stsTokenManager: i,
|
|
3286
3283
|
isAnonymous: r
|
|
3287
3284
|
});
|
|
3288
|
-
return await
|
|
3285
|
+
return await fe(s), s;
|
|
3289
3286
|
}
|
|
3290
3287
|
/**
|
|
3291
3288
|
* Initialize a User from an idToken server response
|
|
@@ -3315,7 +3312,7 @@ class I {
|
|
|
3315
3312
|
phoneNumber: i.phoneNumber || null,
|
|
3316
3313
|
tenantId: i.tenantId || null,
|
|
3317
3314
|
providerData: s,
|
|
3318
|
-
metadata: new
|
|
3315
|
+
metadata: new $e(i.createdAt, i.lastLoginAt),
|
|
3319
3316
|
isAnonymous: !(i.email && i.passwordHash) && !(s != null && s.length)
|
|
3320
3317
|
};
|
|
3321
3318
|
return Object.assign(o, l), o;
|
|
@@ -3533,12 +3530,12 @@ function pn(n = g()) {
|
|
|
3533
3530
|
function Ye(n = g()) {
|
|
3534
3531
|
return /iphone|ipad|ipod/i.test(n) || /macintosh/i.test(n) && /mobile/i.test(n);
|
|
3535
3532
|
}
|
|
3536
|
-
function
|
|
3533
|
+
function zi(n = g()) {
|
|
3537
3534
|
var e;
|
|
3538
3535
|
return Ye(n) && !!(!((e = window.navigator) === null || e === void 0) && e.standalone);
|
|
3539
3536
|
}
|
|
3540
|
-
function
|
|
3541
|
-
return
|
|
3537
|
+
function Gi() {
|
|
3538
|
+
return lr() && document.documentMode === 10;
|
|
3542
3539
|
}
|
|
3543
3540
|
function mn(n = g()) {
|
|
3544
3541
|
return Ye(n) || hn(n) || pn(n) || fn(n) || /windows phone/i.test(n) || dn(n);
|
|
@@ -3590,7 +3587,7 @@ function gn(n, e = []) {
|
|
|
3590
3587
|
* See the License for the specific language governing permissions and
|
|
3591
3588
|
* limitations under the License.
|
|
3592
3589
|
*/
|
|
3593
|
-
class
|
|
3590
|
+
class qi {
|
|
3594
3591
|
constructor(e) {
|
|
3595
3592
|
this.auth = e, this.queue = [];
|
|
3596
3593
|
}
|
|
@@ -3645,8 +3642,8 @@ class Ji {
|
|
|
3645
3642
|
* See the License for the specific language governing permissions and
|
|
3646
3643
|
* limitations under the License.
|
|
3647
3644
|
*/
|
|
3648
|
-
async function
|
|
3649
|
-
return G(n, "GET", "/v2/passwordPolicy",
|
|
3645
|
+
async function Ki(n, e = {}) {
|
|
3646
|
+
return G(n, "GET", "/v2/passwordPolicy", _e(n, e));
|
|
3650
3647
|
}
|
|
3651
3648
|
/**
|
|
3652
3649
|
* @license
|
|
@@ -3664,12 +3661,12 @@ async function Yi(n, e = {}) {
|
|
|
3664
3661
|
* See the License for the specific language governing permissions and
|
|
3665
3662
|
* limitations under the License.
|
|
3666
3663
|
*/
|
|
3667
|
-
const
|
|
3668
|
-
class
|
|
3664
|
+
const Ji = 6;
|
|
3665
|
+
class Yi {
|
|
3669
3666
|
constructor(e) {
|
|
3670
3667
|
var t, r, i, s;
|
|
3671
3668
|
const a = e.customStrengthOptions;
|
|
3672
|
-
this.customStrengthOptions = {}, this.customStrengthOptions.minPasswordLength = (t = a.minPasswordLength) !== null && t !== void 0 ? t :
|
|
3669
|
+
this.customStrengthOptions = {}, this.customStrengthOptions.minPasswordLength = (t = a.minPasswordLength) !== null && t !== void 0 ? t : Ji, a.maxPasswordLength && (this.customStrengthOptions.maxPasswordLength = a.maxPasswordLength), a.containsLowercaseCharacter !== void 0 && (this.customStrengthOptions.containsLowercaseLetter = a.containsLowercaseCharacter), a.containsUppercaseCharacter !== void 0 && (this.customStrengthOptions.containsUppercaseLetter = a.containsUppercaseCharacter), a.containsNumericCharacter !== void 0 && (this.customStrengthOptions.containsNumericCharacter = a.containsNumericCharacter), a.containsNonAlphanumericCharacter !== void 0 && (this.customStrengthOptions.containsNonAlphanumericCharacter = a.containsNonAlphanumericCharacter), this.enforcementState = e.enforcementState, this.enforcementState === "ENFORCEMENT_STATE_UNSPECIFIED" && (this.enforcementState = "OFF"), this.allowedNonAlphanumericCharacters = (i = (r = e.allowedNonAlphanumericCharacters) === null || r === void 0 ? void 0 : r.join("")) !== null && i !== void 0 ? i : "", this.forceUpgradeOnSignin = (s = e.forceUpgradeOnSignin) !== null && s !== void 0 ? s : !1, this.schemaVersion = e.schemaVersion;
|
|
3673
3670
|
}
|
|
3674
3671
|
validatePassword(e) {
|
|
3675
3672
|
var t, r, i, s, a, c;
|
|
@@ -3752,9 +3749,9 @@ class Qi {
|
|
|
3752
3749
|
* See the License for the specific language governing permissions and
|
|
3753
3750
|
* limitations under the License.
|
|
3754
3751
|
*/
|
|
3755
|
-
class
|
|
3752
|
+
class Xi {
|
|
3756
3753
|
constructor(e, t, r, i) {
|
|
3757
|
-
this.app = e, this.heartbeatServiceProvider = t, this.appCheckServiceProvider = r, this.config = i, this.currentUser = null, this.emulatorConfig = null, this.operations = Promise.resolve(), this.authStateSubscription = new It(this), this.idTokenSubscription = new It(this), this.beforeStateQueue = new
|
|
3754
|
+
this.app = e, this.heartbeatServiceProvider = t, this.appCheckServiceProvider = r, this.config = i, this.currentUser = null, this.emulatorConfig = null, this.operations = Promise.resolve(), this.authStateSubscription = new It(this), this.idTokenSubscription = new It(this), this.beforeStateQueue = new qi(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 = Qt, 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 = i.sdkClientVersion;
|
|
3758
3755
|
}
|
|
3759
3756
|
_initializeWithPersistence(e, t) {
|
|
3760
3757
|
return t && (this._popupRedirectResolver = w(t)), this._initializationPromise = this.queue(async () => {
|
|
@@ -3840,7 +3837,7 @@ class Zi {
|
|
|
3840
3837
|
}
|
|
3841
3838
|
async reloadAndSetCurrentUserOrClear(e) {
|
|
3842
3839
|
try {
|
|
3843
|
-
await
|
|
3840
|
+
await fe(e);
|
|
3844
3841
|
} catch (t) {
|
|
3845
3842
|
if ((t == null ? void 0 : t.code) !== "auth/network-request-failed")
|
|
3846
3843
|
return this.directlySetCurrentUser(null);
|
|
@@ -3848,7 +3845,7 @@ class Zi {
|
|
|
3848
3845
|
return this.directlySetCurrentUser(e);
|
|
3849
3846
|
}
|
|
3850
3847
|
useDeviceLanguage() {
|
|
3851
|
-
this.languageCode =
|
|
3848
|
+
this.languageCode = Ni();
|
|
3852
3849
|
}
|
|
3853
3850
|
async _delete() {
|
|
3854
3851
|
this._deleted = !0;
|
|
@@ -3899,7 +3896,7 @@ class Zi {
|
|
|
3899
3896
|
return this.tenantId === null ? this._projectPasswordPolicy : this._tenantPasswordPolicies[this.tenantId];
|
|
3900
3897
|
}
|
|
3901
3898
|
async _updatePasswordPolicy() {
|
|
3902
|
-
const e = await
|
|
3899
|
+
const e = await Ki(this), t = new Yi(e);
|
|
3903
3900
|
this.tenantId === null ? this._projectPasswordPolicy = t : this._tenantPasswordPolicies[this.tenantId] = t;
|
|
3904
3901
|
}
|
|
3905
3902
|
_getPersistence() {
|
|
@@ -3939,7 +3936,7 @@ class Zi {
|
|
|
3939
3936
|
token: e,
|
|
3940
3937
|
idToken: t
|
|
3941
3938
|
};
|
|
3942
|
-
this.tenantId != null && (r.tenantId = this.tenantId), await
|
|
3939
|
+
this.tenantId != null && (r.tenantId = this.tenantId), await Wi(this, r);
|
|
3943
3940
|
}
|
|
3944
3941
|
}
|
|
3945
3942
|
toJSON() {
|
|
@@ -4082,15 +4079,15 @@ class Zi {
|
|
|
4082
4079
|
async _getAppCheckToken() {
|
|
4083
4080
|
var e;
|
|
4084
4081
|
const t = await ((e = this.appCheckServiceProvider.getImmediate({ optional: !0 })) === null || e === void 0 ? void 0 : e.getToken());
|
|
4085
|
-
return t != null && t.error &&
|
|
4082
|
+
return t != null && t.error && Pi(`Error while retrieving App Check token: ${t.error}`), t == null ? void 0 : t.token;
|
|
4086
4083
|
}
|
|
4087
4084
|
}
|
|
4088
|
-
function
|
|
4085
|
+
function ye(n) {
|
|
4089
4086
|
return z(n);
|
|
4090
4087
|
}
|
|
4091
4088
|
class It {
|
|
4092
4089
|
constructor(e) {
|
|
4093
|
-
this.auth = e, this.observer = null, this.addObserver =
|
|
4090
|
+
this.auth = e, this.observer = null, this.addObserver = gr((t) => this.observer = t);
|
|
4094
4091
|
}
|
|
4095
4092
|
get next() {
|
|
4096
4093
|
return h(
|
|
@@ -4125,16 +4122,16 @@ let Xe = {
|
|
|
4125
4122
|
recaptchaEnterpriseScript: "",
|
|
4126
4123
|
gapiScript: ""
|
|
4127
4124
|
};
|
|
4128
|
-
function
|
|
4125
|
+
function Qi(n) {
|
|
4129
4126
|
Xe = n;
|
|
4130
4127
|
}
|
|
4131
|
-
function
|
|
4128
|
+
function Zi(n) {
|
|
4132
4129
|
return Xe.loadJS(n);
|
|
4133
4130
|
}
|
|
4134
|
-
function
|
|
4131
|
+
function es() {
|
|
4135
4132
|
return Xe.gapiScript;
|
|
4136
4133
|
}
|
|
4137
|
-
function
|
|
4134
|
+
function ts(n) {
|
|
4138
4135
|
return `__${n}${Math.floor(Math.random() * 1e6)}`;
|
|
4139
4136
|
}
|
|
4140
4137
|
/**
|
|
@@ -4153,11 +4150,11 @@ function rs(n) {
|
|
|
4153
4150
|
* See the License for the specific language governing permissions and
|
|
4154
4151
|
* limitations under the License.
|
|
4155
4152
|
*/
|
|
4156
|
-
function
|
|
4153
|
+
function ns(n, e) {
|
|
4157
4154
|
const t = qt(n, "auth");
|
|
4158
4155
|
if (t.isInitialized()) {
|
|
4159
4156
|
const i = t.getImmediate(), s = t.getOptions();
|
|
4160
|
-
if (
|
|
4157
|
+
if (ue(s, e ?? {}))
|
|
4161
4158
|
return i;
|
|
4162
4159
|
T(
|
|
4163
4160
|
i,
|
|
@@ -4167,12 +4164,12 @@ function is(n, e) {
|
|
|
4167
4164
|
}
|
|
4168
4165
|
return t.initialize({ options: e });
|
|
4169
4166
|
}
|
|
4170
|
-
function
|
|
4167
|
+
function rs(n, e) {
|
|
4171
4168
|
const t = (e == null ? void 0 : e.persistence) || [], r = (Array.isArray(t) ? t : [t]).map(w);
|
|
4172
4169
|
e != null && e.errorMap && n._updateErrorMap(e.errorMap), n._initializeWithPersistence(r, e == null ? void 0 : e.popupRedirectResolver);
|
|
4173
4170
|
}
|
|
4174
|
-
function
|
|
4175
|
-
const r =
|
|
4171
|
+
function is(n, e, t) {
|
|
4172
|
+
const r = ye(n);
|
|
4176
4173
|
h(
|
|
4177
4174
|
r._canInitEmulator,
|
|
4178
4175
|
r,
|
|
@@ -4184,19 +4181,19 @@ function as(n, e, t) {
|
|
|
4184
4181
|
"invalid-emulator-scheme"
|
|
4185
4182
|
/* AuthErrorCode.INVALID_EMULATOR_SCHEME */
|
|
4186
4183
|
);
|
|
4187
|
-
const i = !1, s = _n(e), { host: a, port: c } =
|
|
4184
|
+
const i = !1, s = _n(e), { host: a, port: c } = ss(e), o = c === null ? "" : `:${c}`;
|
|
4188
4185
|
r.config.emulator = { url: `${s}//${a}${o}/` }, r.settings.appVerificationDisabledForTesting = !0, r.emulatorConfig = Object.freeze({
|
|
4189
4186
|
host: a,
|
|
4190
4187
|
port: c,
|
|
4191
4188
|
protocol: s.replace(":", ""),
|
|
4192
4189
|
options: Object.freeze({ disableWarnings: i })
|
|
4193
|
-
}),
|
|
4190
|
+
}), as();
|
|
4194
4191
|
}
|
|
4195
4192
|
function _n(n) {
|
|
4196
4193
|
const e = n.indexOf(":");
|
|
4197
4194
|
return e < 0 ? "" : n.substr(0, e + 1);
|
|
4198
4195
|
}
|
|
4199
|
-
function
|
|
4196
|
+
function ss(n) {
|
|
4200
4197
|
const e = _n(n), t = /(\/\/)?([^?#/]+)/.exec(n.substr(e.length));
|
|
4201
4198
|
if (!t)
|
|
4202
4199
|
return { host: "", port: null };
|
|
@@ -4215,7 +4212,7 @@ function wt(n) {
|
|
|
4215
4212
|
const e = Number(n);
|
|
4216
4213
|
return isNaN(e) ? null : e;
|
|
4217
4214
|
}
|
|
4218
|
-
function
|
|
4215
|
+
function as() {
|
|
4219
4216
|
function n() {
|
|
4220
4217
|
const e = document.createElement("p"), t = e.style;
|
|
4221
4218
|
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);
|
|
@@ -4281,7 +4278,7 @@ class yn {
|
|
|
4281
4278
|
* limitations under the License.
|
|
4282
4279
|
*/
|
|
4283
4280
|
async function j(n, e) {
|
|
4284
|
-
return nn(n, "POST", "/v1/accounts:signInWithIdp",
|
|
4281
|
+
return nn(n, "POST", "/v1/accounts:signInWithIdp", _e(n, e));
|
|
4285
4282
|
}
|
|
4286
4283
|
/**
|
|
4287
4284
|
* @license
|
|
@@ -4299,7 +4296,7 @@ async function j(n, e) {
|
|
|
4299
4296
|
* See the License for the specific language governing permissions and
|
|
4300
4297
|
* limitations under the License.
|
|
4301
4298
|
*/
|
|
4302
|
-
const
|
|
4299
|
+
const os = "http://localhost";
|
|
4303
4300
|
class U extends yn {
|
|
4304
4301
|
constructor() {
|
|
4305
4302
|
super(...arguments), this.pendingToken = null;
|
|
@@ -4357,7 +4354,7 @@ class U extends yn {
|
|
|
4357
4354
|
}
|
|
4358
4355
|
buildRequest() {
|
|
4359
4356
|
const e = {
|
|
4360
|
-
requestUri:
|
|
4357
|
+
requestUri: os,
|
|
4361
4358
|
returnSecureToken: !0
|
|
4362
4359
|
};
|
|
4363
4360
|
if (this.pendingToken)
|
|
@@ -4800,10 +4797,10 @@ function Et(n) {
|
|
|
4800
4797
|
* See the License for the specific language governing permissions and
|
|
4801
4798
|
* limitations under the License.
|
|
4802
4799
|
*/
|
|
4803
|
-
class
|
|
4800
|
+
class pe extends L {
|
|
4804
4801
|
constructor(e, t, r, i) {
|
|
4805
4802
|
var s;
|
|
4806
|
-
super(t.code, t.message), this.operationType = r, this.user = i, Object.setPrototypeOf(this,
|
|
4803
|
+
super(t.code, t.message), this.operationType = r, this.user = i, Object.setPrototypeOf(this, pe.prototype), this.customData = {
|
|
4807
4804
|
appName: e.name,
|
|
4808
4805
|
tenantId: (s = e.tenantId) !== null && s !== void 0 ? s : void 0,
|
|
4809
4806
|
_serverResponse: t.customData._serverResponse,
|
|
@@ -4811,15 +4808,15 @@ class me extends L {
|
|
|
4811
4808
|
};
|
|
4812
4809
|
}
|
|
4813
4810
|
static _fromErrorAndOperation(e, t, r, i) {
|
|
4814
|
-
return new
|
|
4811
|
+
return new pe(e, t, r, i);
|
|
4815
4812
|
}
|
|
4816
4813
|
}
|
|
4817
4814
|
function bn(n, e, t, r) {
|
|
4818
4815
|
return (e === "reauthenticate" ? t._getReauthenticationResolver(n) : t._getIdTokenResponse(n)).catch((s) => {
|
|
4819
|
-
throw s.code === "auth/multi-factor-auth-required" ?
|
|
4816
|
+
throw s.code === "auth/multi-factor-auth-required" ? pe._fromErrorAndOperation(n, s, e, r) : s;
|
|
4820
4817
|
});
|
|
4821
4818
|
}
|
|
4822
|
-
async function
|
|
4819
|
+
async function cs(n, e, t = !1) {
|
|
4823
4820
|
const r = await Q(n, e._linkToIdToken(n.auth, await n.getIdToken()), t);
|
|
4824
4821
|
return x._forOperation(n, "link", r);
|
|
4825
4822
|
}
|
|
@@ -4839,7 +4836,7 @@ async function us(n, e, t = !1) {
|
|
|
4839
4836
|
* See the License for the specific language governing permissions and
|
|
4840
4837
|
* limitations under the License.
|
|
4841
4838
|
*/
|
|
4842
|
-
async function
|
|
4839
|
+
async function ls(n, e, t = !1) {
|
|
4843
4840
|
const { auth: r } = n;
|
|
4844
4841
|
if (v(r.app))
|
|
4845
4842
|
return Promise.reject(N(r));
|
|
@@ -4890,7 +4887,7 @@ async function ds(n, e, t = !1) {
|
|
|
4890
4887
|
* See the License for the specific language governing permissions and
|
|
4891
4888
|
* limitations under the License.
|
|
4892
4889
|
*/
|
|
4893
|
-
async function
|
|
4890
|
+
async function us(n, e, t = !1) {
|
|
4894
4891
|
if (v(n.app))
|
|
4895
4892
|
return Promise.reject(N(n));
|
|
4896
4893
|
const r = "signIn", i = await bn(n, r, e), s = await x._fromIdTokenResponse(n, r, i);
|
|
@@ -4912,8 +4909,8 @@ async function hs(n, e, t = !1) {
|
|
|
4912
4909
|
* See the License for the specific language governing permissions and
|
|
4913
4910
|
* limitations under the License.
|
|
4914
4911
|
*/
|
|
4915
|
-
async function
|
|
4916
|
-
return nn(n, "POST", "/v1/accounts:signInWithCustomToken",
|
|
4912
|
+
async function ds(n, e) {
|
|
4913
|
+
return nn(n, "POST", "/v1/accounts:signInWithCustomToken", _e(n, e));
|
|
4917
4914
|
}
|
|
4918
4915
|
/**
|
|
4919
4916
|
* @license
|
|
@@ -4931,22 +4928,22 @@ async function fs(n, e) {
|
|
|
4931
4928
|
* See the License for the specific language governing permissions and
|
|
4932
4929
|
* limitations under the License.
|
|
4933
4930
|
*/
|
|
4934
|
-
async function
|
|
4931
|
+
async function hs(n, e) {
|
|
4935
4932
|
if (v(n.app))
|
|
4936
4933
|
return Promise.reject(N(n));
|
|
4937
|
-
const t =
|
|
4934
|
+
const t = ye(n), r = await ds(t, {
|
|
4938
4935
|
token: e,
|
|
4939
4936
|
returnSecureToken: !0
|
|
4940
4937
|
}), i = await x._fromIdTokenResponse(t, "signIn", r);
|
|
4941
4938
|
return await t._updateCurrentUser(i.user), i;
|
|
4942
4939
|
}
|
|
4943
|
-
function
|
|
4940
|
+
function fs(n, e, t, r) {
|
|
4944
4941
|
return z(n).onIdTokenChanged(e, t, r);
|
|
4945
4942
|
}
|
|
4946
|
-
function
|
|
4943
|
+
function ps(n, e, t) {
|
|
4947
4944
|
return z(n).beforeAuthStateChanged(e, t);
|
|
4948
4945
|
}
|
|
4949
|
-
const
|
|
4946
|
+
const me = "__sak";
|
|
4950
4947
|
/**
|
|
4951
4948
|
* @license
|
|
4952
4949
|
* Copyright 2019 Google LLC
|
|
@@ -4969,7 +4966,7 @@ class In {
|
|
|
4969
4966
|
}
|
|
4970
4967
|
_isAvailable() {
|
|
4971
4968
|
try {
|
|
4972
|
-
return this.storage ? (this.storage.setItem(
|
|
4969
|
+
return this.storage ? (this.storage.setItem(me, "1"), this.storage.removeItem(me), Promise.resolve(!0)) : Promise.resolve(!1);
|
|
4973
4970
|
} catch {
|
|
4974
4971
|
return Promise.resolve(!1);
|
|
4975
4972
|
}
|
|
@@ -5004,7 +5001,7 @@ class In {
|
|
|
5004
5001
|
* See the License for the specific language governing permissions and
|
|
5005
5002
|
* limitations under the License.
|
|
5006
5003
|
*/
|
|
5007
|
-
const
|
|
5004
|
+
const ms = 1e3, gs = 10;
|
|
5008
5005
|
class wn extends In {
|
|
5009
5006
|
constructor() {
|
|
5010
5007
|
super(
|
|
@@ -5032,7 +5029,7 @@ class wn extends In {
|
|
|
5032
5029
|
const a = this.storage.getItem(r);
|
|
5033
5030
|
!t && this.localCache[r] === a || this.notifyListeners(r, a);
|
|
5034
5031
|
}, s = this.storage.getItem(r);
|
|
5035
|
-
|
|
5032
|
+
Gi() && s !== e.newValue && e.newValue !== e.oldValue ? setTimeout(i, gs) : i();
|
|
5036
5033
|
}
|
|
5037
5034
|
notifyListeners(e, t) {
|
|
5038
5035
|
this.localCache[e] = t;
|
|
@@ -5054,7 +5051,7 @@ class wn extends In {
|
|
|
5054
5051
|
!0
|
|
5055
5052
|
);
|
|
5056
5053
|
});
|
|
5057
|
-
},
|
|
5054
|
+
}, ms);
|
|
5058
5055
|
}
|
|
5059
5056
|
stopPolling() {
|
|
5060
5057
|
this.pollTimer && (clearInterval(this.pollTimer), this.pollTimer = null);
|
|
@@ -5084,7 +5081,7 @@ class wn extends In {
|
|
|
5084
5081
|
}
|
|
5085
5082
|
}
|
|
5086
5083
|
wn.type = "LOCAL";
|
|
5087
|
-
const
|
|
5084
|
+
const _s = wn;
|
|
5088
5085
|
/**
|
|
5089
5086
|
* @license
|
|
5090
5087
|
* Copyright 2020 Google LLC
|
|
@@ -5132,7 +5129,7 @@ const Tn = En;
|
|
|
5132
5129
|
* See the License for the specific language governing permissions and
|
|
5133
5130
|
* limitations under the License.
|
|
5134
5131
|
*/
|
|
5135
|
-
function
|
|
5132
|
+
function ys(n) {
|
|
5136
5133
|
return Promise.all(n.map(async (e) => {
|
|
5137
5134
|
try {
|
|
5138
5135
|
return {
|
|
@@ -5163,7 +5160,7 @@ function bs(n) {
|
|
|
5163
5160
|
* See the License for the specific language governing permissions and
|
|
5164
5161
|
* limitations under the License.
|
|
5165
5162
|
*/
|
|
5166
|
-
class
|
|
5163
|
+
class ve {
|
|
5167
5164
|
constructor(e) {
|
|
5168
5165
|
this.eventTarget = e, this.handlersMap = {}, this.boundEventHandler = this.handleEvent.bind(this);
|
|
5169
5166
|
}
|
|
@@ -5177,7 +5174,7 @@ class be {
|
|
|
5177
5174
|
const t = this.receivers.find((i) => i.isListeningto(e));
|
|
5178
5175
|
if (t)
|
|
5179
5176
|
return t;
|
|
5180
|
-
const r = new
|
|
5177
|
+
const r = new ve(e);
|
|
5181
5178
|
return this.receivers.push(r), r;
|
|
5182
5179
|
}
|
|
5183
5180
|
isListeningto(e) {
|
|
@@ -5202,7 +5199,7 @@ class be {
|
|
|
5202
5199
|
eventId: r,
|
|
5203
5200
|
eventType: i
|
|
5204
5201
|
});
|
|
5205
|
-
const c = Array.from(a).map(async (l) => l(t.origin, s)), o = await
|
|
5202
|
+
const c = Array.from(a).map(async (l) => l(t.origin, s)), o = await ys(c);
|
|
5206
5203
|
t.ports[0].postMessage({
|
|
5207
5204
|
status: "done",
|
|
5208
5205
|
eventId: r,
|
|
@@ -5231,7 +5228,7 @@ class be {
|
|
|
5231
5228
|
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);
|
|
5232
5229
|
}
|
|
5233
5230
|
}
|
|
5234
|
-
|
|
5231
|
+
ve.receivers = [];
|
|
5235
5232
|
/**
|
|
5236
5233
|
* @license
|
|
5237
5234
|
* Copyright 2020 Google LLC
|
|
@@ -5270,7 +5267,7 @@ function Qe(n = "", e = 10) {
|
|
|
5270
5267
|
* See the License for the specific language governing permissions and
|
|
5271
5268
|
* limitations under the License.
|
|
5272
5269
|
*/
|
|
5273
|
-
class
|
|
5270
|
+
class vs {
|
|
5274
5271
|
constructor(e) {
|
|
5275
5272
|
this.target = e, this.handlers = /* @__PURE__ */ new Set();
|
|
5276
5273
|
}
|
|
@@ -5370,7 +5367,7 @@ class Is {
|
|
|
5370
5367
|
function y() {
|
|
5371
5368
|
return window;
|
|
5372
5369
|
}
|
|
5373
|
-
function
|
|
5370
|
+
function bs(n) {
|
|
5374
5371
|
y().location.href = n;
|
|
5375
5372
|
}
|
|
5376
5373
|
/**
|
|
@@ -5392,7 +5389,7 @@ function ws(n) {
|
|
|
5392
5389
|
function Sn() {
|
|
5393
5390
|
return typeof y().WorkerGlobalScope < "u" && typeof y().importScripts == "function";
|
|
5394
5391
|
}
|
|
5395
|
-
async function
|
|
5392
|
+
async function Is() {
|
|
5396
5393
|
if (!(navigator != null && navigator.serviceWorker))
|
|
5397
5394
|
return null;
|
|
5398
5395
|
try {
|
|
@@ -5401,11 +5398,11 @@ async function Es() {
|
|
|
5401
5398
|
return null;
|
|
5402
5399
|
}
|
|
5403
5400
|
}
|
|
5404
|
-
function
|
|
5401
|
+
function ws() {
|
|
5405
5402
|
var n;
|
|
5406
5403
|
return ((n = navigator == null ? void 0 : navigator.serviceWorker) === null || n === void 0 ? void 0 : n.controller) || null;
|
|
5407
5404
|
}
|
|
5408
|
-
function
|
|
5405
|
+
function Es() {
|
|
5409
5406
|
return Sn() ? self : null;
|
|
5410
5407
|
}
|
|
5411
5408
|
/**
|
|
@@ -5424,7 +5421,7 @@ function Ss() {
|
|
|
5424
5421
|
* See the License for the specific language governing permissions and
|
|
5425
5422
|
* limitations under the License.
|
|
5426
5423
|
*/
|
|
5427
|
-
const kn = "firebaseLocalStorageDb",
|
|
5424
|
+
const kn = "firebaseLocalStorageDb", Ts = 1, ge = "firebaseLocalStorage", An = "fbase_key";
|
|
5428
5425
|
class ie {
|
|
5429
5426
|
constructor(e) {
|
|
5430
5427
|
this.request = e;
|
|
@@ -5439,47 +5436,47 @@ class ie {
|
|
|
5439
5436
|
});
|
|
5440
5437
|
}
|
|
5441
5438
|
}
|
|
5442
|
-
function
|
|
5443
|
-
return n.transaction([
|
|
5439
|
+
function be(n, e) {
|
|
5440
|
+
return n.transaction([ge], e ? "readwrite" : "readonly").objectStore(ge);
|
|
5444
5441
|
}
|
|
5445
|
-
function
|
|
5442
|
+
function Ss() {
|
|
5446
5443
|
const n = indexedDB.deleteDatabase(kn);
|
|
5447
5444
|
return new ie(n).toPromise();
|
|
5448
5445
|
}
|
|
5449
|
-
function
|
|
5450
|
-
const n = indexedDB.open(kn,
|
|
5446
|
+
function He() {
|
|
5447
|
+
const n = indexedDB.open(kn, Ts);
|
|
5451
5448
|
return new Promise((e, t) => {
|
|
5452
5449
|
n.addEventListener("error", () => {
|
|
5453
5450
|
t(n.error);
|
|
5454
5451
|
}), n.addEventListener("upgradeneeded", () => {
|
|
5455
5452
|
const r = n.result;
|
|
5456
5453
|
try {
|
|
5457
|
-
r.createObjectStore(
|
|
5454
|
+
r.createObjectStore(ge, { keyPath: An });
|
|
5458
5455
|
} catch (i) {
|
|
5459
5456
|
t(i);
|
|
5460
5457
|
}
|
|
5461
5458
|
}), n.addEventListener("success", async () => {
|
|
5462
5459
|
const r = n.result;
|
|
5463
|
-
r.objectStoreNames.contains(
|
|
5460
|
+
r.objectStoreNames.contains(ge) ? e(r) : (r.close(), await Ss(), e(await He()));
|
|
5464
5461
|
});
|
|
5465
5462
|
});
|
|
5466
5463
|
}
|
|
5467
5464
|
async function Tt(n, e, t) {
|
|
5468
|
-
const r =
|
|
5465
|
+
const r = be(n, !0).put({
|
|
5469
5466
|
[An]: e,
|
|
5470
5467
|
value: t
|
|
5471
5468
|
});
|
|
5472
5469
|
return new ie(r).toPromise();
|
|
5473
5470
|
}
|
|
5474
|
-
async function
|
|
5475
|
-
const t =
|
|
5471
|
+
async function ks(n, e) {
|
|
5472
|
+
const t = be(n, !1).get(e), r = await new ie(t).toPromise();
|
|
5476
5473
|
return r === void 0 ? null : r.value;
|
|
5477
5474
|
}
|
|
5478
5475
|
function St(n, e) {
|
|
5479
|
-
const t =
|
|
5476
|
+
const t = be(n, !0).delete(e);
|
|
5480
5477
|
return new ie(t).toPromise();
|
|
5481
5478
|
}
|
|
5482
|
-
const
|
|
5479
|
+
const As = 800, Rs = 3;
|
|
5483
5480
|
class Rn {
|
|
5484
5481
|
constructor() {
|
|
5485
5482
|
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(() => {
|
|
@@ -5487,7 +5484,7 @@ class Rn {
|
|
|
5487
5484
|
});
|
|
5488
5485
|
}
|
|
5489
5486
|
async _openDb() {
|
|
5490
|
-
return this.db ? this.db : (this.db = await
|
|
5487
|
+
return this.db ? this.db : (this.db = await He(), this.db);
|
|
5491
5488
|
}
|
|
5492
5489
|
async _withRetries(e) {
|
|
5493
5490
|
let t = 0;
|
|
@@ -5496,7 +5493,7 @@ class Rn {
|
|
|
5496
5493
|
const r = await this._openDb();
|
|
5497
5494
|
return await e(r);
|
|
5498
5495
|
} catch (r) {
|
|
5499
|
-
if (t++ >
|
|
5496
|
+
if (t++ > Rs)
|
|
5500
5497
|
throw r;
|
|
5501
5498
|
this.db && (this.db.close(), this.db = void 0);
|
|
5502
5499
|
}
|
|
@@ -5512,7 +5509,7 @@ class Rn {
|
|
|
5512
5509
|
* As the worker we should listen to events from the main window.
|
|
5513
5510
|
*/
|
|
5514
5511
|
async initializeReceiver() {
|
|
5515
|
-
this.receiver =
|
|
5512
|
+
this.receiver = ve._getInstance(Es()), this.receiver._subscribe("keyChanged", async (e, t) => ({
|
|
5516
5513
|
keyProcessed: (await this._poll()).includes(t.key)
|
|
5517
5514
|
})), this.receiver._subscribe("ping", async (e, t) => [
|
|
5518
5515
|
"keyChanged"
|
|
@@ -5528,9 +5525,9 @@ class Rn {
|
|
|
5528
5525
|
*/
|
|
5529
5526
|
async initializeSender() {
|
|
5530
5527
|
var e, t;
|
|
5531
|
-
if (this.activeServiceWorker = await
|
|
5528
|
+
if (this.activeServiceWorker = await Is(), !this.activeServiceWorker)
|
|
5532
5529
|
return;
|
|
5533
|
-
this.sender = new
|
|
5530
|
+
this.sender = new vs(this.activeServiceWorker);
|
|
5534
5531
|
const r = await this.sender._send(
|
|
5535
5532
|
"ping",
|
|
5536
5533
|
{},
|
|
@@ -5552,7 +5549,7 @@ class Rn {
|
|
|
5552
5549
|
* @param key - Storage key which changed.
|
|
5553
5550
|
*/
|
|
5554
5551
|
async notifyServiceWorker(e) {
|
|
5555
|
-
if (!(!this.sender || !this.activeServiceWorker ||
|
|
5552
|
+
if (!(!this.sender || !this.activeServiceWorker || ws() !== this.activeServiceWorker))
|
|
5556
5553
|
try {
|
|
5557
5554
|
await this.sender._send(
|
|
5558
5555
|
"keyChanged",
|
|
@@ -5568,8 +5565,8 @@ class Rn {
|
|
|
5568
5565
|
try {
|
|
5569
5566
|
if (!indexedDB)
|
|
5570
5567
|
return !1;
|
|
5571
|
-
const e = await
|
|
5572
|
-
return await Tt(e,
|
|
5568
|
+
const e = await He();
|
|
5569
|
+
return await Tt(e, me, "1"), await St(e, me), !0;
|
|
5573
5570
|
} catch {
|
|
5574
5571
|
}
|
|
5575
5572
|
return !1;
|
|
@@ -5586,7 +5583,7 @@ class Rn {
|
|
|
5586
5583
|
return this._withPendingWrite(async () => (await this._withRetries((r) => Tt(r, e, t)), this.localCache[e] = t, this.notifyServiceWorker(e)));
|
|
5587
5584
|
}
|
|
5588
5585
|
async _get(e) {
|
|
5589
|
-
const t = await this._withRetries((r) =>
|
|
5586
|
+
const t = await this._withRetries((r) => ks(r, e));
|
|
5590
5587
|
return this.localCache[e] = t, t;
|
|
5591
5588
|
}
|
|
5592
5589
|
async _remove(e) {
|
|
@@ -5594,7 +5591,7 @@ class Rn {
|
|
|
5594
5591
|
}
|
|
5595
5592
|
async _poll() {
|
|
5596
5593
|
const e = await this._withRetries((i) => {
|
|
5597
|
-
const s =
|
|
5594
|
+
const s = be(i, !1).getAll();
|
|
5598
5595
|
return new ie(s).toPromise();
|
|
5599
5596
|
});
|
|
5600
5597
|
if (!e)
|
|
@@ -5617,7 +5614,7 @@ class Rn {
|
|
|
5617
5614
|
i(t);
|
|
5618
5615
|
}
|
|
5619
5616
|
startPolling() {
|
|
5620
|
-
this.stopPolling(), this.pollTimer = setInterval(async () => this._poll(),
|
|
5617
|
+
this.stopPolling(), this.pollTimer = setInterval(async () => this._poll(), As);
|
|
5621
5618
|
}
|
|
5622
5619
|
stopPolling() {
|
|
5623
5620
|
this.pollTimer && (clearInterval(this.pollTimer), this.pollTimer = null);
|
|
@@ -5630,7 +5627,7 @@ class Rn {
|
|
|
5630
5627
|
}
|
|
5631
5628
|
}
|
|
5632
5629
|
Rn.type = "LOCAL";
|
|
5633
|
-
const
|
|
5630
|
+
const Cs = Rn;
|
|
5634
5631
|
new ne(3e4, 6e4);
|
|
5635
5632
|
/**
|
|
5636
5633
|
* @license
|
|
@@ -5648,7 +5645,7 @@ new ne(3e4, 6e4);
|
|
|
5648
5645
|
* See the License for the specific language governing permissions and
|
|
5649
5646
|
* limitations under the License.
|
|
5650
5647
|
*/
|
|
5651
|
-
function
|
|
5648
|
+
function Ps(n, e) {
|
|
5652
5649
|
return e ? w(e) : (h(
|
|
5653
5650
|
n._popupRedirectResolver,
|
|
5654
5651
|
n,
|
|
@@ -5702,26 +5699,26 @@ class Ze extends yn {
|
|
|
5702
5699
|
return e && (t.idToken = e), t;
|
|
5703
5700
|
}
|
|
5704
5701
|
}
|
|
5705
|
-
function
|
|
5706
|
-
return
|
|
5702
|
+
function Os(n) {
|
|
5703
|
+
return us(n.auth, new Ze(n), n.bypassAuthState);
|
|
5707
5704
|
}
|
|
5708
|
-
function
|
|
5705
|
+
function Ds(n) {
|
|
5709
5706
|
const { auth: e, user: t } = n;
|
|
5710
5707
|
return h(
|
|
5711
5708
|
t,
|
|
5712
5709
|
e,
|
|
5713
5710
|
"internal-error"
|
|
5714
5711
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
5715
|
-
),
|
|
5712
|
+
), ls(t, new Ze(n), n.bypassAuthState);
|
|
5716
5713
|
}
|
|
5717
|
-
async function
|
|
5714
|
+
async function Ns(n) {
|
|
5718
5715
|
const { auth: e, user: t } = n;
|
|
5719
5716
|
return h(
|
|
5720
5717
|
t,
|
|
5721
5718
|
e,
|
|
5722
5719
|
"internal-error"
|
|
5723
5720
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
5724
|
-
),
|
|
5721
|
+
), cs(t, new Ze(n), n.bypassAuthState);
|
|
5725
5722
|
}
|
|
5726
5723
|
/**
|
|
5727
5724
|
* @license
|
|
@@ -5781,13 +5778,13 @@ class Cn {
|
|
|
5781
5778
|
switch (e) {
|
|
5782
5779
|
case "signInViaPopup":
|
|
5783
5780
|
case "signInViaRedirect":
|
|
5784
|
-
return
|
|
5781
|
+
return Os;
|
|
5785
5782
|
case "linkViaPopup":
|
|
5786
5783
|
case "linkViaRedirect":
|
|
5787
|
-
return
|
|
5784
|
+
return Ns;
|
|
5788
5785
|
case "reauthViaPopup":
|
|
5789
5786
|
case "reauthViaRedirect":
|
|
5790
|
-
return
|
|
5787
|
+
return Ds;
|
|
5791
5788
|
default:
|
|
5792
5789
|
T(
|
|
5793
5790
|
this.auth,
|
|
@@ -5822,7 +5819,7 @@ class Cn {
|
|
|
5822
5819
|
* See the License for the specific language governing permissions and
|
|
5823
5820
|
* limitations under the License.
|
|
5824
5821
|
*/
|
|
5825
|
-
const
|
|
5822
|
+
const Ls = new ne(2e3, 1e4);
|
|
5826
5823
|
class F extends Cn {
|
|
5827
5824
|
constructor(e, t, r, i, s) {
|
|
5828
5825
|
super(e, t, i, s), this.provider = r, this.authWindow = null, this.pollId = null, F.currentPopupAction && F.currentPopupAction.cancel(), F.currentPopupAction = this;
|
|
@@ -5886,7 +5883,7 @@ class F extends Cn {
|
|
|
5886
5883
|
);
|
|
5887
5884
|
return;
|
|
5888
5885
|
}
|
|
5889
|
-
this.pollId = window.setTimeout(e,
|
|
5886
|
+
this.pollId = window.setTimeout(e, Ls.get());
|
|
5890
5887
|
};
|
|
5891
5888
|
e();
|
|
5892
5889
|
}
|
|
@@ -5908,8 +5905,8 @@ F.currentPopupAction = null;
|
|
|
5908
5905
|
* See the License for the specific language governing permissions and
|
|
5909
5906
|
* limitations under the License.
|
|
5910
5907
|
*/
|
|
5911
|
-
const
|
|
5912
|
-
class
|
|
5908
|
+
const Ms = "pendingRedirect", ce = /* @__PURE__ */ new Map();
|
|
5909
|
+
class Us extends Cn {
|
|
5913
5910
|
constructor(e, t, r = !1) {
|
|
5914
5911
|
super(e, [
|
|
5915
5912
|
"signInViaRedirect",
|
|
@@ -5927,7 +5924,7 @@ class Bs extends Cn {
|
|
|
5927
5924
|
let e = ce.get(this.auth._key());
|
|
5928
5925
|
if (!e) {
|
|
5929
5926
|
try {
|
|
5930
|
-
const r = await
|
|
5927
|
+
const r = await xs(this.resolver, this.auth) ? await super.execute() : null;
|
|
5931
5928
|
e = () => Promise.resolve(r);
|
|
5932
5929
|
} catch (t) {
|
|
5933
5930
|
e = () => Promise.reject(t);
|
|
@@ -5955,26 +5952,26 @@ class Bs extends Cn {
|
|
|
5955
5952
|
cleanUp() {
|
|
5956
5953
|
}
|
|
5957
5954
|
}
|
|
5958
|
-
async function
|
|
5959
|
-
const t =
|
|
5955
|
+
async function xs(n, e) {
|
|
5956
|
+
const t = $s(e), r = Fs(n);
|
|
5960
5957
|
if (!await r._isAvailable())
|
|
5961
5958
|
return !1;
|
|
5962
5959
|
const i = await r._get(t) === "true";
|
|
5963
5960
|
return await r._remove(t), i;
|
|
5964
5961
|
}
|
|
5965
|
-
function
|
|
5962
|
+
function Bs(n, e) {
|
|
5966
5963
|
ce.set(n._key(), e);
|
|
5967
5964
|
}
|
|
5968
|
-
function
|
|
5965
|
+
function Fs(n) {
|
|
5969
5966
|
return w(n._redirectPersistence);
|
|
5970
5967
|
}
|
|
5971
|
-
function
|
|
5972
|
-
return oe(
|
|
5968
|
+
function $s(n) {
|
|
5969
|
+
return oe(Ms, n.config.apiKey, n.name);
|
|
5973
5970
|
}
|
|
5974
|
-
async function
|
|
5971
|
+
async function Hs(n, e, t = !1) {
|
|
5975
5972
|
if (v(n.app))
|
|
5976
5973
|
return Promise.reject(N(n));
|
|
5977
|
-
const r =
|
|
5974
|
+
const r = ye(n), i = Ps(r, e), a = await new Us(r, i, t).execute();
|
|
5978
5975
|
return a && !t && (delete a.user._redirectEventId, await r._persistUserIfCurrent(a.user), await r._setRedirectUser(null, e)), a;
|
|
5979
5976
|
}
|
|
5980
5977
|
/**
|
|
@@ -5993,8 +5990,8 @@ async function js(n, e, t = !1) {
|
|
|
5993
5990
|
* See the License for the specific language governing permissions and
|
|
5994
5991
|
* limitations under the License.
|
|
5995
5992
|
*/
|
|
5996
|
-
const
|
|
5997
|
-
class
|
|
5993
|
+
const Vs = 10 * 60 * 1e3;
|
|
5994
|
+
class js {
|
|
5998
5995
|
constructor(e) {
|
|
5999
5996
|
this.auth = e, this.cachedEventUids = /* @__PURE__ */ new Set(), this.consumers = /* @__PURE__ */ new Set(), this.queuedRedirectEvent = null, this.hasHandledPotentialRedirect = !1, this.lastProcessedEventTime = Date.now();
|
|
6000
5997
|
}
|
|
@@ -6010,7 +6007,7 @@ class zs {
|
|
|
6010
6007
|
let t = !1;
|
|
6011
6008
|
return this.consumers.forEach((r) => {
|
|
6012
6009
|
this.isEventForConsumer(e, r) && (t = !0, this.sendToConsumer(e, r), this.saveEventToCache(e));
|
|
6013
|
-
}), this.hasHandledPotentialRedirect || !
|
|
6010
|
+
}), this.hasHandledPotentialRedirect || !Ws(e) || (this.hasHandledPotentialRedirect = !0, t || (this.queuedRedirectEvent = e, t = !0)), t;
|
|
6014
6011
|
}
|
|
6015
6012
|
sendToConsumer(e, t) {
|
|
6016
6013
|
var r;
|
|
@@ -6025,7 +6022,7 @@ class zs {
|
|
|
6025
6022
|
return t.filter.includes(e.type) && r;
|
|
6026
6023
|
}
|
|
6027
6024
|
hasEventBeenHandled(e) {
|
|
6028
|
-
return Date.now() - this.lastProcessedEventTime >=
|
|
6025
|
+
return Date.now() - this.lastProcessedEventTime >= Vs && this.cachedEventUids.clear(), this.cachedEventUids.has(kt(e));
|
|
6029
6026
|
}
|
|
6030
6027
|
saveEventToCache(e) {
|
|
6031
6028
|
this.cachedEventUids.add(kt(e)), this.lastProcessedEventTime = Date.now();
|
|
@@ -6037,7 +6034,7 @@ function kt(n) {
|
|
|
6037
6034
|
function Pn({ type: n, error: e }) {
|
|
6038
6035
|
return n === "unknown" && (e == null ? void 0 : e.code) === "auth/no-auth-event";
|
|
6039
6036
|
}
|
|
6040
|
-
function
|
|
6037
|
+
function Ws(n) {
|
|
6041
6038
|
switch (n.type) {
|
|
6042
6039
|
case "signInViaRedirect":
|
|
6043
6040
|
case "linkViaRedirect":
|
|
@@ -6065,7 +6062,7 @@ function Gs(n) {
|
|
|
6065
6062
|
* See the License for the specific language governing permissions and
|
|
6066
6063
|
* limitations under the License.
|
|
6067
6064
|
*/
|
|
6068
|
-
async function
|
|
6065
|
+
async function zs(n, e = {}) {
|
|
6069
6066
|
return G(n, "GET", "/v1/projects", e);
|
|
6070
6067
|
}
|
|
6071
6068
|
/**
|
|
@@ -6084,14 +6081,14 @@ async function qs(n, e = {}) {
|
|
|
6084
6081
|
* See the License for the specific language governing permissions and
|
|
6085
6082
|
* limitations under the License.
|
|
6086
6083
|
*/
|
|
6087
|
-
const
|
|
6088
|
-
async function
|
|
6084
|
+
const Gs = /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/, qs = /^https?/;
|
|
6085
|
+
async function Ks(n) {
|
|
6089
6086
|
if (n.config.emulator)
|
|
6090
6087
|
return;
|
|
6091
|
-
const { authorizedDomains: e } = await
|
|
6088
|
+
const { authorizedDomains: e } = await zs(n);
|
|
6092
6089
|
for (const t of e)
|
|
6093
6090
|
try {
|
|
6094
|
-
if (
|
|
6091
|
+
if (Js(t))
|
|
6095
6092
|
return;
|
|
6096
6093
|
} catch {
|
|
6097
6094
|
}
|
|
@@ -6101,15 +6098,15 @@ async function Ys(n) {
|
|
|
6101
6098
|
/* AuthErrorCode.INVALID_ORIGIN */
|
|
6102
6099
|
);
|
|
6103
6100
|
}
|
|
6104
|
-
function
|
|
6105
|
-
const e =
|
|
6101
|
+
function Js(n) {
|
|
6102
|
+
const e = Fe(), { protocol: t, hostname: r } = new URL(e);
|
|
6106
6103
|
if (n.startsWith("chrome-extension://")) {
|
|
6107
6104
|
const a = new URL(n);
|
|
6108
6105
|
return a.hostname === "" && r === "" ? t === "chrome-extension:" && n.replace("chrome-extension://", "") === e.replace("chrome-extension://", "") : t === "chrome-extension:" && a.hostname === r;
|
|
6109
6106
|
}
|
|
6110
|
-
if (!
|
|
6107
|
+
if (!qs.test(t))
|
|
6111
6108
|
return !1;
|
|
6112
|
-
if (
|
|
6109
|
+
if (Gs.test(n))
|
|
6113
6110
|
return r === n;
|
|
6114
6111
|
const i = n.replace(/\./g, "\\.");
|
|
6115
6112
|
return new RegExp("^(.+\\." + i + "|" + i + ")$", "i").test(r);
|
|
@@ -6130,7 +6127,7 @@ function Xs(n) {
|
|
|
6130
6127
|
* See the License for the specific language governing permissions and
|
|
6131
6128
|
* limitations under the License.
|
|
6132
6129
|
*/
|
|
6133
|
-
const
|
|
6130
|
+
const Ys = new ne(3e4, 6e4);
|
|
6134
6131
|
function At() {
|
|
6135
6132
|
const n = y().___jsl;
|
|
6136
6133
|
if (n != null && n.H) {
|
|
@@ -6140,7 +6137,7 @@ function At() {
|
|
|
6140
6137
|
n.CP[t] = null;
|
|
6141
6138
|
}
|
|
6142
6139
|
}
|
|
6143
|
-
function
|
|
6140
|
+
function Xs(n) {
|
|
6144
6141
|
return new Promise((e, t) => {
|
|
6145
6142
|
var r, i, s;
|
|
6146
6143
|
function a() {
|
|
@@ -6155,7 +6152,7 @@ function Zs(n) {
|
|
|
6155
6152
|
/* AuthErrorCode.NETWORK_REQUEST_FAILED */
|
|
6156
6153
|
));
|
|
6157
6154
|
},
|
|
6158
|
-
timeout:
|
|
6155
|
+
timeout: Ys.get()
|
|
6159
6156
|
});
|
|
6160
6157
|
}
|
|
6161
6158
|
if (!((i = (r = y().gapi) === null || r === void 0 ? void 0 : r.iframes) === null || i === void 0) && i.Iframe)
|
|
@@ -6163,22 +6160,22 @@ function Zs(n) {
|
|
|
6163
6160
|
else if (!((s = y().gapi) === null || s === void 0) && s.load)
|
|
6164
6161
|
a();
|
|
6165
6162
|
else {
|
|
6166
|
-
const c =
|
|
6163
|
+
const c = ts("iframefcb");
|
|
6167
6164
|
return y()[c] = () => {
|
|
6168
6165
|
gapi.load ? a() : t(_(
|
|
6169
6166
|
n,
|
|
6170
6167
|
"network-request-failed"
|
|
6171
6168
|
/* AuthErrorCode.NETWORK_REQUEST_FAILED */
|
|
6172
6169
|
));
|
|
6173
|
-
},
|
|
6170
|
+
}, Zi(`${es()}?onload=${c}`).catch((o) => t(o));
|
|
6174
6171
|
}
|
|
6175
6172
|
}).catch((e) => {
|
|
6176
6173
|
throw le = null, e;
|
|
6177
6174
|
});
|
|
6178
6175
|
}
|
|
6179
6176
|
let le = null;
|
|
6180
|
-
function
|
|
6181
|
-
return le = le ||
|
|
6177
|
+
function Qs(n) {
|
|
6178
|
+
return le = le || Xs(n), le;
|
|
6182
6179
|
}
|
|
6183
6180
|
/**
|
|
6184
6181
|
* @license
|
|
@@ -6196,7 +6193,7 @@ function ea(n) {
|
|
|
6196
6193
|
* See the License for the specific language governing permissions and
|
|
6197
6194
|
* limitations under the License.
|
|
6198
6195
|
*/
|
|
6199
|
-
const
|
|
6196
|
+
const Zs = new ne(5e3, 15e3), ea = "__/auth/iframe", ta = "emulator/auth/iframe", na = {
|
|
6200
6197
|
style: {
|
|
6201
6198
|
position: "absolute",
|
|
6202
6199
|
top: "-100px",
|
|
@@ -6205,13 +6202,13 @@ const ta = new ne(5e3, 15e3), na = "__/auth/iframe", ra = "emulator/auth/iframe"
|
|
|
6205
6202
|
},
|
|
6206
6203
|
"aria-hidden": "true",
|
|
6207
6204
|
tabindex: "-1"
|
|
6208
|
-
},
|
|
6205
|
+
}, ra = /* @__PURE__ */ new Map([
|
|
6209
6206
|
["identitytoolkit.googleapis.com", "p"],
|
|
6210
6207
|
["staging-identitytoolkit.sandbox.googleapis.com", "s"],
|
|
6211
6208
|
["test-identitytoolkit.sandbox.googleapis.com", "t"]
|
|
6212
6209
|
// test
|
|
6213
6210
|
]);
|
|
6214
|
-
function
|
|
6211
|
+
function ia(n) {
|
|
6215
6212
|
const e = n.config;
|
|
6216
6213
|
h(
|
|
6217
6214
|
e.authDomain,
|
|
@@ -6219,17 +6216,17 @@ function aa(n) {
|
|
|
6219
6216
|
"auth-domain-config-required"
|
|
6220
6217
|
/* AuthErrorCode.MISSING_AUTH_DOMAIN */
|
|
6221
6218
|
);
|
|
6222
|
-
const t = e.emulator ? Ke(e,
|
|
6219
|
+
const t = e.emulator ? Ke(e, ta) : `https://${n.config.authDomain}/${ea}`, r = {
|
|
6223
6220
|
apiKey: e.apiKey,
|
|
6224
6221
|
appName: n.name,
|
|
6225
6222
|
v: te
|
|
6226
|
-
}, i =
|
|
6223
|
+
}, i = ra.get(n.config.apiHost);
|
|
6227
6224
|
i && (r.eid = i);
|
|
6228
6225
|
const s = n._getFrameworks();
|
|
6229
6226
|
return s.length && (r.fw = s.join(",")), `${t}?${ee(r).slice(1)}`;
|
|
6230
6227
|
}
|
|
6231
|
-
async function
|
|
6232
|
-
const e = await
|
|
6228
|
+
async function sa(n) {
|
|
6229
|
+
const e = await Qs(n), t = y().gapi;
|
|
6233
6230
|
return h(
|
|
6234
6231
|
t,
|
|
6235
6232
|
n,
|
|
@@ -6237,9 +6234,9 @@ async function oa(n) {
|
|
|
6237
6234
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
6238
6235
|
), e.open({
|
|
6239
6236
|
where: document.body,
|
|
6240
|
-
url:
|
|
6237
|
+
url: ia(n),
|
|
6241
6238
|
messageHandlersFilter: t.iframes.CROSS_ORIGIN_IFRAMES_FILTER,
|
|
6242
|
-
attributes:
|
|
6239
|
+
attributes: na,
|
|
6243
6240
|
dontclear: !0
|
|
6244
6241
|
}, (r) => new Promise(async (i, s) => {
|
|
6245
6242
|
await r.restyle({
|
|
@@ -6252,7 +6249,7 @@ async function oa(n) {
|
|
|
6252
6249
|
/* AuthErrorCode.NETWORK_REQUEST_FAILED */
|
|
6253
6250
|
), c = y().setTimeout(() => {
|
|
6254
6251
|
s(a);
|
|
6255
|
-
},
|
|
6252
|
+
}, Zs.get());
|
|
6256
6253
|
function o() {
|
|
6257
6254
|
y().clearTimeout(c), i(r);
|
|
6258
6255
|
}
|
|
@@ -6277,12 +6274,12 @@ async function oa(n) {
|
|
|
6277
6274
|
* See the License for the specific language governing permissions and
|
|
6278
6275
|
* limitations under the License.
|
|
6279
6276
|
*/
|
|
6280
|
-
const
|
|
6277
|
+
const aa = {
|
|
6281
6278
|
location: "yes",
|
|
6282
6279
|
resizable: "yes",
|
|
6283
6280
|
statusbar: "yes",
|
|
6284
6281
|
toolbar: "no"
|
|
6285
|
-
},
|
|
6282
|
+
}, oa = 500, ca = 600, la = "_blank", ua = "http://localhost";
|
|
6286
6283
|
class Rt {
|
|
6287
6284
|
constructor(e) {
|
|
6288
6285
|
this.window = e, this.associatedEvent = null;
|
|
@@ -6295,19 +6292,19 @@ class Rt {
|
|
|
6295
6292
|
}
|
|
6296
6293
|
}
|
|
6297
6294
|
}
|
|
6298
|
-
function
|
|
6295
|
+
function da(n, e, t, r = oa, i = ca) {
|
|
6299
6296
|
const s = Math.max((window.screen.availHeight - i) / 2, 0).toString(), a = Math.max((window.screen.availWidth - r) / 2, 0).toString();
|
|
6300
6297
|
let c = "";
|
|
6301
|
-
const o = Object.assign(Object.assign({},
|
|
6298
|
+
const o = Object.assign(Object.assign({}, aa), {
|
|
6302
6299
|
width: r.toString(),
|
|
6303
6300
|
height: i.toString(),
|
|
6304
6301
|
top: s,
|
|
6305
6302
|
left: a
|
|
6306
6303
|
}), l = g().toLowerCase();
|
|
6307
|
-
t && (c = un(l) ?
|
|
6304
|
+
t && (c = un(l) ? la : t), cn(l) && (e = e || ua, o.scrollbars = "yes");
|
|
6308
6305
|
const u = Object.entries(o).reduce((p, [m, B]) => `${p}${m}=${B},`, "");
|
|
6309
|
-
if (
|
|
6310
|
-
return
|
|
6306
|
+
if (zi(l) && c !== "_self")
|
|
6307
|
+
return ha(e || "", c), new Rt(null);
|
|
6311
6308
|
const d = window.open(e || "", c, u);
|
|
6312
6309
|
h(
|
|
6313
6310
|
d,
|
|
@@ -6321,7 +6318,7 @@ function fa(n, e, t, r = la, i = ua) {
|
|
|
6321
6318
|
}
|
|
6322
6319
|
return new Rt(d);
|
|
6323
6320
|
}
|
|
6324
|
-
function
|
|
6321
|
+
function ha(n, e) {
|
|
6325
6322
|
const t = document.createElement("a");
|
|
6326
6323
|
t.href = n, t.target = e;
|
|
6327
6324
|
const r = document.createEvent("MouseEvent");
|
|
@@ -6343,7 +6340,7 @@ function pa(n, e) {
|
|
|
6343
6340
|
* See the License for the specific language governing permissions and
|
|
6344
6341
|
* limitations under the License.
|
|
6345
6342
|
*/
|
|
6346
|
-
const
|
|
6343
|
+
const fa = "__/auth/handler", pa = "emulator/auth/handler", ma = encodeURIComponent("fac");
|
|
6347
6344
|
async function Ct(n, e, t, r, i, s) {
|
|
6348
6345
|
h(
|
|
6349
6346
|
n.config.authDomain,
|
|
@@ -6365,7 +6362,7 @@ async function Ct(n, e, t, r, i, s) {
|
|
|
6365
6362
|
eventId: i
|
|
6366
6363
|
};
|
|
6367
6364
|
if (e instanceof vn) {
|
|
6368
|
-
e.setDefaultLanguage(n.languageCode), a.providerId = e.providerId || "",
|
|
6365
|
+
e.setDefaultLanguage(n.languageCode), a.providerId = e.providerId || "", mr(e.getCustomParameters()) || (a.customParameters = JSON.stringify(e.getCustomParameters()));
|
|
6369
6366
|
for (const [u, d] of Object.entries({}))
|
|
6370
6367
|
a[u] = d;
|
|
6371
6368
|
}
|
|
@@ -6377,11 +6374,11 @@ async function Ct(n, e, t, r, i, s) {
|
|
|
6377
6374
|
const c = a;
|
|
6378
6375
|
for (const u of Object.keys(c))
|
|
6379
6376
|
c[u] === void 0 && delete c[u];
|
|
6380
|
-
const o = await n._getAppCheckToken(), l = o ? `#${
|
|
6381
|
-
return `${
|
|
6377
|
+
const o = await n._getAppCheckToken(), l = o ? `#${ma}=${encodeURIComponent(o)}` : "";
|
|
6378
|
+
return `${ga(n)}?${ee(c).slice(1)}${l}`;
|
|
6382
6379
|
}
|
|
6383
|
-
function
|
|
6384
|
-
return n.emulator ? Ke(n,
|
|
6380
|
+
function ga({ config: n }) {
|
|
6381
|
+
return n.emulator ? Ke(n, pa) : `https://${n.authDomain}/${fa}`;
|
|
6385
6382
|
}
|
|
6386
6383
|
/**
|
|
6387
6384
|
* @license
|
|
@@ -6399,23 +6396,23 @@ function ya({ config: n }) {
|
|
|
6399
6396
|
* See the License for the specific language governing permissions and
|
|
6400
6397
|
* limitations under the License.
|
|
6401
6398
|
*/
|
|
6402
|
-
const
|
|
6403
|
-
class
|
|
6399
|
+
const Oe = "webStorageSupport";
|
|
6400
|
+
class _a {
|
|
6404
6401
|
constructor() {
|
|
6405
|
-
this.eventManagers = {}, this.iframes = {}, this.originValidationPromises = {}, this._redirectPersistence = Tn, this._completeRedirectFn =
|
|
6402
|
+
this.eventManagers = {}, this.iframes = {}, this.originValidationPromises = {}, this._redirectPersistence = Tn, this._completeRedirectFn = Hs, this._overrideRedirectResult = Bs;
|
|
6406
6403
|
}
|
|
6407
6404
|
// Wrapping in async even though we don't await anywhere in order
|
|
6408
6405
|
// to make sure errors are raised as promise rejections
|
|
6409
6406
|
async _openPopup(e, t, r, i) {
|
|
6410
6407
|
var s;
|
|
6411
6408
|
S((s = this.eventManagers[e._key()]) === null || s === void 0 ? void 0 : s.manager, "_initialize() not called before _openPopup()");
|
|
6412
|
-
const a = await Ct(e, t, r,
|
|
6413
|
-
return
|
|
6409
|
+
const a = await Ct(e, t, r, Fe(), i);
|
|
6410
|
+
return da(e, a, Qe());
|
|
6414
6411
|
}
|
|
6415
6412
|
async _openRedirect(e, t, r, i) {
|
|
6416
6413
|
await this._originValidation(e);
|
|
6417
|
-
const s = await Ct(e, t, r,
|
|
6418
|
-
return
|
|
6414
|
+
const s = await Ct(e, t, r, Fe(), i);
|
|
6415
|
+
return bs(s), new Promise(() => {
|
|
6419
6416
|
});
|
|
6420
6417
|
}
|
|
6421
6418
|
_initialize(e) {
|
|
@@ -6430,7 +6427,7 @@ class va {
|
|
|
6430
6427
|
}), r;
|
|
6431
6428
|
}
|
|
6432
6429
|
async initAndGetManager(e) {
|
|
6433
|
-
const t = await
|
|
6430
|
+
const t = await sa(e), r = new js(e);
|
|
6434
6431
|
return t.register("authEvent", (i) => (h(
|
|
6435
6432
|
i == null ? void 0 : i.authEvent,
|
|
6436
6433
|
e,
|
|
@@ -6442,9 +6439,9 @@ class va {
|
|
|
6442
6439
|
}), gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER), this.eventManagers[e._key()] = { manager: r }, this.iframes[e._key()] = t, r;
|
|
6443
6440
|
}
|
|
6444
6441
|
_isIframeWebStorageSupported(e, t) {
|
|
6445
|
-
this.iframes[e._key()].send(
|
|
6442
|
+
this.iframes[e._key()].send(Oe, { type: Oe }, (i) => {
|
|
6446
6443
|
var s;
|
|
6447
|
-
const a = (s = i == null ? void 0 : i[0]) === null || s === void 0 ? void 0 : s[
|
|
6444
|
+
const a = (s = i == null ? void 0 : i[0]) === null || s === void 0 ? void 0 : s[Oe];
|
|
6448
6445
|
a !== void 0 && t(!!a), T(
|
|
6449
6446
|
e,
|
|
6450
6447
|
"internal-error"
|
|
@@ -6454,13 +6451,13 @@ class va {
|
|
|
6454
6451
|
}
|
|
6455
6452
|
_originValidation(e) {
|
|
6456
6453
|
const t = e._key();
|
|
6457
|
-
return this.originValidationPromises[t] || (this.originValidationPromises[t] =
|
|
6454
|
+
return this.originValidationPromises[t] || (this.originValidationPromises[t] = Ks(e)), this.originValidationPromises[t];
|
|
6458
6455
|
}
|
|
6459
6456
|
get _shouldInitProactively() {
|
|
6460
6457
|
return mn() || ln() || Ye();
|
|
6461
6458
|
}
|
|
6462
6459
|
}
|
|
6463
|
-
const
|
|
6460
|
+
const ya = _a;
|
|
6464
6461
|
var Pt = "@firebase/auth", Ot = "1.7.9";
|
|
6465
6462
|
/**
|
|
6466
6463
|
* @license
|
|
@@ -6478,7 +6475,7 @@ var Pt = "@firebase/auth", Ot = "1.7.9";
|
|
|
6478
6475
|
* See the License for the specific language governing permissions and
|
|
6479
6476
|
* limitations under the License.
|
|
6480
6477
|
*/
|
|
6481
|
-
class
|
|
6478
|
+
class va {
|
|
6482
6479
|
constructor(e) {
|
|
6483
6480
|
this.auth = e, this.internalListeners = /* @__PURE__ */ new Map();
|
|
6484
6481
|
}
|
|
@@ -6529,7 +6526,7 @@ class Ia {
|
|
|
6529
6526
|
* See the License for the specific language governing permissions and
|
|
6530
6527
|
* limitations under the License.
|
|
6531
6528
|
*/
|
|
6532
|
-
function
|
|
6529
|
+
function ba(n) {
|
|
6533
6530
|
switch (n) {
|
|
6534
6531
|
case "Node":
|
|
6535
6532
|
return "node";
|
|
@@ -6545,7 +6542,7 @@ function wa(n) {
|
|
|
6545
6542
|
return;
|
|
6546
6543
|
}
|
|
6547
6544
|
}
|
|
6548
|
-
function
|
|
6545
|
+
function Ia(n) {
|
|
6549
6546
|
Y(new W(
|
|
6550
6547
|
"auth",
|
|
6551
6548
|
(e, { options: t }) => {
|
|
@@ -6559,8 +6556,8 @@ function Ea(n) {
|
|
|
6559
6556
|
tokenApiHost: "securetoken.googleapis.com",
|
|
6560
6557
|
apiScheme: "https",
|
|
6561
6558
|
sdkClientVersion: gn(n)
|
|
6562
|
-
}, l = new
|
|
6563
|
-
return
|
|
6559
|
+
}, l = new Xi(r, i, s, o);
|
|
6560
|
+
return rs(l, t), l;
|
|
6564
6561
|
},
|
|
6565
6562
|
"PUBLIC"
|
|
6566
6563
|
/* ComponentType.PUBLIC */
|
|
@@ -6575,18 +6572,18 @@ function Ea(n) {
|
|
|
6575
6572
|
})), Y(new W(
|
|
6576
6573
|
"auth-internal",
|
|
6577
6574
|
(e) => {
|
|
6578
|
-
const t =
|
|
6575
|
+
const t = ye(e.getProvider(
|
|
6579
6576
|
"auth"
|
|
6580
6577
|
/* _ComponentName.AUTH */
|
|
6581
6578
|
).getImmediate());
|
|
6582
|
-
return ((r) => new
|
|
6579
|
+
return ((r) => new va(r))(t);
|
|
6583
6580
|
},
|
|
6584
6581
|
"PRIVATE"
|
|
6585
6582
|
/* ComponentType.PRIVATE */
|
|
6586
6583
|
).setInstantiationMode(
|
|
6587
6584
|
"EXPLICIT"
|
|
6588
6585
|
/* InstantiationMode.EXPLICIT */
|
|
6589
|
-
)), $(Pt, Ot,
|
|
6586
|
+
)), $(Pt, Ot, ba(n)), $(Pt, Ot, "esm2017");
|
|
6590
6587
|
}
|
|
6591
6588
|
/**
|
|
6592
6589
|
* @license
|
|
@@ -6604,11 +6601,11 @@ function Ea(n) {
|
|
|
6604
6601
|
* See the License for the specific language governing permissions and
|
|
6605
6602
|
* limitations under the License.
|
|
6606
6603
|
*/
|
|
6607
|
-
const
|
|
6604
|
+
const wa = 5 * 60, Ea = jt("authIdTokenMaxAge") || wa;
|
|
6608
6605
|
let Dt = null;
|
|
6609
|
-
const
|
|
6606
|
+
const Ta = (n) => async (e) => {
|
|
6610
6607
|
const t = e && await e.getIdTokenResult(), r = t && ((/* @__PURE__ */ new Date()).getTime() - Date.parse(t.issuedAtTime)) / 1e3;
|
|
6611
|
-
if (r && r >
|
|
6608
|
+
if (r && r > Ea)
|
|
6612
6609
|
return;
|
|
6613
6610
|
const i = t == null ? void 0 : t.token;
|
|
6614
6611
|
Dt !== i && (Dt = i, await fetch(n, {
|
|
@@ -6618,33 +6615,33 @@ const ka = (n) => async (e) => {
|
|
|
6618
6615
|
} : {}
|
|
6619
6616
|
}));
|
|
6620
6617
|
};
|
|
6621
|
-
function
|
|
6618
|
+
function Sa(n = _i()) {
|
|
6622
6619
|
const e = qt(n, "auth");
|
|
6623
6620
|
if (e.isInitialized())
|
|
6624
6621
|
return e.getImmediate();
|
|
6625
|
-
const t =
|
|
6626
|
-
popupRedirectResolver:
|
|
6622
|
+
const t = ns(n, {
|
|
6623
|
+
popupRedirectResolver: ya,
|
|
6627
6624
|
persistence: [
|
|
6628
|
-
|
|
6629
|
-
|
|
6625
|
+
Cs,
|
|
6626
|
+
_s,
|
|
6630
6627
|
Tn
|
|
6631
6628
|
]
|
|
6632
6629
|
}), r = jt("authTokenSyncURL");
|
|
6633
6630
|
if (r && typeof isSecureContext == "boolean" && isSecureContext) {
|
|
6634
6631
|
const s = new URL(r, location.origin);
|
|
6635
6632
|
if (location.origin === s.origin) {
|
|
6636
|
-
const a =
|
|
6637
|
-
|
|
6633
|
+
const a = Ta(s.toString());
|
|
6634
|
+
ps(t, a, () => a(t.currentUser)), fs(t, (c) => a(c));
|
|
6638
6635
|
}
|
|
6639
6636
|
}
|
|
6640
|
-
const i =
|
|
6641
|
-
return i &&
|
|
6637
|
+
const i = rr("auth");
|
|
6638
|
+
return i && is(t, `http://${i}`), t;
|
|
6642
6639
|
}
|
|
6643
|
-
function
|
|
6640
|
+
function ka() {
|
|
6644
6641
|
var n, e;
|
|
6645
6642
|
return (e = (n = document.getElementsByTagName("head")) === null || n === void 0 ? void 0 : n[0]) !== null && e !== void 0 ? e : document;
|
|
6646
6643
|
}
|
|
6647
|
-
|
|
6644
|
+
Qi({
|
|
6648
6645
|
loadJS(n) {
|
|
6649
6646
|
return new Promise((e, t) => {
|
|
6650
6647
|
const r = document.createElement("script");
|
|
@@ -6654,21 +6651,21 @@ es({
|
|
|
6654
6651
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
6655
6652
|
);
|
|
6656
6653
|
s.customData = i, t(s);
|
|
6657
|
-
}, r.type = "text/javascript", r.charset = "UTF-8",
|
|
6654
|
+
}, r.type = "text/javascript", r.charset = "UTF-8", ka().appendChild(r);
|
|
6658
6655
|
});
|
|
6659
6656
|
},
|
|
6660
6657
|
gapiScript: "https://apis.google.com/js/api.js",
|
|
6661
6658
|
recaptchaV2Script: "https://www.google.com/recaptcha/api.js",
|
|
6662
6659
|
recaptchaEnterpriseScript: "https://www.google.com/recaptcha/enterprise.js?render="
|
|
6663
6660
|
});
|
|
6664
|
-
|
|
6661
|
+
Ia(
|
|
6665
6662
|
"Browser"
|
|
6666
6663
|
/* ClientPlatform.BROWSER */
|
|
6667
6664
|
);
|
|
6668
|
-
const
|
|
6669
|
-
history:
|
|
6665
|
+
const Aa = Nn({
|
|
6666
|
+
history: Ln(),
|
|
6670
6667
|
routes: [
|
|
6671
|
-
...
|
|
6668
|
+
...je,
|
|
6672
6669
|
...K,
|
|
6673
6670
|
{
|
|
6674
6671
|
path: "/forbidden",
|
|
@@ -6677,18 +6674,18 @@ const Ca = Mn({
|
|
|
6677
6674
|
}
|
|
6678
6675
|
]
|
|
6679
6676
|
});
|
|
6680
|
-
let
|
|
6681
|
-
|
|
6677
|
+
let De, Ne;
|
|
6678
|
+
Aa.beforeEach(async (n) => {
|
|
6682
6679
|
const {
|
|
6683
6680
|
sessionUser: e,
|
|
6684
6681
|
currentRestaurant: t,
|
|
6685
6682
|
currentBusiness: r,
|
|
6686
6683
|
readRestaurants: i,
|
|
6687
6684
|
changeRestaurant: s
|
|
6688
|
-
} =
|
|
6685
|
+
} = Ve();
|
|
6689
6686
|
if (n.name && n.name.startsWith("mf-payment-admin")) {
|
|
6690
6687
|
if (!e.value) {
|
|
6691
|
-
|
|
6688
|
+
De || (De = new Promise((c) => {
|
|
6692
6689
|
const o = q(e, (l) => {
|
|
6693
6690
|
var u, d;
|
|
6694
6691
|
l && (o(), c(
|
|
@@ -6696,12 +6693,12 @@ Ca.beforeEach(async (n) => {
|
|
|
6696
6693
|
));
|
|
6697
6694
|
});
|
|
6698
6695
|
}));
|
|
6699
|
-
const a = await
|
|
6696
|
+
const a = await De;
|
|
6700
6697
|
return a || { name: "mf-payment-forbidden" };
|
|
6701
6698
|
}
|
|
6702
6699
|
return !0;
|
|
6703
6700
|
}
|
|
6704
|
-
return !r.value || !t.value ? (
|
|
6701
|
+
return !r.value || !t.value ? (Ne || (Ne = Promise.all([
|
|
6705
6702
|
new Promise(async (a) => {
|
|
6706
6703
|
const c = q(r, (o) => {
|
|
6707
6704
|
o && (c(), a(!0));
|
|
@@ -6713,17 +6710,17 @@ Ca.beforeEach(async (n) => {
|
|
|
6713
6710
|
}), o = await i();
|
|
6714
6711
|
await s(o == null ? void 0 : o.at(0));
|
|
6715
6712
|
})
|
|
6716
|
-
]).then((a) => !0)),
|
|
6713
|
+
]).then((a) => !0)), Ne) : !0;
|
|
6717
6714
|
});
|
|
6718
|
-
const
|
|
6715
|
+
const Ra = /* @__PURE__ */ Lt({
|
|
6719
6716
|
__name: "AppSidebar",
|
|
6720
6717
|
setup(n) {
|
|
6721
|
-
const e =
|
|
6718
|
+
const e = Ve(), t = Mn(), { t: r } = Vn(), i = xn(t.currentRoute.value.name);
|
|
6722
6719
|
q(t.currentRoute, () => {
|
|
6723
6720
|
let l = t.currentRoute.value.name;
|
|
6724
6721
|
t.currentRoute.value.meta.parent && (l = t.currentRoute.value.meta.parent), i.value = l;
|
|
6725
6722
|
});
|
|
6726
|
-
const s =
|
|
6723
|
+
const s = je.map((l) => {
|
|
6727
6724
|
var p, m;
|
|
6728
6725
|
if (!((p = l.meta) != null && p.sidebarDisplay) || l.meta.region && !((m = l.meta.region) != null && m[e.currentCountry.value]) || l.meta.section)
|
|
6729
6726
|
return;
|
|
@@ -6735,7 +6732,7 @@ const Pa = /* @__PURE__ */ Lt({
|
|
|
6735
6732
|
return t.push({ name: l.name });
|
|
6736
6733
|
}
|
|
6737
6734
|
};
|
|
6738
|
-
return l.meta.sidebarNew && (d.badge = () =>
|
|
6735
|
+
return l.meta.sidebarNew && (d.badge = () => Bn(Wn.FmPill, { label: "New" })), d;
|
|
6739
6736
|
}).filter((l) => !!l);
|
|
6740
6737
|
function a(l, u) {
|
|
6741
6738
|
return l.map((d) => {
|
|
@@ -6766,16 +6763,7 @@ const Pa = /* @__PURE__ */ Lt({
|
|
|
6766
6763
|
}).filter((l) => !!l), o = Nt(() => {
|
|
6767
6764
|
var u, d;
|
|
6768
6765
|
const l = [...s];
|
|
6769
|
-
return l.push({
|
|
6770
|
-
label: "",
|
|
6771
|
-
value: "divider",
|
|
6772
|
-
disabled: !0
|
|
6773
|
-
}), l.push({
|
|
6774
|
-
label: r("financing.title"),
|
|
6775
|
-
icon: "credit_score",
|
|
6776
|
-
value: "divider",
|
|
6777
|
-
disabled: !0
|
|
6778
|
-
}), l.push(...a(ue, "financing")), ((u = e.sessionUser.value) != null && u.role.isStaff || (d = e.sessionUser.value) != null && d.role.isAdmin) && (l.push({
|
|
6766
|
+
return ((u = e.sessionUser.value) != null && u.role.isStaff || (d = e.sessionUser.value) != null && d.role.isAdmin) && (l.push({
|
|
6779
6767
|
label: "",
|
|
6780
6768
|
value: "divider",
|
|
6781
6769
|
disabled: !0
|
|
@@ -6815,30 +6803,32 @@ const Pa = /* @__PURE__ */ Lt({
|
|
|
6815
6803
|
};
|
|
6816
6804
|
}
|
|
6817
6805
|
});
|
|
6818
|
-
var
|
|
6819
|
-
const
|
|
6806
|
+
var Ca = { firebase: { apiKey: "AIzaSyA_isPR1-9bX7UmRiJIhsIRNNwdn6DdmW4", authDomain: "feedme-253402.firebaseapp.com", databaseURL: "https://feedme-253402.firebaseio.com", projectId: "feedme-253402", storageBucket: "image.feedme.cc", messagingSenderId: "128512026847", appId: "1:128512026847:web:7c5c8ab7e8b90502dc616a", measurementId: "G-LTKS7N2HQS" } };
|
|
6807
|
+
const Ma = /* @__PURE__ */ Lt({
|
|
6820
6808
|
__name: "App",
|
|
6821
6809
|
setup(n) {
|
|
6822
|
-
const { state: e } =
|
|
6810
|
+
const { state: e } = Jn(), t = Ve(), r = Un(), i = Kt(Ca.firebase);
|
|
6823
6811
|
async function s() {
|
|
6824
6812
|
const a = t.sessionUser.value;
|
|
6825
6813
|
if (!a || !a.token) return;
|
|
6826
|
-
const c = await a.getCustomToken(), o =
|
|
6827
|
-
await
|
|
6814
|
+
const c = await a.getCustomToken(), o = Sa(i);
|
|
6815
|
+
await hs(o, c);
|
|
6828
6816
|
}
|
|
6829
|
-
return s(), q(t.sessionUser, s),
|
|
6817
|
+
return s(), q(t.sessionUser, s), Fn(() => {
|
|
6830
6818
|
e.isIframe && parent.postMessage({ event: "ready" }, "*");
|
|
6831
|
-
}),
|
|
6832
|
-
t.registerSidebarComponent(
|
|
6819
|
+
}), $n(() => {
|
|
6820
|
+
t.registerSidebarComponent(Ra);
|
|
6833
6821
|
}), (a, c) => {
|
|
6834
6822
|
const o = Mt("RouterView");
|
|
6835
6823
|
return Ut(), xt(o, {
|
|
6836
|
-
key:
|
|
6824
|
+
key: Hn(r).path
|
|
6837
6825
|
});
|
|
6838
6826
|
};
|
|
6839
6827
|
}
|
|
6840
|
-
}),
|
|
6841
|
-
const n = [
|
|
6828
|
+
}), Ua = () => {
|
|
6829
|
+
const n = [
|
|
6830
|
+
{ "en-US": Gn, "zh-CN": Kn }
|
|
6831
|
+
], e = new Set(
|
|
6842
6832
|
n.flatMap((t) => Object.keys(t))
|
|
6843
6833
|
);
|
|
6844
6834
|
return Array.from(e).reduce(
|
|
@@ -6851,10 +6841,10 @@ const Ba = /* @__PURE__ */ Lt({
|
|
|
6851
6841
|
},
|
|
6852
6842
|
{}
|
|
6853
6843
|
);
|
|
6854
|
-
},
|
|
6844
|
+
}, xa = [...K, ...je];
|
|
6855
6845
|
export {
|
|
6856
6846
|
mt as _,
|
|
6857
|
-
|
|
6858
|
-
|
|
6859
|
-
|
|
6847
|
+
Ma as a,
|
|
6848
|
+
Ua as i,
|
|
6849
|
+
xa as r
|
|
6860
6850
|
};
|