@stoker-platform/web-client 0.5.37 → 0.5.38

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/bundle.js +114 -113
  2. package/package.json +2 -2
package/dist/bundle.js CHANGED
@@ -8,7 +8,7 @@ import { getFunctions as Ue, httpsCallable as Je, connectFunctionsEmulator as up
8
8
  import { ReCaptchaEnterpriseProvider as fp, initializeAppCheck as Gn, onTokenChanged as Hn } from "firebase/app-check";
9
9
  import { getPerformance as dp } from "firebase/performance";
10
10
  import { getRemoteConfig as hp, fetchAndActivate as mp } from "firebase/remote-config";
11
- const pp = "0.5.37", yp = (r) => !!r.auth, vt = (r, e) => {
11
+ const pp = "0.5.38", yp = (r) => !!r.auth, vt = (r, e) => {
12
12
  if (e?.operations)
13
13
  return e.operations.includes(r);
14
14
  }, An = (r, e) => e ? e.Role ? r.access?.includes(e.Role) : !1 : !0, gp = (r, e) => e ? !e.Role || r.restrictCreate === !0 ? !1 : typeof r.restrictCreate == "object" ? r.restrictCreate?.includes(e.Role) : !0 : !0, _p = (r, e) => e ? !e.Role || r.restrictUpdate === !0 ? !1 : typeof r.restrictUpdate == "object" ? r.restrictUpdate?.includes(e.Role) : !0 : !0, re = (r, e) => r.filter((t) => t.name === e)[0], _e = (r) => ["OneToOne", "OneToMany", "ManyToOne", "ManyToMany"].includes(r.type), Rd = (r, e) => {
@@ -313,7 +313,7 @@ function kd() {
313
313
  return os = r, os;
314
314
  }
315
315
  var cs, Bc;
316
- function ct() {
316
+ function lt() {
317
317
  if (Bc) return cs;
318
318
  Bc = 1;
319
319
  var r = kd(), e = typeof self == "object" && self && self.Object === Object && self, t = r || e || Function("return this")();
@@ -323,7 +323,7 @@ var ls, Zc;
323
323
  function Wr() {
324
324
  if (Zc) return ls;
325
325
  Zc = 1;
326
- var r = ct(), e = r.Symbol;
326
+ var r = lt(), e = r.Symbol;
327
327
  return ls = e, ls;
328
328
  }
329
329
  var us, Gc;
@@ -390,7 +390,7 @@ var ps, Qc;
390
390
  function xp() {
391
391
  if (Qc) return ps;
392
392
  Qc = 1;
393
- var r = ct(), e = r["__core-js_shared__"];
393
+ var r = lt(), e = r["__core-js_shared__"];
394
394
  return ps = e, ps;
395
395
  }
396
396
  var ys, Xc;
@@ -465,7 +465,7 @@ var bs, sl;
465
465
  function Fo() {
466
466
  if (sl) return bs;
467
467
  sl = 1;
468
- var r = Zt(), e = ct(), t = r(e, "Map");
468
+ var r = Zt(), e = lt(), t = r(e, "Map");
469
469
  return bs = t, bs;
470
470
  }
471
471
  var Os, il;
@@ -761,7 +761,7 @@ var Bs, Al;
761
761
  function Nd() {
762
762
  if (Al) return Bs;
763
763
  Al = 1;
764
- var r = ct(), e = r.Uint8Array;
764
+ var r = lt(), e = r.Uint8Array;
765
765
  return Bs = e, Bs;
766
766
  }
767
767
  var Zs, kl;
@@ -946,7 +946,7 @@ Sr.exports;
946
946
  var Wl;
947
947
  function Mn() {
948
948
  return Wl || (Wl = 1, (function(r, e) {
949
- var t = ct(), n = iy(), s = e && !e.nodeType && e, i = s && !0 && r && !r.nodeType && r, a = i && i.exports === s, o = a ? t.Buffer : void 0, c = o ? o.isBuffer : void 0, l = c || n;
949
+ var t = lt(), n = iy(), s = e && !e.nodeType && e, i = s && !0 && r && !r.nodeType && r, a = i && i.exports === s, o = a ? t.Buffer : void 0, c = o ? o.isBuffer : void 0, l = c || n;
950
950
  r.exports = l;
951
951
  })(Sr, Sr.exports)), Sr.exports;
952
952
  }
@@ -1148,28 +1148,28 @@ var wi, iu;
1148
1148
  function uy() {
1149
1149
  if (iu) return wi;
1150
1150
  iu = 1;
1151
- var r = Zt(), e = ct(), t = r(e, "DataView");
1151
+ var r = Zt(), e = lt(), t = r(e, "DataView");
1152
1152
  return wi = t, wi;
1153
1153
  }
1154
1154
  var bi, au;
1155
1155
  function fy() {
1156
1156
  if (au) return bi;
1157
1157
  au = 1;
1158
- var r = Zt(), e = ct(), t = r(e, "Promise");
1158
+ var r = Zt(), e = lt(), t = r(e, "Promise");
1159
1159
  return bi = t, bi;
1160
1160
  }
1161
1161
  var Oi, ou;
1162
1162
  function dy() {
1163
1163
  if (ou) return Oi;
1164
1164
  ou = 1;
1165
- var r = Zt(), e = ct(), t = r(e, "Set");
1165
+ var r = Zt(), e = lt(), t = r(e, "Set");
1166
1166
  return Oi = t, Oi;
1167
1167
  }
1168
1168
  var Ei, cu;
1169
1169
  function hy() {
1170
1170
  if (cu) return Ei;
1171
1171
  cu = 1;
1172
- var r = Zt(), e = ct(), t = r(e, "WeakMap");
1172
+ var r = Zt(), e = lt(), t = r(e, "WeakMap");
1173
1173
  return Ei = t, Ei;
1174
1174
  }
1175
1175
  var Si, lu;
@@ -1394,7 +1394,7 @@ Rr.exports;
1394
1394
  var _u;
1395
1395
  function zd() {
1396
1396
  return _u || (_u = 1, (function(r, e) {
1397
- var t = ct(), n = e && !e.nodeType && e, s = n && !0 && r && !r.nodeType && r, i = s && s.exports === n, a = i ? t.Buffer : void 0, o = a ? a.allocUnsafe : void 0;
1397
+ var t = lt(), n = e && !e.nodeType && e, s = n && !0 && r && !r.nodeType && r, i = s && s.exports === n, a = i ? t.Buffer : void 0, o = a ? a.allocUnsafe : void 0;
1398
1398
  function c(l, u) {
1399
1399
  if (u)
1400
1400
  return l.slice();
@@ -2198,7 +2198,7 @@ const Ko = (r, e, t, n, s, i, a, o, c, l) => (r == "create" && (t.Collection_Pat
2198
2198
  const a = e[`${i.name}_Array`]?.[0];
2199
2199
  if (a) {
2200
2200
  const o = e[i.name][a] || {};
2201
- e[`${i.name}_Single`] = { ...o };
2201
+ e[`${i.name}_Single`] = { id: a, ...o };
2202
2202
  }
2203
2203
  }
2204
2204
  });
@@ -2531,7 +2531,7 @@ var W;
2531
2531
  (function(r) {
2532
2532
  r.errToObj = (e) => typeof e == "string" ? { message: e } : e || {}, r.toString = (e) => typeof e == "string" ? e : e?.message;
2533
2533
  })(W || (W = {}));
2534
- class ot {
2534
+ class ct {
2535
2535
  constructor(e, t, n, s) {
2536
2536
  this._cachedPath = [], this.parent = e, this.data = t, this._path = n, this._key = s;
2537
2537
  }
@@ -2719,7 +2719,7 @@ class le {
2719
2719
  return this.nullable().optional();
2720
2720
  }
2721
2721
  array() {
2722
- return at.create(this);
2722
+ return ot.create(this);
2723
2723
  }
2724
2724
  promise() {
2725
2725
  return _n.create(this, this._def);
@@ -3713,7 +3713,7 @@ mf.create = (r) => new mf({
3713
3713
  typeName: Q.ZodVoid,
3714
3714
  ...ae(r)
3715
3715
  });
3716
- class at extends le {
3716
+ class ot extends le {
3717
3717
  _parse(e) {
3718
3718
  const { ctx: t, status: n } = this._processInputParams(e), s = this._def;
3719
3719
  if (t.parsedType !== V.array)
@@ -3749,27 +3749,27 @@ class at extends le {
3749
3749
  exact: !1,
3750
3750
  message: s.maxLength.message
3751
3751
  }), n.dirty()), t.common.async)
3752
- return Promise.all([...t.data].map((a, o) => s.type._parseAsync(new ot(t, a, t.path, o)))).then((a) => qe.mergeArray(n, a));
3753
- const i = [...t.data].map((a, o) => s.type._parseSync(new ot(t, a, t.path, o)));
3752
+ return Promise.all([...t.data].map((a, o) => s.type._parseAsync(new ct(t, a, t.path, o)))).then((a) => qe.mergeArray(n, a));
3753
+ const i = [...t.data].map((a, o) => s.type._parseSync(new ct(t, a, t.path, o)));
3754
3754
  return qe.mergeArray(n, i);
3755
3755
  }
3756
3756
  get element() {
3757
3757
  return this._def.type;
3758
3758
  }
3759
3759
  min(e, t) {
3760
- return new at({
3760
+ return new ot({
3761
3761
  ...this._def,
3762
3762
  minLength: { value: e, message: W.toString(t) }
3763
3763
  });
3764
3764
  }
3765
3765
  max(e, t) {
3766
- return new at({
3766
+ return new ot({
3767
3767
  ...this._def,
3768
3768
  maxLength: { value: e, message: W.toString(t) }
3769
3769
  });
3770
3770
  }
3771
3771
  length(e, t) {
3772
- return new at({
3772
+ return new ot({
3773
3773
  ...this._def,
3774
3774
  exactLength: { value: e, message: W.toString(t) }
3775
3775
  });
@@ -3778,7 +3778,7 @@ class at extends le {
3778
3778
  return this.min(1, e);
3779
3779
  }
3780
3780
  }
3781
- at.create = (r, e) => new at({
3781
+ ot.create = (r, e) => new ot({
3782
3782
  type: r,
3783
3783
  minLength: null,
3784
3784
  maxLength: null,
@@ -3797,7 +3797,7 @@ function Qt(r) {
3797
3797
  ...r._def,
3798
3798
  shape: () => e
3799
3799
  });
3800
- } else return r instanceof at ? new at({
3800
+ } else return r instanceof ot ? new ot({
3801
3801
  ...r._def,
3802
3802
  type: Qt(r.element)
3803
3803
  }) : r instanceof It ? It.create(Qt(r.unwrap())) : r instanceof ur ? ur.create(Qt(r.unwrap())) : r instanceof Wt ? Wt.create(r.items.map((e) => Qt(e))) : r;
@@ -3830,7 +3830,7 @@ class Ce extends le {
3830
3830
  const u = i[l], f = s.data[l];
3831
3831
  c.push({
3832
3832
  key: { status: "valid", value: l },
3833
- value: u._parse(new ot(s, f, s.path, l)),
3833
+ value: u._parse(new ct(s, f, s.path, l)),
3834
3834
  alwaysSet: l in s.data
3835
3835
  });
3836
3836
  }
@@ -3855,7 +3855,7 @@ class Ce extends le {
3855
3855
  c.push({
3856
3856
  key: { status: "valid", value: u },
3857
3857
  value: l._parse(
3858
- new ot(s, f, s.path, u)
3858
+ new ct(s, f, s.path, u)
3859
3859
  //, ctx.child(key), value, getParsedType(value)
3860
3860
  ),
3861
3861
  alwaysSet: u in s.data
@@ -4252,7 +4252,7 @@ class Wt extends le {
4252
4252
  }), t.dirty());
4253
4253
  const i = [...n.data].map((a, o) => {
4254
4254
  const c = this._def.items[o] || this._def.rest;
4255
- return c ? c._parse(new ot(n, a, n.path, o)) : null;
4255
+ return c ? c._parse(new ct(n, a, n.path, o)) : null;
4256
4256
  }).filter((a) => !!a);
4257
4257
  return n.common.async ? Promise.all(i).then((a) => qe.mergeArray(t, a)) : qe.mergeArray(t, i);
4258
4258
  }
@@ -4294,8 +4294,8 @@ class gn extends le {
4294
4294
  const s = [], i = this._def.keyType, a = this._def.valueType;
4295
4295
  for (const o in n.data)
4296
4296
  s.push({
4297
- key: i._parse(new ot(n, o, n.path, o)),
4298
- value: a._parse(new ot(n, n.data[o], n.path, o)),
4297
+ key: i._parse(new ct(n, o, n.path, o)),
4298
+ value: a._parse(new ct(n, n.data[o], n.path, o)),
4299
4299
  alwaysSet: o in n.data
4300
4300
  });
4301
4301
  return n.common.async ? qe.mergeObjectAsync(t, s) : qe.mergeObjectSync(t, s);
@@ -4333,8 +4333,8 @@ class pf extends le {
4333
4333
  received: n.parsedType
4334
4334
  }), X;
4335
4335
  const s = this._def.keyType, i = this._def.valueType, a = [...n.data.entries()].map(([o, c], l) => ({
4336
- key: s._parse(new ot(n, o, n.path, [l, "key"])),
4337
- value: i._parse(new ot(n, c, n.path, [l, "value"]))
4336
+ key: s._parse(new ct(n, o, n.path, [l, "key"])),
4337
+ value: i._parse(new ct(n, c, n.path, [l, "value"]))
4338
4338
  }));
4339
4339
  if (n.common.async) {
4340
4340
  const o = /* @__PURE__ */ new Map();
@@ -4400,7 +4400,7 @@ class jr extends le {
4400
4400
  }
4401
4401
  return { status: t.value, value: l };
4402
4402
  }
4403
- const o = [...n.data.values()].map((c, l) => i._parse(new ot(n, c, n.path, l)));
4403
+ const o = [...n.data.values()].map((c, l) => i._parse(new ct(n, c, n.path, l)));
4404
4404
  return n.common.async ? Promise.all(o).then((c) => a(c)) : a(o);
4405
4405
  }
4406
4406
  min(e, t) {
@@ -4849,9 +4849,9 @@ var Q;
4849
4849
  (function(r) {
4850
4850
  r.ZodString = "ZodString", r.ZodNumber = "ZodNumber", r.ZodNaN = "ZodNaN", r.ZodBigInt = "ZodBigInt", r.ZodBoolean = "ZodBoolean", r.ZodDate = "ZodDate", r.ZodSymbol = "ZodSymbol", r.ZodUndefined = "ZodUndefined", r.ZodNull = "ZodNull", r.ZodAny = "ZodAny", r.ZodUnknown = "ZodUnknown", r.ZodNever = "ZodNever", r.ZodVoid = "ZodVoid", r.ZodArray = "ZodArray", r.ZodObject = "ZodObject", r.ZodUnion = "ZodUnion", r.ZodDiscriminatedUnion = "ZodDiscriminatedUnion", r.ZodIntersection = "ZodIntersection", r.ZodTuple = "ZodTuple", r.ZodRecord = "ZodRecord", r.ZodMap = "ZodMap", r.ZodSet = "ZodSet", r.ZodFunction = "ZodFunction", r.ZodLazy = "ZodLazy", r.ZodLiteral = "ZodLiteral", r.ZodEnum = "ZodEnum", r.ZodEffects = "ZodEffects", r.ZodNativeEnum = "ZodNativeEnum", r.ZodOptional = "ZodOptional", r.ZodNullable = "ZodNullable", r.ZodDefault = "ZodDefault", r.ZodCatch = "ZodCatch", r.ZodPromise = "ZodPromise", r.ZodBranded = "ZodBranded", r.ZodPipeline = "ZodPipeline", r.ZodReadonly = "ZodReadonly";
4851
4851
  })(Q || (Q = {}));
4852
- const pt = yt.create, uo = or.create, jg = no.create, Ut = so.create;
4852
+ const at = yt.create, uo = or.create, jg = no.create, Ut = so.create;
4853
4853
  Ft.create;
4854
- const Ln = at.create, sh = Ce.create, vn = pn.create;
4854
+ const Ln = ot.create, sh = Ce.create, vn = pn.create;
4855
4855
  yn.create;
4856
4856
  Wt.create;
4857
4857
  const Jo = gn.create, fo = ao.create, ho = cr.create;
@@ -4862,35 +4862,36 @@ const on = () => Ut().refine((r) => r && (r.seconds !== void 0 && r.nanoseconds
4862
4862
  message: "Value is not a valid timestamp"
4863
4863
  }), vf = () => Ut().refine((r) => r && (r._methodName === "serverTimestamp" || r.constructor.name === "ServerTimestampTransform"), {
4864
4864
  message: "Value is not a valid server timestamp"
4865
- }), ih = (r, e) => {
4866
- const t = {};
4865
+ }), ih = (r, e, t) => {
4866
+ const n = {};
4867
4867
  if (r.includeFields) {
4868
- const n = e.collections[r.collection];
4869
- if (!n)
4868
+ const i = e.collections[r.collection];
4869
+ if (!i)
4870
4870
  return Jo(Ut());
4871
- r.includeFields.forEach((s) => {
4872
- const i = n.fields.find((o) => o.name === s);
4873
- if (!i)
4874
- throw new Error(`Field ${s} not found in collection ${r.collection}`);
4875
- t[s] = wn(n, i), Zr(n, [i]).size === 1 && (t[`${s}_Lowercase`] = wn(n, i, !0));
4871
+ r.includeFields.forEach((a) => {
4872
+ const o = i.fields.find((l) => l.name === a);
4873
+ if (!o)
4874
+ throw new Error(`Field ${a} not found in collection ${r.collection}`);
4875
+ n[a] = wn(i, o), Zr(i, [o]).size === 1 && (n[`${a}_Lowercase`] = wn(i, o, !0));
4876
4876
  });
4877
4877
  }
4878
- return sh({
4879
- Collection_Path: Ln(pt()),
4880
- ...t
4881
- });
4878
+ const s = {
4879
+ Collection_Path: Ln(at()),
4880
+ ...n
4881
+ };
4882
+ return t && (s.id = at().length(20)), sh(s);
4882
4883
  }, Ug = (r, e) => {
4883
4884
  let t = Jo(ih(r, e));
4884
4885
  return r.required || (t = t.optional()), t;
4885
4886
  }, Vg = (r) => {
4886
- let e = Ln(vn([pt().length(20), pt().length(28)]));
4887
+ let e = Ln(vn([at().length(20), at().length(28)]));
4887
4888
  return ["OneToOne", "OneToMany"].includes(r.type) ? e = e.max(1) : (r.min && (e = e.min(r.min)), r.max && (e = e.max(r.max)), r.length && (e = e.length(r.length))), r.required ? e = e.nonempty() : e = e.optional(), e;
4888
4889
  }, wn = (r, e, t) => {
4889
4890
  const { softDelete: n } = r, s = n?.timestampField;
4890
4891
  let i;
4891
4892
  switch (e.type) {
4892
4893
  case "String":
4893
- if (i = pt(), e.length && (i = i.length(e.length)), e.minlength && (i = i.min(e.minlength)), e.maxlength && (i = i.max(e.maxlength)), e.email && (i = i.email()), e.uuid && (i = i.uuid()), e.url && (i = i.url()), e.emoji && (i = i.emoji()), e.ip && (i = i.ip()), e.pattern && (i = i.regex(new RegExp(e.pattern))), t && (i = i.toLowerCase()), e.values)
4894
+ if (i = at(), e.length && (i = i.length(e.length)), e.minlength && (i = i.min(e.minlength)), e.maxlength && (i = i.max(e.maxlength)), e.email && (i = i.email()), e.uuid && (i = i.uuid()), e.url && (i = i.url()), e.emoji && (i = i.emoji()), e.ip && (i = i.ip()), e.pattern && (i = i.regex(new RegExp(e.pattern))), t && (i = i.toLowerCase()), e.values)
4894
4895
  if (t) {
4895
4896
  const a = e.values.map((o) => o.toLowerCase());
4896
4897
  i = ho(a);
@@ -4936,21 +4937,21 @@ const on = () => Ut().refine((r) => r && (r.seconds !== void 0 && r.nanoseconds
4936
4937
  return !_e(e) && e.nullable && (i = i.nullable()), e.required || (i = i.optional()), i;
4937
4938
  }, Wg = (r, e, t) => {
4938
4939
  const n = {
4939
- Collection_Path: Ln(pt()),
4940
- Last_Write_App: pt(),
4940
+ Collection_Path: Ln(at()),
4941
+ Last_Write_App: at(),
4941
4942
  Last_Write_At: on(),
4942
4943
  Last_Save_At: vf(),
4943
- Last_Write_By: vn([pt().length(28), fo("System")]),
4944
+ Last_Write_By: vn([at().length(28), fo("System")]),
4944
4945
  Last_Write_Connection_Status: ho(["Online", "Offline"]),
4945
4946
  Last_Write_Version: uo().int(),
4946
- id: pt().regex(new RegExp("^[a-zA-Z0-9]+$")).length(20),
4947
+ id: at().regex(new RegExp("^[a-zA-Z0-9]+$")).length(20),
4947
4948
  Created_At: on(),
4948
- Created_By: vn([pt().length(28), fo("System")])
4949
+ Created_By: vn([at().length(28), fo("System")])
4949
4950
  };
4950
4951
  r === "create" && (n.Saved_At = vf()), r === "update" && (n.Saved_At = on(), n.Collection_Path = n.Collection_Path.optional(), n.id = n.id.optional(), n.Created_At = n.Created_At.optional(), n.Saved_At = n.Saved_At.optional(), n.Created_By = n.Created_By.optional());
4951
4952
  const s = Qd(e, e.fields), i = Array.from(s).map((c) => c.name);
4952
4953
  e.fields.forEach((c) => {
4953
- _e(c) ? (n[c.name] = Ug(c, t), n[`${c.name}_Array`] = Vg(c), i.includes(c.name) && (n[`${c.name}_Single`] = ih(c, t), c.required || (n[`${c.name}_Single`] = n[`${c.name}_Single`].optional())), c.length && (n[c.name] = n[c.name].refine((l) => c.length && l && Object.keys(l).length === c.length, {
4954
+ _e(c) ? (n[c.name] = Ug(c, t), n[`${c.name}_Array`] = Vg(c), i.includes(c.name) && (n[`${c.name}_Single`] = ih(c, t, !0), c.required || (n[`${c.name}_Single`] = n[`${c.name}_Single`].optional())), c.length && (n[c.name] = n[c.name].refine((l) => c.length && l && Object.keys(l).length === c.length, {
4954
4955
  message: `Value must contain ${c.length} item(s)`
4955
4956
  })), c.min && (n[c.name] = n[c.name].refine((l) => c.min && l && Object.keys(l).length >= c.min, {
4956
4957
  message: `Value must contain at least ${c.min} item(s)`
@@ -7013,7 +7014,7 @@ const qf = "Invalid Duration", Jh = {
7013
7014
  "seconds",
7014
7015
  "milliseconds"
7015
7016
  ], wv = Vt.slice(0).reverse();
7016
- function ft(r, e, t = !1) {
7017
+ function dt(r, e, t = !1) {
7017
7018
  const n = {
7018
7019
  values: t ? e.values : { ...r.values, ...e.values || {} },
7019
7020
  loc: r.loc.clone(e.loc),
@@ -7383,7 +7384,7 @@ class ue {
7383
7384
  const t = ue.fromDurationLike(e), n = {};
7384
7385
  for (const s of Vt)
7385
7386
  (fr(t.values, s) || fr(this.values, s)) && (n[s] = t.get(s) + this.get(s));
7386
- return ft(this, { values: n }, !0);
7387
+ return dt(this, { values: n }, !0);
7387
7388
  }
7388
7389
  /**
7389
7390
  * Make this Duration shorter by the specified amount. Return a newly-constructed Duration.
@@ -7407,7 +7408,7 @@ class ue {
7407
7408
  const t = {};
7408
7409
  for (const n of Object.keys(this.values))
7409
7410
  t[n] = qh(e(this.values[n], n));
7410
- return ft(this, { values: t }, !0);
7411
+ return dt(this, { values: t }, !0);
7411
7412
  }
7412
7413
  /**
7413
7414
  * Get the value of unit.
@@ -7430,7 +7431,7 @@ class ue {
7430
7431
  set(e) {
7431
7432
  if (!this.isValid) return this;
7432
7433
  const t = { ...this.values, ...Sn(e, ue.normalizeUnit) };
7433
- return ft(this, { values: t });
7434
+ return dt(this, { values: t });
7434
7435
  }
7435
7436
  /**
7436
7437
  * "Set" the locale and/or numberingSystem. Returns a newly-constructed Duration.
@@ -7439,7 +7440,7 @@ class ue {
7439
7440
  */
7440
7441
  reconfigure({ locale: e, numberingSystem: t, conversionAccuracy: n, matrix: s } = {}) {
7441
7442
  const a = { loc: this.loc.clone({ locale: e, numberingSystem: t }), matrix: s, conversionAccuracy: n };
7442
- return ft(this, a);
7443
+ return dt(this, a);
7443
7444
  }
7444
7445
  /**
7445
7446
  * Return the length of the duration in the specified unit.
@@ -7470,7 +7471,7 @@ class ue {
7470
7471
  normalize() {
7471
7472
  if (!this.isValid) return this;
7472
7473
  const e = this.toObject();
7473
- return Lf(this.matrix, e), ft(this, { values: e }, !0);
7474
+ return Lf(this.matrix, e), dt(this, { values: e }, !0);
7474
7475
  }
7475
7476
  /**
7476
7477
  * Rescale units to its largest representation
@@ -7480,7 +7481,7 @@ class ue {
7480
7481
  rescale() {
7481
7482
  if (!this.isValid) return this;
7482
7483
  const e = $f(this.normalize().shiftToAll().toObject());
7483
- return ft(this, { values: e }, !0);
7484
+ return dt(this, { values: e }, !0);
7484
7485
  }
7485
7486
  /**
7486
7487
  * Convert this Duration into its representation in a different set of units.
@@ -7506,7 +7507,7 @@ class ue {
7506
7507
  } else xt(s[a]) && (n[a] = s[a]);
7507
7508
  for (const a in n)
7508
7509
  n[a] !== 0 && (t[i] += a === i ? n[a] : n[a] / this.matrix[i][a]);
7509
- return Lf(this.matrix, t), ft(this, { values: t }, !0);
7510
+ return Lf(this.matrix, t), dt(this, { values: t }, !0);
7510
7511
  }
7511
7512
  /**
7512
7513
  * Shift this Duration to all available units.
@@ -7535,7 +7536,7 @@ class ue {
7535
7536
  const e = {};
7536
7537
  for (const t of Object.keys(this.values))
7537
7538
  e[t] = this.values[t] === 0 ? 0 : -this.values[t];
7538
- return ft(this, { values: e }, !0);
7539
+ return dt(this, { values: e }, !0);
7539
7540
  }
7540
7541
  /**
7541
7542
  * Removes all units with values equal to 0 from this Duration.
@@ -7545,7 +7546,7 @@ class ue {
7545
7546
  removeZeros() {
7546
7547
  if (!this.isValid) return this;
7547
7548
  const e = $f(this.values);
7548
- return ft(this, { values: e }, !0);
7549
+ return dt(this, { values: e }, !0);
7549
7550
  }
7550
7551
  /**
7551
7552
  * Get the years.
@@ -10715,9 +10716,9 @@ function nw() {
10715
10716
  hd = 1;
10716
10717
  var r = Mo(), e = Vv(), t = Zo(), n = Wv(), s = zv(), i = zd(), a = Zd(), o = Bv(), c = Zv(), l = jd(), u = Gv(), f = qn(), h = Hv(), d = Qv(), p = Gd(), E = Dt(), y = Mn(), _ = ew(), S = wt(), A = rw(), F = Vo(), m = Br(), T = 1, R = 2, v = 4, C = "[object Arguments]", g = "[object Array]", k = "[object Boolean]", I = "[object Date]", b = "[object Error]", w = "[object Function]", O = "[object GeneratorFunction]", x = "[object Map]", P = "[object Number]", M = "[object Object]", q = "[object RegExp]", z = "[object Set]", ee = "[object String]", oe = "[object Symbol]", D = "[object WeakMap]", te = "[object ArrayBuffer]", ne = "[object DataView]", Me = "[object Float32Array]", Se = "[object Float64Array]", Le = "[object Int8Array]", Ot = "[object Int16Array]", G = "[object Int32Array]", K = "[object Uint8Array]", j = "[object Uint8ClampedArray]", Y = "[object Uint16Array]", U = "[object Uint32Array]", Z = {};
10717
10718
  Z[C] = Z[g] = Z[te] = Z[ne] = Z[k] = Z[I] = Z[Me] = Z[Se] = Z[Le] = Z[Ot] = Z[G] = Z[x] = Z[P] = Z[M] = Z[q] = Z[z] = Z[ee] = Z[oe] = Z[K] = Z[j] = Z[Y] = Z[U] = !0, Z[b] = Z[w] = Z[D] = !1;
10718
- function Te(H, ge, se, Xe, ut, Be) {
10719
+ function Te(H, ge, se, Xe, ft, Be) {
10719
10720
  var xe, wr = ge & T, Re = ge & R, br = ge & v;
10720
- if (se && (xe = ut ? se(H, Xe, ut, Be) : se(H)), xe !== void 0)
10721
+ if (se && (xe = ft ? se(H, Xe, ft, Be) : se(H)), xe !== void 0)
10721
10722
  return xe;
10722
10723
  if (!S(H))
10723
10724
  return H;
@@ -10729,12 +10730,12 @@ function nw() {
10729
10730
  var Ht = f(H), vc = Ht == w || Ht == O;
10730
10731
  if (y(H))
10731
10732
  return i(H, wr);
10732
- if (Ht == M || Ht == C || vc && !ut) {
10733
+ if (Ht == M || Ht == C || vc && !ft) {
10733
10734
  if (xe = Re || vc ? {} : p(H), !wr)
10734
10735
  return Re ? c(H, s(xe, H)) : o(H, n(xe, H));
10735
10736
  } else {
10736
10737
  if (!Z[Ht])
10737
- return ut ? H : {};
10738
+ return ft ? H : {};
10738
10739
  xe = d(H, Ht, wr);
10739
10740
  }
10740
10741
  }
@@ -10854,7 +10855,7 @@ const we = /* @__PURE__ */ In(iw), Nt = (r) => {
10854
10855
  const n = We(), s = Mt(), i = Ve(), a = De(), o = r.at(-1);
10855
10856
  if (!o)
10856
10857
  throw new Error("EMPTY_PATH");
10857
- const c = i.collections[o], { labels: l, fields: u, preloadCache: f } = c, h = lt(o), d = a.collections?.[l.collection];
10858
+ const c = i.collections[o], { labels: l, fields: u, preloadCache: f } = c, h = ut(o), d = a.collections?.[l.collection];
10858
10859
  if (!a.Role)
10859
10860
  throw new Error("PERMISSION_DENIED");
10860
10861
  const p = d && vt("Read", d), E = kn(c, i, a), y = Rd(c, a), _ = xo(c, a), S = Cd(c, i, a), A = (w = []) => {
@@ -11067,7 +11068,7 @@ const we = /* @__PURE__ */ In(iw), Nt = (r) => {
11067
11068
  n.includes(s) || t.includes(s) || await sr(s, r?.[s].constraints, r?.[s].range, r?.[s].orQueries, r);
11068
11069
  return xr;
11069
11070
  }, To = () => fm, lw = () => xr, uw = async (r, e, t, n, s) => {
11070
- const { labels: i, preloadCache: a } = r, c = Jr()[i.collection], l = Ie(), u = lt(i.collection), f = De();
11071
+ const { labels: i, preloadCache: a } = r, c = Jr()[i.collection], l = Ie(), u = ut(i.collection), f = De();
11071
11072
  if (!f?.Role)
11072
11073
  throw new Error("PERMISSION_DENIED");
11073
11074
  if (!a?.roles.includes(f.Role))
@@ -11350,7 +11351,7 @@ const fw = async (r, e) => {
11350
11351
  const s = Ve(!0), a = Jr()[n], o = s.collections[n], { labels: c, access: l, preloadCache: u } = o, { serverReadOnly: f } = l, h = Ie(), d = Object.keys(s.collections).includes(n), p = h.disabledCollections?.includes(n);
11351
11352
  if (!d || p)
11352
11353
  throw new Error("COLLECTION_NOT_FOUND");
11353
- const E = await lt(c.collection), y = await ie(h, [
11354
+ const E = await ut(c.collection), y = await ie(h, [
11354
11355
  "global",
11355
11356
  "firebase",
11356
11357
  "serverTimestampOptions"
@@ -11527,7 +11528,7 @@ const fw = async (r, e) => {
11527
11528
  "global",
11528
11529
  "firebase",
11529
11530
  "serverTimestampOptions"
11530
- ]), f = s.collections[n], { labels: h, access: d } = f, { serverReadOnly: p } = d, E = lt(h.collection), y = De();
11531
+ ]), f = s.collections[n], { labels: h, access: d } = f, { serverReadOnly: p } = d, E = ut(h.collection), y = De();
11531
11532
  if (!y?.Role)
11532
11533
  throw new Error("PERMISSIONS_DENIED");
11533
11534
  if (p?.includes(y.Role))
@@ -11588,7 +11589,7 @@ const fw = async (r, e) => {
11588
11589
  const p = r.at(-1), E = Object.keys(o.collections).includes(p), y = u.disabledCollections?.includes(p);
11589
11590
  if (!E || y)
11590
11591
  throw new Error("COLLECTION_NOT_FOUND");
11591
- const _ = o.collections[p], { labels: S, access: A, fields: F, enableWriteLog: m } = _, { serverWriteOnly: T } = A, R = lt(S.collection), v = await ie(u, ["global", "appName"]), C = s?.retry, g = f.currentUser;
11592
+ const _ = o.collections[p], { labels: S, access: A, fields: F, enableWriteLog: m } = _, { serverWriteOnly: T } = A, R = ut(S.collection), v = await ie(u, ["global", "appName"]), C = s?.retry, g = f.currentUser;
11592
11593
  if (!g)
11593
11594
  throw new Error("NOT_AUTHENTICATED");
11594
11595
  if (!d)
@@ -11768,7 +11769,7 @@ const fw = async (r, e) => {
11768
11769
  const d = r.at(-1), p = Object.keys(o.collections).includes(d), E = l.disabledCollections?.includes(d);
11769
11770
  if (!p || E)
11770
11771
  throw new Error("COLLECTION_NOT_FOUND");
11771
- const y = o.collections[d], { labels: _, access: S, enableWriteLog: A, softDelete: F } = y, { serverWriteOnly: m } = S, T = lt(_.collection), R = await ie(l, ["global", "appName"]), v = n?.retry, C = u.currentUser;
11772
+ const y = o.collections[d], { labels: _, access: S, enableWriteLog: A, softDelete: F } = y, { serverWriteOnly: m } = S, T = ut(_.collection), R = await ie(l, ["global", "appName"]), v = n?.retry, C = u.currentUser;
11772
11773
  if (!C)
11773
11774
  throw new Error("NOT_AUTHENTICATED");
11774
11775
  if (!h)
@@ -11832,7 +11833,7 @@ const fw = async (r, e) => {
11832
11833
  const u = r.at(-1), f = Object.keys(s.collections).includes(u), h = c.disabledCollections?.includes(u);
11833
11834
  if (!f || h)
11834
11835
  throw new Error("COLLECTION_NOT_FOUND");
11835
- const d = s.collections[u], { labels: p, access: E, enableWriteLog: y, softDelete: _ } = d, { serverWriteOnly: S } = E, A = lt(p.collection), F = await ie(c, ["global", "appName"]), m = t?.retry, T = a.currentUser;
11836
+ const d = s.collections[u], { labels: p, access: E, enableWriteLog: y, softDelete: _ } = d, { serverWriteOnly: S } = E, A = ut(p.collection), F = await ie(c, ["global", "appName"]), m = t?.retry, T = a.currentUser;
11836
11837
  if (!T)
11837
11838
  throw new Error("NOT_AUTHENTICATED");
11838
11839
  if (!l)
@@ -11874,7 +11875,7 @@ const fw = async (r, e) => {
11874
11875
  const t = it(), n = ze(), s = Ue(t, n.STOKER_FB_FUNCTIONS_REGION);
11875
11876
  return (await Je(s, r)(e)).data;
11876
11877
  };
11877
- let mt = {};
11878
+ let pt = {};
11878
11879
  const bw = async (r, e) => {
11879
11880
  const t = dr(), n = gc(), s = t.currentUser;
11880
11881
  if (s?.uid !== e.uid)
@@ -11884,7 +11885,7 @@ const bw = async (r, e) => {
11884
11885
  const a = Om();
11885
11886
  if (a?.version)
11886
11887
  for (const o of i.docs) {
11887
- mt[o.id] ??= 0;
11888
+ pt[o.id] ??= 0;
11888
11889
  const c = o.data(), { data: l, operation: u, docId: f, collection: h, Collection_Path: d, Last_Write_Version: p } = c;
11889
11890
  await new Promise((_) => setTimeout(_, 1e3));
11890
11891
  const E = await ww("stoker-writelog", {
@@ -11914,25 +11915,25 @@ const bw = async (r, e) => {
11914
11915
  }
11915
11916
  const y = localStorage.getItem(`stoker-retry-${f}`);
11916
11917
  if (y !== "done" && !(y && Date.now() - parseInt(y) < 1e4)) {
11917
- if (localStorage.setItem(`stoker-retry-${f}`, Date.now().toString()), console.info(`Retrying pending ${u} operation: ${o.ref.path}`), u === "create" && (mt[f]++, await vm(d, l.data, void 0, {
11918
+ if (localStorage.setItem(`stoker-retry-${f}`, Date.now().toString()), console.info(`Retrying pending ${u} operation: ${o.ref.path}`), u === "create" && (pt[f]++, await vm(d, l.data, void 0, {
11918
11919
  retry: {
11919
11920
  type: "offline",
11920
11921
  docId: f
11921
11922
  }
11922
11923
  }).catch((_) => {
11923
11924
  console.error(_);
11924
- }), mt[f]--, localStorage.setItem(`stoker-retry-${f}`, "done")), u === "update") {
11925
+ }), pt[f]--, localStorage.setItem(`stoker-retry-${f}`, "done")), u === "update") {
11925
11926
  const _ = r.collections[h], { softDelete: S } = _;
11926
- S && l.data?.[S.archivedField] && l.data?.[S.archivedField] !== l.originalRecord?.[S.archivedField] && (l.data[S.timestampField] = Lr()), l.data && wm(l.data), mt[f]++, await fc(d, f, l.data, void 0, {
11927
+ S && l.data?.[S.archivedField] && l.data?.[S.archivedField] !== l.originalRecord?.[S.archivedField] && (l.data[S.timestampField] = Lr()), l.data && wm(l.data), pt[f]++, await fc(d, f, l.data, void 0, {
11927
11928
  retry: {
11928
11929
  type: "offline",
11929
11930
  originalRecord: l.originalRecord
11930
11931
  }
11931
11932
  }).catch((A) => {
11932
11933
  console.error(A);
11933
- }), mt[f]--, localStorage.setItem(`stoker-retry-${f}`, "done");
11934
+ }), pt[f]--, localStorage.setItem(`stoker-retry-${f}`, "done");
11934
11935
  }
11935
- u === "delete" && (mt[f]++, await vw(d, f, {
11936
+ u === "delete" && (pt[f]++, await vw(d, f, {
11936
11937
  retry: {
11937
11938
  type: "offline",
11938
11939
  record: {
@@ -11945,11 +11946,11 @@ const bw = async (r, e) => {
11945
11946
  }
11946
11947
  }).catch((_) => {
11947
11948
  console.error(_);
11948
- }), mt[f]--, localStorage.setItem(`stoker-retry-${f}`, "done"));
11949
+ }), pt[f]--, localStorage.setItem(`stoker-retry-${f}`, "done"));
11949
11950
  }
11950
11951
  }
11951
- }, bm = (r) => !!mt[r], Ow = () => {
11952
- mt = {};
11952
+ }, bm = (r) => !!pt[r], Ow = () => {
11953
+ pt = {};
11953
11954
  };
11954
11955
  let fn, Ka = 0;
11955
11956
  const Ew = async () => {
@@ -12006,10 +12007,10 @@ const Rw = () => {
12006
12007
  e(n);
12007
12008
  });
12008
12009
  };
12009
- let dt, hc, Tt, Sm, pe, Tm, Pr, mc, pc, $e, Rm, Rn = [], be;
12010
+ let ht, hc, Tt, Sm, pe, Tm, Pr, mc, pc, $e, Rm, Rn = [], be;
12010
12011
  const Ya = {
12011
12012
  firestoreWriteApp: {}
12012
- }, ht = {
12013
+ }, mt = {
12013
12014
  main: {},
12014
12015
  firestoreWrite: {}
12015
12016
  }, Ge = {
@@ -12038,7 +12039,7 @@ const Ya = {
12038
12039
  for (const t of Object.values(e.collections))
12039
12040
  for (const n of t.fields)
12040
12041
  if (n.type === "Computed") {
12041
- const s = Ty(n, lt(t.labels.collection));
12042
+ const s = Ty(n, ut(t.labels.collection));
12042
12043
  s.formula && (n.formula = s.formula);
12043
12044
  }
12044
12045
  } else
@@ -12072,7 +12073,7 @@ const Ya = {
12072
12073
  return At.firestoreWrite;
12073
12074
  },
12074
12075
  getFirestoreWriteAuth() {
12075
- return ht.firestoreWrite;
12076
+ return mt.firestoreWrite;
12076
12077
  },
12077
12078
  getFirestoreWrite() {
12078
12079
  return Ge.firestoreWrite;
@@ -12087,14 +12088,14 @@ const Ya = {
12087
12088
  };
12088
12089
  let gd = !1;
12089
12090
  const Gw = async (r, e, t, n) => {
12090
- if (be = t, dt)
12091
+ if (be = t, ht)
12091
12092
  return console.error("Stoker is already initialized."), !0;
12092
12093
  xm("stoker-client", pp, "web"), Tt = be.MODE, pe = r.default("web", Co, n), Sm = await ie(pe, ["global", "timezone"]), ie(pe, ["global", "roles"]), ie(pe, ["global", "appName"]), ie(pe, ["global", "auth", "enableMultiFactorAuth"]);
12093
12094
  const s = JSON.parse(be.STOKER_FB_WEB_APP_CONFIG), i = await ie(pe, ["global", "firebase", "GDPRSettings"]);
12094
- dt = zn(s, {
12095
+ ht = zn(s, {
12095
12096
  automaticDataCollectionEnabled: i || !0
12096
12097
  });
12097
- const a = dp(dt);
12098
+ const a = dp(ht);
12098
12099
  Tt === "development" && (a.instrumentationEnabled = !1, a.dataCollectionEnabled = !1);
12099
12100
  const o = ["firestoreWrite"];
12100
12101
  for (const g of o)
@@ -12108,7 +12109,7 @@ const Gw = async (r, e, t, n) => {
12108
12109
  provider: new fp(be.STOKER_FB_APP_CHECK_KEY),
12109
12110
  isTokenAutoRefreshEnabled: !0
12110
12111
  };
12111
- At.main = Gn(dt, g), At.firestoreWrite = Gn(c, g), At.maintenance = Gn(l, g);
12112
+ At.main = Gn(ht, g), At.firestoreWrite = Gn(c, g), At.maintenance = Gn(l, g);
12112
12113
  let k = !1;
12113
12114
  const I = (b, w) => {
12114
12115
  if (console.log(`App Check token error detected for ${w}`), !k)
@@ -12153,7 +12154,7 @@ const Gw = async (r, e, t, n) => {
12153
12154
  ]), S = await Fm().catch((g) => {
12154
12155
  throw new Error("Error checking analytics support.", { cause: g });
12155
12156
  });
12156
- Tt === "production" && f && S && Dm(dt, h || {}), d && Mm(d);
12157
+ Tt === "production" && f && S && Dm(ht, h || {}), d && Mm(d);
12157
12158
  const A = await ie(pe, [
12158
12159
  "global",
12159
12160
  "auth",
@@ -12162,10 +12163,10 @@ const Gw = async (r, e, t, n) => {
12162
12163
  popupRedirectResolver: void 0,
12163
12164
  persistence: A === "LOCAL" ? [Pm, qm, Ec] : A === "SESSION" ? [Ec, Sc] : [Sc]
12164
12165
  };
12165
- ht.main = Oc(dt, m);
12166
+ mt.main = Oc(ht, m);
12166
12167
  for (const g of o)
12167
- ht[g] = Oc(Ya[`${g}App`], m);
12168
- const { main: T } = ht;
12168
+ mt[g] = Oc(Ya[`${g}App`], m);
12169
+ const { main: T } = mt;
12169
12170
  Lm(T, async (g) => {
12170
12171
  if (g && await ve(pe.preLogin, [g]) === !1)
12171
12172
  throw new Error("Operation cancelled by preLogin");
@@ -12178,7 +12179,7 @@ const Gw = async (r, e, t, n) => {
12178
12179
  if (Tt === "development" && p) {
12179
12180
  if (!R?.includes("Auth")) {
12180
12181
  const g = be.STOKER_FB_EMULATOR_AUTH_PORT ? parseInt(be.STOKER_FB_EMULATOR_AUTH_PORT) : 9099;
12181
- for (const k of Object.values(ht))
12182
+ for (const k of Object.values(mt))
12182
12183
  $m(k, `http://localhost:${g}`);
12183
12184
  }
12184
12185
  if (!R?.includes("Database")) {
@@ -12195,7 +12196,7 @@ const Gw = async (r, e, t, n) => {
12195
12196
  }
12196
12197
  if (!R?.includes("Functions")) {
12197
12198
  const g = be.STOKER_FB_EMULATOR_FUNCTIONS_PORT ? parseInt(be.STOKER_FB_EMULATOR_FUNCTIONS_PORT) : 5001;
12198
- up(Ue(dt, be.STOKER_FB_FUNCTIONS_REGION), "localhost", g);
12199
+ up(Ue(ht, be.STOKER_FB_FUNCTIONS_REGION), "localhost", g);
12199
12200
  }
12200
12201
  }
12201
12202
  if (Ew(), Sw(), Rw(), Tt === "development" && (y ? Qr(y) : Qr("debug")), Tt === "production" && (_ ? Qr(_) : Qr("error")), E) {
@@ -12209,11 +12210,11 @@ const Gw = async (r, e, t, n) => {
12209
12210
  });
12210
12211
  Rn.push(g);
12211
12212
  }
12212
- await Promise.all(Object.values(ht).map((g) => g.authStateReady().catch((k) => {
12213
+ await Promise.all(Object.values(mt).map((g) => g.authStateReady().catch((k) => {
12213
12214
  throw new Error(`Error waiting for auth state in ${g.app.name}.`, { cause: k });
12214
12215
  })));
12215
12216
  let v = !1;
12216
- for (const g of Object.values(ht))
12217
+ for (const g of Object.values(mt))
12217
12218
  g.currentUser || (v = !0);
12218
12219
  let C;
12219
12220
  return Bn(T, async (g) => {
@@ -12227,7 +12228,7 @@ const Gw = async (r, e, t, n) => {
12227
12228
  }
12228
12229
  };
12229
12230
  const b = [];
12230
- for (const Se of Object.values(ht))
12231
+ for (const Se of Object.values(mt))
12231
12232
  b.push(new Promise((Le) => {
12232
12233
  const Ot = Bn(Se, async (G) => {
12233
12234
  G && (Ot(), Le({}));
@@ -12252,7 +12253,7 @@ const Gw = async (r, e, t, n) => {
12252
12253
  localCache: tp({
12253
12254
  garbageCollector: ee
12254
12255
  })
12255
- }, Ge.main = Zn(dt, M), ["ALL", "WRITE"].includes(C) ? Ge.firestoreWrite = Zn(c, z) : Ge.firestoreWrite = Zn(c, M), Tt === "development" && p && !R?.includes("Firestore")) {
12256
+ }, Ge.main = Zn(ht, M), ["ALL", "WRITE"].includes(C) ? Ge.firestoreWrite = Zn(c, z) : Ge.firestoreWrite = Zn(c, M), Tt === "development" && p && !R?.includes("Firestore")) {
12256
12257
  const Se = be.STOKER_FB_EMULATOR_FIRESTORE_PORT ? parseInt(be.STOKER_FB_EMULATOR_FIRESTORE_PORT) : 8080;
12257
12258
  for (const [Le, Ot] of Object.entries(Ge))
12258
12259
  Le !== "maintenance" && Cc(Ot, "localhost", Se);
@@ -12261,7 +12262,7 @@ const Gw = async (r, e, t, n) => {
12261
12262
  const Se = rp(Ge.main);
12262
12263
  Se && np(Se);
12263
12264
  }
12264
- const D = await Je(Ue(dt, be.STOKER_FB_FUNCTIONS_REGION), "stoker-schema")().catch((Se) => {
12265
+ const D = await Je(Ue(ht, be.STOKER_FB_FUNCTIONS_REGION), "stoker-schema")().catch((Se) => {
12265
12266
  throw new Error("Error fetching schema.", { cause: Se });
12266
12267
  });
12267
12268
  Pr = D.data.schema;
@@ -12278,7 +12279,7 @@ const Gw = async (r, e, t, n) => {
12278
12279
  const I = new Event("stoker:signOut");
12279
12280
  document.dispatchEvent(I);
12280
12281
  const b = { error: !1, instances: [] };
12281
- await Promise.all(Object.values(ht).map(async (O) => {
12282
+ await Promise.all(Object.values(mt).map(async (O) => {
12282
12283
  O.currentUser && await vd(O).catch((x) => {
12283
12284
  b.error = !0, b.instances.push({
12284
12285
  instance: O.app.name,
@@ -12305,7 +12306,7 @@ const Gw = async (r, e, t, n) => {
12305
12306
  })), b.error ? console.info("Sign out operation completed with errors.") : console.info("Sign out operation completed successfully."), await ve(pe.postLogout, [b]);
12306
12307
  }
12307
12308
  }), v ? !1 : T.currentUser ? (E && console.info(`${T.currentUser.uid} successfully logged in.`), !0) : !1;
12308
- }, { getTenant: Mt, getEnv: ze, getTimezone: Cm, getSchema: Ve, getCurrentUser: Hw, getCurrentUserRoleGroups: Jr, getAllRoleGroups: yc, getGlobalConfigModule: Ie, getCollectionConfigModule: lt, getAppCheck: Kw, getAppCheckFirestoreWrite: Yw, getFirestoreWriteAuth: Nw, getFirestoreWrite: gc, getFirestoreMaintenance: Am } = Co, Jw = async (r, e, t) => {
12309
+ }, { getTenant: Mt, getEnv: ze, getTimezone: Cm, getSchema: Ve, getCurrentUser: Hw, getCurrentUserRoleGroups: Jr, getAllRoleGroups: yc, getGlobalConfigModule: Ie, getCollectionConfigModule: ut, getAppCheck: Kw, getAppCheckFirestoreWrite: Yw, getFirestoreWriteAuth: Nw, getFirestoreWrite: gc, getFirestoreMaintenance: Am } = Co, Jw = async (r, e, t) => {
12309
12310
  const [n, s] = [dr(), Nw()], i = Ie();
12310
12311
  if (!r || !e)
12311
12312
  throw new Error("Email and password are required.");
@@ -12398,7 +12399,7 @@ const Gw = async (r, e, t, n) => {
12398
12399
  const { labels: h, preloadCache: d } = f, p = Ie(), E = Object.keys(o.collections).includes(i), y = p.disabledCollections?.includes(i);
12399
12400
  if (!E || y)
12400
12401
  throw new Error("COLLECTION_NOT_FOUND");
12401
- const _ = lt(h.collection), S = await ie(p, [
12402
+ const _ = ut(h.collection), S = await ie(p, [
12402
12403
  "global",
12403
12404
  "firebase",
12404
12405
  "serverTimestampOptions"
@@ -12597,7 +12598,7 @@ const Gw = async (r, e, t, n) => {
12597
12598
  const o = Ve(!0), l = Jr()[i], u = We(), f = o.collections[i], { labels: h, preloadCache: d, access: p } = f, { serverReadOnly: E } = p, y = Ie(), _ = Object.keys(o.collections).includes(i), S = y.disabledCollections?.includes(i);
12598
12599
  if (!_ || S)
12599
12600
  throw new Error("COLLECTION_NOT_FOUND");
12600
- const A = lt(h.collection), F = await ie(y, [
12601
+ const A = ut(h.collection), F = await ie(y, [
12601
12602
  "global",
12602
12603
  "firebase",
12603
12604
  "serverTimestampOptions"
@@ -12718,12 +12719,12 @@ const Gw = async (r, e, t, n) => {
12718
12719
  continue;
12719
12720
  for (const [se, Xe] of Object.entries(ge))
12720
12721
  if (Te.has(se)) {
12721
- const ut = async () => {
12722
- ge[se].id ? (Z.set(se, !0), Array.from(Z.values()).every((Be) => Be) && w.set(j, "loaded")) : setTimeout(ut, 100);
12722
+ const ft = async () => {
12723
+ ge[se].id ? (Z.set(se, !0), Array.from(Z.values()).every((Be) => Be) && w.set(j, "loaded")) : setTimeout(ft, 100);
12723
12724
  };
12724
- ut();
12725
+ ft();
12725
12726
  } else {
12726
- const ut = o.collections[H.collection], { access: Be } = ut, { serverReadOnly: xe } = Be;
12727
+ const ft = o.collections[H.collection], { access: Be } = ft, { serverReadOnly: xe } = Be;
12727
12728
  xe?.includes(a.Role) ? vr([...Xe.Collection_Path], se).then((Re) => {
12728
12729
  if (!Re) {
12729
12730
  delete ge[se];
@@ -12899,7 +12900,7 @@ export {
12899
12900
  Kw as getAppCheck,
12900
12901
  Yw as getAppCheckFirestoreWrite,
12901
12902
  ie as getCachedConfigValue,
12902
- lt as getCollectionConfigModule,
12903
+ ut as getCollectionConfigModule,
12903
12904
  oc as getCollectionRefs,
12904
12905
  zt as getConnectionStatus,
12905
12906
  Hw as getCurrentUser,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stoker-platform/web-client",
3
- "version": "0.5.37",
3
+ "version": "0.5.38",
4
4
  "type": "module",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "files": [
@@ -25,7 +25,7 @@
25
25
  },
26
26
  "dependencies": {
27
27
  "@stoker-platform/types": "0.5.27",
28
- "@stoker-platform/utils": "0.5.33",
28
+ "@stoker-platform/utils": "0.5.34",
29
29
  "@types/lodash": "^4.17.24",
30
30
  "@types/luxon": "^3.7.1",
31
31
  "firebase": "^12.11.0",