@laboratoria/sdk-js 7.0.0 → 7.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -280,10 +280,10 @@ const jn = () => Un().__FIREBASE_DEFAULTS__, Fn = () => {
280
280
  }, Hn = (n) => {
281
281
  var e, t;
282
282
  return (t = (e = nt()) === null || e === void 0 ? void 0 : e.emulatorHosts) === null || t === void 0 ? void 0 : t[n];
283
- }, Jt = () => {
283
+ }, Gt = () => {
284
284
  var n;
285
285
  return (n = nt()) === null || n === void 0 ? void 0 : n.config;
286
- }, Gt = (n) => {
286
+ }, Jt = (n) => {
287
287
  var e;
288
288
  return (e = nt()) === null || e === void 0 ? void 0 : e[`_${n}`];
289
289
  };
@@ -358,14 +358,14 @@ function qn() {
358
358
  const n = R();
359
359
  return n.indexOf("MSIE ") >= 0 || n.indexOf("Trident/") >= 0;
360
360
  }
361
- function Jn() {
361
+ function Gn() {
362
362
  try {
363
363
  return typeof indexedDB == "object";
364
364
  } catch {
365
365
  return !1;
366
366
  }
367
367
  }
368
- function Gn() {
368
+ function Jn() {
369
369
  return new Promise((n, e) => {
370
370
  try {
371
371
  let t = !0;
@@ -992,13 +992,13 @@ function hr() {
992
992
  IDBCursor.prototype.continuePrimaryKey
993
993
  ]);
994
994
  }
995
- const Yt = /* @__PURE__ */ new WeakMap(), Ge = /* @__PURE__ */ new WeakMap(), Qt = /* @__PURE__ */ new WeakMap(), Ve = /* @__PURE__ */ new WeakMap(), rt = /* @__PURE__ */ new WeakMap();
995
+ const Yt = /* @__PURE__ */ new WeakMap(), Je = /* @__PURE__ */ new WeakMap(), Qt = /* @__PURE__ */ new WeakMap(), Ve = /* @__PURE__ */ new WeakMap(), rt = /* @__PURE__ */ new WeakMap();
996
996
  function fr(n) {
997
997
  const e = new Promise((t, r) => {
998
998
  const i = () => {
999
999
  n.removeEventListener("success", s), n.removeEventListener("error", o);
1000
1000
  }, s = () => {
1001
- t(J(n.result)), i();
1001
+ t(G(n.result)), i();
1002
1002
  }, o = () => {
1003
1003
  r(n.error), i();
1004
1004
  };
@@ -1010,7 +1010,7 @@ function fr(n) {
1010
1010
  }), rt.set(e, n), e;
1011
1011
  }
1012
1012
  function pr(n) {
1013
- if (Ge.has(n))
1013
+ if (Je.has(n))
1014
1014
  return;
1015
1015
  const e = new Promise((t, r) => {
1016
1016
  const i = () => {
@@ -1022,19 +1022,19 @@ function pr(n) {
1022
1022
  };
1023
1023
  n.addEventListener("complete", s), n.addEventListener("error", o), n.addEventListener("abort", o);
1024
1024
  });
1025
- Ge.set(n, e);
1025
+ Je.set(n, e);
1026
1026
  }
1027
1027
  let Ke = {
1028
1028
  get(n, e, t) {
1029
1029
  if (n instanceof IDBTransaction) {
1030
1030
  if (e === "done")
1031
- return Ge.get(n);
1031
+ return Je.get(n);
1032
1032
  if (e === "objectStoreNames")
1033
1033
  return n.objectStoreNames || Qt.get(n);
1034
1034
  if (e === "store")
1035
1035
  return t.objectStoreNames[1] ? void 0 : t.objectStore(t.objectStoreNames[0]);
1036
1036
  }
1037
- return J(n[e]);
1037
+ return G(n[e]);
1038
1038
  },
1039
1039
  set(n, e, t) {
1040
1040
  return n[e] = t, !0;
@@ -1049,17 +1049,17 @@ function gr(n) {
1049
1049
  function mr(n) {
1050
1050
  return n === IDBDatabase.prototype.transaction && !("objectStoreNames" in IDBTransaction.prototype) ? function(e, ...t) {
1051
1051
  const r = n.call(We(this), e, ...t);
1052
- return Qt.set(r, e.sort ? e.sort() : [e]), J(r);
1052
+ return Qt.set(r, e.sort ? e.sort() : [e]), G(r);
1053
1053
  } : hr().includes(n) ? function(...e) {
1054
- return n.apply(We(this), e), J(Yt.get(this));
1054
+ return n.apply(We(this), e), G(Yt.get(this));
1055
1055
  } : function(...e) {
1056
- return J(n.apply(We(this), e));
1056
+ return G(n.apply(We(this), e));
1057
1057
  };
1058
1058
  }
1059
1059
  function yr(n) {
1060
1060
  return typeof n == "function" ? mr(n) : (n instanceof IDBTransaction && pr(n), dr(n, ur()) ? new Proxy(n, Ke) : n);
1061
1061
  }
1062
- function J(n) {
1062
+ function G(n) {
1063
1063
  if (n instanceof IDBRequest)
1064
1064
  return fr(n);
1065
1065
  if (Ve.has(n))
@@ -1069,9 +1069,9 @@ function J(n) {
1069
1069
  }
1070
1070
  const We = (n) => rt.get(n);
1071
1071
  function _r(n, e, { blocked: t, upgrade: r, blocking: i, terminated: s } = {}) {
1072
- const o = indexedDB.open(n, e), c = J(o);
1072
+ const o = indexedDB.open(n, e), c = G(o);
1073
1073
  return r && o.addEventListener("upgradeneeded", (a) => {
1074
- r(J(o.result), a.oldVersion, a.newVersion, J(o.transaction), a);
1074
+ r(G(o.result), a.oldVersion, a.newVersion, G(o.transaction), a);
1075
1075
  }), t && o.addEventListener("blocked", (a) => t(
1076
1076
  // Casting due to https://github.com/microsoft/TypeScript-DOM-lib-generator/pull/1405
1077
1077
  a.oldVersion,
@@ -1145,7 +1145,7 @@ function wr(n) {
1145
1145
  const e = n.getComponent();
1146
1146
  return (e == null ? void 0 : e.type) === "VERSION";
1147
1147
  }
1148
- const Ye = "@firebase/app", _t = "0.9.23";
1148
+ const Ye = "@firebase/app", _t = "0.9.25";
1149
1149
  /**
1150
1150
  * @license
1151
1151
  * Copyright 2019 Google LLC
@@ -1162,7 +1162,7 @@ const Ye = "@firebase/app", _t = "0.9.23";
1162
1162
  * See the License for the specific language governing permissions and
1163
1163
  * limitations under the License.
1164
1164
  */
1165
- const ee = new Kt("@firebase/app"), Er = "@firebase/app-compat", Tr = "@firebase/analytics-compat", Ar = "@firebase/analytics", Sr = "@firebase/app-check-compat", Cr = "@firebase/app-check", Rr = "@firebase/auth", Pr = "@firebase/auth-compat", Or = "@firebase/database", kr = "@firebase/database-compat", Nr = "@firebase/functions", Dr = "@firebase/functions-compat", Lr = "@firebase/installations", $r = "@firebase/installations-compat", Mr = "@firebase/messaging", Ur = "@firebase/messaging-compat", jr = "@firebase/performance", Fr = "@firebase/performance-compat", Br = "@firebase/remote-config", Hr = "@firebase/remote-config-compat", Vr = "@firebase/storage", Wr = "@firebase/storage-compat", xr = "@firebase/firestore", zr = "@firebase/firestore-compat", qr = "firebase", Jr = "10.6.0";
1165
+ const ee = new Kt("@firebase/app"), Er = "@firebase/app-compat", Tr = "@firebase/analytics-compat", Ar = "@firebase/analytics", Sr = "@firebase/app-check-compat", Cr = "@firebase/app-check", Rr = "@firebase/auth", Pr = "@firebase/auth-compat", Or = "@firebase/database", kr = "@firebase/database-compat", Nr = "@firebase/functions", Dr = "@firebase/functions-compat", Lr = "@firebase/installations", $r = "@firebase/installations-compat", Mr = "@firebase/messaging", Ur = "@firebase/messaging-compat", jr = "@firebase/performance", Fr = "@firebase/performance-compat", Br = "@firebase/remote-config", Hr = "@firebase/remote-config-compat", Vr = "@firebase/storage", Wr = "@firebase/storage-compat", xr = "@firebase/firestore", zr = "@firebase/firestore-compat", qr = "firebase", Gr = "10.7.1";
1166
1166
  /**
1167
1167
  * @license
1168
1168
  * Copyright 2019 Google LLC
@@ -1179,7 +1179,7 @@ const ee = new Kt("@firebase/app"), Er = "@firebase/app-compat", Tr = "@firebase
1179
1179
  * See the License for the specific language governing permissions and
1180
1180
  * limitations under the License.
1181
1181
  */
1182
- const Qe = "[DEFAULT]", Gr = {
1182
+ const Qe = "[DEFAULT]", Jr = {
1183
1183
  [Ye]: "fire-core",
1184
1184
  [Er]: "fire-core-compat",
1185
1185
  [Ar]: "fire-analytics",
@@ -1272,7 +1272,7 @@ const Yr = {
1272
1272
  "idb-get": "Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.",
1273
1273
  "idb-set": "Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.",
1274
1274
  "idb-delete": "Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}."
1275
- }, G = new _e("app", "Firebase", Yr);
1275
+ }, J = new _e("app", "Firebase", Yr);
1276
1276
  /**
1277
1277
  * @license
1278
1278
  * Copyright 2019 Google LLC
@@ -1328,7 +1328,7 @@ class Qr {
1328
1328
  */
1329
1329
  checkDestroyed() {
1330
1330
  if (this.isDeleted)
1331
- throw G.create("app-deleted", { appName: this._name });
1331
+ throw J.create("app-deleted", { appName: this._name });
1332
1332
  }
1333
1333
  }
1334
1334
  /**
@@ -1347,17 +1347,17 @@ class Qr {
1347
1347
  * See the License for the specific language governing permissions and
1348
1348
  * limitations under the License.
1349
1349
  */
1350
- const be = Jr;
1350
+ const be = Gr;
1351
1351
  function Zt(n, e = {}) {
1352
1352
  let t = n;
1353
1353
  typeof e != "object" && (e = { name: e });
1354
1354
  const r = Object.assign({ name: Qe, automaticDataCollectionEnabled: !1 }, e), i = r.name;
1355
1355
  if (typeof i != "string" || !i)
1356
- throw G.create("bad-app-name", {
1356
+ throw J.create("bad-app-name", {
1357
1357
  appName: String(i)
1358
1358
  });
1359
- if (t || (t = Jt()), !t)
1360
- throw G.create(
1359
+ if (t || (t = Gt()), !t)
1360
+ throw J.create(
1361
1361
  "no-options"
1362
1362
  /* AppError.NO_OPTIONS */
1363
1363
  );
@@ -1365,7 +1365,7 @@ function Zt(n, e = {}) {
1365
1365
  if (s) {
1366
1366
  if (Pe(t, s.options) && Pe(r, s.config))
1367
1367
  return s;
1368
- throw G.create("duplicate-app", { appName: i });
1368
+ throw J.create("duplicate-app", { appName: i });
1369
1369
  }
1370
1370
  const o = new sr(i);
1371
1371
  for (const a of Xe.values())
@@ -1375,15 +1375,15 @@ function Zt(n, e = {}) {
1375
1375
  }
1376
1376
  function Xr(n = Qe) {
1377
1377
  const e = Oe.get(n);
1378
- if (!e && n === Qe && Jt())
1378
+ if (!e && n === Qe && Gt())
1379
1379
  return Zt();
1380
1380
  if (!e)
1381
- throw G.create("no-app", { appName: n });
1381
+ throw J.create("no-app", { appName: n });
1382
1382
  return e;
1383
1383
  }
1384
1384
  function ie(n, e, t) {
1385
1385
  var r;
1386
- let i = (r = Gr[n]) !== null && r !== void 0 ? r : n;
1386
+ let i = (r = Jr[n]) !== null && r !== void 0 ? r : n;
1387
1387
  t && (i += `-${t}`);
1388
1388
  const s = i.match(/\s|\//), o = e.match(/\s|\//);
1389
1389
  if (s || o) {
@@ -1427,7 +1427,7 @@ function en() {
1427
1427
  }
1428
1428
  }
1429
1429
  }).catch((n) => {
1430
- throw G.create("idb-open", {
1430
+ throw J.create("idb-open", {
1431
1431
  originalErrorMessage: n.message
1432
1432
  });
1433
1433
  })), ze;
@@ -1439,7 +1439,7 @@ async function ti(n) {
1439
1439
  if (e instanceof K)
1440
1440
  ee.warn(e.message);
1441
1441
  else {
1442
- const t = G.create("idb-get", {
1442
+ const t = J.create("idb-get", {
1443
1443
  originalErrorMessage: e == null ? void 0 : e.message
1444
1444
  });
1445
1445
  ee.warn(t.message);
@@ -1454,7 +1454,7 @@ async function vt(n, e) {
1454
1454
  if (t instanceof K)
1455
1455
  ee.warn(t.message);
1456
1456
  else {
1457
- const r = G.create("idb-set", {
1457
+ const r = J.create("idb-set", {
1458
1458
  originalErrorMessage: t == null ? void 0 : t.message
1459
1459
  });
1460
1460
  ee.warn(r.message);
@@ -1495,12 +1495,12 @@ class ii {
1495
1495
  * already logged, subsequent calls to this function in the same day will be ignored.
1496
1496
  */
1497
1497
  async triggerHeartbeat() {
1498
- var e;
1499
- const r = this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(), i = bt();
1500
- if (((e = this._heartbeatsCache) === null || e === void 0 ? void 0 : e.heartbeats) == null && (this._heartbeatsCache = await this._heartbeatsCachePromise), !(this._heartbeatsCache.lastSentHeartbeatDate === i || this._heartbeatsCache.heartbeats.some((s) => s.date === i)))
1501
- return this._heartbeatsCache.heartbeats.push({ date: i, agent: r }), this._heartbeatsCache.heartbeats = this._heartbeatsCache.heartbeats.filter((s) => {
1502
- const o = new Date(s.date).valueOf();
1503
- return Date.now() - o <= ri;
1498
+ var e, t;
1499
+ const i = this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(), s = bt();
1500
+ 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)))
1501
+ return this._heartbeatsCache.heartbeats.push({ date: s, agent: i }), this._heartbeatsCache.heartbeats = this._heartbeatsCache.heartbeats.filter((o) => {
1502
+ const c = new Date(o.date).valueOf();
1503
+ return Date.now() - c <= ri;
1504
1504
  }), this._storage.overwrite(this._heartbeatsCache);
1505
1505
  }
1506
1506
  /**
@@ -1550,13 +1550,17 @@ class oi {
1550
1550
  this.app = e, this._canUseIndexedDBPromise = this.runIndexedDBEnvironmentCheck();
1551
1551
  }
1552
1552
  async runIndexedDBEnvironmentCheck() {
1553
- return Jn() ? Gn().then(() => !0).catch(() => !1) : !1;
1553
+ return Gn() ? Jn().then(() => !0).catch(() => !1) : !1;
1554
1554
  }
1555
1555
  /**
1556
1556
  * Read all heartbeats.
1557
1557
  */
1558
1558
  async read() {
1559
- return await this._canUseIndexedDBPromise ? await ti(this.app) || { heartbeats: [] } : { heartbeats: [] };
1559
+ if (await this._canUseIndexedDBPromise) {
1560
+ const t = await ti(this.app);
1561
+ return t != null && t.heartbeats ? t : { heartbeats: [] };
1562
+ } else
1563
+ return { heartbeats: [] };
1560
1564
  }
1561
1565
  // overwrite the storage with the provided heartbeats
1562
1566
  async overwrite(e) {
@@ -1622,7 +1626,7 @@ function ai(n) {
1622
1626
  )), ie(Ye, _t, n), ie(Ye, _t, "esm2017"), ie("fire-js", "");
1623
1627
  }
1624
1628
  ai("");
1625
- var ci = "firebase", li = "10.6.0";
1629
+ var ci = "firebase", li = "10.7.1";
1626
1630
  /**
1627
1631
  * @license
1628
1632
  * Copyright 2020 Google LLC
@@ -1915,6 +1919,9 @@ const mi = {
1915
1919
  INVALID_PASSWORD: "wrong-password",
1916
1920
  // This can only happen if the SDK sends a bad request.
1917
1921
  MISSING_PASSWORD: "missing-password",
1922
+ // Thrown if Email Enumeration Protection is enabled in the project and the email or password is
1923
+ // invalid.
1924
+ INVALID_LOGIN_CREDENTIALS: "invalid-credential",
1918
1925
  // Sign up with email and password errors.
1919
1926
  EMAIL_EXISTS: "email-already-in-use",
1920
1927
  PASSWORD_LOGIN_DISABLED: "operation-not-allowed",
@@ -3631,7 +3638,7 @@ async function et(n, e, t, r) {
3631
3638
  * See the License for the specific language governing permissions and
3632
3639
  * limitations under the License.
3633
3640
  */
3634
- function Ji(n, e) {
3641
+ function Gi(n, e) {
3635
3642
  const t = Xt(n, "auth");
3636
3643
  if (t.isInitialized()) {
3637
3644
  const i = t.getImmediate(), s = t.getOptions();
@@ -3645,7 +3652,7 @@ function Ji(n, e) {
3645
3652
  }
3646
3653
  return t.initialize({ options: e });
3647
3654
  }
3648
- function Gi(n, e) {
3655
+ function Ji(n, e) {
3649
3656
  const t = (e == null ? void 0 : e.persistence) || [], r = (Array.isArray(t) ? t : [t]).map(U);
3650
3657
  e != null && e.errorMap && n._updateErrorMap(e.errorMap), n._initializeWithPersistence(r, e == null ? void 0 : e.popupRedirectResolver);
3651
3658
  }
@@ -5439,8 +5446,9 @@ class On {
5439
5446
  if (this.pendingWrites !== 0)
5440
5447
  return [];
5441
5448
  const t = [], r = /* @__PURE__ */ new Set();
5442
- for (const { fbase_key: i, value: s } of e)
5443
- r.add(i), JSON.stringify(this.localCache[i]) !== JSON.stringify(s) && (this.notifyListeners(i, s), t.push(i));
5449
+ if (e.length !== 0)
5450
+ for (const { fbase_key: i, value: s } of e)
5451
+ r.add(i), JSON.stringify(this.localCache[i]) !== JSON.stringify(s) && (this.notifyListeners(i, s), t.push(i));
5444
5452
  for (const i of Object.keys(this.localCache))
5445
5453
  this.localCache[i] && !r.has(i) && (this.notifyListeners(i, null), t.push(i));
5446
5454
  return t;
@@ -5828,7 +5836,7 @@ async function zs(n, e, t = !1) {
5828
5836
  * limitations under the License.
5829
5837
  */
5830
5838
  const qs = 10 * 60 * 1e3;
5831
- class Js {
5839
+ class Gs {
5832
5840
  constructor(e) {
5833
5841
  this.auth = e, this.cachedEventUids = /* @__PURE__ */ new Set(), this.consumers = /* @__PURE__ */ new Set(), this.queuedRedirectEvent = null, this.hasHandledPotentialRedirect = !1, this.lastProcessedEventTime = Date.now();
5834
5842
  }
@@ -5844,7 +5852,7 @@ class Js {
5844
5852
  let t = !1;
5845
5853
  return this.consumers.forEach((r) => {
5846
5854
  this.isEventForConsumer(e, r) && (t = !0, this.sendToConsumer(e, r), this.saveEventToCache(e));
5847
- }), this.hasHandledPotentialRedirect || !Gs(e) || (this.hasHandledPotentialRedirect = !0, t || (this.queuedRedirectEvent = e, t = !0)), t;
5855
+ }), this.hasHandledPotentialRedirect || !Js(e) || (this.hasHandledPotentialRedirect = !0, t || (this.queuedRedirectEvent = e, t = !0)), t;
5848
5856
  }
5849
5857
  sendToConsumer(e, t) {
5850
5858
  var r;
@@ -5871,7 +5879,7 @@ function Dt(n) {
5871
5879
  function Nn({ type: n, error: e }) {
5872
5880
  return n === "unknown" && (e == null ? void 0 : e.code) === "auth/no-auth-event";
5873
5881
  }
5874
- function Gs(n) {
5882
+ function Js(n) {
5875
5883
  switch (n.type) {
5876
5884
  case "signInViaRedirect":
5877
5885
  case "linkViaRedirect":
@@ -6233,7 +6241,7 @@ function Io({ config: n }) {
6233
6241
  * See the License for the specific language governing permissions and
6234
6242
  * limitations under the License.
6235
6243
  */
6236
- const Je = "webStorageSupport";
6244
+ const Ge = "webStorageSupport";
6237
6245
  class wo {
6238
6246
  constructor() {
6239
6247
  this.eventManagers = {}, this.iframes = {}, this.originValidationPromises = {}, this._redirectPersistence = Sn, this._completeRedirectFn = zs, this._overrideRedirectResult = Vs;
@@ -6264,7 +6272,7 @@ class wo {
6264
6272
  }), r;
6265
6273
  }
6266
6274
  async initAndGetManager(e) {
6267
- const t = await lo(e), r = new Js(e);
6275
+ const t = await lo(e), r = new Gs(e);
6268
6276
  return t.register("authEvent", (i) => (_(
6269
6277
  i == null ? void 0 : i.authEvent,
6270
6278
  e,
@@ -6276,9 +6284,9 @@ class wo {
6276
6284
  }), gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER), this.eventManagers[e._key()] = { manager: r }, this.iframes[e._key()] = t, r;
6277
6285
  }
6278
6286
  _isIframeWebStorageSupported(e, t) {
6279
- this.iframes[e._key()].send(Je, { type: Je }, (i) => {
6287
+ this.iframes[e._key()].send(Ge, { type: Ge }, (i) => {
6280
6288
  var s;
6281
- const o = (s = i == null ? void 0 : i[0]) === null || s === void 0 ? void 0 : s[Je];
6289
+ const o = (s = i == null ? void 0 : i[0]) === null || s === void 0 ? void 0 : s[Ge];
6282
6290
  o !== void 0 && t(!!o), N(
6283
6291
  e,
6284
6292
  "internal-error"
@@ -6295,7 +6303,7 @@ class wo {
6295
6303
  }
6296
6304
  }
6297
6305
  const Eo = wo;
6298
- var Ut = "@firebase/auth", jt = "1.4.0";
6306
+ var Ut = "@firebase/auth", jt = "1.5.1";
6299
6307
  /**
6300
6308
  * @license
6301
6309
  * Copyright 2020 Google LLC
@@ -6392,7 +6400,7 @@ function So(n) {
6392
6400
  apiScheme: "https",
6393
6401
  sdkClientVersion: yn(n)
6394
6402
  }, u = new Bi(r, i, s, a);
6395
- return Gi(u, t), u;
6403
+ return Ji(u, t), u;
6396
6404
  },
6397
6405
  "PUBLIC"
6398
6406
  /* ComponentType.PUBLIC */
@@ -6436,7 +6444,7 @@ function So(n) {
6436
6444
  * See the License for the specific language governing permissions and
6437
6445
  * limitations under the License.
6438
6446
  */
6439
- const Co = 5 * 60, Ro = Gt("authIdTokenMaxAge") || Co;
6447
+ const Co = 5 * 60, Ro = Jt("authIdTokenMaxAge") || Co;
6440
6448
  let Ft = null;
6441
6449
  const Po = (n) => async (e) => {
6442
6450
  const t = e && await e.getIdTokenResult(), r = t && ((/* @__PURE__ */ new Date()).getTime() - Date.parse(t.issuedAtTime)) / 1e3;
@@ -6454,14 +6462,14 @@ function Oo(n = Xr()) {
6454
6462
  const e = Xt(n, "auth");
6455
6463
  if (e.isInitialized())
6456
6464
  return e.getImmediate();
6457
- const t = Ji(n, {
6465
+ const t = Gi(n, {
6458
6466
  popupRedirectResolver: Eo,
6459
6467
  persistence: [
6460
6468
  Ds,
6461
6469
  Is,
6462
6470
  Sn
6463
6471
  ]
6464
- }), r = Gt("authTokenSyncURL");
6472
+ }), r = Jt("authTokenSyncURL");
6465
6473
  if (r) {
6466
6474
  const s = Po(r);
6467
6475
  gs(t, s, () => s(t.currentUser)), ps(t, (o) => s(o));
@@ -8949,7 +8957,7 @@ const Lo = /* @__PURE__ */ No(Do), ft = (n, e) => async (t, r = {}) => {
8949
8957
  }
8950
8958
  }
8951
8959
  }
8952
- }, qo = "object", Jo = {
8960
+ }, qo = "object", Go = {
8953
8961
  country: {
8954
8962
  $ref: "#/definitions/Country"
8955
8963
  },
@@ -9059,8 +9067,8 @@ const Lo = /* @__PURE__ */ No(Do), ft = (n, e) => async (t, r = {}) => {
9059
9067
  $schema: xo,
9060
9068
  definitions: zo,
9061
9069
  type: qo,
9062
- properties: Jo
9063
- }, Go = 60 * 60 * 1e3, Vt = 24 * Go, Ko = {
9070
+ properties: Go
9071
+ }, Jo = 60 * 60 * 1e3, Vt = 24 * Jo, Ko = {
9064
9072
  Country: {
9065
9073
  primaryKey: "code",
9066
9074
  plural: "countries",
@@ -88,7 +88,7 @@
88
88
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
89
89
  * See the License for the specific language governing permissions and
90
90
  * limitations under the License.
91
- */function R(){return typeof navigator<"u"&&typeof navigator.userAgent=="string"?navigator.userAgent:""}function qn(){return typeof window<"u"&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(R())}function Jn(){const n=typeof chrome=="object"?chrome.runtime:typeof browser=="object"?browser.runtime:void 0;return typeof n=="object"&&n.id!==void 0}function Gn(){return typeof navigator=="object"&&navigator.product==="ReactNative"}function Kn(){const n=R();return n.indexOf("MSIE ")>=0||n.indexOf("Trident/")>=0}function Yn(){try{return typeof indexedDB=="object"}catch{return!1}}function Qn(){return new Promise((n,e)=>{try{let t=!0;const r="validate-browser-context-for-indexeddb-analytics-module",i=self.indexedDB.open(r);i.onsuccess=()=>{i.result.close(),t||self.indexedDB.deleteDatabase(r),n(!0)},i.onupgradeneeded=()=>{t=!1},i.onerror=()=>{var s;e(((s=i.error)===null||s===void 0?void 0:s.message)||"")}}catch(t){e(t)}})}/**
91
+ */function R(){return typeof navigator<"u"&&typeof navigator.userAgent=="string"?navigator.userAgent:""}function qn(){return typeof window<"u"&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(R())}function Gn(){const n=typeof chrome=="object"?chrome.runtime:typeof browser=="object"?browser.runtime:void 0;return typeof n=="object"&&n.id!==void 0}function Jn(){return typeof navigator=="object"&&navigator.product==="ReactNative"}function Kn(){const n=R();return n.indexOf("MSIE ")>=0||n.indexOf("Trident/")>=0}function Yn(){try{return typeof indexedDB=="object"}catch{return!1}}function Qn(){return new Promise((n,e)=>{try{let t=!0;const r="validate-browser-context-for-indexeddb-analytics-module",i=self.indexedDB.open(r);i.onsuccess=()=>{i.result.close(),t||self.indexedDB.deleteDatabase(r),n(!0)},i.onupgradeneeded=()=>{t=!1},i.onerror=()=>{var s;e(((s=i.error)===null||s===void 0?void 0:s.message)||"")}}catch(t){e(t)}})}/**
92
92
  * @license
93
93
  * Copyright 2017 Google LLC
94
94
  *
@@ -193,7 +193,7 @@
193
193
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
194
194
  * See the License for the specific language governing permissions and
195
195
  * limitations under the License.
196
- */var T;(function(n){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"})(T||(T={}));const lr={debug:T.DEBUG,verbose:T.VERBOSE,info:T.INFO,warn:T.WARN,error:T.ERROR,silent:T.SILENT},dr=T.INFO,ur={[T.DEBUG]:"log",[T.VERBOSE]:"log",[T.INFO]:"info",[T.WARN]:"warn",[T.ERROR]:"error"},hr=(n,e,...t)=>{if(e<n.logLevel)return;const r=new Date().toISOString(),i=ur[e];if(i)console[i](`[${r}] ${n.name}:`,...t);else throw new Error(`Attempted to log a message with an invalid logType (value: ${e})`)};class wt{constructor(e){this.name=e,this._logLevel=dr,this._logHandler=hr,this._userLogHandler=null}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in T))throw new TypeError(`Invalid value "${e}" assigned to \`logLevel\``);this._logLevel=e}setLogLevel(e){this._logLevel=typeof e=="string"?lr[e]:e}get logHandler(){return this._logHandler}set logHandler(e){if(typeof e!="function")throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=e}get userLogHandler(){return this._userLogHandler}set userLogHandler(e){this._userLogHandler=e}debug(...e){this._userLogHandler&&this._userLogHandler(this,T.DEBUG,...e),this._logHandler(this,T.DEBUG,...e)}log(...e){this._userLogHandler&&this._userLogHandler(this,T.VERBOSE,...e),this._logHandler(this,T.VERBOSE,...e)}info(...e){this._userLogHandler&&this._userLogHandler(this,T.INFO,...e),this._logHandler(this,T.INFO,...e)}warn(...e){this._userLogHandler&&this._userLogHandler(this,T.WARN,...e),this._logHandler(this,T.WARN,...e)}error(...e){this._userLogHandler&&this._userLogHandler(this,T.ERROR,...e),this._logHandler(this,T.ERROR,...e)}}const fr=(n,e)=>e.some(t=>n instanceof t);let Et,Tt;function pr(){return Et||(Et=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function gr(){return Tt||(Tt=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const At=new WeakMap,ze=new WeakMap,St=new WeakMap,qe=new WeakMap,Je=new WeakMap;function mr(n){const e=new Promise((t,r)=>{const i=()=>{n.removeEventListener("success",s),n.removeEventListener("error",o)},s=()=>{t(W(n.result)),i()},o=()=>{r(n.error),i()};n.addEventListener("success",s),n.addEventListener("error",o)});return e.then(t=>{t instanceof IDBCursor&&At.set(t,n)}).catch(()=>{}),Je.set(e,n),e}function yr(n){if(ze.has(n))return;const e=new Promise((t,r)=>{const i=()=>{n.removeEventListener("complete",s),n.removeEventListener("error",o),n.removeEventListener("abort",o)},s=()=>{t(),i()},o=()=>{r(n.error||new DOMException("AbortError","AbortError")),i()};n.addEventListener("complete",s),n.addEventListener("error",o),n.addEventListener("abort",o)});ze.set(n,e)}let Ge={get(n,e,t){if(n instanceof IDBTransaction){if(e==="done")return ze.get(n);if(e==="objectStoreNames")return n.objectStoreNames||St.get(n);if(e==="store")return t.objectStoreNames[1]?void 0:t.objectStore(t.objectStoreNames[0])}return W(n[e])},set(n,e,t){return n[e]=t,!0},has(n,e){return n instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in n}};function _r(n){Ge=n(Ge)}function vr(n){return n===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...t){const r=n.call(Ke(this),e,...t);return St.set(r,e.sort?e.sort():[e]),W(r)}:gr().includes(n)?function(...e){return n.apply(Ke(this),e),W(At.get(this))}:function(...e){return W(n.apply(Ke(this),e))}}function br(n){return typeof n=="function"?vr(n):(n instanceof IDBTransaction&&yr(n),fr(n,pr())?new Proxy(n,Ge):n)}function W(n){if(n instanceof IDBRequest)return mr(n);if(qe.has(n))return qe.get(n);const e=br(n);return e!==n&&(qe.set(n,e),Je.set(e,n)),e}const Ke=n=>Je.get(n);function Ir(n,e,{blocked:t,upgrade:r,blocking:i,terminated:s}={}){const o=indexedDB.open(n,e),c=W(o);return r&&o.addEventListener("upgradeneeded",a=>{r(W(o.result),a.oldVersion,a.newVersion,W(o.transaction),a)}),t&&o.addEventListener("blocked",a=>t(a.oldVersion,a.newVersion,a)),c.then(a=>{s&&a.addEventListener("close",()=>s()),i&&a.addEventListener("versionchange",u=>i(u.oldVersion,u.newVersion,u))}).catch(()=>{}),c}const wr=["get","getKey","getAll","getAllKeys","count"],Er=["put","add","delete","clear"],Ye=new Map;function Ct(n,e){if(!(n instanceof IDBDatabase&&!(e in n)&&typeof e=="string"))return;if(Ye.get(e))return Ye.get(e);const t=e.replace(/FromIndex$/,""),r=e!==t,i=Er.includes(t);if(!(t in(r?IDBIndex:IDBObjectStore).prototype)||!(i||wr.includes(t)))return;const s=async function(o,...c){const a=this.transaction(o,i?"readwrite":"readonly");let u=a.store;return r&&(u=u.index(c.shift())),(await Promise.all([u[t](...c),i&&a.done]))[0]};return Ye.set(e,s),s}_r(n=>({...n,get:(e,t,r)=>Ct(e,t)||n.get(e,t,r),has:(e,t)=>!!Ct(e,t)||n.has(e,t)}));/**
196
+ */var T;(function(n){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"})(T||(T={}));const lr={debug:T.DEBUG,verbose:T.VERBOSE,info:T.INFO,warn:T.WARN,error:T.ERROR,silent:T.SILENT},dr=T.INFO,ur={[T.DEBUG]:"log",[T.VERBOSE]:"log",[T.INFO]:"info",[T.WARN]:"warn",[T.ERROR]:"error"},hr=(n,e,...t)=>{if(e<n.logLevel)return;const r=new Date().toISOString(),i=ur[e];if(i)console[i](`[${r}] ${n.name}:`,...t);else throw new Error(`Attempted to log a message with an invalid logType (value: ${e})`)};class wt{constructor(e){this.name=e,this._logLevel=dr,this._logHandler=hr,this._userLogHandler=null}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in T))throw new TypeError(`Invalid value "${e}" assigned to \`logLevel\``);this._logLevel=e}setLogLevel(e){this._logLevel=typeof e=="string"?lr[e]:e}get logHandler(){return this._logHandler}set logHandler(e){if(typeof e!="function")throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=e}get userLogHandler(){return this._userLogHandler}set userLogHandler(e){this._userLogHandler=e}debug(...e){this._userLogHandler&&this._userLogHandler(this,T.DEBUG,...e),this._logHandler(this,T.DEBUG,...e)}log(...e){this._userLogHandler&&this._userLogHandler(this,T.VERBOSE,...e),this._logHandler(this,T.VERBOSE,...e)}info(...e){this._userLogHandler&&this._userLogHandler(this,T.INFO,...e),this._logHandler(this,T.INFO,...e)}warn(...e){this._userLogHandler&&this._userLogHandler(this,T.WARN,...e),this._logHandler(this,T.WARN,...e)}error(...e){this._userLogHandler&&this._userLogHandler(this,T.ERROR,...e),this._logHandler(this,T.ERROR,...e)}}const fr=(n,e)=>e.some(t=>n instanceof t);let Et,Tt;function pr(){return Et||(Et=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function gr(){return Tt||(Tt=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const At=new WeakMap,ze=new WeakMap,St=new WeakMap,qe=new WeakMap,Ge=new WeakMap;function mr(n){const e=new Promise((t,r)=>{const i=()=>{n.removeEventListener("success",s),n.removeEventListener("error",o)},s=()=>{t(W(n.result)),i()},o=()=>{r(n.error),i()};n.addEventListener("success",s),n.addEventListener("error",o)});return e.then(t=>{t instanceof IDBCursor&&At.set(t,n)}).catch(()=>{}),Ge.set(e,n),e}function yr(n){if(ze.has(n))return;const e=new Promise((t,r)=>{const i=()=>{n.removeEventListener("complete",s),n.removeEventListener("error",o),n.removeEventListener("abort",o)},s=()=>{t(),i()},o=()=>{r(n.error||new DOMException("AbortError","AbortError")),i()};n.addEventListener("complete",s),n.addEventListener("error",o),n.addEventListener("abort",o)});ze.set(n,e)}let Je={get(n,e,t){if(n instanceof IDBTransaction){if(e==="done")return ze.get(n);if(e==="objectStoreNames")return n.objectStoreNames||St.get(n);if(e==="store")return t.objectStoreNames[1]?void 0:t.objectStore(t.objectStoreNames[0])}return W(n[e])},set(n,e,t){return n[e]=t,!0},has(n,e){return n instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in n}};function _r(n){Je=n(Je)}function vr(n){return n===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...t){const r=n.call(Ke(this),e,...t);return St.set(r,e.sort?e.sort():[e]),W(r)}:gr().includes(n)?function(...e){return n.apply(Ke(this),e),W(At.get(this))}:function(...e){return W(n.apply(Ke(this),e))}}function br(n){return typeof n=="function"?vr(n):(n instanceof IDBTransaction&&yr(n),fr(n,pr())?new Proxy(n,Je):n)}function W(n){if(n instanceof IDBRequest)return mr(n);if(qe.has(n))return qe.get(n);const e=br(n);return e!==n&&(qe.set(n,e),Ge.set(e,n)),e}const Ke=n=>Ge.get(n);function Ir(n,e,{blocked:t,upgrade:r,blocking:i,terminated:s}={}){const o=indexedDB.open(n,e),c=W(o);return r&&o.addEventListener("upgradeneeded",a=>{r(W(o.result),a.oldVersion,a.newVersion,W(o.transaction),a)}),t&&o.addEventListener("blocked",a=>t(a.oldVersion,a.newVersion,a)),c.then(a=>{s&&a.addEventListener("close",()=>s()),i&&a.addEventListener("versionchange",u=>i(u.oldVersion,u.newVersion,u))}).catch(()=>{}),c}const wr=["get","getKey","getAll","getAllKeys","count"],Er=["put","add","delete","clear"],Ye=new Map;function Ct(n,e){if(!(n instanceof IDBDatabase&&!(e in n)&&typeof e=="string"))return;if(Ye.get(e))return Ye.get(e);const t=e.replace(/FromIndex$/,""),r=e!==t,i=Er.includes(t);if(!(t in(r?IDBIndex:IDBObjectStore).prototype)||!(i||wr.includes(t)))return;const s=async function(o,...c){const a=this.transaction(o,i?"readwrite":"readonly");let u=a.store;return r&&(u=u.index(c.shift())),(await Promise.all([u[t](...c),i&&a.done]))[0]};return Ye.set(e,s),s}_r(n=>({...n,get:(e,t,r)=>Ct(e,t)||n.get(e,t,r),has:(e,t)=>!!Ct(e,t)||n.has(e,t)}));/**
197
197
  * @license
198
198
  * Copyright 2019 Google LLC
199
199
  *
@@ -208,7 +208,7 @@
208
208
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
209
209
  * See the License for the specific language governing permissions and
210
210
  * limitations under the License.
211
- */class Tr{constructor(e){this.container=e}getPlatformInfoString(){return this.container.getProviders().map(t=>{if(Ar(t)){const r=t.getImmediate();return`${r.library}/${r.version}`}else return null}).filter(t=>t).join(" ")}}function Ar(n){const e=n.getComponent();return(e==null?void 0:e.type)==="VERSION"}const Qe="@firebase/app",Rt="0.9.23";/**
211
+ */class Tr{constructor(e){this.container=e}getPlatformInfoString(){return this.container.getProviders().map(t=>{if(Ar(t)){const r=t.getImmediate();return`${r.library}/${r.version}`}else return null}).filter(t=>t).join(" ")}}function Ar(n){const e=n.getComponent();return(e==null?void 0:e.type)==="VERSION"}const Qe="@firebase/app",Rt="0.9.25";/**
212
212
  * @license
213
213
  * Copyright 2019 Google LLC
214
214
  *
@@ -223,7 +223,7 @@
223
223
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
224
224
  * See the License for the specific language governing permissions and
225
225
  * limitations under the License.
226
- */const Z=new wt("@firebase/app"),Sr="@firebase/app-compat",Cr="@firebase/analytics-compat",Rr="@firebase/analytics",Pr="@firebase/app-check-compat",Or="@firebase/app-check",kr="@firebase/auth",Nr="@firebase/auth-compat",Dr="@firebase/database",Lr="@firebase/database-compat",$r="@firebase/functions",Mr="@firebase/functions-compat",Ur="@firebase/installations",jr="@firebase/installations-compat",Fr="@firebase/messaging",Br="@firebase/messaging-compat",Hr="@firebase/performance",Vr="@firebase/performance-compat",Wr="@firebase/remote-config",xr="@firebase/remote-config-compat",zr="@firebase/storage",qr="@firebase/storage-compat",Jr="@firebase/firestore",Gr="@firebase/firestore-compat",Kr="firebase",Yr="10.6.0";/**
226
+ */const Z=new wt("@firebase/app"),Sr="@firebase/app-compat",Cr="@firebase/analytics-compat",Rr="@firebase/analytics",Pr="@firebase/app-check-compat",Or="@firebase/app-check",kr="@firebase/auth",Nr="@firebase/auth-compat",Dr="@firebase/database",Lr="@firebase/database-compat",$r="@firebase/functions",Mr="@firebase/functions-compat",Ur="@firebase/installations",jr="@firebase/installations-compat",Fr="@firebase/messaging",Br="@firebase/messaging-compat",Hr="@firebase/performance",Vr="@firebase/performance-compat",Wr="@firebase/remote-config",xr="@firebase/remote-config-compat",zr="@firebase/storage",qr="@firebase/storage-compat",Gr="@firebase/firestore",Jr="@firebase/firestore-compat",Kr="firebase",Yr="10.7.1";/**
227
227
  * @license
228
228
  * Copyright 2019 Google LLC
229
229
  *
@@ -238,7 +238,7 @@
238
238
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
239
239
  * See the License for the specific language governing permissions and
240
240
  * limitations under the License.
241
- */const Xe="[DEFAULT]",Qr={[Qe]:"fire-core",[Sr]:"fire-core-compat",[Rr]:"fire-analytics",[Cr]:"fire-analytics-compat",[Or]:"fire-app-check",[Pr]:"fire-app-check-compat",[kr]:"fire-auth",[Nr]:"fire-auth-compat",[Dr]:"fire-rtdb",[Lr]:"fire-rtdb-compat",[$r]:"fire-fn",[Mr]:"fire-fn-compat",[Ur]:"fire-iid",[jr]:"fire-iid-compat",[Fr]:"fire-fcm",[Br]:"fire-fcm-compat",[Hr]:"fire-perf",[Vr]:"fire-perf-compat",[Wr]:"fire-rc",[xr]:"fire-rc-compat",[zr]:"fire-gcs",[qr]:"fire-gcs-compat",[Jr]:"fire-fst",[Gr]:"fire-fst-compat","fire-js":"fire-js",[Kr]:"fire-js-all"};/**
241
+ */const Xe="[DEFAULT]",Qr={[Qe]:"fire-core",[Sr]:"fire-core-compat",[Rr]:"fire-analytics",[Cr]:"fire-analytics-compat",[Or]:"fire-app-check",[Pr]:"fire-app-check-compat",[kr]:"fire-auth",[Nr]:"fire-auth-compat",[Dr]:"fire-rtdb",[Lr]:"fire-rtdb-compat",[$r]:"fire-fn",[Mr]:"fire-fn-compat",[Ur]:"fire-iid",[jr]:"fire-iid-compat",[Fr]:"fire-fcm",[Br]:"fire-fcm-compat",[Hr]:"fire-perf",[Vr]:"fire-perf-compat",[Wr]:"fire-rc",[xr]:"fire-rc-compat",[zr]:"fire-gcs",[qr]:"fire-gcs-compat",[Gr]:"fire-fst",[Jr]:"fire-fst-compat","fire-js":"fire-js",[Kr]:"fire-js-all"};/**
242
242
  * @license
243
243
  * Copyright 2019 Google LLC
244
244
  *
@@ -328,7 +328,7 @@
328
328
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
329
329
  * See the License for the specific language governing permissions and
330
330
  * limitations under the License.
331
- */const si=1024,oi=30*24*60*60*1e3;class ai{constructor(e){this.container=e,this._heartbeatsCache=null;const t=this.container.getProvider("app").getImmediate();this._storage=new li(t),this._heartbeatsCachePromise=this._storage.read().then(r=>(this._heartbeatsCache=r,r))}async triggerHeartbeat(){var e;const r=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),i=Lt();if(((e=this._heartbeatsCache)===null||e===void 0?void 0:e.heartbeats)==null&&(this._heartbeatsCache=await this._heartbeatsCachePromise),!(this._heartbeatsCache.lastSentHeartbeatDate===i||this._heartbeatsCache.heartbeats.some(s=>s.date===i)))return this._heartbeatsCache.heartbeats.push({date:i,agent:r}),this._heartbeatsCache.heartbeats=this._heartbeatsCache.heartbeats.filter(s=>{const o=new Date(s.date).valueOf();return Date.now()-o<=oi}),this._storage.overwrite(this._heartbeatsCache)}async getHeartbeatsHeader(){var e;if(this._heartbeatsCache===null&&await this._heartbeatsCachePromise,((e=this._heartbeatsCache)===null||e===void 0?void 0:e.heartbeats)==null||this._heartbeatsCache.heartbeats.length===0)return"";const t=Lt(),{heartbeatsToSend:r,unsentEntries:i}=ci(this._heartbeatsCache.heartbeats),s=yt(JSON.stringify({version:2,heartbeats:r}));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}}function Lt(){return new Date().toISOString().substring(0,10)}function ci(n,e=si){const t=[];let r=n.slice();for(const i of n){const s=t.find(o=>o.agent===i.agent);if(s){if(s.dates.push(i.date),$t(t)>e){s.dates.pop();break}}else if(t.push({agent:i.agent,dates:[i.date]}),$t(t)>e){t.pop();break}r=r.slice(1)}return{heartbeatsToSend:t,unsentEntries:r}}class li{constructor(e){this.app=e,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return Yn()?Qn().then(()=>!0).catch(()=>!1):!1}async read(){return await this._canUseIndexedDBPromise?await ii(this.app)||{heartbeats:[]}:{heartbeats:[]}}async overwrite(e){var t;if(await this._canUseIndexedDBPromise){const i=await this.read();return Nt(this.app,{lastSentHeartbeatDate:(t=e.lastSentHeartbeatDate)!==null&&t!==void 0?t:i.lastSentHeartbeatDate,heartbeats:e.heartbeats})}else return}async add(e){var t;if(await this._canUseIndexedDBPromise){const i=await this.read();return Nt(this.app,{lastSentHeartbeatDate:(t=e.lastSentHeartbeatDate)!==null&&t!==void 0?t:i.lastSentHeartbeatDate,heartbeats:[...i.heartbeats,...e.heartbeats]})}else return}}function $t(n){return yt(JSON.stringify({version:2,heartbeats:n})).length}/**
331
+ */const si=1024,oi=30*24*60*60*1e3;class ai{constructor(e){this.container=e,this._heartbeatsCache=null;const t=this.container.getProvider("app").getImmediate();this._storage=new li(t),this._heartbeatsCachePromise=this._storage.read().then(r=>(this._heartbeatsCache=r,r))}async triggerHeartbeat(){var e,t;const i=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),s=Lt();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)))return this._heartbeatsCache.heartbeats.push({date:s,agent:i}),this._heartbeatsCache.heartbeats=this._heartbeatsCache.heartbeats.filter(o=>{const c=new Date(o.date).valueOf();return Date.now()-c<=oi}),this._storage.overwrite(this._heartbeatsCache)}async getHeartbeatsHeader(){var e;if(this._heartbeatsCache===null&&await this._heartbeatsCachePromise,((e=this._heartbeatsCache)===null||e===void 0?void 0:e.heartbeats)==null||this._heartbeatsCache.heartbeats.length===0)return"";const t=Lt(),{heartbeatsToSend:r,unsentEntries:i}=ci(this._heartbeatsCache.heartbeats),s=yt(JSON.stringify({version:2,heartbeats:r}));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}}function Lt(){return new Date().toISOString().substring(0,10)}function ci(n,e=si){const t=[];let r=n.slice();for(const i of n){const s=t.find(o=>o.agent===i.agent);if(s){if(s.dates.push(i.date),$t(t)>e){s.dates.pop();break}}else if(t.push({agent:i.agent,dates:[i.date]}),$t(t)>e){t.pop();break}r=r.slice(1)}return{heartbeatsToSend:t,unsentEntries:r}}class li{constructor(e){this.app=e,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return Yn()?Qn().then(()=>!0).catch(()=>!1):!1}async read(){if(await this._canUseIndexedDBPromise){const t=await ii(this.app);return t!=null&&t.heartbeats?t:{heartbeats:[]}}else return{heartbeats:[]}}async overwrite(e){var t;if(await this._canUseIndexedDBPromise){const i=await this.read();return Nt(this.app,{lastSentHeartbeatDate:(t=e.lastSentHeartbeatDate)!==null&&t!==void 0?t:i.lastSentHeartbeatDate,heartbeats:e.heartbeats})}else return}async add(e){var t;if(await this._canUseIndexedDBPromise){const i=await this.read();return Nt(this.app,{lastSentHeartbeatDate:(t=e.lastSentHeartbeatDate)!==null&&t!==void 0?t:i.lastSentHeartbeatDate,heartbeats:[...i.heartbeats,...e.heartbeats]})}else return}}function $t(n){return yt(JSON.stringify({version:2,heartbeats:n})).length}/**
332
332
  * @license
333
333
  * Copyright 2019 Google LLC
334
334
  *
@@ -343,7 +343,7 @@
343
343
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
344
344
  * See the License for the specific language governing permissions and
345
345
  * limitations under the License.
346
- */function di(n){me(new se("platform-logger",e=>new Tr(e),"PRIVATE")),me(new se("heartbeat",e=>new ai(e),"PRIVATE")),oe(Qe,Rt,n),oe(Qe,Rt,"esm2017"),oe("fire-js","")}di("");var ui="firebase",hi="10.6.0";/**
346
+ */function di(n){me(new se("platform-logger",e=>new Tr(e),"PRIVATE")),me(new se("heartbeat",e=>new ai(e),"PRIVATE")),oe(Qe,Rt,n),oe(Qe,Rt,"esm2017"),oe("fire-js","")}di("");var ui="firebase",hi="10.7.1";/**
347
347
  * @license
348
348
  * Copyright 2020 Google LLC
349
349
  *
@@ -418,7 +418,7 @@
418
418
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
419
419
  * See the License for the specific language governing permissions and
420
420
  * limitations under the License.
421
- */function yi(){return typeof navigator<"u"&&navigator&&"onLine"in navigator&&typeof navigator.onLine=="boolean"&&(mi()||Jn()||"connection"in navigator)?navigator.onLine:!0}function _i(){if(typeof navigator>"u")return null;const n=navigator;return n.languages&&n.languages[0]||n.language||null}/**
421
+ */function yi(){return typeof navigator<"u"&&navigator&&"onLine"in navigator&&typeof navigator.onLine=="boolean"&&(mi()||Gn()||"connection"in navigator)?navigator.onLine:!0}function _i(){if(typeof navigator>"u")return null;const n=navigator;return n.languages&&n.languages[0]||n.language||null}/**
422
422
  * @license
423
423
  * Copyright 2020 Google LLC
424
424
  *
@@ -433,7 +433,7 @@
433
433
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
434
434
  * See the License for the specific language governing permissions and
435
435
  * limitations under the License.
436
- */class ve{constructor(e,t){this.shortDelay=e,this.longDelay=t,F(t>e,"Short delay should be less than long delay!"),this.isMobile=qn()||Gn()}get(){return yi()?this.isMobile?this.longDelay:this.shortDelay:Math.min(5e3,this.shortDelay)}}/**
436
+ */class ve{constructor(e,t){this.shortDelay=e,this.longDelay=t,F(t>e,"Short delay should be less than long delay!"),this.isMobile=qn()||Jn()}get(){return yi()?this.isMobile?this.longDelay:this.shortDelay:Math.min(5e3,this.shortDelay)}}/**
437
437
  * @license
438
438
  * Copyright 2020 Google LLC
439
439
  *
@@ -478,7 +478,7 @@
478
478
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
479
479
  * See the License for the specific language governing permissions and
480
480
  * limitations under the License.
481
- */const vi={CREDENTIAL_MISMATCH:"custom-token-mismatch",MISSING_CUSTOM_TOKEN:"internal-error",INVALID_IDENTIFIER:"invalid-email",MISSING_CONTINUE_URI:"internal-error",INVALID_PASSWORD:"wrong-password",MISSING_PASSWORD:"missing-password",EMAIL_EXISTS:"email-already-in-use",PASSWORD_LOGIN_DISABLED:"operation-not-allowed",INVALID_IDP_RESPONSE:"invalid-credential",INVALID_PENDING_TOKEN:"invalid-credential",FEDERATED_USER_ID_ALREADY_LINKED:"credential-already-in-use",MISSING_REQ_TYPE:"internal-error",EMAIL_NOT_FOUND:"user-not-found",RESET_PASSWORD_EXCEED_LIMIT:"too-many-requests",EXPIRED_OOB_CODE:"expired-action-code",INVALID_OOB_CODE:"invalid-action-code",MISSING_OOB_CODE:"internal-error",CREDENTIAL_TOO_OLD_LOGIN_AGAIN:"requires-recent-login",INVALID_ID_TOKEN:"invalid-user-token",TOKEN_EXPIRED:"user-token-expired",USER_NOT_FOUND:"user-token-expired",TOO_MANY_ATTEMPTS_TRY_LATER:"too-many-requests",PASSWORD_DOES_NOT_MEET_REQUIREMENTS:"password-does-not-meet-requirements",INVALID_CODE:"invalid-verification-code",INVALID_SESSION_INFO:"invalid-verification-id",INVALID_TEMPORARY_PROOF:"invalid-credential",MISSING_SESSION_INFO:"missing-verification-id",SESSION_EXPIRED:"code-expired",MISSING_ANDROID_PACKAGE_NAME:"missing-android-pkg-name",UNAUTHORIZED_DOMAIN:"unauthorized-continue-uri",INVALID_OAUTH_CLIENT_ID:"invalid-oauth-client-id",ADMIN_ONLY_OPERATION:"admin-restricted-operation",INVALID_MFA_PENDING_CREDENTIAL:"invalid-multi-factor-session",MFA_ENROLLMENT_NOT_FOUND:"multi-factor-info-not-found",MISSING_MFA_ENROLLMENT_ID:"missing-multi-factor-info",MISSING_MFA_PENDING_CREDENTIAL:"missing-multi-factor-session",SECOND_FACTOR_EXISTS:"second-factor-already-in-use",SECOND_FACTOR_LIMIT_EXCEEDED:"maximum-second-factor-count-exceeded",BLOCKING_FUNCTION_ERROR_RESPONSE:"internal-error",RECAPTCHA_NOT_ENABLED:"recaptcha-not-enabled",MISSING_RECAPTCHA_TOKEN:"missing-recaptcha-token",INVALID_RECAPTCHA_TOKEN:"invalid-recaptcha-token",INVALID_RECAPTCHA_ACTION:"invalid-recaptcha-action",MISSING_CLIENT_TYPE:"missing-client-type",MISSING_RECAPTCHA_VERSION:"missing-recaptcha-version",INVALID_RECAPTCHA_VERSION:"invalid-recaptcha-version",INVALID_REQ_TYPE:"invalid-req-type"};/**
481
+ */const vi={CREDENTIAL_MISMATCH:"custom-token-mismatch",MISSING_CUSTOM_TOKEN:"internal-error",INVALID_IDENTIFIER:"invalid-email",MISSING_CONTINUE_URI:"internal-error",INVALID_PASSWORD:"wrong-password",MISSING_PASSWORD:"missing-password",INVALID_LOGIN_CREDENTIALS:"invalid-credential",EMAIL_EXISTS:"email-already-in-use",PASSWORD_LOGIN_DISABLED:"operation-not-allowed",INVALID_IDP_RESPONSE:"invalid-credential",INVALID_PENDING_TOKEN:"invalid-credential",FEDERATED_USER_ID_ALREADY_LINKED:"credential-already-in-use",MISSING_REQ_TYPE:"internal-error",EMAIL_NOT_FOUND:"user-not-found",RESET_PASSWORD_EXCEED_LIMIT:"too-many-requests",EXPIRED_OOB_CODE:"expired-action-code",INVALID_OOB_CODE:"invalid-action-code",MISSING_OOB_CODE:"internal-error",CREDENTIAL_TOO_OLD_LOGIN_AGAIN:"requires-recent-login",INVALID_ID_TOKEN:"invalid-user-token",TOKEN_EXPIRED:"user-token-expired",USER_NOT_FOUND:"user-token-expired",TOO_MANY_ATTEMPTS_TRY_LATER:"too-many-requests",PASSWORD_DOES_NOT_MEET_REQUIREMENTS:"password-does-not-meet-requirements",INVALID_CODE:"invalid-verification-code",INVALID_SESSION_INFO:"invalid-verification-id",INVALID_TEMPORARY_PROOF:"invalid-credential",MISSING_SESSION_INFO:"missing-verification-id",SESSION_EXPIRED:"code-expired",MISSING_ANDROID_PACKAGE_NAME:"missing-android-pkg-name",UNAUTHORIZED_DOMAIN:"unauthorized-continue-uri",INVALID_OAUTH_CLIENT_ID:"invalid-oauth-client-id",ADMIN_ONLY_OPERATION:"admin-restricted-operation",INVALID_MFA_PENDING_CREDENTIAL:"invalid-multi-factor-session",MFA_ENROLLMENT_NOT_FOUND:"multi-factor-info-not-found",MISSING_MFA_ENROLLMENT_ID:"missing-multi-factor-info",MISSING_MFA_PENDING_CREDENTIAL:"missing-multi-factor-session",SECOND_FACTOR_EXISTS:"second-factor-already-in-use",SECOND_FACTOR_LIMIT_EXCEEDED:"maximum-second-factor-count-exceeded",BLOCKING_FUNCTION_ERROR_RESPONSE:"internal-error",RECAPTCHA_NOT_ENABLED:"recaptcha-not-enabled",MISSING_RECAPTCHA_TOKEN:"missing-recaptcha-token",INVALID_RECAPTCHA_TOKEN:"invalid-recaptcha-token",INVALID_RECAPTCHA_ACTION:"invalid-recaptcha-action",MISSING_CLIENT_TYPE:"missing-client-type",MISSING_RECAPTCHA_VERSION:"missing-recaptcha-version",INVALID_RECAPTCHA_VERSION:"invalid-recaptcha-version",INVALID_REQ_TYPE:"invalid-req-type"};/**
482
482
  * @license
483
483
  * Copyright 2020 Google LLC
484
484
  *
@@ -688,7 +688,7 @@
688
688
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
689
689
  * See the License for the specific language governing permissions and
690
690
  * limitations under the License.
691
- */function Jt(n){const e=n.toLowerCase();if(e.includes("opera/")||e.includes("opr/")||e.includes("opios/"))return"Opera";if(Yt(e))return"IEMobile";if(e.includes("msie")||e.includes("trident/"))return"IE";if(e.includes("edge/"))return"Edge";if(Gt(e))return"Firefox";if(e.includes("silk/"))return"Silk";if(Xt(e))return"Blackberry";if(Zt(e))return"Webos";if(at(e))return"Safari";if((e.includes("chrome/")||Kt(e))&&!e.includes("edge/"))return"Chrome";if(Qt(e))return"Android";{const t=/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/,r=n.match(t);if((r==null?void 0:r.length)===2)return r[1]}return"Other"}function Gt(n=R()){return/firefox\//i.test(n)}function at(n=R()){const e=n.toLowerCase();return e.includes("safari/")&&!e.includes("chrome/")&&!e.includes("crios/")&&!e.includes("android")}function Kt(n=R()){return/crios\//i.test(n)}function Yt(n=R()){return/iemobile/i.test(n)}function Qt(n=R()){return/android/i.test(n)}function Xt(n=R()){return/blackberry/i.test(n)}function Zt(n=R()){return/webos/i.test(n)}function Le(n=R()){return/iphone|ipad|ipod/i.test(n)||/macintosh/i.test(n)&&/mobile/i.test(n)}function Mi(n=R()){var e;return Le(n)&&!!(!((e=window.navigator)===null||e===void 0)&&e.standalone)}function Ui(){return Kn()&&document.documentMode===10}function en(n=R()){return Le(n)||Qt(n)||Zt(n)||Xt(n)||/windows phone/i.test(n)||Yt(n)}function ji(){try{return!!(window&&window!==window.top)}catch{return!1}}/**
691
+ */function Gt(n){const e=n.toLowerCase();if(e.includes("opera/")||e.includes("opr/")||e.includes("opios/"))return"Opera";if(Yt(e))return"IEMobile";if(e.includes("msie")||e.includes("trident/"))return"IE";if(e.includes("edge/"))return"Edge";if(Jt(e))return"Firefox";if(e.includes("silk/"))return"Silk";if(Xt(e))return"Blackberry";if(Zt(e))return"Webos";if(at(e))return"Safari";if((e.includes("chrome/")||Kt(e))&&!e.includes("edge/"))return"Chrome";if(Qt(e))return"Android";{const t=/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/,r=n.match(t);if((r==null?void 0:r.length)===2)return r[1]}return"Other"}function Jt(n=R()){return/firefox\//i.test(n)}function at(n=R()){const e=n.toLowerCase();return e.includes("safari/")&&!e.includes("chrome/")&&!e.includes("crios/")&&!e.includes("android")}function Kt(n=R()){return/crios\//i.test(n)}function Yt(n=R()){return/iemobile/i.test(n)}function Qt(n=R()){return/android/i.test(n)}function Xt(n=R()){return/blackberry/i.test(n)}function Zt(n=R()){return/webos/i.test(n)}function Le(n=R()){return/iphone|ipad|ipod/i.test(n)||/macintosh/i.test(n)&&/mobile/i.test(n)}function Mi(n=R()){var e;return Le(n)&&!!(!((e=window.navigator)===null||e===void 0)&&e.standalone)}function Ui(){return Kn()&&document.documentMode===10}function en(n=R()){return Le(n)||Qt(n)||Zt(n)||Xt(n)||/windows phone/i.test(n)||Yt(n)}function ji(){try{return!!(window&&window!==window.top)}catch{return!1}}/**
692
692
  * @license
693
693
  * Copyright 2020 Google LLC
694
694
  *
@@ -703,7 +703,7 @@
703
703
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
704
704
  * See the License for the specific language governing permissions and
705
705
  * limitations under the License.
706
- */function tn(n,e=[]){let t;switch(n){case"Browser":t=Jt(R());break;case"Worker":t=`${Jt(R())}-${n}`;break;default:t=n}const r=e.length?e.join(","):"FirebaseCore-web";return`${t}/JsCore/${ye}/${r}`}/**
706
+ */function tn(n,e=[]){let t;switch(n){case"Browser":t=Gt(R());break;case"Worker":t=`${Gt(R())}-${n}`;break;default:t=n}const r=e.length?e.join(","):"FirebaseCore-web";return`${t}/JsCore/${ye}/${r}`}/**
707
707
  * @license
708
708
  * Copyright 2022 Google LLC
709
709
  *
@@ -778,7 +778,7 @@
778
778
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
779
779
  * See the License for the specific language governing permissions and
780
780
  * limitations under the License.
781
- */function xi(){var n,e;return(e=(n=document.getElementsByTagName("head"))===null||n===void 0?void 0:n[0])!==null&&e!==void 0?e:document}function rn(n){return new Promise((e,t)=>{const r=document.createElement("script");r.setAttribute("src",n),r.onload=e,r.onerror=i=>{const s=L("internal-error");s.customData=i,t(s)},r.type="text/javascript",r.charset="UTF-8",xi().appendChild(r)})}function zi(n){return`__${n}${Math.floor(Math.random()*1e6)}`}const qi="https://www.google.com/recaptcha/enterprise.js?render=",Ji="recaptcha-enterprise",Gi="NO_RECAPTCHA";class Ki{constructor(e){this.type=Ji,this.auth=te(e)}async verify(e="verify",t=!1){async function r(s){if(!t){if(s.tenantId==null&&s._agentRecaptchaConfig!=null)return s._agentRecaptchaConfig.siteKey;if(s.tenantId!=null&&s._tenantRecaptchaConfigs[s.tenantId]!==void 0)return s._tenantRecaptchaConfigs[s.tenantId].siteKey}return new Promise(async(o,c)=>{Ti(s,{clientType:"CLIENT_TYPE_WEB",version:"RECAPTCHA_ENTERPRISE"}).then(a=>{if(a.recaptchaKey===void 0)c(new Error("recaptcha Enterprise site key undefined"));else{const u=new Ei(a);return s.tenantId==null?s._agentRecaptchaConfig=u:s._tenantRecaptchaConfigs[s.tenantId]=u,o(u.siteKey)}}).catch(a=>{c(a)})})}function i(s,o,c){const a=window.grecaptcha;Vt(a)?a.enterprise.ready(()=>{a.enterprise.execute(s,{action:e}).then(u=>{o(u)}).catch(()=>{o(Gi)})}):c(Error("No reCAPTCHA enterprise script loaded."))}return new Promise((s,o)=>{r(this.auth).then(c=>{if(!t&&Vt(window.grecaptcha))i(c,s,o);else{if(typeof window>"u"){o(new Error("RecaptchaVerifier is only supported in browser"));return}rn(qi+c).then(()=>{i(c,s,o)}).catch(a=>{o(a)})}}).catch(c=>{o(c)})})}}async function sn(n,e,t,r=!1){const i=new Ki(n);let s;try{s=await i.verify(t)}catch{s=await i.verify(t,!0)}const o=Object.assign({},e);return r?Object.assign(o,{captchaResp:s}):Object.assign(o,{captchaResponse:s}),Object.assign(o,{clientType:"CLIENT_TYPE_WEB"}),Object.assign(o,{recaptchaVersion:"RECAPTCHA_ENTERPRISE"}),o}async function ct(n,e,t,r){var i;if(!((i=n._getRecaptchaConfig())===null||i===void 0)&&i.isProviderEnabled("EMAIL_PASSWORD_PROVIDER")){const s=await sn(n,e,t,t==="getOobCode");return r(n,s)}else return r(n,e).catch(async s=>{if(s.code==="auth/missing-recaptcha-token"){console.log(`${t} is protected by reCAPTCHA Enterprise for this project. Automatically triggering the reCAPTCHA flow and restarting the flow.`);const o=await sn(n,e,t,t==="getOobCode");return r(n,o)}else return Promise.reject(s)})}/**
781
+ */function xi(){var n,e;return(e=(n=document.getElementsByTagName("head"))===null||n===void 0?void 0:n[0])!==null&&e!==void 0?e:document}function rn(n){return new Promise((e,t)=>{const r=document.createElement("script");r.setAttribute("src",n),r.onload=e,r.onerror=i=>{const s=L("internal-error");s.customData=i,t(s)},r.type="text/javascript",r.charset="UTF-8",xi().appendChild(r)})}function zi(n){return`__${n}${Math.floor(Math.random()*1e6)}`}const qi="https://www.google.com/recaptcha/enterprise.js?render=",Gi="recaptcha-enterprise",Ji="NO_RECAPTCHA";class Ki{constructor(e){this.type=Gi,this.auth=te(e)}async verify(e="verify",t=!1){async function r(s){if(!t){if(s.tenantId==null&&s._agentRecaptchaConfig!=null)return s._agentRecaptchaConfig.siteKey;if(s.tenantId!=null&&s._tenantRecaptchaConfigs[s.tenantId]!==void 0)return s._tenantRecaptchaConfigs[s.tenantId].siteKey}return new Promise(async(o,c)=>{Ti(s,{clientType:"CLIENT_TYPE_WEB",version:"RECAPTCHA_ENTERPRISE"}).then(a=>{if(a.recaptchaKey===void 0)c(new Error("recaptcha Enterprise site key undefined"));else{const u=new Ei(a);return s.tenantId==null?s._agentRecaptchaConfig=u:s._tenantRecaptchaConfigs[s.tenantId]=u,o(u.siteKey)}}).catch(a=>{c(a)})})}function i(s,o,c){const a=window.grecaptcha;Vt(a)?a.enterprise.ready(()=>{a.enterprise.execute(s,{action:e}).then(u=>{o(u)}).catch(()=>{o(Ji)})}):c(Error("No reCAPTCHA enterprise script loaded."))}return new Promise((s,o)=>{r(this.auth).then(c=>{if(!t&&Vt(window.grecaptcha))i(c,s,o);else{if(typeof window>"u"){o(new Error("RecaptchaVerifier is only supported in browser"));return}rn(qi+c).then(()=>{i(c,s,o)}).catch(a=>{o(a)})}}).catch(c=>{o(c)})})}}async function sn(n,e,t,r=!1){const i=new Ki(n);let s;try{s=await i.verify(t)}catch{s=await i.verify(t,!0)}const o=Object.assign({},e);return r?Object.assign(o,{captchaResp:s}):Object.assign(o,{captchaResponse:s}),Object.assign(o,{clientType:"CLIENT_TYPE_WEB"}),Object.assign(o,{recaptchaVersion:"RECAPTCHA_ENTERPRISE"}),o}async function ct(n,e,t,r){var i;if(!((i=n._getRecaptchaConfig())===null||i===void 0)&&i.isProviderEnabled("EMAIL_PASSWORD_PROVIDER")){const s=await sn(n,e,t,t==="getOobCode");return r(n,s)}else return r(n,e).catch(async s=>{if(s.code==="auth/missing-recaptcha-token"){console.log(`${t} is protected by reCAPTCHA Enterprise for this project. Automatically triggering the reCAPTCHA flow and restarting the flow.`);const o=await sn(n,e,t,t==="getOobCode");return r(n,o)}else return Promise.reject(s)})}/**
782
782
  * @license
783
783
  * Copyright 2020 Google LLC
784
784
  *
@@ -958,7 +958,7 @@
958
958
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
959
959
  * See the License for the specific language governing permissions and
960
960
  * limitations under the License.
961
- */class J extends Te{constructor(){super("facebook.com")}static credential(e){return ne._fromParams({providerId:J.PROVIDER_ID,signInMethod:J.FACEBOOK_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return J.credentialFromTaggedObject(e)}static credentialFromError(e){return J.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e)||!e.oauthAccessToken)return null;try{return J.credential(e.oauthAccessToken)}catch{return null}}}J.FACEBOOK_SIGN_IN_METHOD="facebook.com",J.PROVIDER_ID="facebook.com";/**
961
+ */class G extends Te{constructor(){super("facebook.com")}static credential(e){return ne._fromParams({providerId:G.PROVIDER_ID,signInMethod:G.FACEBOOK_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return G.credentialFromTaggedObject(e)}static credentialFromError(e){return G.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e)||!e.oauthAccessToken)return null;try{return G.credential(e.oauthAccessToken)}catch{return null}}}G.FACEBOOK_SIGN_IN_METHOD="facebook.com",G.PROVIDER_ID="facebook.com";/**
962
962
  * @license
963
963
  * Copyright 2020 Google LLC
964
964
  *
@@ -973,7 +973,7 @@
973
973
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
974
974
  * See the License for the specific language governing permissions and
975
975
  * limitations under the License.
976
- */class G extends Te{constructor(){super("google.com"),this.addScope("profile")}static credential(e,t){return ne._fromParams({providerId:G.PROVIDER_ID,signInMethod:G.GOOGLE_SIGN_IN_METHOD,idToken:e,accessToken:t})}static credentialFromResult(e){return G.credentialFromTaggedObject(e)}static credentialFromError(e){return G.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;const{oauthIdToken:t,oauthAccessToken:r}=e;if(!t&&!r)return null;try{return G.credential(t,r)}catch{return null}}}G.GOOGLE_SIGN_IN_METHOD="google.com",G.PROVIDER_ID="google.com";/**
976
+ */class J extends Te{constructor(){super("google.com"),this.addScope("profile")}static credential(e,t){return ne._fromParams({providerId:J.PROVIDER_ID,signInMethod:J.GOOGLE_SIGN_IN_METHOD,idToken:e,accessToken:t})}static credentialFromResult(e){return J.credentialFromTaggedObject(e)}static credentialFromError(e){return J.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;const{oauthIdToken:t,oauthAccessToken:r}=e;if(!t&&!r)return null;try{return J.credential(t,r)}catch{return null}}}J.GOOGLE_SIGN_IN_METHOD="google.com",J.PROVIDER_ID="google.com";/**
977
977
  * @license
978
978
  * Copyright 2020 Google LLC
979
979
  *
@@ -1243,7 +1243,7 @@
1243
1243
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1244
1244
  * See the License for the specific language governing permissions and
1245
1245
  * limitations under the License.
1246
- */const yn="firebaseLocalStorageDb",ks=1,je="firebaseLocalStorage",_n="fbase_key";class Ae{constructor(e){this.request=e}toPromise(){return new Promise((e,t)=>{this.request.addEventListener("success",()=>{e(this.request.result)}),this.request.addEventListener("error",()=>{t(this.request.error)})})}}function Fe(n,e){return n.transaction([je],e?"readwrite":"readonly").objectStore(je)}function Ns(){const n=indexedDB.deleteDatabase(yn);return new Ae(n).toPromise()}function ht(){const n=indexedDB.open(yn,ks);return new Promise((e,t)=>{n.addEventListener("error",()=>{t(n.error)}),n.addEventListener("upgradeneeded",()=>{const r=n.result;try{r.createObjectStore(je,{keyPath:_n})}catch(i){t(i)}}),n.addEventListener("success",async()=>{const r=n.result;r.objectStoreNames.contains(je)?e(r):(r.close(),await Ns(),e(await ht()))})})}async function vn(n,e,t){const r=Fe(n,!0).put({[_n]:e,value:t});return new Ae(r).toPromise()}async function Ds(n,e){const t=Fe(n,!1).get(e),r=await new Ae(t).toPromise();return r===void 0?null:r.value}function bn(n,e){const t=Fe(n,!0).delete(e);return new Ae(t).toPromise()}const Ls=800,$s=3;class In{constructor(){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(()=>{},()=>{})}async _openDb(){return this.db?this.db:(this.db=await ht(),this.db)}async _withRetries(e){let t=0;for(;;)try{const r=await this._openDb();return await e(r)}catch(r){if(t++>$s)throw r;this.db&&(this.db.close(),this.db=void 0)}}async initializeServiceWorkerMessaging(){return mn()?this.initializeReceiver():this.initializeSender()}async initializeReceiver(){this.receiver=Ue._getInstance(Os()),this.receiver._subscribe("keyChanged",async(e,t)=>({keyProcessed:(await this._poll()).includes(t.key)})),this.receiver._subscribe("ping",async(e,t)=>["keyChanged"])}async initializeSender(){var e,t;if(this.activeServiceWorker=await Rs(),!this.activeServiceWorker)return;this.sender=new Ss(this.activeServiceWorker);const r=await this.sender._send("ping",{},800);r&&!((e=r[0])===null||e===void 0)&&e.fulfilled&&!((t=r[0])===null||t===void 0)&&t.value.includes("keyChanged")&&(this.serviceWorkerReceiverAvailable=!0)}async notifyServiceWorker(e){if(!(!this.sender||!this.activeServiceWorker||Ps()!==this.activeServiceWorker))try{await this.sender._send("keyChanged",{key:e},this.serviceWorkerReceiverAvailable?800:50)}catch{}}async _isAvailable(){try{if(!indexedDB)return!1;const e=await ht();return await vn(e,Me,"1"),await bn(e,Me),!0}catch{}return!1}async _withPendingWrite(e){this.pendingWrites++;try{await e()}finally{this.pendingWrites--}}async _set(e,t){return this._withPendingWrite(async()=>(await this._withRetries(r=>vn(r,e,t)),this.localCache[e]=t,this.notifyServiceWorker(e)))}async _get(e){const t=await this._withRetries(r=>Ds(r,e));return this.localCache[e]=t,t}async _remove(e){return this._withPendingWrite(async()=>(await this._withRetries(t=>bn(t,e)),delete this.localCache[e],this.notifyServiceWorker(e)))}async _poll(){const e=await this._withRetries(i=>{const s=Fe(i,!1).getAll();return new Ae(s).toPromise()});if(!e)return[];if(this.pendingWrites!==0)return[];const t=[],r=new Set;for(const{fbase_key:i,value:s}of e)r.add(i),JSON.stringify(this.localCache[i])!==JSON.stringify(s)&&(this.notifyListeners(i,s),t.push(i));for(const i of Object.keys(this.localCache))this.localCache[i]&&!r.has(i)&&(this.notifyListeners(i,null),t.push(i));return t}notifyListeners(e,t){this.localCache[e]=t;const r=this.listeners[e];if(r)for(const i of Array.from(r))i(t)}startPolling(){this.stopPolling(),this.pollTimer=setInterval(async()=>this._poll(),Ls)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}_addListener(e,t){Object.keys(this.listeners).length===0&&this.startPolling(),this.listeners[e]||(this.listeners[e]=new Set,this._get(e)),this.listeners[e].add(t)}_removeListener(e,t){this.listeners[e]&&(this.listeners[e].delete(t),this.listeners[e].size===0&&delete this.listeners[e]),Object.keys(this.listeners).length===0&&this.stopPolling()}}In.type="LOCAL";const Ms=In;new ve(3e4,6e4);/**
1246
+ */const yn="firebaseLocalStorageDb",ks=1,je="firebaseLocalStorage",_n="fbase_key";class Ae{constructor(e){this.request=e}toPromise(){return new Promise((e,t)=>{this.request.addEventListener("success",()=>{e(this.request.result)}),this.request.addEventListener("error",()=>{t(this.request.error)})})}}function Fe(n,e){return n.transaction([je],e?"readwrite":"readonly").objectStore(je)}function Ns(){const n=indexedDB.deleteDatabase(yn);return new Ae(n).toPromise()}function ht(){const n=indexedDB.open(yn,ks);return new Promise((e,t)=>{n.addEventListener("error",()=>{t(n.error)}),n.addEventListener("upgradeneeded",()=>{const r=n.result;try{r.createObjectStore(je,{keyPath:_n})}catch(i){t(i)}}),n.addEventListener("success",async()=>{const r=n.result;r.objectStoreNames.contains(je)?e(r):(r.close(),await Ns(),e(await ht()))})})}async function vn(n,e,t){const r=Fe(n,!0).put({[_n]:e,value:t});return new Ae(r).toPromise()}async function Ds(n,e){const t=Fe(n,!1).get(e),r=await new Ae(t).toPromise();return r===void 0?null:r.value}function bn(n,e){const t=Fe(n,!0).delete(e);return new Ae(t).toPromise()}const Ls=800,$s=3;class In{constructor(){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(()=>{},()=>{})}async _openDb(){return this.db?this.db:(this.db=await ht(),this.db)}async _withRetries(e){let t=0;for(;;)try{const r=await this._openDb();return await e(r)}catch(r){if(t++>$s)throw r;this.db&&(this.db.close(),this.db=void 0)}}async initializeServiceWorkerMessaging(){return mn()?this.initializeReceiver():this.initializeSender()}async initializeReceiver(){this.receiver=Ue._getInstance(Os()),this.receiver._subscribe("keyChanged",async(e,t)=>({keyProcessed:(await this._poll()).includes(t.key)})),this.receiver._subscribe("ping",async(e,t)=>["keyChanged"])}async initializeSender(){var e,t;if(this.activeServiceWorker=await Rs(),!this.activeServiceWorker)return;this.sender=new Ss(this.activeServiceWorker);const r=await this.sender._send("ping",{},800);r&&!((e=r[0])===null||e===void 0)&&e.fulfilled&&!((t=r[0])===null||t===void 0)&&t.value.includes("keyChanged")&&(this.serviceWorkerReceiverAvailable=!0)}async notifyServiceWorker(e){if(!(!this.sender||!this.activeServiceWorker||Ps()!==this.activeServiceWorker))try{await this.sender._send("keyChanged",{key:e},this.serviceWorkerReceiverAvailable?800:50)}catch{}}async _isAvailable(){try{if(!indexedDB)return!1;const e=await ht();return await vn(e,Me,"1"),await bn(e,Me),!0}catch{}return!1}async _withPendingWrite(e){this.pendingWrites++;try{await e()}finally{this.pendingWrites--}}async _set(e,t){return this._withPendingWrite(async()=>(await this._withRetries(r=>vn(r,e,t)),this.localCache[e]=t,this.notifyServiceWorker(e)))}async _get(e){const t=await this._withRetries(r=>Ds(r,e));return this.localCache[e]=t,t}async _remove(e){return this._withPendingWrite(async()=>(await this._withRetries(t=>bn(t,e)),delete this.localCache[e],this.notifyServiceWorker(e)))}async _poll(){const e=await this._withRetries(i=>{const s=Fe(i,!1).getAll();return new Ae(s).toPromise()});if(!e)return[];if(this.pendingWrites!==0)return[];const t=[],r=new Set;if(e.length!==0)for(const{fbase_key:i,value:s}of e)r.add(i),JSON.stringify(this.localCache[i])!==JSON.stringify(s)&&(this.notifyListeners(i,s),t.push(i));for(const i of Object.keys(this.localCache))this.localCache[i]&&!r.has(i)&&(this.notifyListeners(i,null),t.push(i));return t}notifyListeners(e,t){this.localCache[e]=t;const r=this.listeners[e];if(r)for(const i of Array.from(r))i(t)}startPolling(){this.stopPolling(),this.pollTimer=setInterval(async()=>this._poll(),Ls)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}_addListener(e,t){Object.keys(this.listeners).length===0&&this.startPolling(),this.listeners[e]||(this.listeners[e]=new Set,this._get(e)),this.listeners[e].add(t)}_removeListener(e,t){this.listeners[e]&&(this.listeners[e].delete(t),this.listeners[e].size===0&&delete this.listeners[e]),Object.keys(this.listeners).length===0&&this.stopPolling()}}In.type="LOCAL";const Ms=In;new ve(3e4,6e4);/**
1247
1247
  * @license
1248
1248
  * Copyright 2021 Google LLC
1249
1249
  *
@@ -1318,7 +1318,7 @@
1318
1318
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1319
1319
  * See the License for the specific language governing permissions and
1320
1320
  * limitations under the License.
1321
- */const Vs="pendingRedirect",Be=new Map;class Ws extends wn{constructor(e,t,r=!1){super(e,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],t,void 0,r),this.eventId=null}async execute(){let e=Be.get(this.auth._key());if(!e){try{const r=await xs(this.resolver,this.auth)?await super.execute():null;e=()=>Promise.resolve(r)}catch(t){e=()=>Promise.reject(t)}Be.set(this.auth._key(),e)}return this.bypassAuthState||Be.set(this.auth._key(),()=>Promise.resolve(null)),e()}async onAuthEvent(e){if(e.type==="signInViaRedirect")return super.onAuthEvent(e);if(e.type==="unknown"){this.resolve(null);return}if(e.eventId){const t=await this.auth._redirectUserForId(e.eventId);if(t)return this.user=t,super.onAuthEvent(e);this.resolve(null)}}async onExecution(){}cleanUp(){}}async function xs(n,e){const t=Js(e),r=qs(n);if(!await r._isAvailable())return!1;const i=await r._get(t)==="true";return await r._remove(t),i}function zs(n,e){Be.set(n._key(),e)}function qs(n){return H(n._redirectPersistence)}function Js(n){return De(Vs,n.config.apiKey,n.name)}async function Gs(n,e,t=!1){const r=te(n),i=Us(r,e),o=await new Ws(r,i,t).execute();return o&&!t&&(delete o.user._redirectEventId,await r._persistUserIfCurrent(o.user),await r._setRedirectUser(null,e)),o}/**
1321
+ */const Vs="pendingRedirect",Be=new Map;class Ws extends wn{constructor(e,t,r=!1){super(e,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],t,void 0,r),this.eventId=null}async execute(){let e=Be.get(this.auth._key());if(!e){try{const r=await xs(this.resolver,this.auth)?await super.execute():null;e=()=>Promise.resolve(r)}catch(t){e=()=>Promise.reject(t)}Be.set(this.auth._key(),e)}return this.bypassAuthState||Be.set(this.auth._key(),()=>Promise.resolve(null)),e()}async onAuthEvent(e){if(e.type==="signInViaRedirect")return super.onAuthEvent(e);if(e.type==="unknown"){this.resolve(null);return}if(e.eventId){const t=await this.auth._redirectUserForId(e.eventId);if(t)return this.user=t,super.onAuthEvent(e);this.resolve(null)}}async onExecution(){}cleanUp(){}}async function xs(n,e){const t=Gs(e),r=qs(n);if(!await r._isAvailable())return!1;const i=await r._get(t)==="true";return await r._remove(t),i}function zs(n,e){Be.set(n._key(),e)}function qs(n){return H(n._redirectPersistence)}function Gs(n){return De(Vs,n.config.apiKey,n.name)}async function Js(n,e,t=!1){const r=te(n),i=Us(r,e),o=await new Ws(r,i,t).execute();return o&&!t&&(delete o.user._redirectEventId,await r._persistUserIfCurrent(o.user),await r._setRedirectUser(null,e)),o}/**
1322
1322
  * @license
1323
1323
  * Copyright 2020 Google LLC
1324
1324
  *
@@ -1408,7 +1408,7 @@
1408
1408
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1409
1409
  * See the License for the specific language governing permissions and
1410
1410
  * limitations under the License.
1411
- */const po={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"},go=500,mo=600,yo="_blank",_o="http://localhost";class Sn{constructor(e){this.window=e,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch{}}}function vo(n,e,t,r=go,i=mo){const s=Math.max((window.screen.availHeight-i)/2,0).toString(),o=Math.max((window.screen.availWidth-r)/2,0).toString();let c="";const a=Object.assign(Object.assign({},po),{width:r.toString(),height:i.toString(),top:s,left:o}),u=R().toLowerCase();t&&(c=Kt(u)?yo:t),Gt(u)&&(e=e||_o,a.scrollbars="yes");const _=Object.entries(a).reduce((A,[P,D])=>`${A}${P}=${D},`,"");if(Mi(u)&&c!=="_self")return bo(e||"",c),new Sn(null);const b=window.open(e||"",c,_);y(b,n,"popup-blocked");try{b.focus()}catch{}return new Sn(b)}function bo(n,e){const t=document.createElement("a");t.href=n,t.target=e;const r=document.createEvent("MouseEvent");r.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),t.dispatchEvent(r)}/**
1411
+ */const po={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"},go=500,mo=600,yo="_blank",_o="http://localhost";class Sn{constructor(e){this.window=e,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch{}}}function vo(n,e,t,r=go,i=mo){const s=Math.max((window.screen.availHeight-i)/2,0).toString(),o=Math.max((window.screen.availWidth-r)/2,0).toString();let c="";const a=Object.assign(Object.assign({},po),{width:r.toString(),height:i.toString(),top:s,left:o}),u=R().toLowerCase();t&&(c=Kt(u)?yo:t),Jt(u)&&(e=e||_o,a.scrollbars="yes");const _=Object.entries(a).reduce((A,[P,D])=>`${A}${P}=${D},`,"");if(Mi(u)&&c!=="_self")return bo(e||"",c),new Sn(null);const b=window.open(e||"",c,_);y(b,n,"popup-blocked");try{b.focus()}catch{}return new Sn(b)}function bo(n,e){const t=document.createElement("a");t.href=n,t.target=e;const r=document.createEvent("MouseEvent");r.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),t.dispatchEvent(r)}/**
1412
1412
  * @license
1413
1413
  * Copyright 2021 Google LLC
1414
1414
  *
@@ -1438,7 +1438,7 @@
1438
1438
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1439
1439
  * See the License for the specific language governing permissions and
1440
1440
  * limitations under the License.
1441
- */const pt="webStorageSupport";class Ao{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=gn,this._completeRedirectFn=Gs,this._overrideRedirectResult=zs}async _openPopup(e,t,r,i){var s;F((s=this.eventManagers[e._key()])===null||s===void 0?void 0:s.manager,"_initialize() not called before _openPopup()");const o=await Cn(e,t,r,rt(),i);return vo(e,o,ut())}async _openRedirect(e,t,r,i){await this._originValidation(e);const s=await Cn(e,t,r,rt(),i);return Cs(s),new Promise(()=>{})}_initialize(e){const t=e._key();if(this.eventManagers[t]){const{manager:i,promise:s}=this.eventManagers[t];return i?Promise.resolve(i):(F(s,"If manager is not set, promise should be"),s)}const r=this.initAndGetManager(e);return this.eventManagers[t]={promise:r},r.catch(()=>{delete this.eventManagers[t]}),r}async initAndGetManager(e){const t=await fo(e),r=new Ys(e);return t.register("authEvent",i=>(y(i==null?void 0:i.authEvent,e,"invalid-auth-event"),{status:r.onEvent(i.authEvent)?"ACK":"ERROR"}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER),this.eventManagers[e._key()]={manager:r},this.iframes[e._key()]=t,r}_isIframeWebStorageSupported(e,t){this.iframes[e._key()].send(pt,{type:pt},i=>{var s;const o=(s=i==null?void 0:i[0])===null||s===void 0?void 0:s[pt];o!==void 0&&t(!!o),N(e,"internal-error")},gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}_originValidation(e){const t=e._key();return this.originValidationPromises[t]||(this.originValidationPromises[t]=to(e)),this.originValidationPromises[t]}get _shouldInitProactively(){return en()||at()||Le()}}const So=Ao;var Rn="@firebase/auth",Pn="1.4.0";/**
1441
+ */const pt="webStorageSupport";class Ao{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=gn,this._completeRedirectFn=Js,this._overrideRedirectResult=zs}async _openPopup(e,t,r,i){var s;F((s=this.eventManagers[e._key()])===null||s===void 0?void 0:s.manager,"_initialize() not called before _openPopup()");const o=await Cn(e,t,r,rt(),i);return vo(e,o,ut())}async _openRedirect(e,t,r,i){await this._originValidation(e);const s=await Cn(e,t,r,rt(),i);return Cs(s),new Promise(()=>{})}_initialize(e){const t=e._key();if(this.eventManagers[t]){const{manager:i,promise:s}=this.eventManagers[t];return i?Promise.resolve(i):(F(s,"If manager is not set, promise should be"),s)}const r=this.initAndGetManager(e);return this.eventManagers[t]={promise:r},r.catch(()=>{delete this.eventManagers[t]}),r}async initAndGetManager(e){const t=await fo(e),r=new Ys(e);return t.register("authEvent",i=>(y(i==null?void 0:i.authEvent,e,"invalid-auth-event"),{status:r.onEvent(i.authEvent)?"ACK":"ERROR"}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER),this.eventManagers[e._key()]={manager:r},this.iframes[e._key()]=t,r}_isIframeWebStorageSupported(e,t){this.iframes[e._key()].send(pt,{type:pt},i=>{var s;const o=(s=i==null?void 0:i[0])===null||s===void 0?void 0:s[pt];o!==void 0&&t(!!o),N(e,"internal-error")},gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}_originValidation(e){const t=e._key();return this.originValidationPromises[t]||(this.originValidationPromises[t]=to(e)),this.originValidationPromises[t]}get _shouldInitProactively(){return en()||at()||Le()}}const So=Ao;var Rn="@firebase/auth",Pn="1.5.1";/**
1442
1442
  * @license
1443
1443
  * Copyright 2020 Google LLC
1444
1444
  *
@@ -1483,4 +1483,4 @@
1483
1483
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1484
1484
  * See the License for the specific language governing permissions and
1485
1485
  * limitations under the License.
1486
- */const Oo=5*60,ko=bt("authIdTokenMaxAge")||Oo;let On=null;const No=n=>async e=>{const t=e&&await e.getIdTokenResult(),r=t&&(new Date().getTime()-Date.parse(t.issuedAtTime))/1e3;if(r&&r>ko)return;const i=t==null?void 0:t.token;On!==i&&(On=i,await fetch(n,{method:i?"POST":"DELETE",headers:i?{Authorization:`Bearer ${i}`}:{}}))};function Do(n=ti()){const e=Pt(n,"auth");if(e.isInitialized())return e.getImmediate();const t=Yi(n,{popupRedirectResolver:So,persistence:[Ms,Ts,gn]}),r=bt("authTokenSyncURL");if(r){const s=No(r);_s(t,s,()=>s(t.currentUser)),ys(t,o=>s(o))}const i=xn("auth");return i&&Xi(t,`http://${i}`),t}Po("Browser");var Lo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function $o(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var kn={exports:{}};(function(n){(function(e){function t(l,m){var d=(l&65535)+(m&65535),w=(l>>16)+(m>>16)+(d>>16);return w<<16|d&65535}function r(l,m){return l<<m|l>>>32-m}function i(l,m,d,w,E,S){return t(r(t(t(m,l),t(w,S)),E),d)}function s(l,m,d,w,E,S,O){return i(m&d|~m&w,l,m,E,S,O)}function o(l,m,d,w,E,S,O){return i(m&w|d&~w,l,m,E,S,O)}function c(l,m,d,w,E,S,O){return i(m^d^w,l,m,E,S,O)}function a(l,m,d,w,E,S,O){return i(d^(m|~w),l,m,E,S,O)}function u(l,m){l[m>>5]|=128<<m%32,l[(m+64>>>9<<4)+14]=m;var d,w,E,S,O,h=1732584193,f=-271733879,p=-1732584194,g=271733878;for(d=0;d<l.length;d+=16)w=h,E=f,S=p,O=g,h=s(h,f,p,g,l[d],7,-680876936),g=s(g,h,f,p,l[d+1],12,-389564586),p=s(p,g,h,f,l[d+2],17,606105819),f=s(f,p,g,h,l[d+3],22,-1044525330),h=s(h,f,p,g,l[d+4],7,-176418897),g=s(g,h,f,p,l[d+5],12,1200080426),p=s(p,g,h,f,l[d+6],17,-1473231341),f=s(f,p,g,h,l[d+7],22,-45705983),h=s(h,f,p,g,l[d+8],7,1770035416),g=s(g,h,f,p,l[d+9],12,-1958414417),p=s(p,g,h,f,l[d+10],17,-42063),f=s(f,p,g,h,l[d+11],22,-1990404162),h=s(h,f,p,g,l[d+12],7,1804603682),g=s(g,h,f,p,l[d+13],12,-40341101),p=s(p,g,h,f,l[d+14],17,-1502002290),f=s(f,p,g,h,l[d+15],22,1236535329),h=o(h,f,p,g,l[d+1],5,-165796510),g=o(g,h,f,p,l[d+6],9,-1069501632),p=o(p,g,h,f,l[d+11],14,643717713),f=o(f,p,g,h,l[d],20,-373897302),h=o(h,f,p,g,l[d+5],5,-701558691),g=o(g,h,f,p,l[d+10],9,38016083),p=o(p,g,h,f,l[d+15],14,-660478335),f=o(f,p,g,h,l[d+4],20,-405537848),h=o(h,f,p,g,l[d+9],5,568446438),g=o(g,h,f,p,l[d+14],9,-1019803690),p=o(p,g,h,f,l[d+3],14,-187363961),f=o(f,p,g,h,l[d+8],20,1163531501),h=o(h,f,p,g,l[d+13],5,-1444681467),g=o(g,h,f,p,l[d+2],9,-51403784),p=o(p,g,h,f,l[d+7],14,1735328473),f=o(f,p,g,h,l[d+12],20,-1926607734),h=c(h,f,p,g,l[d+5],4,-378558),g=c(g,h,f,p,l[d+8],11,-2022574463),p=c(p,g,h,f,l[d+11],16,1839030562),f=c(f,p,g,h,l[d+14],23,-35309556),h=c(h,f,p,g,l[d+1],4,-1530992060),g=c(g,h,f,p,l[d+4],11,1272893353),p=c(p,g,h,f,l[d+7],16,-155497632),f=c(f,p,g,h,l[d+10],23,-1094730640),h=c(h,f,p,g,l[d+13],4,681279174),g=c(g,h,f,p,l[d],11,-358537222),p=c(p,g,h,f,l[d+3],16,-722521979),f=c(f,p,g,h,l[d+6],23,76029189),h=c(h,f,p,g,l[d+9],4,-640364487),g=c(g,h,f,p,l[d+12],11,-421815835),p=c(p,g,h,f,l[d+15],16,530742520),f=c(f,p,g,h,l[d+2],23,-995338651),h=a(h,f,p,g,l[d],6,-198630844),g=a(g,h,f,p,l[d+7],10,1126891415),p=a(p,g,h,f,l[d+14],15,-1416354905),f=a(f,p,g,h,l[d+5],21,-57434055),h=a(h,f,p,g,l[d+12],6,1700485571),g=a(g,h,f,p,l[d+3],10,-1894986606),p=a(p,g,h,f,l[d+10],15,-1051523),f=a(f,p,g,h,l[d+1],21,-2054922799),h=a(h,f,p,g,l[d+8],6,1873313359),g=a(g,h,f,p,l[d+15],10,-30611744),p=a(p,g,h,f,l[d+6],15,-1560198380),f=a(f,p,g,h,l[d+13],21,1309151649),h=a(h,f,p,g,l[d+4],6,-145523070),g=a(g,h,f,p,l[d+11],10,-1120210379),p=a(p,g,h,f,l[d+2],15,718787259),f=a(f,p,g,h,l[d+9],21,-343485551),h=t(h,w),f=t(f,E),p=t(p,S),g=t(g,O);return[h,f,p,g]}function _(l){var m,d="",w=l.length*32;for(m=0;m<w;m+=8)d+=String.fromCharCode(l[m>>5]>>>m%32&255);return d}function b(l){var m,d=[];for(d[(l.length>>2)-1]=void 0,m=0;m<d.length;m+=1)d[m]=0;var w=l.length*8;for(m=0;m<w;m+=8)d[m>>5]|=(l.charCodeAt(m/8)&255)<<m%32;return d}function A(l){return _(u(b(l),l.length*8))}function P(l,m){var d,w=b(l),E=[],S=[],O;for(E[15]=S[15]=void 0,w.length>16&&(w=u(w,l.length*8)),d=0;d<16;d+=1)E[d]=w[d]^909522486,S[d]=w[d]^1549556828;return O=u(E.concat(b(m)),512+m.length*8),_(u(S.concat(O),640))}function D(l){var m="0123456789abcdef",d="",w,E;for(E=0;E<l.length;E+=1)w=l.charCodeAt(E),d+=m.charAt(w>>>4&15)+m.charAt(w&15);return d}function v(l){return unescape(encodeURIComponent(l))}function I(l){return A(v(l))}function M(l){return D(I(l))}function C(l,m){return P(v(l),v(m))}function re(l,m){return D(C(l,m))}function Q(l,m,d){return m?d?C(m,l):re(m,l):d?I(l):M(l)}n.exports?n.exports=Q:e.md5=Q})(Lo)})(kn);var Mo=kn.exports;const Uo=$o(Mo),gt=(n,e)=>async(t,r={})=>{const i=e?await e.getIdToken():null,s=await fetch(`${n}${t}`,{mode:"cors",...r,headers:{...i&&{authorization:`Bearer ${i}`},...r.body&&{"content-type":"application/json"},...r.headers},...r.body&&{body:JSON.stringify(r.body)}}),o=await s.json();if(s.status>202)throw Object.assign(new Error((o==null?void 0:o.message)||`HTTP Error ${s.status}`),{status:s.status,code:o==null?void 0:o.code,body:o});return o},jo=n=>{const e=n.properties||{},t=n.inputProps||Object.keys(e),r=(i,s)=>{const o=e[i]||{};if([null,void 0].includes(s))return o.isRequired?{id:"value-missing-validation-error"}:void 0;if(o.enum)return o.enum.includes(s)?void 0:{id:"enum-validation-error",values:{enum:o.enum,value:s}};switch(o.type){case"integer":if(o.isScalar&&(typeof s!="number"||Number.isNaN(s)))return{id:"invalid-number-validation-error"};break;case"date":break;case"boolean":break;case"json":case"string":default:if(o.isRequired&&!s)return{id:"value-missing-validation-error"};break}};return{validate:i=>t.reduce((s,o)=>{const c=r(o,i[o]);return c?{...s,[o]:c}:s},{}),validateAttr:r}},Fo=(n={})=>Object.keys(n).length?`?q=${JSON.stringify(n)}`:"",Bo=n=>[...n].reduce((e,t)=>t===t.toUpperCase()?`${e}-${t.toLowerCase()}`:`${e}${t}`,""),Ho=n=>`${n[0].toLowerCase()}${n.slice(1)}`,Vo=n=>{const e=Bo(n);return(t,r)=>`/${e}${t?`/${encodeURIComponent(t)}`:""}${Fo(r)}`},Nn=(n,e)=>{const t=Array.isArray(e.inputProps);return Object.keys(n).reduce((r,i)=>{if(t&&!e.inputProps.includes(i))return r;const{isRef:s,isScalar:o,isRequired:c}=e.properties[i]||{};return s&&o&&!c&&n[i]===null?r:{...r,[i]:n[i]}},{})},Wo=({primaryKey:n,properties:e,...t})=>({primaryKey:n||"id",properties:Object.keys(e||{}).reduce((r,i)=>{var b,A;const s=e[i]||{},{type:o,isScalar:c,isRequired:a,isRef:u=!1}=typeof s.type=="string"?s.type==="array"?s.enum?{type:"string",isScalar:!1,isRequired:!1}:(b=s.items)!=null&&b.$ref?{type:s.items.$ref.split("/").pop(),isScalar:!1,isRequired:!1,isRef:!0}:{type:(A=s.items)==null?void 0:A.type,isScalar:!1,isRequired:!1}:{type:s.format==="date-time"?"date":s.type,isScalar:!0,isRequired:!0}:Array.isArray(s.type)?s.type.length===2?{type:s.format==="date-time"?"date":s.type[0],isScalar:!0,isRequired:!1}:{type:"json",isScalar:!0,isRequired:s.type.includes("null")}:s.$ref?{type:s.$ref.split("/").pop(),isScalar:!0,isRequired:!0,isRef:!0}:{type:s.anyOf[0].$ref.split("/").pop(),isScalar:!0,isRequired:!1,isRef:!0},_=s.inputType||(o==="integer"?"number":o);return{...r,[i]:{...e[i],type:o,isScalar:c,isRequired:typeof s.isRequired=="boolean"?s.isRequired:a,isRef:u,inputType:_}}},{}),...t}),xo=(n,e,t,r={},i={})=>{const s=Wo(r),{primaryKey:o,properties:c}=s,a=jo(s),u=Vo(t),_=(...v)=>gt(n,e.authUser)(...v),b=({data:v,...I})=>_(u(null,I),{method:"POST",body:Nn(v,s)}),A=({data:v,...I})=>{const{where:M,...C}=I;return _(u(M[o],C),{method:"PUT",body:Nn(v,s)})},P=v=>{if(!v)return v;const I=Object.keys(v).reduce((M,C)=>{var E;const re=c[C]||{},{type:Q,isScalar:l,isRef:m,format:d,items:w}=re;if(m){const S=Ho(Q);return l?{...M,[C]:i[S].parse(v[C])}:{...M,[C]:typeof((E=i[S])==null?void 0:E.parse)=="function"?v[C].map(O=>i[S].parse(O)):v[C]}}return{...M,[C]:Q==="date"&&v[C]?new Date(v[C]):v[C]}},{});return typeof s.parse=="function"?s.parse(I):I},D=Object.keys(c||{}).reduce((v,I)=>c[I].isRef&&c[I].isScalar&&c[I].isRequired?Object.assign(v,{all:v.all.concat(I),oneToOne:v.oneToOne.concat(I),requiredOneToOne:v.requiredOneToOne.concat(I)}):c[I].isRef&&c[I].isScalar?Object.assign(v,{all:v.all.concat(I),oneToOne:v.oneToOne.concat(I),optionalOneToOne:v.optionalOneToOne.concat(I)}):c[I].isRef?Object.assign(v,{all:v.all.concat(I),oneToMany:v.oneToMany.concat(I)}):v,{all:[],oneToOne:[],requiredOneToOne:[],optionalOneToOne:[],oneToMany:[]});return{get schema(){return s},get relations(){return D},parse:P,validateAttr:a.validateAttr,validate:a.validate,findMany:v=>_(u(null,v)).then(I=>I.map(P)),findById:(v,I)=>_(u(v,I)).then(P),create:b,update:A,upsert:v=>v.where[o]?A({where:v.where,data:v.update}):b({data:v.create}),delete:v=>_(u(v),{method:"DELETE"}),stats:()=>_(u("_stats"))}},zo=(n,e,t)=>Object.keys(t.properties).reduce((r,i)=>{const s=t.properties[i].$ref.split("/").pop();return Object.assign(r,{[i]:xo(n,e,t.definitions[s].plural||`${i}s`,t.definitions[s],r)})},{}),qo=(n,e)=>Object.keys(n.definitions).reduce((t,r)=>({...t,[r]:e[r]?{...n.definitions[r],...e[r],properties:Object.keys(n.definitions[r].properties).reduce((i,s)=>({...i,[s]:{...n.definitions[r].properties[s],...(e[r].properties||{})[s]}}),e[r].properties||{})}:n.definitions[r]}),{}),Dn={$schema:"http://json-schema.org/draft-07/schema#",definitions:{Country:{type:"object",properties:{code:{type:"string"},name:{type:"string"},incomeFilter:{type:["integer","null"]},canApply:{type:"boolean",default:!1},capital:{type:"array",items:{type:"string"}},timeZone:{type:["string","null"]},flag:{type:["string","null"]},currency:{anyOf:[{$ref:"#/definitions/Currency"},{type:"null"}]},contracts:{type:"array",items:{$ref:"#/definitions/Contract"}},users:{type:"array",items:{$ref:"#/definitions/User"}},applications:{type:"array",items:{$ref:"#/definitions/Application"}},applicationNationalities:{type:"array",items:{$ref:"#/definitions/Application"}},educationLevels:{type:"array",items:{$ref:"#/definitions/EducationLevel"}},universities:{type:"array",items:{$ref:"#/definitions/University"}},companies:{type:"array",items:{$ref:"#/definitions/Company"}},jobs:{type:"array",items:{$ref:"#/definitions/Job"}}}},Currency:{type:"object",properties:{code:{type:"string"},name:{type:"string"},symbol:{type:"string"},countries:{type:"array",items:{$ref:"#/definitions/Country"}}}},User:{type:"object",properties:{uid:{type:"string"},createdAt:{type:"string",format:"date-time"},updatedAt:{type:"string",format:"date-time"},createdBy:{type:["string","null"]},email:{type:"string"},firstName:{type:"string"},lastName:{type:["string","null"]},role:{type:["string","null"],enum:["staff","manager","finance","admin"]},disabled:{type:"boolean",default:!1},lang:{type:["string","null"],enum:["en","es","pt"]},referralSource:{type:["string","null"],enum:["word_of_mouth","codigo_m","social","google","print","tv","radio","other"]},identifiesAsFemale:{type:["boolean","null"]},dateOfBirth:{type:["string","null"],format:"date-time"},identificationNumber:{type:["string","null"]},mobileNumber:{type:["string","null"]},github:{type:["string","null"]},linkedin:{type:["string","null"]},bio:{type:["string","null"]},country:{anyOf:[{$ref:"#/definitions/Country"},{type:"null"}]},signupCohort:{anyOf:[{$ref:"#/definitions/Cohort"},{type:"null"}]},applications:{type:"array",items:{$ref:"#/definitions/Application"}},contractsAsCheckPilot:{type:"array",items:{$ref:"#/definitions/Contract"}},contracts:{type:"array",items:{$ref:"#/definitions/Contract"}},dropouts:{type:"array",items:{$ref:"#/definitions/Dropout"}},gigs:{type:"array",items:{$ref:"#/definitions/Gig"}},messages:{type:"array",items:{$ref:"#/definitions/Message"}},students:{type:"array",items:{$ref:"#/definitions/Student"}},activityLog:{type:"array",items:{$ref:"#/definitions/ActivityLogEntry"}},authoredActivityLog:{type:"array",items:{$ref:"#/definitions/ActivityLogEntry"}},jobReviews:{type:"array",items:{$ref:"#/definitions/JobReview"}},jobApplications:{type:"array",items:{$ref:"#/definitions/JobApplication"}},studentProjecTeamMembers:{type:"array",items:{$ref:"#/definitions/StudentProjecTeamMember"}}}},Track:{type:"object",properties:{id:{type:"integer"},createdAt:{type:"string",format:"date-time"},updatedAt:{type:"string",format:"date-time"},name:{type:"string"},programs:{type:"array",items:{$ref:"#/definitions/Program"}},crawlerQueries:{type:"array",items:{$ref:"#/definitions/CrawlerQuery"}},jobProfileTypes:{type:"array",items:{$ref:"#/definitions/JobProfileType"}}}},Program:{type:"object",properties:{id:{type:"integer"},createdAt:{type:"string",format:"date-time"},updatedAt:{type:"string",format:"date-time"},name:{type:"string"},description:{type:["string","null"]},langs:{type:"array",enum:["en","es","pt"]},hidden:{type:"boolean",default:!1},track:{$ref:"#/definitions/Track"},cohorts:{type:"array",items:{$ref:"#/definitions/Cohort"}},stages:{type:"array",items:{$ref:"#/definitions/Stage"}}}},Stage:{type:"object",properties:{id:{type:"integer"},createdAt:{type:"string",format:"date-time"},updatedAt:{type:"string",format:"date-time"},name:{type:"string"},order:{type:"integer"},program:{$ref:"#/definitions/Program"},cohorts:{type:"array",items:{$ref:"#/definitions/Cohort"}}}},Cohort:{type:"object",properties:{id:{type:"integer"},createdAt:{type:"string",format:"date-time"},updatedAt:{type:"string",format:"date-time"},createdBy:{type:["string","null"]},name:{type:"string"},lang:{type:["string","null"],enum:["en","es","pt"]},start:{type:"string",format:"date-time"},end:{type:"string",format:"date-time"},timeZone:{type:["string","null"]},startTime:{type:["string","null"]},endTime:{type:["string","null"]},legacySlug:{type:"string"},vacancies:{type:["integer","null"]},admissionStart:{type:["string","null"],format:"date-time"},admissionEnd:{type:["string","null"],format:"date-time"},admissionCountries:{type:"array",items:{type:"string"}},placementStart:{type:["string","null"],format:"date-time"},placementDuration:{type:["integer","null"]},program:{$ref:"#/definitions/Program"},stage:{$ref:"#/definitions/Stage"},applications:{type:"array",items:{$ref:"#/definitions/Application"}},links:{type:"array",items:{$ref:"#/definitions/CohortLink"}},dropouts:{type:"array",items:{$ref:"#/definitions/Dropout"}},gigs:{type:"array",items:{$ref:"#/definitions/Gig"}},students:{type:"array",items:{$ref:"#/definitions/Student"}},signupUsers:{type:"array",items:{$ref:"#/definitions/User"}},activityLog:{type:"array",items:{$ref:"#/definitions/ActivityLogEntry"}},jobApplications:{type:"array",items:{$ref:"#/definitions/JobApplication"}},studentProjects:{type:"array",items:{$ref:"#/definitions/StudentProject"}}}},Student:{type:"object",properties:{id:{type:"integer"},createdAt:{type:"string",format:"date-time"},updatedAt:{type:"string",format:"date-time"},createdBy:{type:["string","null"]},legacyStudentCode:{type:["string","null"]},cohort:{$ref:"#/definitions/Cohort"},user:{$ref:"#/definitions/User"}}},CohortLink:{type:"object",properties:{id:{type:"integer"},url:{type:"string"},visibility:{type:"string",enum:["public","members","staff","team","admin"]},cohort:{$ref:"#/definitions/Cohort"}}},Dropout:{type:"object",properties:{id:{type:"integer"},createdAt:{type:"string",format:"date-time"},updatedAt:{type:"string",format:"date-time"},createdBy:{type:["string","null"]},date:{type:"string",format:"date-time"},reasonDetail:{type:["string","null"]},notes:{type:["string","null"]},staffSad:{type:"boolean"},covidRelated:{type:["boolean","null"]},reason:{type:"string",enum:["dropout","noShow","invitedToLeave","changeCohort"]},completedProjects:{type:"integer"},lastProject:{type:["string","null"]},cohort:{$ref:"#/definitions/Cohort"},user:{$ref:"#/definitions/User"}}},IscedLevel:{type:"object",properties:{id:{type:"integer"},label:{type:"string"},educationLevels:{type:"array",items:{$ref:"#/definitions/EducationLevel"}}}},EducationLevel:{type:"object",properties:{id:{type:"integer"},createdAt:{type:"string",format:"date-time"},updatedAt:{type:"string",format:"date-time"},lang:{type:"string",enum:["en","es","pt"]},label:{type:"string"},country:{$ref:"#/definitions/Country"},iscedLevel:{$ref:"#/definitions/IscedLevel"},applications:{type:"array",items:{$ref:"#/definitions/Application"}}}},University:{type:"object",properties:{id:{type:"integer"},createdAt:{type:"string",format:"date-time"},updatedAt:{type:"string",format:"date-time"},lang:{type:"string",enum:["en","es","pt"]},name:{type:"string"},filter:{type:"boolean"},country:{$ref:"#/definitions/Country"},applications:{type:"array",items:{$ref:"#/definitions/Application"}}}},Application:{type:"object",properties:{id:{type:"integer"},createdAt:{type:"string",format:"date-time"},updatedAt:{type:"string",format:"date-time"},createdBy:{type:["string","null"]},dateOfBirth:{type:"string",format:"date-time"},isAllowedToWork:{type:"boolean"},hasValidIdDocument:{type:"boolean"},locality:{type:["number","string","boolean","object","array","null"]},householdSize:{type:"integer"},children:{type:"integer"},householdIncome:{type:"integer"},racialIdentity:{type:["string","null"]},schoolType:{type:["string","null"],enum:["private","public","other","subsidized","mixed"]},educationSubject:{type:["string","null"],enum:["design_and_media","software_engineering","engineering","management_and_business","languages","science","health","social_sciences","arts","comms_and_advertising","education","cooking","tourism","economics_and_accounting","law","other"]},isStudying:{type:"boolean"},englishLevel:{type:["string","null"],enum:["NO","A1","A2","B1","B2","C1","C2"]},workStatus:{type:"string",enum:["never","not_now","yes"]},isLookingForWork:{type:["boolean","null"]},monthsLookingForWork:{type:["integer","null"]},monthsUnemployed:{type:["integer","null"]},workRole:{type:["string","null"],enum:["waitress","promoter","manager","cashier","intern","operative","call_center","receptionist","sales_agent","assistant","professional","technical","consultant","other"]},freelance:{type:["boolean","null"]},workFormal:{type:["boolean","null"]},workIncome:{type:["integer","null"]},failedFilters:{type:"array",items:{type:"string"}},bypassFilters:{type:"boolean",default:!1},isReady:{type:"boolean",default:!1},isReturningApplicant:{type:["boolean","null"]},legacyAdmissionCohortSlug:{type:["string","null"]},cohort:{$ref:"#/definitions/Cohort"},user:{$ref:"#/definitions/User"},country:{$ref:"#/definitions/Country"},nationality:{$ref:"#/definitions/Country"},educationLevel:{$ref:"#/definitions/EducationLevel"},university:{anyOf:[{$ref:"#/definitions/University"},{type:"null"}]},challengeAssignments:{type:"array",items:{$ref:"#/definitions/ApplicationChallengeAssignment"}}}},ApplicationChallenge:{type:"object",properties:{id:{type:"integer"},createdAt:{type:"string",format:"date-time"},updatedAt:{type:"string",format:"date-time"},createdBy:{type:["string","null"]},slug:{type:"string"},version:{type:"string"},trackId:{type:"integer"},langs:{type:"array",enum:["en","es","pt"]},json:{type:"string"},archived:{type:"boolean",default:!1},assignments:{type:"array",items:{$ref:"#/definitions/ApplicationChallengeAssignment"}}}},ApplicationChallengeAssignment:{type:"object",properties:{id:{type:"integer"},createdAt:{type:"string",format:"date-time"},updatedAt:{type:"string",format:"date-time"},application:{$ref:"#/definitions/Application"},challenge:{$ref:"#/definitions/ApplicationChallenge"}}},ActivityLogEntry:{type:"object",properties:{id:{type:"integer"},createdAt:{type:"string",format:"date-time"},updatedAt:{type:"string",format:"date-time"},type:{type:"string",enum:["challenge","application_filter","application_filter_bypass","application_cohort_change","project_assessment","project_assessment_request"]},data:{type:["number","string","boolean","object","array","null"]},path:{type:"string"},author:{$ref:"#/definitions/User"},user:{$ref:"#/definitions/User"},cohort:{$ref:"#/definitions/Cohort"}}},StudentProject:{type:"object",properties:{id:{type:"integer"},createdAt:{type:"string",format:"date-time"},updatedAt:{type:"string",format:"date-time"},createdBy:{type:"string"},projectSlug:{type:"string"},projectVersion:{type:"string"},cohort:{$ref:"#/definitions/Cohort"},links:{type:"array",items:{$ref:"#/definitions/StudentProjectLink"}},team:{type:"array",items:{$ref:"#/definitions/StudentProjecTeamMember"}}}},StudentProjecTeamMember:{type:"object",properties:{id:{type:"integer"},createdAt:{type:"string",format:"date-time"},updatedAt:{type:"string",format:"date-time"},createdBy:{type:"string"},studentProject:{$ref:"#/definitions/StudentProject"},user:{$ref:"#/definitions/User"}}},StudentProjectLink:{type:"object",properties:{id:{type:"integer"},createdAt:{type:"string",format:"date-time"},updatedAt:{type:"string",format:"date-time"},createdBy:{type:"string"},url:{type:"string"},studentProject:{$ref:"#/definitions/StudentProject"}}},Contract:{type:"object",properties:{id:{type:"integer"},createdAt:{type:"string",format:"date-time"},updatedAt:{type:"string",format:"date-time"},createdBy:{type:"string"},isEmployment:{type:"boolean"},feeAmount:{type:"integer"},hoursPerWeek:{type:"integer"},start:{type:"string",format:"date-time"},end:{type:["string","null"],format:"date-time"},isTrial:{type:"boolean",default:!1},source:{type:["string","null"],enum:["graduate","referral","jazzhr","web","linkedin","other"]},checkPilot:{anyOf:[{$ref:"#/definitions/User"},{type:"null"}]},country:{$ref:"#/definitions/Country"},user:{$ref:"#/definitions/User"},gigs:{type:"array",items:{$ref:"#/definitions/Gig"}}}},Gig:{type:"object",properties:{id:{type:"integer"},createdAt:{type:"string",format:"date-time"},updatedAt:{type:"string",format:"date-time"},createdBy:{type:"string"},role:{type:"string",enum:["bm","pdc","js","ux"]},hoursPerWeek:{type:"integer"},start:{type:"string",format:"date-time"},end:{type:["string","null"],format:"date-time"},cohort:{$ref:"#/definitions/Cohort"},contract:{$ref:"#/definitions/Contract"},user:{$ref:"#/definitions/User"}}},Message:{type:"object",properties:{id:{type:"integer"},createdAt:{type:"string",format:"date-time"},updatedAt:{type:"string",format:"date-time"},createdBy:{type:["string","null"]},key:{type:"string"},from:{type:"string"},to:{type:"string"},transport:{type:"string",enum:["mandrill","slack"]},status:{type:"string",default:"PENDING",enum:["PENDING","QUEUED","ERROR","SENT"]},data:{type:["number","string","boolean","object","array","null"]},taskInfo:{type:["number","string","boolean","object","array","null"]},user:{anyOf:[{$ref:"#/definitions/User"},{type:"null"}]},logs:{type:"array",items:{$ref:"#/definitions/MessageLog"}}}},MessageLog:{type:"object",properties:{id:{type:"integer"},createdAt:{type:"string",format:"date-time"},statusText:{type:["string","null"]},message:{$ref:"#/definitions/Message"}}},Industry:{type:"object",properties:{id:{type:"integer"},createdAt:{type:"string",format:"date-time"},updatedAt:{type:"string",format:"date-time"},createdBy:{type:["string","null"]},name:{type:"string"},companies:{type:"array",items:{$ref:"#/definitions/Company"}}}},Company:{type:"object",properties:{id:{type:"integer"},createdAt:{type:"string",format:"date-time"},updatedAt:{type:"string",format:"date-time"},createdBy:{type:["string","null"]},source:{type:"string"},sourceId:{type:"string"},name:{type:"string"},size:{type:["string","null"],enum:["A_2_10","B_11_50","C_51_200","D_201_500","E_501_1000","F_1001_5000","G_5001_10000","H_10001_plus"]},data:{type:["number","string","boolean","object","array","null"]},web:{type:["string","null"]},twitter:{type:["string","null"]},github:{type:["string","null"]},facebook:{type:["string","null"]},country:{anyOf:[{$ref:"#/definitions/Country"},{type:"null"}]},industry:{anyOf:[{$ref:"#/definitions/Industry"},{type:"null"}]},jobs:{type:"array",items:{$ref:"#/definitions/Job"}},categories:{type:"array",enum:["Tech_Consultancy","Digital_Transformation","Agency","Startups","High_tech","Traditional_Consulting"]}}},Job:{type:"object",properties:{id:{type:"integer"},createdAt:{type:"string",format:"date-time"},updatedAt:{type:"string",format:"date-time"},createdBy:{type:["string","null"]},source:{type:"string"},sourceId:{type:"string"},title:{type:"string"},publishedAt:{type:"string",format:"date-time"},modality:{type:"string"},publicUrl:{type:["string","null"]},location:{type:["string","null"]},data:{type:["number","string","boolean","object","array","null"]},description:{type:["string","null"]},descriptionHTML:{type:["string","null"]},functions:{type:["string","null"]},functionsHTML:{type:["string","null"]},seniority:{type:["string","null"]},remote:{type:["boolean","null"]},remoteOption:{type:["string","null"],enum:["remote_for_now","locally_remote","fully_remote","no_remote","mixed"]},lang:{type:["string","null"],enum:["en","es","pt"]},maxSalary:{type:["integer","null"]},minSalary:{type:["integer","null"]},tags:{type:"array",items:{type:"string"}},company:{$ref:"#/definitions/Company"},country:{anyOf:[{$ref:"#/definitions/Country"},{type:"null"}]},reviews:{type:"array",items:{$ref:"#/definitions/JobReview"}},applications:{type:"array",items:{$ref:"#/definitions/JobApplication"}},crawlerQueries:{type:"array",items:{$ref:"#/definitions/JobCrawlerQuery"}},crawlerLocations:{type:"array",items:{$ref:"#/definitions/JobCrawlerLocation"}}}},JobProfileType:{type:"object",properties:{id:{type:"integer"},createdAt:{type:"string",format:"date-time"},updatedAt:{type:"string",format:"date-time"},createdBy:{type:["string","null"]},name:{type:"string"},learningObjectives:{type:["number","string","boolean","object","array","null"]},track:{anyOf:[{$ref:"#/definitions/Track"},{type:"null"}]},reviews:{type:"array",items:{$ref:"#/definitions/JobReviewProfileType"}}}},JobReview:{type:"object",properties:{id:{type:"integer"},createdAt:{type:"string",format:"date-time"},updatedAt:{type:"string",format:"date-time"},isValid:{type:"boolean"},invalidReason:{type:["string","null"],enum:["unrelated","experience","qualifications","other"]},comment:{type:["string","null"]},author:{$ref:"#/definitions/User"},job:{$ref:"#/definitions/Job"},profileTypes:{type:"array",items:{$ref:"#/definitions/JobReviewProfileType"}}}},JobReviewProfileType:{type:"object",properties:{id:{type:"integer"},createdAt:{type:"string",format:"date-time"},updatedAt:{type:"string",format:"date-time"},createdBy:{type:["string","null"]},review:{$ref:"#/definitions/JobReview"},profileType:{$ref:"#/definitions/JobProfileType"}}},JobApplication:{type:"object",properties:{id:{type:"integer"},createdAt:{type:"string",format:"date-time"},updatedAt:{type:"string",format:"date-time"},createdBy:{type:["string","null"]},status:{type:"string",default:"pending",enum:["pending","applied","interview","challenge","followup","hired","not_hired"]},hireDate:{type:["string","null"],format:"date-time"},jobStartDate:{type:["string","null"],format:"date-time"},netSalary:{type:["integer","null"]},grossSalary:{type:["integer","null"]},currency:{type:["string","null"]},job:{$ref:"#/definitions/Job"},user:{$ref:"#/definitions/User"},cohort:{anyOf:[{$ref:"#/definitions/Cohort"},{type:"null"}]}}},CrawlerQuery:{type:"object",properties:{id:{type:"integer"},createdAt:{type:"string",format:"date-time"},updatedAt:{type:"string",format:"date-time"},createdBy:{type:["string","null"]},query:{type:"string"},enabled:{type:"boolean",default:!0},track:{$ref:"#/definitions/Track"},jobs:{type:"array",items:{$ref:"#/definitions/JobCrawlerQuery"}}}},JobCrawlerQuery:{type:"object",properties:{id:{type:"integer"},createdAt:{type:"string",format:"date-time"},updatedAt:{type:"string",format:"date-time"},createdBy:{type:["string","null"]},job:{$ref:"#/definitions/Job"},query:{$ref:"#/definitions/CrawlerQuery"}}},CrawlerLocation:{type:"object",properties:{id:{type:"integer"},createdAt:{type:"string",format:"date-time"},updatedAt:{type:"string",format:"date-time"},createdBy:{type:["string","null"]},name:{type:"string"},enabled:{type:"boolean",default:!0},jobs:{type:"array",items:{$ref:"#/definitions/JobCrawlerLocation"}}}},JobCrawlerLocation:{type:"object",properties:{id:{type:"integer"},createdAt:{type:"string",format:"date-time"},updatedAt:{type:"string",format:"date-time"},createdBy:{type:["string","null"]},job:{$ref:"#/definitions/Job"},location:{$ref:"#/definitions/CrawlerLocation"}}}},type:"object",properties:{country:{$ref:"#/definitions/Country"},currency:{$ref:"#/definitions/Currency"},user:{$ref:"#/definitions/User"},track:{$ref:"#/definitions/Track"},program:{$ref:"#/definitions/Program"},stage:{$ref:"#/definitions/Stage"},cohort:{$ref:"#/definitions/Cohort"},student:{$ref:"#/definitions/Student"},cohortLink:{$ref:"#/definitions/CohortLink"},dropout:{$ref:"#/definitions/Dropout"},iscedLevel:{$ref:"#/definitions/IscedLevel"},educationLevel:{$ref:"#/definitions/EducationLevel"},university:{$ref:"#/definitions/University"},application:{$ref:"#/definitions/Application"},applicationChallenge:{$ref:"#/definitions/ApplicationChallenge"},applicationChallengeAssignment:{$ref:"#/definitions/ApplicationChallengeAssignment"},activityLogEntry:{$ref:"#/definitions/ActivityLogEntry"},studentProject:{$ref:"#/definitions/StudentProject"},studentProjecTeamMember:{$ref:"#/definitions/StudentProjecTeamMember"},studentProjectLink:{$ref:"#/definitions/StudentProjectLink"},contract:{$ref:"#/definitions/Contract"},gig:{$ref:"#/definitions/Gig"},message:{$ref:"#/definitions/Message"},messageLog:{$ref:"#/definitions/MessageLog"},industry:{$ref:"#/definitions/Industry"},company:{$ref:"#/definitions/Company"},job:{$ref:"#/definitions/Job"},jobProfileType:{$ref:"#/definitions/JobProfileType"},jobReview:{$ref:"#/definitions/JobReview"},jobReviewProfileType:{$ref:"#/definitions/JobReviewProfileType"},jobApplication:{$ref:"#/definitions/JobApplication"},crawlerQuery:{$ref:"#/definitions/CrawlerQuery"},jobCrawlerQuery:{$ref:"#/definitions/JobCrawlerQuery"},crawlerLocation:{$ref:"#/definitions/CrawlerLocation"},jobCrawlerLocation:{$ref:"#/definitions/JobCrawlerLocation"}}},Ln=24*(60*60*1e3),Jo={Country:{primaryKey:"code",plural:"countries",searchProps:["code","name","timeZone"],getOptionLabel:({code:n,name:e})=>`${n} / ${e}`},ActivityLogEntry:{plural:"activityLog"},User:{primaryKey:"uid",inputProps:["firstName","lastName","email","password","lang","identifiesAsFemale","dateOfBirth","country","identificationNumber","mobileNumber","github","linkedin","bio","role","signupCohort","disabled","referralSource"],searchProps:["firstName","lastName","email"],getOptionLabel:({firstName:n,lastName:e,email:t})=>`${n} ${e} (${t})`,properties:{email:{inputType:"email"},lastName:{isRequired:!0},mobileNumber:{inputType:"phone"},bio:{inputType:"textarea"}},parse:n=>{const e=n.github?`https://github.com/${n.github}.png?size=`:`https://www.gravatar.com/avatar/${Uo(n.email)}?s=`;return{...n,fullName:`${n.firstName||""}${n.lastName?` ${n.lastName}`:""}`,avatar:t=>`${e}${t}`,isStaff:["staff","manager","finance","admin"].includes(n.role),isManager:["manager","finance","admin"].includes(n.role),isFinance:["finance","admin"].includes(n.role),isAdmin:n.role==="admin"}}},Track:{searchProps:["name"]},Program:{searchProps:["name"]},Stage:{searchProps:["name"]},Cohort:{inputProps:["program","stage","lang","name","start","end","timeZone","startTime","endTime","vacancies","admissionStart","admissionEnd","placementStart","admissionCountries"],searchProps:["name"],getOptionLabel:({id:n,name:e,stage:t})=>`${e}${t?` - ${t.name}`:""} (id: ${n})`,properties:{},parse:n=>{var s,o;const e=Date.now();let t;if(n.placementStart){const c=n.placementDuration||270;new Date(+n.placementStart+c*24*60*60*1e3)<e?t="placement_ended":n.placementStart<e&&(t="placement_started")}!t&&n.end<e&&(t="ended"),!t&&n.start<e&&(t="started");const r=n.admissionEnd?+n.admissionEnd+Ln:!1;!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");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;return{...n,status:t,size:i}}},Student:{inputProps:["cohort","user"],searchProps:[]},Dropout:{inputProps:["cohort","user","date","reason","reasonDetail","lastProject","completedProjects","notes","staffSad","covidRelated"],searchProps:["user.uid","user.firstName","user.lastName","user.email","cohort.name"]},Contract:{inputProps:["user","country","isEmployment","feeAmount","hoursPerWeek","start","end","isTrial","checkPilot","source"],searchProps:["user.firstName","user.lastName","user.email"],getOptionLabel:({id:n,user:e})=>`${e==null?void 0:e.firstName} (id: ${n})`},Gig:{inputProps:["cohort","user","contract","role","hoursPerWeek","start","end"]},Application:{inputProps:["user","cohort","dateOfBirth","country","locality","nationality","isAllowedToWork","hasValidIdDocument","householdSize","children","householdIncome","racialIdentity","educationLevel","schoolType","educationSubject","university","isStudying","englishLevel","workStatus","isLookingForWork","monthsLookingForWork","monthsUnemployed","workRole","freelance","workFormal","workIncome","isReady","bypassFilters"],properties:{locality:{isRequired:!0},englishLevel:{isRequired:!0},isReady:{isRequired:!1},bypassFilters:{isRequired:!1}},parse:n=>{var i,s,o;const e=typeof n.hasFailedFilters=="boolean"?n.hasFailedFilters:typeof((i=n.failedFilters)==null?void 0:i.length)=="number"?n.failedFilters.length>0:void 0;if(!((s=n.cohort)!=null&&s.admissionEnd)||typeof e>"u")return n;const t=Date.now();let r;return n.isReady?r="ready":e&&!n.bypassFilters?r="rejected":n.createdAt<t-90*Ln?r="expired":((o=n.cohort)==null?void 0:o.status)!=="admission_started"?r="admission_ended":r="active",{...n,status:r}}},IscedLevel:{parse:n=>{const e=Math.floor(n.id/10);return{...n,level:e,completed:e*10<n.id}}},EducationLevel:{searchProps:["label"]},University:{plural:"universities",searchProps:["name"]},Company:{plural:"companies"},CrawlerQuery:{plural:"crawlerQueries"},JobCrawlerQuery:{plural:"jobCrawlerQueries"}},Go=(n,e)=>({...zo(n,e,{...Dn,definitions:qo(Dn,Jo)}),gcpLog:{getEntries:async t=>await gt(n,e.authUser)(`/gcp-logs?q=${JSON.stringify(t)}`)}}),Ko=(n,e)=>{const t=gt(n,e.authUser);return{project:{findMany:(r={})=>t(`/projects?q=${JSON.stringify(r)}`),findBySlug:(r,i={})=>t(`/projects/${r}?q=${JSON.stringify(i)}`)},topic:{findMany:(r={})=>t(`/topics?q=${JSON.stringify(r)}`),findBySlug:(r,i={})=>t(`/topics/${r}?q=${JSON.stringify(i)}`)},learningObjective:{findMany:(r={})=>t(`/learning-objectives?q=${JSON.stringify(r)}`)}}},Ve=n=>n>9?`${n}`:`0${n}`,$n=n=>`${Ve(n.getUTCDate())}/${Ve(n.getUTCMonth()+1)}/${n.getUTCFullYear()}`,Mn=n=>`${Ve(n.getUTCHours())}:${Ve(n.getUTCMinutes())}:${n.getUTCSeconds()} UTC`,Yo=n=>`${$n(n)} ${Mn(n)}`,Qo={es:"es-ES",pt:"pt-BR"},Xo=(n,e="es",t=!1)=>new Intl.DateTimeFormat(Qo[e],{...t&&{year:"numeric"},month:"long",day:"numeric",timeZone:"UTC"}).format(new Date(n)),Zo=(n,e)=>{let t=e.getFullYear()-n.getFullYear();const r=e.getMonth()-n.getMonth();return(r<0||r===0&&e.getDate()<n.getDate())&&t--,t},ea=(n,e,t)=>new Intl.NumberFormat(`${n}-${e}`,{currency:t}),ta=(n,e,t,r)=>ea(e,t,r).format(n),na=n=>parseInt(n.replace(/[,\.]/g,""),10),ra=n=>{try{return JSON.parse(window.localStorage.getItem(n))}catch{return null}},ia=({firebaseApiKey:n="AIzaSyAXbaEbpq8NOfn0r8mIrcoHvoGRkJThwdc",firebaseProject:e="laboratoria-la",coreApiUrl:t="https://us-central1-outpost-272720.cloudfunctions.net/core-api"}={})=>{const r=Ot({apiKey:n,authDomain:`${e}.firebaseapp.com`,databaseURL:`https://${e}.firebaseio.com`,projectId:e}),i=Do(r),s={authUser:void 0,user:void 0},o=Go(t,s);return{...Ko(t,s),...o,auth:{onChange:u=>vs(i,_=>{if(!_)return Object.assign(s,{authUser:null,user:null}),u(s);Object.assign(s,{authUser:_}),o.user.findById(_.uid).then(b=>{Object.assign(s,{user:b}),u(s)}).catch(b=>{console.error(b),Object.assign(s,{authUser:null,user:null}),u(s)})}),signIn:(u,_)=>ms(i,u,_),signOut:()=>bs(i),sendPasswordResetEmail:u=>gs(i,u)},firebaseApp:r}};k.createApp=ia,k.formatCurrency=ta,k.formatDate=$n,k.formatDateTime=Yo,k.formatMonth=Xo,k.formatTime=Mn,k.getAgeAt=Zo,k.loadFromLocalStorage=ra,k.parseCurrency=na,Object.defineProperty(k,Symbol.toStringTag,{value:"Module"})});
1486
+ */const Oo=5*60,ko=bt("authIdTokenMaxAge")||Oo;let On=null;const No=n=>async e=>{const t=e&&await e.getIdTokenResult(),r=t&&(new Date().getTime()-Date.parse(t.issuedAtTime))/1e3;if(r&&r>ko)return;const i=t==null?void 0:t.token;On!==i&&(On=i,await fetch(n,{method:i?"POST":"DELETE",headers:i?{Authorization:`Bearer ${i}`}:{}}))};function Do(n=ti()){const e=Pt(n,"auth");if(e.isInitialized())return e.getImmediate();const t=Yi(n,{popupRedirectResolver:So,persistence:[Ms,Ts,gn]}),r=bt("authTokenSyncURL");if(r){const s=No(r);_s(t,s,()=>s(t.currentUser)),ys(t,o=>s(o))}const i=xn("auth");return i&&Xi(t,`http://${i}`),t}Po("Browser");var Lo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function $o(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var kn={exports:{}};(function(n){(function(e){function t(l,m){var d=(l&65535)+(m&65535),w=(l>>16)+(m>>16)+(d>>16);return w<<16|d&65535}function r(l,m){return l<<m|l>>>32-m}function i(l,m,d,w,E,S){return t(r(t(t(m,l),t(w,S)),E),d)}function s(l,m,d,w,E,S,O){return i(m&d|~m&w,l,m,E,S,O)}function o(l,m,d,w,E,S,O){return i(m&w|d&~w,l,m,E,S,O)}function c(l,m,d,w,E,S,O){return i(m^d^w,l,m,E,S,O)}function a(l,m,d,w,E,S,O){return i(d^(m|~w),l,m,E,S,O)}function u(l,m){l[m>>5]|=128<<m%32,l[(m+64>>>9<<4)+14]=m;var d,w,E,S,O,h=1732584193,f=-271733879,p=-1732584194,g=271733878;for(d=0;d<l.length;d+=16)w=h,E=f,S=p,O=g,h=s(h,f,p,g,l[d],7,-680876936),g=s(g,h,f,p,l[d+1],12,-389564586),p=s(p,g,h,f,l[d+2],17,606105819),f=s(f,p,g,h,l[d+3],22,-1044525330),h=s(h,f,p,g,l[d+4],7,-176418897),g=s(g,h,f,p,l[d+5],12,1200080426),p=s(p,g,h,f,l[d+6],17,-1473231341),f=s(f,p,g,h,l[d+7],22,-45705983),h=s(h,f,p,g,l[d+8],7,1770035416),g=s(g,h,f,p,l[d+9],12,-1958414417),p=s(p,g,h,f,l[d+10],17,-42063),f=s(f,p,g,h,l[d+11],22,-1990404162),h=s(h,f,p,g,l[d+12],7,1804603682),g=s(g,h,f,p,l[d+13],12,-40341101),p=s(p,g,h,f,l[d+14],17,-1502002290),f=s(f,p,g,h,l[d+15],22,1236535329),h=o(h,f,p,g,l[d+1],5,-165796510),g=o(g,h,f,p,l[d+6],9,-1069501632),p=o(p,g,h,f,l[d+11],14,643717713),f=o(f,p,g,h,l[d],20,-373897302),h=o(h,f,p,g,l[d+5],5,-701558691),g=o(g,h,f,p,l[d+10],9,38016083),p=o(p,g,h,f,l[d+15],14,-660478335),f=o(f,p,g,h,l[d+4],20,-405537848),h=o(h,f,p,g,l[d+9],5,568446438),g=o(g,h,f,p,l[d+14],9,-1019803690),p=o(p,g,h,f,l[d+3],14,-187363961),f=o(f,p,g,h,l[d+8],20,1163531501),h=o(h,f,p,g,l[d+13],5,-1444681467),g=o(g,h,f,p,l[d+2],9,-51403784),p=o(p,g,h,f,l[d+7],14,1735328473),f=o(f,p,g,h,l[d+12],20,-1926607734),h=c(h,f,p,g,l[d+5],4,-378558),g=c(g,h,f,p,l[d+8],11,-2022574463),p=c(p,g,h,f,l[d+11],16,1839030562),f=c(f,p,g,h,l[d+14],23,-35309556),h=c(h,f,p,g,l[d+1],4,-1530992060),g=c(g,h,f,p,l[d+4],11,1272893353),p=c(p,g,h,f,l[d+7],16,-155497632),f=c(f,p,g,h,l[d+10],23,-1094730640),h=c(h,f,p,g,l[d+13],4,681279174),g=c(g,h,f,p,l[d],11,-358537222),p=c(p,g,h,f,l[d+3],16,-722521979),f=c(f,p,g,h,l[d+6],23,76029189),h=c(h,f,p,g,l[d+9],4,-640364487),g=c(g,h,f,p,l[d+12],11,-421815835),p=c(p,g,h,f,l[d+15],16,530742520),f=c(f,p,g,h,l[d+2],23,-995338651),h=a(h,f,p,g,l[d],6,-198630844),g=a(g,h,f,p,l[d+7],10,1126891415),p=a(p,g,h,f,l[d+14],15,-1416354905),f=a(f,p,g,h,l[d+5],21,-57434055),h=a(h,f,p,g,l[d+12],6,1700485571),g=a(g,h,f,p,l[d+3],10,-1894986606),p=a(p,g,h,f,l[d+10],15,-1051523),f=a(f,p,g,h,l[d+1],21,-2054922799),h=a(h,f,p,g,l[d+8],6,1873313359),g=a(g,h,f,p,l[d+15],10,-30611744),p=a(p,g,h,f,l[d+6],15,-1560198380),f=a(f,p,g,h,l[d+13],21,1309151649),h=a(h,f,p,g,l[d+4],6,-145523070),g=a(g,h,f,p,l[d+11],10,-1120210379),p=a(p,g,h,f,l[d+2],15,718787259),f=a(f,p,g,h,l[d+9],21,-343485551),h=t(h,w),f=t(f,E),p=t(p,S),g=t(g,O);return[h,f,p,g]}function _(l){var m,d="",w=l.length*32;for(m=0;m<w;m+=8)d+=String.fromCharCode(l[m>>5]>>>m%32&255);return d}function b(l){var m,d=[];for(d[(l.length>>2)-1]=void 0,m=0;m<d.length;m+=1)d[m]=0;var w=l.length*8;for(m=0;m<w;m+=8)d[m>>5]|=(l.charCodeAt(m/8)&255)<<m%32;return d}function A(l){return _(u(b(l),l.length*8))}function P(l,m){var d,w=b(l),E=[],S=[],O;for(E[15]=S[15]=void 0,w.length>16&&(w=u(w,l.length*8)),d=0;d<16;d+=1)E[d]=w[d]^909522486,S[d]=w[d]^1549556828;return O=u(E.concat(b(m)),512+m.length*8),_(u(S.concat(O),640))}function D(l){var m="0123456789abcdef",d="",w,E;for(E=0;E<l.length;E+=1)w=l.charCodeAt(E),d+=m.charAt(w>>>4&15)+m.charAt(w&15);return d}function v(l){return unescape(encodeURIComponent(l))}function I(l){return A(v(l))}function M(l){return D(I(l))}function C(l,m){return P(v(l),v(m))}function re(l,m){return D(C(l,m))}function Q(l,m,d){return m?d?C(m,l):re(m,l):d?I(l):M(l)}n.exports?n.exports=Q:e.md5=Q})(Lo)})(kn);var Mo=kn.exports;const Uo=$o(Mo),gt=(n,e)=>async(t,r={})=>{const i=e?await e.getIdToken():null,s=await fetch(`${n}${t}`,{mode:"cors",...r,headers:{...i&&{authorization:`Bearer ${i}`},...r.body&&{"content-type":"application/json"},...r.headers},...r.body&&{body:JSON.stringify(r.body)}}),o=await s.json();if(s.status>202)throw Object.assign(new Error((o==null?void 0:o.message)||`HTTP Error ${s.status}`),{status:s.status,code:o==null?void 0:o.code,body:o});return o},jo=n=>{const e=n.properties||{},t=n.inputProps||Object.keys(e),r=(i,s)=>{const o=e[i]||{};if([null,void 0].includes(s))return o.isRequired?{id:"value-missing-validation-error"}:void 0;if(o.enum)return o.enum.includes(s)?void 0:{id:"enum-validation-error",values:{enum:o.enum,value:s}};switch(o.type){case"integer":if(o.isScalar&&(typeof s!="number"||Number.isNaN(s)))return{id:"invalid-number-validation-error"};break;case"date":break;case"boolean":break;case"json":case"string":default:if(o.isRequired&&!s)return{id:"value-missing-validation-error"};break}};return{validate:i=>t.reduce((s,o)=>{const c=r(o,i[o]);return c?{...s,[o]:c}:s},{}),validateAttr:r}},Fo=(n={})=>Object.keys(n).length?`?q=${JSON.stringify(n)}`:"",Bo=n=>[...n].reduce((e,t)=>t===t.toUpperCase()?`${e}-${t.toLowerCase()}`:`${e}${t}`,""),Ho=n=>`${n[0].toLowerCase()}${n.slice(1)}`,Vo=n=>{const e=Bo(n);return(t,r)=>`/${e}${t?`/${encodeURIComponent(t)}`:""}${Fo(r)}`},Nn=(n,e)=>{const t=Array.isArray(e.inputProps);return Object.keys(n).reduce((r,i)=>{if(t&&!e.inputProps.includes(i))return r;const{isRef:s,isScalar:o,isRequired:c}=e.properties[i]||{};return s&&o&&!c&&n[i]===null?r:{...r,[i]:n[i]}},{})},Wo=({primaryKey:n,properties:e,...t})=>({primaryKey:n||"id",properties:Object.keys(e||{}).reduce((r,i)=>{var b,A;const s=e[i]||{},{type:o,isScalar:c,isRequired:a,isRef:u=!1}=typeof s.type=="string"?s.type==="array"?s.enum?{type:"string",isScalar:!1,isRequired:!1}:(b=s.items)!=null&&b.$ref?{type:s.items.$ref.split("/").pop(),isScalar:!1,isRequired:!1,isRef:!0}:{type:(A=s.items)==null?void 0:A.type,isScalar:!1,isRequired:!1}:{type:s.format==="date-time"?"date":s.type,isScalar:!0,isRequired:!0}:Array.isArray(s.type)?s.type.length===2?{type:s.format==="date-time"?"date":s.type[0],isScalar:!0,isRequired:!1}:{type:"json",isScalar:!0,isRequired:s.type.includes("null")}:s.$ref?{type:s.$ref.split("/").pop(),isScalar:!0,isRequired:!0,isRef:!0}:{type:s.anyOf[0].$ref.split("/").pop(),isScalar:!0,isRequired:!1,isRef:!0},_=s.inputType||(o==="integer"?"number":o);return{...r,[i]:{...e[i],type:o,isScalar:c,isRequired:typeof s.isRequired=="boolean"?s.isRequired:a,isRef:u,inputType:_}}},{}),...t}),xo=(n,e,t,r={},i={})=>{const s=Wo(r),{primaryKey:o,properties:c}=s,a=jo(s),u=Vo(t),_=(...v)=>gt(n,e.authUser)(...v),b=({data:v,...I})=>_(u(null,I),{method:"POST",body:Nn(v,s)}),A=({data:v,...I})=>{const{where:M,...C}=I;return _(u(M[o],C),{method:"PUT",body:Nn(v,s)})},P=v=>{if(!v)return v;const I=Object.keys(v).reduce((M,C)=>{var E;const re=c[C]||{},{type:Q,isScalar:l,isRef:m,format:d,items:w}=re;if(m){const S=Ho(Q);return l?{...M,[C]:i[S].parse(v[C])}:{...M,[C]:typeof((E=i[S])==null?void 0:E.parse)=="function"?v[C].map(O=>i[S].parse(O)):v[C]}}return{...M,[C]:Q==="date"&&v[C]?new Date(v[C]):v[C]}},{});return typeof s.parse=="function"?s.parse(I):I},D=Object.keys(c||{}).reduce((v,I)=>c[I].isRef&&c[I].isScalar&&c[I].isRequired?Object.assign(v,{all:v.all.concat(I),oneToOne:v.oneToOne.concat(I),requiredOneToOne:v.requiredOneToOne.concat(I)}):c[I].isRef&&c[I].isScalar?Object.assign(v,{all:v.all.concat(I),oneToOne:v.oneToOne.concat(I),optionalOneToOne:v.optionalOneToOne.concat(I)}):c[I].isRef?Object.assign(v,{all:v.all.concat(I),oneToMany:v.oneToMany.concat(I)}):v,{all:[],oneToOne:[],requiredOneToOne:[],optionalOneToOne:[],oneToMany:[]});return{get schema(){return s},get relations(){return D},parse:P,validateAttr:a.validateAttr,validate:a.validate,findMany:v=>_(u(null,v)).then(I=>I.map(P)),findById:(v,I)=>_(u(v,I)).then(P),create:b,update:A,upsert:v=>v.where[o]?A({where:v.where,data:v.update}):b({data:v.create}),delete:v=>_(u(v),{method:"DELETE"}),stats:()=>_(u("_stats"))}},zo=(n,e,t)=>Object.keys(t.properties).reduce((r,i)=>{const s=t.properties[i].$ref.split("/").pop();return Object.assign(r,{[i]:xo(n,e,t.definitions[s].plural||`${i}s`,t.definitions[s],r)})},{}),qo=(n,e)=>Object.keys(n.definitions).reduce((t,r)=>({...t,[r]:e[r]?{...n.definitions[r],...e[r],properties:Object.keys(n.definitions[r].properties).reduce((i,s)=>({...i,[s]:{...n.definitions[r].properties[s],...(e[r].properties||{})[s]}}),e[r].properties||{})}:n.definitions[r]}),{}),Dn={$schema:"http://json-schema.org/draft-07/schema#",definitions:{Country:{type:"object",properties:{code:{type:"string"},name:{type:"string"},incomeFilter:{type:["integer","null"]},canApply:{type:"boolean",default:!1},capital:{type:"array",items:{type:"string"}},timeZone:{type:["string","null"]},flag:{type:["string","null"]},currency:{anyOf:[{$ref:"#/definitions/Currency"},{type:"null"}]},contracts:{type:"array",items:{$ref:"#/definitions/Contract"}},users:{type:"array",items:{$ref:"#/definitions/User"}},applications:{type:"array",items:{$ref:"#/definitions/Application"}},applicationNationalities:{type:"array",items:{$ref:"#/definitions/Application"}},educationLevels:{type:"array",items:{$ref:"#/definitions/EducationLevel"}},universities:{type:"array",items:{$ref:"#/definitions/University"}},companies:{type:"array",items:{$ref:"#/definitions/Company"}},jobs:{type:"array",items:{$ref:"#/definitions/Job"}}}},Currency:{type:"object",properties:{code:{type:"string"},name:{type:"string"},symbol:{type:"string"},countries:{type:"array",items:{$ref:"#/definitions/Country"}}}},User:{type:"object",properties:{uid:{type:"string"},createdAt:{type:"string",format:"date-time"},updatedAt:{type:"string",format:"date-time"},createdBy:{type:["string","null"]},email:{type:"string"},firstName:{type:"string"},lastName:{type:["string","null"]},role:{type:["string","null"],enum:["staff","manager","finance","admin"]},disabled:{type:"boolean",default:!1},lang:{type:["string","null"],enum:["en","es","pt"]},referralSource:{type:["string","null"],enum:["word_of_mouth","codigo_m","social","google","print","tv","radio","other"]},identifiesAsFemale:{type:["boolean","null"]},dateOfBirth:{type:["string","null"],format:"date-time"},identificationNumber:{type:["string","null"]},mobileNumber:{type:["string","null"]},github:{type:["string","null"]},linkedin:{type:["string","null"]},bio:{type:["string","null"]},country:{anyOf:[{$ref:"#/definitions/Country"},{type:"null"}]},signupCohort:{anyOf:[{$ref:"#/definitions/Cohort"},{type:"null"}]},applications:{type:"array",items:{$ref:"#/definitions/Application"}},contractsAsCheckPilot:{type:"array",items:{$ref:"#/definitions/Contract"}},contracts:{type:"array",items:{$ref:"#/definitions/Contract"}},dropouts:{type:"array",items:{$ref:"#/definitions/Dropout"}},gigs:{type:"array",items:{$ref:"#/definitions/Gig"}},messages:{type:"array",items:{$ref:"#/definitions/Message"}},students:{type:"array",items:{$ref:"#/definitions/Student"}},activityLog:{type:"array",items:{$ref:"#/definitions/ActivityLogEntry"}},authoredActivityLog:{type:"array",items:{$ref:"#/definitions/ActivityLogEntry"}},jobReviews:{type:"array",items:{$ref:"#/definitions/JobReview"}},jobApplications:{type:"array",items:{$ref:"#/definitions/JobApplication"}},studentProjecTeamMembers:{type:"array",items:{$ref:"#/definitions/StudentProjecTeamMember"}}}},Track:{type:"object",properties:{id:{type:"integer"},createdAt:{type:"string",format:"date-time"},updatedAt:{type:"string",format:"date-time"},name:{type:"string"},programs:{type:"array",items:{$ref:"#/definitions/Program"}},crawlerQueries:{type:"array",items:{$ref:"#/definitions/CrawlerQuery"}},jobProfileTypes:{type:"array",items:{$ref:"#/definitions/JobProfileType"}}}},Program:{type:"object",properties:{id:{type:"integer"},createdAt:{type:"string",format:"date-time"},updatedAt:{type:"string",format:"date-time"},name:{type:"string"},description:{type:["string","null"]},langs:{type:"array",enum:["en","es","pt"]},hidden:{type:"boolean",default:!1},track:{$ref:"#/definitions/Track"},cohorts:{type:"array",items:{$ref:"#/definitions/Cohort"}},stages:{type:"array",items:{$ref:"#/definitions/Stage"}}}},Stage:{type:"object",properties:{id:{type:"integer"},createdAt:{type:"string",format:"date-time"},updatedAt:{type:"string",format:"date-time"},name:{type:"string"},order:{type:"integer"},program:{$ref:"#/definitions/Program"},cohorts:{type:"array",items:{$ref:"#/definitions/Cohort"}}}},Cohort:{type:"object",properties:{id:{type:"integer"},createdAt:{type:"string",format:"date-time"},updatedAt:{type:"string",format:"date-time"},createdBy:{type:["string","null"]},name:{type:"string"},lang:{type:["string","null"],enum:["en","es","pt"]},start:{type:"string",format:"date-time"},end:{type:"string",format:"date-time"},timeZone:{type:["string","null"]},startTime:{type:["string","null"]},endTime:{type:["string","null"]},legacySlug:{type:"string"},vacancies:{type:["integer","null"]},admissionStart:{type:["string","null"],format:"date-time"},admissionEnd:{type:["string","null"],format:"date-time"},admissionCountries:{type:"array",items:{type:"string"}},placementStart:{type:["string","null"],format:"date-time"},placementDuration:{type:["integer","null"]},program:{$ref:"#/definitions/Program"},stage:{$ref:"#/definitions/Stage"},applications:{type:"array",items:{$ref:"#/definitions/Application"}},links:{type:"array",items:{$ref:"#/definitions/CohortLink"}},dropouts:{type:"array",items:{$ref:"#/definitions/Dropout"}},gigs:{type:"array",items:{$ref:"#/definitions/Gig"}},students:{type:"array",items:{$ref:"#/definitions/Student"}},signupUsers:{type:"array",items:{$ref:"#/definitions/User"}},activityLog:{type:"array",items:{$ref:"#/definitions/ActivityLogEntry"}},jobApplications:{type:"array",items:{$ref:"#/definitions/JobApplication"}},studentProjects:{type:"array",items:{$ref:"#/definitions/StudentProject"}}}},Student:{type:"object",properties:{id:{type:"integer"},createdAt:{type:"string",format:"date-time"},updatedAt:{type:"string",format:"date-time"},createdBy:{type:["string","null"]},legacyStudentCode:{type:["string","null"]},cohort:{$ref:"#/definitions/Cohort"},user:{$ref:"#/definitions/User"}}},CohortLink:{type:"object",properties:{id:{type:"integer"},url:{type:"string"},visibility:{type:"string",enum:["public","members","staff","team","admin"]},cohort:{$ref:"#/definitions/Cohort"}}},Dropout:{type:"object",properties:{id:{type:"integer"},createdAt:{type:"string",format:"date-time"},updatedAt:{type:"string",format:"date-time"},createdBy:{type:["string","null"]},date:{type:"string",format:"date-time"},reasonDetail:{type:["string","null"]},notes:{type:["string","null"]},staffSad:{type:"boolean"},covidRelated:{type:["boolean","null"]},reason:{type:"string",enum:["dropout","noShow","invitedToLeave","changeCohort"]},completedProjects:{type:"integer"},lastProject:{type:["string","null"]},cohort:{$ref:"#/definitions/Cohort"},user:{$ref:"#/definitions/User"}}},IscedLevel:{type:"object",properties:{id:{type:"integer"},label:{type:"string"},educationLevels:{type:"array",items:{$ref:"#/definitions/EducationLevel"}}}},EducationLevel:{type:"object",properties:{id:{type:"integer"},createdAt:{type:"string",format:"date-time"},updatedAt:{type:"string",format:"date-time"},lang:{type:"string",enum:["en","es","pt"]},label:{type:"string"},country:{$ref:"#/definitions/Country"},iscedLevel:{$ref:"#/definitions/IscedLevel"},applications:{type:"array",items:{$ref:"#/definitions/Application"}}}},University:{type:"object",properties:{id:{type:"integer"},createdAt:{type:"string",format:"date-time"},updatedAt:{type:"string",format:"date-time"},lang:{type:"string",enum:["en","es","pt"]},name:{type:"string"},filter:{type:"boolean"},country:{$ref:"#/definitions/Country"},applications:{type:"array",items:{$ref:"#/definitions/Application"}}}},Application:{type:"object",properties:{id:{type:"integer"},createdAt:{type:"string",format:"date-time"},updatedAt:{type:"string",format:"date-time"},createdBy:{type:["string","null"]},dateOfBirth:{type:"string",format:"date-time"},isAllowedToWork:{type:"boolean"},hasValidIdDocument:{type:"boolean"},locality:{type:["number","string","boolean","object","array","null"]},householdSize:{type:"integer"},children:{type:"integer"},householdIncome:{type:"integer"},racialIdentity:{type:["string","null"]},schoolType:{type:["string","null"],enum:["private","public","other","subsidized","mixed"]},educationSubject:{type:["string","null"],enum:["design_and_media","software_engineering","engineering","management_and_business","languages","science","health","social_sciences","arts","comms_and_advertising","education","cooking","tourism","economics_and_accounting","law","other"]},isStudying:{type:"boolean"},englishLevel:{type:["string","null"],enum:["NO","A1","A2","B1","B2","C1","C2"]},workStatus:{type:"string",enum:["never","not_now","yes"]},isLookingForWork:{type:["boolean","null"]},monthsLookingForWork:{type:["integer","null"]},monthsUnemployed:{type:["integer","null"]},workRole:{type:["string","null"],enum:["waitress","promoter","manager","cashier","intern","operative","call_center","receptionist","sales_agent","assistant","professional","technical","consultant","other"]},freelance:{type:["boolean","null"]},workFormal:{type:["boolean","null"]},workIncome:{type:["integer","null"]},failedFilters:{type:"array",items:{type:"string"}},bypassFilters:{type:"boolean",default:!1},isReady:{type:"boolean",default:!1},isReturningApplicant:{type:["boolean","null"]},legacyAdmissionCohortSlug:{type:["string","null"]},cohort:{$ref:"#/definitions/Cohort"},user:{$ref:"#/definitions/User"},country:{$ref:"#/definitions/Country"},nationality:{$ref:"#/definitions/Country"},educationLevel:{$ref:"#/definitions/EducationLevel"},university:{anyOf:[{$ref:"#/definitions/University"},{type:"null"}]},challengeAssignments:{type:"array",items:{$ref:"#/definitions/ApplicationChallengeAssignment"}}}},ApplicationChallenge:{type:"object",properties:{id:{type:"integer"},createdAt:{type:"string",format:"date-time"},updatedAt:{type:"string",format:"date-time"},createdBy:{type:["string","null"]},slug:{type:"string"},version:{type:"string"},trackId:{type:"integer"},langs:{type:"array",enum:["en","es","pt"]},json:{type:"string"},archived:{type:"boolean",default:!1},assignments:{type:"array",items:{$ref:"#/definitions/ApplicationChallengeAssignment"}}}},ApplicationChallengeAssignment:{type:"object",properties:{id:{type:"integer"},createdAt:{type:"string",format:"date-time"},updatedAt:{type:"string",format:"date-time"},application:{$ref:"#/definitions/Application"},challenge:{$ref:"#/definitions/ApplicationChallenge"}}},ActivityLogEntry:{type:"object",properties:{id:{type:"integer"},createdAt:{type:"string",format:"date-time"},updatedAt:{type:"string",format:"date-time"},type:{type:"string",enum:["challenge","application_filter","application_filter_bypass","application_cohort_change","project_assessment","project_assessment_request"]},data:{type:["number","string","boolean","object","array","null"]},path:{type:"string"},author:{$ref:"#/definitions/User"},user:{$ref:"#/definitions/User"},cohort:{$ref:"#/definitions/Cohort"}}},StudentProject:{type:"object",properties:{id:{type:"integer"},createdAt:{type:"string",format:"date-time"},updatedAt:{type:"string",format:"date-time"},createdBy:{type:"string"},projectSlug:{type:"string"},projectVersion:{type:"string"},cohort:{$ref:"#/definitions/Cohort"},links:{type:"array",items:{$ref:"#/definitions/StudentProjectLink"}},team:{type:"array",items:{$ref:"#/definitions/StudentProjecTeamMember"}}}},StudentProjecTeamMember:{type:"object",properties:{id:{type:"integer"},createdAt:{type:"string",format:"date-time"},updatedAt:{type:"string",format:"date-time"},createdBy:{type:"string"},studentProject:{$ref:"#/definitions/StudentProject"},user:{$ref:"#/definitions/User"}}},StudentProjectLink:{type:"object",properties:{id:{type:"integer"},createdAt:{type:"string",format:"date-time"},updatedAt:{type:"string",format:"date-time"},createdBy:{type:"string"},url:{type:"string"},studentProject:{$ref:"#/definitions/StudentProject"}}},Contract:{type:"object",properties:{id:{type:"integer"},createdAt:{type:"string",format:"date-time"},updatedAt:{type:"string",format:"date-time"},createdBy:{type:"string"},isEmployment:{type:"boolean"},feeAmount:{type:"integer"},hoursPerWeek:{type:"integer"},start:{type:"string",format:"date-time"},end:{type:["string","null"],format:"date-time"},isTrial:{type:"boolean",default:!1},source:{type:["string","null"],enum:["graduate","referral","jazzhr","web","linkedin","other"]},checkPilot:{anyOf:[{$ref:"#/definitions/User"},{type:"null"}]},country:{$ref:"#/definitions/Country"},user:{$ref:"#/definitions/User"},gigs:{type:"array",items:{$ref:"#/definitions/Gig"}}}},Gig:{type:"object",properties:{id:{type:"integer"},createdAt:{type:"string",format:"date-time"},updatedAt:{type:"string",format:"date-time"},createdBy:{type:"string"},role:{type:"string",enum:["bm","pdc","js","ux"]},hoursPerWeek:{type:"integer"},start:{type:"string",format:"date-time"},end:{type:["string","null"],format:"date-time"},cohort:{$ref:"#/definitions/Cohort"},contract:{$ref:"#/definitions/Contract"},user:{$ref:"#/definitions/User"}}},Message:{type:"object",properties:{id:{type:"integer"},createdAt:{type:"string",format:"date-time"},updatedAt:{type:"string",format:"date-time"},createdBy:{type:["string","null"]},key:{type:"string"},from:{type:"string"},to:{type:"string"},transport:{type:"string",enum:["mandrill","slack"]},status:{type:"string",default:"PENDING",enum:["PENDING","QUEUED","ERROR","SENT"]},data:{type:["number","string","boolean","object","array","null"]},taskInfo:{type:["number","string","boolean","object","array","null"]},user:{anyOf:[{$ref:"#/definitions/User"},{type:"null"}]},logs:{type:"array",items:{$ref:"#/definitions/MessageLog"}}}},MessageLog:{type:"object",properties:{id:{type:"integer"},createdAt:{type:"string",format:"date-time"},statusText:{type:["string","null"]},message:{$ref:"#/definitions/Message"}}},Industry:{type:"object",properties:{id:{type:"integer"},createdAt:{type:"string",format:"date-time"},updatedAt:{type:"string",format:"date-time"},createdBy:{type:["string","null"]},name:{type:"string"},companies:{type:"array",items:{$ref:"#/definitions/Company"}}}},Company:{type:"object",properties:{id:{type:"integer"},createdAt:{type:"string",format:"date-time"},updatedAt:{type:"string",format:"date-time"},createdBy:{type:["string","null"]},source:{type:"string"},sourceId:{type:"string"},name:{type:"string"},size:{type:["string","null"],enum:["A_2_10","B_11_50","C_51_200","D_201_500","E_501_1000","F_1001_5000","G_5001_10000","H_10001_plus"]},data:{type:["number","string","boolean","object","array","null"]},web:{type:["string","null"]},twitter:{type:["string","null"]},github:{type:["string","null"]},facebook:{type:["string","null"]},country:{anyOf:[{$ref:"#/definitions/Country"},{type:"null"}]},industry:{anyOf:[{$ref:"#/definitions/Industry"},{type:"null"}]},jobs:{type:"array",items:{$ref:"#/definitions/Job"}},categories:{type:"array",enum:["Tech_Consultancy","Digital_Transformation","Agency","Startups","High_tech","Traditional_Consulting"]}}},Job:{type:"object",properties:{id:{type:"integer"},createdAt:{type:"string",format:"date-time"},updatedAt:{type:"string",format:"date-time"},createdBy:{type:["string","null"]},source:{type:"string"},sourceId:{type:"string"},title:{type:"string"},publishedAt:{type:"string",format:"date-time"},modality:{type:"string"},publicUrl:{type:["string","null"]},location:{type:["string","null"]},data:{type:["number","string","boolean","object","array","null"]},description:{type:["string","null"]},descriptionHTML:{type:["string","null"]},functions:{type:["string","null"]},functionsHTML:{type:["string","null"]},seniority:{type:["string","null"]},remote:{type:["boolean","null"]},remoteOption:{type:["string","null"],enum:["remote_for_now","locally_remote","fully_remote","no_remote","mixed"]},lang:{type:["string","null"],enum:["en","es","pt"]},maxSalary:{type:["integer","null"]},minSalary:{type:["integer","null"]},tags:{type:"array",items:{type:"string"}},company:{$ref:"#/definitions/Company"},country:{anyOf:[{$ref:"#/definitions/Country"},{type:"null"}]},reviews:{type:"array",items:{$ref:"#/definitions/JobReview"}},applications:{type:"array",items:{$ref:"#/definitions/JobApplication"}},crawlerQueries:{type:"array",items:{$ref:"#/definitions/JobCrawlerQuery"}},crawlerLocations:{type:"array",items:{$ref:"#/definitions/JobCrawlerLocation"}}}},JobProfileType:{type:"object",properties:{id:{type:"integer"},createdAt:{type:"string",format:"date-time"},updatedAt:{type:"string",format:"date-time"},createdBy:{type:["string","null"]},name:{type:"string"},learningObjectives:{type:["number","string","boolean","object","array","null"]},track:{anyOf:[{$ref:"#/definitions/Track"},{type:"null"}]},reviews:{type:"array",items:{$ref:"#/definitions/JobReviewProfileType"}}}},JobReview:{type:"object",properties:{id:{type:"integer"},createdAt:{type:"string",format:"date-time"},updatedAt:{type:"string",format:"date-time"},isValid:{type:"boolean"},invalidReason:{type:["string","null"],enum:["unrelated","experience","qualifications","other"]},comment:{type:["string","null"]},author:{$ref:"#/definitions/User"},job:{$ref:"#/definitions/Job"},profileTypes:{type:"array",items:{$ref:"#/definitions/JobReviewProfileType"}}}},JobReviewProfileType:{type:"object",properties:{id:{type:"integer"},createdAt:{type:"string",format:"date-time"},updatedAt:{type:"string",format:"date-time"},createdBy:{type:["string","null"]},review:{$ref:"#/definitions/JobReview"},profileType:{$ref:"#/definitions/JobProfileType"}}},JobApplication:{type:"object",properties:{id:{type:"integer"},createdAt:{type:"string",format:"date-time"},updatedAt:{type:"string",format:"date-time"},createdBy:{type:["string","null"]},status:{type:"string",default:"pending",enum:["pending","applied","interview","challenge","followup","hired","not_hired"]},hireDate:{type:["string","null"],format:"date-time"},jobStartDate:{type:["string","null"],format:"date-time"},netSalary:{type:["integer","null"]},grossSalary:{type:["integer","null"]},currency:{type:["string","null"]},job:{$ref:"#/definitions/Job"},user:{$ref:"#/definitions/User"},cohort:{anyOf:[{$ref:"#/definitions/Cohort"},{type:"null"}]}}},CrawlerQuery:{type:"object",properties:{id:{type:"integer"},createdAt:{type:"string",format:"date-time"},updatedAt:{type:"string",format:"date-time"},createdBy:{type:["string","null"]},query:{type:"string"},enabled:{type:"boolean",default:!0},track:{$ref:"#/definitions/Track"},jobs:{type:"array",items:{$ref:"#/definitions/JobCrawlerQuery"}}}},JobCrawlerQuery:{type:"object",properties:{id:{type:"integer"},createdAt:{type:"string",format:"date-time"},updatedAt:{type:"string",format:"date-time"},createdBy:{type:["string","null"]},job:{$ref:"#/definitions/Job"},query:{$ref:"#/definitions/CrawlerQuery"}}},CrawlerLocation:{type:"object",properties:{id:{type:"integer"},createdAt:{type:"string",format:"date-time"},updatedAt:{type:"string",format:"date-time"},createdBy:{type:["string","null"]},name:{type:"string"},enabled:{type:"boolean",default:!0},jobs:{type:"array",items:{$ref:"#/definitions/JobCrawlerLocation"}}}},JobCrawlerLocation:{type:"object",properties:{id:{type:"integer"},createdAt:{type:"string",format:"date-time"},updatedAt:{type:"string",format:"date-time"},createdBy:{type:["string","null"]},job:{$ref:"#/definitions/Job"},location:{$ref:"#/definitions/CrawlerLocation"}}}},type:"object",properties:{country:{$ref:"#/definitions/Country"},currency:{$ref:"#/definitions/Currency"},user:{$ref:"#/definitions/User"},track:{$ref:"#/definitions/Track"},program:{$ref:"#/definitions/Program"},stage:{$ref:"#/definitions/Stage"},cohort:{$ref:"#/definitions/Cohort"},student:{$ref:"#/definitions/Student"},cohortLink:{$ref:"#/definitions/CohortLink"},dropout:{$ref:"#/definitions/Dropout"},iscedLevel:{$ref:"#/definitions/IscedLevel"},educationLevel:{$ref:"#/definitions/EducationLevel"},university:{$ref:"#/definitions/University"},application:{$ref:"#/definitions/Application"},applicationChallenge:{$ref:"#/definitions/ApplicationChallenge"},applicationChallengeAssignment:{$ref:"#/definitions/ApplicationChallengeAssignment"},activityLogEntry:{$ref:"#/definitions/ActivityLogEntry"},studentProject:{$ref:"#/definitions/StudentProject"},studentProjecTeamMember:{$ref:"#/definitions/StudentProjecTeamMember"},studentProjectLink:{$ref:"#/definitions/StudentProjectLink"},contract:{$ref:"#/definitions/Contract"},gig:{$ref:"#/definitions/Gig"},message:{$ref:"#/definitions/Message"},messageLog:{$ref:"#/definitions/MessageLog"},industry:{$ref:"#/definitions/Industry"},company:{$ref:"#/definitions/Company"},job:{$ref:"#/definitions/Job"},jobProfileType:{$ref:"#/definitions/JobProfileType"},jobReview:{$ref:"#/definitions/JobReview"},jobReviewProfileType:{$ref:"#/definitions/JobReviewProfileType"},jobApplication:{$ref:"#/definitions/JobApplication"},crawlerQuery:{$ref:"#/definitions/CrawlerQuery"},jobCrawlerQuery:{$ref:"#/definitions/JobCrawlerQuery"},crawlerLocation:{$ref:"#/definitions/CrawlerLocation"},jobCrawlerLocation:{$ref:"#/definitions/JobCrawlerLocation"}}},Ln=24*(60*60*1e3),Go={Country:{primaryKey:"code",plural:"countries",searchProps:["code","name","timeZone"],getOptionLabel:({code:n,name:e})=>`${n} / ${e}`},ActivityLogEntry:{plural:"activityLog"},User:{primaryKey:"uid",inputProps:["firstName","lastName","email","password","lang","identifiesAsFemale","dateOfBirth","country","identificationNumber","mobileNumber","github","linkedin","bio","role","signupCohort","disabled","referralSource"],searchProps:["firstName","lastName","email"],getOptionLabel:({firstName:n,lastName:e,email:t})=>`${n} ${e} (${t})`,properties:{email:{inputType:"email"},lastName:{isRequired:!0},mobileNumber:{inputType:"phone"},bio:{inputType:"textarea"}},parse:n=>{const e=n.github?`https://github.com/${n.github}.png?size=`:`https://www.gravatar.com/avatar/${Uo(n.email)}?s=`;return{...n,fullName:`${n.firstName||""}${n.lastName?` ${n.lastName}`:""}`,avatar:t=>`${e}${t}`,isStaff:["staff","manager","finance","admin"].includes(n.role),isManager:["manager","finance","admin"].includes(n.role),isFinance:["finance","admin"].includes(n.role),isAdmin:n.role==="admin"}}},Track:{searchProps:["name"]},Program:{searchProps:["name"]},Stage:{searchProps:["name"]},Cohort:{inputProps:["program","stage","lang","name","start","end","timeZone","startTime","endTime","vacancies","admissionStart","admissionEnd","placementStart","admissionCountries"],searchProps:["name"],getOptionLabel:({id:n,name:e,stage:t})=>`${e}${t?` - ${t.name}`:""} (id: ${n})`,properties:{},parse:n=>{var s,o;const e=Date.now();let t;if(n.placementStart){const c=n.placementDuration||270;new Date(+n.placementStart+c*24*60*60*1e3)<e?t="placement_ended":n.placementStart<e&&(t="placement_started")}!t&&n.end<e&&(t="ended"),!t&&n.start<e&&(t="started");const r=n.admissionEnd?+n.admissionEnd+Ln:!1;!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");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;return{...n,status:t,size:i}}},Student:{inputProps:["cohort","user"],searchProps:[]},Dropout:{inputProps:["cohort","user","date","reason","reasonDetail","lastProject","completedProjects","notes","staffSad","covidRelated"],searchProps:["user.uid","user.firstName","user.lastName","user.email","cohort.name"]},Contract:{inputProps:["user","country","isEmployment","feeAmount","hoursPerWeek","start","end","isTrial","checkPilot","source"],searchProps:["user.firstName","user.lastName","user.email"],getOptionLabel:({id:n,user:e})=>`${e==null?void 0:e.firstName} (id: ${n})`},Gig:{inputProps:["cohort","user","contract","role","hoursPerWeek","start","end"]},Application:{inputProps:["user","cohort","dateOfBirth","country","locality","nationality","isAllowedToWork","hasValidIdDocument","householdSize","children","householdIncome","racialIdentity","educationLevel","schoolType","educationSubject","university","isStudying","englishLevel","workStatus","isLookingForWork","monthsLookingForWork","monthsUnemployed","workRole","freelance","workFormal","workIncome","isReady","bypassFilters"],properties:{locality:{isRequired:!0},englishLevel:{isRequired:!0},isReady:{isRequired:!1},bypassFilters:{isRequired:!1}},parse:n=>{var i,s,o;const e=typeof n.hasFailedFilters=="boolean"?n.hasFailedFilters:typeof((i=n.failedFilters)==null?void 0:i.length)=="number"?n.failedFilters.length>0:void 0;if(!((s=n.cohort)!=null&&s.admissionEnd)||typeof e>"u")return n;const t=Date.now();let r;return n.isReady?r="ready":e&&!n.bypassFilters?r="rejected":n.createdAt<t-90*Ln?r="expired":((o=n.cohort)==null?void 0:o.status)!=="admission_started"?r="admission_ended":r="active",{...n,status:r}}},IscedLevel:{parse:n=>{const e=Math.floor(n.id/10);return{...n,level:e,completed:e*10<n.id}}},EducationLevel:{searchProps:["label"]},University:{plural:"universities",searchProps:["name"]},Company:{plural:"companies"},CrawlerQuery:{plural:"crawlerQueries"},JobCrawlerQuery:{plural:"jobCrawlerQueries"}},Jo=(n,e)=>({...zo(n,e,{...Dn,definitions:qo(Dn,Go)}),gcpLog:{getEntries:async t=>await gt(n,e.authUser)(`/gcp-logs?q=${JSON.stringify(t)}`)}}),Ko=(n,e)=>{const t=gt(n,e.authUser);return{project:{findMany:(r={})=>t(`/projects?q=${JSON.stringify(r)}`),findBySlug:(r,i={})=>t(`/projects/${r}?q=${JSON.stringify(i)}`)},topic:{findMany:(r={})=>t(`/topics?q=${JSON.stringify(r)}`),findBySlug:(r,i={})=>t(`/topics/${r}?q=${JSON.stringify(i)}`)},learningObjective:{findMany:(r={})=>t(`/learning-objectives?q=${JSON.stringify(r)}`)}}},Ve=n=>n>9?`${n}`:`0${n}`,$n=n=>`${Ve(n.getUTCDate())}/${Ve(n.getUTCMonth()+1)}/${n.getUTCFullYear()}`,Mn=n=>`${Ve(n.getUTCHours())}:${Ve(n.getUTCMinutes())}:${n.getUTCSeconds()} UTC`,Yo=n=>`${$n(n)} ${Mn(n)}`,Qo={es:"es-ES",pt:"pt-BR"},Xo=(n,e="es",t=!1)=>new Intl.DateTimeFormat(Qo[e],{...t&&{year:"numeric"},month:"long",day:"numeric",timeZone:"UTC"}).format(new Date(n)),Zo=(n,e)=>{let t=e.getFullYear()-n.getFullYear();const r=e.getMonth()-n.getMonth();return(r<0||r===0&&e.getDate()<n.getDate())&&t--,t},ea=(n,e,t)=>new Intl.NumberFormat(`${n}-${e}`,{currency:t}),ta=(n,e,t,r)=>ea(e,t,r).format(n),na=n=>parseInt(n.replace(/[,\.]/g,""),10),ra=n=>{try{return JSON.parse(window.localStorage.getItem(n))}catch{return null}},ia=({firebaseApiKey:n="AIzaSyAXbaEbpq8NOfn0r8mIrcoHvoGRkJThwdc",firebaseProject:e="laboratoria-la",coreApiUrl:t="https://us-central1-outpost-272720.cloudfunctions.net/core-api"}={})=>{const r=Ot({apiKey:n,authDomain:`${e}.firebaseapp.com`,databaseURL:`https://${e}.firebaseio.com`,projectId:e}),i=Do(r),s={authUser:void 0,user:void 0},o=Jo(t,s);return{...Ko(t,s),...o,auth:{onChange:u=>vs(i,_=>{if(!_)return Object.assign(s,{authUser:null,user:null}),u(s);Object.assign(s,{authUser:_}),o.user.findById(_.uid).then(b=>{Object.assign(s,{user:b}),u(s)}).catch(b=>{console.error(b),Object.assign(s,{authUser:null,user:null}),u(s)})}),signIn:(u,_)=>ms(i,u,_),signOut:()=>bs(i),sendPasswordResetEmail:u=>gs(i,u)},firebaseApp:r}};k.createApp=ia,k.formatCurrency=ta,k.formatDate=$n,k.formatDateTime=Yo,k.formatMonth=Xo,k.formatTime=Mn,k.getAgeAt=Zo,k.loadFromLocalStorage=ra,k.parseCurrency=na,Object.defineProperty(k,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@laboratoria/sdk-js",
3
- "version": "7.0.0",
3
+ "version": "7.0.1",
4
4
  "description": "Laboratoria JavaScript (browser) SDK",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -23,15 +23,15 @@
23
23
  },
24
24
  "dependencies": {
25
25
  "blueimp-md5": "^2.19.0",
26
- "firebase": "^10.6.0"
26
+ "firebase": "^10.7.1"
27
27
  },
28
28
  "devDependencies": {
29
- "@vitest/coverage-v8": "^0.34.6",
30
- "jsdom": "^22.1.0",
31
- "vite": "^5.0.2",
32
- "vitest": "^0.34.6"
29
+ "@vitest/coverage-v8": "^1.0.4",
30
+ "jsdom": "^23.0.1",
31
+ "vite": "^5.0.8",
32
+ "vitest": "^1.0.4"
33
33
  },
34
34
  "engines": {
35
35
  "node": ">=18.0.0"
36
36
  }
37
- }
37
+ }