backflow-ui-renderer 0.1.39 → 0.1.40

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -8408,21 +8408,21 @@ function FB(e, t, n) {
8408
8408
  return isNaN(ct) ? 0 : ct;
8409
8409
  }, E = (it) => {
8410
8410
  if (!it) return "Earlier";
8411
- const at = new Date(it), ct = /* @__PURE__ */ new Date(), mt = (Et) => `${Et.getFullYear()}-${Et.getMonth()}-${Et.getDate()}`;
8412
- if (mt(at) === mt(ct)) return "Today";
8411
+ const at = new Date(it), ct = /* @__PURE__ */ new Date(), gt = (Et) => `${Et.getFullYear()}-${Et.getMonth()}-${Et.getDate()}`;
8412
+ if (gt(at) === gt(ct)) return "Today";
8413
8413
  const yt = new Date(ct);
8414
- return yt.setDate(ct.getDate() - 1), mt(at) === mt(yt) ? "Yesterday" : at.toLocaleDateString();
8414
+ return yt.setDate(ct.getDate() - 1), gt(at) === gt(yt) ? "Yesterday" : at.toLocaleDateString();
8415
8415
  }, T = ((J = t.sort) == null ? void 0 : J.field) || S ? [...f].sort((it, at) => {
8416
- var mt;
8416
+ var gt;
8417
8417
  const ct = A(at) - A(it);
8418
- return ((mt = t.sort) == null ? void 0 : mt.direction) === "asc" ? -ct : ct;
8418
+ return ((gt = t.sort) == null ? void 0 : gt.direction) === "asc" ? -ct : ct;
8419
8419
  }) : f, C = String(e.sceneData.recordingSearchApplied || "").trim().toLowerCase(), [N, R] = String(
8420
8420
  e.sceneData.recordingDateFilterApplied || ""
8421
8421
  ).split("|"), V = N ? Date.parse(`${N}T00:00:00`) : 0, j = R ? Date.parse(`${R}T23:59:59.999`) : Number.POSITIVE_INFINITY, D = (lt = t.itemsFilter) != null && lt.eq ? e.interpolateText(String(t.itemsFilter.eq)) : "", H = ((q = t.itemsFilter) != null && q.field && D ? T.filter(
8422
8422
  (it) => String(it == null ? void 0 : it[t.itemsFilter.field]) === D
8423
8423
  ) : T).filter((it) => {
8424
8424
  const at = !C || [it.url, it.title, it.prompt].some(
8425
- (mt) => String(mt || "").toLowerCase().includes(C)
8425
+ (gt) => String(gt || "").toLowerCase().includes(C)
8426
8426
  ), ct = A(it);
8427
8427
  return at && ct >= V && ct <= j;
8428
8428
  }), z = {};
