@laboratoria/sdk-js 7.2.0-beta.2 → 7.2.0-beta.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/laboratoria-sdk-es.js +175 -171
- package/dist/laboratoria-sdk-umd.js +52 -52
- package/package.json +1 -1
@@ -30,7 +30,7 @@
|
|
30
30
|
* See the License for the specific language governing permissions and
|
31
31
|
* limitations under the License.
|
32
32
|
*/
|
33
|
-
const
|
33
|
+
const Wt = function(n) {
|
34
34
|
const e = [];
|
35
35
|
let t = 0;
|
36
36
|
for (let r = 0; r < n.length; r++) {
|
@@ -131,7 +131,7 @@ const xt = function(n) {
|
|
131
131
|
* @return The base64 encoded string.
|
132
132
|
*/
|
133
133
|
encodeString(n, e) {
|
134
|
-
return this.HAS_NATIVE_SUPPORT && !e ? btoa(n) : this.encodeByteArray(
|
134
|
+
return this.HAS_NATIVE_SUPPORT && !e ? btoa(n) : this.encodeByteArray(Wt(n), e);
|
135
135
|
},
|
136
136
|
/**
|
137
137
|
* Base64-decode a string.
|
@@ -200,7 +200,7 @@ class Mn extends Error {
|
|
200
200
|
}
|
201
201
|
}
|
202
202
|
const Un = function(n) {
|
203
|
-
const e =
|
203
|
+
const e = Wt(n);
|
204
204
|
return zt.encodeByteArray(e, !0);
|
205
205
|
}, qt = function(n) {
|
206
206
|
return Un(n).replace(/\./g, "");
|
@@ -270,7 +270,7 @@ const Bn = () => jn().__FIREBASE_DEFAULTS__, Fn = () => {
|
|
270
270
|
}
|
271
271
|
const e = n && Jt(n[1]);
|
272
272
|
return e && JSON.parse(e);
|
273
|
-
},
|
273
|
+
}, it = () => {
|
274
274
|
try {
|
275
275
|
return Bn() || Fn() || Vn();
|
276
276
|
} catch (n) {
|
@@ -279,13 +279,13 @@ const Bn = () => jn().__FIREBASE_DEFAULTS__, Fn = () => {
|
|
279
279
|
}
|
280
280
|
}, Hn = (n) => {
|
281
281
|
var e, t;
|
282
|
-
return (t = (e =
|
282
|
+
return (t = (e = it()) === null || e === void 0 ? void 0 : e.emulatorHosts) === null || t === void 0 ? void 0 : t[n];
|
283
283
|
}, Gt = () => {
|
284
284
|
var n;
|
285
|
-
return (n =
|
285
|
+
return (n = it()) === null || n === void 0 ? void 0 : n.config;
|
286
286
|
}, Kt = (n) => {
|
287
287
|
var e;
|
288
|
-
return (e =
|
288
|
+
return (e = it()) === null || e === void 0 ? void 0 : e[`_${n}`];
|
289
289
|
};
|
290
290
|
/**
|
291
291
|
* @license
|
@@ -303,7 +303,7 @@ const Bn = () => jn().__FIREBASE_DEFAULTS__, Fn = () => {
|
|
303
303
|
* See the License for the specific language governing permissions and
|
304
304
|
* limitations under the License.
|
305
305
|
*/
|
306
|
-
class
|
306
|
+
class xn {
|
307
307
|
constructor() {
|
308
308
|
this.reject = () => {
|
309
309
|
}, this.resolve = () => {
|
@@ -342,7 +342,7 @@ class Wn {
|
|
342
342
|
function P() {
|
343
343
|
return typeof navigator < "u" && typeof navigator.userAgent == "string" ? navigator.userAgent : "";
|
344
344
|
}
|
345
|
-
function
|
345
|
+
function Wn() {
|
346
346
|
return typeof window < "u" && // @ts-ignore Setting up an broadly applicable index signature for Window
|
347
347
|
// just to deal with this case would probably be a bad idea.
|
348
348
|
!!(window.cordova || window.phonegap || window.PhoneGap) && /ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(P());
|
@@ -435,7 +435,7 @@ function Pe(n, e) {
|
|
435
435
|
if (!r.includes(i))
|
436
436
|
return !1;
|
437
437
|
const s = n[i], o = e[i];
|
438
|
-
if (
|
438
|
+
if (mt(s) && mt(o)) {
|
439
439
|
if (!Pe(s, o))
|
440
440
|
return !1;
|
441
441
|
} else if (s !== o)
|
@@ -446,7 +446,7 @@ function Pe(n, e) {
|
|
446
446
|
return !1;
|
447
447
|
return !0;
|
448
448
|
}
|
449
|
-
function
|
449
|
+
function mt(n) {
|
450
450
|
return n !== null && typeof n == "object";
|
451
451
|
}
|
452
452
|
/**
|
@@ -673,7 +673,7 @@ class rr {
|
|
673
673
|
get(e) {
|
674
674
|
const t = this.normalizeInstanceIdentifier(e);
|
675
675
|
if (!this.instancesDeferred.has(t)) {
|
676
|
-
const r = new
|
676
|
+
const r = new xn();
|
677
677
|
if (this.instancesDeferred.set(t, r), this.isInitialized(t) || this.shouldAutoInitialize())
|
678
678
|
try {
|
679
679
|
const i = this.getOrInitializeService({
|
@@ -975,9 +975,9 @@ class Yt {
|
|
975
975
|
}
|
976
976
|
}
|
977
977
|
const ur = (n, e) => e.some((t) => n instanceof t);
|
978
|
-
let
|
978
|
+
let yt, _t;
|
979
979
|
function hr() {
|
980
|
-
return
|
980
|
+
return yt || (yt = [
|
981
981
|
IDBDatabase,
|
982
982
|
IDBObjectStore,
|
983
983
|
IDBIndex,
|
@@ -986,13 +986,13 @@ function hr() {
|
|
986
986
|
]);
|
987
987
|
}
|
988
988
|
function fr() {
|
989
|
-
return
|
989
|
+
return _t || (_t = [
|
990
990
|
IDBCursor.prototype.advance,
|
991
991
|
IDBCursor.prototype.continue,
|
992
992
|
IDBCursor.prototype.continuePrimaryKey
|
993
993
|
]);
|
994
994
|
}
|
995
|
-
const Qt = /* @__PURE__ */ new WeakMap(), Ke = /* @__PURE__ */ new WeakMap(), Xt = /* @__PURE__ */ new WeakMap(),
|
995
|
+
const Qt = /* @__PURE__ */ new WeakMap(), Ke = /* @__PURE__ */ new WeakMap(), Xt = /* @__PURE__ */ new WeakMap(), xe = /* @__PURE__ */ new WeakMap(), st = /* @__PURE__ */ new WeakMap();
|
996
996
|
function pr(n) {
|
997
997
|
const e = new Promise((t, r) => {
|
998
998
|
const i = () => {
|
@@ -1007,7 +1007,7 @@ function pr(n) {
|
|
1007
1007
|
return e.then((t) => {
|
1008
1008
|
t instanceof IDBCursor && Qt.set(t, n);
|
1009
1009
|
}).catch(() => {
|
1010
|
-
}),
|
1010
|
+
}), st.set(e, n), e;
|
1011
1011
|
}
|
1012
1012
|
function gr(n) {
|
1013
1013
|
if (Ke.has(n))
|
@@ -1048,12 +1048,12 @@ function mr(n) {
|
|
1048
1048
|
}
|
1049
1049
|
function yr(n) {
|
1050
1050
|
return n === IDBDatabase.prototype.transaction && !("objectStoreNames" in IDBTransaction.prototype) ? function(e, ...t) {
|
1051
|
-
const r = n.call(
|
1051
|
+
const r = n.call(We(this), e, ...t);
|
1052
1052
|
return Xt.set(r, e.sort ? e.sort() : [e]), G(r);
|
1053
1053
|
} : fr().includes(n) ? function(...e) {
|
1054
|
-
return n.apply(
|
1054
|
+
return n.apply(We(this), e), G(Qt.get(this));
|
1055
1055
|
} : function(...e) {
|
1056
|
-
return G(n.apply(
|
1056
|
+
return G(n.apply(We(this), e));
|
1057
1057
|
};
|
1058
1058
|
}
|
1059
1059
|
function _r(n) {
|
@@ -1062,12 +1062,12 @@ function _r(n) {
|
|
1062
1062
|
function G(n) {
|
1063
1063
|
if (n instanceof IDBRequest)
|
1064
1064
|
return pr(n);
|
1065
|
-
if (
|
1066
|
-
return
|
1065
|
+
if (xe.has(n))
|
1066
|
+
return xe.get(n);
|
1067
1067
|
const e = _r(n);
|
1068
|
-
return e !== n && (
|
1068
|
+
return e !== n && (xe.set(n, e), st.set(e, n)), e;
|
1069
1069
|
}
|
1070
|
-
const
|
1070
|
+
const We = (n) => st.get(n);
|
1071
1071
|
function vr(n, e, { blocked: t, upgrade: r, blocking: i, terminated: s } = {}) {
|
1072
1072
|
const o = indexedDB.open(n, e), c = G(o);
|
1073
1073
|
return r && o.addEventListener("upgradeneeded", (a) => {
|
@@ -1083,7 +1083,7 @@ function vr(n, e, { blocked: t, upgrade: r, blocking: i, terminated: s } = {}) {
|
|
1083
1083
|
}), c;
|
1084
1084
|
}
|
1085
1085
|
const br = ["get", "getKey", "getAll", "getAllKeys", "count"], Ir = ["put", "add", "delete", "clear"], ze = /* @__PURE__ */ new Map();
|
1086
|
-
function
|
1086
|
+
function vt(n, e) {
|
1087
1087
|
if (!(n instanceof IDBDatabase && !(e in n) && typeof e == "string"))
|
1088
1088
|
return;
|
1089
1089
|
if (ze.get(e))
|
@@ -1106,8 +1106,8 @@ function _t(n, e) {
|
|
1106
1106
|
}
|
1107
1107
|
mr((n) => ({
|
1108
1108
|
...n,
|
1109
|
-
get: (e, t, r) =>
|
1110
|
-
has: (e, t) => !!
|
1109
|
+
get: (e, t, r) => vt(e, t) || n.get(e, t, r),
|
1110
|
+
has: (e, t) => !!vt(e, t) || n.has(e, t)
|
1111
1111
|
}));
|
1112
1112
|
/**
|
1113
1113
|
* @license
|
@@ -1145,7 +1145,7 @@ function Er(n) {
|
|
1145
1145
|
const e = n.getComponent();
|
1146
1146
|
return (e == null ? void 0 : e.type) === "VERSION";
|
1147
1147
|
}
|
1148
|
-
const Qe = "@firebase/app",
|
1148
|
+
const Qe = "@firebase/app", bt = "0.9.27";
|
1149
1149
|
/**
|
1150
1150
|
* @license
|
1151
1151
|
* Copyright 2019 Google LLC
|
@@ -1162,7 +1162,7 @@ const Qe = "@firebase/app", vt = "0.9.27";
|
|
1162
1162
|
* See the License for the specific language governing permissions and
|
1163
1163
|
* limitations under the License.
|
1164
1164
|
*/
|
1165
|
-
const ee = new Yt("@firebase/app"), Tr = "@firebase/app-compat", Sr = "@firebase/analytics-compat", Ar = "@firebase/analytics", Cr = "@firebase/app-check-compat", Rr = "@firebase/app-check", Pr = "@firebase/auth", Or = "@firebase/auth-compat", kr = "@firebase/database", Nr = "@firebase/database-compat", Dr = "@firebase/functions", Lr = "@firebase/functions-compat", $r = "@firebase/installations", Mr = "@firebase/installations-compat", Ur = "@firebase/messaging", jr = "@firebase/messaging-compat", Br = "@firebase/performance", Fr = "@firebase/performance-compat", Vr = "@firebase/remote-config", Hr = "@firebase/remote-config-compat",
|
1165
|
+
const ee = new Yt("@firebase/app"), Tr = "@firebase/app-compat", Sr = "@firebase/analytics-compat", Ar = "@firebase/analytics", Cr = "@firebase/app-check-compat", Rr = "@firebase/app-check", Pr = "@firebase/auth", Or = "@firebase/auth-compat", kr = "@firebase/database", Nr = "@firebase/database-compat", Dr = "@firebase/functions", Lr = "@firebase/functions-compat", $r = "@firebase/installations", Mr = "@firebase/installations-compat", Ur = "@firebase/messaging", jr = "@firebase/messaging-compat", Br = "@firebase/performance", Fr = "@firebase/performance-compat", Vr = "@firebase/remote-config", Hr = "@firebase/remote-config-compat", xr = "@firebase/storage", Wr = "@firebase/storage-compat", zr = "@firebase/firestore", qr = "@firebase/firestore-compat", Jr = "firebase", Gr = "10.8.0";
|
1166
1166
|
/**
|
1167
1167
|
* @license
|
1168
1168
|
* Copyright 2019 Google LLC
|
@@ -1200,8 +1200,8 @@ const Xe = "[DEFAULT]", Kr = {
|
|
1200
1200
|
[Fr]: "fire-perf-compat",
|
1201
1201
|
[Vr]: "fire-rc",
|
1202
1202
|
[Hr]: "fire-rc-compat",
|
1203
|
-
[
|
1204
|
-
[
|
1203
|
+
[xr]: "fire-gcs",
|
1204
|
+
[Wr]: "fire-gcs-compat",
|
1205
1205
|
[zr]: "fire-fst",
|
1206
1206
|
[qr]: "fire-fst-compat",
|
1207
1207
|
"fire-js": "fire-js",
|
@@ -1451,7 +1451,7 @@ async function ni(n) {
|
|
1451
1451
|
}
|
1452
1452
|
}
|
1453
1453
|
}
|
1454
|
-
async function
|
1454
|
+
async function It(n, e) {
|
1455
1455
|
try {
|
1456
1456
|
const r = (await tn()).transaction(pe, "readwrite");
|
1457
1457
|
await r.objectStore(pe).put(e, nn(n)), await r.done;
|
@@ -1501,7 +1501,7 @@ class si {
|
|
1501
1501
|
*/
|
1502
1502
|
async triggerHeartbeat() {
|
1503
1503
|
var e, t;
|
1504
|
-
const i = this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(), s =
|
1504
|
+
const i = this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(), s = wt();
|
1505
1505
|
if (!(((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((o) => o.date === s)))
|
1506
1506
|
return this._heartbeatsCache.heartbeats.push({ date: s, agent: i }), this._heartbeatsCache.heartbeats = this._heartbeatsCache.heartbeats.filter((o) => {
|
1507
1507
|
const c = new Date(o.date).valueOf();
|
@@ -1519,11 +1519,11 @@ class si {
|
|
1519
1519
|
var e;
|
1520
1520
|
if (this._heartbeatsCache === null && await this._heartbeatsCachePromise, ((e = this._heartbeatsCache) === null || e === void 0 ? void 0 : e.heartbeats) == null || this._heartbeatsCache.heartbeats.length === 0)
|
1521
1521
|
return "";
|
1522
|
-
const t =
|
1522
|
+
const t = wt(), { heartbeatsToSend: r, unsentEntries: i } = oi(this._heartbeatsCache.heartbeats), s = qt(JSON.stringify({ version: 2, heartbeats: r }));
|
1523
1523
|
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;
|
1524
1524
|
}
|
1525
1525
|
}
|
1526
|
-
function
|
1526
|
+
function wt() {
|
1527
1527
|
return (/* @__PURE__ */ new Date()).toISOString().substring(0, 10);
|
1528
1528
|
}
|
1529
1529
|
function oi(n, e = ri) {
|
@@ -1532,14 +1532,14 @@ function oi(n, e = ri) {
|
|
1532
1532
|
for (const i of n) {
|
1533
1533
|
const s = t.find((o) => o.agent === i.agent);
|
1534
1534
|
if (s) {
|
1535
|
-
if (s.dates.push(i.date),
|
1535
|
+
if (s.dates.push(i.date), Et(t) > e) {
|
1536
1536
|
s.dates.pop();
|
1537
1537
|
break;
|
1538
1538
|
}
|
1539
1539
|
} else if (t.push({
|
1540
1540
|
agent: i.agent,
|
1541
1541
|
dates: [i.date]
|
1542
|
-
}),
|
1542
|
+
}), Et(t) > e) {
|
1543
1543
|
t.pop();
|
1544
1544
|
break;
|
1545
1545
|
}
|
@@ -1572,7 +1572,7 @@ class ai {
|
|
1572
1572
|
var t;
|
1573
1573
|
if (await this._canUseIndexedDBPromise) {
|
1574
1574
|
const i = await this.read();
|
1575
|
-
return
|
1575
|
+
return It(this.app, {
|
1576
1576
|
lastSentHeartbeatDate: (t = e.lastSentHeartbeatDate) !== null && t !== void 0 ? t : i.lastSentHeartbeatDate,
|
1577
1577
|
heartbeats: e.heartbeats
|
1578
1578
|
});
|
@@ -1584,7 +1584,7 @@ class ai {
|
|
1584
1584
|
var t;
|
1585
1585
|
if (await this._canUseIndexedDBPromise) {
|
1586
1586
|
const i = await this.read();
|
1587
|
-
return
|
1587
|
+
return It(this.app, {
|
1588
1588
|
lastSentHeartbeatDate: (t = e.lastSentHeartbeatDate) !== null && t !== void 0 ? t : i.lastSentHeartbeatDate,
|
1589
1589
|
heartbeats: [
|
1590
1590
|
...i.heartbeats,
|
@@ -1595,7 +1595,7 @@ class ai {
|
|
1595
1595
|
return;
|
1596
1596
|
}
|
1597
1597
|
}
|
1598
|
-
function
|
1598
|
+
function Et(n) {
|
1599
1599
|
return qt(
|
1600
1600
|
// heartbeatsCache wrapper properties
|
1601
1601
|
JSON.stringify({ version: 2, heartbeats: n })
|
@@ -1628,7 +1628,7 @@ function ci(n) {
|
|
1628
1628
|
(e) => new si(e),
|
1629
1629
|
"PRIVATE"
|
1630
1630
|
/* ComponentType.PRIVATE */
|
1631
|
-
)), ie(Qe,
|
1631
|
+
)), ie(Qe, bt, n), ie(Qe, bt, "esm2017"), ie("fire-js", "");
|
1632
1632
|
}
|
1633
1633
|
ci("");
|
1634
1634
|
var li = "firebase", di = "10.8.0";
|
@@ -1649,7 +1649,7 @@ var li = "firebase", di = "10.8.0";
|
|
1649
1649
|
* limitations under the License.
|
1650
1650
|
*/
|
1651
1651
|
ie(li, di, "app");
|
1652
|
-
function
|
1652
|
+
function ot(n, e) {
|
1653
1653
|
var t = {};
|
1654
1654
|
for (var r in n)
|
1655
1655
|
Object.prototype.hasOwnProperty.call(n, r) && e.indexOf(r) < 0 && (t[r] = n[r]);
|
@@ -1704,10 +1704,10 @@ function Se(n, ...e) {
|
|
1704
1704
|
* limitations under the License.
|
1705
1705
|
*/
|
1706
1706
|
function L(n, ...e) {
|
1707
|
-
throw
|
1707
|
+
throw at(n, ...e);
|
1708
1708
|
}
|
1709
1709
|
function $(n, ...e) {
|
1710
|
-
return
|
1710
|
+
return at(n, ...e);
|
1711
1711
|
}
|
1712
1712
|
function fi(n, e, t) {
|
1713
1713
|
const r = Object.assign(Object.assign({}, ui()), { [e]: t });
|
@@ -1715,7 +1715,7 @@ function fi(n, e, t) {
|
|
1715
1715
|
appName: n.name
|
1716
1716
|
});
|
1717
1717
|
}
|
1718
|
-
function
|
1718
|
+
function at(n, ...e) {
|
1719
1719
|
if (typeof n != "string") {
|
1720
1720
|
const t = e[0], r = [...e.slice(1)];
|
1721
1721
|
return r[0] && (r[0].appName = n.name), n._errorFactory.create(t, ...r);
|
@@ -1724,7 +1724,7 @@ function ot(n, ...e) {
|
|
1724
1724
|
}
|
1725
1725
|
function _(n, e, ...t) {
|
1726
1726
|
if (!n)
|
1727
|
-
throw
|
1727
|
+
throw at(e, ...t);
|
1728
1728
|
}
|
1729
1729
|
function j(n) {
|
1730
1730
|
const e = "INTERNAL ASSERTION FAILED: " + n;
|
@@ -1754,9 +1754,9 @@ function et() {
|
|
1754
1754
|
return typeof self < "u" && ((n = self.location) === null || n === void 0 ? void 0 : n.href) || "";
|
1755
1755
|
}
|
1756
1756
|
function pi() {
|
1757
|
-
return
|
1757
|
+
return Tt() === "http:" || Tt() === "https:";
|
1758
1758
|
}
|
1759
|
-
function
|
1759
|
+
function Tt() {
|
1760
1760
|
var n;
|
1761
1761
|
return typeof self < "u" && ((n = self.location) === null || n === void 0 ? void 0 : n.protocol) || null;
|
1762
1762
|
}
|
@@ -1814,7 +1814,7 @@ function mi() {
|
|
1814
1814
|
*/
|
1815
1815
|
class Ie {
|
1816
1816
|
constructor(e, t) {
|
1817
|
-
this.shortDelay = e, this.longDelay = t, F(t > e, "Short delay should be less than long delay!"), this.isMobile =
|
1817
|
+
this.shortDelay = e, this.longDelay = t, F(t > e, "Short delay should be less than long delay!"), this.isMobile = Wn() || qn();
|
1818
1818
|
}
|
1819
1819
|
get() {
|
1820
1820
|
return gi() ? this.isMobile ? this.longDelay : this.shortDelay : Math.min(5e3, this.shortDelay);
|
@@ -1836,7 +1836,7 @@ class Ie {
|
|
1836
1836
|
* See the License for the specific language governing permissions and
|
1837
1837
|
* limitations under the License.
|
1838
1838
|
*/
|
1839
|
-
function
|
1839
|
+
function ct(n, e) {
|
1840
1840
|
F(n.emulator, "Emulator should always be set here");
|
1841
1841
|
const { url: t } = n.emulator;
|
1842
1842
|
return e ? `${t}${e.startsWith("/") ? e.slice(1) : e}` : t;
|
@@ -2067,7 +2067,7 @@ async function Ue(n, e, t, r, i = {}) {
|
|
2067
2067
|
}
|
2068
2068
|
function cn(n, e, t, r) {
|
2069
2069
|
const i = `${e}${t}?${r}`;
|
2070
|
-
return n.config.emulator ?
|
2070
|
+
return n.config.emulator ? ct(n.config, i) : `${n.config.apiScheme}://${i}`;
|
2071
2071
|
}
|
2072
2072
|
function vi(n) {
|
2073
2073
|
switch (n) {
|
@@ -2103,7 +2103,7 @@ function Te(n, e, t) {
|
|
2103
2103
|
const i = $(n, e, r);
|
2104
2104
|
return i.customData._tokenResponse = t, i;
|
2105
2105
|
}
|
2106
|
-
function
|
2106
|
+
function St(n) {
|
2107
2107
|
return n !== void 0 && n.enterprise !== void 0;
|
2108
2108
|
}
|
2109
2109
|
class Ii {
|
@@ -2187,7 +2187,7 @@ function he(n) {
|
|
2187
2187
|
}
|
2188
2188
|
}
|
2189
2189
|
async function Si(n, e = !1) {
|
2190
|
-
const t = V(n), r = await t.getIdToken(e), i =
|
2190
|
+
const t = V(n), r = await t.getIdToken(e), i = lt(r);
|
2191
2191
|
_(
|
2192
2192
|
i && i.exp && i.auth_time && i.iat,
|
2193
2193
|
t.auth,
|
@@ -2208,7 +2208,7 @@ async function Si(n, e = !1) {
|
|
2208
2208
|
function Je(n) {
|
2209
2209
|
return Number(n) * 1e3;
|
2210
2210
|
}
|
2211
|
-
function
|
2211
|
+
function lt(n) {
|
2212
2212
|
const [e, t, r] = n.split(".");
|
2213
2213
|
if (e === void 0 || t === void 0 || r === void 0)
|
2214
2214
|
return Se("JWT malformed, contained fewer than 3 sections"), null;
|
@@ -2220,7 +2220,7 @@ function ct(n) {
|
|
2220
2220
|
}
|
2221
2221
|
}
|
2222
2222
|
function Ai(n) {
|
2223
|
-
const e =
|
2223
|
+
const e = lt(n);
|
2224
2224
|
return _(
|
2225
2225
|
e,
|
2226
2226
|
"internal-error"
|
@@ -2408,7 +2408,7 @@ function Oi(n, e) {
|
|
2408
2408
|
}
|
2409
2409
|
function ki(n) {
|
2410
2410
|
return n.map((e) => {
|
2411
|
-
var { providerId: t } = e, r =
|
2411
|
+
var { providerId: t } = e, r = ot(e, ["providerId"]);
|
2412
2412
|
return {
|
2413
2413
|
providerId: t,
|
2414
2414
|
uid: r.rawId || "",
|
@@ -2560,12 +2560,12 @@ class me {
|
|
2560
2560
|
* See the License for the specific language governing permissions and
|
2561
2561
|
* limitations under the License.
|
2562
2562
|
*/
|
2563
|
-
function
|
2563
|
+
function x(n, e) {
|
2564
2564
|
_(typeof n == "string" || typeof n > "u", "internal-error", { appName: e });
|
2565
2565
|
}
|
2566
2566
|
class Z {
|
2567
2567
|
constructor(e) {
|
2568
|
-
var { uid: t, auth: r, stsTokenManager: i } = e, s =
|
2568
|
+
var { uid: t, auth: r, stsTokenManager: i } = e, s = ot(e, ["uid", "auth", "stsTokenManager"]);
|
2569
2569
|
this.providerId = "firebase", this.proactiveRefresh = new Ri(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 ln(s.createdAt || void 0, s.lastLoginAt || void 0);
|
2570
2570
|
}
|
2571
2571
|
async getIdToken(e) {
|
@@ -2659,7 +2659,7 @@ class Z {
|
|
2659
2659
|
e,
|
2660
2660
|
"internal-error"
|
2661
2661
|
/* AuthErrorCode.INTERNAL_ERROR */
|
2662
|
-
),
|
2662
|
+
), x(b, e.name), x(A, e.name), _(
|
2663
2663
|
typeof D == "boolean",
|
2664
2664
|
e,
|
2665
2665
|
"internal-error"
|
@@ -2669,7 +2669,7 @@ class Z {
|
|
2669
2669
|
e,
|
2670
2670
|
"internal-error"
|
2671
2671
|
/* AuthErrorCode.INTERNAL_ERROR */
|
2672
|
-
),
|
2672
|
+
), x(O, e.name), x(N, e.name), x(v, e.name), x(I, e.name), x(k, e.name), x(C, e.name);
|
2673
2673
|
const E = new Z({
|
2674
2674
|
uid: U,
|
2675
2675
|
auth: e,
|
@@ -2719,11 +2719,11 @@ class Z {
|
|
2719
2719
|
* See the License for the specific language governing permissions and
|
2720
2720
|
* limitations under the License.
|
2721
2721
|
*/
|
2722
|
-
const
|
2722
|
+
const At = /* @__PURE__ */ new Map();
|
2723
2723
|
function B(n) {
|
2724
2724
|
F(n instanceof Function, "Expected a class definition");
|
2725
|
-
let e =
|
2726
|
-
return e ? (F(e instanceof n, "Instance stored in cache mismatched with class"), e) : (e = new n(),
|
2725
|
+
let e = At.get(n);
|
2726
|
+
return e ? (F(e instanceof n, "Instance stored in cache mismatched with class"), e) : (e = new n(), At.set(n, e), e);
|
2727
2727
|
}
|
2728
2728
|
/**
|
2729
2729
|
* @license
|
@@ -2764,7 +2764,7 @@ class dn {
|
|
2764
2764
|
}
|
2765
2765
|
}
|
2766
2766
|
dn.type = "NONE";
|
2767
|
-
const
|
2767
|
+
const Ct = dn;
|
2768
2768
|
/**
|
2769
2769
|
* @license
|
2770
2770
|
* Copyright 2019 Google LLC
|
@@ -2815,12 +2815,12 @@ class se {
|
|
2815
2815
|
}
|
2816
2816
|
static async create(e, t, r = "authUser") {
|
2817
2817
|
if (!t.length)
|
2818
|
-
return new se(B(
|
2818
|
+
return new se(B(Ct), e, r);
|
2819
2819
|
const i = (await Promise.all(t.map(async (u) => {
|
2820
2820
|
if (await u._isAvailable())
|
2821
2821
|
return u;
|
2822
2822
|
}))).filter((u) => u);
|
2823
|
-
let s = i[0] || B(
|
2823
|
+
let s = i[0] || B(Ct);
|
2824
2824
|
const o = Ae(r, e.config.apiKey, e.name);
|
2825
2825
|
let c = null;
|
2826
2826
|
for (const u of t)
|
@@ -2859,7 +2859,7 @@ class se {
|
|
2859
2859
|
* See the License for the specific language governing permissions and
|
2860
2860
|
* limitations under the License.
|
2861
2861
|
*/
|
2862
|
-
function
|
2862
|
+
function Rt(n) {
|
2863
2863
|
const e = n.toLowerCase();
|
2864
2864
|
if (e.includes("opera/") || e.includes("opr/") || e.includes("opios/"))
|
2865
2865
|
return "Opera";
|
@@ -2877,7 +2877,7 @@ function Ct(n) {
|
|
2877
2877
|
return "Blackberry";
|
2878
2878
|
if (mn(e))
|
2879
2879
|
return "Webos";
|
2880
|
-
if (
|
2880
|
+
if (dt(e))
|
2881
2881
|
return "Safari";
|
2882
2882
|
if ((e.includes("chrome/") || hn(e)) && !e.includes("edge/"))
|
2883
2883
|
return "Chrome";
|
@@ -2893,7 +2893,7 @@ function Ct(n) {
|
|
2893
2893
|
function un(n = P()) {
|
2894
2894
|
return /firefox\//i.test(n);
|
2895
2895
|
}
|
2896
|
-
function
|
2896
|
+
function dt(n = P()) {
|
2897
2897
|
const e = n.toLowerCase();
|
2898
2898
|
return e.includes("safari/") && !e.includes("chrome/") && !e.includes("crios/") && !e.includes("android");
|
2899
2899
|
}
|
@@ -2952,10 +2952,10 @@ function _n(n, e = []) {
|
|
2952
2952
|
let t;
|
2953
2953
|
switch (n) {
|
2954
2954
|
case "Browser":
|
2955
|
-
t =
|
2955
|
+
t = Rt(P());
|
2956
2956
|
break;
|
2957
2957
|
case "Worker":
|
2958
|
-
t = `${
|
2958
|
+
t = `${Rt(P())}-${n}`;
|
2959
2959
|
break;
|
2960
2960
|
default:
|
2961
2961
|
t = n;
|
@@ -3143,7 +3143,7 @@ class Fi {
|
|
3143
3143
|
*/
|
3144
3144
|
class Vi {
|
3145
3145
|
constructor(e, t, r, i) {
|
3146
|
-
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
|
3146
|
+
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 Pt(this), this.idTokenSubscription = new Pt(this), this.beforeStateQueue = new Ui(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 = sn, 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;
|
3147
3147
|
}
|
3148
3148
|
_initializeWithPersistence(e, t) {
|
3149
3149
|
return t && (this._popupRedirectResolver = B(t)), this._initializationPromise = this.queue(async () => {
|
@@ -3461,7 +3461,7 @@ class Vi {
|
|
3461
3461
|
function ne(n) {
|
3462
3462
|
return V(n);
|
3463
3463
|
}
|
3464
|
-
class
|
3464
|
+
class Pt {
|
3465
3465
|
constructor(e) {
|
3466
3466
|
this.auth = e, this.observer = null, this.addObserver = er((t) => this.observer = t);
|
3467
3467
|
}
|
@@ -3504,10 +3504,10 @@ function Hi(n) {
|
|
3504
3504
|
function vn(n) {
|
3505
3505
|
return Be.loadJS(n);
|
3506
3506
|
}
|
3507
|
-
function
|
3507
|
+
function xi() {
|
3508
3508
|
return Be.recaptchaEnterpriseScript;
|
3509
3509
|
}
|
3510
|
-
function
|
3510
|
+
function Wi() {
|
3511
3511
|
return Be.gapiScript;
|
3512
3512
|
}
|
3513
3513
|
function zi(n) {
|
@@ -3555,7 +3555,7 @@ class Gi {
|
|
3555
3555
|
}
|
3556
3556
|
function i(s, o, c) {
|
3557
3557
|
const a = window.grecaptcha;
|
3558
|
-
|
3558
|
+
St(a) ? a.enterprise.ready(() => {
|
3559
3559
|
a.enterprise.execute(s, { action: e }).then((u) => {
|
3560
3560
|
o(u);
|
3561
3561
|
}).catch(() => {
|
@@ -3565,14 +3565,14 @@ class Gi {
|
|
3565
3565
|
}
|
3566
3566
|
return new Promise((s, o) => {
|
3567
3567
|
r(this.auth).then((c) => {
|
3568
|
-
if (!t &&
|
3568
|
+
if (!t && St(window.grecaptcha))
|
3569
3569
|
i(c, s, o);
|
3570
3570
|
else {
|
3571
3571
|
if (typeof window > "u") {
|
3572
3572
|
o(new Error("RecaptchaVerifier is only supported in browser"));
|
3573
3573
|
return;
|
3574
3574
|
}
|
3575
|
-
let a =
|
3575
|
+
let a = xi();
|
3576
3576
|
a.length !== 0 && (a += c), vn(a).then(() => {
|
3577
3577
|
i(c, s, o);
|
3578
3578
|
}).catch((u) => {
|
@@ -3585,7 +3585,7 @@ class Gi {
|
|
3585
3585
|
});
|
3586
3586
|
}
|
3587
3587
|
}
|
3588
|
-
async function
|
3588
|
+
async function Ot(n, e, t, r = !1) {
|
3589
3589
|
const i = new Gi(n);
|
3590
3590
|
let s;
|
3591
3591
|
try {
|
@@ -3608,7 +3608,7 @@ async function tt(n, e, t, r) {
|
|
3608
3608
|
"EMAIL_PASSWORD_PROVIDER"
|
3609
3609
|
/* RecaptchaProvider.EMAIL_PASSWORD_PROVIDER */
|
3610
3610
|
)) {
|
3611
|
-
const s = await
|
3611
|
+
const s = await Ot(
|
3612
3612
|
n,
|
3613
3613
|
e,
|
3614
3614
|
t,
|
@@ -3620,7 +3620,7 @@ async function tt(n, e, t, r) {
|
|
3620
3620
|
return r(n, e).catch(async (s) => {
|
3621
3621
|
if (s.code === "auth/missing-recaptcha-token") {
|
3622
3622
|
console.log(`${t} is protected by reCAPTCHA Enterprise for this project. Automatically triggering the reCAPTCHA flow and restarting the flow.`);
|
3623
|
-
const o = await
|
3623
|
+
const o = await Ot(
|
3624
3624
|
n,
|
3625
3625
|
e,
|
3626
3626
|
t,
|
@@ -3698,13 +3698,13 @@ function Xi(n) {
|
|
3698
3698
|
const r = t[2].split("@").pop() || "", i = /^(\[[^\]]+\])(:|$)/.exec(r);
|
3699
3699
|
if (i) {
|
3700
3700
|
const s = i[1];
|
3701
|
-
return { host: s, port:
|
3701
|
+
return { host: s, port: kt(r.substr(s.length + 1)) };
|
3702
3702
|
} else {
|
3703
3703
|
const [s, o] = r.split(":");
|
3704
|
-
return { host: s, port:
|
3704
|
+
return { host: s, port: kt(o) };
|
3705
3705
|
}
|
3706
3706
|
}
|
3707
|
-
function
|
3707
|
+
function kt(n) {
|
3708
3708
|
if (!n)
|
3709
3709
|
return null;
|
3710
3710
|
const e = Number(n);
|
@@ -3733,7 +3733,7 @@ function Zi() {
|
|
3733
3733
|
* See the License for the specific language governing permissions and
|
3734
3734
|
* limitations under the License.
|
3735
3735
|
*/
|
3736
|
-
class
|
3736
|
+
class ut {
|
3737
3737
|
/** @internal */
|
3738
3738
|
constructor(e, t) {
|
3739
3739
|
this.providerId = e, this.signInMethod = t;
|
@@ -3825,7 +3825,7 @@ async function ss(n, e) {
|
|
3825
3825
|
* See the License for the specific language governing permissions and
|
3826
3826
|
* limitations under the License.
|
3827
3827
|
*/
|
3828
|
-
class ye extends
|
3828
|
+
class ye extends ut {
|
3829
3829
|
/** @internal */
|
3830
3830
|
constructor(e, t, r, i = null) {
|
3831
3831
|
super("password", r), this._email = e, this._password = t, this._tenantId = i;
|
@@ -3963,7 +3963,7 @@ async function oe(n, e) {
|
|
3963
3963
|
* limitations under the License.
|
3964
3964
|
*/
|
3965
3965
|
const os = "http://localhost";
|
3966
|
-
class te extends
|
3966
|
+
class te extends ut {
|
3967
3967
|
constructor() {
|
3968
3968
|
super(...arguments), this.pendingToken = null;
|
3969
3969
|
}
|
@@ -3997,7 +3997,7 @@ class te extends dt {
|
|
3997
3997
|
* @returns If the JSON input does not represent an {@link AuthCredential}, null is returned.
|
3998
3998
|
*/
|
3999
3999
|
static fromJSON(e) {
|
4000
|
-
const t = typeof e == "string" ? JSON.parse(e) : e, { providerId: r, signInMethod: i } = t, s =
|
4000
|
+
const t = typeof e == "string" ? JSON.parse(e) : e, { providerId: r, signInMethod: i } = t, s = ot(t, ["providerId", "signInMethod"]);
|
4001
4001
|
if (!r || !i)
|
4002
4002
|
return null;
|
4003
4003
|
const o = new te(r, i);
|
@@ -4070,7 +4070,7 @@ function cs(n) {
|
|
4070
4070
|
const e = de(ue(n)).link, t = e ? de(ue(e)).deep_link_id : null, r = de(ue(n)).deep_link_id;
|
4071
4071
|
return (r ? de(ue(r)).link : null) || r || t || e || n;
|
4072
4072
|
}
|
4073
|
-
class
|
4073
|
+
class ht {
|
4074
4074
|
/**
|
4075
4075
|
* @param actionLink - The link from which to extract the URL.
|
4076
4076
|
* @returns The {@link ActionCodeURL} object, or null if the link is invalid.
|
@@ -4098,7 +4098,7 @@ class ut {
|
|
4098
4098
|
static parseLink(e) {
|
4099
4099
|
const t = cs(e);
|
4100
4100
|
try {
|
4101
|
-
return new
|
4101
|
+
return new ht(t);
|
4102
4102
|
} catch {
|
4103
4103
|
return null;
|
4104
4104
|
}
|
@@ -4168,7 +4168,7 @@ class le {
|
|
4168
4168
|
* @returns - The auth provider credential.
|
4169
4169
|
*/
|
4170
4170
|
static credentialWithLink(e, t) {
|
4171
|
-
const r =
|
4171
|
+
const r = ht.parseLink(t);
|
4172
4172
|
return _(
|
4173
4173
|
r,
|
4174
4174
|
"argument-error"
|
@@ -4283,7 +4283,7 @@ class we extends In {
|
|
4283
4283
|
* See the License for the specific language governing permissions and
|
4284
4284
|
* limitations under the License.
|
4285
4285
|
*/
|
4286
|
-
class
|
4286
|
+
class W extends we {
|
4287
4287
|
constructor() {
|
4288
4288
|
super(
|
4289
4289
|
"facebook.com"
|
@@ -4304,8 +4304,8 @@ class x extends we {
|
|
4304
4304
|
*/
|
4305
4305
|
static credential(e) {
|
4306
4306
|
return te._fromParams({
|
4307
|
-
providerId:
|
4308
|
-
signInMethod:
|
4307
|
+
providerId: W.PROVIDER_ID,
|
4308
|
+
signInMethod: W.FACEBOOK_SIGN_IN_METHOD,
|
4309
4309
|
accessToken: e
|
4310
4310
|
});
|
4311
4311
|
}
|
@@ -4315,7 +4315,7 @@ class x extends we {
|
|
4315
4315
|
* @param userCredential - The user credential.
|
4316
4316
|
*/
|
4317
4317
|
static credentialFromResult(e) {
|
4318
|
-
return
|
4318
|
+
return W.credentialFromTaggedObject(e);
|
4319
4319
|
}
|
4320
4320
|
/**
|
4321
4321
|
* Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was
|
@@ -4324,20 +4324,20 @@ class x extends we {
|
|
4324
4324
|
* @param userCredential - The user credential.
|
4325
4325
|
*/
|
4326
4326
|
static credentialFromError(e) {
|
4327
|
-
return
|
4327
|
+
return W.credentialFromTaggedObject(e.customData || {});
|
4328
4328
|
}
|
4329
4329
|
static credentialFromTaggedObject({ _tokenResponse: e }) {
|
4330
4330
|
if (!e || !("oauthAccessToken" in e) || !e.oauthAccessToken)
|
4331
4331
|
return null;
|
4332
4332
|
try {
|
4333
|
-
return
|
4333
|
+
return W.credential(e.oauthAccessToken);
|
4334
4334
|
} catch {
|
4335
4335
|
return null;
|
4336
4336
|
}
|
4337
4337
|
}
|
4338
4338
|
}
|
4339
|
-
|
4340
|
-
|
4339
|
+
W.FACEBOOK_SIGN_IN_METHOD = "facebook.com";
|
4340
|
+
W.PROVIDER_ID = "facebook.com";
|
4341
4341
|
/**
|
4342
4342
|
* @license
|
4343
4343
|
* Copyright 2020 Google LLC
|
@@ -4568,7 +4568,7 @@ class ce {
|
|
4568
4568
|
this.user = e.user, this.providerId = e.providerId, this._tokenResponse = e._tokenResponse, this.operationType = e.operationType;
|
4569
4569
|
}
|
4570
4570
|
static async _fromIdTokenResponse(e, t, r, i = !1) {
|
4571
|
-
const s = await Z._fromIdTokenResponse(e, r, i), o =
|
4571
|
+
const s = await Z._fromIdTokenResponse(e, r, i), o = Nt(r);
|
4572
4572
|
return new ce({
|
4573
4573
|
user: s,
|
4574
4574
|
providerId: o,
|
@@ -4582,7 +4582,7 @@ class ce {
|
|
4582
4582
|
/* reload */
|
4583
4583
|
!0
|
4584
4584
|
);
|
4585
|
-
const i =
|
4585
|
+
const i = Nt(r);
|
4586
4586
|
return new ce({
|
4587
4587
|
user: e,
|
4588
4588
|
providerId: i,
|
@@ -4591,7 +4591,7 @@ class ce {
|
|
4591
4591
|
});
|
4592
4592
|
}
|
4593
4593
|
}
|
4594
|
-
function
|
4594
|
+
function Nt(n) {
|
4595
4595
|
return n.providerId ? n.providerId : "phoneNumber" in n ? "phone" : null;
|
4596
4596
|
}
|
4597
4597
|
/**
|
@@ -4659,7 +4659,7 @@ async function ds(n, e, t = !1) {
|
|
4659
4659
|
"internal-error"
|
4660
4660
|
/* AuthErrorCode.INTERNAL_ERROR */
|
4661
4661
|
);
|
4662
|
-
const o =
|
4662
|
+
const o = lt(s.idToken);
|
4663
4663
|
_(
|
4664
4664
|
o,
|
4665
4665
|
r,
|
@@ -4850,7 +4850,7 @@ class Tn {
|
|
4850
4850
|
*/
|
4851
4851
|
function bs() {
|
4852
4852
|
const n = P();
|
4853
|
-
return
|
4853
|
+
return dt(n) || je(n);
|
4854
4854
|
}
|
4855
4855
|
const Is = 1e3, ws = 10;
|
4856
4856
|
class Sn extends Tn {
|
@@ -5102,7 +5102,7 @@ Fe.receivers = [];
|
|
5102
5102
|
* See the License for the specific language governing permissions and
|
5103
5103
|
* limitations under the License.
|
5104
5104
|
*/
|
5105
|
-
function
|
5105
|
+
function ft(n = "", e = 10) {
|
5106
5106
|
let t = "";
|
5107
5107
|
for (let r = 0; r < e; r++)
|
5108
5108
|
t += Math.floor(Math.random() * 10);
|
@@ -5158,7 +5158,7 @@ class Ss {
|
|
5158
5158
|
);
|
5159
5159
|
let s, o;
|
5160
5160
|
return new Promise((c, a) => {
|
5161
|
-
const u =
|
5161
|
+
const u = ft("", 20);
|
5162
5162
|
i.port1.start();
|
5163
5163
|
const y = setTimeout(() => {
|
5164
5164
|
a(new Error(
|
@@ -5318,7 +5318,7 @@ function nt() {
|
|
5318
5318
|
});
|
5319
5319
|
});
|
5320
5320
|
}
|
5321
|
-
async function
|
5321
|
+
async function Dt(n, e, t) {
|
5322
5322
|
const r = Ve(n, !0).put({
|
5323
5323
|
[On]: e,
|
5324
5324
|
value: t
|
@@ -5329,7 +5329,7 @@ async function Ns(n, e) {
|
|
5329
5329
|
const t = Ve(n, !1).get(e), r = await new Ee(t).toPromise();
|
5330
5330
|
return r === void 0 ? null : r.value;
|
5331
5331
|
}
|
5332
|
-
function
|
5332
|
+
function Lt(n, e) {
|
5333
5333
|
const t = Ve(n, !0).delete(e);
|
5334
5334
|
return new Ee(t).toPromise();
|
5335
5335
|
}
|
@@ -5423,7 +5423,7 @@ class kn {
|
|
5423
5423
|
if (!indexedDB)
|
5424
5424
|
return !1;
|
5425
5425
|
const e = await nt();
|
5426
|
-
return await
|
5426
|
+
return await Dt(e, Le, "1"), await Lt(e, Le), !0;
|
5427
5427
|
} catch {
|
5428
5428
|
}
|
5429
5429
|
return !1;
|
@@ -5437,14 +5437,14 @@ class kn {
|
|
5437
5437
|
}
|
5438
5438
|
}
|
5439
5439
|
async _set(e, t) {
|
5440
|
-
return this._withPendingWrite(async () => (await this._withRetries((r) =>
|
5440
|
+
return this._withPendingWrite(async () => (await this._withRetries((r) => Dt(r, e, t)), this.localCache[e] = t, this.notifyServiceWorker(e)));
|
5441
5441
|
}
|
5442
5442
|
async _get(e) {
|
5443
5443
|
const t = await this._withRetries((r) => Ns(r, e));
|
5444
5444
|
return this.localCache[e] = t, t;
|
5445
5445
|
}
|
5446
5446
|
async _remove(e) {
|
5447
|
-
return this._withPendingWrite(async () => (await this._withRetries((t) =>
|
5447
|
+
return this._withPendingWrite(async () => (await this._withRetries((t) => Lt(t, e)), delete this.localCache[e], this.notifyServiceWorker(e)));
|
5448
5448
|
}
|
5449
5449
|
async _poll() {
|
5450
5450
|
const e = await this._withRetries((i) => {
|
@@ -5526,7 +5526,7 @@ function Ms(n, e) {
|
|
5526
5526
|
* See the License for the specific language governing permissions and
|
5527
5527
|
* limitations under the License.
|
5528
5528
|
*/
|
5529
|
-
class
|
5529
|
+
class pt extends ut {
|
5530
5530
|
constructor(e) {
|
5531
5531
|
super(
|
5532
5532
|
"custom",
|
@@ -5557,7 +5557,7 @@ class ft extends dt {
|
|
5557
5557
|
}
|
5558
5558
|
}
|
5559
5559
|
function Us(n) {
|
5560
|
-
return En(n.auth, new
|
5560
|
+
return En(n.auth, new pt(n), n.bypassAuthState);
|
5561
5561
|
}
|
5562
5562
|
function js(n) {
|
5563
5563
|
const { auth: e, user: t } = n;
|
@@ -5566,7 +5566,7 @@ function js(n) {
|
|
5566
5566
|
e,
|
5567
5567
|
"internal-error"
|
5568
5568
|
/* AuthErrorCode.INTERNAL_ERROR */
|
5569
|
-
), ds(t, new
|
5569
|
+
), ds(t, new pt(n), n.bypassAuthState);
|
5570
5570
|
}
|
5571
5571
|
async function Bs(n) {
|
5572
5572
|
const { auth: e, user: t } = n;
|
@@ -5575,7 +5575,7 @@ async function Bs(n) {
|
|
5575
5575
|
e,
|
5576
5576
|
"internal-error"
|
5577
5577
|
/* AuthErrorCode.INTERNAL_ERROR */
|
5578
|
-
), ls(t, new
|
5578
|
+
), ls(t, new pt(n), n.bypassAuthState);
|
5579
5579
|
}
|
5580
5580
|
/**
|
5581
5581
|
* @license
|
@@ -5692,7 +5692,7 @@ class re extends Nn {
|
|
5692
5692
|
}
|
5693
5693
|
async onExecution() {
|
5694
5694
|
F(this.filter.length === 1, "Popup operations only handle one event");
|
5695
|
-
const e =
|
5695
|
+
const e = ft();
|
5696
5696
|
this.authWindow = await this.resolver._openPopup(
|
5697
5697
|
this.auth,
|
5698
5698
|
this.provider,
|
@@ -5781,7 +5781,7 @@ class Hs extends Nn {
|
|
5781
5781
|
let e = Ce.get(this.auth._key());
|
5782
5782
|
if (!e) {
|
5783
5783
|
try {
|
5784
|
-
const r = await
|
5784
|
+
const r = await xs(this.resolver, this.auth) ? await super.execute() : null;
|
5785
5785
|
e = () => Promise.resolve(r);
|
5786
5786
|
} catch (t) {
|
5787
5787
|
e = () => Promise.reject(t);
|
@@ -5809,14 +5809,14 @@ class Hs extends Nn {
|
|
5809
5809
|
cleanUp() {
|
5810
5810
|
}
|
5811
5811
|
}
|
5812
|
-
async function
|
5812
|
+
async function xs(n, e) {
|
5813
5813
|
const t = qs(e), r = zs(n);
|
5814
5814
|
if (!await r._isAvailable())
|
5815
5815
|
return !1;
|
5816
5816
|
const i = await r._get(t) === "true";
|
5817
5817
|
return await r._remove(t), i;
|
5818
5818
|
}
|
5819
|
-
function
|
5819
|
+
function Ws(n, e) {
|
5820
5820
|
Ce.set(n._key(), e);
|
5821
5821
|
}
|
5822
5822
|
function zs(n) {
|
@@ -5877,13 +5877,13 @@ class Ks {
|
|
5877
5877
|
return t.filter.includes(e.type) && r;
|
5878
5878
|
}
|
5879
5879
|
hasEventBeenHandled(e) {
|
5880
|
-
return Date.now() - this.lastProcessedEventTime >= Gs && this.cachedEventUids.clear(), this.cachedEventUids.has(
|
5880
|
+
return Date.now() - this.lastProcessedEventTime >= Gs && this.cachedEventUids.clear(), this.cachedEventUids.has($t(e));
|
5881
5881
|
}
|
5882
5882
|
saveEventToCache(e) {
|
5883
|
-
this.cachedEventUids.add(
|
5883
|
+
this.cachedEventUids.add($t(e)), this.lastProcessedEventTime = Date.now();
|
5884
5884
|
}
|
5885
5885
|
}
|
5886
|
-
function
|
5886
|
+
function $t(n) {
|
5887
5887
|
return [n.type, n.eventId, n.sessionId, n.tenantId].filter((e) => e).join("-");
|
5888
5888
|
}
|
5889
5889
|
function Dn({ type: n, error: e }) {
|
@@ -5983,7 +5983,7 @@ function to(n) {
|
|
5983
5983
|
* limitations under the License.
|
5984
5984
|
*/
|
5985
5985
|
const no = new Ie(3e4, 6e4);
|
5986
|
-
function
|
5986
|
+
function Mt() {
|
5987
5987
|
const n = M().___jsl;
|
5988
5988
|
if (n != null && n.H) {
|
5989
5989
|
for (const e of Object.keys(n.H))
|
@@ -5996,12 +5996,12 @@ function ro(n) {
|
|
5996
5996
|
return new Promise((e, t) => {
|
5997
5997
|
var r, i, s;
|
5998
5998
|
function o() {
|
5999
|
-
|
5999
|
+
Mt(), gapi.load("gapi.iframes", {
|
6000
6000
|
callback: () => {
|
6001
6001
|
e(gapi.iframes.getContext());
|
6002
6002
|
},
|
6003
6003
|
ontimeout: () => {
|
6004
|
-
|
6004
|
+
Mt(), t($(
|
6005
6005
|
n,
|
6006
6006
|
"network-request-failed"
|
6007
6007
|
/* AuthErrorCode.NETWORK_REQUEST_FAILED */
|
@@ -6022,7 +6022,7 @@ function ro(n) {
|
|
6022
6022
|
"network-request-failed"
|
6023
6023
|
/* AuthErrorCode.NETWORK_REQUEST_FAILED */
|
6024
6024
|
));
|
6025
|
-
}, vn(`${
|
6025
|
+
}, vn(`${Wi()}?onload=${c}`).catch((a) => t(a));
|
6026
6026
|
}
|
6027
6027
|
}).catch((e) => {
|
6028
6028
|
throw Re = null, e;
|
@@ -6071,7 +6071,7 @@ function uo(n) {
|
|
6071
6071
|
"auth-domain-config-required"
|
6072
6072
|
/* AuthErrorCode.MISSING_AUTH_DOMAIN */
|
6073
6073
|
);
|
6074
|
-
const t = e.emulator ?
|
6074
|
+
const t = e.emulator ? ct(e, ao) : `https://${n.config.authDomain}/${oo}`, r = {
|
6075
6075
|
apiKey: e.apiKey,
|
6076
6076
|
appName: n.name,
|
6077
6077
|
v: be
|
@@ -6135,7 +6135,7 @@ const fo = {
|
|
6135
6135
|
statusbar: "yes",
|
6136
6136
|
toolbar: "no"
|
6137
6137
|
}, po = 500, go = 600, mo = "_blank", yo = "http://localhost";
|
6138
|
-
class
|
6138
|
+
class Ut {
|
6139
6139
|
constructor(e) {
|
6140
6140
|
this.window = e, this.associatedEvent = null;
|
6141
6141
|
}
|
@@ -6159,7 +6159,7 @@ function _o(n, e, t, r = po, i = go) {
|
|
6159
6159
|
t && (c = hn(u) ? mo : t), un(u) && (e = e || yo, a.scrollbars = "yes");
|
6160
6160
|
const y = Object.entries(a).reduce((A, [O, N]) => `${A}${O}=${N},`, "");
|
6161
6161
|
if (Li(u) && c !== "_self")
|
6162
|
-
return vo(e || "", c), new
|
6162
|
+
return vo(e || "", c), new Ut(null);
|
6163
6163
|
const b = window.open(e || "", c, y);
|
6164
6164
|
_(
|
6165
6165
|
b,
|
@@ -6171,7 +6171,7 @@ function _o(n, e, t, r = po, i = go) {
|
|
6171
6171
|
b.focus();
|
6172
6172
|
} catch {
|
6173
6173
|
}
|
6174
|
-
return new
|
6174
|
+
return new Ut(b);
|
6175
6175
|
}
|
6176
6176
|
function vo(n, e) {
|
6177
6177
|
const t = document.createElement("a");
|
@@ -6196,7 +6196,7 @@ function vo(n, e) {
|
|
6196
6196
|
* limitations under the License.
|
6197
6197
|
*/
|
6198
6198
|
const bo = "__/auth/handler", Io = "emulator/auth/handler", wo = encodeURIComponent("fac");
|
6199
|
-
async function
|
6199
|
+
async function jt(n, e, t, r, i, s) {
|
6200
6200
|
_(
|
6201
6201
|
n.config.authDomain,
|
6202
6202
|
n,
|
@@ -6233,7 +6233,7 @@ async function Ut(n, e, t, r, i, s) {
|
|
6233
6233
|
return `${Eo(n)}?${ve(c).slice(1)}${u}`;
|
6234
6234
|
}
|
6235
6235
|
function Eo({ config: n }) {
|
6236
|
-
return n.emulator ?
|
6236
|
+
return n.emulator ? ct(n, Io) : `https://${n.authDomain}/${bo}`;
|
6237
6237
|
}
|
6238
6238
|
/**
|
6239
6239
|
* @license
|
@@ -6254,19 +6254,19 @@ function Eo({ config: n }) {
|
|
6254
6254
|
const Ge = "webStorageSupport";
|
6255
6255
|
class To {
|
6256
6256
|
constructor() {
|
6257
|
-
this.eventManagers = {}, this.iframes = {}, this.originValidationPromises = {}, this._redirectPersistence = Cn, this._completeRedirectFn = Js, this._overrideRedirectResult =
|
6257
|
+
this.eventManagers = {}, this.iframes = {}, this.originValidationPromises = {}, this._redirectPersistence = Cn, this._completeRedirectFn = Js, this._overrideRedirectResult = Ws;
|
6258
6258
|
}
|
6259
6259
|
// Wrapping in async even though we don't await anywhere in order
|
6260
6260
|
// to make sure errors are raised as promise rejections
|
6261
6261
|
async _openPopup(e, t, r, i) {
|
6262
6262
|
var s;
|
6263
6263
|
F((s = this.eventManagers[e._key()]) === null || s === void 0 ? void 0 : s.manager, "_initialize() not called before _openPopup()");
|
6264
|
-
const o = await
|
6265
|
-
return _o(e, o,
|
6264
|
+
const o = await jt(e, t, r, et(), i);
|
6265
|
+
return _o(e, o, ft());
|
6266
6266
|
}
|
6267
6267
|
async _openRedirect(e, t, r, i) {
|
6268
6268
|
await this._originValidation(e);
|
6269
|
-
const s = await
|
6269
|
+
const s = await jt(e, t, r, et(), i);
|
6270
6270
|
return As(s), new Promise(() => {
|
6271
6271
|
});
|
6272
6272
|
}
|
@@ -6309,11 +6309,11 @@ class To {
|
|
6309
6309
|
return this.originValidationPromises[t] || (this.originValidationPromises[t] = eo(e)), this.originValidationPromises[t];
|
6310
6310
|
}
|
6311
6311
|
get _shouldInitProactively() {
|
6312
|
-
return yn() ||
|
6312
|
+
return yn() || dt() || je();
|
6313
6313
|
}
|
6314
6314
|
}
|
6315
6315
|
const So = To;
|
6316
|
-
var
|
6316
|
+
var Bt = "@firebase/auth", Ft = "1.6.0";
|
6317
6317
|
/**
|
6318
6318
|
* @license
|
6319
6319
|
* Copyright 2020 Google LLC
|
@@ -6438,7 +6438,7 @@ function Ro(n) {
|
|
6438
6438
|
).setInstantiationMode(
|
6439
6439
|
"EXPLICIT"
|
6440
6440
|
/* InstantiationMode.EXPLICIT */
|
6441
|
-
)), ie(
|
6441
|
+
)), ie(Bt, Ft, Co(n)), ie(Bt, Ft, "esm2017");
|
6442
6442
|
}
|
6443
6443
|
/**
|
6444
6444
|
* @license
|
@@ -6457,13 +6457,13 @@ function Ro(n) {
|
|
6457
6457
|
* limitations under the License.
|
6458
6458
|
*/
|
6459
6459
|
const Po = 5 * 60, Oo = Kt("authIdTokenMaxAge") || Po;
|
6460
|
-
let
|
6460
|
+
let Vt = null;
|
6461
6461
|
const ko = (n) => async (e) => {
|
6462
6462
|
const t = e && await e.getIdTokenResult(), r = t && ((/* @__PURE__ */ new Date()).getTime() - Date.parse(t.issuedAtTime)) / 1e3;
|
6463
6463
|
if (r && r > Oo)
|
6464
6464
|
return;
|
6465
6465
|
const i = t == null ? void 0 : t.token;
|
6466
|
-
|
6466
|
+
Vt !== i && (Vt = i, await fetch(n, {
|
6467
6467
|
method: i ? "POST" : "DELETE",
|
6468
6468
|
headers: i ? {
|
6469
6469
|
Authorization: `Bearer ${i}`
|
@@ -6602,7 +6602,7 @@ var Ln = { exports: {} };
|
|
6602
6602
|
})(Lo);
|
6603
6603
|
})(Ln);
|
6604
6604
|
var Mo = Ln.exports;
|
6605
|
-
const Uo = /* @__PURE__ */ $o(Mo),
|
6605
|
+
const Uo = /* @__PURE__ */ $o(Mo), gt = (n, e) => async (t, r = {}) => {
|
6606
6606
|
const i = e ? await e.getIdToken() : null, s = await fetch(`${n}${t}`, {
|
6607
6607
|
mode: "cors",
|
6608
6608
|
...r,
|
@@ -6663,7 +6663,7 @@ const Uo = /* @__PURE__ */ $o(Mo), pt = (n, e) => async (t, r = {}) => {
|
|
6663
6663
|
), Vo = (n) => `${n[0].toLowerCase()}${n.slice(1)}`, Ho = (n) => {
|
6664
6664
|
const e = Fo(n);
|
6665
6665
|
return (t, r) => `/${e}${t ? `/${encodeURIComponent(t)}` : ""}${Bo(r)}`;
|
6666
|
-
},
|
6666
|
+
}, Ht = (n, e) => {
|
6667
6667
|
const t = Array.isArray(e.inputProps);
|
6668
6668
|
return Object.keys(n).reduce(
|
6669
6669
|
(r, i) => {
|
@@ -6677,7 +6677,7 @@ const Uo = /* @__PURE__ */ $o(Mo), pt = (n, e) => async (t, r = {}) => {
|
|
6677
6677
|
},
|
6678
6678
|
{}
|
6679
6679
|
);
|
6680
|
-
},
|
6680
|
+
}, xo = ({ primaryKey: n, properties: e, ...t }) => ({
|
6681
6681
|
primaryKey: n || "id",
|
6682
6682
|
properties: Object.keys(e || {}).reduce(
|
6683
6683
|
(r, i) => {
|
@@ -6698,15 +6698,15 @@ const Uo = /* @__PURE__ */ $o(Mo), pt = (n, e) => async (t, r = {}) => {
|
|
6698
6698
|
{}
|
6699
6699
|
),
|
6700
6700
|
...t
|
6701
|
-
}),
|
6702
|
-
const s =
|
6701
|
+
}), Wo = (n, e, t, r = {}, i = {}) => {
|
6702
|
+
const s = xo(r), { primaryKey: o, properties: c } = s, a = jo(s), u = Ho(t), y = (...v) => gt(n, e.authUser)(...v), b = ({ data: v, ...I }) => y(u(null, I), {
|
6703
6703
|
method: "POST",
|
6704
|
-
body:
|
6704
|
+
body: Ht(v, s)
|
6705
6705
|
}), A = ({ data: v, ...I }) => {
|
6706
6706
|
const { where: k, ...C } = I;
|
6707
6707
|
return y(u(k[o], C), {
|
6708
6708
|
method: "PUT",
|
6709
|
-
body:
|
6709
|
+
body: Ht(v, s)
|
6710
6710
|
});
|
6711
6711
|
}, O = (v) => {
|
6712
6712
|
if (!v)
|
@@ -6809,7 +6809,7 @@ const Uo = /* @__PURE__ */ $o(Mo), pt = (n, e) => async (t, r = {}) => {
|
|
6809
6809
|
(r, i) => {
|
6810
6810
|
const s = t.properties[i].$ref.split("/").pop();
|
6811
6811
|
return Object.assign(r, {
|
6812
|
-
[i]:
|
6812
|
+
[i]: Wo(
|
6813
6813
|
n,
|
6814
6814
|
e,
|
6815
6815
|
t.definitions[s].plural || `${i}s`,
|
@@ -7909,6 +7909,9 @@ const Uo = /* @__PURE__ */ $o(Mo), pt = (n, e) => async (t, r = {}) => {
|
|
7909
7909
|
$ref: "#/definitions/ApplicationChallengeAssignment"
|
7910
7910
|
}
|
7911
7911
|
}
|
7912
|
+
},
|
7913
|
+
config: {
|
7914
|
+
maxAge: 120
|
7912
7915
|
}
|
7913
7916
|
},
|
7914
7917
|
ApplicationChallenge: {
|
@@ -9164,12 +9167,12 @@ const Uo = /* @__PURE__ */ $o(Mo), pt = (n, e) => async (t, r = {}) => {
|
|
9164
9167
|
jobCrawlerLocation: {
|
9165
9168
|
$ref: "#/definitions/JobCrawlerLocation"
|
9166
9169
|
}
|
9167
|
-
},
|
9170
|
+
}, rt = {
|
9168
9171
|
$schema: Jo,
|
9169
9172
|
definitions: Go,
|
9170
9173
|
type: Ko,
|
9171
9174
|
properties: Yo
|
9172
|
-
}, Qo = 60 * 60 * 1e3,
|
9175
|
+
}, Qo = 60 * 60 * 1e3, xt = 24 * Qo, Xo = {
|
9173
9176
|
Country: {
|
9174
9177
|
primaryKey: "code",
|
9175
9178
|
plural: "countries",
|
@@ -9282,7 +9285,7 @@ const Uo = /* @__PURE__ */ $o(Mo), pt = (n, e) => async (t, r = {}) => {
|
|
9282
9285
|
) < e ? t = "placement_ended" : n.placementStart < e && (t = "placement_started");
|
9283
9286
|
}
|
9284
9287
|
!t && n.end < e && (t = "ended"), !t && n.start < e && (t = "started");
|
9285
|
-
const r = n.admissionEnd ? +n.admissionEnd +
|
9288
|
+
const r = n.admissionEnd ? +n.admissionEnd + xt : !1;
|
9286
9289
|
!t && r && r < e && (t = "admission_ended"), !t && n.admissionStart && n.admissionStart < e && (t = "admission_started"), !t && n.admissionStart && n.admissionEnd && (t = "planned"), t || (t = "draft");
|
9287
9290
|
const i = n.start > e && n.vacancies ? n.vacancies : ((s = n._count) == null ? void 0 : s.students) || ((o = n.students) == null ? void 0 : o.length) || 0;
|
9288
9291
|
return {
|
@@ -9409,28 +9412,29 @@ const Uo = /* @__PURE__ */ $o(Mo), pt = (n, e) => async (t, r = {}) => {
|
|
9409
9412
|
// Status:
|
9410
9413
|
// - `active`: Postulación en progreso.
|
9411
9414
|
// - `rejected`: Postulación rechazada por filtros (ingresos y/o educación).
|
9412
|
-
// - `ready`: Retos completados y postulación _enviada_ (confirmada).
|
9413
|
-
// este estado se considera que la postulación está lista para
|
9414
|
-
// paso, por ejemplo entrevista.
|
9415
|
+
// - `ready`: Retos completados y postulación _enviada_ (confirmada).
|
9416
|
+
// Llegado a este estado se considera que la postulación está lista para
|
9417
|
+
// el siguiente paso, por ejemplo entrevista.
|
9415
9418
|
// - `admission_ended`: Período de admisión del cohort seleccionado ya ha
|
9416
|
-
// terminado, pero la postulación todavía no ha expirado, así que la
|
9417
|
-
// todavía puede continuar cambiando de cohort, siempre y
|
9418
|
-
// abierto dentro del período de validez de
|
9419
|
-
// postulación.
|
9420
|
-
// - `expired`: Se pasaron los
|
9419
|
+
// terminado, pero la postulación todavía no ha expirado, así que la
|
9420
|
+
// postulante todavía puede continuar cambiando de cohort, siempre y
|
9421
|
+
// cuando haya uno abierto dentro del período de validez de
|
9422
|
+
// Application.config.maxAge días desde la creación de la postulación.
|
9423
|
+
// - `expired`: Se pasaron los Application.config.maxAge días. La
|
9424
|
+
// postulación ya no puede ser
|
9421
9425
|
// completada.
|
9422
9426
|
// - `cancelled`: La postulante canceló su propia postulación. (Todavía no
|
9423
9427
|
// implementado).
|
9424
9428
|
parse: (n) => {
|
9425
|
-
var
|
9426
|
-
const e = typeof n.hasFailedFilters == "boolean" ? n.hasFailedFilters : typeof ((
|
9427
|
-
if (!((
|
9429
|
+
var s, o, c;
|
9430
|
+
const e = typeof n.hasFailedFilters == "boolean" ? n.hasFailedFilters : typeof ((s = n.failedFilters) == null ? void 0 : s.length) == "number" ? n.failedFilters.length > 0 : void 0;
|
9431
|
+
if (!((o = n.cohort) != null && o.admissionEnd) || typeof e > "u")
|
9428
9432
|
return n;
|
9429
|
-
const t = Date.now();
|
9430
|
-
let
|
9431
|
-
return n.isReady ?
|
9433
|
+
const t = Date.now(), { maxAge: r } = rt.definitions.Application.config;
|
9434
|
+
let i;
|
9435
|
+
return n.isReady ? i = "ready" : e && !n.bypassFilters ? i = "rejected" : n.createdAt < t - r * xt ? i = "expired" : ((c = n.cohort) == null ? void 0 : c.status) !== "admission_started" ? i = "admission_ended" : i = "active", {
|
9432
9436
|
...n,
|
9433
|
-
status:
|
9437
|
+
status: i
|
9434
9438
|
};
|
9435
9439
|
}
|
9436
9440
|
},
|
@@ -9464,14 +9468,14 @@ const Uo = /* @__PURE__ */ $o(Mo), pt = (n, e) => async (t, r = {}) => {
|
|
9464
9468
|
}
|
9465
9469
|
}, Zo = (n, e) => ({
|
9466
9470
|
...zo(n, e, {
|
9467
|
-
...
|
9468
|
-
definitions: qo(
|
9471
|
+
...rt,
|
9472
|
+
definitions: qo(rt, Xo)
|
9469
9473
|
}),
|
9470
9474
|
gcpLog: {
|
9471
|
-
getEntries: async (t) => await
|
9475
|
+
getEntries: async (t) => await gt(n, e.authUser)(`/gcp-logs?q=${JSON.stringify(t)}`)
|
9472
9476
|
}
|
9473
9477
|
}), ea = (n, e) => {
|
9474
|
-
const t =
|
9478
|
+
const t = gt(n, e.authUser);
|
9475
9479
|
return {
|
9476
9480
|
project: {
|
9477
9481
|
findMany: (r = {}) => t(`/projects?q=${JSON.stringify(r)}`),
|