@map-colonies/react-components 4.2.0 → 4.2.1

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.
@@ -2,7 +2,7 @@
2
2
  var tn = Object.defineProperty;
3
3
  var nn = (e, n, t) => n in e ? tn(e, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[n] = t;
4
4
  var Z = (e, n, t) => (nn(e, typeof n != "symbol" ? n + "" : n, t), t);
5
- import { jsx as l, jsxs as B, Fragment as oe } from "react/jsx-runtime";
5
+ import { jsx as l, jsxs as B, Fragment as ie } from "react/jsx-runtime";
6
6
  import * as Pt from "react";
7
7
  import fe, { useState as A, useEffect as O, useMemo as Fe, forwardRef as rn, createContext as Pe, useRef as Ee, useContext as De, useCallback as pe, useLayoutEffect as on } from "react";
8
8
  import { isValid as Ce, isBefore as sn, format as ct, endOfDay as an, isSameDay as dt } from "date-fns";
@@ -47,7 +47,7 @@ import Mi, { setCaretPosition as Pi } from "get-input-selection";
47
47
  import { ChonkyActions as G, FileHelper as Vt, setChonkyDefaults as Di, FullFileBrowser as Ii } from "chonky";
48
48
  import { ChonkyIconFA as Ai } from "chonky-icon-fontawesome";
49
49
  import ki from "filesize";
50
- var re = /* @__PURE__ */ ((e) => (e.BOX = "BOX", e.POLYGON = "POLYGON", e.UNKNOWN = "UNKNOWN", e))(re || {}), ce = /* @__PURE__ */ ((e) => (e.HE = "he", e.EN = "en", e.RU = "ru", e))(ce || {}), Qe = /* @__PURE__ */ ((e) => (e.TOP_RIGHT = "TOP_RIGHT", e.BOTTOM_LEFT = "BOTTOM_LEFT", e))(Qe || {});
50
+ var oe = /* @__PURE__ */ ((e) => (e.BOX = "BOX", e.POLYGON = "POLYGON", e.UNKNOWN = "UNKNOWN", e))(oe || {}), ce = /* @__PURE__ */ ((e) => (e.HE = "he", e.EN = "en", e.RU = "ru", e))(ce || {}), Qe = /* @__PURE__ */ ((e) => (e.TOP_RIGHT = "TOP_RIGHT", e.BOTTOM_LEFT = "BOTTOM_LEFT", e))(Qe || {});
51
51
  const J = {
52
52
  // eslint-disable-next-line @typescript-eslint/naming-convention
53
53
  DATE_PICKER: {
@@ -118,7 +118,7 @@ const Oi = 2, Ri = 0.5, Ni = Ie(
118
118
  })
119
119
  ), Bi = (e) => {
120
120
  var U, x, $, R;
121
- const n = Ni(), t = Ot(), i = zt(t), [o, r] = A(null), [d, u] = A(null), [m, E] = A(J.DATE_RANGE_PICKER.dateFormat), w = e.controlsLayout ?? J.DATE_RANGE_PICKER.controlsLayout, M = e.disableFuture ?? J.DATE_RANGE_PICKER.disableFuture, _ = ((U = e.local) == null ? void 0 : U.startPlaceHolderText) ?? J.DATE_RANGE_PICKER.local.startPlaceHolderText, k = ((x = e.local) == null ? void 0 : x.endPlaceHolderText) ?? J.DATE_RANGE_PICKER.local.endPlaceHolderText, H = (($ = e.local) == null ? void 0 : $.setText) ?? J.DATE_RANGE_PICKER.local.setText, K = (((R = e.local) == null ? void 0 : R.calendarLocale) ?? J.DATE_RANGE_PICKER.local.calendarLocale) === ce.HE ? Dt : It;
121
+ const n = Ni(), t = Ot(), i = zt(t), [o, r] = A(null), [d, u] = A(null), [m, E] = A(J.DATE_RANGE_PICKER.dateFormat), w = e.controlsLayout ?? J.DATE_RANGE_PICKER.controlsLayout, M = e.disableFuture ?? J.DATE_RANGE_PICKER.disableFuture, T = ((U = e.local) == null ? void 0 : U.startPlaceHolderText) ?? J.DATE_RANGE_PICKER.local.startPlaceHolderText, k = ((x = e.local) == null ? void 0 : x.endPlaceHolderText) ?? J.DATE_RANGE_PICKER.local.endPlaceHolderText, H = (($ = e.local) == null ? void 0 : $.setText) ?? J.DATE_RANGE_PICKER.local.setText, K = (((R = e.local) == null ? void 0 : R.calendarLocale) ?? J.DATE_RANGE_PICKER.local.calendarLocale) === ce.HE ? Dt : It;
122
122
  O(() => {
123
123
  r(e.from ?? null);
124
124
  }, [e.from]), O(() => {
@@ -146,7 +146,7 @@ const Oi = 2, Ri = 0.5, Ni = Ie(
146
146
  Ye,
147
147
  {
148
148
  variant: "inline",
149
- placeholder: _,
149
+ placeholder: T,
150
150
  onChange: (V) => r(V),
151
151
  value: o,
152
152
  disableFuture: M,
@@ -194,7 +194,7 @@ const Qo = (e) => {
194
194
  R.currentTarget.tagName === "I" ? m(R.currentTarget.previousElementSibling) : m(R.currentTarget);
195
195
  }, M = () => {
196
196
  m(null);
197
- }, _ = Boolean(u), k = e.controlsLayout ?? "column";
197
+ }, T = Boolean(u), k = e.controlsLayout ?? "column";
198
198
  O(() => {
199
199
  t(e.from ?? null);
200
200
  }, [e.from]), O(() => {
@@ -203,7 +203,7 @@ const Qo = (e) => {
203
203
  d(e.dateFormat ?? J.DATE_RANGE_PICKER.dateFormat);
204
204
  }, [e.dateFormat]);
205
205
  const H = ((x = e.local) == null ? void 0 : x.startPlaceHolderText) ?? J.DATE_RANGE_PICKER.local.startPlaceHolderText, j = (($ = e.local) == null ? void 0 : $.endPlaceHolderText) ?? J.DATE_RANGE_PICKER.local.endPlaceHolderText, K = e.renderAsButton === void 0 ? J.DATE_RANGE_PICKER.renderAsButton : e.renderAsButton, F = e.offset === void 0 ? J.DATE_RANGE_PICKER.offset : e.offset, Y = e.disableFuture === void 0 ? J.DATE_RANGE_PICKER.disableFuture : e.disableFuture, U = Fe(() => `${n ? ct(n, r) : H} - ${i ? ct(i, r) : j}`, [n, i, r, H, j]);
206
- return /* @__PURE__ */ B(oe, { children: [
206
+ return /* @__PURE__ */ B(ie, { children: [
207
207
  K ? /* @__PURE__ */ l(Me, { style: { width: e.width }, raised: !0, onClick: E, className: "drpOpener", children: U }) : /* @__PURE__ */ l(
208
208
  Re,
209
209
  {
@@ -219,7 +219,7 @@ const Qo = (e) => {
219
219
  }
220
220
  }
221
221
  ),
222
- /* @__PURE__ */ l(Fi, { open: _, anchorEl: u, onClose: M, anchorOrigin: { vertical: "bottom", horizontal: "left" }, keepMounted: !0, children: /* @__PURE__ */ l(
222
+ /* @__PURE__ */ l(Fi, { open: T, anchorEl: u, onClose: M, anchorOrigin: { vertical: "bottom", horizontal: "left" }, keepMounted: !0, children: /* @__PURE__ */ l(
223
223
  Bi,
224
224
  {
225
225
  controlsLayout: k,
@@ -262,7 +262,7 @@ const Qo = (e) => {
262
262
  type: "time",
263
263
  value: we(n).format("HH:mm"),
264
264
  onChange: (M) => {
265
- const _ = we(n), k = we(M.currentTarget.value, "HH:mm"), H = _.set({
265
+ const T = we(n), k = we(M.currentTarget.value, "HH:mm"), H = T.set({
266
266
  hours: k.get("hours"),
267
267
  minutes: k.get("minutes")
268
268
  });
@@ -280,7 +280,7 @@ const Qo = (e) => {
280
280
  type: "time",
281
281
  value: we(e).format("HH:mm"),
282
282
  onChange: (M) => {
283
- const _ = we(e), k = we(M.currentTarget.value, "HH:mm"), H = _.set({
283
+ const T = we(e), k = we(M.currentTarget.value, "HH:mm"), H = T.set({
284
284
  hours: k.get("hours"),
285
285
  minutes: k.get("minutes")
286
286
  });
@@ -353,12 +353,12 @@ const Qo = (e) => {
353
353
  // withTimeRange,
354
354
  withShortcuts: E,
355
355
  locale: w = "en"
356
- } = e, [M, _] = A(null), [k, H] = A(null), [j, K] = A(!1), F = r ? { startDate: M, endDate: k } : M;
356
+ } = e, [M, T] = A(null), [k, H] = A(null), [j, K] = A(!1), F = r ? { startDate: M, endDate: k } : M;
357
357
  O(() => {
358
358
  w === "he" && In("he", An);
359
359
  }, [w]), O(() => {
360
360
  var x, $;
361
- ((x = e.startDate) == null ? void 0 : x.toString()) !== (M == null ? void 0 : M.toString()) && _(e.startDate), (($ = e.endDate) == null ? void 0 : $.toString()) !== (k == null ? void 0 : k.toString()) && H(e.endDate);
361
+ ((x = e.startDate) == null ? void 0 : x.toString()) !== (M == null ? void 0 : M.toString()) && T(e.startDate), (($ = e.endDate) == null ? void 0 : $.toString()) !== (k == null ? void 0 : k.toString()) && H(e.endDate);
362
362
  }, [e.startDate, e.endDate, M, k]);
363
363
  const Y = Fe(() => {
364
364
  let x = "pickerContainer" + (w === "he" ? " pickerContainer-rtl" : "");
@@ -386,9 +386,9 @@ const Qo = (e) => {
386
386
  onChange: (x, $) => {
387
387
  if (Array.isArray(x)) {
388
388
  const [R, V] = x;
389
- _(R), H(V), d == null || d({ startDate: R, endDate: V && an(V) }, $);
389
+ T(R), H(V), d == null || d({ startDate: R, endDate: V && an(V) }, $);
390
390
  } else
391
- _(x), d == null || d(x, $);
391
+ T(x), d == null || d(x, $);
392
392
  },
393
393
  customInput: /* @__PURE__ */ l(Hi, { name: u, onInputClick: () => {
394
394
  K(!0);
@@ -397,7 +397,7 @@ const Qo = (e) => {
397
397
  timeInputLabel: "",
398
398
  customTimeInput: E && Ue(F) && /* @__PURE__ */ l(Gi, { onShortcut: (x) => {
399
399
  d == null || d(x), K(!1);
400
- }, shortcuts: E, setEndDate: H, setStartDate: _, dateRange: F }),
400
+ }, shortcuts: E, setEndDate: H, setStartDate: T, dateRange: F }),
401
401
  showMonthYearDropdown: void 0,
402
402
  ...U
403
403
  }
@@ -412,7 +412,7 @@ const ns = (e) => {
412
412
  onChange: E,
413
413
  showTime: w = J.DATE_PICKER.showTime,
414
414
  value: M,
415
- ..._
415
+ ...T
416
416
  } = e, { placeHolderText: k = J.DATE_PICKER.local.placeHolderText, calendarLocale: H } = m ?? {
417
417
  placeHolderText: J.DATE_PICKER.local.placeHolderText,
418
418
  calendarLocale: ce.EN
@@ -429,7 +429,7 @@ const ns = (e) => {
429
429
  value: i,
430
430
  disableFuture: u,
431
431
  format: r,
432
- ..._
432
+ ...T
433
433
  }
434
434
  ),
435
435
  !w && /* @__PURE__ */ l(
@@ -441,7 +441,7 @@ const ns = (e) => {
441
441
  value: i,
442
442
  disableFuture: u,
443
443
  format: r,
444
- ..._
444
+ ...T
445
445
  }
446
446
  )
447
447
  ] }) });
@@ -474,7 +474,7 @@ const ns = (e) => {
474
474
  $e,
475
475
  {
476
476
  onClick: () => {
477
- d(re.POLYGON), E();
477
+ d(oe.POLYGON), E();
478
478
  },
479
479
  children: "Polygon"
480
480
  }
@@ -483,7 +483,7 @@ const ns = (e) => {
483
483
  $e,
484
484
  {
485
485
  onClick: () => {
486
- d(re.BOX), E();
486
+ d(oe.BOX), E();
487
487
  },
488
488
  children: "Box"
489
489
  }
@@ -601,10 +601,10 @@ const et = 5, tt = 2, $t = Pe(null), Wi = $t.Provider, pt = 35, gt = 32, Ui = 10
601
601
  /* CIRCLE */
602
602
  };
603
603
  switch (e) {
604
- case re.BOX:
604
+ case oe.BOX:
605
605
  i.geometryFunction = zn();
606
606
  break;
607
- case re.POLYGON:
607
+ case oe.POLYGON:
608
608
  i.type = "Polygon";
609
609
  break;
610
610
  default:
@@ -722,7 +722,7 @@ const ur = Nt(
722
722
  );
723
723
  function mr(e) {
724
724
  const { cellsMetadata: n, isRowSelected: t, item: i, onRowSelected: o, rowIndex: r, isCollapseable: d, collapsedElement: u } = e, [m, E] = A(!1), w = n.length;
725
- return /* @__PURE__ */ B(oe, { children: [
725
+ return /* @__PURE__ */ B(ie, { children: [
726
726
  /* @__PURE__ */ B(Oe, { hover: !0, selected: t, onClick: () => {
727
727
  o == null || o(r);
728
728
  }, children: [
@@ -731,20 +731,20 @@ function mr(e) {
731
731
  {
732
732
  "aria-label": "expand row",
733
733
  size: "small",
734
- onClick: (_) => {
735
- _.stopPropagation(), E(!m);
734
+ onClick: (T) => {
735
+ T.stopPropagation(), E(!m);
736
736
  },
737
737
  children: m ? /* @__PURE__ */ l(hr, {}) : /* @__PURE__ */ l(ur, {})
738
738
  }
739
739
  ) }),
740
- n.map((_) => /* @__PURE__ */ l(
740
+ n.map((T) => /* @__PURE__ */ l(
741
741
  Te,
742
742
  {
743
- align: _.numeric ? "right" : "left",
744
- padding: _.disablePadding ? "none" : "default",
745
- children: _.transform ? _.transform(i[_.id]) : i[_.id]
743
+ align: T.numeric ? "right" : "left",
744
+ padding: T.disablePadding ? "none" : "default",
745
+ children: T.transform ? T.transform(i[T.id]) : i[T.id]
746
746
  },
747
- _.id + r.toString()
747
+ T.id + r.toString()
748
748
  ))
749
749
  ] }),
750
750
  d && /* @__PURE__ */ l(Oe, { children: /* @__PURE__ */ l(Te, { style: { paddingBottom: 0, paddingTop: 0 }, colSpan: w + 1, children: /* @__PURE__ */ l(pn, { in: m, unmountOnExit: !0, timeout: "auto", children: u == null ? void 0 : u(i) }) }) })
@@ -759,7 +759,7 @@ function rs(e) {
759
759
  isCollapseable: E,
760
760
  collapsedElement: w,
761
761
  isDense: M,
762
- page: _,
762
+ page: T,
763
763
  rowsPerPage: k,
764
764
  count: H,
765
765
  handleChangePage: j,
@@ -812,7 +812,7 @@ function rs(e) {
812
812
  rowsPerPageOptions: [5, 10],
813
813
  component: "div",
814
814
  count: H,
815
- page: _,
815
+ page: T,
816
816
  onPageChange: j,
817
817
  onRowsPerPageChange: K
818
818
  }
@@ -899,7 +899,7 @@ const Ke = [
899
899
  if (m < d.lastLegendUpdate + 250)
900
900
  return;
901
901
  d.lastLegendUpdate = m;
902
- const E = e.scene.canvas.clientWidth, w = e.scene.canvas.clientHeight, M = e.scene.camera.getPickRay(new Se(E / 2 | 0, w - 1)), _ = e.scene.camera.getPickRay(new Se(1 + E / 2 | 0, w - 1)), k = e.scene.globe, H = k.pick(M, e.scene), j = k.pick(_, e.scene);
902
+ const E = e.scene.canvas.clientWidth, w = e.scene.canvas.clientHeight, M = e.scene.camera.getPickRay(new Se(E / 2 | 0, w - 1)), T = e.scene.camera.getPickRay(new Se(1 + E / 2 | 0, w - 1)), k = e.scene.globe, H = k.pick(M, e.scene), j = k.pick(T, e.scene);
903
903
  if (!H || !j)
904
904
  return;
905
905
  const K = k.ellipsoid.cartesianToCartographic(H), F = k.ellipsoid.cartesianToCartographic(j);
@@ -934,7 +934,7 @@ const Ke = [
934
934
  };
935
935
  }, [n, e.locale, t]);
936
936
  const o = (r) => 5 + (125 - r) / 2;
937
- return /* @__PURE__ */ l("div", { className: "scalePosition", children: Ne(t.barWidth) && /* @__PURE__ */ B(oe, { children: [
937
+ return /* @__PURE__ */ l("div", { className: "scalePosition", children: Ne(t.barWidth) && /* @__PURE__ */ B(ie, { children: [
938
938
  /* @__PURE__ */ l("div", { className: "distance-legend-label", children: t.distanceLabel }),
939
939
  /* @__PURE__ */ l(
940
940
  "div",
@@ -1020,7 +1020,7 @@ const Cr = -1, wr = (e) => {
1020
1020
  const n = me(), [t, i] = A(), { sceneModes: o } = e, r = (d) => o.findIndex((u) => u === d) > Cr;
1021
1021
  return O(() => {
1022
1022
  i(n.scene.mode);
1023
- }, []), /* @__PURE__ */ B(oe, { children: [
1023
+ }, []), /* @__PURE__ */ B(ie, { children: [
1024
1024
  r(ne.SCENE3D) && /* @__PURE__ */ l(
1025
1025
  _e,
1026
1026
  {
@@ -1068,13 +1068,13 @@ const br = Ie(
1068
1068
  var w, M;
1069
1069
  if (t) {
1070
1070
  (w = n.layersManager) == null || w.removeBaseMapLayers();
1071
- const _ = t.maps.find((k) => k.id === E);
1072
- _ && ((M = n.layersManager) == null || M.setBaseMapLayers(_), d(_), t.maps.forEach((k) => {
1073
- k.isCurrent = _ === k;
1071
+ const T = t.maps.find((k) => k.id === E);
1072
+ T && ((M = n.layersManager) == null || M.setBaseMapLayers(T), d(T), t.maps.forEach((k) => {
1073
+ k.isCurrent = T === k;
1074
1074
  }));
1075
1075
  }
1076
1076
  };
1077
- return /* @__PURE__ */ B(oe, { children: [
1077
+ return /* @__PURE__ */ B(ie, { children: [
1078
1078
  /* @__PURE__ */ l("label", { className: "mapLabel", children: i }),
1079
1079
  /* @__PURE__ */ l("ul", { className: "mapSelector", children: t == null ? void 0 : t.maps.map((E) => /* @__PURE__ */ l("li", { className: `mapContainer ${u.mapContainer} ${E === r ? "mapContainerSelected" : ""}`, children: /* @__PURE__ */ l(
1080
1080
  "img",
@@ -1100,13 +1100,13 @@ const qe = "ic_settings_24px", _r = (e) => {
1100
1100
  return O(() => {
1101
1101
  const w = (M) => {
1102
1102
  var H;
1103
- const _ = M.target, k = Q(d, "current");
1104
- k && !k.contains(_) && _.id !== qe && ((H = _.parentElement) == null ? void 0 : H.id) !== qe && (document.removeEventListener("click", w, !1), t(!1));
1103
+ const T = M.target, k = Q(d, "current");
1104
+ k && !k.contains(T) && T.id !== qe && ((H = T.parentElement) == null ? void 0 : H.id) !== qe && (document.removeEventListener("click", w, !1), t(!1));
1105
1105
  };
1106
1106
  return document.addEventListener("click", w, !1), () => {
1107
1107
  document.removeEventListener("click", w, !1);
1108
1108
  };
1109
- }), /* @__PURE__ */ B(oe, { children: [
1109
+ }), /* @__PURE__ */ B(ie, { children: [
1110
1110
  /* @__PURE__ */ l(
1111
1111
  _e,
1112
1112
  {
@@ -1128,7 +1128,7 @@ const qe = "ic_settings_24px", _r = (e) => {
1128
1128
  /* @__PURE__ */ B(_n, { children: [
1129
1129
  /* @__PURE__ */ l("h4", { className: "sectionLabel", children: m }),
1130
1130
  /* @__PURE__ */ l(ae, { className: "mapScenesContainer", children: /* @__PURE__ */ l(wr, { sceneModes: i }) }),
1131
- /* @__PURE__ */ l(ae, { className: "baseMapsContainer", children: o && /* @__PURE__ */ B(oe, { children: [
1131
+ /* @__PURE__ */ l(ae, { className: "baseMapsContainer", children: o && /* @__PURE__ */ B(ie, { children: [
1132
1132
  /* @__PURE__ */ l("h4", { className: "sectionLabel", children: E }),
1133
1133
  /* @__PURE__ */ l(Tr, { baseMaps: o })
1134
1134
  ] }) })
@@ -1550,8 +1550,8 @@ const Zt = Pe(null), Br = Zt.Provider, me = () => {
1550
1550
  throw new Error("map context is null, please check the provider");
1551
1551
  return e;
1552
1552
  }, ls = (e) => {
1553
- var S, T, b, L, P, W, q, N;
1554
- const n = Ee(null), [t, i] = A(), [o, r] = A(), [d, u] = A(), [m, E] = A(), [w, M] = A(), [_, k] = A(), H = Ee(), [j, K] = A(), [F, Y] = A([]), [U, x] = A(), [$, R] = A(!1), V = Ee(), [X, s] = A(void 0), [a, y] = A(!1), [c, f] = A(), h = {
1553
+ var S, _, b, L, P, W, q, N;
1554
+ const n = Ee(null), [t, i] = A(), [o, r] = A(), [d, u] = A(), [m, E] = A(), [w, M] = A(), [T, k] = A(), H = Ee(), [j, K] = A(), [F, Y] = A([]), [U, x] = A(), [$, R] = A(!1), V = Ee(), [X, s] = A(void 0), [a, y] = A(!1), [c, f] = A(), h = {
1555
1555
  fullscreenButton: !0,
1556
1556
  timeline: !1,
1557
1557
  animation: !1,
@@ -1561,8 +1561,8 @@ const Zt = Pe(null), Br = Zt.Provider, me = () => {
1561
1561
  homeButton: !1,
1562
1562
  sceneModePicker: !1,
1563
1563
  ...e
1564
- }, v = (D, I, z, de, ie) => {
1565
- const ee = t.container, se = ee.clientWidth, Le = ee.clientHeight, Ae = de + ie;
1564
+ }, v = (D, I, z, de, re) => {
1565
+ const ee = t.container, se = ee.clientWidth, Le = ee.clientHeight, Ae = de + re;
1566
1566
  return {
1567
1567
  left: `${se - D < z ? D - (z - (se - D)) : D}px`,
1568
1568
  top: `${Le - I < Ae ? I - (Ae - (Le - I)) : I}px`
@@ -1632,14 +1632,14 @@ const Zt = Pe(null), Br = Zt.Provider, me = () => {
1632
1632
  t.container.clientWidth / 2,
1633
1633
  // eslint-disable-next-line @typescript-eslint/no-magic-numbers
1634
1634
  t.container.clientHeight / 2
1635
- ), de = t.scene.camera.getPickRay(z), ie = t.scene.globe.pick(de, t.scene);
1636
- if (!ie)
1635
+ ), de = t.scene.camera.getPickRay(z), re = t.scene.globe.pick(de, t.scene);
1636
+ if (!re)
1637
1637
  return {
1638
1638
  longitude: 0,
1639
1639
  latitude: 0,
1640
1640
  height: 0
1641
1641
  };
1642
- const ee = t.scene.globe.ellipsoid.cartesianToCartographic(ie);
1642
+ const ee = t.scene.globe.ellipsoid.cartesianToCartographic(re);
1643
1643
  return ee !== void 0 ? {
1644
1644
  longitude: ke(ee.longitude),
1645
1645
  latitude: ke(ee.latitude),
@@ -1687,19 +1687,19 @@ const Zt = Pe(null), Br = Zt.Provider, me = () => {
1687
1687
  });
1688
1688
  }, [e.zoom, e.center, t]);
1689
1689
  const C = pe(() => t && jn(
1690
- /* @__PURE__ */ B(oe, { children: [
1690
+ /* @__PURE__ */ B(ie, { children: [
1691
1691
  /* @__PURE__ */ B(ae, { className: "sideToolsContainer", children: [
1692
- /* @__PURE__ */ l(_r, { sceneModes: j, baseMaps: U, locale: _ }),
1692
+ /* @__PURE__ */ l(_r, { sceneModes: j, baseMaps: U, locale: T }),
1693
1693
  /* @__PURE__ */ l(Lr, { onClick: () => y(!a) })
1694
1694
  ] }),
1695
1695
  /* @__PURE__ */ B(ae, { className: "toolsContainer", children: [
1696
- d === !0 ? /* @__PURE__ */ l(gr, { projection: o }) : /* @__PURE__ */ l(oe, {}),
1697
- m === !0 ? /* @__PURE__ */ l(Er, { locale: _ }) : /* @__PURE__ */ l(oe, {}),
1698
- w === !0 ? /* @__PURE__ */ l(yr, { locale: _ }) : /* @__PURE__ */ l(oe, {})
1696
+ d === !0 ? /* @__PURE__ */ l(gr, { projection: o }) : /* @__PURE__ */ l(ie, {}),
1697
+ m === !0 ? /* @__PURE__ */ l(Er, { locale: T }) : /* @__PURE__ */ l(ie, {}),
1698
+ w === !0 ? /* @__PURE__ */ l(yr, { locale: T }) : /* @__PURE__ */ l(ie, {})
1699
1699
  ] })
1700
1700
  ] }),
1701
1701
  document.querySelector(".cesium-viewer")
1702
- ), [U, _, t, o, j, d, w, a]);
1702
+ ), [U, T, t, o, j, d, w, a]);
1703
1703
  return /* @__PURE__ */ l(Kn, { className: "viewer", full: !0, ref: n, ...h, children: /* @__PURE__ */ B(Br, { value: t, children: [
1704
1704
  /* @__PURE__ */ l(
1705
1705
  Dr,
@@ -1707,7 +1707,7 @@ const Zt = Pe(null), Br = Zt.Provider, me = () => {
1707
1707
  title: (S = e.legends) == null ? void 0 : S.title,
1708
1708
  isOpen: a,
1709
1709
  toggleSidebar: () => y(!a),
1710
- noLegendsText: (T = e.legends) == null ? void 0 : T.emptyText,
1710
+ noLegendsText: (_ = e.legends) == null ? void 0 : _.emptyText,
1711
1711
  legends: ((b = e.legends) == null ? void 0 : b.legendsList) ?? F,
1712
1712
  actionsTexts: (L = e.legends) == null ? void 0 : L.actionsTexts
1713
1713
  }
@@ -2089,7 +2089,7 @@ var ye = function() {
2089
2089
  });
2090
2090
  }, s;
2091
2091
  }();
2092
- var _ = {
2092
+ var T = {
2093
2093
  iconUrl: "./assets/img/dragIcon.png",
2094
2094
  shiftX: 0,
2095
2095
  shiftY: 0
@@ -2106,7 +2106,7 @@ var ye = function() {
2106
2106
  var c = new i.BillboardGroup(this, a);
2107
2107
  return c.addBillboards(s, y), c;
2108
2108
  }, i.BillboardGroup = function(s, a) {
2109
- this._drawHelper = s, this._scene = s._scene, this._options = R(a, _);
2109
+ this._drawHelper = s, this._scene = s._scene, this._options = R(a, T);
2110
2110
  var y = new p.BillboardCollection();
2111
2111
  this._scene.primitives.add(y), this._billboards = y, this._orderedBillboards = [];
2112
2112
  }, i.BillboardGroup.prototype.createBillboard = function(s, a) {
@@ -2139,15 +2139,15 @@ var ye = function() {
2139
2139
  ;
2140
2140
  a.dragHandlers.onDrag && a.dragHandlers.onDrag(v(), L);
2141
2141
  }
2142
- function T(L) {
2142
+ function _(L) {
2143
2143
  b.destroy(), h(!0), a.dragHandlers.onDragEnd && a.dragHandlers.onDragEnd(v(), L);
2144
2144
  }
2145
2145
  var b = new p.ScreenSpaceEventHandler(c._scene.canvas);
2146
2146
  b.setInputAction(function(L) {
2147
2147
  var P = c._scene.camera.pickEllipsoid(L.endPosition, e);
2148
- P ? S(P) : T(P);
2148
+ P ? S(P) : _(P);
2149
2149
  }, p.ScreenSpaceEventType.MOUSE_MOVE), b.setInputAction(function(L) {
2150
- T(c._scene.camera.pickEllipsoid(L.position, e));
2150
+ _(c._scene.camera.pickEllipsoid(L.position, e));
2151
2151
  }, p.ScreenSpaceEventType.LEFT_UP), h(!1), a.dragHandlers.onDragStart && a.dragHandlers.onDragStart(v(), c._scene.camera.pickEllipsoid(C, e));
2152
2152
  });
2153
2153
  }
@@ -2183,7 +2183,7 @@ var ye = function() {
2183
2183
  }, i.BillboardGroup.prototype.setOnTop = function() {
2184
2184
  this._scene.primitives.raiseToTop(this._billboards);
2185
2185
  }, i.prototype.startDrawingMarker = function(a) {
2186
- var a = R(a, _);
2186
+ var a = R(a, T);
2187
2187
  this.startDrawing(function() {
2188
2188
  h.remove(), v.destroy(), f.setVisible(!1);
2189
2189
  });
@@ -2213,17 +2213,17 @@ var ye = function() {
2213
2213
  this.startDrawingPolyshape(!1, a);
2214
2214
  }, i.prototype.startDrawingPolyshape = function(s, a) {
2215
2215
  this.startDrawing(function() {
2216
- f.remove(g), S.remove(), T.destroy(), h.setVisible(!1), F(c);
2216
+ f.remove(g), S.remove(), _.destroy(), h.setVisible(!1), F(c);
2217
2217
  });
2218
2218
  var y = this, c = this._scene, f = c.primitives, h = this._tooltip, v = s ? 3 : 2, g;
2219
2219
  s ? g = new ye.PolygonPrimitive(a) : g = new ye.PolylinePrimitive(a), g.asynchronous = !1, f.add(g);
2220
- var C = [], S = new i.BillboardGroup(this, _), T = new p.ScreenSpaceEventHandler(c.canvas);
2221
- K(c), T.setInputAction(function(b) {
2220
+ var C = [], S = new i.BillboardGroup(this, T), _ = new p.ScreenSpaceEventHandler(c.canvas);
2221
+ K(c), _.setInputAction(function(b) {
2222
2222
  if (b.position != null) {
2223
2223
  var L = c.camera.pickEllipsoid(b.position, e);
2224
2224
  L && (C.length == 0 && (C.push(L.clone()), S.addBillboard(C[0])), C.length >= v && (g.positions = C, g._createPrimitive = !0), C.push(L), S.addBillboard(L));
2225
2225
  }
2226
- }, p.ScreenSpaceEventType.LEFT_CLICK), T.setInputAction(function(b) {
2226
+ }, p.ScreenSpaceEventType.LEFT_CLICK), _.setInputAction(function(b) {
2227
2227
  var L = b.endPosition;
2228
2228
  if (L != null)
2229
2229
  if (C.length == 0)
@@ -2235,7 +2235,7 @@ var ye = function() {
2235
2235
  "<p>Click to add new point (" + C.length + ")</p>" + (C.length > v ? "<p>Double click to finish drawing</p>" : "")
2236
2236
  ));
2237
2237
  }
2238
- }, p.ScreenSpaceEventType.MOUSE_MOVE), T.setInputAction(function(b) {
2238
+ }, p.ScreenSpaceEventType.MOUSE_MOVE), _.setInputAction(function(b) {
2239
2239
  var L = b.position;
2240
2240
  if (L != null) {
2241
2241
  if (C.length < v + 2)
@@ -2266,13 +2266,13 @@ var ye = function() {
2266
2266
  });
2267
2267
  var y = this, c = this._scene, f = this._scene.primitives, h = this._tooltip, v = null, g = null, C = null, S = new p.ScreenSpaceEventHandler(c.canvas);
2268
2268
  K(c);
2269
- function T(b) {
2269
+ function _(b) {
2270
2270
  g == null && (g = new ye.ExtentPrimitive({
2271
2271
  extent: b,
2272
2272
  material: a.material
2273
2273
  }), g.asynchronous = !1, f.add(g)), g.setExtent(b);
2274
2274
  var L = j(b);
2275
- C == null ? (C = new i.BillboardGroup(y, _), C.addBillboards(L)) : C.updateBillboardsPositions(L);
2275
+ C == null ? (C = new i.BillboardGroup(y, T), C.addBillboards(L)) : C.updateBillboardsPositions(L);
2276
2276
  }
2277
2277
  S.setInputAction(function(b) {
2278
2278
  if (b.position != null) {
@@ -2281,7 +2281,7 @@ var ye = function() {
2281
2281
  if (g == null) {
2282
2282
  v = e.cartesianToCartographic(L);
2283
2283
  var P = Y(v, v);
2284
- T(P);
2284
+ _(P);
2285
2285
  } else
2286
2286
  y.stopDrawing(), typeof a.callback == "function" && a.callback(Y(v, e.cartesianToCartographic(L)));
2287
2287
  }
@@ -2294,7 +2294,7 @@ var ye = function() {
2294
2294
  var P = c.camera.pickEllipsoid(L, e);
2295
2295
  if (P) {
2296
2296
  var W = Y(v, e.cartesianToCartographic(P));
2297
- T(W), h.showAt(L, "<p>Drag to change rectangle extent</p><p>Click again to finish drawing</p>");
2297
+ _(W), h.showAt(L, "<p>Drag to change rectangle extent</p><p>Click again to finish drawing</p>");
2298
2298
  }
2299
2299
  }
2300
2300
  }, p.ScreenSpaceEventType.MOUSE_MOVE);
@@ -2306,22 +2306,22 @@ var ye = function() {
2306
2306
  var y = this, c = this._scene, f = this._scene.primitives, h = this._tooltip, v = null, g = null, C = new p.ScreenSpaceEventHandler(c.canvas);
2307
2307
  C.setInputAction(function(S) {
2308
2308
  if (S.position != null) {
2309
- var T = c.camera.pickEllipsoid(S.position, e);
2310
- T && (v == null ? (v = new i.CirclePrimitive({
2311
- center: T,
2309
+ var _ = c.camera.pickEllipsoid(S.position, e);
2310
+ _ && (v == null ? (v = new i.CirclePrimitive({
2311
+ center: _,
2312
2312
  radius: 0,
2313
2313
  asynchronous: !1,
2314
2314
  material: a.material
2315
- }), f.add(v), g = new i.BillboardGroup(y, _), g.addBillboards([T])) : (typeof a.callback == "function" && a.callback(v.getCenter(), v.getRadius()), y.stopDrawing()));
2315
+ }), f.add(v), g = new i.BillboardGroup(y, T), g.addBillboards([_])) : (typeof a.callback == "function" && a.callback(v.getCenter(), v.getRadius()), y.stopDrawing()));
2316
2316
  }
2317
2317
  }, p.ScreenSpaceEventType.LEFT_DOWN), C.setInputAction(function(S) {
2318
- var T = S.endPosition;
2319
- if (T != null)
2318
+ var _ = S.endPosition;
2319
+ if (_ != null)
2320
2320
  if (v == null)
2321
- h.showAt(T, "<p>Click to start drawing the circle</p>");
2321
+ h.showAt(_, "<p>Click to start drawing the circle</p>");
2322
2322
  else {
2323
- var b = c.camera.pickEllipsoid(T, e);
2324
- b && (v.setRadius(p.Cartesian3.distance(v.getCenter(), b)), g.updateBillboardsPositions(b), h.showAt(T, "<p>Move mouse to change circle radius</p><p>Click again to finish drawing</p>"));
2323
+ var b = c.camera.pickEllipsoid(_, e);
2324
+ b && (v.setRadius(p.Cartesian3.distance(v.getCenter(), b)), g.updateBillboardsPositions(b), h.showAt(_, "<p>Move mouse to change circle radius</p><p>Click again to finish drawing</p>"));
2325
2325
  }
2326
2326
  }, p.ScreenSpaceEventType.MOUSE_MOVE);
2327
2327
  }, i.prototype.enhancePrimitives = function() {
@@ -2335,18 +2335,18 @@ var ye = function() {
2335
2335
  s._scene.screenSpaceCameraController.enableRotate = v;
2336
2336
  }
2337
2337
  V(c, "leftDown", function(v) {
2338
- function g(T) {
2339
- c.position = T, f.executeListeners({ name: "drag", positions: T });
2338
+ function g(_) {
2339
+ c.position = _, f.executeListeners({ name: "drag", positions: _ });
2340
2340
  }
2341
- function C(T) {
2342
- S.destroy(), h(!0), f.executeListeners({ name: "dragEnd", positions: T });
2341
+ function C(_) {
2342
+ S.destroy(), h(!0), f.executeListeners({ name: "dragEnd", positions: _ });
2343
2343
  }
2344
2344
  var S = new p.ScreenSpaceEventHandler(s._scene.canvas);
2345
- S.setInputAction(function(T) {
2346
- var b = s._scene.camera.pickEllipsoid(T.endPosition, e);
2345
+ S.setInputAction(function(_) {
2346
+ var b = s._scene.camera.pickEllipsoid(_.endPosition, e);
2347
2347
  b ? g(b) : C(b);
2348
- }, p.ScreenSpaceEventType.MOUSE_MOVE), S.setInputAction(function(T) {
2349
- C(s._scene.camera.pickEllipsoid(T.position, e));
2348
+ }, p.ScreenSpaceEventType.MOUSE_MOVE), S.setInputAction(function(_) {
2349
+ C(s._scene.camera.pickEllipsoid(_.position, e));
2350
2350
  }, p.ScreenSpaceEventType.LEFT_UP), h(!1);
2351
2351
  }), X(c);
2352
2352
  };
@@ -2394,8 +2394,8 @@ var ye = function() {
2394
2394
  }
2395
2395
  };
2396
2396
  v.addBillboards(h.positions, C), this._markers = v;
2397
- for (var S = [], T = 0, b = h.positions.length + (this.isPolygon ? 0 : -1); T < b; T++)
2398
- S.push(q(T));
2397
+ for (var S = [], _ = 0, b = h.positions.length + (this.isPolygon ? 0 : -1); _ < b; _++)
2398
+ S.push(q(_));
2399
2399
  var L = {
2400
2400
  dragHandlers: {
2401
2401
  onDragStart: function(N, D) {
@@ -2450,11 +2450,11 @@ var ye = function() {
2450
2450
  };
2451
2451
  var v = new i.BillboardGroup(s, k), g = {
2452
2452
  dragHandlers: {
2453
- onDrag: function(S, T) {
2453
+ onDrag: function(S, _) {
2454
2454
  var b = v.getBillboard((S + 2) % 4).position;
2455
- c.setExtent(Y(e.cartesianToCartographic(b), e.cartesianToCartographic(T))), v.updateBillboardsPositions(j(c.extent));
2455
+ c.setExtent(Y(e.cartesianToCartographic(b), e.cartesianToCartographic(_))), v.updateBillboardsPositions(j(c.extent));
2456
2456
  },
2457
- onDragEnd: function(S, T) {
2457
+ onDragEnd: function(S, _) {
2458
2458
  C();
2459
2459
  }
2460
2460
  },
@@ -2463,8 +2463,8 @@ var ye = function() {
2463
2463
  }
2464
2464
  };
2465
2465
  v.addBillboards(j(c.extent), g), this._markers = v, this._globeClickhandler = new p.ScreenSpaceEventHandler(f.canvas), this._globeClickhandler.setInputAction(function(S) {
2466
- var T = f.pick(S.position);
2467
- T && !T.isDestroyed() && T.primitive || c.setEditMode(!1);
2466
+ var _ = f.pick(S.position);
2467
+ _ && !_.isDestroyed() && _.primitive || c.setEditMode(!1);
2468
2468
  }, p.ScreenSpaceEventType.LEFT_CLICK), v.setOnTop();
2469
2469
  }
2470
2470
  this._editMode = !0;
@@ -2490,7 +2490,7 @@ var ye = function() {
2490
2490
  c.getRotation() + Math.PI / 2,
2491
2491
  Math.PI / 2
2492
2492
  ).splice(0, 4);
2493
- }, T = function() {
2493
+ }, _ = function() {
2494
2494
  c.executeListeners({
2495
2495
  name: "onEdited",
2496
2496
  center: c.getCenter(),
@@ -2506,7 +2506,7 @@ var ye = function() {
2506
2506
  b % 2 == 0 ? c.setSemiMajorAxis(P) : c.setSemiMinorAxis(P), g.updateBillboardsPositions(S());
2507
2507
  },
2508
2508
  onDragEnd: function(b, L) {
2509
- T();
2509
+ _();
2510
2510
  }
2511
2511
  },
2512
2512
  tooltip: function() {
@@ -2545,7 +2545,7 @@ var ye = function() {
2545
2545
  if (this._markers == null) {
2546
2546
  let S = function() {
2547
2547
  return v.getCircleCartesianCoordinates(p.Math.PI_OVER_TWO);
2548
- }, T = function() {
2548
+ }, _ = function() {
2549
2549
  c.executeListeners({
2550
2550
  name: "onEdited",
2551
2551
  center: c.getCenter(),
@@ -2558,7 +2558,7 @@ var ye = function() {
2558
2558
  c.setRadius(p.Cartesian3.distance(c.getCenter(), L)), g.updateBillboardsPositions(S());
2559
2559
  },
2560
2560
  onDragEnd: function(b, L) {
2561
- T();
2561
+ _();
2562
2562
  }
2563
2563
  },
2564
2564
  tooltip: function() {
@@ -2595,13 +2595,13 @@ var ye = function() {
2595
2595
  $(y, c);
2596
2596
  var f = this, h = document.createElement("DIV");
2597
2597
  h.className = "toolbar", y.container.appendChild(h);
2598
- function v(S, T, b, L) {
2598
+ function v(S, _, b, L) {
2599
2599
  var P = document.createElement("DIV");
2600
2600
  P.className = "button", P.title = b, h.appendChild(P), P.onclick = L;
2601
2601
  var W = document.createElement("SPAN");
2602
2602
  P.appendChild(W);
2603
2603
  var q = document.createElement("IMG");
2604
- return q.src = T, W.appendChild(q), P;
2604
+ return q.src = _, W.appendChild(q), P;
2605
2605
  }
2606
2606
  var g = a._scene;
2607
2607
  v("marker", y.markerIcon, "Click to start drawing a 2D marker", function() {
@@ -2639,11 +2639,11 @@ var ye = function() {
2639
2639
  });
2640
2640
  }), v("circle", y.circleIcon, "Click to start drawing a Circle", function() {
2641
2641
  a.startDrawingCircle({
2642
- callback: function(S, T) {
2642
+ callback: function(S, _) {
2643
2643
  f.executeListeners({
2644
2644
  name: "circleCreated",
2645
2645
  center: S,
2646
- radius: T
2646
+ radius: _
2647
2647
  });
2648
2648
  }
2649
2649
  });
@@ -2706,7 +2706,7 @@ var ye = function() {
2706
2706
  }();
2707
2707
  const Ur = 2, jr = (e, n) => {
2708
2708
  switch (e) {
2709
- case re.BOX: {
2709
+ case oe.BOX: {
2710
2710
  if (n.features.length !== Ur)
2711
2711
  throw new Error(`${e} must have 2 points`);
2712
2712
  const t = mt(n.features, (o) => {
@@ -2771,24 +2771,24 @@ const ys = (e) => {
2771
2771
  const M = m;
2772
2772
  if (n.drawing)
2773
2773
  switch (n.type) {
2774
- case re.POLYGON:
2774
+ case oe.POLYGON:
2775
2775
  u.scene.globe.depthTestAgainstTerrain = !1, M.startDrawingPolygon({
2776
- callback: (_) => {
2776
+ callback: (T) => {
2777
2777
  n.handler({
2778
- primitive: _,
2779
- type: re.POLYGON,
2780
- geojson: Kr(_)
2778
+ primitive: T,
2779
+ type: oe.POLYGON,
2780
+ geojson: Kr(T)
2781
2781
  });
2782
2782
  }
2783
2783
  });
2784
2784
  break;
2785
- case re.BOX:
2785
+ case oe.BOX:
2786
2786
  u.scene.globe.depthTestAgainstTerrain = !1, M.startDrawingExtent({
2787
- callback: (_) => {
2787
+ callback: (T) => {
2788
2788
  n.handler({
2789
- primitive: _,
2790
- type: re.BOX,
2791
- geojson: qr(_)
2789
+ primitive: T,
2790
+ type: oe.BOX,
2791
+ geojson: qr(T)
2792
2792
  });
2793
2793
  }
2794
2794
  });
@@ -2801,31 +2801,35 @@ const ys = (e) => {
2801
2801
  }
2802
2802
  }, [n, m]);
2803
2803
  const w = (M) => {
2804
- let _ = M.coordinates !== void 0 ? M.coordinates : jr(M.type, M.geojson);
2805
- if (r !== !0)
2806
- switch (M.type) {
2807
- case re.BOX:
2808
- return /* @__PURE__ */ l(zr, { coordinates: _, material: o ?? t });
2809
- case re.POLYGON:
2810
- return /* @__PURE__ */ l(Vr, { hierarchy: new hi(_), material: o ?? t });
2811
- default:
2812
- return /* @__PURE__ */ l(oe, {});
2813
- }
2814
- else {
2815
- switch (M.type) {
2816
- case re.BOX:
2817
- _ = Yr(_);
2818
- break;
2819
- case re.POLYGON:
2820
- _ = [..._, _[0]];
2821
- break;
2822
- default:
2823
- return /* @__PURE__ */ l(oe, {});
2804
+ try {
2805
+ let T = M.coordinates !== void 0 ? M.coordinates : jr(M.type, M.geojson);
2806
+ if (r !== !0)
2807
+ switch (M.type) {
2808
+ case oe.BOX:
2809
+ return /* @__PURE__ */ l(zr, { coordinates: T, material: o ?? t });
2810
+ case oe.POLYGON:
2811
+ return /* @__PURE__ */ l(Vr, { hierarchy: new hi(T), material: o ?? t });
2812
+ default:
2813
+ return /* @__PURE__ */ l(ie, {});
2814
+ }
2815
+ else {
2816
+ switch (M.type) {
2817
+ case oe.BOX:
2818
+ T = Yr(T);
2819
+ break;
2820
+ case oe.POLYGON:
2821
+ T = [...T, T[0]];
2822
+ break;
2823
+ default:
2824
+ return /* @__PURE__ */ l(ie, {});
2825
+ }
2826
+ return /* @__PURE__ */ l(Wr, { positions: T, width: d ?? 1, material: o ?? t });
2824
2827
  }
2825
- return /* @__PURE__ */ l(Wr, { positions: _, width: d ?? 1, material: o ?? t });
2828
+ } catch (T) {
2829
+ return console.error(T), /* @__PURE__ */ l(ie, {});
2826
2830
  }
2827
2831
  };
2828
- return /* @__PURE__ */ l($r, { ...e, children: e.drawings.map((M, _) => /* @__PURE__ */ B(Hr, { name: M.name, children: [
2832
+ return /* @__PURE__ */ l($r, { ...e, children: e.drawings.map((M, T) => /* @__PURE__ */ B(Hr, { name: M.name, children: [
2829
2833
  /* @__PURE__ */ B(Gr, { children: [
2830
2834
  /* @__PURE__ */ B("h1", { children: [
2831
2835
  "Drawed Entity ",
@@ -2891,28 +2895,28 @@ const Xr = 38, Zr = 40, Jr = 13, Qr = 14, eo = 27, to = 9, no = 10, io = 100, ro
2891
2895
  Y(n, h, f);
2892
2896
  }, [e]);
2893
2897
  const m = (f, h, v) => {
2894
- const { trigger: g, matchAny: C, regex: S } = e, T = new RegExp(S);
2898
+ const { trigger: g, matchAny: C, regex: S } = e, _ = new RegExp(S);
2895
2899
  let b = g;
2896
2900
  Array.isArray(b) || (b = new Array(g)), b.sort();
2897
2901
  const L = {};
2898
2902
  Array.isArray(v) && b.forEach((q) => {
2899
2903
  L[q] = v;
2900
2904
  });
2901
- const P = E(b, T);
2905
+ const P = E(b, _);
2902
2906
  let W = {};
2903
2907
  for (let q = 0; q < P.length; q++) {
2904
2908
  const { triggerStr: N, triggerMatch: D, triggerLength: I } = P[q];
2905
2909
  for (let z = h - 1; z >= 0; --z) {
2906
- const ie = f.substring(z, h).match(T);
2910
+ const re = f.substring(z, h).match(_);
2907
2911
  let ee = -1;
2908
2912
  if (I > 0) {
2909
2913
  const se = D ? z : z - I + 1;
2910
- if (se < 0 || (w(N, f, se) && (ee = se + I), !ie && ee < 0))
2914
+ if (se < 0 || (w(N, f, se) && (ee = se + I), !re && ee < 0))
2911
2915
  break;
2912
2916
  } else {
2913
- if (ie && z > 0)
2917
+ if (re && z > 0)
2914
2918
  continue;
2915
- if (ee = z === 0 && ie ? 0 : z + 1, h - ee === 0)
2919
+ if (ee = z === 0 && re ? 0 : z + 1, h - ee === 0)
2916
2920
  break;
2917
2921
  }
2918
2922
  if (ee >= 0) {
@@ -2939,7 +2943,7 @@ const Xr = 38, Zr = 40, Jr = 13, Qr = 14, eo = 27, to = 9, no = 10, io = 100, ro
2939
2943
  triggerMatch: g.match(h),
2940
2944
  triggerLength: g.length
2941
2945
  })), w = (f, h, v) => !f || !f.length || h.substr(v, f.length) === f, M = (f) => {
2942
- const { onChange: h, options: v, spaceRemovers: g, spacer: C, value: S } = e, T = n, b = f.target.value, L = Mi(_(f.target)).end;
2946
+ const { onChange: h, options: v, spaceRemovers: g, spacer: C, value: S } = e, _ = n, b = f.target.value, L = Mi(T(f.target)).end;
2943
2947
  if (b.length || F({
2944
2948
  ...r,
2945
2949
  helperVisible: !1
@@ -2950,8 +2954,8 @@ const Xr = 38, Zr = 40, Jr = 13, Qr = 14, eo = 27, to = 9, no = 10, io = 100, ro
2950
2954
  }), !b.length || !L)
2951
2955
  return h(f.target.value);
2952
2956
  if (i && g.length && b.length > 2 && C.length) {
2953
- for (let P = 0; P < Math.max(T.length, b.length); ++P)
2954
- if (T[P] !== b[P]) {
2957
+ for (let P = 0; P < Math.max(_.length, b.length); ++P)
2958
+ if (_[P] !== b[P]) {
2955
2959
  if (P >= 2 && b[P - 1] === C && g.indexOf(b[P - 2]) === -1 && g.indexOf(b[P]) !== -1 && !Je(m(b.substring(0, P - 2), L - 3, v))) {
2956
2960
  const W = `${b.slice(0, P - 1)}${b.slice(P, P + 1)}${b.slice(P - 1, P)}${b.slice(P + 1)}`;
2957
2961
  return K(P + 1), u.current !== null && (u.current.value = W), S || F({
@@ -2964,7 +2968,7 @@ const Xr = 38, Zr = 40, Jr = 13, Qr = 14, eo = 27, to = 9, no = 10, io = 100, ro
2964
2968
  o(!1);
2965
2969
  }
2966
2970
  return Y(b, L, v), h(f.target.value);
2967
- }, _ = (f) => {
2971
+ }, T = (f) => {
2968
2972
  if (f !== void 0)
2969
2973
  if (f.children.length > 0) {
2970
2974
  const h = f.getElementsByTagName("textarea");
@@ -3013,14 +3017,14 @@ const Xr = 38, Zr = 40, Jr = 13, Qr = 14, eo = 27, to = 9, no = 10, io = 100, ro
3013
3017
  helperVisible: !1
3014
3018
  });
3015
3019
  }, j = (f) => {
3016
- const { spacer: h, onSelect: v, changeOnSelect: g } = e, { matchStart: C, matchLength: S, options: T, trigger: b } = r, L = T[f], P = n, W = P.substring(0, C - b.length), q = P.substring(C + S), N = { target: u.current }, D = g(b, L);
3020
+ const { spacer: h, onSelect: v, changeOnSelect: g } = e, { matchStart: C, matchLength: S, options: _, trigger: b } = r, L = _[f], P = n, W = P.substring(0, C - b.length), q = P.substring(C + S), N = { target: u.current }, D = g(b, L);
3017
3021
  N.target !== null && (N.target.value = `${W}${D}${h}${q}`), M(N), N.target !== null && v(N.target.value), U(), K(W.length + D.length + 1), o(!0);
3018
3022
  }, K = (f) => {
3019
3023
  F({
3020
3024
  ...r,
3021
3025
  caret: f
3022
3026
  });
3023
- const h = _(u.current);
3027
+ const h = T(u.current);
3024
3028
  Pi(h, f);
3025
3029
  }, F = (f) => {
3026
3030
  setTimeout(() => {
@@ -3032,14 +3036,14 @@ const Xr = 38, Zr = 40, Jr = 13, Qr = 14, eo = 27, to = 9, no = 10, io = 100, ro
3032
3036
  const g = u.current;
3033
3037
  if (u.current === null)
3034
3038
  return;
3035
- const C = _(g);
3039
+ const C = T(g);
3036
3040
  if (C === void 0)
3037
3041
  return;
3038
- const S = g.getBoundingClientRect(), T = m(f, h, v);
3039
- if (Object.keys(T).length > 0 && C !== null) {
3042
+ const S = g.getBoundingClientRect(), _ = m(f, h, v);
3043
+ if (Object.keys(_).length > 0 && C !== null) {
3040
3044
  const b = Li(C, h), L = C.getBoundingClientRect(), { minChars: P, onRequestOptions: W, requestOnlyIfNoOptions: q, mode: N } = e;
3041
3045
  let D, I, z, de = "unset";
3042
- N === "assist" ? (D = g === C ? b.top + C.offsetTop : b.top + S.top, I = Math.min(b.left + C.offsetLeft - no, C.offsetLeft + L.width - io)) : (D = S.top + g.offsetHeight, I = g.offsetLeft, z = g.offsetLeft - g.offsetWidth, de = `${S.width}px`), T.matchLength >= P && (T.options.length > 1 || T.options.length === 1 && T.options[0].length !== T.matchLength) ? F({
3046
+ N === "assist" ? (D = g === C ? b.top + C.offsetTop : b.top + S.top, I = Math.min(b.left + C.offsetLeft - no, C.offsetLeft + L.width - io)) : (D = S.top + g.offsetHeight, I = g.offsetLeft, z = g.offsetLeft - g.offsetWidth, de = `${S.width}px`), _.matchLength >= P && (_.options.length > 1 || _.options.length === 1 && _.options[0].length !== _.matchLength) ? F({
3043
3047
  ...r,
3044
3048
  value: f,
3045
3049
  helperVisible: !0,
@@ -3047,8 +3051,8 @@ const Xr = 38, Zr = 40, Jr = 13, Qr = 14, eo = 27, to = 9, no = 10, io = 100, ro
3047
3051
  left: I,
3048
3052
  right: z,
3049
3053
  width: de,
3050
- ...T
3051
- }) : ((!q || !T.options.length) && W(f.substr(T.matchStart, T.matchLength)), U());
3054
+ ..._
3055
+ }) : ((!q || !_.options.length) && W(f.substr(_.matchStart, _.matchLength)), U());
3052
3056
  } else
3053
3057
  U();
3054
3058
  }, U = () => {
@@ -3060,23 +3064,23 @@ const Xr = 38, Zr = 40, Jr = 13, Qr = 14, eo = 27, to = 9, no = 10, io = 100, ro
3060
3064
  });
3061
3065
  }, 100);
3062
3066
  }, x = () => {
3063
- const { helperVisible: f, left: h, right: v, matchStart: g, matchLength: C, options: S, selection: T, top: b, value: L, width: P } = r;
3067
+ const { helperVisible: f, left: h, right: v, matchStart: g, matchLength: C, options: S, selection: _, top: b, value: L, width: P } = r;
3064
3068
  if (!f)
3065
3069
  return null;
3066
3070
  const { maxOptions: W, offsetX: q, offsetY: N, direction: D } = e;
3067
3071
  if (S.length === 0)
3068
3072
  return null;
3069
- if (T >= S.length)
3073
+ if (_ >= S.length)
3070
3074
  return F({
3071
3075
  ...r,
3072
3076
  selection: 0
3073
3077
  }), null;
3074
- const I = W === 0 ? S.length : W, z = S.slice(0, I).map((ie, ee) => {
3075
- const se = ie.toLowerCase().indexOf(L.substr(g, C).toLowerCase());
3078
+ const I = W === 0 ? S.length : W, z = S.slice(0, I).map((re, ee) => {
3079
+ const se = re.toLowerCase().indexOf(L.substr(g, C).toLowerCase());
3076
3080
  return /* @__PURE__ */ B(
3077
3081
  "li",
3078
3082
  {
3079
- className: ee === T ? "active" : void 0,
3083
+ className: ee === _ ? "active" : void 0,
3080
3084
  onClick: () => {
3081
3085
  j(ee);
3082
3086
  },
@@ -3087,19 +3091,19 @@ const Xr = 38, Zr = 40, Jr = 13, Qr = 14, eo = 27, to = 9, no = 10, io = 100, ro
3087
3091
  });
3088
3092
  },
3089
3093
  children: [
3090
- ie.slice(0, se),
3091
- /* @__PURE__ */ l("strong", { children: ie.substr(se, C) }),
3092
- ie.slice(se + C)
3094
+ re.slice(0, se),
3095
+ /* @__PURE__ */ l("strong", { children: re.substr(se, C) }),
3096
+ re.slice(se + C)
3093
3097
  ]
3094
3098
  },
3095
- ie
3099
+ re
3096
3100
  );
3097
3101
  }), de = D === "ltr" ? { left: h + q } : { right: v + q };
3098
3102
  return /* @__PURE__ */ l("ul", { className: "react-autocomplete-input", style: { ...de, top: b + N, width: P }, children: z });
3099
3103
  }, { Component: $, ComponentProps: R, defaultValue: V, disabled: X, onBlur: s, value: a, ...y } = e, c = Object.assign({}, y);
3100
3104
  return Object.keys(e).forEach((f) => {
3101
3105
  delete c[f];
3102
- }), /* @__PURE__ */ B(oe, { children: [
3106
+ }), /* @__PURE__ */ B(ie, { children: [
3103
3107
  fe.cloneElement($, {
3104
3108
  disabled: X,
3105
3109
  onBlur: s,
@@ -3293,7 +3297,7 @@ const Ns = fe.memo(
3293
3297
  }
3294
3298
  }
3295
3299
  })();
3296
- const M = (V) => V.replace(/([A-Z])/g, (X) => "-" + X.toLowerCase()), _ = Fe(() => e !== void 0 ? Object.keys(e).reduce((X, s) => {
3300
+ const M = (V) => V.replace(/([A-Z])/g, (X) => "-" + X.toLowerCase()), T = Fe(() => e !== void 0 ? Object.keys(e).reduce((X, s) => {
3297
3301
  const a = e[s];
3298
3302
  return s = s.startsWith("--") ? s : `--fp-theme-${M(s)}`, X[s] = a, X;
3299
3303
  }, {}) : {}, [e]), [k, H] = A(!1), [j, K] = A(), [F, Y] = A(!1), [U, x] = A(), [$, R] = A();
@@ -3304,7 +3308,7 @@ const Ns = fe.memo(
3304
3308
  {
3305
3309
  style: {
3306
3310
  ...n,
3307
- ..._
3311
+ ...T
3308
3312
  },
3309
3313
  children: /* @__PURE__ */ l(
3310
3314
  Ii,
@@ -3374,7 +3378,7 @@ export {
3374
3378
  ns as DateTimePicker,
3375
3379
  Bi as DateTimeRangePicker,
3376
3380
  Qo as DateTimeRangePickerFormControl,
3377
- re as DrawType,
3381
+ oe as DrawType,
3378
3382
  Os as FileHelper,
3379
3383
  Ns as FilePicker,
3380
3384
  Rs as FilePickerActions,