@@ -8430,7 +8430,7 @@ function FB(e, t, n) {
8430
8430
  for (const it of H)
8431
8431
  (z[nt = E(A(it))] || (z[nt] = [])).push(it);
8432
8432
  const Y = (it, at) => {
8433
- var ct, mt, yt, Et, Tt, ht, ft, Ot;
8433
+ var ct, gt, yt, Et, Tt, ht, ft, Ot;
8434
8434
  if (t.renderItem) {
8435
8435
  const rt = JSON.parse(JSON.stringify(t.renderItem)), Lt = { ...it };
8436
8436
  if (t.labelField && t.labelMap) {
@@ -8588,7 +8588,7 @@ function FB(e, t, n) {
8588
8588
  width: "100%",
8589
8589
  textAlign: "left",
8590
8590
  padding: "1rem 2rem",
8591
- border: `1px solid ${Jt ? ((mt = t.selectionStyle) == null ? void 0 : mt.selectedBorderColor) || e.cfg.colors.accent || "#fff" : ((yt = t.selectionStyle) == null ? void 0 : yt.borderColor) || e.cfg.colors.border}`,
8591
+ border: `1px solid ${Jt ? ((gt = t.selectionStyle) == null ? void 0 : gt.selectedBorderColor) || e.cfg.colors.accent || "#fff" : ((yt = t.selectionStyle) == null ? void 0 : yt.borderColor) || e.cfg.colors.border}`,
8592
8592
  borderRadius: ((Et = t.selectionStyle) == null ? void 0 : Et.borderRadius) || e.cfg.components.inputRadius || "8px",
8593
8593
  marginBottom: "0.5rem",
8594
8594
  backgroundColor: Jt ? ((Tt = t.selectionStyle) == null ? void 0 : Tt.selectedBackgroundColor) || e.cfg.colors.surface : "transparent",
@@ -8880,12 +8880,12 @@ function WB({
8880
8880
  }
8881
8881
  },
8882
8882
  (Array.isArray(H.fieldOptions) ? H.fieldOptions : []).map(
8883
- (ct, mt) => {
8883
+ (ct, gt) => {
8884
8884
  const yt = at.includes(ct.value);
8885
8885
  return U(
8886
8886
  "label",
8887
8887
  {
8888
- key: mt,
8888
+ key: gt,
8889
8889
  style: {
8890
8890
  display: "flex",
8891
8891
  alignItems: "center",
@@ -16401,7 +16401,7 @@ function U4() {
16401
16401
  function ct(bt) {
16402
16402
  return typeof bt == "object" && bt !== null && bt.$$typeof === e;
16403
16403
  }
16404
- function mt(bt) {
16404
+ function gt(bt) {
16405
16405
  return x(bt) === c;
16406
16406
  }
16407
16407
  function yt(bt) {
@@ -16428,7 +16428,7 @@ function U4() {
16428
16428
  function Lt(bt) {
16429
16429
  return x(bt) === u;
16430
16430
  }
16431
- xe.ContextConsumer = T, xe.ContextProvider = C, xe.Element = N, xe.ForwardRef = R, xe.Fragment = V, xe.Lazy = j, xe.Memo = D, xe.Portal = K, xe.Profiler = H, xe.StrictMode = z, xe.Suspense = Y, xe.SuspenseList = G, xe.isAsyncMode = q, xe.isConcurrentMode = nt, xe.isContextConsumer = it, xe.isContextProvider = at, xe.isElement = ct, xe.isForwardRef = mt, xe.isFragment = yt, xe.isLazy = Et, xe.isMemo = Tt, xe.isPortal = ht, xe.isProfiler = ft, xe.isStrictMode = Ot, xe.isSuspense = rt, xe.isSuspenseList = Lt, xe.isValidElementType = E, xe.typeOf = x;
16431
+ xe.ContextConsumer = T, xe.ContextProvider = C, xe.Element = N, xe.ForwardRef = R, xe.Fragment = V, xe.Lazy = j, xe.Memo = D, xe.Portal = K, xe.Profiler = H, xe.StrictMode = z, xe.Suspense = Y, xe.SuspenseList = G, xe.isAsyncMode = q, xe.isConcurrentMode = nt, xe.isContextConsumer = it, xe.isContextProvider = at, xe.isElement = ct, xe.isForwardRef = gt, xe.isFragment = yt, xe.isLazy = Et, xe.isMemo = Tt, xe.isPortal = ht, xe.isProfiler = ft, xe.isStrictMode = Ot, xe.isSuspense = rt, xe.isSuspenseList = Lt, xe.isValidElementType = E, xe.typeOf = x;
16432
16432
  }()), xe;
16433
16433
  }
16434
16434
  process.env.NODE_ENV === "production" ? Ny.exports = V4() : Ny.exports = U4();
@@ -21963,7 +21963,7 @@ function LX(e) {
21963
21963
  }, E = {
21964
21964
  a: at,
21965
21965
  A: ct,
21966
- b: mt,
21966
+ b: gt,
21967
21967
  B: yt,
21968
21968
  c: null,
21969
21969
  d: sP,
@@ -22112,7 +22112,7 @@ function LX(e) {
22112
22112
  function ct(ht) {
22113
22113
  return o[ht.getUTCDay()];
22114
22114
  }
22115
- function mt(ht) {
22115
+ function gt(ht) {
22116
22116
  return c[ht.getUTCMonth()];
22117
22117
  }
22118
22118
  function yt(ht) {
@@ -25394,7 +25394,7 @@ function zet() {
25394
25394
  function ct(rt) {
25395
25395
  return E(rt) === u;
25396
25396
  }
25397
- function mt(rt) {
25397
+ function gt(rt) {
25398
25398
  return E(rt) === r;
25399
25399
  }
25400
25400
  function yt(rt) {
@@ -25415,7 +25415,7 @@ function zet() {
25415
25415
  function Ot(rt) {
25416
25416
  return E(rt) === f;
25417
25417
  }
25418
- _e.AsyncMode = x, _e.ConcurrentMode = T, _e.ContextConsumer = C, _e.ContextProvider = N, _e.Element = R, _e.ForwardRef = V, _e.Fragment = j, _e.Lazy = D, _e.Memo = K, _e.Portal = H, _e.Profiler = z, _e.StrictMode = Y, _e.Suspense = G, _e.isAsyncMode = lt, _e.isConcurrentMode = q, _e.isContextConsumer = nt, _e.isContextProvider = it, _e.isElement = at, _e.isForwardRef = ct, _e.isFragment = mt, _e.isLazy = yt, _e.isMemo = Et, _e.isPortal = Tt, _e.isProfiler = ht, _e.isStrictMode = ft, _e.isSuspense = Ot, _e.isValidElementType = A, _e.typeOf = E;
25418
+ _e.AsyncMode = x, _e.ConcurrentMode = T, _e.ContextConsumer = C, _e.ContextProvider = N, _e.Element = R, _e.ForwardRef = V, _e.Fragment = j, _e.Lazy = D, _e.Memo = K, _e.Portal = H, _e.Profiler = z, _e.StrictMode = Y, _e.Suspense = G, _e.isAsyncMode = lt, _e.isConcurrentMode = q, _e.isContextConsumer = nt, _e.isContextProvider = it, _e.isElement = at, _e.isForwardRef = ct, _e.isFragment = gt, _e.isLazy = yt, _e.isMemo = Et, _e.isPortal = Tt, _e.isProfiler = ht, _e.isStrictMode = ft, _e.isSuspense = Ot, _e.isValidElementType = A, _e.typeOf = E;
25419
25419
  }()), _e;
25420
25420
  }
25421
25421
  var DP;
@@ -25588,7 +25588,7 @@ function Vet() {
25588
25588
  function v(q) {
25589
25589
  if (process.env.NODE_ENV !== "production")
25590
25590
  var nt = {}, it = 0;
25591
- function at(mt, yt, Et, Tt, ht, ft, Ot) {
25591
+ function at(gt, yt, Et, Tt, ht, ft, Ot) {
25592
25592
  if (Tt = Tt || m, ft = ft || Et, Ot !== n) {
25593
25593
  if (c) {
25594
25594
  var rt = new Error(
@@ -25603,18 +25603,18 @@ function Vet() {
25603
25603
  ), nt[Lt] = !0, it++);
25604
25604
  }
25605
25605
  }
25606
- return yt[Et] == null ? mt ? yt[Et] === null ? new p("The " + ht + " `" + ft + "` is marked as required " + ("in `" + Tt + "`, but its value is `null`.")) : new p("The " + ht + " `" + ft + "` is marked as required in " + ("`" + Tt + "`, but its value is `undefined`.")) : null : q(yt, Et, Tt, ht, ft);
25606
+ return yt[Et] == null ? gt ? yt[Et] === null ? new p("The " + ht + " `" + ft + "` is marked as required " + ("in `" + Tt + "`, but its value is `null`.")) : new p("The " + ht + " `" + ft + "` is marked as required in " + ("`" + Tt + "`, but its value is `undefined`.")) : null : q(yt, Et, Tt, ht, ft);
25607
25607
  }
25608
25608
  var ct = at.bind(null, !1);
25609
25609
  return ct.isRequired = at.bind(null, !0), ct;
25610
25610
  }
25611
25611
  function P(q) {
25612
- function nt(it, at, ct, mt, yt, Et) {
25612
+ function nt(it, at, ct, gt, yt, Et) {
25613
25613
  var Tt = it[at], ht = Y(Tt);
25614
25614
  if (ht !== q) {
25615
25615
  var ft = G(Tt);
25616
25616
  return new p(
25617
- "Invalid " + mt + " `" + yt + "` of type " + ("`" + ft + "` supplied to `" + ct + "`, expected ") + ("`" + q + "`."),
25617
+ "Invalid " + gt + " `" + yt + "` of type " + ("`" + ft + "` supplied to `" + ct + "`, expected ") + ("`" + q + "`."),
25618
25618
  { expectedType: q }
25619
25619
  );
25620
25620
  }
@@ -25626,16 +25626,16 @@ function Vet() {
25626
25626
  return v(s);
25627
25627
  }
25628
25628
  function A(q) {
25629
- function nt(it, at, ct, mt, yt) {
25629
+ function nt(it, at, ct, gt, yt) {
25630
25630
  if (typeof q != "function")
25631
25631
  return new p("Property `" + yt + "` of component `" + ct + "` has invalid PropType notation inside arrayOf.");
25632
25632
  var Et = it[at];
25633
25633
  if (!Array.isArray(Et)) {
25634
25634
  var Tt = Y(Et);
25635
- return new p("Invalid " + mt + " `" + yt + "` of type " + ("`" + Tt + "` supplied to `" + ct + "`, expected an array."));
25635
+ return new p("Invalid " + gt + " `" + yt + "` of type " + ("`" + Tt + "` supplied to `" + ct + "`, expected an array."));
25636
25636
  }
25637
25637
  for (var ht = 0; ht < Et.length; ht++) {
25638
- var ft = q(Et, ht, ct, mt, yt + "[" + ht + "]", n);
25638
+ var ft = q(Et, ht, ct, gt, yt + "[" + ht + "]", n);
25639
25639
  if (ft instanceof Error)
25640
25640
  return ft;
25641
25641
  }
@@ -25644,32 +25644,32 @@ function Vet() {
25644
25644
  return v(nt);
25645
25645
  }
25646
25646
  function E() {
25647
- function q(nt, it, at, ct, mt) {
25647
+ function q(nt, it, at, ct, gt) {
25648
25648
  var yt = nt[it];
25649
25649
  if (!l(yt)) {
25650
25650
  var Et = Y(yt);
25651
- return new p("Invalid " + ct + " `" + mt + "` of type " + ("`" + Et + "` supplied to `" + at + "`, expected a single ReactElement."));
25651
+ return new p("Invalid " + ct + " `" + gt + "` of type " + ("`" + Et + "` supplied to `" + at + "`, expected a single ReactElement."));
25652
25652
  }
25653
25653
  return null;
25654
25654
  }
25655
25655
  return v(q);
25656
25656
  }
25657
25657
  function x() {
25658
- function q(nt, it, at, ct, mt) {
25658
+ function q(nt, it, at, ct, gt) {
25659
25659
  var yt = nt[it];
25660
25660
  if (!e.isValidElementType(yt)) {
25661
25661
  var Et = Y(yt);
25662
- return new p("Invalid " + ct + " `" + mt + "` of type " + ("`" + Et + "` supplied to `" + at + "`, expected a single ReactElement type."));
25662
+ return new p("Invalid " + ct + " `" + gt + "` of type " + ("`" + Et + "` supplied to `" + at + "`, expected a single ReactElement type."));
25663
25663
  }
25664
25664
  return null;
25665
25665
  }
25666
25666
  return v(q);
25667
25667
  }
25668
25668
  function T(q) {
25669
- function nt(it, at, ct, mt, yt) {
25669
+ function nt(it, at, ct, gt, yt) {
25670
25670
  if (!(it[at] instanceof q)) {
25671
25671
  var Et = q.name || m, Tt = lt(it[at]);
25672
- return new p("Invalid " + mt + " `" + yt + "` of type " + ("`" + Tt + "` supplied to `" + ct + "`, expected ") + ("instance of `" + Et + "`."));
25672
+ return new p("Invalid " + gt + " `" + yt + "` of type " + ("`" + Tt + "` supplied to `" + ct + "`, expected ") + ("instance of `" + Et + "`."));
25673
25673
  }
25674
25674
  return null;
25675
25675
  }
@@ -25680,7 +25680,7 @@ function Vet() {
25680
25680
  return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? o(
25681
25681
  "Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."
25682
25682
  ) : o("Invalid argument supplied to oneOf, expected an array.")), s;
25683
- function nt(it, at, ct, mt, yt) {
25683
+ function nt(it, at, ct, gt, yt) {
25684
25684
  for (var Et = it[at], Tt = 0; Tt < q.length; Tt++)
25685
25685
  if (b(Et, q[Tt]))
25686
25686
  return null;
@@ -25688,20 +25688,20 @@ function Vet() {
25688
25688
  var Lt = G(rt);
25689
25689
  return Lt === "symbol" ? String(rt) : rt;
25690
25690
  });
25691
- return new p("Invalid " + mt + " `" + yt + "` of value `" + String(Et) + "` " + ("supplied to `" + ct + "`, expected one of " + ht + "."));
25691
+ return new p("Invalid " + gt + " `" + yt + "` of value `" + String(Et) + "` " + ("supplied to `" + ct + "`, expected one of " + ht + "."));
25692
25692
  }
25693
25693
  return v(nt);
25694
25694
  }
25695
25695
  function N(q) {
25696
- function nt(it, at, ct, mt, yt) {
25696
+ function nt(it, at, ct, gt, yt) {
25697
25697
  if (typeof q != "function")
25698
25698
  return new p("Property `" + yt + "` of component `" + ct + "` has invalid PropType notation inside objectOf.");
25699
25699
  var Et = it[at], Tt = Y(Et);
25700
25700
  if (Tt !== "object")
25701
- return new p("Invalid " + mt + " `" + yt + "` of type " + ("`" + Tt + "` supplied to `" + ct + "`, expected an object."));
25701
+ return new p("Invalid " + gt + " `" + yt + "` of type " + ("`" + Tt + "` supplied to `" + ct + "`, expected an object."));
25702
25702
  for (var ht in Et)
25703
25703
  if (r(Et, ht)) {
25704
- var ft = q(Et, ht, ct, mt, yt + "." + ht, n);
25704
+ var ft = q(Et, ht, ct, gt, yt + "." + ht, n);
25705
25705
  if (ft instanceof Error)
25706
25706
  return ft;
25707
25707
  }
@@ -25719,9 +25719,9 @@ function Vet() {
25719
25719
  "Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + J(it) + " at index " + nt + "."
25720
25720
  ), s;
25721
25721
  }
25722
- function at(ct, mt, yt, Et, Tt) {
25722
+ function at(ct, gt, yt, Et, Tt) {
25723
25723
  for (var ht = [], ft = 0; ft < q.length; ft++) {
25724
- var Ot = q[ft], rt = Ot(ct, mt, yt, Et, Tt, n);
25724
+ var Ot = q[ft], rt = Ot(ct, gt, yt, Et, Tt, n);
25725
25725
  if (rt == null)
25726
25726
  return null;
25727
25727
  rt.data && r(rt.data, "expectedType") && ht.push(rt.data.expectedType);
@@ -25732,8 +25732,8 @@ function Vet() {
25732
25732
  return v(at);
25733
25733
  }
25734
25734
  function V() {
25735
- function q(nt, it, at, ct, mt) {
25736
- return H(nt[it]) ? null : new p("Invalid " + ct + " `" + mt + "` supplied to " + ("`" + at + "`, expected a ReactNode."));
25735
+ function q(nt, it, at, ct, gt) {
25736
+ return H(nt[it]) ? null : new p("Invalid " + ct + " `" + gt + "` supplied to " + ("`" + at + "`, expected a ReactNode."));
25737
25737
  }
25738
25738
  return v(q);
25739
25739
  }
@@ -25743,15 +25743,15 @@ function Vet() {
25743
25743
  );
25744
25744
  }
25745
25745
  function D(q) {
25746
- function nt(it, at, ct, mt, yt) {
25746
+ function nt(it, at, ct, gt, yt) {
25747
25747
  var Et = it[at], Tt = Y(Et);
25748
25748
  if (Tt !== "object")
25749
- return new p("Invalid " + mt + " `" + yt + "` of type `" + Tt + "` " + ("supplied to `" + ct + "`, expected `object`."));
25749
+ return new p("Invalid " + gt + " `" + yt + "` of type `" + Tt + "` " + ("supplied to `" + ct + "`, expected `object`."));
25750
25750
  for (var ht in q) {
25751
25751
  var ft = q[ht];
25752
25752
  if (typeof ft != "function")
25753
- return j(ct, mt, yt, ht, G(ft));
25754
- var Ot = ft(Et, ht, ct, mt, yt + "." + ht, n);
25753
+ return j(ct, gt, yt, ht, G(ft));
25754
+ var Ot = ft(Et, ht, ct, gt, yt + "." + ht, n);
25755
25755
  if (Ot)
25756
25756
  return Ot;
25757
25757
  }
@@ -25760,21 +25760,21 @@ function Vet() {
25760
25760
  return v(nt);
25761
25761
  }
25762
25762
  function K(q) {
25763
- function nt(it, at, ct, mt, yt) {
25763
+ function nt(it, at, ct, gt, yt) {
25764
25764
  var Et = it[at], Tt = Y(Et);
25765
25765
  if (Tt !== "object")
25766
- return new p("Invalid " + mt + " `" + yt + "` of type `" + Tt + "` " + ("supplied to `" + ct + "`, expected `object`."));
25766
+ return new p("Invalid " + gt + " `" + yt + "` of type `" + Tt + "` " + ("supplied to `" + ct + "`, expected `object`."));
25767
25767
  var ht = t({}, it[at], q);
25768
25768
  for (var ft in ht) {
25769
25769
  var Ot = q[ft];
25770
25770
  if (r(q, ft) && typeof Ot != "function")
25771
- return j(ct, mt, yt, ft, G(Ot));
25771
+ return j(ct, gt, yt, ft, G(Ot));
25772
25772
  if (!Ot)
25773
25773
  return new p(
25774
- "Invalid " + mt + " `" + yt + "` key `" + ft + "` supplied to `" + ct + "`.\nBad object: " + JSON.stringify(it[at], null, " ") + `
25774
+ "Invalid " + gt + " `" + yt + "` key `" + ft + "` supplied to `" + ct + "`.\nBad object: " + JSON.stringify(it[at], null, " ") + `
25775
25775
  Valid keys: ` + JSON.stringify(Object.keys(q), null, " ")
25776
25776
  );
25777
- var rt = Ot(Et, ft, ct, mt, yt + "." + ft, n);
25777
+ var rt = Ot(Et, ft, ct, gt, yt + "." + ft, n);
25778
25778
  if (rt)
25779
25779
  return rt;
25780
25780
  }
@@ -29815,15 +29815,15 @@ ts(La, "getComposedData", function(e) {
29815
29815
  K -= at, z += at;
29816
29816
  }
29817
29817
  } else {
29818
- var ct = [o.scale(j[0]), o.scale(j[1])], mt = ct[0], yt = ct[1];
29819
- if (D = mt, K = bP({
29818
+ var ct = [o.scale(j[0]), o.scale(j[1])], gt = ct[0], yt = ct[1];
29819
+ if (D = gt, K = bP({
29820
29820
  axis: s,
29821
29821
  ticks: c,
29822
29822
  bandSize: i,
29823
29823
  offset: y.offset,
29824
29824
  entry: R,
29825
29825
  index: V
29826
- }), H = yt - mt, z = y.size, Y = {
29826
+ }), H = yt - gt, z = y.size, Y = {
29827
29827
  x: o.x,
29828
29828
  y: K,
29829
29829
  width: o.width,
@@ -29928,8 +29928,8 @@ var px = function(t, n, r, i, o) {
29928
29928
  var p = n[b], v = p.orientation, P = p.domain, S = p.padding, A = S === void 0 ? {} : S, E = p.mirror, x = p.reversed, T = "".concat(v).concat(E ? "Mirror" : ""), C, N, R, V, j;
29929
29929
  if (p.type === "number" && (p.padding === "gap" || p.padding === "no-gap")) {
29930
29930
  var D = P[1] - P[0], K = 1 / 0, H = p.categoricalDomain.sort(iV);
29931
- if (H.forEach(function(ct, mt) {
29932
- mt > 0 && (K = Math.min((ct || 0) - (H[mt - 1] || 0), K));
29931
+ if (H.forEach(function(ct, gt) {
29932
+ gt > 0 && (K = Math.min((ct || 0) - (H[gt - 1] || 0), K));
29933
29933
  }), Number.isFinite(K)) {
29934
29934
  var z = K / D, Y = p.layout === "vertical" ? r.height : r.width;
29935
29935
  if (p.padding === "gap" && (C = z * Y / 2), p.padding === "no-gap") {
@@ -33503,8 +33503,8 @@ var hb = function(t, n, r, i) {
33503
33503
  }, []);
33504
33504
  else if (S === "number") {
33505
33505
  var lt = xtt(V, i.filter(function(it) {
33506
- var at, ct, mt = s in it.props ? it.props[s] : (at = it.type.defaultProps) === null || at === void 0 ? void 0 : at[s], yt = "hide" in it.props ? it.props.hide : (ct = it.type.defaultProps) === null || ct === void 0 ? void 0 : ct.hide;
33507
- return mt === R && (N || !yt);
33506
+ var at, ct, gt = s in it.props ? it.props[s] : (at = it.type.defaultProps) === null || at === void 0 ? void 0 : at[s], yt = "hide" in it.props ? it.props.hide : (ct = it.type.defaultProps) === null || ct === void 0 ? void 0 : ct.hide;
33507
+ return gt === R && (N || !yt);
33508
33508
  }), A, o, u);
33509
33509
  lt && (D = lt);
33510
33510
  }
@@ -33655,7 +33655,7 @@ var hb = function(t, n, r, i) {
33655
33655
  graphicalItems: [lt],
33656
33656
  dataStartIndex: C,
33657
33657
  dataEndIndex: N
33658
- }), it = lt.type.defaultProps !== void 0 ? ut(ut({}, lt.type.defaultProps), lt.props) : lt.props, at = it.dataKey, ct = it.maxBarSize, mt = it["".concat(z, "Id")], yt = it["".concat(Y, "Id")], Et = {}, Tt = c.reduce(function(Qt, Ht) {
33658
+ }), it = lt.type.defaultProps !== void 0 ? ut(ut({}, lt.type.defaultProps), lt.props) : lt.props, at = it.dataKey, ct = it.maxBarSize, gt = it["".concat(z, "Id")], yt = it["".concat(Y, "Id")], Et = {}, Tt = c.reduce(function(Qt, Ht) {
33659
33659
  var ne, Ee, re = S["".concat(Ht.axisType, "Map")], rn = it["".concat(Ht.axisType, "Id")];
33660
33660
  re && re[rn] || Ht.axisType === "zAxis" || (process.env.NODE_ENV !== "production" ? ur(!1, "Specifying a(n) ".concat(Ht.axisType, "Id requires a corresponding ").concat(
33661
33661
  Ht.axisType,
@@ -33663,7 +33663,7 @@ var hb = function(t, n, r, i) {
33663
33663
  ).concat((ne = lt == null || (Ee = lt.type) === null || Ee === void 0 ? void 0 : Ee.displayName) !== null && ne !== void 0 ? ne : "")) : ur());
33664
33664
  var Qe = re[rn];
33665
33665
  return ut(ut({}, Qt), {}, Ft(Ft({}, Ht.axisType, Qe), "".concat(Ht.axisType, "Ticks"), ho(Qe)));
33666
- }, Et), ht = Tt[Y], ft = Tt["".concat(Y, "Ticks")], Ot = E && E[mt] && E[mt].hasStack && Ctt(lt, E[mt].stackGroups), rt = po(lt.type).indexOf("Bar") >= 0, Lt = Fd(ht, ft), bt = [], fe = G && gtt({
33666
+ }, Et), ht = Tt[Y], ft = Tt["".concat(Y, "Ticks")], Ot = E && E[gt] && E[gt].hasStack && Ctt(lt, E[gt].stackGroups), rt = po(lt.type).indexOf("Bar") >= 0, Lt = Fd(ht, ft), bt = [], fe = G && gtt({
33667
33667
  barSize: R,
33668
33668
  stackGroups: E,
33669
33669
  totalSize: Eut(Tt, Y)
@@ -33906,13 +33906,13 @@ var hb = function(t, n, r, i) {
33906
33906
  var q = ut(ut({}, G), {}, {
33907
33907
  x: G.left,
33908
33908
  y: G.top
33909
- }), nt = Math.min(K, q.x + q.width), it = Math.min(H, q.y + q.height), at = J[z] && J[z].value, ct = hb(x.state, x.props.data, z), mt = J[z] ? {
33909
+ }), nt = Math.min(K, q.x + q.width), it = Math.min(H, q.y + q.height), at = J[z] && J[z].value, ct = hb(x.state, x.props.data, z), gt = J[z] ? {
33910
33910
  x: N === "horizontal" ? J[z].coordinate : nt,
33911
33911
  y: N === "horizontal" ? it : J[z].coordinate
33912
33912
  } : I$;
33913
33913
  x.setState(ut(ut({}, T), {}, {
33914
33914
  activeLabel: at,
33915
- activeCoordinate: mt,
33915
+ activeCoordinate: gt,
33916
33916
  activePayload: ct,
33917
33917
  activeTooltipIndex: z
33918
33918
  }));
@@ -34038,7 +34038,7 @@ var hb = function(t, n, r, i) {
34038
34038
  var R = x.filterFormatItem(T, C, N);
34039
34039
  if (!R)
34040
34040
  return null;
34041
- var V = x.getTooltipEventType(), j = x.state, D = j.isTooltipActive, K = j.tooltipAxis, H = j.activeTooltipIndex, z = j.activeLabel, Y = x.props.children, G = wr(Y, _r), J = R.props, lt = J.points, q = J.isRange, nt = J.baseLine, it = R.item.type.defaultProps !== void 0 ? ut(ut({}, R.item.type.defaultProps), R.item.props) : R.item.props, at = it.activeDot, ct = it.hide, mt = it.activeBar, yt = it.activeShape, Et = !!(!ct && D && G && (at || mt || yt)), Tt = {};
34041
+ var V = x.getTooltipEventType(), j = x.state, D = j.isTooltipActive, K = j.tooltipAxis, H = j.activeTooltipIndex, z = j.activeLabel, Y = x.props.children, G = wr(Y, _r), J = R.props, lt = J.points, q = J.isRange, nt = J.baseLine, it = R.item.type.defaultProps !== void 0 ? ut(ut({}, R.item.type.defaultProps), R.item.props) : R.item.props, at = it.activeDot, ct = it.hide, gt = it.activeBar, yt = it.activeShape, Et = !!(!ct && D && G && (at || gt || yt)), Tt = {};
34042
34042
  V !== "axis" && G && G.props.trigger === "click" ? Tt = {
34043
34043
  onClick: $f(x.handleItemMouseEnter, T.props.onClick)
34044
34044
  } : V !== "axis" && (Tt = {
@@ -34057,7 +34057,7 @@ var hb = function(t, n, r, i) {
34057
34057
  Ot = hd(lt, Lt, z), rt = q && nt && hd(nt, Lt, z);
34058
34058
  } else
34059
34059
  Ot = lt == null ? void 0 : lt[H], rt = q && nt && nt[H];
34060
- if (yt || mt) {
34060
+ if (yt || gt) {
34061
34061
  var bt = T.props.activeIndex !== void 0 ? T.props.activeIndex : H;
34062
34062
  return [/* @__PURE__ */ bn(T, ut(ut(ut({}, R.props), Tt), {}, {
34063
34063
  activeIndex: bt
@@ -34520,7 +34520,7 @@ var hb = function(t, n, r, i) {
34520
34520
  });
34521
34521
  }
34522
34522
  if (!jy(E, P.prevChildren)) {
34523
- var G, J, lt, q, nt = wr(E, Wl), it = nt && (G = (J = nt.props) === null || J === void 0 ? void 0 : J.startIndex) !== null && G !== void 0 ? G : V, at = nt && (lt = (q = nt.props) === null || q === void 0 ? void 0 : q.endIndex) !== null && lt !== void 0 ? lt : j, ct = it !== V || at !== j, mt = !Ut(A), yt = mt && !ct ? P.updateId : P.updateId + 1;
34523
+ var G, J, lt, q, nt = wr(E, Wl), it = nt && (G = (J = nt.props) === null || J === void 0 ? void 0 : J.startIndex) !== null && G !== void 0 ? G : V, at = nt && (lt = (q = nt.props) === null || q === void 0 ? void 0 : q.endIndex) !== null && lt !== void 0 ? lt : j, ct = it !== V || at !== j, gt = !Ut(A), yt = gt && !ct ? P.updateId : P.updateId + 1;
34524
34524
  return ut(ut({
34525
34525
  updateId: yt
34526
34526
  }, y(ut(ut({
@@ -39595,11 +39595,11 @@ var db = { exports: {} };
39595
39595
  return "_leaflet_id" in a || (a._leaflet_id = ++l), a._leaflet_id;
39596
39596
  }
39597
39597
  function h(a, d, g) {
39598
- var w, O, k, W;
39599
- return W = function() {
39598
+ var w, O, k, F;
39599
+ return F = function() {
39600
39600
  w = !1, O && (k.apply(g, O), O = !1);
39601
39601
  }, k = function() {
39602
- w ? O = arguments : (a.apply(g, arguments), setTimeout(W, d), w = !0);
39602
+ w ? O = arguments : (a.apply(g, arguments), setTimeout(F, d), w = !0);
39603
39603
  }, k;
39604
39604
  }
39605
39605
  function u(a, d, g) {
@@ -39710,7 +39710,7 @@ var db = { exports: {} };
39710
39710
  return a.statics && i(d, a.statics), a.includes && (z(a.includes), i.apply(null, [w].concat(a.includes))), i(w, a), delete w.statics, delete w.includes, w.options && (w.options = g.options ? o(g.options) : {}, i(w.options, a.options)), w._initHooks = [], w.callInitHooks = function() {
39711
39711
  if (!this._initHooksCalled) {
39712
39712
  g.callInitHooks && g.callInitHooks.call(this), this._initHooksCalled = !0;
39713
- for (var k = 0, W = w._initHooks.length; k < W; k++)
39713
+ for (var k = 0, F = w._initHooks.length; k < F; k++)
39714
39714
  w._initHooks[k].call(this);
39715
39715
  }
39716
39716
  }, d;
@@ -39770,7 +39770,7 @@ var db = { exports: {} };
39770
39770
  this._off(w, a[w], d);
39771
39771
  else {
39772
39772
  a = b(a);
39773
- for (var O = arguments.length === 1, k = 0, W = a.length; k < W; k++)
39773
+ for (var O = arguments.length === 1, k = 0, F = a.length; k < F; k++)
39774
39774
  O ? this._off(a[k]) : this._off(a[k], d, g);
39775
39775
  }
39776
39776
  return this;
@@ -39801,10 +39801,10 @@ var db = { exports: {} };
39801
39801
  console.warn("wrong listener type: " + typeof d);
39802
39802
  return;
39803
39803
  }
39804
- var W = this._listens(a, d, g);
39805
- if (W !== !1) {
39806
- var et = w[W];
39807
- this._firingCount && (et.fn = f, this._events[a] = w = w.slice()), w.splice(W, 1);
39804
+ var F = this._listens(a, d, g);
39805
+ if (F !== !1) {
39806
+ var et = w[F];
39807
+ this._firingCount && (et.fn = f, this._events[a] = w = w.slice()), w.splice(F, 1);
39808
39808
  }
39809
39809
  }
39810
39810
  },
@@ -39824,7 +39824,7 @@ var db = { exports: {} };
39824
39824
  var O = this._events[a];
39825
39825
  if (O) {
39826
39826
  this._firingCount = this._firingCount + 1 || 1;
39827
- for (var k = 0, W = O.length; k < W; k++) {
39827
+ for (var k = 0, F = O.length; k < F; k++) {
39828
39828
  var et = O[k], ot = et.fn;
39829
39829
  et.once && this.off(a, ot, et.ctx), ot.call(et.ctx || this, w);
39830
39830
  }
@@ -39845,8 +39845,8 @@ var db = { exports: {} };
39845
39845
  if (k && k.length && this._listens(a, O, g) !== !1)
39846
39846
  return !0;
39847
39847
  if (w) {
39848
- for (var W in this._eventParents)
39849
- if (this._eventParents[W].listens(a, d, g, w))
39848
+ for (var F in this._eventParents)
39849
+ if (this._eventParents[F].listens(a, d, g, w))
39850
39850
  return !0;
39851
39851
  }
39852
39852
  return !1;
@@ -40082,16 +40082,16 @@ var db = { exports: {} };
40082
40082
  // intersect if they have at least one point in common.
40083
40083
  intersects: function(a) {
40084
40084
  a = it(a);
40085
- var d = this.min, g = this.max, w = a.min, O = a.max, k = O.x >= d.x && w.x <= g.x, W = O.y >= d.y && w.y <= g.y;
40086
- return k && W;
40085
+ var d = this.min, g = this.max, w = a.min, O = a.max, k = O.x >= d.x && w.x <= g.x, F = O.y >= d.y && w.y <= g.y;
40086
+ return k && F;
40087
40087
  },
40088
40088
  // @method overlaps(otherBounds: Bounds): Boolean
40089
40089
  // Returns `true` if the rectangle overlaps the given bounds. Two bounds
40090
40090
  // overlap if their intersection is an area.
40091
40091
  overlaps: function(a) {
40092
40092
  a = it(a);
40093
- var d = this.min, g = this.max, w = a.min, O = a.max, k = O.x > d.x && w.x < g.x, W = O.y > d.y && w.y < g.y;
40094
- return k && W;
40093
+ var d = this.min, g = this.max, w = a.min, O = a.max, k = O.x > d.x && w.x < g.x, F = O.y > d.y && w.y < g.y;
40094
+ return k && F;
40095
40095
  },
40096
40096
  // @method isValid(): Boolean
40097
40097
  // Returns `true` if the bounds are properly initialized.
@@ -40131,14 +40131,14 @@ var db = { exports: {} };
40131
40131
  // Extend the bounds to contain the given bounds
40132
40132
  extend: function(a) {
40133
40133
  var d = this._southWest, g = this._northEast, w, O;
40134
- if (a instanceof mt)
40134
+ if (a instanceof gt)
40135
40135
  w = a, O = a;
40136
40136
  else if (a instanceof at) {
40137
40137
  if (w = a._southWest, O = a._northEast, !w || !O)
40138
40138
  return this;
40139
40139
  } else
40140
40140
  return a ? this.extend(yt(a) || ct(a)) : this;
40141
- return !d && !g ? (this._southWest = new mt(w.lat, w.lng), this._northEast = new mt(O.lat, O.lng)) : (d.lat = Math.min(w.lat, d.lat), d.lng = Math.min(w.lng, d.lng), g.lat = Math.max(O.lat, g.lat), g.lng = Math.max(O.lng, g.lng)), this;
40141
+ return !d && !g ? (this._southWest = new gt(w.lat, w.lng), this._northEast = new gt(O.lat, O.lng)) : (d.lat = Math.min(w.lat, d.lat), d.lng = Math.min(w.lng, d.lng), g.lat = Math.max(O.lat, g.lat), g.lng = Math.max(O.lng, g.lng)), this;
40142
40142
  },
40143
40143
  // @method pad(bufferRatio: Number): LatLngBounds
40144
40144
  // Returns bounds created by extending or retracting the current bounds by a given ratio in each direction.
@@ -40147,14 +40147,14 @@ var db = { exports: {} };
40147
40147
  pad: function(a) {
40148
40148
  var d = this._southWest, g = this._northEast, w = Math.abs(d.lat - g.lat) * a, O = Math.abs(d.lng - g.lng) * a;
40149
40149
  return new at(
40150
- new mt(d.lat - w, d.lng - O),
40151
- new mt(g.lat + w, g.lng + O)
40150
+ new gt(d.lat - w, d.lng - O),
40151
+ new gt(g.lat + w, g.lng + O)
40152
40152
  );
40153
40153
  },
40154
40154
  // @method getCenter(): LatLng
40155
40155
  // Returns the center point of the bounds.
40156
40156
  getCenter: function() {
40157
- return new mt(
40157
+ return new gt(
40158
40158
  (this._southWest.lat + this._northEast.lat) / 2,
40159
40159
  (this._southWest.lng + this._northEast.lng) / 2
40160
40160
  );
@@ -40172,12 +40172,12 @@ var db = { exports: {} };
40172
40172
  // @method getNorthWest(): LatLng
40173
40173
  // Returns the north-west point of the bounds.
40174
40174
  getNorthWest: function() {
40175
- return new mt(this.getNorth(), this.getWest());
40175
+ return new gt(this.getNorth(), this.getWest());
40176
40176
  },
40177
40177
  // @method getSouthEast(): LatLng
40178
40178
  // Returns the south-east point of the bounds.
40179
40179
  getSouthEast: function() {
40180
- return new mt(this.getSouth(), this.getEast());
40180
+ return new gt(this.getSouth(), this.getEast());
40181
40181
  },
40182
40182
  // @method getWest(): Number
40183
40183
  // Returns the west longitude of the bounds
@@ -40205,7 +40205,7 @@ var db = { exports: {} };
40205
40205
  // @method contains (latlng: LatLng): Boolean
40206
40206
  // Returns `true` if the rectangle contains the given point.
40207
40207
  contains: function(a) {
40208
- typeof a[0] == "number" || a instanceof mt || "lat" in a ? a = yt(a) : a = ct(a);
40208
+ typeof a[0] == "number" || a instanceof gt || "lat" in a ? a = yt(a) : a = ct(a);
40209
40209
  var d = this._southWest, g = this._northEast, w, O;
40210
40210
  return a instanceof at ? (w = a.getSouthWest(), O = a.getNorthEast()) : w = O = a, w.lat >= d.lat && O.lat <= g.lat && w.lng >= d.lng && O.lng <= g.lng;
40211
40211
  },
@@ -40213,15 +40213,15 @@ var db = { exports: {} };
40213
40213
  // Returns `true` if the rectangle intersects the given bounds. Two bounds intersect if they have at least one point in common.
40214
40214
  intersects: function(a) {
40215
40215
  a = ct(a);
40216
- var d = this._southWest, g = this._northEast, w = a.getSouthWest(), O = a.getNorthEast(), k = O.lat >= d.lat && w.lat <= g.lat, W = O.lng >= d.lng && w.lng <= g.lng;
40217
- return k && W;
40216
+ var d = this._southWest, g = this._northEast, w = a.getSouthWest(), O = a.getNorthEast(), k = O.lat >= d.lat && w.lat <= g.lat, F = O.lng >= d.lng && w.lng <= g.lng;
40217
+ return k && F;
40218
40218
  },
40219
40219
  // @method overlaps(otherBounds: LatLngBounds): Boolean
40220
40220
  // Returns `true` if the rectangle overlaps the given bounds. Two bounds overlap if their intersection is an area.
40221
40221
  overlaps: function(a) {
40222
40222
  a = ct(a);
40223
- var d = this._southWest, g = this._northEast, w = a.getSouthWest(), O = a.getNorthEast(), k = O.lat > d.lat && w.lat < g.lat, W = O.lng > d.lng && w.lng < g.lng;
40224
- return k && W;
40223
+ var d = this._southWest, g = this._northEast, w = a.getSouthWest(), O = a.getNorthEast(), k = O.lat > d.lat && w.lat < g.lat, F = O.lng > d.lng && w.lng < g.lng;
40224
+ return k && F;
40225
40225
  },
40226
40226
  // @method toBBoxString(): String
40227
40227
  // Returns a string with bounding box coordinates in a 'southwest_lng,southwest_lat,northeast_lng,northeast_lat' format. Useful for sending requests to web services that return geo data.
@@ -40242,12 +40242,12 @@ var db = { exports: {} };
40242
40242
  function ct(a, d) {
40243
40243
  return a instanceof at ? a : new at(a, d);
40244
40244
  }
40245
- function mt(a, d, g) {
40245
+ function gt(a, d, g) {
40246
40246
  if (isNaN(a) || isNaN(d))
40247
40247
  throw new Error("Invalid LatLng object: (" + a + ", " + d + ")");
40248
40248
  this.lat = +a, this.lng = +d, g !== void 0 && (this.alt = +g);
40249
40249
  }
40250
- mt.prototype = {
40250
+ gt.prototype = {
40251
40251
  // @method equals(otherLatLng: LatLng, maxMargin?: Number): Boolean
40252
40252
  // Returns `true` if the given `LatLng` point is at the same position (within a small margin of error). The margin of error can be overridden by setting `maxMargin` to a small number.
40253
40253
  equals: function(a, d) {
@@ -40285,11 +40285,11 @@ var db = { exports: {} };
40285
40285
  );
40286
40286
  },
40287
40287
  clone: function() {
40288
- return new mt(this.lat, this.lng, this.alt);
40288
+ return new gt(this.lat, this.lng, this.alt);
40289
40289
  }
40290
40290
  };
40291
40291
  function yt(a, d, g) {
40292
- return a instanceof mt ? a : A(a) && typeof a[0] != "object" ? a.length === 3 ? new mt(a[0], a[1], a[2]) : a.length === 2 ? new mt(a[0], a[1]) : null : a == null ? a : typeof a == "object" && "lat" in a ? new mt(a.lat, "lng" in a ? a.lng : a.lon, a.alt) : d === void 0 ? null : new mt(a, d, g);
40292
+ return a instanceof gt ? a : A(a) && typeof a[0] != "object" ? a.length === 3 ? new gt(a[0], a[1], a[2]) : a.length === 2 ? new gt(a[0], a[1]) : null : a == null ? a : typeof a == "object" && "lat" in a ? new gt(a.lat, "lng" in a ? a.lng : a.lon, a.alt) : d === void 0 ? null : new gt(a, d, g);
40293
40293
  }
40294
40294
  var Et = {
40295
40295
  // @method latLngToPoint(latlng: LatLng, zoom: Number): Point
@@ -40360,7 +40360,7 @@ var db = { exports: {} };
40360
40360
  // CRS's `wrapLat` and `wrapLng` properties, if they are outside the CRS's bounds.
40361
40361
  wrapLatLng: function(a) {
40362
40362
  var d = this.wrapLng ? u(a.lng, this.wrapLng, !0) : a.lng, g = this.wrapLat ? u(a.lat, this.wrapLat, !0) : a.lat, w = a.alt;
40363
- return new mt(g, d, w);
40363
+ return new gt(g, d, w);
40364
40364
  },
40365
40365
  // @method wrapLatLngBounds(bounds: LatLngBounds): LatLngBounds
40366
40366
  // Returns a `LatLngBounds` with the same size as the given one, ensuring
@@ -40370,7 +40370,7 @@ var db = { exports: {} };
40370
40370
  var d = a.getCenter(), g = this.wrapLatLng(d), w = d.lat - g.lat, O = d.lng - g.lng;
40371
40371
  if (w === 0 && O === 0)
40372
40372
  return a;
40373
- var k = a.getSouthWest(), W = a.getNorthEast(), et = new mt(k.lat - w, k.lng - O), ot = new mt(W.lat - w, W.lng - O);
40373
+ var k = a.getSouthWest(), F = a.getNorthEast(), et = new gt(k.lat - w, k.lng - O), ot = new gt(F.lat - w, F.lng - O);
40374
40374
  return new at(et, ot);
40375
40375
  }
40376
40376
  }, Tt = i({}, Et, {
@@ -40381,7 +40381,7 @@ var db = { exports: {} };
40381
40381
  R: 6371e3,
40382
40382
  // distance between two geographical points using spherical law of cosines approximation
40383
40383
  distance: function(a, d) {
40384
- var g = Math.PI / 180, w = a.lat * g, O = d.lat * g, k = Math.sin((d.lat - a.lat) * g / 2), W = Math.sin((d.lng - a.lng) * g / 2), et = k * k + Math.cos(w) * Math.cos(O) * W * W, ot = 2 * Math.atan2(Math.sqrt(et), Math.sqrt(1 - et));
40384
+ var g = Math.PI / 180, w = a.lat * g, O = d.lat * g, k = Math.sin((d.lat - a.lat) * g / 2), F = Math.sin((d.lng - a.lng) * g / 2), et = k * k + Math.cos(w) * Math.cos(O) * F * F, ot = 2 * Math.atan2(Math.sqrt(et), Math.sqrt(1 - et));
40385
40385
  return this.R * ot;
40386
40386
  }
40387
40387
  }), ht = 6378137, ft = {
@@ -40396,7 +40396,7 @@ var db = { exports: {} };
40396
40396
  },
40397
40397
  unproject: function(a) {
40398
40398
  var d = 180 / Math.PI;
40399
- return new mt(
40399
+ return new gt(
40400
40400
  (2 * Math.atan(Math.exp(a.y / this.R)) - Math.PI / 2) * d,
40401
40401
  a.x * d / this.R
40402
40402
  );
@@ -40451,9 +40451,9 @@ var db = { exports: {} };
40451
40451
  return document.createElementNS("http://www.w3.org/2000/svg", a);
40452
40452
  }
40453
40453
  function ee(a, d) {
40454
- var g = "", w, O, k, W, et, ot;
40454
+ var g = "", w, O, k, F, et, ot;
40455
40455
  for (w = 0, k = a.length; w < k; w++) {
40456
- for (et = a[w], O = 0, W = et.length; O < W; O++)
40456
+ for (et = a[w], O = 0, F = et.length; O < F; O++)
40457
40457
  ot = et[O], g += (O ? "L" : "M") + ot.x + " " + ot.y;
40458
40458
  g += d ? $t.svg ? "z" : "x" : "";
40459
40459
  }
@@ -40585,10 +40585,10 @@ var db = { exports: {} };
40585
40585
  return;
40586
40586
  }
40587
40587
  if (!(k.pointerType === "mouse" || k.sourceCapabilities && !k.sourceCapabilities.firesTouchEvents)) {
40588
- var W = Kr(k);
40589
- if (!(W.some(function(ot) {
40588
+ var F = Kr(k);
40589
+ if (!(F.some(function(ot) {
40590
40590
  return ot instanceof HTMLLabelElement && ot.attributes.for;
40591
- }) && !W.some(function(ot) {
40591
+ }) && !F.some(function(ot) {
40592
40592
  return ot instanceof HTMLInputElement || ot instanceof HTMLSelectElement;
40593
40593
  }))) {
40594
40594
  var et = Date.now();
@@ -40783,7 +40783,7 @@ var db = { exports: {} };
40783
40783
  Da(a, O, d[O], g);
40784
40784
  else {
40785
40785
  d = b(d);
40786
- for (var k = 0, W = d.length; k < W; k++)
40786
+ for (var k = 0, F = d.length; k < F; k++)
40787
40787
  Da(a, d[k], g, w);
40788
40788
  }
40789
40789
  return this;
@@ -40800,7 +40800,7 @@ var db = { exports: {} };
40800
40800
  return E(d, et) !== -1;
40801
40801
  });
40802
40802
  else
40803
- for (var k = 0, W = d.length; k < W; k++)
40803
+ for (var k = 0, F = d.length; k < F; k++)
40804
40804
  ja(a, d[k], g, w);
40805
40805
  return this;
40806
40806
  }
@@ -40821,10 +40821,10 @@ var db = { exports: {} };
40821
40821
  return this;
40822
40822
  var k = function(et) {
40823
40823
  return g.call(w || a, et || window.event);
40824
- }, W = k;
40824
+ }, F = k;
40825
40825
  !$t.touchNative && $t.pointer && d.indexOf("touch") === 0 ? k = Ss(a, d, k) : $t.touch && d === "dblclick" ? k = Os(a, k) : "addEventListener" in a ? d === "touchstart" || d === "touchmove" || d === "wheel" || d === "mousewheel" ? a.addEventListener(Yr[d] || d, k, $t.passiveEvents ? { passive: !1 } : !1) : d === "mouseenter" || d === "mouseleave" ? (k = function(et) {
40826
- et = et || window.event, rr(a, et) && W(et);
40827
- }, a.addEventListener(Yr[d], k, !1)) : a.addEventListener(d, W, !1) : a.attachEvent("on" + d, k), a[de] = a[de] || {}, a[de][O] = k;
40826
+ et = et || window.event, rr(a, et) && F(et);
40827
+ }, a.addEventListener(Yr[d], k, !1)) : a.addEventListener(d, F, !1) : a.attachEvent("on" + d, k), a[de] = a[de] || {}, a[de][O] = k;
40828
40828
  }
40829
40829
  function ja(a, d, g, w, O) {
40830
40830
  O = O || d + c(g) + (w ? "_" + c(w) : "");
@@ -41067,7 +41067,7 @@ var db = { exports: {} };
41067
41067
  // @method setZoomAround(offset: Point, zoom: Number, options: Zoom options): this
41068
41068
  // Zooms the map while keeping a specified pixel on the map (relative to the top-left corner) stationary.
41069
41069
  setZoomAround: function(a, d, g) {
41070
- var w = this.getZoomScale(d), O = this.getSize().divideBy(2), k = a instanceof J ? a : this.latLngToContainerPoint(a), W = k.subtract(O).multiplyBy(1 - 1 / w), et = this.containerPointToLatLng(O.add(W));
41070
+ var w = this.getZoomScale(d), O = this.getSize().divideBy(2), k = a instanceof J ? a : this.latLngToContainerPoint(a), F = k.subtract(O).multiplyBy(1 - 1 / w), et = this.containerPointToLatLng(O.add(F));
41071
41071
  return this.setView(et, d, { zoom: g });
41072
41072
  },
41073
41073
  _getBoundsCenterZoom: function(a, d) {
@@ -41078,7 +41078,7 @@ var db = { exports: {} };
41078
41078
  center: a.getCenter(),
41079
41079
  zoom: O
41080
41080
  };
41081
- var k = w.subtract(g).divideBy(2), W = this.project(a.getSouthWest(), O), et = this.project(a.getNorthEast(), O), ot = this.unproject(W.add(et).divideBy(2).add(k), O);
41081
+ var k = w.subtract(g).divideBy(2), F = this.project(a.getSouthWest(), O), et = this.project(a.getNorthEast(), O), ot = this.unproject(F.add(et).divideBy(2).add(k), O);
41082
41082
  return {
41083
41083
  center: ot,
41084
41084
  zoom: O
@@ -41129,9 +41129,9 @@ var db = { exports: {} };
41129
41129
  if (g = g || {}, g.animate === !1 || !$t.any3d)
41130
41130
  return this.setView(a, d, g);
41131
41131
  this._stop();
41132
- var w = this.project(this.getCenter()), O = this.project(a), k = this.getSize(), W = this._zoom;
41133
- a = yt(a), d = d === void 0 ? W : d;
41134
- var et = Math.max(k.x, k.y), ot = et * this.getZoomScale(W, d), dt = O.distanceTo(w) || 1, Pt = 1.42, kt = Pt * Pt;
41132
+ var w = this.project(this.getCenter()), O = this.project(a), k = this.getSize(), F = this._zoom;
41133
+ a = yt(a), d = d === void 0 ? F : d;
41134
+ var et = Math.max(k.x, k.y), ot = et * this.getZoomScale(F, d), dt = O.distanceTo(w) || 1, Pt = 1.42, kt = Pt * Pt;
41135
41135
  function Yt(ve) {
41136
41136
  var Za = ve ? -1 : 1, nf = ve ? ot : et, jm = ot * ot - et * et + Za * kt * kt * dt * dt, Wc = 2 * nf * kt * dt, Wn = jm / Wc, Vc = Math.sqrt(Wn * Wn + 1) - Wn, rf = Vc < 1e-9 ? -18 : Math.log(Vc);
41137
41137
  return rf;
@@ -41159,8 +41159,8 @@ var db = { exports: {} };
41159
41159
  function lr() {
41160
41160
  var ve = (Date.now() - ro) / Ws, Za = Ge(ve) * Fn;
41161
41161
  ve <= 1 ? (this._flyToFrame = j(lr, this), this._move(
41162
- this.unproject(w.add(O.subtract(w).multiplyBy(Ne(Za) / dt)), W),
41163
- this.getScaleZoom(et / Kt(Za), W),
41162
+ this.unproject(w.add(O.subtract(w).multiplyBy(Ne(Za) / dt)), F),
41163
+ this.getScaleZoom(et / Kt(Za), F),
41164
41164
  { flyTo: !0 }
41165
41165
  )) : this._move(a, d)._moveEnd(!0);
41166
41166
  }
@@ -41204,7 +41204,7 @@ var db = { exports: {} };
41204
41204
  // the map will not be panned.
41205
41205
  panInside: function(a, d) {
41206
41206
  d = d || {};
41207
- var g = q(d.paddingTopLeft || d.padding || [0, 0]), w = q(d.paddingBottomRight || d.padding || [0, 0]), O = this.project(this.getCenter()), k = this.project(a), W = this.getPixelBounds(), et = it([W.min.add(g), W.max.subtract(w)]), ot = et.getSize();
41207
+ var g = q(d.paddingTopLeft || d.padding || [0, 0]), w = q(d.paddingBottomRight || d.padding || [0, 0]), O = this.project(this.getCenter()), k = this.project(a), F = this.getPixelBounds(), et = it([F.min.add(g), F.max.subtract(w)]), ot = et.getSize();
41208
41208
  if (!et.contains(k)) {
41209
41209
  this._enforcingBounds = !0;
41210
41210
  var dt = k.subtract(et.getCenter()), Pt = et.extend(k).getSize().subtract(ot);
@@ -41288,10 +41288,10 @@ var db = { exports: {} };
41288
41288
  },
41289
41289
  _handleGeolocationResponse: function(a) {
41290
41290
  if (this._container._leaflet_id) {
41291
- var d = a.coords.latitude, g = a.coords.longitude, w = new mt(d, g), O = w.toBounds(a.coords.accuracy * 2), k = this._locateOptions;
41291
+ var d = a.coords.latitude, g = a.coords.longitude, w = new gt(d, g), O = w.toBounds(a.coords.accuracy * 2), k = this._locateOptions;
41292
41292
  if (k.setView) {
41293
- var W = this.getBoundsZoom(O);
41294
- this.setView(w, k.maxZoom ? Math.min(W, k.maxZoom) : W);
41293
+ var F = this.getBoundsZoom(O);
41294
+ this.setView(w, k.maxZoom ? Math.min(F, k.maxZoom) : F);
41295
41295
  }
41296
41296
  var et = {
41297
41297
  latlng: w,
@@ -41374,7 +41374,7 @@ var db = { exports: {} };
41374
41374
  // the given bounds in its entirety.
41375
41375
  getBoundsZoom: function(a, d, g) {
41376
41376
  a = ct(a), g = q(g || [0, 0]);
41377
- var w = this.getZoom() || 0, O = this.getMinZoom(), k = this.getMaxZoom(), W = a.getNorthWest(), et = a.getSouthEast(), ot = this.getSize().subtract(g), dt = it(this.project(et, w), this.project(W, w)).getSize(), Pt = $t.any3d ? this.options.zoomSnap : 1, kt = ot.x / dt.x, Yt = ot.y / dt.y, hn = d ? Math.max(kt, Yt) : Math.min(kt, Yt);
41377
+ var w = this.getZoom() || 0, O = this.getMinZoom(), k = this.getMaxZoom(), F = a.getNorthWest(), et = a.getSouthEast(), ot = this.getSize().subtract(g), dt = it(this.project(et, w), this.project(F, w)).getSize(), Pt = $t.any3d ? this.options.zoomSnap : 1, kt = ot.x / dt.x, Yt = ot.y / dt.y, hn = d ? Math.max(kt, Yt) : Math.min(kt, Yt);
41378
41378
  return w = this.getScaleZoom(hn, w), Pt && (w = Math.round(w / (Pt / 100)) * (Pt / 100), w = d ? Math.ceil(w / Pt) * Pt : Math.floor(w / Pt) * Pt), Math.max(O, Math.min(k, w));
41379
41379
  },
41380
41380
  // @method getSize(): Point
@@ -41614,16 +41614,16 @@ var db = { exports: {} };
41614
41614
  Math.max(Math.abs(a.x), Math.abs(a.y)) >= this.options.transform3DLimit && this._resetView(this.getCenter(), this.getZoom());
41615
41615
  },
41616
41616
  _findEventTargets: function(a, d) {
41617
- for (var g = [], w, O = d === "mouseout" || d === "mouseover", k = a.target || a.srcElement, W = !1; k; ) {
41617
+ for (var g = [], w, O = d === "mouseout" || d === "mouseover", k = a.target || a.srcElement, F = !1; k; ) {
41618
41618
  if (w = this._targets[c(k)], w && (d === "click" || d === "preclick") && this._draggableMoved(w)) {
41619
- W = !0;
41619
+ F = !0;
41620
41620
  break;
41621
41621
  }
41622
41622
  if (w && w.listens(d, !0) && (O && !rr(k, a) || (g.push(w), O)) || k === this._container)
41623
41623
  break;
41624
41624
  k = k.parentNode;
41625
41625
  }
41626
- return !g.length && !W && !O && this.listens(d, !0) && (g = [this]), g;
41626
+ return !g.length && !F && !O && this.listens(d, !0) && (g = [this]), g;
41627
41627
  },
41628
41628
  _isClickDisabled: function(a) {
41629
41629
  for (; a && a !== this._container; ) {
@@ -41647,8 +41647,8 @@ var db = { exports: {} };
41647
41647
  }
41648
41648
  var O = this._findEventTargets(a, d);
41649
41649
  if (g) {
41650
- for (var k = [], W = 0; W < g.length; W++)
41651
- g[W].listens(d, !0) && k.push(g[W]);
41650
+ for (var k = [], F = 0; F < g.length; F++)
41651
+ g[F].listens(d, !0) && k.push(g[F]);
41652
41652
  O = k.concat(O);
41653
41653
  }
41654
41654
  if (O.length) {
@@ -41660,8 +41660,8 @@ var db = { exports: {} };
41660
41660
  var dt = et.getLatLng && (!et._radius || et._radius <= 10);
41661
41661
  ot.containerPoint = dt ? this.latLngToContainerPoint(et.getLatLng()) : this.mouseEventToContainerPoint(a), ot.layerPoint = this.containerPointToLayerPoint(ot.containerPoint), ot.latlng = dt ? et.getLatLng() : this.layerPointToLatLng(ot.layerPoint);
41662
41662
  }
41663
- for (W = 0; W < O.length; W++)
41664
- if (O[W].fire(d, ot, !0), ot.originalEvent._stopped || O[W].options.bubblingMouseEvents === !1 && E(this._mouseEvents, d) !== -1)
41663
+ for (F = 0; F < O.length; F++)
41664
+ if (O[F].fire(d, ot, !0), ot.originalEvent._stopped || O[F].options.bubblingMouseEvents === !1 && E(this._mouseEvents, d) !== -1)
41665
41665
  return;
41666
41666
  }
41667
41667
  },
@@ -41721,8 +41721,8 @@ var db = { exports: {} };
41721
41721
  _limitCenter: function(a, d, g) {
41722
41722
  if (!g)
41723
41723
  return a;
41724
- var w = this.project(a, d), O = this.getSize().divideBy(2), k = new nt(w.subtract(O), w.add(O)), W = this._getBoundsOffset(k, g, d);
41725
- return Math.abs(W.x) <= 1 && Math.abs(W.y) <= 1 ? a : this.unproject(w.add(W), d);
41724
+ var w = this.project(a, d), O = this.getSize().divideBy(2), k = new nt(w.subtract(O), w.add(O)), F = this._getBoundsOffset(k, g, d);
41725
+ return Math.abs(F.x) <= 1 && Math.abs(F.y) <= 1 ? a : this.unproject(w.add(F), d);
41726
41726
  },
41727
41727
  // adjust offset for view to get inside bounds
41728
41728
  _limitOffset: function(a, d) {
@@ -41736,8 +41736,8 @@ var db = { exports: {} };
41736
41736
  var w = it(
41737
41737
  this.project(d.getNorthEast(), g),
41738
41738
  this.project(d.getSouthWest(), g)
41739
- ), O = w.min.subtract(a.min), k = w.max.subtract(a.max), W = this._rebound(O.x, -k.x), et = this._rebound(O.y, -k.y);
41740
- return new J(W, et);
41739
+ ), O = w.min.subtract(a.min), k = w.max.subtract(a.max), F = this._rebound(O.x, -k.x), et = this._rebound(O.y, -k.y);
41740
+ return new J(F, et);
41741
41741
  },
41742
41742
  _rebound: function(a, d) {
41743
41743
  return a + d > 0 ? Math.round(a - d) / 2 : Math.max(0, Math.ceil(a)) - Math.max(0, Math.floor(d));
@@ -41864,8 +41864,8 @@ var db = { exports: {} };
41864
41864
  _initControlPos: function() {
41865
41865
  var a = this._controlCorners = {}, d = "leaflet-", g = this._controlContainer = te("div", d + "control-container", this._container);
41866
41866
  function w(O, k) {
41867
- var W = d + O + " " + d + k;
41868
- a[O + k] = te("div", W, g);
41867
+ var F = d + O + " " + d + k;
41868
+ a[O + k] = te("div", F, g);
41869
41869
  }
41870
41870
  w("top", "left"), w("top", "right"), w("bottom", "left"), w("bottom", "right");
41871
41871
  },
@@ -42012,8 +42012,8 @@ var db = { exports: {} };
42012
42012
  O.innerHTML = " " + a.name;
42013
42013
  var k = document.createElement("span");
42014
42014
  d.appendChild(k), k.appendChild(w), k.appendChild(O);
42015
- var W = a.overlay ? this._overlaysList : this._baseLayersList;
42016
- return W.appendChild(d), this._checkDisabledLayers(), d;
42015
+ var F = a.overlay ? this._overlaysList : this._baseLayersList;
42016
+ return F.appendChild(d), this._checkDisabledLayers(), d;
42017
42017
  },
42018
42018
  _onInputClick: function() {
42019
42019
  if (!this._preventClick) {
@@ -42319,18 +42319,18 @@ var db = { exports: {} };
42319
42319
  }
42320
42320
  });
42321
42321
  function jh(a, d, g) {
42322
- var w, O = [1, 4, 2, 8], k, W, et, ot, dt, Pt, kt, Yt;
42322
+ var w, O = [1, 4, 2, 8], k, F, et, ot, dt, Pt, kt, Yt;
42323
42323
  for (k = 0, Pt = a.length; k < Pt; k++)
42324
42324
  a[k]._code = yi(a[k], d);
42325
42325
  for (et = 0; et < 4; et++) {
42326
- for (kt = O[et], w = [], k = 0, Pt = a.length, W = Pt - 1; k < Pt; W = k++)
42327
- ot = a[k], dt = a[W], ot._code & kt ? dt._code & kt || (Yt = gi(dt, ot, kt, d, g), Yt._code = yi(Yt, d), w.push(Yt)) : (dt._code & kt && (Yt = gi(dt, ot, kt, d, g), Yt._code = yi(Yt, d), w.push(Yt)), w.push(ot));
42326
+ for (kt = O[et], w = [], k = 0, Pt = a.length, F = Pt - 1; k < Pt; F = k++)
42327
+ ot = a[k], dt = a[F], ot._code & kt ? dt._code & kt || (Yt = gi(dt, ot, kt, d, g), Yt._code = yi(Yt, d), w.push(Yt)) : (dt._code & kt && (Yt = gi(dt, ot, kt, d, g), Yt._code = yi(Yt, d), w.push(Yt)), w.push(ot));
42328
42328
  a = w;
42329
42329
  }
42330
42330
  return a;
42331
42331
  }
42332
42332
  function za(a, d) {
42333
- var g, w, O, k, W, et, ot, dt, Pt;
42333
+ var g, w, O, k, F, et, ot, dt, Pt;
42334
42334
  if (!a || a.length === 0)
42335
42335
  throw new Error("latlngs not passed");
42336
42336
  or(a) || (console.warn("latlngs are not flat! Only the first ring will be used"), a = a[0]);
@@ -42342,7 +42342,7 @@ var db = { exports: {} };
42342
42342
  St.push(d.project(yt([Dt.lat - kt.lat, Dt.lng - kt.lng])));
42343
42343
  }
42344
42344
  for (et = ot = dt = 0, g = 0, w = ie - 1; g < ie; w = g++)
42345
- O = St[g], k = St[w], W = O.y * k.x - k.y * O.x, ot += (O.x + k.x) * W, dt += (O.y + k.y) * W, et += W * 3;
42345
+ O = St[g], k = St[w], F = O.y * k.x - k.y * O.x, ot += (O.x + k.x) * F, dt += (O.y + k.y) * F, et += F * 3;
42346
42346
  et === 0 ? Pt = St[0] : Pt = [ot / et, dt / et];
42347
42347
  var Kt = d.unproject(q(Pt));
42348
42348
  return yt([Kt.lat + kt.lat, Kt.lng + kt.lng]);
@@ -42375,16 +42375,16 @@ var db = { exports: {} };
42375
42375
  function Bh(a, d) {
42376
42376
  var g = a.length, w = typeof Uint8Array < "u" ? Uint8Array : Array, O = new w(g);
42377
42377
  O[0] = O[g - 1] = 1, Wa(a, O, d, 0, g - 1);
42378
- var k, W = [];
42378
+ var k, F = [];
42379
42379
  for (k = 0; k < g; k++)
42380
- O[k] && W.push(a[k]);
42381
- return W;
42380
+ O[k] && F.push(a[k]);
42381
+ return F;
42382
42382
  }
42383
42383
  function Wa(a, d, g, w, O) {
42384
- var k = 0, W, et, ot;
42384
+ var k = 0, F, et, ot;
42385
42385
  for (et = w + 1; et <= O - 1; et++)
42386
- ot = Rs(a[et], a[w], a[O], !0), ot > k && (W = et, k = ot);
42387
- k > g && (d[W] = 1, Wa(a, d, g, w, W), Wa(a, d, g, W, O));
42386
+ ot = Rs(a[et], a[w], a[O], !0), ot > k && (F = et, k = ot);
42387
+ k > g && (d[F] = 1, Wa(a, d, g, w, F), Wa(a, d, g, F, O));
42388
42388
  }
42389
42389
  function km(a, d) {
42390
42390
  for (var g = [a[0]], w = 1, O = 0, k = a.length; w < k; w++)
@@ -42393,18 +42393,18 @@ var db = { exports: {} };
42393
42393
  }
42394
42394
  var kc;
42395
42395
  function Ns(a, d, g, w, O) {
42396
- var k = w ? kc : yi(a, g), W = yi(d, g), et, ot, dt;
42397
- for (kc = W; ; ) {
42398
- if (!(k | W))
42396
+ var k = w ? kc : yi(a, g), F = yi(d, g), et, ot, dt;
42397
+ for (kc = F; ; ) {
42398
+ if (!(k | F))
42399
42399
  return [a, d];
42400
- if (k & W)
42400
+ if (k & F)
42401
42401
  return !1;
42402
- et = k || W, ot = gi(a, d, et, g, O), dt = yi(ot, g), et === k ? (a = ot, k = dt) : (d = ot, W = dt);
42402
+ et = k || F, ot = gi(a, d, et, g, O), dt = yi(ot, g), et === k ? (a = ot, k = dt) : (d = ot, F = dt);
42403
42403
  }
42404
42404
  }
42405
42405
  function gi(a, d, g, w, O) {
42406
- var k = d.x - a.x, W = d.y - a.y, et = w.min, ot = w.max, dt, Pt;
42407
- return g & 8 ? (dt = a.x + k * (ot.y - a.y) / W, Pt = ot.y) : g & 4 ? (dt = a.x + k * (et.y - a.y) / W, Pt = et.y) : g & 2 ? (dt = ot.x, Pt = a.y + W * (ot.x - a.x) / k) : g & 1 && (dt = et.x, Pt = a.y + W * (et.x - a.x) / k), new J(dt, Pt, O);
42406
+ var k = d.x - a.x, F = d.y - a.y, et = w.min, ot = w.max, dt, Pt;
42407
+ return g & 8 ? (dt = a.x + k * (ot.y - a.y) / F, Pt = ot.y) : g & 4 ? (dt = a.x + k * (et.y - a.y) / F, Pt = et.y) : g & 2 ? (dt = ot.x, Pt = a.y + F * (ot.x - a.x) / k) : g & 1 && (dt = et.x, Pt = a.y + F * (et.x - a.x) / k), new J(dt, Pt, O);
42408
42408
  }
42409
42409
  function yi(a, d) {
42410
42410
  var g = 0;
@@ -42415,8 +42415,8 @@ var db = { exports: {} };
42415
42415
  return g * g + w * w;
42416
42416
  }
42417
42417
  function Rs(a, d, g, w) {
42418
- var O = d.x, k = d.y, W = g.x - O, et = g.y - k, ot = W * W + et * et, dt;
42419
- return ot > 0 && (dt = ((a.x - O) * W + (a.y - k) * et) / ot, dt > 1 ? (O = g.x, k = g.y) : dt > 0 && (O += W * dt, k += et * dt)), W = a.x - O, et = a.y - k, w ? W * W + et * et : new J(O, k);
42418
+ var O = d.x, k = d.y, F = g.x - O, et = g.y - k, ot = F * F + et * et, dt;
42419
+ return ot > 0 && (dt = ((a.x - O) * F + (a.y - k) * et) / ot, dt > 1 ? (O = g.x, k = g.y) : dt > 0 && (O += F * dt, k += et * dt)), F = a.x - O, et = a.y - k, w ? F * F + et * et : new J(O, k);
42420
42420
  }
42421
42421
  function or(a) {
42422
42422
  return !A(a[0]) || typeof a[0][0] != "object" && typeof a[0][0] < "u";
@@ -42425,7 +42425,7 @@ var db = { exports: {} };
42425
42425
  return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."), or(a);
42426
42426
  }
42427
42427
  function $c(a, d) {
42428
- var g, w, O, k, W, et, ot, dt;
42428
+ var g, w, O, k, F, et, ot, dt;
42429
42429
  if (!a || a.length === 0)
42430
42430
  throw new Error("latlngs not passed");
42431
42431
  or(a) || (console.warn("latlngs are not flat! Only the first ring will be used"), a = a[0]);
@@ -42442,10 +42442,10 @@ var db = { exports: {} };
42442
42442
  dt = ie[0];
42443
42443
  else
42444
42444
  for (g = 0, k = 0; g < hn - 1; g++)
42445
- if (W = ie[g], et = ie[g + 1], O = W.distanceTo(et), k += O, k > w) {
42445
+ if (F = ie[g], et = ie[g + 1], O = F.distanceTo(et), k += O, k > w) {
42446
42446
  ot = (k - w) / O, dt = [
42447
- et.x - ot * (et.x - W.x),
42448
- et.y - ot * (et.y - W.y)
42447
+ et.x - ot * (et.x - F.x),
42448
+ et.y - ot * (et.y - F.y)
42449
42449
  ];
42450
42450
  break;
42451
42451
  }
@@ -42469,7 +42469,7 @@ var db = { exports: {} };
42469
42469
  return new J(a.lng, a.lat);
42470
42470
  },
42471
42471
  unproject: function(a) {
42472
- return new mt(a.y, a.x);
42472
+ return new gt(a.y, a.x);
42473
42473
  },
42474
42474
  bounds: new nt([-180, -90], [180, 90])
42475
42475
  }, mn = {
@@ -42477,13 +42477,13 @@ var db = { exports: {} };
42477
42477
  R_MINOR: 6356752314245179e-9,
42478
42478
  bounds: new nt([-2003750834279e-5, -1549657073972e-5], [2003750834279e-5, 1876465623138e-5]),
42479
42479
  project: function(a) {
42480
- var d = Math.PI / 180, g = this.R, w = a.lat * d, O = this.R_MINOR / g, k = Math.sqrt(1 - O * O), W = k * Math.sin(w), et = Math.tan(Math.PI / 4 - w / 2) / Math.pow((1 - W) / (1 + W), k / 2);
42480
+ var d = Math.PI / 180, g = this.R, w = a.lat * d, O = this.R_MINOR / g, k = Math.sqrt(1 - O * O), F = k * Math.sin(w), et = Math.tan(Math.PI / 4 - w / 2) / Math.pow((1 - F) / (1 + F), k / 2);
42481
42481
  return w = -g * Math.log(Math.max(et, 1e-10)), new J(a.lng * d * g, w);
42482
42482
  },
42483
42483
  unproject: function(a) {
42484
- for (var d = 180 / Math.PI, g = this.R, w = this.R_MINOR / g, O = Math.sqrt(1 - w * w), k = Math.exp(-a.y / g), W = Math.PI / 2 - 2 * Math.atan(k), et = 0, ot = 0.1, dt; et < 15 && Math.abs(ot) > 1e-7; et++)
42485
- dt = O * Math.sin(W), dt = Math.pow((1 - dt) / (1 + dt), O / 2), ot = Math.PI / 2 - 2 * Math.atan(k * dt) - W, W += ot;
42486
- return new mt(W * d, a.x * d / g);
42484
+ for (var d = 180 / Math.PI, g = this.R, w = this.R_MINOR / g, O = Math.sqrt(1 - w * w), k = Math.exp(-a.y / g), F = Math.PI / 2 - 2 * Math.atan(k), et = 0, ot = 0.1, dt; et < 15 && Math.abs(ot) > 1e-7; et++)
42485
+ dt = O * Math.sin(F), dt = Math.pow((1 - dt) / (1 + dt), O / 2), ot = Math.PI / 2 - 2 * Math.atan(k * dt) - F, F += ot;
42486
+ return new gt(F * d, a.x * d / g);
42487
42487
  }
42488
42488
  }, Fh = {
42489
42489
  __proto__: null,
@@ -42898,14 +42898,14 @@ var db = { exports: {} };
42898
42898
  return this._draggable && this._draggable._moved;
42899
42899
  },
42900
42900
  _adjustPan: function(a) {
42901
- var d = this._marker, g = d._map, w = this._marker.options.autoPanSpeed, O = this._marker.options.autoPanPadding, k = Ae(d._icon), W = g.getPixelBounds(), et = g.getPixelOrigin(), ot = it(
42902
- W.min._subtract(et).add(O),
42903
- W.max._subtract(et).subtract(O)
42901
+ var d = this._marker, g = d._map, w = this._marker.options.autoPanSpeed, O = this._marker.options.autoPanPadding, k = Ae(d._icon), F = g.getPixelBounds(), et = g.getPixelOrigin(), ot = it(
42902
+ F.min._subtract(et).add(O),
42903
+ F.max._subtract(et).subtract(O)
42904
42904
  );
42905
42905
  if (!ot.contains(k)) {
42906
42906
  var dt = q(
42907
- (Math.max(ot.max.x, k.x) - ot.max.x) / (W.max.x - ot.max.x) - (Math.min(ot.min.x, k.x) - ot.min.x) / (W.min.x - ot.min.x),
42908
- (Math.max(ot.max.y, k.y) - ot.max.y) / (W.max.y - ot.max.y) - (Math.min(ot.min.y, k.y) - ot.min.y) / (W.min.y - ot.min.y)
42907
+ (Math.max(ot.max.x, k.x) - ot.max.x) / (F.max.x - ot.max.x) - (Math.min(ot.min.x, k.x) - ot.min.x) / (F.min.x - ot.min.x),
42908
+ (Math.max(ot.max.y, k.y) - ot.max.y) / (F.max.y - ot.max.y) - (Math.min(ot.min.y, k.y) - ot.min.y) / (F.min.y - ot.min.y)
42909
42909
  ).multiplyBy(w);
42910
42910
  g.panBy(dt, { animate: !1 }), this._draggable._newPos._add(dt), this._draggable._startPos._add(dt), Me(d._icon, this._draggable._newPos), this._onDrag(a), this._panRequest = j(this._adjustPan.bind(this, a));
42911
42911
  }
@@ -43287,8 +43287,8 @@ var db = { exports: {} };
43287
43287
  _project: function() {
43288
43288
  var a = this._latlng.lng, d = this._latlng.lat, g = this._map, w = g.options.crs;
43289
43289
  if (w.distance === Tt.distance) {
43290
- var O = Math.PI / 180, k = this._mRadius / Tt.R / O, W = g.project([d + k, a]), et = g.project([d - k, a]), ot = W.add(et).divideBy(2), dt = g.unproject(ot).lat, Pt = Math.acos((Math.cos(k * O) - Math.sin(d * O) * Math.sin(dt * O)) / (Math.cos(d * O) * Math.cos(dt * O))) / O;
43291
- (isNaN(Pt) || Pt === 0) && (Pt = k / Math.cos(Math.PI / 180 * d)), this._point = ot.subtract(g.getPixelOrigin()), this._radius = isNaN(Pt) ? 0 : ot.x - g.project([dt, a - Pt]).x, this._radiusY = ot.y - W.y;
43290
+ var O = Math.PI / 180, k = this._mRadius / Tt.R / O, F = g.project([d + k, a]), et = g.project([d - k, a]), ot = F.add(et).divideBy(2), dt = g.unproject(ot).lat, Pt = Math.acos((Math.cos(k * O) - Math.sin(d * O) * Math.sin(dt * O)) / (Math.cos(d * O) * Math.cos(dt * O))) / O;
43291
+ (isNaN(Pt) || Pt === 0) && (Pt = k / Math.cos(Math.PI / 180 * d)), this._point = ot.subtract(g.getPixelOrigin()), this._radius = isNaN(Pt) ? 0 : ot.x - g.project([dt, a - Pt]).x, this._radiusY = ot.y - F.y;
43292
43292
  } else {
43293
43293
  var kt = w.unproject(w.project(this._latlng).subtract([this._mRadius, 0]));
43294
43294
  this._point = g.latLngToLayerPoint(this._latlng), this._radius = this._point.x - g.latLngToLayerPoint(kt).x;
@@ -43332,8 +43332,8 @@ var db = { exports: {} };
43332
43332
  // @method closestLayerPoint(p: Point): Point
43333
43333
  // Returns the point closest to `p` on the Polyline.
43334
43334
  closestLayerPoint: function(a) {
43335
- for (var d = 1 / 0, g = null, w = Rs, O, k, W = 0, et = this._parts.length; W < et; W++)
43336
- for (var ot = this._parts[W], dt = 1, Pt = ot.length; dt < Pt; dt++) {
43335
+ for (var d = 1 / 0, g = null, w = Rs, O, k, F = 0, et = this._parts.length; F < et; F++)
43336
+ for (var ot = this._parts[F], dt = 1, Pt = ot.length; dt < Pt; dt++) {
43337
43337
  O = ot[dt - 1], k = ot[dt];
43338
43338
  var kt = w(a, O, k, !0);
43339
43339
  kt < d && (d = kt, g = w(a, O, k));
@@ -43384,11 +43384,11 @@ var db = { exports: {} };
43384
43384
  },
43385
43385
  // recursively turns latlngs into a set of rings with projected coordinates
43386
43386
  _projectLatlngs: function(a, d, g) {
43387
- var w = a[0] instanceof mt, O = a.length, k, W;
43387
+ var w = a[0] instanceof gt, O = a.length, k, F;
43388
43388
  if (w) {
43389
- for (W = [], k = 0; k < O; k++)
43390
- W[k] = this._map.latLngToLayerPoint(a[k]), g.extend(W[k]);
43391
- d.push(W);
43389
+ for (F = [], k = 0; k < O; k++)
43390
+ F[k] = this._map.latLngToLayerPoint(a[k]), g.extend(F[k]);
43391
+ d.push(F);
43392
43392
  } else
43393
43393
  for (k = 0; k < O; k++)
43394
43394
  this._projectLatlngs(a[k], d, g);
@@ -43401,10 +43401,10 @@ var db = { exports: {} };
43401
43401
  this._parts = this._rings;
43402
43402
  return;
43403
43403
  }
43404
- var d = this._parts, g, w, O, k, W, et, ot;
43404
+ var d = this._parts, g, w, O, k, F, et, ot;
43405
43405
  for (g = 0, O = 0, k = this._rings.length; g < k; g++)
43406
- for (ot = this._rings[g], w = 0, W = ot.length; w < W - 1; w++)
43407
- et = Ns(ot[w], ot[w + 1], a, w, !0), et && (d[O] = d[O] || [], d[O].push(et[0]), (et[1] !== ot[w + 1] || w === W - 2) && (d[O].push(et[1]), O++));
43406
+ for (ot = this._rings[g], w = 0, F = ot.length; w < F - 1; w++)
43407
+ et = Ns(ot[w], ot[w + 1], a, w, !0), et && (d[O] = d[O] || [], d[O].push(et[0]), (et[1] !== ot[w + 1] || w === F - 2) && (d[O].push(et[1]), O++));
43408
43408
  }
43409
43409
  },
43410
43410
  // simplify each clipped part of the polyline for performance
@@ -43420,11 +43420,11 @@ var db = { exports: {} };
43420
43420
  },
43421
43421
  // Needed by the `Canvas` renderer for interactivity
43422
43422
  _containsPoint: function(a, d) {
43423
- var g, w, O, k, W, et, ot = this._clickTolerance();
43423
+ var g, w, O, k, F, et, ot = this._clickTolerance();
43424
43424
  if (!this._pxBounds || !this._pxBounds.contains(a))
43425
43425
  return !1;
43426
43426
  for (g = 0, k = this._parts.length; g < k; g++)
43427
- for (et = this._parts[g], w = 0, W = et.length, O = W - 1; w < W; O = w++)
43427
+ for (et = this._parts[g], w = 0, F = et.length, O = F - 1; w < F; O = w++)
43428
43428
  if (!(!d && w === 0) && Jr(a, et[O], et[w]) <= ot)
43429
43429
  return !0;
43430
43430
  return !1;
@@ -43450,7 +43450,7 @@ var db = { exports: {} };
43450
43450
  },
43451
43451
  _convertLatLngs: function(a) {
43452
43452
  var d = ar.prototype._convertLatLngs.call(this, a), g = d.length;
43453
- return g >= 2 && d[0] instanceof mt && d[0].equals(d[g - 1]) && d.pop(), d;
43453
+ return g >= 2 && d[0] instanceof gt && d[0].equals(d[g - 1]) && d.pop(), d;
43454
43454
  },
43455
43455
  _setLatLngs: function(a) {
43456
43456
  ar.prototype._setLatLngs.call(this, a), or(this._latlngs) && (this._latlngs = [this._latlngs]);
@@ -43474,12 +43474,12 @@ var db = { exports: {} };
43474
43474
  },
43475
43475
  // Needed by the `Canvas` renderer for interactivity
43476
43476
  _containsPoint: function(a) {
43477
- var d = !1, g, w, O, k, W, et, ot, dt;
43477
+ var d = !1, g, w, O, k, F, et, ot, dt;
43478
43478
  if (!this._pxBounds || !this._pxBounds.contains(a))
43479
43479
  return !1;
43480
43480
  for (k = 0, ot = this._parts.length; k < ot; k++)
43481
- for (g = this._parts[k], W = 0, dt = g.length, et = dt - 1; W < dt; et = W++)
43482
- w = g[W], O = g[et], w.y > a.y != O.y > a.y && a.x < (O.x - w.x) * (a.y - w.y) / (O.y - w.y) + w.x && (d = !d);
43481
+ for (g = this._parts[k], F = 0, dt = g.length, et = dt - 1; F < dt; et = F++)
43482
+ w = g[F], O = g[et], w.y > a.y != O.y > a.y && a.x < (O.x - w.x) * (a.y - w.y) / (O.y - w.y) + w.x && (d = !d);
43483
43483
  return d || ar.prototype._containsPoint.call(this, a, !0);
43484
43484
  }
43485
43485
  });
@@ -43551,8 +43551,8 @@ var db = { exports: {} };
43551
43551
  var k = this.options;
43552
43552
  if (k.filter && !k.filter(a))
43553
43553
  return this;
43554
- var W = js(a, k);
43555
- return W ? (W.feature = Bs(a), W.defaultOptions = W.options, this.resetStyle(W), k.onEachFeature && k.onEachFeature(a, W), this.addLayer(W)) : this;
43554
+ var F = js(a, k);
43555
+ return F ? (F.feature = Bs(a), F.defaultOptions = F.options, this.resetStyle(F), k.onEachFeature && k.onEachFeature(a, F), this.addLayer(F)) : this;
43556
43556
  },
43557
43557
  // @method resetStyle( <Path> layer? ): this
43558
43558
  // Resets the given vector layer's style to the original GeoJSON style, useful for resetting style after hover events.
@@ -43572,22 +43572,22 @@ var db = { exports: {} };
43572
43572
  }
43573
43573
  });
43574
43574
  function js(a, d) {
43575
- var g = a.type === "Feature" ? a.geometry : a, w = g ? g.coordinates : null, O = [], k = d && d.pointToLayer, W = d && d.coordsToLatLng || Lc, et, ot, dt, Pt;
43575
+ var g = a.type === "Feature" ? a.geometry : a, w = g ? g.coordinates : null, O = [], k = d && d.pointToLayer, F = d && d.coordsToLatLng || Lc, et, ot, dt, Pt;
43576
43576
  if (!w && !g)
43577
43577
  return null;
43578
43578
  switch (g.type) {
43579
43579
  case "Point":
43580
- return et = W(w), Lm(k, a, et, d);
43580
+ return et = F(w), Lm(k, a, et, d);
43581
43581
  case "MultiPoint":
43582
43582
  for (dt = 0, Pt = w.length; dt < Pt; dt++)
43583
- et = W(w[dt]), O.push(Lm(k, a, et, d));
43583
+ et = F(w[dt]), O.push(Lm(k, a, et, d));
43584
43584
  return new Mr(O);
43585
43585
  case "LineString":
43586
43586
  case "MultiLineString":
43587
- return ot = Nc(w, g.type === "LineString" ? 0 : 1, W), new ar(ot, d);
43587
+ return ot = Nc(w, g.type === "LineString" ? 0 : 1, F), new ar(ot, d);
43588
43588
  case "Polygon":
43589
43589
  case "MultiPolygon":
43590
- return ot = Nc(w, g.type === "Polygon" ? 1 : 2, W), new Fo(ot, d);
43590
+ return ot = Nc(w, g.type === "Polygon" ? 1 : 2, F), new Fo(ot, d);
43591
43591
  case "GeometryCollection":
43592
43592
  for (dt = 0, Pt = g.geometries.length; dt < Pt; dt++) {
43593
43593
  var kt = js({
@@ -43612,18 +43612,18 @@ var db = { exports: {} };
43612
43612
  return a ? a(d, g) : new Ds(g, w && w.markersInheritOptions && w);
43613
43613
  }
43614
43614
  function Lc(a) {
43615
- return new mt(a[1], a[0], a[2]);
43615
+ return new gt(a[1], a[0], a[2]);
43616
43616
  }
43617
43617
  function Nc(a, d, g) {
43618
- for (var w = [], O = 0, k = a.length, W; O < k; O++)
43619
- W = d ? Nc(a[O], d - 1, g) : (g || Lc)(a[O]), w.push(W);
43618
+ for (var w = [], O = 0, k = a.length, F; O < k; O++)
43619
+ F = d ? Nc(a[O], d - 1, g) : (g || Lc)(a[O]), w.push(F);
43620
43620
  return w;
43621
43621
  }
43622
43622
  function Rc(a, d) {
43623
43623
  return a = yt(a), a.alt !== void 0 ? [m(a.lng, d), m(a.lat, d), m(a.alt, d)] : [m(a.lng, d), m(a.lat, d)];
43624
43624
  }
43625
43625
  function br(a, d, g, w) {
43626
- for (var O = [], k = 0, W = a.length; k < W; k++)
43626
+ for (var O = [], k = 0, F = a.length; k < F; k++)
43627
43627
  O.push(d ? br(a[k], or(a[k]) ? 0 : d - 1, g, w) : Rc(a[k], w));
43628
43628
  return !d && g && O.length > 0 && O.push(O[0].slice()), O;
43629
43629
  }
@@ -43685,8 +43685,8 @@ var db = { exports: {} };
43685
43685
  if (g)
43686
43686
  w.push(k.geometry);
43687
43687
  else {
43688
- var W = Bs(k);
43689
- W.type === "FeatureCollection" ? w.push.apply(w, W.features) : w.push(W);
43688
+ var F = Bs(k);
43689
+ F.type === "FeatureCollection" ? w.push.apply(w, F.features) : w.push(F);
43690
43690
  }
43691
43691
  }
43692
43692
  }), g ? eo(this, {
@@ -43858,8 +43858,8 @@ var db = { exports: {} };
43858
43858
  }
43859
43859
  A(this._url) || (this._url = [this._url]), !this.options.keepAspectRatio && Object.prototype.hasOwnProperty.call(d.style, "objectFit") && (d.style.objectFit = "fill"), d.autoplay = !!this.options.autoplay, d.loop = !!this.options.loop, d.muted = !!this.options.muted, d.playsInline = !!this.options.playsInline;
43860
43860
  for (var k = 0; k < this._url.length; k++) {
43861
- var W = te("source");
43862
- W.src = this._url[k], d.appendChild(W);
43861
+ var F = te("source");
43862
+ F.src = this._url[k], d.appendChild(F);
43863
43863
  }
43864
43864
  }
43865
43865
  // @method getElement(): HTMLVideoElement
@@ -43903,7 +43903,7 @@ var db = { exports: {} };
43903
43903
  content: ""
43904
43904
  },
43905
43905
  initialize: function(a, d) {
43906
- a && (a instanceof mt || A(a)) ? (this._latlng = yt(a), p(this, d)) : (p(this, a), this._source = d), this.options.content && (this._content = this.options.content);
43906
+ a && (a instanceof gt || A(a)) ? (this._latlng = yt(a), p(this, d)) : (p(this, a), this._source = d), this.options.content && (this._content = this.options.content);
43907
43907
  },
43908
43908
  // @method openOn(map: Map): this
43909
43909
  // Adds the overlay to the map.
@@ -44157,7 +44157,7 @@ var db = { exports: {} };
44157
44157
  }
44158
44158
  var a = this._map, d = parseInt(Mn(this._container, "marginBottom"), 10) || 0, g = this._container.offsetHeight + d, w = this._containerWidth, O = new J(this._containerLeft, -g - this._containerBottom);
44159
44159
  O._add(Ae(this._container));
44160
- var k = a.layerPointToContainerPoint(O), W = q(this.options.autoPanPadding), et = q(this.options.autoPanPaddingTopLeft || W), ot = q(this.options.autoPanPaddingBottomRight || W), dt = a.getSize(), Pt = 0, kt = 0;
44160
+ var k = a.layerPointToContainerPoint(O), F = q(this.options.autoPanPadding), et = q(this.options.autoPanPaddingTopLeft || F), ot = q(this.options.autoPanPaddingBottomRight || F), dt = a.getSize(), Pt = 0, kt = 0;
44161
44161
  k.x + w + ot.x > dt.x && (Pt = k.x + w - dt.x + ot.x), k.x - Pt - et.x < 0 && (Pt = k.x - et.x), k.y + g + ot.y > dt.y && (kt = k.y + g - dt.y + ot.y), k.y - kt - et.y < 0 && (kt = k.y - et.y), (Pt || kt) && (this.options.keepInView && (this._autopanning = !0), a.fire("autopanstart").panBy([Pt, kt]));
44162
44162
  }
44163
44163
  },
@@ -44299,8 +44299,8 @@ var db = { exports: {} };
44299
44299
  _adjustPan: function() {
44300
44300
  },
44301
44301
  _setPosition: function(a) {
44302
- var d, g, w = this._map, O = this._container, k = w.latLngToContainerPoint(w.getCenter()), W = w.layerPointToContainerPoint(a), et = this.options.direction, ot = O.offsetWidth, dt = O.offsetHeight, Pt = q(this.options.offset), kt = this._getAnchor();
44303
- et === "top" ? (d = ot / 2, g = dt) : et === "bottom" ? (d = ot / 2, g = 0) : et === "center" ? (d = ot / 2, g = dt / 2) : et === "right" ? (d = 0, g = dt / 2) : et === "left" ? (d = ot, g = dt / 2) : W.x < k.x ? (et = "right", d = 0, g = dt / 2) : (et = "left", d = ot + (Pt.x + kt.x) * 2, g = dt / 2), a = a.subtract(q(d, g, !0)).add(Pt).add(kt), se(O, "leaflet-tooltip-right"), se(O, "leaflet-tooltip-left"), se(O, "leaflet-tooltip-top"), se(O, "leaflet-tooltip-bottom"), It(O, "leaflet-tooltip-" + et), Me(O, a);
44302
+ var d, g, w = this._map, O = this._container, k = w.latLngToContainerPoint(w.getCenter()), F = w.layerPointToContainerPoint(a), et = this.options.direction, ot = O.offsetWidth, dt = O.offsetHeight, Pt = q(this.options.offset), kt = this._getAnchor();
44303
+ et === "top" ? (d = ot / 2, g = dt) : et === "bottom" ? (d = ot / 2, g = 0) : et === "center" ? (d = ot / 2, g = dt / 2) : et === "right" ? (d = 0, g = dt / 2) : et === "left" ? (d = ot, g = dt / 2) : F.x < k.x ? (et = "right", d = 0, g = dt / 2) : (et = "left", d = ot + (Pt.x + kt.x) * 2, g = dt / 2), a = a.subtract(q(d, g, !0)).add(Pt).add(kt), se(O, "leaflet-tooltip-right"), se(O, "leaflet-tooltip-left"), se(O, "leaflet-tooltip-top"), se(O, "leaflet-tooltip-bottom"), It(O, "leaflet-tooltip-" + et), Me(O, a);
44304
44304
  },
44305
44305
  _updatePosition: function() {
44306
44306
  var a = this._map.latLngToLayerPoint(this._latlng);
@@ -44658,17 +44658,17 @@ var db = { exports: {} };
44658
44658
  this._removeAllTiles(), this._tileZoom = void 0;
44659
44659
  },
44660
44660
  _retainParent: function(a, d, g, w) {
44661
- var O = Math.floor(a / 2), k = Math.floor(d / 2), W = g - 1, et = new J(+O, +k);
44662
- et.z = +W;
44661
+ var O = Math.floor(a / 2), k = Math.floor(d / 2), F = g - 1, et = new J(+O, +k);
44662
+ et.z = +F;
44663
44663
  var ot = this._tileCoordsToKey(et), dt = this._tiles[ot];
44664
- return dt && dt.active ? (dt.retain = !0, !0) : (dt && dt.loaded && (dt.retain = !0), W > w ? this._retainParent(O, k, W, w) : !1);
44664
+ return dt && dt.active ? (dt.retain = !0, !0) : (dt && dt.loaded && (dt.retain = !0), F > w ? this._retainParent(O, k, F, w) : !1);
44665
44665
  },
44666
44666
  _retainChildren: function(a, d, g, w) {
44667
44667
  for (var O = 2 * a; O < 2 * a + 2; O++)
44668
44668
  for (var k = 2 * d; k < 2 * d + 2; k++) {
44669
- var W = new J(O, k);
44670
- W.z = g + 1;
44671
- var et = this._tileCoordsToKey(W), ot = this._tiles[et];
44669
+ var F = new J(O, k);
44670
+ F.z = g + 1;
44671
+ var et = this._tileCoordsToKey(F), ot = this._tiles[et];
44672
44672
  if (ot && ot.active) {
44673
44673
  ot.retain = !0;
44674
44674
  continue;
@@ -44724,7 +44724,7 @@ var db = { exports: {} };
44724
44724
  if (d) {
44725
44725
  var g = this._clampZoom(d.getZoom());
44726
44726
  if (a === void 0 && (a = d.getCenter()), this._tileZoom !== void 0) {
44727
- var w = this._getTiledPixelBounds(a), O = this._pxBoundsToTileRange(w), k = O.getCenter(), W = [], et = this.options.keepBuffer, ot = new nt(
44727
+ var w = this._getTiledPixelBounds(a), O = this._pxBoundsToTileRange(w), k = O.getCenter(), F = [], et = this.options.keepBuffer, ot = new nt(
44728
44728
  O.getBottomLeft().subtract([et, -et]),
44729
44729
  O.getTopRight().add([et, -et])
44730
44730
  );
@@ -44743,16 +44743,16 @@ var db = { exports: {} };
44743
44743
  var hn = new J(Yt, kt);
44744
44744
  if (hn.z = this._tileZoom, !!this._isValidTile(hn)) {
44745
44745
  var ie = this._tiles[this._tileCoordsToKey(hn)];
44746
- ie ? ie.current = !0 : W.push(hn);
44746
+ ie ? ie.current = !0 : F.push(hn);
44747
44747
  }
44748
44748
  }
44749
- if (W.sort(function(Dt, Kt) {
44749
+ if (F.sort(function(Dt, Kt) {
44750
44750
  return Dt.distanceTo(k) - Kt.distanceTo(k);
44751
- }), W.length !== 0) {
44751
+ }), F.length !== 0) {
44752
44752
  this._loading || (this._loading = !0, this.fire("loading"));
44753
44753
  var St = document.createDocumentFragment();
44754
- for (Yt = 0; Yt < W.length; Yt++)
44755
- this._addTile(W[Yt], St);
44754
+ for (Yt = 0; Yt < F.length; Yt++)
44755
+ this._addTile(F[Yt], St);
44756
44756
  this._level.el.appendChild(St);
44757
44757
  }
44758
44758
  }
@@ -44774,8 +44774,8 @@ var db = { exports: {} };
44774
44774
  return this._tileCoordsToBounds(this._keyToTileCoords(a));
44775
44775
  },
44776
44776
  _tileCoordsToNwSe: function(a) {
44777
- var d = this._map, g = this.getTileSize(), w = a.scaleBy(g), O = w.add(g), k = d.unproject(w, a.z), W = d.unproject(O, a.z);
44778
- return [k, W];
44777
+ var d = this._map, g = this.getTileSize(), w = a.scaleBy(g), O = w.add(g), k = d.unproject(w, a.z), F = d.unproject(O, a.z);
44778
+ return [k, F];
44779
44779
  },
44780
44780
  // converts tile coordinates to its geographical bounds
44781
44781
  _tileCoordsToBounds: function(a) {
@@ -45025,8 +45025,8 @@ var db = { exports: {} };
45025
45025
  this.wmsParams[d] = this._crs.code, no.prototype.onAdd.call(this, a);
45026
45026
  },
45027
45027
  getTileUrl: function(a) {
45028
- var d = this._tileCoordsToNwSe(a), g = this._crs, w = it(g.project(d[0]), g.project(d[1])), O = w.min, k = w.max, W = (this._wmsVersion >= 1.3 && this._crs === Va ? [O.y, O.x, k.y, k.x] : [O.x, O.y, k.x, k.y]).join(","), et = no.prototype.getTileUrl.call(this, a);
45029
- return et + v(this.wmsParams, et, this.options.uppercase) + (this.options.uppercase ? "&BBOX=" : "&bbox=") + W;
45028
+ var d = this._tileCoordsToNwSe(a), g = this._crs, w = it(g.project(d[0]), g.project(d[1])), O = w.min, k = w.max, F = (this._wmsVersion >= 1.3 && this._crs === Va ? [O.y, O.x, k.y, k.x] : [O.x, O.y, k.x, k.y]).join(","), et = no.prototype.getTileUrl.call(this, a);
45029
+ return et + v(this.wmsParams, et, this.options.uppercase) + (this.options.uppercase ? "&BBOX=" : "&bbox=") + F;
45030
45030
  },
45031
45031
  // @method setParams(params: Object, noRedraw?: Boolean): this
45032
45032
  // Merges an object with the new parameters and re-requests tiles on the current screen (unless `noRedraw` was set to true).
@@ -45203,11 +45203,11 @@ var db = { exports: {} };
45203
45203
  },
45204
45204
  _updatePoly: function(a, d) {
45205
45205
  if (this._drawing) {
45206
- var g, w, O, k, W = a._parts, et = W.length, ot = this._ctx;
45206
+ var g, w, O, k, F = a._parts, et = F.length, ot = this._ctx;
45207
45207
  if (et) {
45208
45208
  for (ot.beginPath(), g = 0; g < et; g++) {
45209
- for (w = 0, O = W[g].length; w < O; w++)
45210
- k = W[g][w], ot[w ? "lineTo" : "moveTo"](k.x, k.y);
45209
+ for (w = 0, O = F[g].length; w < O; w++)
45210
+ k = F[g][w], ot[w ? "lineTo" : "moveTo"](k.x, k.y);
45211
45211
  d && ot.closePath();
45212
45212
  }
45213
45213
  this._fillStroke(ot, a);
@@ -45425,7 +45425,7 @@ var db = { exports: {} };
45425
45425
  // dragging the mouse while pressing the shift key.
45426
45426
  boxZoom: !0
45427
45427
  });
45428
- var F = ir.extend({
45428
+ var W = ir.extend({
45429
45429
  initialize: function(a) {
45430
45430
  this._map = a, this._container = a._container, this._pane = a._panes.overlayPane, this._resetStateTimeout = 0, a.on("unload", this._destroy, this);
45431
45431
  },
@@ -45484,7 +45484,7 @@ var db = { exports: {} };
45484
45484
  a.keyCode === 27 && (this._finish(), this._clearDeferredResetState(), this._resetState());
45485
45485
  }
45486
45486
  });
45487
- Zt.addInitHook("addHandler", "boxZoom", F), Zt.mergeOptions({
45487
+ Zt.addInitHook("addHandler", "boxZoom", W), Zt.mergeOptions({
45488
45488
  // @option doubleClickZoom: Boolean|String = true
45489
45489
  // Whether the map can be zoomed in by double clicking on it and
45490
45490
  // zoomed out by double clicking while holding shift. If passed
@@ -45597,8 +45597,8 @@ var db = { exports: {} };
45597
45597
  }
45598
45598
  },
45599
45599
  _onPreDragWrap: function() {
45600
- var a = this._worldWidth, d = Math.round(a / 2), g = this._initialWorldOffset, w = this._draggable._newPos.x, O = (w - d + g) % a + d - g, k = (w + d + g) % a - d - g, W = Math.abs(O + g) < Math.abs(k + g) ? O : k;
45601
- this._draggable._absPos = this._draggable._newPos.clone(), this._draggable._newPos.x = W;
45600
+ var a = this._worldWidth, d = Math.round(a / 2), g = this._initialWorldOffset, w = this._draggable._newPos.x, O = (w - d + g) % a + d - g, k = (w + d + g) % a - d - g, F = Math.abs(O + g) < Math.abs(k + g) ? O : k;
45601
+ this._draggable._absPos = this._draggable._newPos.clone(), this._draggable._newPos.x = F;
45602
45602
  },
45603
45603
  _onDragEnd: function(a) {
45604
45604
  var d = this._map, g = d.options, w = !g.inertia || a.noInertia || this._times.length < 2;
@@ -45606,11 +45606,11 @@ var db = { exports: {} };
45606
45606
  d.fire("moveend");
45607
45607
  else {
45608
45608
  this._prunePositions(+/* @__PURE__ */ new Date());
45609
- var O = this._lastPos.subtract(this._positions[0]), k = (this._lastTime - this._times[0]) / 1e3, W = g.easeLinearity, et = O.multiplyBy(W / k), ot = et.distanceTo([0, 0]), dt = Math.min(g.inertiaMaxSpeed, ot), Pt = et.multiplyBy(dt / ot), kt = dt / (g.inertiaDeceleration * W), Yt = Pt.multiplyBy(-kt / 2).round();
45609
+ var O = this._lastPos.subtract(this._positions[0]), k = (this._lastTime - this._times[0]) / 1e3, F = g.easeLinearity, et = O.multiplyBy(F / k), ot = et.distanceTo([0, 0]), dt = Math.min(g.inertiaMaxSpeed, ot), Pt = et.multiplyBy(dt / ot), kt = dt / (g.inertiaDeceleration * F), Yt = Pt.multiplyBy(-kt / 2).round();
45610
45610
  !Yt.x && !Yt.y ? d.fire("moveend") : (Yt = d._limitOffset(Yt, d.options.maxBounds), j(function() {
45611
45611
  d.panBy(Yt, {
45612
45612
  duration: kt,
45613
- easeLinearity: W,
45613
+ easeLinearity: F,
45614
45614
  noMoveStart: !0,
45615
45615
  animate: !0
45616
45616
  });
@@ -45748,12 +45748,12 @@ var db = { exports: {} };
45748
45748
  _performZoom: function() {
45749
45749
  var a = this._map, d = a.getZoom(), g = this._map.options.zoomSnap || 0;
45750
45750
  a._stop();
45751
- var w = this._delta / (this._map.options.wheelPxPerZoomLevel * 4), O = 4 * Math.log(2 / (1 + Math.exp(-Math.abs(w)))) / Math.LN2, k = g ? Math.ceil(O / g) * g : O, W = a._limitZoom(d + (this._delta > 0 ? k : -k)) - d;
45752
- this._delta = 0, this._startTime = null, W && (a.options.scrollWheelZoom === "center" ? a.setZoom(d + W) : a.setZoomAround(this._lastMousePos, d + W));
45751
+ var w = this._delta / (this._map.options.wheelPxPerZoomLevel * 4), O = 4 * Math.log(2 / (1 + Math.exp(-Math.abs(w)))) / Math.LN2, k = g ? Math.ceil(O / g) * g : O, F = a._limitZoom(d + (this._delta > 0 ? k : -k)) - d;
45752
+ this._delta = 0, this._startTime = null, F && (a.options.scrollWheelZoom === "center" ? a.setZoom(d + F) : a.setZoomAround(this._lastMousePos, d + F));
45753
45753
  }
45754
45754
  });
45755
45755
  Zt.addInitHook("addHandler", "scrollWheelZoom", st);
45756
- var gt = 600;
45756
+ var mt = 600;
45757
45757
  Zt.mergeOptions({
45758
45758
  // @section Touch interaction options
45759
45759
  // @option tapHold: Boolean
@@ -45776,7 +45776,7 @@ var db = { exports: {} };
45776
45776
  var d = a.touches[0];
45777
45777
  this._startPos = this._newPos = new J(d.clientX, d.clientY), this._holdTimeout = setTimeout(s(function() {
45778
45778
  this._cancel(), this._isTapValid() && (jt(document, "touchend", tn), jt(document, "touchend touchcancel", this._cancelClickPrevent), this._simulateEvent("contextmenu", d));
45779
- }, this), gt), jt(document, "touchend touchcancel contextmenu", this._cancel, this), jt(document, "touchmove", this._onMove, this);
45779
+ }, this), mt), jt(document, "touchend touchcancel contextmenu", this._cancel, this), jt(document, "touchmove", this._onMove, this);
45780
45780
  }
45781
45781
  },
45782
45782
  _cancelClickPrevent: function a() {
@@ -45848,8 +45848,8 @@ var db = { exports: {} };
45848
45848
  this._center = d.unproject(d.project(this._pinchStartLatLng, this._zoom).subtract(k), this._zoom);
45849
45849
  }
45850
45850
  this._moved || (d._moveStart(!0, !1), this._moved = !0), D(this._animRequest);
45851
- var W = s(d._move, d, this._center, this._zoom, { pinch: !0, round: !1 }, void 0);
45852
- this._animRequest = j(W, this, !0), tn(a);
45851
+ var F = s(d._move, d, this._center, this._zoom, { pinch: !0, round: !1 }, void 0);
45852
+ this._animRequest = j(F, this, !0), tn(a);
45853
45853
  }
45854
45854
  },
45855
45855
  _onTouchEnd: function() {
@@ -45860,7 +45860,7 @@ var db = { exports: {} };
45860
45860
  this._zooming = !1, D(this._animRequest), Te(document, "touchmove", this._onTouchMove, this), Te(document, "touchend touchcancel", this._onTouchEnd, this), this._map.options.zoomAnimation ? this._map._animateZoom(this._center, this._map._limitZoom(this._zoom), !0, this._map.options.zoomSnap) : this._map._resetView(this._center, this._map._limitZoom(this._zoom));
45861
45861
  }
45862
45862
  });
45863
- Zt.addInitHook("addHandler", "touchZoom", pt), Zt.BoxZoom = F, Zt.DoubleClickZoom = Q, Zt.Drag = tt, Zt.Keyboard = X, Zt.ScrollWheelZoom = st, Zt.TapHold = vt, Zt.TouchZoom = pt, n.Bounds = nt, n.Browser = $t, n.CRS = Et, n.Canvas = zc, n.Circle = to, n.CircleMarker = Qi, n.Class = H, n.Control = zn, n.DivIcon = Dc, n.DivOverlay = $r, n.DomEvent = Tc, n.DomUtil = Om, n.Draggable = Yn, n.Evented = G, n.FeatureGroup = Mr, n.GeoJSON = ti, n.GridLayer = Wo, n.Handler = ir, n.Icon = bi, n.ImageOverlay = qa, n.LatLng = mt, n.LatLngBounds = at, n.Layer = sr, n.LayerGroup = vi, n.LineUtil = Im, n.Map = Zt, n.Marker = Ds, n.Mixin = Cc, n.Path = Qr, n.Point = J, n.PolyUtil = Ji, n.Polygon = Fo, n.Polyline = ar, n.Popup = Ga, n.PosAnimation = Ec, n.Projection = Fh, n.Rectangle = Z, n.Renderer = Ir, n.SVG = $, n.SVGOverlay = Yh, n.TileLayer = no, n.Tooltip = Fs, n.Transformation = Ot, n.Util = K, n.VideoOverlay = Zh, n.bind = s, n.bounds = it, n.canvas = Fc, n.circle = Hh, n.circleMarker = he, n.control = Ls, n.divIcon = Jh, n.extend = i, n.featureGroup = Uh, n.geoJSON = Gh, n.geoJson = Nm, n.gridLayer = Qh, n.icon = Ic, n.imageOverlay = Rm, n.latLng = yt, n.latLngBounds = ct, n.layerGroup = Vh, n.map = Nh, n.marker = zo, n.point = q, n.polygon = qh, n.polyline = Ha, n.popup = Kh, n.rectangle = B, n.setOptions = p, n.stamp = c, n.svg = I, n.svgOverlay = Dm, n.tileLayer = jc, n.tooltip = Xh, n.transformation = rt, n.version = r, n.videoOverlay = Tx;
45863
+ Zt.addInitHook("addHandler", "touchZoom", pt), Zt.BoxZoom = W, Zt.DoubleClickZoom = Q, Zt.Drag = tt, Zt.Keyboard = X, Zt.ScrollWheelZoom = st, Zt.TapHold = vt, Zt.TouchZoom = pt, n.Bounds = nt, n.Browser = $t, n.CRS = Et, n.Canvas = zc, n.Circle = to, n.CircleMarker = Qi, n.Class = H, n.Control = zn, n.DivIcon = Dc, n.DivOverlay = $r, n.DomEvent = Tc, n.DomUtil = Om, n.Draggable = Yn, n.Evented = G, n.FeatureGroup = Mr, n.GeoJSON = ti, n.GridLayer = Wo, n.Handler = ir, n.Icon = bi, n.ImageOverlay = qa, n.LatLng = gt, n.LatLngBounds = at, n.Layer = sr, n.LayerGroup = vi, n.LineUtil = Im, n.Map = Zt, n.Marker = Ds, n.Mixin = Cc, n.Path = Qr, n.Point = J, n.PolyUtil = Ji, n.Polygon = Fo, n.Polyline = ar, n.Popup = Ga, n.PosAnimation = Ec, n.Projection = Fh, n.Rectangle = Z, n.Renderer = Ir, n.SVG = $, n.SVGOverlay = Yh, n.TileLayer = no, n.Tooltip = Fs, n.Transformation = Ot, n.Util = K, n.VideoOverlay = Zh, n.bind = s, n.bounds = it, n.canvas = Fc, n.circle = Hh, n.circleMarker = he, n.control = Ls, n.divIcon = Jh, n.extend = i, n.featureGroup = Uh, n.geoJSON = Gh, n.geoJson = Nm, n.gridLayer = Qh, n.icon = Ic, n.imageOverlay = Rm, n.latLng = yt, n.latLngBounds = ct, n.layerGroup = Vh, n.map = Nh, n.marker = zo, n.point = q, n.polygon = qh, n.polyline = Ha, n.popup = Kh, n.rectangle = B, n.setOptions = p, n.stamp = c, n.svg = I, n.svgOverlay = Dm, n.tileLayer = jc, n.tooltip = Xh, n.transformation = rt, n.version = r, n.videoOverlay = Tx;
45864
45864
  var At = window.L;
45865
45865
  n.noConflict = function() {
45866
45866
  return window.L = At, this;
@@ -48371,9 +48371,9 @@ function Eft(e, t, n = !0) {
48371
48371
  u.columnGap = ct[1];
48372
48372
  continue;
48373
48373
  }
48374
- const mt = p.match(/^gap-y-\[([^\]]+)\]$/);
48375
- if (mt) {
48376
- u.rowGap = mt[1];
48374
+ const gt = p.match(/^gap-y-\[([^\]]+)\]$/);
48375
+ if (gt) {
48376
+ u.rowGap = gt[1];
48377
48377
  continue;
48378
48378
  }
48379
48379
  const yt = p.match(/^rounded-\[([^\]]+)\]$/);
@@ -50245,14 +50245,14 @@ function PT(e, t, n, r, i, o, s) {
50245
50245
  ...(u.actions || []).map(
50246
50246
  (J, lt) => {
50247
50247
  const nt = ((ct) => {
50248
- const mt = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(
50248
+ const gt = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(
50249
50249
  ct
50250
50250
  );
50251
- if (!mt) return !1;
50251
+ if (!gt) return !1;
50252
50252
  const [yt, Et, Tt] = [
50253
- parseInt(mt[1], 16),
50254
- parseInt(mt[2], 16),
50255
- parseInt(mt[3], 16)
50253
+ parseInt(gt[1], 16),
50254
+ parseInt(gt[2], 16),
50255
+ parseInt(gt[3], 16)
50256
50256
  ];
50257
50257
  return (yt * 299 + Et * 587 + Tt * 114) / 1e3 > 150;
50258
50258
  })(t.colors.primary) ? "#000000" : "#ffffff", it = {
@@ -50404,14 +50404,14 @@ function $ft({
50404
50404
  at ? { ...(e == null ? void 0 : e.config) || {}, colorMode: at } : e == null ? void 0 : e.config,
50405
50405
  void 0,
50406
50406
  y
50407
- ), mt = !((Fs = e == null ? void 0 : e.config) != null && Fs.colorMode) && !at && !(y != null && y.colorMode), yt = (M) => Eft(
50407
+ ), gt = !((Fs = e == null ? void 0 : e.config) != null && Fs.colorMode) && !at && !(y != null && y.colorMode), yt = (M) => Eft(
50408
50408
  M,
50409
50409
  {
50410
50410
  primary: ae.colors.primary,
50411
50411
  accent: ae.colors.accent,
50412
50412
  colorMode: ae.colorMode
50413
50413
  },
50414
- mt
50414
+ gt
50415
50415
  ), Et = N || "legacy", Tt = A || (S ? "hash" : "memory"), ht = Tt !== "memory", [ft, Ot] = _.useState(z), [rt, Lt] = _.useState(!1), [bt, fe] = _.useState(!1), { sceneToRoute: ee, routeToScene: Gt } = _.useMemo(
50416
50416
  () => yft(nt),
50417
50417
  [nt]
@@ -50438,16 +50438,16 @@ function $ft({
50438
50438
  const Ct = p ?? Ht;
50439
50439
  _.useEffect(() => {
50440
50440
  var tt, X, st;
50441
- const M = nt.find((gt) => gt.id === Ct), $ = !!((tt = e == null ? void 0 : e.config) != null && tt.remoteControl) && !!(M != null && M.remoteScene);
50441
+ const M = nt.find((mt) => mt.id === Ct), $ = !!((tt = e == null ? void 0 : e.config) != null && tt.remoteControl) && !!(M != null && M.remoteScene);
50442
50442
  if (aL($), lL($ && !!((st = (X = e == null ? void 0 : e.config) == null ? void 0 : X.mouse) != null && st.enabled)), !$ || !K) {
50443
50443
  Dx();
50444
50444
  return;
50445
50445
  }
50446
50446
  const I = R || (t == null ? void 0 : t.endpoint), Z = I && /^https?:\/\//.test(I) ? I : window.location.origin, B = new URL("/ws", Z);
50447
50447
  B.protocol = B.protocol === "https:" ? "wss:" : "ws:";
50448
- const F = B.toString(), Q = `agent:${x || "default"}:${K}`;
50448
+ const W = B.toString(), Q = `agent:${x || "default"}:${K}`;
50449
50449
  return gL(
50450
- F,
50450
+ W,
50451
50451
  Q,
50452
50452
  r || localStorage.getItem("token") || void 0
50453
50453
  ), () => Dx();
@@ -50566,7 +50566,7 @@ function $ft({
50566
50566
  ), [Ni, _s] = _.useState({}), Ri = _.useRef({}), ui = _.useCallback(
50567
50567
  async (M, $ = !1) => {
50568
50568
  if (!ft || !M.appId) return;
50569
- const I = R || (t == null ? void 0 : t.endpoint) || window.location.origin, Z = !R && typeof I == "string" && I.startsWith("/") ? I.replace(/\/+$/, "") : "", B = /^https?:\/\//.test(I) ? I : window.location.origin, F = `${Z}/mobile/apps/${encodeURIComponent(M.appId)}/workflow`, Q = await fetch(new URL(F, B).toString(), {
50569
+ const I = R || (t == null ? void 0 : t.endpoint) || window.location.origin, Z = !R && typeof I == "string" && I.startsWith("/") ? I.replace(/\/+$/, "") : "", B = /^https?:\/\//.test(I) ? I : window.location.origin, W = `${Z}/mobile/apps/${encodeURIComponent(M.appId)}/workflow`, Q = await fetch(new URL(W, B).toString(), {
50570
50570
  cache: $ ? "no-cache" : "default",
50571
50571
  headers: {
50572
50572
  Authorization: `Bearer ${r || localStorage.getItem("token") || ""}`
@@ -50595,8 +50595,8 @@ function $ft({
50595
50595
  var Z;
50596
50596
  const M = Er.filter(
50597
50597
  (B) => {
50598
- var F;
50599
- return ((F = B.realtime) == null ? void 0 : F.mode) === "ws";
50598
+ var W;
50599
+ return ((W = B.realtime) == null ? void 0 : W.mode) === "ws";
50600
50600
  }
50601
50601
  );
50602
50602
  if (M.length === 0 || !x) return;
@@ -50606,15 +50606,15 @@ function $ft({
50606
50606
  `tenant:${x}:entities`
50607
50607
  );
50608
50608
  return I.onmessage = (B) => {
50609
- let F;
50609
+ let W;
50610
50610
  try {
50611
- F = JSON.parse(B.data);
50611
+ W = JSON.parse(B.data);
50612
50612
  } catch {
50613
50613
  return;
50614
50614
  }
50615
- if (!(F.type !== "entity_changed" || F.entity !== "mobile_apps"))
50615
+ if (!(W.type !== "entity_changed" || W.entity !== "mobile_apps"))
50616
50616
  for (const Q of M)
50617
- F.id === Q.appId && ui(Q, !0).catch(() => {
50617
+ W.id === Q.appId && ui(Q, !0).catch(() => {
50618
50618
  });
50619
50619
  }, () => I.close();
50620
50620
  }, [Er, ui, x, t]);
@@ -50645,12 +50645,12 @@ function $ft({
50645
50645
  "DATASOURCE_DUPLICATE_RUNTIME",
50646
50646
  `"${M}" fetched by ${B.componentKey} and ${$} within 500ms`
50647
50647
  );
50648
- const F = Z.filter(
50648
+ const W = Z.filter(
50649
50649
  (Q) => Q.componentKey === $
50650
50650
  );
50651
- F.length >= 3 && Ui(
50651
+ W.length >= 3 && Ui(
50652
50652
  "RENDER_FETCH_LOOP",
50653
- `"${M}" fetched ${F.length} times by ${$} within 2s`
50653
+ `"${M}" fetched ${W.length} times by ${$} within 2s`
50654
50654
  );
50655
50655
  },
50656
50656
  [H, Ui]
@@ -50693,7 +50693,7 @@ function $ft({
50693
50693
  const Z = `${V}logo.${I}`;
50694
50694
  try {
50695
50695
  if ((await fetch(Z, { method: "HEAD" })).ok && !$) {
50696
- M.config.logo = Z, oe((F) => F && { ...F });
50696
+ M.config.logo = Z, oe((W) => W && { ...W });
50697
50697
  return;
50698
50698
  }
50699
50699
  } catch {
@@ -50739,17 +50739,17 @@ function $ft({
50739
50739
  const M = localStorage.getItem("token"), $ = !!M && !zf(M);
50740
50740
  $ ? (Ye.current = !1, G(!1)) : G(!0), Ot($);
50741
50741
  const I = () => {
50742
- const F = localStorage.getItem("token"), Q = !!F && !zf(F);
50742
+ const W = localStorage.getItem("token"), Q = !!W && !zf(W);
50743
50743
  Q ? (Ye.current = !1, G(!1)) : G(!0), Ot(Q);
50744
50744
  };
50745
50745
  window.addEventListener("storage", I);
50746
- const Z = (F) => {
50746
+ const Z = (W) => {
50747
50747
  var Q, tt, X;
50748
- if ((((Q = F.data) == null ? void 0 : Q.type) === "auth" || ((tt = F.data) == null ? void 0 : tt.type) === "auth-token") && ((X = F.data) != null && X.token)) {
50749
- if (localStorage.setItem("token", F.data.token), F.data.refreshToken && localStorage.setItem(
50748
+ if ((((Q = W.data) == null ? void 0 : Q.type) === "auth" || ((tt = W.data) == null ? void 0 : tt.type) === "auth-token") && ((X = W.data) != null && X.token)) {
50749
+ if (localStorage.setItem("token", W.data.token), W.data.refreshToken && localStorage.setItem(
50750
50750
  "backflow_refresh_token",
50751
- F.data.refreshToken
50752
- ), F.data.userId && localStorage.setItem("backflow_refresh_user_id", F.data.userId), zf(F.data.token)) {
50751
+ W.data.refreshToken
50752
+ ), W.data.userId && localStorage.setItem("backflow_refresh_user_id", W.data.userId), zf(W.data.token)) {
50753
50753
  Ye.current = !0, Ot(!1);
50754
50754
  return;
50755
50755
  }
@@ -50762,10 +50762,10 @@ function $ft({
50762
50762
  };
50763
50763
  window.addEventListener("message", Z);
50764
50764
  const B = () => {
50765
- var F;
50765
+ var W;
50766
50766
  if (!Ye.current) {
50767
50767
  const Q = nt.find((X) => X.id === Ct);
50768
- if (!(((F = Q == null ? void 0 : Q.config) == null ? void 0 : F.requireAuth) === !0 || (Q == null ? void 0 : Q.requiresAuth) === !0)) return;
50768
+ if (!(((W = Q == null ? void 0 : Q.config) == null ? void 0 : W.requireAuth) === !0 || (Q == null ? void 0 : Q.requiresAuth) === !0)) return;
50769
50769
  Ye.current = !0, Ot(!1), Lt(!0);
50770
50770
  }
50771
50771
  };
@@ -50805,8 +50805,8 @@ function $ft({
50805
50805
  Ye.current
50806
50806
  ), !Ye.current) {
50807
50807
  Ye.current = !0, localStorage.removeItem("token"), Ot(!1);
50808
- const B = nt.find((Q) => Q.id === Ct), F = ((I = B == null ? void 0 : B.config) == null ? void 0 : I.requireAuth) === !0 || (B == null ? void 0 : B.requiresAuth) === !0;
50809
- ($ || F) && (Lt(!0), Ct && (ln.current = Ct));
50808
+ const B = nt.find((Q) => Q.id === Ct), W = ((I = B == null ? void 0 : B.config) == null ? void 0 : I.requireAuth) === !0 || (B == null ? void 0 : B.requiresAuth) === !0;
50809
+ ($ || W) && (Lt(!0), Ct && (ln.current = Ct));
50810
50810
  }
50811
50811
  return !0;
50812
50812
  }
@@ -50849,7 +50849,7 @@ function $ft({
50849
50849
  return delete $.TENANT_ID, delete $.tenantId, delete $.role, $;
50850
50850
  }, Yr = _.useCallback(
50851
50851
  async (M) => {
50852
- var Z, B, F;
50852
+ var Z, B, W;
50853
50853
  if (!M.action) return;
50854
50854
  const $ = String(M.action), I = ci.current;
50855
50855
  try {
@@ -50863,7 +50863,7 @@ function $ft({
50863
50863
  }).replace(/\{\{(\w+)\}\}/g, (At, a) => {
50864
50864
  const d = I[a];
50865
50865
  return d === void 0 ? At : String(d);
50866
- }), st = rr(), gt = Q !== "GET" && Q !== "DELETE";
50866
+ }), st = rr(), mt = Q !== "GET" && Q !== "DELETE";
50867
50867
  Q !== "GET" && Nh(Q, X, I, !0);
50868
50868
  const vt = await fetch(new URL(X, st).toString(), {
50869
50869
  method: Q,
@@ -50871,7 +50871,7 @@ function $ft({
50871
50871
  "Content-Type": "application/json",
50872
50872
  Authorization: `Bearer ${r || localStorage.getItem("token") || ""}`
50873
50873
  },
50874
- ...gt ? { body: JSON.stringify(Ac(I)) } : {}
50874
+ ...mt ? { body: JSON.stringify(Ac(I)) } : {}
50875
50875
  });
50876
50876
  if (Qe.current || await Ro(vt) || Qe.current) return;
50877
50877
  if (!vt.ok)
@@ -50913,13 +50913,13 @@ function $ft({
50913
50913
  if (Fe[Q]) {
50914
50914
  const tt = Fe[Q], X = tt.clearFormKeys;
50915
50915
  oe((st) => {
50916
- const gt = { ...st };
50916
+ const mt = { ...st };
50917
50917
  let vt = Array.isArray(X) && X.length > 0;
50918
50918
  if (vt)
50919
- for (const pt of X) delete gt[pt];
50920
- for (const pt of Object.keys(gt))
50921
- pt.startsWith("__acc_") && (delete gt[pt], vt = !0);
50922
- return vt ? gt : st;
50919
+ for (const pt of X) delete mt[pt];
50920
+ for (const pt of Object.keys(mt))
50921
+ pt.startsWith("__acc_") && (delete mt[pt], vt = !0);
50922
+ return vt ? mt : st;
50923
50923
  }), tt.preload && await Xi(String(tt.preload)), cn({
50924
50924
  id: Q,
50925
50925
  definition: tt
@@ -50949,7 +50949,7 @@ function $ft({
50949
50949
  } catch (Q) {
50950
50950
  if (Q instanceof jo && Cc(Q, M == null ? void 0 : M.onError))
50951
50951
  return;
50952
- (F = M.onError) != null && F.message && ke(M.onError.message, "error");
50952
+ (W = M.onError) != null && W.message && ke(M.onError.message, "error");
50953
50953
  }
50954
50954
  },
50955
50955
  [Ct, nt, ft]
@@ -50963,15 +50963,15 @@ function $ft({
50963
50963
  var $, I;
50964
50964
  const M = Da.current;
50965
50965
  if (Da.current = Ct, M && M !== Ct) {
50966
- const Z = nt.find((F) => F.id === M), B = (Z == null ? void 0 : Z.type) === "render_scene" ? Z.config : null;
50966
+ const Z = nt.find((W) => W.id === M), B = (Z == null ? void 0 : Z.type) === "render_scene" ? Z.config : null;
50967
50967
  (I = ($ = B == null ? void 0 : B.events) == null ? void 0 : $.onLeave) != null && I.action && Yr(B.events.onLeave);
50968
50968
  }
50969
50969
  }, [Ct, nt, Yr]), _.useEffect(() => {
50970
50970
  const M = de == null ? void 0 : de.events;
50971
50971
  if (!(M != null && M.onVisibilityChange)) return;
50972
50972
  const $ = () => {
50973
- var I, Z, B, F;
50974
- document.hidden ? (Z = (I = M.onVisibilityChange) == null ? void 0 : I.onHidden) != null && Z.action && Yr(M.onVisibilityChange.onHidden) : (F = (B = M.onVisibilityChange) == null ? void 0 : B.onVisible) != null && F.action && Yr(M.onVisibilityChange.onVisible);
50973
+ var I, Z, B, W;
50974
+ document.hidden ? (Z = (I = M.onVisibilityChange) == null ? void 0 : I.onHidden) != null && Z.action && Yr(M.onVisibilityChange.onHidden) : (W = (B = M.onVisibilityChange) == null ? void 0 : B.onVisible) != null && W.action && Yr(M.onVisibilityChange.onVisible);
50975
50975
  };
50976
50976
  return document.addEventListener("visibilitychange", $), () => document.removeEventListener("visibilitychange", $);
50977
50977
  }, [Ct, de == null ? void 0 : de.events, Yr]);
@@ -50986,18 +50986,18 @@ function $ft({
50986
50986
  },
50987
50987
  []
50988
50988
  ), pi = _.useRef({}), Do = _.useRef(/* @__PURE__ */ new Map()), tn = _.useRef(/* @__PURE__ */ new Set()), mi = _.useRef(/* @__PURE__ */ new Set()), Kr = _.useRef(null), Ba = _.useRef([]), Is = _.useRef({}), $n = _.useCallback(
50989
- async (M, $, I = 0, Z = 10, B, F, Q, tt = !1) => {
50989
+ async (M, $, I = 0, Z = 10, B, W, Q, tt = !1) => {
50990
50990
  var vt;
50991
50991
  if (!M || Ye.current || !ft) return;
50992
50992
  const X = `${$}|${M}|${I}|${tt}`, st = Do.current.get(X) || 0;
50993
50993
  if (Date.now() - st < 1e3) return;
50994
50994
  Do.current.set(X, Date.now()), pi.current[$] = M;
50995
- const gt = M.match(
50995
+ const mt = M.match(
50996
50996
  /^\{\{\s*\[([\w/.-]+)\](?:\.([\w.]+))?\s*\}\}$/
50997
50997
  );
50998
- if (gt) {
50998
+ if (mt) {
50999
50999
  const pt = Jr(
51000
- `${gt[1]}${gt[2] ? "." + gt[2] : ""}`
51000
+ `${mt[1]}${mt[2] ? "." + mt[2] : ""}`
51001
51001
  );
51002
51002
  if (Array.isArray(pt))
51003
51003
  return Gr((At) => ({ ...At, [$]: pt })), on.current[$] = pt, on.current[M] = pt, Wi((At) => ({
@@ -51018,7 +51018,7 @@ function $ft({
51018
51018
  const g = Oc(M, {
51019
51019
  limit: Z,
51020
51020
  page: I
51021
- }), w = B ? Cm(g, B, F) : g, O = Bf(w), k = await ry(t, O, d);
51021
+ }), w = B ? Cm(g, B, W) : g, O = Bf(w), k = await ry(t, O, d);
51022
51022
  a = k, pt = (k == null ? void 0 : k.emails) || (k == null ? void 0 : k.items) || (k == null ? void 0 : k.data) || (k == null ? void 0 : k.history) || (Array.isArray(k) ? k : []), At = ((vt = k == null ? void 0 : k.pagination) == null ? void 0 : vt.total) ?? (k == null ? void 0 : k.count) ?? pt.length;
51023
51023
  } else if (!Yf(M)) {
51024
51024
  const g = t == null ? void 0 : t.endpoint, w = R || (g && /^https?:\/\//.test(g) ? g : window.location.origin);
@@ -51031,20 +51031,20 @@ function $ft({
51031
51031
  window.location.origin
51032
51032
  );
51033
51033
  const k = new URL(O, w);
51034
- k.searchParams.set("limit", String(Z)), k.searchParams.set("offset", String(I * Z)), B && (k.searchParams.set("sort", B), k.searchParams.set("dir", F || "asc"));
51035
- const W = await fetch(k.toString(), {
51034
+ k.searchParams.set("limit", String(Z)), k.searchParams.set("offset", String(I * Z)), B && (k.searchParams.set("sort", B), k.searchParams.set("dir", W || "asc"));
51035
+ const F = await fetch(k.toString(), {
51036
51036
  headers: {
51037
51037
  Authorization: `Bearer ${r || localStorage.getItem("token") || ""}`
51038
51038
  }
51039
51039
  });
51040
- if (await Ro(W) || Qe.current) return;
51040
+ if (await Ro(F) || Qe.current) return;
51041
51041
  let et = null;
51042
51042
  try {
51043
- et = await W.json();
51043
+ et = await F.json();
51044
51044
  } catch {
51045
51045
  }
51046
- if (!W.ok) {
51047
- const ot = typeof (et == null ? void 0 : et.message) == "string" && et.message || typeof (et == null ? void 0 : et.error) == "string" && et.error || `Request failed: ${W.statusText}`;
51046
+ if (!F.ok) {
51047
+ const ot = typeof (et == null ? void 0 : et.message) == "string" && et.message || typeof (et == null ? void 0 : et.error) == "string" && et.error || `Request failed: ${F.statusText}`;
51048
51048
  throw new jo([ot], et || void 0);
51049
51049
  }
51050
51050
  if (a = et, Qe.current) return;
@@ -51105,12 +51105,12 @@ function $ft({
51105
51105
  return;
51106
51106
  }
51107
51107
  const $ = ((e == null ? void 0 : e.steps) || []).find(
51108
- (F) => F.id === Ct
51108
+ (W) => W.id === Ct
51109
51109
  );
51110
51110
  if (!(((B = $ == null ? void 0 : $.config) == null ? void 0 : B.requireAuth) === !0 || ($ == null ? void 0 : $.requiresAuth) === !0 || rt) || Tc.current === M) return;
51111
51111
  let Z = !1;
51112
51112
  return (async () => {
51113
- var F;
51113
+ var W;
51114
51114
  try {
51115
51115
  const Q = await fetch(`${rr()}/admin/users/me`, {
51116
51116
  headers: { Authorization: `Bearer ${M}` }
@@ -51119,7 +51119,7 @@ function $ft({
51119
51119
  if (Q.ok) {
51120
51120
  const tt = await Q.json().catch(() => null);
51121
51121
  Tc.current = M, G(!1), lt(
51122
- typeof ((F = tt == null ? void 0 : tt.user) == null ? void 0 : F.emailVerified) == "boolean" ? tt.user.emailVerified : null
51122
+ typeof ((W = tt == null ? void 0 : tt.user) == null ? void 0 : W.emailVerified) == "boolean" ? tt.user.emailVerified : null
51123
51123
  );
51124
51124
  } else
51125
51125
  Ct && (ln.current = Ct), Tc.current = null, G(!0), Ot(!1), lt(null);
@@ -51134,10 +51134,10 @@ function $ft({
51134
51134
  (M, $, I) => {
51135
51135
  !M || $.length === 0 || Gr((Z) => {
51136
51136
  const B = { ...Z };
51137
- for (const [F, Q] of Object.entries(pi.current)) {
51138
- if (Q !== M || !Z[F]) continue;
51139
- const tt = Z[F];
51140
- I === "remove" && (B[F] = tt.filter((X) => !$.includes(X.id)));
51137
+ for (const [W, Q] of Object.entries(pi.current)) {
51138
+ if (Q !== M || !Z[W]) continue;
51139
+ const tt = Z[W];
51140
+ I === "remove" && (B[W] = tt.filter((X) => !$.includes(X.id)));
51141
51141
  }
51142
51142
  return B;
51143
51143
  });
@@ -51155,10 +51155,10 @@ function $ft({
51155
51155
  for (const [X, st] of Object.entries(Is.current))
51156
51156
  Object.values(pi.current).includes(st) || Z.set(X, { ds: st, dataKey: X });
51157
51157
  if (Z.size === 0) return;
51158
- const B = Array.isArray($) ? new Set($) : void 0, F = (X, st) => tn.current.has(X) || (st ? tn.current.has(st) : !1);
51159
- for (const [X, { ds: st, dataKey: gt }] of Z) {
51160
- if (!F(X, gt)) continue;
51161
- const vt = !!(B != null && B.has(X) || gt && (B != null && B.has(gt)));
51158
+ const B = Array.isArray($) ? new Set($) : void 0, W = (X, st) => tn.current.has(X) || (st ? tn.current.has(st) : !1);
51159
+ for (const [X, { ds: st, dataKey: mt }] of Z) {
51160
+ if (!W(X, mt)) continue;
51161
+ const vt = !!(B != null && B.has(X) || mt && (B != null && B.has(mt)));
51162
51162
  if ($ === "view" || vt) {
51163
51163
  $n(
51164
51164
  st,
@@ -51167,7 +51167,7 @@ function $ft({
51167
51167
  ((Q = Cn[X]) == null ? void 0 : Q.limit) || 10,
51168
51168
  void 0,
51169
51169
  void 0,
51170
- gt
51170
+ mt
51171
51171
  );
51172
51172
  continue;
51173
51173
  }
@@ -51179,7 +51179,7 @@ function $ft({
51179
51179
  ((tt = Cn[X]) == null ? void 0 : tt.limit) || 10,
51180
51180
  void 0,
51181
51181
  void 0,
51182
- gt
51182
+ mt
51183
51183
  );
51184
51184
  }
51185
51185
  },
@@ -51188,8 +51188,8 @@ function $ft({
51188
51188
  (M, $, I, Z) => {
51189
51189
  const B = String(M || "").toUpperCase();
51190
51190
  if (B === "GET" || Z === !1) return;
51191
- const F = Z === "remove" || Z === "merge" || Z === "add" || Z === "refresh" ? Z : B === "DELETE" ? "remove" : B === "PUT" || B === "PATCH" ? "merge" : B === "POST" ? "add" : null;
51192
- if (!F || F === "refresh") return;
51191
+ const W = Z === "remove" || Z === "merge" || Z === "add" || Z === "refresh" ? Z : B === "DELETE" ? "remove" : B === "PUT" || B === "PATCH" ? "merge" : B === "POST" ? "add" : null;
51192
+ if (!W || W === "refresh") return;
51193
51193
  const Q = () => {
51194
51194
  const X = String($).match(/\/([^/]+)\/?$/);
51195
51195
  return X ? decodeURIComponent(X[1]) : void 0;
@@ -51198,14 +51198,14 @@ function $ft({
51198
51198
  st && $.startsWith(st) && tt.push({ key: X, ds: st });
51199
51199
  tt.length !== 0 && Gr((X) => {
51200
51200
  const st = { ...X };
51201
- for (const { key: gt, ds: vt } of tt) {
51202
- const pt = X[gt] || [];
51203
- if (F === "remove") {
51201
+ for (const { key: mt, ds: vt } of tt) {
51202
+ const pt = X[mt] || [];
51203
+ if (W === "remove") {
51204
51204
  const At = (I == null ? void 0 : I.id) || Q();
51205
- st[gt] = pt.filter((a) => a.id !== At);
51206
- } else if (F === "merge") {
51205
+ st[mt] = pt.filter((a) => a.id !== At);
51206
+ } else if (W === "merge") {
51207
51207
  const At = (I == null ? void 0 : I.id) || Q();
51208
- st[gt] = pt.map(
51208
+ st[mt] = pt.map(
51209
51209
  (a) => a.id === At ? { ...a, ...I } : a
51210
51210
  );
51211
51211
  } else {
@@ -51213,7 +51213,7 @@ function $ft({
51213
51213
  ...I || {},
51214
51214
  id: (I == null ? void 0 : I.id) || `temp_${Date.now()}`
51215
51215
  };
51216
- F === "add" && At.status === void 0 && (At.status = "queued"), st[gt] = [At, ...pt];
51216
+ W === "add" && At.status === void 0 && (At.status = "queued"), st[mt] = [At, ...pt];
51217
51217
  }
51218
51218
  }
51219
51219
  return st;
@@ -51224,16 +51224,16 @@ function $ft({
51224
51224
  (M, $, I, Z) => {
51225
51225
  var X;
51226
51226
  const B = rr();
51227
- let F = !1;
51227
+ let W = !1;
51228
51228
  const Q = (st) => {
51229
- F || (F = !0, st());
51229
+ W || (W = !0, st());
51230
51230
  }, tt = t == null ? void 0 : t.queues;
51231
51231
  if (M === "sse" && (tt != null && tt.subscribe))
51232
51232
  try {
51233
- const st = Z.sseUrl || `${B}/queues/bulk-operations/jobs/${$}/subscribe?token=${encodeURIComponent(I)}`, gt = ((t == null ? void 0 : t.endpoint) || B).replace(
51233
+ const st = Z.sseUrl || `${B}/queues/bulk-operations/jobs/${$}/subscribe?token=${encodeURIComponent(I)}`, mt = ((t == null ? void 0 : t.endpoint) || B).replace(
51234
51234
  /\/$/,
51235
51235
  ""
51236
- ), vt = st.startsWith(gt) ? st.slice(gt.length) : st;
51236
+ ), vt = st.startsWith(mt) ? st.slice(mt.length) : st;
51237
51237
  tt.subscribe(vt, {
51238
51238
  onComplete: (pt) => Q(() => Z.onComplete(pt)),
51239
51239
  onFailed: (pt) => Q(
@@ -51263,9 +51263,9 @@ function $ft({
51263
51263
  if (M === "ws" && ((X = t == null ? void 0 : t.client) != null && X.createWebSocket))
51264
51264
  try {
51265
51265
  const st = t.client.createWebSocket(`job:${$}`);
51266
- st.onmessage = (gt) => {
51266
+ st.onmessage = (mt) => {
51267
51267
  try {
51268
- const vt = JSON.parse(gt.data);
51268
+ const vt = JSON.parse(mt.data);
51269
51269
  (vt == null ? void 0 : vt.type) === "completed" ? Q(() => Z.onComplete(vt.result)) : (vt == null ? void 0 : vt.type) === "failed" && Q(
51270
51270
  () => Z.onFailed({
51271
51271
  message: vt.error || "Job failed",
@@ -51287,9 +51287,9 @@ function $ft({
51287
51287
  }
51288
51288
  if (M === "poll" && (tt != null && tt.getJob)) {
51289
51289
  const st = window.setInterval(async () => {
51290
- var gt;
51290
+ var mt;
51291
51291
  try {
51292
- const vt = await tt.getJob("bulk-operations", $), pt = (vt == null ? void 0 : vt.status) || ((gt = vt == null ? void 0 : vt.job) == null ? void 0 : gt.status), At = (vt == null ? void 0 : vt.result) || (vt == null ? void 0 : vt.data);
51292
+ const vt = await tt.getJob("bulk-operations", $), pt = (vt == null ? void 0 : vt.status) || ((mt = vt == null ? void 0 : vt.job) == null ? void 0 : mt.status), At = (vt == null ? void 0 : vt.result) || (vt == null ? void 0 : vt.data);
51293
51293
  pt === "failed" || At != null && At.final ? (window.clearInterval(st), Q(
51294
51294
  () => pt === "failed" ? Z.onFailed({
51295
51295
  message: (At == null ? void 0 : At.error) || "Job failed",
@@ -51316,7 +51316,7 @@ function $ft({
51316
51316
  []
51317
51317
  ), Ls = _.useCallback(
51318
51318
  async (M, $, I) => {
51319
- var gt, vt;
51319
+ var mt, vt;
51320
51320
  const Z = t == null ? void 0 : t.files, B = encodeURIComponent(
51321
51321
  r || localStorage.getItem("token") || ""
51322
51322
  );
@@ -51324,17 +51324,17 @@ function $ft({
51324
51324
  const pt = await Z.upload(M, $ || {}, I), At = (pt == null ? void 0 : pt.url) || (pt == null ? void 0 : pt.path) || "";
51325
51325
  return At ? (pt == null ? void 0 : pt.visibility) === "public" ? At : `${rr()}${At}?token=${B}` : "";
51326
51326
  }
51327
- const F = new FormData();
51328
- F.append("file", M), $ != null && $.entityType && F.append("entityType", $.entityType), $ != null && $.entityId && F.append("entityId", $.entityId), $ != null && $.visibility && F.append("visibility", $.visibility);
51327
+ const W = new FormData();
51328
+ W.append("file", M), $ != null && $.entityType && W.append("entityType", $.entityType), $ != null && $.entityId && W.append("entityId", $.entityId), $ != null && $.visibility && W.append("visibility", $.visibility);
51329
51329
  const Q = await fetch(`${rr()}/files/upload`, {
51330
51330
  method: "POST",
51331
51331
  headers: {
51332
51332
  Authorization: `Bearer ${r || localStorage.getItem("token") || ""}`
51333
51333
  },
51334
- body: F
51334
+ body: W
51335
51335
  });
51336
51336
  if (!Q.ok) throw new Error("Upload failed");
51337
- const tt = await Q.json(), X = ((gt = tt == null ? void 0 : tt.asset) == null ? void 0 : gt.url) || (tt == null ? void 0 : tt.url) || (tt == null ? void 0 : tt.path) || (tt == null ? void 0 : tt.id) || "";
51337
+ const tt = await Q.json(), X = ((mt = tt == null ? void 0 : tt.asset) == null ? void 0 : mt.url) || (tt == null ? void 0 : tt.url) || (tt == null ? void 0 : tt.path) || (tt == null ? void 0 : tt.id) || "";
51338
51338
  return X ? ((vt = tt == null ? void 0 : tt.asset) == null ? void 0 : vt.visibility) === "public" ? X : `${rr()}${X}?token=${B}` : "";
51339
51339
  },
51340
51340
  []
@@ -51342,7 +51342,7 @@ function $ft({
51342
51342
  async (M, $, I, Z) => {
51343
51343
  var Q;
51344
51344
  if (!(M != null && M.endpoint) || Z.length === 0) return;
51345
- const B = M.endpoint, F = M.optimistic ?? !0;
51345
+ const B = M.endpoint, W = M.optimistic ?? !0;
51346
51346
  try {
51347
51347
  const tt = await fetch(rr() + B, {
51348
51348
  method: "POST",
@@ -51361,14 +51361,14 @@ function $ft({
51361
51361
  ke(((Q = X == null ? void 0 : X.error) == null ? void 0 : Q.message) || "Request failed", "error");
51362
51362
  return;
51363
51363
  }
51364
- F !== !1 && (F === "remove" || F === "refresh" ? F : X.softUpdate || (M.action === "delete" ? "remove" : "refresh")) === "remove" && Ec($, Z, "remove"), oe((gt) => ({
51365
- ...gt,
51364
+ W !== !1 && (W === "remove" || W === "refresh" ? W : X.softUpdate || (M.action === "delete" ? "remove" : "refresh")) === "remove" && Ec($, Z, "remove"), oe((mt) => ({
51365
+ ...mt,
51366
51366
  _selIds: [],
51367
51367
  _selectMode: !1
51368
51368
  }));
51369
- const st = (gt, vt, pt) => {
51369
+ const st = (mt, vt, pt) => {
51370
51370
  var At;
51371
- if (gt)
51371
+ if (mt)
51372
51372
  ke(pt || "Bulk operation failed", "error");
51373
51373
  else {
51374
51374
  const a = vt || {}, d = a.total ?? Z.length, g = a.successful ?? d;
@@ -51385,10 +51385,10 @@ function $ft({
51385
51385
  );
51386
51386
  };
51387
51387
  X.jobId && X.token && M.feedback ? zn(M.feedback, X.jobId, X.token, {
51388
- onComplete: (gt) => st(!1, gt),
51389
- onFailed: (gt) => {
51388
+ onComplete: (mt) => st(!1, mt),
51389
+ onFailed: (mt) => {
51390
51390
  var vt;
51391
- if (gt.kind === "transport") {
51391
+ if (mt.kind === "transport") {
51392
51392
  $n(
51393
51393
  $,
51394
51394
  I,
@@ -51397,7 +51397,7 @@ function $ft({
51397
51397
  );
51398
51398
  return;
51399
51399
  }
51400
- st(!0, null, gt.message);
51400
+ st(!0, null, mt.message);
51401
51401
  }
51402
51402
  }) : st(!1, X);
51403
51403
  } catch {
@@ -51408,31 +51408,31 @@ function $ft({
51408
51408
  ), Cm = (M, $, I) => {
51409
51409
  const Z = Bf(M), B = Z.indexOf("(");
51410
51410
  if (B === -1) return M;
51411
- const F = Z.slice(B + 1, -1).trim(), Q = `sort: "${$}", dir: ${I === "desc" ? '"desc"' : '"asc"'}`;
51412
- if (!F)
51411
+ const W = Z.slice(B + 1, -1).trim(), Q = `sort: "${$}", dir: ${I === "desc" ? '"desc"' : '"asc"'}`;
51412
+ if (!W)
51413
51413
  return M.replace(/\(\)$/, `({${Q}})`);
51414
- const tt = F.lastIndexOf(",");
51414
+ const tt = W.lastIndexOf(",");
51415
51415
  if (tt === -1)
51416
- return M.replace(/\(([^)]*)\)$/, `(${F}, {${Q}})`);
51417
- const X = F.slice(tt + 1).trim();
51416
+ return M.replace(/\(([^)]*)\)$/, `(${W}, {${Q}})`);
51417
+ const X = W.slice(tt + 1).trim();
51418
51418
  return X.startsWith("{") ? M.replace(
51419
51419
  /\(([^)]*)\)$/,
51420
- `(${F.slice(0, tt)}, {${X.slice(1, -1)}, ${Q}})`
51421
- ) : M.replace(/\(([^)]*)\)$/, `(${F}, {${Q}})`);
51420
+ `(${W.slice(0, tt)}, {${X.slice(1, -1)}, ${Q}})`
51421
+ ) : M.replace(/\(([^)]*)\)$/, `(${W}, {${Q}})`);
51422
51422
  }, Oc = (M, $) => {
51423
51423
  const I = Bf(M), Z = I.indexOf("(");
51424
51424
  if (Z === -1) return M;
51425
- const B = I.slice(Z + 1, -1).trim(), F = `limit: ${$.limit}, page: ${$.page}`;
51425
+ const B = I.slice(Z + 1, -1).trim(), W = `limit: ${$.limit}, page: ${$.page}`;
51426
51426
  if (!B)
51427
- return M.replace(/\(\)$/, `({${F}})`);
51427
+ return M.replace(/\(\)$/, `({${W}})`);
51428
51428
  const Q = B.lastIndexOf(",");
51429
51429
  if (Q === -1)
51430
- return M.replace(/\(([^)]*)\)$/, `(${B}, {${F}})`);
51430
+ return M.replace(/\(([^)]*)\)$/, `(${B}, {${W}})`);
51431
51431
  const tt = B.slice(Q + 1).trim();
51432
51432
  return tt.startsWith("{") ? M.replace(
51433
51433
  /\(([^)]*)\)$/,
51434
- `(${B.slice(0, Q)}, {${tt.slice(1, -1)}, ${F}})`
51435
- ) : M.replace(/\(([^)]*)\)$/, `(${B}, {${F}})`);
51434
+ `(${B.slice(0, Q)}, {${tt.slice(1, -1)}, ${W}})`
51435
+ ) : M.replace(/\(([^)]*)\)$/, `(${B}, {${W}})`);
51436
51436
  };
51437
51437
  _.useEffect(
51438
51438
  () => () => {
@@ -51471,7 +51471,7 @@ function $ft({
51471
51471
  const Xi = async (M, $) => {
51472
51472
  var At, a, d, g, w;
51473
51473
  if (Ye.current || !ft) return;
51474
- const { method: I, path: Z } = Te(M), B = Dh(Z), F = I !== "GET" && I !== "DELETE", Q = rr();
51474
+ const { method: I, path: Z } = Te(M), B = Dh(Z), W = I !== "GET" && I !== "DELETE", Q = rr();
51475
51475
  I !== "GET" && Nh(
51476
51476
  I,
51477
51477
  B,
@@ -51492,7 +51492,7 @@ function $ft({
51492
51492
  "Content-Type": "application/json",
51493
51493
  Authorization: `Bearer ${r || localStorage.getItem("token") || ""}`
51494
51494
  },
51495
- ...F ? { body: JSON.stringify(tt) } : {}
51495
+ ...W ? { body: JSON.stringify(tt) } : {}
51496
51496
  });
51497
51497
  if (await Ro(X) || Qe.current) return;
51498
51498
  let st;
@@ -51507,32 +51507,37 @@ function $ft({
51507
51507
  if (!X.ok || st.success === !1) {
51508
51508
  Zt(B, $ == null ? void 0 : $.refetchScope);
51509
51509
  let O = ["Something went wrong"];
51510
- throw (At = st.error) != null && At.message ? O = Mm(st.error.message) || [st.error.message] : st.message && (O = [st.message]), new jo(O, st);
51510
+ const k = typeof st.error == "string" ? st.error : (At = st.error) == null ? void 0 : At.message;
51511
+ if (k) {
51512
+ const F = k.replace(/^Validation failed:\s*/i, "");
51513
+ O = Mm(F) || [F];
51514
+ } else st.message && (O = [st.message]);
51515
+ throw new jo(O, st);
51511
51516
  }
51512
51517
  st.token && localStorage.setItem("token", st.token), $ != null && $.openUrl && (st != null && st.url) && String(st.url).startsWith("http") && window.open(String(st.url), "_blank", "noopener,noreferrer"), st && typeof st == "object" && !Array.isArray(st) && oe((O) => ({ ...O, feedback: st })), st.data && ($ == null ? void 0 : $.mergeResponse) !== !1 && oe((O) => ({ ...O, ...st.data })), st.user && typeof st.user == "object" ? oe((O) => ({ ...O, user: st.user })) : oe((O) => ({ ...O })), on.current[B.replace(/^\//, "")] = { response: st };
51513
51518
  for (const [O, k] of Object.entries(Is.current))
51514
51519
  if (k === B || k.endsWith(B)) {
51515
- const W = on.current[O];
51520
+ const F = on.current[O];
51516
51521
  on.current[O] = {
51517
- items: Array.isArray(W) ? W : Array.isArray(W == null ? void 0 : W.items) ? W.items : [],
51522
+ items: Array.isArray(F) ? F : Array.isArray(F == null ? void 0 : F.items) ? F.items : [],
51518
51523
  response: st
51519
51524
  };
51520
51525
  }
51521
- const gt = (d = (a = st.subscribe) == null ? void 0 : a.websocket) == null ? void 0 : d.workflowChannel;
51522
- gt && ($ == null ? void 0 : $.mergeResponse) !== !1 && oe((O) => {
51523
- var k, W, et, ot;
51526
+ const mt = (d = (a = st.subscribe) == null ? void 0 : a.websocket) == null ? void 0 : d.workflowChannel;
51527
+ mt && ($ == null ? void 0 : $.mergeResponse) !== !1 && oe((O) => {
51528
+ var k, F, et, ot;
51524
51529
  return {
51525
51530
  ...O,
51526
- liveCastChannel: gt,
51531
+ liveCastChannel: mt,
51527
51532
  execution_id: st.draftId || O.execution_id,
51528
51533
  id: st.sessionId || O.id,
51529
51534
  status: "running",
51530
51535
  test_session: {
51531
51536
  ...O.test_session || {},
51532
51537
  id: st.sessionId || ((k = O.test_session) == null ? void 0 : k.id),
51533
- execution_id: st.draftId || ((W = O.test_session) == null ? void 0 : W.execution_id),
51538
+ execution_id: st.draftId || ((F = O.test_session) == null ? void 0 : F.execution_id),
51534
51539
  status: "running",
51535
- liveCastChannel: gt,
51540
+ liveCastChannel: mt,
51536
51541
  prompt: (tt == null ? void 0 : tt.prompt) || ((et = O.test_session) == null ? void 0 : et.prompt),
51537
51542
  url: (tt == null ? void 0 : tt.url) || ((ot = O.test_session) == null ? void 0 : ot.url)
51538
51543
  }
@@ -51542,9 +51547,9 @@ function $ft({
51542
51547
  if (pt && st.jobId && (st.token || (g = st.subscribe) != null && g.sse || typeof vt == "object")) {
51543
51548
  let O = (w = st.subscribe) != null && w.sse ? /^https?:\/\//.test(st.subscribe.sse) ? st.subscribe.sse : Q + st.subscribe.sse : void 0;
51544
51549
  if (typeof vt == "object" && vt.subscribeUrl) {
51545
- const k = String(vt.subscribeUrl).trim(), W = k.startsWith("{{") && k.endsWith("}}") ? k.slice(2, -2).trim() : k, et = W.match(/^\[(.+?)\](?:\.(.*))?$/), ot = et ? Jr(
51550
+ const k = String(vt.subscribeUrl).trim(), F = k.startsWith("{{") && k.endsWith("}}") ? k.slice(2, -2).trim() : k, et = F.match(/^\[(.+?)\](?:\.(.*))?$/), ot = et ? Jr(
51546
51551
  `${et[1]}${et[2] ? "." + et[2] : ""}`
51547
- ) : W.split(".").reduce(
51552
+ ) : F.split(".").reduce(
51548
51553
  (dt, Pt) => dt == null ? void 0 : dt[Pt],
51549
51554
  st
51550
51555
  );
@@ -51555,15 +51560,15 @@ function $ft({
51555
51560
  sseUrl: O,
51556
51561
  onProgress: (k) => {
51557
51562
  s == null || s(k);
51558
- const W = Date.now();
51559
- W - Oo.current >= 2e3 && (Oo.current = W, Zt(B, $ == null ? void 0 : $.refetchScope));
51563
+ const F = Date.now();
51564
+ F - Oo.current >= 2e3 && (Oo.current = F, Zt(B, $ == null ? void 0 : $.refetchScope));
51560
51565
  },
51561
51566
  onComplete: (k) => {
51562
- const W = (k == null ? void 0 : k.result) ?? k;
51563
- if (W && typeof W == "object") {
51567
+ const F = (k == null ? void 0 : k.result) ?? k;
51568
+ if (F && typeof F == "object") {
51564
51569
  const et = B.replace(/^\//, "");
51565
51570
  on.current[et] = {
51566
- response: W
51571
+ response: F
51567
51572
  }, oe((ot) => ({ ...ot }));
51568
51573
  }
51569
51574
  Zt(B, $ == null ? void 0 : $.refetchScope);
@@ -51576,7 +51581,7 @@ function $ft({
51576
51581
  }
51577
51582
  zn(pt, st.jobId, st.token, {
51578
51583
  onComplete: (k) => {
51579
- const W = k || {}, et = W.total, ot = W.successful;
51584
+ const F = k || {}, et = F.total, ot = F.successful;
51580
51585
  et !== void 0 && ke(
51581
51586
  ot >= et ? `${ot} completed` : `${ot} of ${et} completed`,
51582
51587
  "success"
@@ -51594,12 +51599,12 @@ function $ft({
51594
51599
  }, Xr = (M) => {
51595
51600
  var Z, B;
51596
51601
  cn(null);
51597
- const $ = M === "/" && (((Z = nt.find((F) => F.route === "/")) == null ? void 0 : Z.id) || ((B = nt.find((F) => F.type === "render_scene")) == null ? void 0 : B.id)) || M;
51602
+ const $ = M === "/" && (((Z = nt.find((W) => W.route === "/")) == null ? void 0 : Z.id) || ((B = nt.find((W) => W.type === "render_scene")) == null ? void 0 : B.id)) || M;
51598
51603
  if (it($) && !ft) {
51599
51604
  ln.current = $, Lt(!0);
51600
51605
  return;
51601
51606
  }
51602
- Qt((F) => [...F, Ct]), Bn($);
51607
+ Qt((W) => [...W, Ct]), Bn($);
51603
51608
  }, ir = (M, $ = "error") => {
51604
51609
  if (oe((I) => ({
51605
51610
  ...I,
@@ -51651,7 +51656,7 @@ ${M.message}` : M.message;
51651
51656
  }, [ft, Y, nt]);
51652
51657
  const ke = (M, $ = "success", I) => {
51653
51658
  const Z = Array.isArray(M) ? M.join(`
51654
- `) : M, B = $ === "success", F = B ? "#10B981" : "#EF4444", Q = ae.toast || {}, tt = I ?? Q.duration ?? 3e3, X = Q.position || "bottom-right", st = {
51659
+ `) : M, B = $ === "success", W = B ? "#10B981" : "#EF4444", Q = ae.toast || {}, tt = I ?? Q.duration ?? 3e3, X = Q.position || "bottom-right", st = {
51655
51660
  "bottom-right": { right: "24px", bottom: "24px" },
51656
51661
  "bottom-left": { left: "24px", bottom: "24px" },
51657
51662
  "bottom-center": {
@@ -51662,7 +51667,7 @@ ${M.message}` : M.message;
51662
51667
  "top-right": { right: "24px", top: "24px" },
51663
51668
  "top-left": { left: "24px", top: "24px" },
51664
51669
  "top-center": { left: "50%", top: "24px", transform: "translateX(-50%)" }
51665
- }, gt = st[X] || st["bottom-right"], vt = document.createElement("div"), pt = document.createElement("span");
51670
+ }, mt = st[X] || st["bottom-right"], vt = document.createElement("div"), pt = document.createElement("span");
51666
51671
  pt.textContent = B ? "✓" : "✕", Object.assign(pt.style, {
51667
51672
  display: "flex",
51668
51673
  alignItems: "center",
@@ -51671,8 +51676,8 @@ ${M.message}` : M.message;
51671
51676
  height: "22px",
51672
51677
  minWidth: "22px",
51673
51678
  borderRadius: "50%",
51674
- backgroundColor: `${F}26`,
51675
- color: F,
51679
+ backgroundColor: `${W}26`,
51680
+ color: W,
51676
51681
  fontSize: "12px",
51677
51682
  fontWeight: "700"
51678
51683
  });
@@ -51684,7 +51689,7 @@ ${M.message}` : M.message;
51684
51689
  whiteSpace: "pre-line"
51685
51690
  }), Object.assign(vt.style, {
51686
51691
  position: "fixed",
51687
- ...gt,
51692
+ ...mt,
51688
51693
  zIndex: "2147483647",
51689
51694
  display: "flex",
51690
51695
  alignItems: "flex-start",
@@ -51725,26 +51730,26 @@ ${M.message}` : M.message;
51725
51730
  if ($ && (M != null && M.onSuccess)) {
51726
51731
  const I = Array.isArray(M.onSuccess) ? M.onSuccess : [M.onSuccess];
51727
51732
  for (const Z of I) {
51728
- const { type: B, value: F, title: Q, key: tt } = Z;
51733
+ const { type: B, value: W, title: Q, key: tt } = Z;
51729
51734
  switch (B) {
51730
51735
  case "toast":
51731
- ke(F || "Success!", "success");
51736
+ ke(W || "Success!", "success");
51732
51737
  break;
51733
51738
  case "navigate":
51734
- F && Xr(F);
51739
+ W && Xr(W);
51735
51740
  break;
51736
51741
  case "redirect":
51737
- F && (window.location.href = F);
51742
+ W && (window.location.href = W);
51738
51743
  break;
51739
51744
  case "modal":
51740
- F && Fe[F] ? cn({ id: F, definition: Fe[F] }) : cn({
51745
+ W && Fe[W] ? cn({ id: W, definition: Fe[W] }) : cn({
51741
51746
  id: "__legacy",
51742
51747
  definition: {
51743
51748
  title: Q || "Success",
51744
- components: F ? [
51749
+ components: W ? [
51745
51750
  {
51746
51751
  type: "text",
51747
- text: F,
51752
+ text: W,
51748
51753
  color: ae.colorMode === "light" ? "rgba(0,0,0,0.65)" : "rgba(255,255,255,0.7)",
51749
51754
  fontSize: 14
51750
51755
  }
@@ -51754,10 +51759,10 @@ ${M.message}` : M.message;
51754
51759
  });
51755
51760
  break;
51756
51761
  case "route":
51757
- F && Xi(F);
51762
+ W && Xi(W);
51758
51763
  break;
51759
51764
  case "set_data":
51760
- tt && F !== void 0 && oe((X) => ({ ...X, [tt]: F }));
51765
+ tt && W !== void 0 && oe((X) => ({ ...X, [tt]: W }));
51761
51766
  break;
51762
51767
  }
51763
51768
  }
@@ -51876,14 +51881,14 @@ ${M.message}` : M.message;
51876
51881
  }
51877
51882
  }, Z = (St) => {
51878
51883
  te(St), un(null), St !== "reset" && (kn(""), wt("")), It(""), Cs({});
51879
- }, B = ae.colorMode === "dark", F = B ? "#f3f4f6" : "#111827", Q = B ? "#9ca3af" : "#6b7280", tt = B ? "#374151" : "#f3f4f6", X = B ? "#4b5563" : "#d1d5db", st = B ? "#ffffff" : "#000000", gt = B ? "#000000" : "#ffffff", vt = B ? "#1f2937" : "#ffffff", pt = "#ef4444", At = (St = "12px") => ({
51884
+ }, B = ae.colorMode === "dark", W = B ? "#f3f4f6" : "#111827", Q = B ? "#9ca3af" : "#6b7280", tt = B ? "#374151" : "#f3f4f6", X = B ? "#4b5563" : "#d1d5db", st = B ? "#ffffff" : "#000000", mt = B ? "#000000" : "#ffffff", vt = B ? "#1f2937" : "#ffffff", pt = "#ef4444", At = (St = "12px") => ({
51880
51885
  width: "100%",
51881
51886
  padding: "12px 16px",
51882
51887
  border: `1px solid ${X}`,
51883
51888
  borderRadius: "8px",
51884
51889
  fontSize: "14px",
51885
51890
  backgroundColor: tt,
51886
- color: F,
51891
+ color: W,
51887
51892
  outline: "none",
51888
51893
  marginBottom: St,
51889
51894
  boxSizing: "border-box"
@@ -51970,7 +51975,7 @@ ${M.message}` : M.message;
51970
51975
  style: {
51971
51976
  fontSize: "24px",
51972
51977
  fontWeight: 700,
51973
- color: F,
51978
+ color: W,
51974
51979
  marginBottom: "8px",
51975
51980
  textAlign: "center"
51976
51981
  }
@@ -52072,7 +52077,7 @@ ${M.message}` : M.message;
52072
52077
  fontSize: "15px",
52073
52078
  fontWeight: 600,
52074
52079
  backgroundColor: qe ? B ? "#4b5563" : "#9ca3af" : st,
52075
- color: gt,
52080
+ color: mt,
52076
52081
  border: "none",
52077
52082
  cursor: qe ? "not-allowed" : "pointer",
52078
52083
  marginBottom: "8px"
@@ -52119,7 +52124,7 @@ ${M.message}` : M.message;
52119
52124
  style: {
52120
52125
  fontSize: "24px",
52121
52126
  fontWeight: 700,
52122
- color: F,
52127
+ color: W,
52123
52128
  marginBottom: "8px",
52124
52129
  textAlign: "center"
52125
52130
  }
@@ -52246,7 +52251,7 @@ ${M.message}` : M.message;
52246
52251
  fontSize: "15px",
52247
52252
  fontWeight: 600,
52248
52253
  backgroundColor: qe ? B ? "#4b5563" : "#9ca3af" : st,
52249
- color: gt,
52254
+ color: mt,
52250
52255
  border: "none",
52251
52256
  cursor: qe ? "not-allowed" : "pointer",
52252
52257
  marginBottom: "16px"
@@ -52277,7 +52282,7 @@ ${M.message}` : M.message;
52277
52282
  style: {
52278
52283
  fontSize: "24px",
52279
52284
  fontWeight: 700,
52280
- color: F,
52285
+ color: W,
52281
52286
  marginBottom: "8px",
52282
52287
  textAlign: "center"
52283
52288
  }
@@ -52357,7 +52362,7 @@ ${M.message}` : M.message;
52357
52362
  fontSize: "15px",
52358
52363
  fontWeight: 600,
52359
52364
  backgroundColor: qe ? B ? "#4b5563" : "#9ca3af" : st,
52360
- color: gt,
52365
+ color: mt,
52361
52366
  border: "none",
52362
52367
  cursor: qe ? "not-allowed" : "pointer",
52363
52368
  marginBottom: "16px"
@@ -52388,7 +52393,7 @@ ${M.message}` : M.message;
52388
52393
  style: {
52389
52394
  fontSize: "24px",
52390
52395
  fontWeight: 700,
52391
- color: F,
52396
+ color: W,
52392
52397
  marginBottom: "8px",
52393
52398
  textAlign: "center"
52394
52399
  }
@@ -52471,7 +52476,7 @@ ${M.message}` : M.message;
52471
52476
  fontSize: "15px",
52472
52477
  fontWeight: 600,
52473
52478
  backgroundColor: qe ? B ? "#4b5563" : "#9ca3af" : st,
52474
- color: gt,
52479
+ color: mt,
52475
52480
  border: "none",
52476
52481
  cursor: qe ? "not-allowed" : "pointer",
52477
52482
  marginBottom: "16px"
@@ -52495,7 +52500,7 @@ ${M.message}` : M.message;
52495
52500
  "Back to Sign In"
52496
52501
  )
52497
52502
  ));
52498
- const O = ((kt = e == null ? void 0 : e.config) == null ? void 0 : kt.auth) || {}, k = O.style === "page" ? "page" : "modal", W = O.containerStyle || {}, et = _.createElement(
52503
+ const O = ((kt = e == null ? void 0 : e.config) == null ? void 0 : kt.auth) || {}, k = O.style === "page" ? "page" : "modal", F = O.containerStyle || {}, et = _.createElement(
52499
52504
  "div",
52500
52505
  {
52501
52506
  key: "auth-box",
@@ -52505,7 +52510,7 @@ ${M.message}` : M.message;
52505
52510
  padding: "24px",
52506
52511
  backgroundColor: "#000000",
52507
52512
  borderRadius: "12px",
52508
- ...W
52513
+ ...F
52509
52514
  }
52510
52515
  },
52511
52516
  ...w
@@ -52602,51 +52607,51 @@ ${M.message}` : M.message;
52602
52607
  }, za = async (M, $, I) => {
52603
52608
  var Z, B;
52604
52609
  try {
52605
- let F = String(Ns(M) ?? "");
52606
- const Q = F.match(
52610
+ let W = String(Ns(M) ?? "");
52611
+ const Q = W.match(
52607
52612
  /^\{\{\s*(.+?)\s*\?\s*(.*?)\s+:\s+(.*?)\s*\}\}$/
52608
52613
  );
52609
- Q && (F = yi(Q[1]) ? Q[2] : Q[3]);
52610
- const tt = F.split(";").map((a) => a.trim()).filter(Boolean);
52614
+ Q && (W = yi(Q[1]) ? Q[2] : Q[3]);
52615
+ const tt = W.split(";").map((a) => a.trim()).filter(Boolean);
52611
52616
  if (tt.length > 1) {
52612
52617
  for (const a of tt)
52613
52618
  await za(a, void 0, I);
52614
52619
  return;
52615
52620
  }
52616
- if (F === "go_back") {
52621
+ if (W === "go_back") {
52617
52622
  Mo();
52618
52623
  return;
52619
52624
  }
52620
- if (F === "toggle_theme") {
52625
+ if (W === "toggle_theme") {
52621
52626
  $s(
52622
52627
  (ue._colorMode || ae.colorMode) === "dark" ? "light" : "dark"
52623
52628
  );
52624
52629
  return;
52625
52630
  }
52626
- if (F === "close_modal") {
52631
+ if (W === "close_modal") {
52627
52632
  qi();
52628
52633
  return;
52629
52634
  }
52630
- const X = F.match(/^(toast|show_toast):(.*)$/);
52635
+ const X = W.match(/^(toast|show_toast):(.*)$/);
52631
52636
  if (X) {
52632
52637
  const a = X[2].trim();
52633
52638
  a && ke(a, "success");
52634
52639
  return;
52635
52640
  }
52636
- const st = F.match(/^scroll_to:([\w-]+)$/);
52641
+ const st = W.match(/^scroll_to:([\w-]+)$/);
52637
52642
  if (st) {
52638
52643
  (Z = document.getElementById(st[1])) == null || Z.scrollIntoView({ behavior: "smooth", block: "start" });
52639
52644
  return;
52640
52645
  }
52641
- const gt = F.match(/^set_data:([\w.]+)=(.*)$/);
52642
- if (gt) {
52646
+ const mt = W.match(/^set_data:([\w.]+)=(.*)$/);
52647
+ if (mt) {
52643
52648
  oe((a) => ({
52644
52649
  ...a,
52645
- [gt[1]]: gt[2]
52650
+ [mt[1]]: mt[2]
52646
52651
  }));
52647
52652
  return;
52648
52653
  }
52649
- const vt = F.match(/^native:([a-z][\w.-]*)$/i);
52654
+ const vt = W.match(/^native:([a-z][\w.-]*)$/i);
52650
52655
  if (vt) {
52651
52656
  if (!i) {
52652
52657
  ke("Native app required", "error");
@@ -52662,7 +52667,7 @@ ${M.message}` : M.message;
52662
52667
  }
52663
52668
  return;
52664
52669
  }
52665
- const pt = F.match(/^copy_to_clipboard:(.*)$/);
52670
+ const pt = W.match(/^copy_to_clipboard:(.*)$/);
52666
52671
  if (pt) {
52667
52672
  const a = pt[1];
52668
52673
  try {
@@ -52674,7 +52679,7 @@ ${M.message}` : M.message;
52674
52679
  ke("API key copied", "success");
52675
52680
  return;
52676
52681
  }
52677
- const At = F.match(
52682
+ const At = W.match(
52678
52683
  /^auth:(login|register|forgot|reset|logout)$/
52679
52684
  );
52680
52685
  if (At) {
@@ -52687,20 +52692,20 @@ ${M.message}` : M.message;
52687
52692
  un(null), te(At[1]), Lt(!0);
52688
52693
  return;
52689
52694
  }
52690
- if (F === "accept_startup_modal") {
52695
+ if (W === "accept_startup_modal") {
52691
52696
  const a = ae.startupModal;
52692
52697
  a && localStorage.setItem(`backflow_startup_modal_${a}`, "1"), qi();
52693
52698
  const d = nt.find((g) => g.route === "/");
52694
52699
  d && (Qt((g) => [...g, Ct]), Bn(d.id));
52695
52700
  return;
52696
52701
  }
52697
- if (F === "decline_startup_modal") {
52702
+ if (W === "decline_startup_modal") {
52698
52703
  qi();
52699
52704
  const a = nt.find((d) => d.route === "/");
52700
52705
  a && (Qt((d) => [...d, Ct]), Bn(a.id));
52701
52706
  return;
52702
52707
  }
52703
- if (F === "toggle_select") {
52708
+ if (W === "toggle_select") {
52704
52709
  oe((a) => ({
52705
52710
  ...a,
52706
52711
  _selectMode: !a._selectMode,
@@ -52708,15 +52713,15 @@ ${M.message}` : M.message;
52708
52713
  }));
52709
52714
  return;
52710
52715
  }
52711
- if (F.startsWith("go_to_step:"))
52712
- Xr(F.replace("go_to_step:", "")), Yn($, !0);
52713
- else if (F.startsWith("navigate:"))
52714
- Xr(F.replace("navigate:", "")), Yn($, !0);
52715
- else if (Yf(F) && t) {
52716
- const a = Bf(F), d = await ry(t, a, ue);
52716
+ if (W.startsWith("go_to_step:"))
52717
+ Xr(W.replace("go_to_step:", "")), Yn($, !0);
52718
+ else if (W.startsWith("navigate:"))
52719
+ Xr(W.replace("navigate:", "")), Yn($, !0);
52720
+ else if (Yf(W) && t) {
52721
+ const a = Bf(W), d = await ry(t, a, ue);
52717
52722
  d != null && d.data ? oe((g) => ({ ...g, ...d.data })) : d && typeof d == "object" && !Array.isArray(d) && oe((g) => ({ ...g, ...d })), d != null && d.url && String(d.url).startsWith("http") && window.open(String(d.url), "_blank", "noopener,noreferrer"), Yn($, !0);
52718
- } else if (F.startsWith("show_modal:")) {
52719
- const a = F.replace("show_modal:", "");
52723
+ } else if (W.startsWith("show_modal:")) {
52724
+ const a = W.replace("show_modal:", "");
52720
52725
  if (Fe[a]) {
52721
52726
  const d = Fe[a];
52722
52727
  if (Es(
@@ -52724,23 +52729,23 @@ ${M.message}` : M.message;
52724
52729
  ), Os.current = d.popover && (I == null ? void 0 : I.anchorElement) || null, Kr.current && typeof Kr.current == "object") {
52725
52730
  const O = Object.keys(Kr.current);
52726
52731
  oe((k) => {
52727
- const W = { ...k };
52732
+ const F = { ...k };
52728
52733
  for (const et of Ba.current)
52729
- O.includes(et) || delete W[et];
52730
- return { ...W, ...Kr.current };
52734
+ O.includes(et) || delete F[et];
52735
+ return { ...F, ...Kr.current };
52731
52736
  }), Ba.current = O;
52732
52737
  }
52733
52738
  const g = d.clearFormKeys;
52734
52739
  Array.isArray(g) && g.length > 0 && oe((O) => {
52735
52740
  const k = { ...O };
52736
- for (const W of g) delete k[W];
52741
+ for (const F of g) delete k[F];
52737
52742
  return k;
52738
52743
  });
52739
52744
  const w = d.defaults;
52740
52745
  w && typeof w == "object" && oe((O) => {
52741
52746
  const k = { ...O };
52742
- for (const [W, et] of Object.entries(w))
52743
- k[W] === void 0 && (k[W] = et);
52747
+ for (const [F, et] of Object.entries(w))
52748
+ k[F] === void 0 && (k[F] = et);
52744
52749
  return k;
52745
52750
  }), d.preload && await Xi(String(d.preload)), (Pe == null ? void 0 : Pe.id) === a || (_n == null ? void 0 : _n.id) === a || (nr(null), cn({ id: a, definition: d }));
52746
52751
  } else {
@@ -52762,20 +52767,20 @@ ${M.message}` : M.message;
52762
52767
  });
52763
52768
  }
52764
52769
  Yn($, !0);
52765
- } else F.startsWith("execute_workflow:") ? (await Xi(
52766
- F.replace("execute_workflow:", ""),
52770
+ } else W.startsWith("execute_workflow:") ? (await Xi(
52771
+ W.replace("execute_workflow:", ""),
52767
52772
  I
52768
- ), Yn($, !0)) : F.startsWith("fetch:") && (await Xi(F.replace("fetch:", ""), I), o == null || o(F.replace("fetch:", "")), Yn($, !0));
52769
- } catch (F) {
52770
- if (iy("[handleButtonClick] caught error:", F, "callbacks:", $), (F == null ? void 0 : F.status) === 401) {
52773
+ ), Yn($, !0)) : W.startsWith("fetch:") && (await Xi(W.replace("fetch:", ""), I), o == null || o(W.replace("fetch:", "")), Yn($, !0));
52774
+ } catch (W) {
52775
+ if (iy("[handleButtonClick] caught error:", W, "callbacks:", $), (W == null ? void 0 : W.status) === 401) {
52771
52776
  await Ro({ status: 401 }, !0);
52772
52777
  return;
52773
52778
  }
52774
- if (F instanceof jo) {
52775
- if (Cc(F, $ == null ? void 0 : $.onError)) return;
52776
- ke(F.errors.length > 1 ? F.errors : F.errors[0], "error");
52779
+ if (W instanceof jo) {
52780
+ if (Cc(W, $ == null ? void 0 : $.onError)) return;
52781
+ ke(W.errors.length > 1 ? W.errors : W.errors[0], "error");
52777
52782
  } else (B = $ == null ? void 0 : $.onError) != null && B.message ? ke($.onError.message, "error") : ke(
52778
- F instanceof Error ? F.message : "An error occurred",
52783
+ W instanceof Error ? W.message : "An error occurred",
52779
52784
  "error"
52780
52785
  );
52781
52786
  }
@@ -52841,8 +52846,8 @@ ${M.message}` : M.message;
52841
52846
  ...ue,
52842
52847
  $data: on.current
52843
52848
  }).then((st) => {
52844
- Qe.current || (Z && (on.current[Z] = st), Wa((gt) => ({
52845
- ...gt,
52849
+ Qe.current || (Z && (on.current[Z] = st), Wa((mt) => ({
52850
+ ...mt,
52846
52851
  [Q]: String(st ?? "")
52847
52852
  })));
52848
52853
  }).catch(() => {
@@ -52855,8 +52860,8 @@ ${M.message}` : M.message;
52855
52860
  const X = Bh[I || ""];
52856
52861
  return I && X !== void 0 ? X : (km($).then((st) => {
52857
52862
  var vt, pt;
52858
- const gt = st && (st[Q] || ((vt = st.default) == null ? void 0 : vt[Q]) || ((pt = st.exports) == null ? void 0 : pt[Q])) || (typeof st == "function" ? st : void 0);
52859
- typeof gt == "function" && I && Promise.resolve(gt(tt, { data: on.current })).then(
52863
+ const mt = st && (st[Q] || ((vt = st.default) == null ? void 0 : vt[Q]) || ((pt = st.exports) == null ? void 0 : pt[Q])) || (typeof st == "function" ? st : void 0);
52864
+ typeof mt == "function" && I && Promise.resolve(mt(tt, { data: on.current })).then(
52860
52865
  (At) => {
52861
52866
  Qe.current || (Z && (on.current[Z] = At), Wa((a) => ({
52862
52867
  ...a,
@@ -52870,24 +52875,24 @@ ${M.message}` : M.message;
52870
52875
  return Q === "timeago" ? Fa(tt) : Q === "date" ? Ji(tt, "date") : Q === "time" ? Ji(tt, "time") : Q === "datetime" ? Ji(tt, "datetime") : Q === "upper" ? String(tt).toUpperCase() : Q === "lower" ? String(tt).toLowerCase() : String(tt ?? "");
52871
52876
  }
52872
52877
  if (M.startsWith("{{") && M.endsWith("}}")) {
52873
- const tt = M.slice(2, -2).trim().split("|").map((vt) => vt.trim()), X = tt[0], st = tt[1], gt = X.startsWith("{") && X.endsWith("}") ? Jr(X.slice(1, -1)) : X.startsWith("$") ? Jr(X.slice(1)) : ue[X];
52874
- return st ? Ji(gt, st) : String(gt ?? "");
52878
+ const tt = M.slice(2, -2).trim().split("|").map((vt) => vt.trim()), X = tt[0], st = tt[1], mt = X.startsWith("{") && X.endsWith("}") ? Jr(X.slice(1, -1)) : X.startsWith("$") ? Jr(X.slice(1)) : ue[X];
52879
+ return st ? Ji(mt, st) : String(mt ?? "");
52875
52880
  }
52876
52881
  if (M.startsWith("{") && M.endsWith("}"))
52877
52882
  return String(Jr(M.slice(1, -1)) ?? "");
52878
- const F = M.trim();
52879
- return /^[A-Za-z_][\w.-]*$/.test(F) ? String(Jr(F) ?? "") : String(M ?? "");
52883
+ const W = M.trim();
52884
+ return /^[A-Za-z_][\w.-]*$/.test(W) ? String(Jr(W) ?? "") : String(M ?? "");
52880
52885
  }, Ns = (M) => M ? M.replace(
52881
52886
  /\{\{\s*\[([\w/.-]+)\](?:\.([\w.]+(?:\|\w+)?))?\s*(?:\|\|\s*(.+?))?\}\}/g,
52882
52887
  ($, I, Z, B) => {
52883
- let F, Q = Z;
52888
+ let W, Q = Z;
52884
52889
  if (Z != null && Z.includes("|")) {
52885
52890
  const X = Z.split("|");
52886
- Q = X[0], F = X[1];
52891
+ Q = X[0], W = X[1];
52887
52892
  }
52888
52893
  const tt = Jr(Q ? `${I}.${Q}` : I);
52889
52894
  if (tt != null) {
52890
- const X = F ? Ji(tt, F) : tt;
52895
+ const X = W ? Ji(tt, W) : tt;
52891
52896
  return Array.isArray(X) || typeof X == "object" ? JSON.stringify(X) : String(X);
52892
52897
  }
52893
52898
  return B !== void 0 ? B.replace(/^["']|["']$/g, "") : "";
@@ -52895,20 +52900,20 @@ ${M.message}` : M.message;
52895
52900
  ).replace(
52896
52901
  /\{\{(\w+(?:\.\w+)*)\s*(?:\|(date|time|datetime|timeago)\s*)?(?:\|\|\s*(.+?))?\}\}/g,
52897
52902
  ($, I, Z, B) => {
52898
- const F = I.split(".");
52903
+ const W = I.split(".");
52899
52904
  let Q = ue;
52900
- for (const tt of F) Q = Q == null ? void 0 : Q[tt];
52905
+ for (const tt of W) Q = Q == null ? void 0 : Q[tt];
52901
52906
  if (Q !== void 0)
52902
52907
  return Z ? Ji(Q, Z) : String(Q);
52903
52908
  if (Kr.current) {
52904
52909
  let tt = Kr.current;
52905
- for (const X of F) tt = tt == null ? void 0 : tt[X];
52910
+ for (const X of W) tt = tt == null ? void 0 : tt[X];
52906
52911
  if (tt !== void 0)
52907
52912
  return Z ? Ji(tt, Z) : String(tt);
52908
52913
  }
52909
- if (F[0] === "config") {
52914
+ if (W[0] === "config") {
52910
52915
  let tt = e == null ? void 0 : e.config;
52911
- for (const X of F.slice(1)) tt = tt == null ? void 0 : tt[X];
52916
+ for (const X of W.slice(1)) tt = tt == null ? void 0 : tt[X];
52912
52917
  if (tt !== void 0) return String(tt);
52913
52918
  }
52914
52919
  return B !== void 0 ? B.replace(/^["']|["']$/g, "") : "";
@@ -52917,16 +52922,16 @@ ${M.message}` : M.message;
52917
52922
  if (!M) return !0;
52918
52923
  if (typeof M == "object")
52919
52924
  try {
52920
- const F = (tt) => {
52925
+ const W = (tt) => {
52921
52926
  const X = Date.parse(String(tt));
52922
52927
  return Number.isNaN(X) ? Number(tt) : X;
52923
52928
  }, Q = {
52924
52929
  ...ue,
52925
52930
  ...$,
52926
52931
  now: () => Date.now(),
52927
- date: F,
52928
- isAfter: (tt, X) => F(tt) > F(X),
52929
- isBefore: (tt, X) => F(tt) < F(X),
52932
+ date: W,
52933
+ isAfter: (tt, X) => W(tt) > W(X),
52934
+ isBefore: (tt, X) => W(tt) < W(X),
52930
52935
  includes: (tt, X) => Array.isArray(tt) ? tt.includes(X) : String(tt ?? "").includes(String(X ?? "")),
52931
52936
  length: (tt) => String(tt ?? "").length,
52932
52937
  lower: (tt) => String(tt ?? "").toLowerCase(),
@@ -52938,16 +52943,16 @@ ${M.message}` : M.message;
52938
52943
  } catch {
52939
52944
  return !1;
52940
52945
  }
52941
- const I = (F) => {
52946
+ const I = (W) => {
52942
52947
  var tt;
52943
- if (F === "auth") {
52948
+ if (W === "auth") {
52944
52949
  const X = (tt = e == null ? void 0 : e.auth) == null ? void 0 : tt.signedIn;
52945
52950
  return X === void 0 ? ft : X;
52946
52951
  }
52947
- if (F.startsWith("[") && F.includes("]")) {
52948
- const X = F.indexOf("]"), st = on.current[F.slice(1, X)], gt = F.slice(X + 1).replace(/^\./, "");
52952
+ if (W.startsWith("[") && W.includes("]")) {
52953
+ const X = W.indexOf("]"), st = on.current[W.slice(1, X)], mt = W.slice(X + 1).replace(/^\./, "");
52949
52954
  let vt;
52950
- const pt = gt.split(".").filter(Boolean);
52955
+ const pt = mt.split(".").filter(Boolean);
52951
52956
  pt[0] === "response" || pt[0] === "items" ? vt = st : vt = (st == null ? void 0 : st.items) ?? st;
52952
52957
  for (const At of pt) {
52953
52958
  if (vt == null) return;
@@ -52956,33 +52961,33 @@ ${M.message}` : M.message;
52956
52961
  return vt;
52957
52962
  }
52958
52963
  let Q = $;
52959
- for (const X of F.split(".")) Q = Q == null ? void 0 : Q[X];
52964
+ for (const X of W.split(".")) Q = Q == null ? void 0 : Q[X];
52960
52965
  return Q;
52961
52966
  }, Z = M.trim();
52962
52967
  if (Z.includes("||"))
52963
- return Z.split("||").some((F) => gi(F, $));
52968
+ return Z.split("||").some((W) => gi(W, $));
52964
52969
  if (Z.includes("&&"))
52965
- return Z.split("&&").every((F) => gi(F, $));
52970
+ return Z.split("&&").every((W) => gi(W, $));
52966
52971
  if (Z.startsWith("!"))
52967
52972
  return !I(Z.slice(1).trim());
52968
52973
  const B = Z.match(
52969
52974
  /^(\[[^\]]+\](?:\.\w+)*|\w+(?:\.\w+)*)\s*(==|!=|>|<|>=|<=)\s*(.+)$/
52970
52975
  );
52971
52976
  if (B) {
52972
- const F = I(B[1]), Q = B[3].trim().replace(/^["']|["']$/g, "");
52977
+ const W = I(B[1]), Q = B[3].trim().replace(/^["']|["']$/g, "");
52973
52978
  switch (B[2]) {
52974
52979
  case "==":
52975
- return String(F) === Q;
52980
+ return String(W) === Q;
52976
52981
  case "!=":
52977
- return String(F) !== Q;
52982
+ return String(W) !== Q;
52978
52983
  case ">":
52979
- return Number(F) > Number(Q);
52984
+ return Number(W) > Number(Q);
52980
52985
  case "<":
52981
- return Number(F) < Number(Q);
52986
+ return Number(W) < Number(Q);
52982
52987
  case ">=":
52983
- return Number(F) >= Number(Q);
52988
+ return Number(W) >= Number(Q);
52984
52989
  case "<=":
52985
- return Number(F) <= Number(Q);
52990
+ return Number(W) <= Number(Q);
52986
52991
  }
52987
52992
  }
52988
52993
  return !!I(Z);
@@ -52995,14 +53000,14 @@ ${M.message}` : M.message;
52995
53000
  const I = { ...M };
52996
53001
  return $.scale !== void 0 && $.scale !== 100 && (I.transform = `scale(${$.scale / 100})`, I.transformOrigin = "center center"), $.spacing !== void 0 && $.spacing !== 0 && (I.margin = `${$.spacing}px`), $.alignment && $.alignment !== "center" && (I.textAlign = $.alignment, $.alignment === "left" ? (I.marginLeft = "0", I.marginRight = "auto") : $.alignment === "right" && (I.marginLeft = "auto", I.marginRight = "0")), $.color && (I.color = $.color), $.background && (I.backgroundColor = $.background), $.borderColor && (I.borderColor = $.borderColor), I;
52997
53002
  }, or = (M, $, I) => {
52998
- const Z = I == null ? void 0 : I.componentClass, F = h === M || u && Z && u === Z, Q = I ? Rs($, I) : $, tt = $m(
53003
+ const Z = I == null ? void 0 : I.componentClass, W = h === M || u && Z && u === Z, Q = I ? Rs($, I) : $, tt = $m(
52999
53004
  Q,
53000
53005
  M,
53001
53006
  Z
53002
53007
  ), X = (I == null ? void 0 : I.className) || "";
53003
53008
  /\bfont-serif\b/.test(X) && (tt.fontFamily = ae.typography.headingFontFamily), /\bfont-sans\b/.test(X) && (tt.fontFamily = ae.typography.fontFamily), I != null && I.fieldSpan && I.fieldSpan > 1 && (tt.gridColumn = `span ${I.fieldSpan} / span ${I.fieldSpan}`), I != null && I.rawStyle && Object.assign(tt, I.rawStyle);
53004
53009
  const st = Et === "css-driven" ? { "data-bf-r": `${In}-${M}` } : {};
53005
- if (F) {
53010
+ if (W) {
53006
53011
  const vt = tt.boxShadow ? `${tt.boxShadow}, ` : "";
53007
53012
  return {
53008
53013
  "data-component-key": M,
@@ -53047,51 +53052,51 @@ ${M.message}` : M.message;
53047
53052
  marginRight: "mr",
53048
53053
  marginBottom: "mb",
53049
53054
  marginLeft: "ml"
53050
- }, X = (st, gt) => `var(--bf-${tt[st] || st}-${$}, ${B[st] || gt})`;
53055
+ }, X = (st, mt) => `var(--bf-${tt[st] || st}-${$}, ${B[st] || mt})`;
53051
53056
  if (I.flexDirection.size > 0 && (B.flexDirection = X("flexDirection", "column")), I.gap.size > 0 && (B.gap = X("gap", "0px")), I.width.size > 0 && (B.width = X("width", "auto")), I.minHeight.size > 0 && (B.minHeight = X("minHeight", "0px")), I.alignItems.size > 0 && (B.alignItems = X("alignItems", "stretch")), I.justifyContent.size > 0 && (B.justifyContent = X("justifyContent", "flex-start")), I.display.size > 0 && (B.display = X("display", "flex")), I.gridCols.size > 0) {
53052
- const st = B.gridTemplateColumns || "1", gt = typeof st == "string" ? (Q = st.match(/^repeat\((\d+)/)) == null ? void 0 : Q[1] : st;
53053
- B.gridTemplateColumns = `repeat(var(--bf-cols-${$}, ${gt || "1"}), minmax(0, 1fr))`;
53057
+ const st = B.gridTemplateColumns || "1", mt = typeof st == "string" ? (Q = st.match(/^repeat\((\d+)/)) == null ? void 0 : Q[1] : st;
53058
+ B.gridTemplateColumns = `repeat(var(--bf-cols-${$}, ${mt || "1"}), minmax(0, 1fr))`;
53054
53059
  }
53055
53060
  return I.gridTemplateColumns.size > 0 && (B.gridTemplateColumns = X(
53056
53061
  "gridTemplateColumns",
53057
53062
  String(B.gridTemplateColumns || "none")
53058
53063
  )), I.textSize.size > 0 && (B.fontSize = X("fontSize", "1rem")), I.borderRadius.size > 0 && (B.borderRadius = X("borderRadius", "0px")), I.padding.p.size > 0 && (B.padding = X("padding", "0px")), I.padding.px.size > 0 && (B.paddingLeft = X("paddingLeft", "0px"), B.paddingRight = X("paddingRight", "0px")), I.padding.py.size > 0 && (B.paddingTop = X("paddingTop", "0px"), B.paddingBottom = X("paddingBottom", "0px")), I.margin.all.size > 0 && (B.margin = X("margin", "0px")), I.margin.t.size > 0 && (B.marginTop = X("marginTop", "0px")), I.margin.r.size > 0 && (B.marginRight = X("marginRight", "0px")), I.margin.b.size > 0 && (B.marginBottom = X("marginBottom", "0px")), I.margin.l.size > 0 && (B.marginLeft = X("marginLeft", "0px")), I.margin.x.size > 0 && (B.marginLeft = X("marginLeft", "0px"), B.marginRight = X("marginRight", "0px")), I.margin.y.size > 0 && (B.marginTop = X("marginTop", "0px"), B.marginBottom = X("marginBottom", "0px")), B;
53059
53064
  }
53060
- const F = re;
53065
+ const W = re;
53061
53066
  if (I.flexDirection.size > 0 && (B.flexDirection = zt(
53062
53067
  I.flexDirection,
53063
- F,
53068
+ W,
53064
53069
  "column"
53065
- )), I.gap.size > 0 && (B.gap = zt(I.gap, F, "0px")), I.width.size > 0 && (B.width = zt(I.width, F, "auto")), I.minHeight.size > 0 && (B.minHeight = zt(I.minHeight, F, "0px")), I.alignItems.size > 0 && (B.alignItems = zt(I.alignItems, F, "stretch")), I.justifyContent.size > 0 && (B.justifyContent = zt(
53070
+ )), I.gap.size > 0 && (B.gap = zt(I.gap, W, "0px")), I.width.size > 0 && (B.width = zt(I.width, W, "auto")), I.minHeight.size > 0 && (B.minHeight = zt(I.minHeight, W, "0px")), I.alignItems.size > 0 && (B.alignItems = zt(I.alignItems, W, "stretch")), I.justifyContent.size > 0 && (B.justifyContent = zt(
53066
53071
  I.justifyContent,
53067
- F,
53072
+ W,
53068
53073
  "flex-start"
53069
- )), I.display.size > 0 && (B.display = zt(I.display, F, "flex")), I.gridCols.size > 0) {
53070
- const tt = zt(I.gridCols, F, 1);
53074
+ )), I.display.size > 0 && (B.display = zt(I.display, W, "flex")), I.gridCols.size > 0) {
53075
+ const tt = zt(I.gridCols, W, 1);
53071
53076
  B.gridTemplateColumns = `repeat(${tt}, minmax(0, 1fr))`;
53072
53077
  }
53073
53078
  return I.gridTemplateColumns.size > 0 && (B.gridTemplateColumns = zt(
53074
53079
  I.gridTemplateColumns,
53075
- F,
53080
+ W,
53076
53081
  String(B.gridTemplateColumns || "none")
53077
- )), I.textSize.size > 0 && (B.fontSize = zt(I.textSize, F, "1rem")), I.borderRadius.size > 0 && (B.borderRadius = zt(I.borderRadius, F, "0px")), I.padding.p.size > 0 && (B.padding = zt(I.padding.p, F, "0px")), I.padding.px.size > 0 && (B.paddingLeft = zt(I.padding.px, F, "0px"), B.paddingRight = zt(I.padding.px, F, "0px")), I.padding.py.size > 0 && (B.paddingTop = zt(I.padding.py, F, "0px"), B.paddingBottom = zt(I.padding.py, F, "0px")), I.margin.all.size > 0 && (B.margin = zt(I.margin.all, F, "0px")), I.margin.t.size > 0 && (B.marginTop = zt(I.margin.t, F, "0px")), I.margin.r.size > 0 && (B.marginRight = zt(I.margin.r, F, "0px")), I.margin.b.size > 0 && (B.marginBottom = zt(I.margin.b, F, "0px")), I.margin.l.size > 0 && (B.marginLeft = zt(I.margin.l, F, "0px")), I.margin.x.size > 0 && (B.marginLeft = zt(I.margin.x, F, "0px"), B.marginRight = zt(I.margin.x, F, "0px")), I.margin.y.size > 0 && (B.marginTop = zt(I.margin.y, F, "0px"), B.marginBottom = zt(I.margin.y, F, "0px")), B;
53082
+ )), I.textSize.size > 0 && (B.fontSize = zt(I.textSize, W, "1rem")), I.borderRadius.size > 0 && (B.borderRadius = zt(I.borderRadius, W, "0px")), I.padding.p.size > 0 && (B.padding = zt(I.padding.p, W, "0px")), I.padding.px.size > 0 && (B.paddingLeft = zt(I.padding.px, W, "0px"), B.paddingRight = zt(I.padding.px, W, "0px")), I.padding.py.size > 0 && (B.paddingTop = zt(I.padding.py, W, "0px"), B.paddingBottom = zt(I.padding.py, W, "0px")), I.margin.all.size > 0 && (B.margin = zt(I.margin.all, W, "0px")), I.margin.t.size > 0 && (B.marginTop = zt(I.margin.t, W, "0px")), I.margin.r.size > 0 && (B.marginRight = zt(I.margin.r, W, "0px")), I.margin.b.size > 0 && (B.marginBottom = zt(I.margin.b, W, "0px")), I.margin.l.size > 0 && (B.marginLeft = zt(I.margin.l, W, "0px")), I.margin.x.size > 0 && (B.marginLeft = zt(I.margin.x, W, "0px"), B.marginRight = zt(I.margin.x, W, "0px")), I.margin.y.size > 0 && (B.marginTop = zt(I.margin.y, W, "0px"), B.marginBottom = zt(I.margin.y, W, "0px")), B;
53078
53083
  }, $c = _.useRef(/* @__PURE__ */ new Map()), Im = _.useCallback(
53079
53084
  async (M) => {
53080
53085
  const $ = $c.current.get(M);
53081
53086
  if ($) return $;
53082
- const I = r || localStorage.getItem("token") || "", Z = t == null ? void 0 : t.endpoint, B = R || (typeof Z == "string" ? Z.replace(/\/+$/, "") : "") || "/api", F = `?collection=${encodeURIComponent(M)}`;
53087
+ const I = r || localStorage.getItem("token") || "", Z = t == null ? void 0 : t.endpoint, B = R || (typeof Z == "string" ? Z.replace(/\/+$/, "") : "") || "/api", W = `?collection=${encodeURIComponent(M)}`;
53083
53088
  for (const Q of [
53084
- `${B}/tenant/schema${F}`,
53085
- `${B}/admin/schema${F}`
53089
+ `${B}/tenant/schema${W}`,
53090
+ `${B}/admin/schema${W}`
53086
53091
  ])
53087
53092
  try {
53088
53093
  const tt = await fetch(Q, {
53089
53094
  headers: { Authorization: `Bearer ${I}` }
53090
53095
  });
53091
53096
  if (!tt.ok) continue;
53092
- const X = await tt.json(), gt = (Array.isArray(X) ? X : Array.isArray(X == null ? void 0 : X.data) ? X.data : []).find((vt) => vt.collection === M) || null;
53093
- if (!gt) continue;
53094
- return $c.current.set(M, gt), gt;
53097
+ const X = await tt.json(), st = Array.isArray(X) ? X : Array.isArray(X == null ? void 0 : X.data) ? X.data : [], mt = st.find((vt) => vt.collection === M) || null;
53098
+ if (console.log(`[SchemaDebug][FE] fetchEntitySchema collection=${M} found=${!!mt} totalSchemas=${st.length}`, mt), !mt) continue;
53099
+ return $c.current.set(M, mt), mt;
53095
53100
  } catch {
53096
53101
  }
53097
53102
  return null;
@@ -53187,15 +53192,15 @@ ${M.message}` : M.message;
53187
53192
  "data-bf-scroll-load"
53188
53193
  );
53189
53194
  if (!Z || bi.current[Z]) continue;
53190
- const B = Mr.current[Z], F = pi.current[Z];
53191
- if (!F || !(B != null && B.hasMore) || Uh.current[Z])
53195
+ const B = Mr.current[Z], W = pi.current[Z];
53196
+ if (!W || !(B != null && B.hasMore) || Uh.current[Z])
53192
53197
  continue;
53193
53198
  bi.current[Z] = !0;
53194
53199
  const Q = vi.current[Z] || 1;
53195
53200
  vi.current[Z] = Q + 1;
53196
53201
  const tt = Vh.current[Z];
53197
53202
  $n(
53198
- F,
53203
+ W,
53199
53204
  Z,
53200
53205
  Q,
53201
53206
  B.limit,
@@ -53228,13 +53233,13 @@ ${M.message}` : M.message;
53228
53233
  if (!de) return;
53229
53234
  const M = (Q) => typeof Q == "string" ? Q.replace(
53230
53235
  /\{\{\s*\[([\w/.-]+)\](?:\.([\w.]+))?\s*(?:\|\|\s*(.+?))?\}\}/g,
53231
- (tt, X, st, gt) => {
53236
+ (tt, X, st, mt) => {
53232
53237
  const vt = Jr(st ? `${X}.${st}` : X);
53233
- return vt != null ? String(vt) : gt !== void 0 ? gt.replace(/^["']|["']$/g, "") : "";
53238
+ return vt != null ? String(vt) : mt !== void 0 ? mt.replace(/^["']|["']$/g, "") : "";
53234
53239
  }
53235
53240
  ).replace(/\{\{([\w.]+)\}\}/g, (tt, X) => {
53236
53241
  const st = X.split(".").reduce(
53237
- (gt, vt) => gt == null ? void 0 : gt[vt],
53242
+ (mt, vt) => mt == null ? void 0 : mt[vt],
53238
53243
  ue
53239
53244
  );
53240
53245
  return st != null ? String(st) : "";
@@ -53244,23 +53249,23 @@ ${M.message}` : M.message;
53244
53249
  const I = (Q, tt = "") => {
53245
53250
  Array.isArray(Q) && Q.forEach((X, st) => {
53246
53251
  var At;
53247
- const gt = `${tt}-${st}`;
53252
+ const mt = `${tt}-${st}`;
53248
53253
  if ((X.type === "list" || X.type === "table") && X.dataSource) {
53249
- $.add(gt), X.key && $.add(X.key), Vh.current[gt] = X.sort || {};
53250
- const a = M(X.dataSource), d = Bo.current[gt] !== a;
53251
- d && (Bo.current[gt] = a, vi.current[gt] = 1, $n(
53254
+ $.add(mt), X.key && $.add(X.key), Vh.current[mt] = X.sort || {};
53255
+ const a = M(X.dataSource), d = Bo.current[mt] !== a;
53256
+ d && (Bo.current[mt] = a, vi.current[mt] = 1, $n(
53252
53257
  a,
53253
- gt,
53258
+ mt,
53254
53259
  0,
53255
53260
  X.pageSize || 10,
53256
53261
  void 0,
53257
53262
  void 0,
53258
53263
  X.key
53259
53264
  ));
53260
- const g = X.realtime, w = g ? M(g.channel || "") : "", O = g ? M(g.url || "") : "", k = g ? M(g.event || "") : "", W = g ? `${O}|${w}|${k}` : "", et = Hi.current.get(gt) !== W;
53265
+ const g = X.realtime, w = g ? M(g.channel || "") : "", O = g ? M(g.url || "") : "", k = g ? M(g.event || "") : "", F = g ? `${O}|${w}|${k}` : "", et = Hi.current.get(mt) !== F;
53261
53266
  if (g && (d || et)) {
53262
- Hi.current.set(gt, W);
53263
- const ot = Zn.current.get(gt);
53267
+ Hi.current.set(mt, F);
53268
+ const ot = Zn.current.get(mt);
53264
53269
  ot && ot();
53265
53270
  const dt = X.pageSize || 10;
53266
53271
  let Pt;
@@ -53301,7 +53306,7 @@ ${M.message}` : M.message;
53301
53306
  if (Ne && !(g.onEvent.when && !gi(g.onEvent.when, Ne))) {
53302
53307
  if (g.onEvent.once === !0) {
53303
53308
  const Ge = [
53304
- gt,
53309
+ mt,
53305
53310
  g.onEvent.action,
53306
53311
  g.onEvent.when || "",
53307
53312
  (Ne == null ? void 0 : Ne.id) || Kt || ""
@@ -53316,7 +53321,7 @@ ${M.message}` : M.message;
53316
53321
  switch (g.mode) {
53317
53322
  case "poll": {
53318
53323
  const ie = g.interval || 5e3, St = window.setInterval(() => {
53319
- g.while && !gi(g.while, ci.current) || $n(a, gt, 0, dt);
53324
+ g.while && !gi(g.while, ci.current) || $n(a, mt, 0, dt);
53320
53325
  }, ie);
53321
53326
  Pt = () => clearInterval(St);
53322
53327
  break;
@@ -53328,7 +53333,7 @@ ${M.message}` : M.message;
53328
53333
  break;
53329
53334
  }
53330
53335
  const ie = r || localStorage.getItem("token") || "", St = O || `/events?channel=${w}`, Dt = ie && !St.includes("token=") ? `${St}${St.includes("?") ? "&" : "?"}token=${encodeURIComponent(ie)}` : St, Kt = new EventSource(Dt), Ne = (Ge) => {
53331
- Yt(Ge.data) && (kt(Ge.data), $n(a, gt, 0, dt));
53336
+ Yt(Ge.data) && (kt(Ge.data), $n(a, mt, 0, dt));
53332
53337
  };
53333
53338
  k ? Kt.addEventListener(k, Ne) : Kt.onmessage = Ne, Kt.onerror = () => Kt.close(), Pt = () => Kt.close();
53334
53339
  break;
@@ -53351,9 +53356,9 @@ ${M.message}` : M.message;
53351
53356
  Kt = new WebSocket(Ge);
53352
53357
  }
53353
53358
  Kt.onmessage = (Ge) => {
53354
- Yt(Ge.data) && (kt(Ge.data), $n(a, gt, 0, dt).then(
53359
+ Yt(Ge.data) && (kt(Ge.data), $n(a, mt, 0, dt).then(
53355
53360
  (ro) => {
53356
- const Fn = Array.isArray(ro) ? ro : Di[gt];
53361
+ const Fn = Array.isArray(ro) ? ro : Di[mt];
53357
53362
  g.onEvent && hn(Ge.data, Fn);
53358
53363
  const Ws = ue == null ? void 0 : ue.id;
53359
53364
  if (Ws && Array.isArray(Fn) && Va.current === Ct) {
@@ -53371,11 +53376,11 @@ ${M.message}` : M.message;
53371
53376
  Pt = () => {
53372
53377
  };
53373
53378
  }
53374
- Zn.current.set(gt, Pt);
53379
+ Zn.current.set(mt, Pt);
53375
53380
  }
53376
53381
  }
53377
53382
  if (X.type === "select" && X.dataSource) {
53378
- const a = `${gt}-sel`, d = M(X.dataSource);
53383
+ const a = `${mt}-sel`, d = M(X.dataSource);
53379
53384
  Bo.current[a] !== d && (Bo.current[a] = d, (async () => {
53380
53385
  try {
53381
53386
  const g = X.dataSource, w = M(g), O = await fetch(w, {
@@ -53384,32 +53389,32 @@ ${M.message}` : M.message;
53384
53389
  }
53385
53390
  });
53386
53391
  if (!O.ok) return;
53387
- const k = await O.json(), W = X.dataField || "configs", et = X.optionLabel || "label", ot = X.optionValue || "value", dt = k[W] || k.data || k, Pt = Array.isArray(dt) ? dt.map((kt) => ({
53392
+ const k = await O.json(), F = X.dataField || "configs", et = X.optionLabel || "label", ot = X.optionValue || "value", dt = k[F] || k.data || k, Pt = Array.isArray(dt) ? dt.map((kt) => ({
53388
53393
  label: kt[et] || kt.name || kt.label,
53389
53394
  value: kt[ot] || kt.id || kt.name || kt.label
53390
53395
  })) : [];
53391
53396
  Bi((kt) => ({
53392
53397
  ...kt,
53393
- [gt]: Pt
53398
+ [mt]: Pt
53394
53399
  }));
53395
53400
  } catch {
53396
53401
  }
53397
53402
  })());
53398
53403
  }
53399
- X.children && I(X.children, gt);
53404
+ X.children && I(X.children, mt);
53400
53405
  const vt = X.accordionItems || (X.type === "accordion" ? X.items : null);
53401
53406
  Array.isArray(vt) && vt.forEach((a, d) => {
53402
- Array.isArray(a == null ? void 0 : a.content) && I(a.content, `${gt}-acc-${d}-content`);
53407
+ Array.isArray(a == null ? void 0 : a.content) && I(a.content, `${mt}-acc-${d}-content`);
53403
53408
  }), Array.isArray(X.tabItems) && X.tabItems.forEach((a, d) => {
53404
53409
  const g = Array.isArray(a == null ? void 0 : a.content) ? a.content : Array.isArray(a == null ? void 0 : a.children) ? a.children : null;
53405
- g && I(g, `${gt}-tabcontent-${d}`);
53410
+ g && I(g, `${mt}-tabcontent-${d}`);
53406
53411
  });
53407
53412
  const pt = X;
53408
53413
  if (pt.type === "widget" && pt.widgetId) {
53409
53414
  const a = (At = e == null ? void 0 : e.widgets) == null ? void 0 : At.find(
53410
53415
  (d) => d.id === pt.widgetId
53411
53416
  );
53412
- a && Array.isArray(a.components) && I(a.components, `${gt}-${pt.widgetId}`);
53417
+ a && Array.isArray(a.components) && I(a.components, `${mt}-${pt.widgetId}`);
53413
53418
  }
53414
53419
  });
53415
53420
  }, Z = `${Ct}|${Fh}|${ft}`;
@@ -53420,8 +53425,8 @@ ${M.message}` : M.message;
53420
53425
  for (const [Q, tt] of Zn.current)
53421
53426
  Q.startsWith("modal") && (tt(), Zn.current.delete(Q), delete Bo.current[Q]);
53422
53427
  }
53423
- const F = B ? Fe == null ? void 0 : Fe[B.id] : void 0;
53424
- $ = /* @__PURE__ */ new Set(), F && Array.isArray(F == null ? void 0 : F.components) && I(F.components, "modal"), tn.current = /* @__PURE__ */ new Set([
53428
+ const W = B ? Fe == null ? void 0 : Fe[B.id] : void 0;
53429
+ $ = /* @__PURE__ */ new Set(), W && Array.isArray(W == null ? void 0 : W.components) && I(W.components, "modal"), tn.current = /* @__PURE__ */ new Set([
53425
53430
  ...mi.current,
53426
53431
  ...$
53427
53432
  ]);
@@ -53440,8 +53445,8 @@ ${M.message}` : M.message;
53440
53445
  const Ua = _.useMemo(() => {
53441
53446
  if (!de || Et !== "css-driven") return null;
53442
53447
  const M = /* @__PURE__ */ new Map(), $ = (I, Z) => {
53443
- I.forEach((B, F) => {
53444
- const Q = `${Z}-${F}`;
53448
+ I.forEach((B, W) => {
53449
+ const Q = `${Z}-${W}`;
53445
53450
  if (B.className) {
53446
53451
  const tt = i_(B.className);
53447
53452
  if (r_(tt)) {
@@ -53467,10 +53472,10 @@ ${M.message}` : M.message;
53467
53472
  headers: { Authorization: `Bearer ${M}` }
53468
53473
  });
53469
53474
  if (!B.ok) return;
53470
- const { token: F } = await B.json();
53471
- if (!F || I) return;
53475
+ const { token: W } = await B.json();
53476
+ if (!W || I) return;
53472
53477
  $ = new EventSource(
53473
- `${Z}${Qi}/subscribe?token=${encodeURIComponent(F)}`
53478
+ `${Z}${Qi}/subscribe?token=${encodeURIComponent(W)}`
53474
53479
  ), $.onmessage = (Q) => {
53475
53480
  try {
53476
53481
  const tt = JSON.parse(Q.data);
@@ -53567,9 +53572,9 @@ ${M.message}` : M.message;
53567
53572
  zs(qh);
53568
53573
  for (const M of eo) zs(M.components);
53569
53574
  const Gh = eo.filter((M) => Bs.has(M.id) ? !1 : M.sceneIds === "*" ? !0 : Array.isArray(M.sceneIds) ? M.sceneIds.includes("*") || M.sceneIds.includes(Ct) : !1), Nm = Er.map((M) => {
53570
- var Z, B, F;
53575
+ var Z, B, W;
53571
53576
  const $ = Ni[M.id], I = M.sourceSceneId ? (Z = $ == null ? void 0 : $.steps) == null ? void 0 : Z.find((Q) => Q.id === M.sourceSceneId) : (B = $ == null ? void 0 : $.steps) == null ? void 0 : B.find((Q) => Q.type === "render_scene");
53572
- return (F = I == null ? void 0 : I.config) != null && F.components ? { ...M, components: I.config.components } : null;
53577
+ return (W = I == null ? void 0 : I.config) != null && W.components ? { ...M, components: I.config.components } : null;
53573
53578
  }).filter(Boolean);
53574
53579
  mn = [...qh], (Bc = (jc = br.layout) == null ? void 0 : jc.header) != null && Bc.length ? mn.splice(0, 0, ...br.layout.header) : (Ir = (tf = he == null ? void 0 : he.layout) == null ? void 0 : tf.header) != null && Ir.length && mn.splice(0, 0, ...he.layout.header);
53575
53580
  for (const M of Gh || []) {
@@ -53578,17 +53583,17 @@ ${M.message}` : M.message;
53578
53583
  if (M.targetKey) {
53579
53584
  const Z = M.targetKey.split("-").filter(Boolean).map(Number);
53580
53585
  if (Z.length > 0) {
53581
- let B = mn, F = Z[0];
53586
+ let B = mn, W = Z[0];
53582
53587
  for (let tt = 0; tt < Z.length - 1; tt++) {
53583
53588
  const X = B[Z[tt]];
53584
53589
  if (!X || !Array.isArray(X.children)) break;
53585
- B = X.children, F = Z[tt + 1];
53590
+ B = X.children, W = Z[tt + 1];
53586
53591
  }
53587
53592
  const Q = M.targetPosition || "before";
53588
53593
  if (Q === "inside") {
53589
- const tt = B[F];
53594
+ const tt = B[W];
53590
53595
  tt && (Array.isArray(tt.children) || (tt.children = []), tt.children.unshift(...$));
53591
- } else Q === "after" ? B.splice(F + 1, 0, ...$) : B.splice(F, 0, ...$);
53596
+ } else Q === "after" ? B.splice(W + 1, 0, ...$) : B.splice(W, 0, ...$);
53592
53597
  continue;
53593
53598
  }
53594
53599
  }
@@ -53599,15 +53604,15 @@ ${M.message}` : M.message;
53599
53604
  if (M.targetKey) {
53600
53605
  const $ = M.targetKey.split("-").filter(Boolean).map(Number);
53601
53606
  let I = mn, Z = $[0];
53602
- for (let F = 0; F < $.length - 1; F++) {
53603
- const Q = I[$[F]];
53607
+ for (let W = 0; W < $.length - 1; W++) {
53608
+ const Q = I[$[W]];
53604
53609
  if (!Q || !Array.isArray(Q.children)) break;
53605
- I = Q.children, Z = $[F + 1];
53610
+ I = Q.children, Z = $[W + 1];
53606
53611
  }
53607
53612
  const B = M.targetPosition || "before";
53608
53613
  if (B === "inside") {
53609
- const F = I[Z];
53610
- F && (Array.isArray(F.children) || (F.children = []), F.children.unshift(...M.components));
53614
+ const W = I[Z];
53615
+ W && (Array.isArray(W.children) || (W.children = []), W.children.unshift(...M.components));
53611
53616
  } else B === "after" ? I.splice(Z + 1, 0, ...M.components) : I.splice(Z, 0, ...M.components);
53612
53617
  continue;
53613
53618
  }