@expofp/floorplan 3.32.0 → 3.33.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/dist/browser/{Button-CNB2wS1D.js → Button-B0MFYLVc.js} +5 -5
  2. package/dist/browser/{CookieConsent-9-_4FEUc.js → CookieConsent-Bqn0q_87.js} +7 -7
  3. package/dist/browser/{Debug-BUelP3lh.js → Debug-CKc3n1sg.js} +7 -7
  4. package/dist/browser/{DebugTools-6RBk4RXs.js → DebugTools-BU3wjPGB.js} +20 -14
  5. package/dist/browser/{Demo-B1Wq_-2I.js → Demo-D-TB4mNu.js} +9 -9
  6. package/dist/browser/{Free-Ce5a68cd.js → Free-TLOhTU_Z.js} +9 -9
  7. package/dist/browser/{GalleryContainer-nNrPq8p3.js → GalleryContainer-G381lvbx.js} +10 -10
  8. package/dist/browser/{GpsLoader-DJD8M21U.js → GpsLoader-DL-xnnfg.js} +10 -10
  9. package/dist/browser/{KioskStore-DV6yg7gQ.js → KioskStore-DluWuejk.js} +5 -5
  10. package/dist/browser/{MaplibreAdapter-DG-IOwAR.js → MaplibreAdapter-CKpyQZkH.js} +756 -756
  11. package/dist/browser/{ModalContainer-lWcPEqKF.js → ModalContainer-BJuhy7tC.js} +10 -10
  12. package/dist/browser/{PermissionNotice-DzoxJYql.js → PermissionNotice-DzavRwDB.js} +6 -6
  13. package/dist/browser/{SetKioskMode-D-drLiQS.js → SetKioskMode-DQMJq09_.js} +9 -9
  14. package/dist/browser/{ShowKiosk-CmQAm7lA.js → ShowKiosk-txc4lzXg.js} +10 -10
  15. package/dist/browser/{ViewerMenuPanel-4K3IeFpI.js → ViewerMenuPanel-BDDILMLj.js} +9 -9
  16. package/dist/browser/{add-debug-secret-listener-BCbwpSUA.js → add-debug-secret-listener-jHopjZKv.js} +1 -1
  17. package/dist/browser/{adopt-global-settings-BCXdoUeA.js → adopt-global-settings-33HggKBq.js} +9 -9
  18. package/dist/browser/{boolean-editor-Bq5ovuVU.js → boolean-editor-CtUCInIZ.js} +9 -9
  19. package/dist/browser/{bootIntercom-DJYZ3yyM.js → bootIntercom-BeXT05Ea.js} +2 -2
  20. package/dist/browser/bundle.json +69 -69
  21. package/dist/browser/{camera-events-DumvNN3C.js → camera-events-KroE96c4.js} +1 -1
  22. package/dist/browser/{classnames-XNi7nRCB.js → classnames-BJTcQIVl.js} +2 -2
  23. package/dist/browser/{client-CA8cGn8U.js → client-Cj1mLS94.js} +5 -5
  24. package/dist/browser/{components-MOPAfkCm.js → components-6-iibf5i.js} +586 -582
  25. package/dist/browser/{debug-context-C73IpGRj.js → debug-context-_45jR8C-.js} +5 -5
  26. package/dist/browser/{debug-overlay-CIY57uQY.js → debug-overlay-C78aQduk.js} +10 -10
  27. package/dist/browser/{debug-ui-D9GVgxaS.js → debug-ui-Bzg8w5FY.js} +6 -6
  28. package/dist/browser/{dimming-CXOoyeuK.js → dimming-B0nptLJO.js} +284 -255
  29. package/dist/browser/{dist-Cuhm8hDS.js → dist-BfBy25r6.js} +3 -3
  30. package/dist/browser/{dist-CEbPeqIY.js → dist-DX9URKQh.js} +6 -6
  31. package/dist/browser/{dist-CNBw7D1y.js → dist-LJcBFXUG.js} +5 -5
  32. package/dist/browser/{efp-debug-init-CF3R1rs1.js → efp-debug-init-tAoJiV3q.js} +3 -3
  33. package/dist/browser/{enum-editor-Hfgu8R6H.js → enum-editor-12NAdvKo.js} +4 -4
  34. package/dist/browser/{es5-Ch3SnVpq.js → es5-D-Bj8Lf1.js} +2 -2
  35. package/dist/browser/{event-not-found-BBGk7sl1.js → event-not-found-CsAHzhl6.js} +1 -1
  36. package/dist/browser/{exports-DdY5MNmH.js → exports-BfhFANKi.js} +1 -1
  37. package/dist/browser/{favicon-D0_sCTFa.js → favicon-D4TW1swv.js} +1 -1
  38. package/dist/browser/{fetch-retry.umd-DFU09v6m.js → fetch-retry.umd-DyLfSwjv.js} +2 -2
  39. package/dist/browser/{flex-Dd9f0dfq.js → flex-C3cSMVt_.js} +5 -5
  40. package/dist/browser/{floorplan.loader-DxE6hohE.js → floorplan.loader-DxRhDqfH.js} +10 -10
  41. package/dist/browser/{floorplan.ready-Cysrjlb9.js → floorplan.ready-RkqlzsJt.js} +14 -14
  42. package/dist/browser/{fuse-BHP4h5hM.js → fuse-CSGWbbNq.js} +2 -2
  43. package/dist/browser/{i18n-3lyxjXox.js → i18n-EK2oa1QJ.js} +5 -5
  44. package/dist/browser/index.js +14 -14
  45. package/dist/browser/{index.module-C6SF1hwf.js → index.module-BwOjEcud.js} +4 -4
  46. package/dist/browser/{integrateKiosk-Dmtn4lIF.js → integrateKiosk-DT0yChCb.js} +4 -4
  47. package/dist/browser/{is-webview-DBk4rvr1.js → is-webview-CW_tK_lH.js} +1 -1
  48. package/dist/browser/{jsx-runtime-DLehizIL.js → jsx-runtime-DAYaJ8Wj.js} +2 -2
  49. package/dist/browser/{kiosk-record-CWJVbWhN.js → kiosk-record-DSOWQWwy.js} +1 -1
  50. package/dist/browser/{lib-Cx0xfIyT.js → lib-DS8gxXh1.js} +3 -3
  51. package/dist/browser/{loadImage-BttawziQ.js → loadImage-Chqtrnpo.js} +4 -4
  52. package/dist/browser/{logDeviceInfo-DtOdua8y.js → logDeviceInfo-C3nIx8MI.js} +9 -9
  53. package/dist/browser/{mobx-1TTEnMh_.js → mobx-BYaAarcI.js} +4 -4
  54. package/dist/browser/{optional-boolean-editor--Ll4y7L3.js → optional-boolean-editor-f0AsQ88K.js} +3 -3
  55. package/dist/browser/{optional-enum-editor-Diz4Gygu.js → optional-enum-editor-DTfOMkVp.js} +4 -4
  56. package/dist/browser/{optional-string-editor-B_UUO3oV.js → optional-string-editor-Dweo1EiQ.js} +4 -4
  57. package/dist/browser/{particles.min-IsQntJd_.js → particles.min-DcgQ3bEa.js} +2 -2
  58. package/dist/browser/{react-DaVp-1nR.js → react-CSfcl6m_.js} +2 -2
  59. package/dist/browser/{react-dom-Cmin4STP.js → react-dom-BtTajUTr.js} +3 -3
  60. package/dist/browser/{rolldown-runtime-Dl53HvP8.js → rolldown-runtime-LBfc_8zH.js} +1 -1
  61. package/dist/browser/{scheduler-CeO2Fq3-.js → scheduler-CO29sRve.js} +2 -2
  62. package/dist/browser/{select-CcBpWf_u.js → select-ZMZ_S_qj.js} +10 -10
  63. package/dist/browser/{settings-BnizsqhF.js → settings-Cot3Zp4u.js} +2 -2
  64. package/dist/browser/{settings-item-JOfQImsE.js → settings-item-D5PjVyNk.js} +6 -6
  65. package/dist/browser/{store-BNPYvlw8.js → store-BUXXD8-o.js} +15 -15
  66. package/dist/browser/{string-editor-BmF12fyT.js → string-editor-Bdjy-hXr.js} +4 -4
  67. package/dist/browser/{text-field-D4_C8M62.js → text-field-Db4wvBQb.js} +5 -5
  68. package/dist/browser/{theme--BjIkuDi.js → theme-DOvsIfDN.js} +8 -8
  69. package/dist/browser/{ui-Bt8WOnfB.js → ui-exQmHhHz.js} +8 -8
  70. package/dist/browser/{useRenderTarget-CKEW-h44.js → useRenderTarget-COoBm3gN.js} +4 -4
  71. package/dist/browser/{viewport-Ch_DyTlN.js → viewport-D14jB-aG.js} +2 -2
  72. package/dist/esm/components/Map/Map.js +1 -1
  73. package/dist/esm/components/Map/MapCursorCoords.d.ts +13 -0
  74. package/dist/esm/components/Map/MapCursorCoords.js +1 -0
  75. package/dist/esm/components/Maplibre/MaplibreAdapter.js +1 -1
  76. package/package.json +10 -10
@@ -1,19 +1,20 @@
1
1
  (function() {
2
2
  try {
3
3
  var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {};
4
- e.SENTRY_RELEASE = { id: "3.32.0" };
4
+ e.SENTRY_RELEASE = { id: "3.33.0" };
5
5
  var t = new e.Error().stack;
6
- t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "31c60e48-e610-46ce-910d-58751ed9ede3", e._sentryDebugIdIdentifier = "sentry-dbid-31c60e48-e610-46ce-910d-58751ed9ede3");
6
+ t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "03638110-e67f-40e9-9aa5-5f7311dac906", e._sentryDebugIdIdentifier = "sentry-dbid-03638110-e67f-40e9-9aa5-5f7311dac906");
7
7
  } catch {}
8
8
  })();
9
- import { r as e } from "./rolldown-runtime-Dl53HvP8.js";
10
- import { j as t, v as n } from "./i18n-3lyxjXox.js";
11
- import { t as r } from "./react-DaVp-1nR.js";
12
- import { t as i } from "./loadImage-BttawziQ.js";
13
- import { $t as a, A as o, An as s, Bt as c, Cn as l, Ct as u, Dn as d, En as f, Et as p, Fn as m, Gt as h, Jt as g, Kt as _, M as v, Mn as y, Nn as b, O as x, Ot as S, Pn as C, Pt as w, Qt as T, Tn as E, Tt as D, U as O, Xt as k, Yt as ee, Zt as te, a as A, an as ne, bn as j, bt as M, c as N, en as P, fn as F, j as I, jn as re, k as ie, kn as ae, l as oe, rn as L, t as se, wt as ce, x as le, zt as R } from "./store-BNPYvlw8.js";
14
- import { i as ue, n as de } from "./viewport-Ch_DyTlN.js";
9
+ import { r as e } from "./rolldown-runtime-LBfc_8zH.js";
10
+ import { j as t, v as n } from "./i18n-EK2oa1QJ.js";
11
+ import { t as r } from "./react-CSfcl6m_.js";
12
+ import { t as i } from "./loadImage-Chqtrnpo.js";
13
+ import { r as a } from "./debug-context-_45jR8C-.js";
14
+ import { $t as o, A as s, An as c, Bt as l, Cn as u, Ct as d, Dn as f, En as p, Et as m, Fn as h, Gt as g, Jt as _, Kt as v, M as y, Mn as b, Nn as x, O as S, Ot as C, Pn as w, Pt as T, Qt as E, Tn as D, Tt as O, U as k, Xt as ee, Yt as te, Zt as A, a as j, an as ne, bn as M, bt as N, c as P, en as F, fn as I, j as re, jn as ie, k as ae, kn as oe, l as se, rn as L, t as ce, vt as le, wt as ue, x as de, zt as R } from "./store-BUXXD8-o.js";
15
+ import { i as fe, n as pe } from "./viewport-D14jB-aG.js";
15
16
  //#region src/components/Map/traffic/trafficLayers.ts
16
- var fe = "traffic_route", pe = "traffic_route_stop", z = "traffic_vehicles", me = "build_route_lines", he = "build_route_dots", ge = 5;
17
+ var z = "traffic_route", B = "traffic_route_stop", V = "traffic_vehicles", me = "build_route_lines", he = "build_route_dots", ge = 5;
17
18
  function _e() {
18
19
  let e = [];
19
20
  for (let t = 0; t < ge; t++) e.push({
@@ -24,7 +25,7 @@ function _e() {
24
25
  children: []
25
26
  });
26
27
  return e.push({
27
- name: z,
28
+ name: V,
28
29
  children: []
29
30
  }), e.push({
30
31
  name: me,
@@ -35,44 +36,44 @@ function _e() {
35
36
  }), e;
36
37
  }
37
38
  function ve(e) {
38
- return `${fe}_${e + 1}`;
39
+ return `${z}_${e + 1}`;
39
40
  }
40
41
  function ye(e) {
41
- return `${pe}_${e + 1}`;
42
+ return `${B}_${e + 1}`;
42
43
  }
43
44
  function be() {
44
- return RegExp(`^${fe}_\\d+$`);
45
+ return RegExp(`^${z}_\\d+$`);
45
46
  }
46
47
  function xe() {
47
- return RegExp(`^${pe}_\\d+$`);
48
+ return RegExp(`^${B}_\\d+$`);
48
49
  }
49
50
  //#endregion
50
51
  //#region src/components/Map/drawing/config/config-booth-badge-eligibility.ts
51
- var Se = /* @__PURE__ */ e(f(), 1);
52
+ var Se = /* @__PURE__ */ e(p(), 1);
52
53
  function Ce(e) {
53
54
  return e.hideExhibitorBoothNumber || e.hideBoothBadges || !e.hasExhibitors ? !1 : e.noLabels || !e.hideLogoInBooth && e.hasLogoInBooth;
54
55
  }
55
56
  //#endregion
56
57
  //#region src/components/Map/drawing/config/config-booth-badge.ts
57
- var we = .5, Te = .3, Ee = 15, De = 24, Oe = 30, ke = 12, B = .8, V = document.createElement("canvas").getContext("2d");
58
- function Ae(e) {
58
+ var we = .5, Te = .3, Ee = 15, De = 24, Oe = 30, ke = 12, Ae = .8, je = document.createElement("canvas").getContext("2d");
59
+ function Me(e) {
59
60
  return e.length <= Ee ? e : e.slice(0, Ee - 1) + "…";
60
61
  }
61
- function H(e) {
62
+ function Ne(e) {
62
63
  var t, n;
63
64
  if (!((t = e.paths) != null && t.length)) return [];
64
65
  let r = ((n = e.layer) == null ? void 0 : n.name) || "", i = [];
65
- for (let t of e.paths) for (let e of j(t.index, r)) i.push(e);
66
+ for (let t of e.paths) for (let e of M(t.index, r)) i.push(e);
66
67
  return i;
67
68
  }
68
- function je(e) {
69
- let t = H(e);
70
- return t.length ? ae.fromPoints(t.flat().map(([e, t]) => ({
69
+ function Pe(e) {
70
+ let t = Ne(e);
71
+ return t.length ? oe.fromPoints(t.flat().map(([e, t]) => ({
71
72
  x: e,
72
73
  y: t
73
74
  }))) : null;
74
75
  }
75
- function Me(e) {
76
+ function Fe(e) {
76
77
  let t = [], n = [];
77
78
  for (let r of e) {
78
79
  let e = t.length;
@@ -91,16 +92,16 @@ function Me(e) {
91
92
  e + 2
92
93
  ]);
93
94
  }
94
- return new y(t, n);
95
+ return new b(t, n);
95
96
  }
96
- function U(e, t, n) {
97
+ function H(e, t, n) {
97
98
  return n.containsPoint({
98
99
  x: e,
99
100
  y: t
100
101
  });
101
102
  }
102
- function Ne(e, t, n, r, i, a, o, s) {
103
- if (!e.length || !U(n, r, t)) return o;
103
+ function Ie(e, t, n, r, i, a, o, s) {
104
+ if (!e.length || !H(n, r, t)) return o;
104
105
  let c = {
105
106
  x: n,
106
107
  y: r
@@ -108,30 +109,30 @@ function Ne(e, t, n, r, i, a, o, s) {
108
109
  for (let e = 0; e < 10; e++) {
109
110
  let e = (l + u) / 2, o = i * e, d = a * e;
110
111
  [
111
- C({
112
+ w({
112
113
  x: n + o,
113
114
  y: r
114
115
  }, s, c),
115
- C({
116
+ w({
116
117
  x: n,
117
118
  y: r + d
118
119
  }, s, c),
119
- C({
120
+ w({
120
121
  x: n + o,
121
122
  y: r + d
122
123
  }, s, c)
123
- ].every((e) => U(e.x, e.y, t)) ? l = e : u = e;
124
+ ].every((e) => H(e.x, e.y, t)) ? l = e : u = e;
124
125
  }
125
126
  return l;
126
127
  }
127
- function Pe(e) {
128
+ function Le(e) {
128
129
  var t;
129
- return (t = je(e)) == null ? e.rect : t;
130
+ return (t = Pe(e)) == null ? e.rect : t;
130
131
  }
131
- function Fe(e, t, n, r, i, a) {
132
+ function Re(e, t, n, r, i, a) {
132
133
  var o;
133
134
  if (t.length) {
134
- let o = Pe(e), s = {
135
+ let o = Le(e), s = {
135
136
  x: i > 0 ? o.min.x : o.max.x,
136
137
  y: a > 0 ? o.min.y : o.max.y
137
138
  }, c = /* @__PURE__ */ new Set(), l = null, u = Infinity;
@@ -140,7 +141,7 @@ function Fe(e, t, n, r, i, a) {
140
141
  if (c.has(e)) continue;
141
142
  c.add(e);
142
143
  let o = t[0] + r * i, d = t[1] + r * a;
143
- if (U(o, d, n)) {
144
+ if (H(o, d, n)) {
144
145
  let e = Math.abs(o - s.x) + Math.abs(d - s.y);
145
146
  e < u && (u = e, l = {
146
147
  x: o,
@@ -151,7 +152,7 @@ function Fe(e, t, n, r, i, a) {
151
152
  if (l) return l;
152
153
  }
153
154
  let s = i > 0 ? e.rect.min.x + r : e.rect.max.x - r, c = a > 0 ? e.rect.min.y + r : e.rect.max.y - r, l = (o = e.rotate) == null ? 0 : o;
154
- return l ? C({
155
+ return l ? w({
155
156
  x: s,
156
157
  y: c
157
158
  }, l, e.rect.center) : {
@@ -159,43 +160,43 @@ function Fe(e, t, n, r, i, a) {
159
160
  y: c
160
161
  };
161
162
  }
162
- function W(e) {
163
+ function U(e) {
163
164
  return e && e !== "none" ? e : void 0;
164
165
  }
165
- function Ie(e) {
166
+ function ze(e) {
166
167
  var t;
167
- let n = W(e.borderColor) || W(l.boothBorderColor) || l.colors.booths.default;
168
- return ((t = e.paths) == null ? void 0 : t.length) > 1 && W(e.paths[e.paths.length - 1].color) || n;
168
+ let n = U(e.borderColor) || U(u.boothBorderColor) || u.colors.booths.default;
169
+ return ((t = e.paths) == null ? void 0 : t.length) > 1 && U(e.paths[e.paths.length - 1].color) || n;
169
170
  }
170
- function Le(e) {
171
+ function Be(e) {
171
172
  var t;
172
- let r = Ae(e.title || e.name), i = Ie(e), a = le((0, Se.default)(i).hex()), o = u();
173
- V.font = ne(Oe, o);
174
- let s = V.measureText(r).width, c = Math.ceil(s + ke * 2), l = (e.borderWidth || se.borderWidth) / 2, d = c * B, f = 54 * B, m = e.rect.size.width, h = e.rect.size.height, _ = (e) => {
175
- let t = e ? h : m, n = e ? m : h;
176
- return Math.min(t > 0 ? t * we / d : Infinity, n > 0 ? n * Te / f : Infinity);
177
- }, v = H(e), y = Me(v), b = (t = e.rotate) == null ? 0 : t, x = 0, S = 0, T = 0, E = 0, O = () => {
178
- let t = Fe(e, v, y, l, x === 0 || x === 3 ? 1 : -1, x === 0 || x === 1 ? 1 : -1);
179
- S = t.x, T = t.y;
180
- let n = _(x === 1 || x === 3);
181
- E = Ne(v, y, S, T, d, f, n, b);
173
+ let r = Me(e.title || e.name), i = ze(e), a = de((0, Se.default)(i).hex()), o = d();
174
+ je.font = ne(Oe, o);
175
+ let s = je.measureText(r).width, c = Math.ceil(s + ke * 2), l = (e.borderWidth || ce.borderWidth) / 2, u = c * Ae, f = 54 * Ae, p = e.rect.size.width, h = e.rect.size.height, g = (e) => {
176
+ let t = e ? h : p, n = e ? p : h;
177
+ return Math.min(t > 0 ? t * we / u : Infinity, n > 0 ? n * Te / f : Infinity);
178
+ }, v = Ne(e), y = Fe(v), b = (t = e.rotate) == null ? 0 : t, x = 0, S = 0, C = 0, E = 0, D = () => {
179
+ let t = Re(e, v, y, l, x === 0 || x === 3 ? 1 : -1, x === 0 || x === 1 ? 1 : -1);
180
+ S = t.x, C = t.y;
181
+ let n = g(x === 1 || x === 3);
182
+ E = Ie(v, y, S, C, u, f, n, b);
182
183
  };
183
- O();
184
- let A = (t, n) => {
184
+ D();
185
+ let k = (t, n) => {
185
186
  let r = t / 2, i = n / 2;
186
- return new re(C({
187
+ return new ie(w({
187
188
  x: S + r,
188
- y: T + i
189
+ y: C + i
189
190
  }, b, {
190
191
  x: S,
191
- y: T
192
+ y: C
192
193
  }), {
193
194
  x: t,
194
195
  y: n
195
196
  }, b, e.elevation);
196
- }, j = ce(o, te()), M = g(A(1, 1), i);
197
+ }, j = ue(o, A()), M = _(k(1, 1), i);
197
198
  M.hidden = !0, M.dim = e.skipDim ? 0 : void 0;
198
- let N = ee(k([[r], []], a, 0, [j, j]), A(1, 1), [0, 0], {
199
+ let N = te(ee([[r], []], a, 0, [j, j]), k(1, 1), [0, 0], {
199
200
  horizontal: "center",
200
201
  vertical: "center"
201
202
  });
@@ -204,30 +205,30 @@ function Le(e) {
204
205
  booth: e,
205
206
  anchor: {
206
207
  x: S,
207
- y: T
208
+ y: C
208
209
  },
209
210
  source: {
210
- x: d,
211
+ x: u,
211
212
  y: f
212
213
  },
213
214
  rotation: b,
214
215
  maxScale: E,
215
216
  bg: M,
216
217
  text: N
217
- }, F = new Re(P);
218
+ }, F = new Ve(P);
218
219
  M.onScale = ({ pixelSize: e }) => F.layOutBg(e), N.onScale = ({ pixelSize: e }) => F.layOutText(e);
219
220
  let I = [];
220
221
  return I.push(n(() => e.skipDim, (e) => {
221
- M.dim = e ? 0 : void 0, N.dim = e ? 0 : void 0, w(M, N);
222
+ M.dim = e ? 0 : void 0, N.dim = e ? 0 : void 0, T(M, N);
222
223
  })), I.push(n(() => {
223
224
  var t, n;
224
225
  return (t = (n = e.layer) == null ? void 0 : n.visible) == null || t;
225
226
  }, (e) => {
226
- M.hidden = !e, N.hidden = !e, w(M, N);
227
- })), I.push(n(() => oe.mapSettings, ({ roll: e }) => {
228
- p(e == null ? 0 : e) && (M.onRoll = ({ roll: e, pixelSize: t }) => {
229
- let n = D(e, b);
230
- if (n !== 0) return b += n * Math.PI / 2, x = ((x + n) % 4 + 4) % 4, O(), P.anchor.x = S, P.anchor.y = T, P.rotation = b, P.maxScale = E, [...F.layOutBg(t), ...F.layOutText(t)];
227
+ M.hidden = !e, N.hidden = !e, T(M, N);
228
+ })), I.push(n(() => se.mapSettings, ({ roll: e }) => {
229
+ m(e == null ? 0 : e) && (M.onRoll = ({ roll: e, pixelSize: t }) => {
230
+ let n = O(e, b);
231
+ if (n !== 0) return b += n * Math.PI / 2, x = ((x + n) % 4 + 4) % 4, D(), P.anchor.x = S, P.anchor.y = C, P.rotation = b, P.maxScale = E, [...F.layOutBg(t), ...F.layOutText(t)];
231
232
  });
232
233
  }, { fireImmediately: !0 })), {
233
234
  bg: M,
@@ -237,7 +238,7 @@ function Le(e) {
237
238
  }
238
239
  };
239
240
  }
240
- var Re = class {
241
+ var Ve = class {
241
242
  constructor(e) {
242
243
  this.placement = e;
243
244
  }
@@ -251,7 +252,7 @@ var Re = class {
251
252
  }
252
253
  rectScaled(e) {
253
254
  let { anchor: t, booth: n, source: r, rotation: i, maxScale: a } = this.placement, o = Math.min(e, a), s = r.x * o, c = r.y * o;
254
- return new re(C({
255
+ return new ie(w({
255
256
  x: t.x + s / 2,
256
257
  y: t.y + c / 2
257
258
  }, i, t), {
@@ -264,17 +265,17 @@ var Re = class {
264
265
  return !!(e.layer && !e.layer.visible);
265
266
  }
266
267
  };
267
- function ze(e, t) {
268
+ function He(e, t) {
268
269
  let n = [], r = [], i = [];
269
- for (let e of t) if (e instanceof F && Ce({
270
- hideExhibitorBoothNumber: E.hideExhibitorBoothNumber,
271
- hideBoothBadges: E.hideBoothBadges,
272
- hideLogoInBooth: oe.hideLogoInBooth,
270
+ for (let e of t) if (e instanceof I && Ce({
271
+ hideExhibitorBoothNumber: D.hideExhibitorBoothNumber,
272
+ hideBoothBadges: D.hideBoothBadges,
273
+ hideLogoInBooth: se.hideLogoInBooth,
273
274
  noLabels: e.noLabels,
274
275
  hasExhibitors: e.exhibitors.length > 0,
275
276
  hasLogoInBooth: e.exhibitors.some((e) => e.logoInBooth && e.logo)
276
277
  })) {
277
- let { bg: t, text: a, dispose: o } = Le(e);
278
+ let { bg: t, text: a, dispose: o } = Be(e);
278
279
  n.push(t), r.push(a), i.push(o);
279
280
  }
280
281
  let a = () => {
@@ -299,17 +300,17 @@ function ze(e, t) {
299
300
  }
300
301
  //#endregion
301
302
  //#region src/components/Map/drawing/config/config-markers.ts
302
- var Be = "_selected", Ve = "markers";
303
- function He(e, t) {
304
- let { center: n, rotation: r } = e.bounds, { width: i, height: o } = e.source;
305
- return e.bounds = a(n.x, n.y, i, o, t, r), [e];
303
+ var Ue = "_selected", We = "markers";
304
+ function Ge(e, t) {
305
+ let { center: n, rotation: r } = e.bounds, { width: i, height: a } = e.source;
306
+ return e.bounds = o(n.x, n.y, i, a, t, r), [e];
306
307
  }
307
- function Ue(e) {
308
- Je = e;
308
+ function Ke(e) {
309
+ Ze = e;
309
310
  }
310
- function We(e) {
311
- let { scene: t } = e, r = [], i = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), s = [], c = t.rootLayer.children.find((e) => e.name === Ve);
312
- c.onScale = ({ pixelSize: e }) => Ue(e), R(Ge), w(c);
311
+ function qe(e) {
312
+ let { scene: t } = e, r = [], i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), s = [], c = t.rootLayer.children.find((e) => e.name === We);
313
+ c.onScale = ({ pixelSize: e }) => Ke(e), R(Je), T(c);
313
314
  async function l(e) {
314
315
  let t = [];
315
316
  e.forEach((e) => {
@@ -331,29 +332,29 @@ function We(e) {
331
332
  }), await Promise.all(t);
332
333
  }
333
334
  let u = (e) => {
334
- e.onScale = ({ pixelSize: t }) => He(e, t);
335
+ e.onScale = ({ pixelSize: t }) => Ge(e, t);
335
336
  }, d = (e) => {
336
337
  e.onRoll = ({ roll: t }) => {
337
338
  if (t !== e.bounds.rotation) return e.bounds.rotate(t - e.bounds.rotation, e.bounds), [e];
338
339
  };
339
340
  };
340
341
  function f() {
341
- let e = N.routeStore.markersData.markers;
342
+ let e = P.routeStore.markersData.markers;
342
343
  e.length && (s = [], e.forEach((e) => {
343
344
  var t, n;
344
345
  let r = i.get(e.icon);
345
346
  if (!r) return;
346
347
  let c = r.scale || window.devicePixelRatio, l = e.icon;
347
- if (!o.has(l)) {
348
+ if (!a.has(l)) {
348
349
  let e = L(r.img, r.width, r.height, c);
349
- o.set(l, e);
350
+ a.set(l, e);
350
351
  }
351
- let u = o.get(l), d = i.get(e.selectedIcon), f = e.selectedIcon;
352
- if (!o.has(f)) {
352
+ let u = a.get(l), d = i.get(e.selectedIcon), f = e.selectedIcon;
353
+ if (!a.has(f)) {
353
354
  let e = L(d.img, d.width, d.height, c);
354
- o.set(f, e);
355
+ a.set(f, e);
355
356
  }
356
- let p = o.get(f), m = (t = (n = A.findLayer(e.z)) == null ? void 0 : n.visible) == null || t, g = a(e.x, e.y, u.width, u.height, 1, 0), _ = a(e.x, e.y, p.width, p.height, 1, 0), v;
357
+ let p = a.get(f), m = (t = (n = j.findLayer(e.z)) == null ? void 0 : n.visible) == null || t, h = o(e.x, e.y, u.width, u.height, 1, 0), _ = o(e.x, e.y, p.width, p.height, 1, 0), v;
357
358
  switch (e.position) {
358
359
  case "lefttop":
359
360
  v = [0, 0];
@@ -367,18 +368,18 @@ function We(e) {
367
368
  default: v = [.5, .5];
368
369
  }
369
370
  let y = {
370
- ...h(u, g, {
371
+ ...g(u, h, {
371
372
  hidden: !m,
372
373
  origin: v
373
374
  }),
374
375
  id: e.id,
375
376
  scale: c
376
377
  }, b = {
377
- ...h(p, _, {
378
+ ...g(p, _, {
378
379
  hidden: !(m && e.active),
379
380
  origin: v
380
381
  }),
381
- id: `${e.id}${Be}`,
382
+ id: `${e.id}${Ue}`,
382
383
  scale: c
383
384
  };
384
385
  s.push(y, b);
@@ -390,46 +391,46 @@ function We(e) {
390
391
  c.children = [], s = [];
391
392
  }
392
393
  function m() {
393
- let e = N.routeStore.markersData.markers;
394
+ let e = P.routeStore.markersData.markers;
394
395
  e.length && e.forEach((e) => {
395
396
  var t, n;
396
- let r = s.find((t) => t.id === e.id), i = s.find((t) => t.id === `${e.id}${Be}`);
397
+ let r = s.find((t) => t.id === e.id), i = s.find((t) => t.id === `${e.id}${Ue}`);
397
398
  if (!r) return;
398
- let a = (t = (n = A.findLayer(e.z)) == null ? void 0 : n.visible) == null || t;
399
+ let a = (t = (n = j.findLayer(e.z)) == null ? void 0 : n.visible) == null || t;
399
400
  e.active ? (r.hidden = !0, i.hidden = !(a && e.active)) : (r.hidden = !a, i.hidden = !0);
400
401
  });
401
402
  }
402
- return r.push(n(() => [N.routeStore.selectedMarkers, N.layerStore.visible], () => {
403
- if (!N.routeStore.markersData.markers.length) {
404
- p(), w(c);
403
+ return r.push(n(() => [P.routeStore.selectedMarkers, P.layerStore.visible], () => {
404
+ if (!P.routeStore.markersData.markers.length) {
405
+ p(), T(c);
405
406
  return;
406
407
  }
407
- m(), w(...s);
408
- })), r.push(n(() => N.routeStore.markersData.markers, () => {
409
- l(N.routeStore.markersData.icons).then(() => {
410
- f(), w(c);
408
+ m(), T(...s);
409
+ })), r.push(n(() => P.routeStore.markersData.markers, () => {
410
+ l(P.routeStore.markersData.icons).then(() => {
411
+ f(), T(c);
411
412
  });
412
413
  }, { fireImmediately: !0 })), function() {
413
- r.forEach((e) => e()), r.length = 0, c.onScale = void 0, R(), w(c);
414
+ r.forEach((e) => e()), r.length = 0, c.onScale = void 0, R(), T(c);
414
415
  };
415
416
  }
416
- function Ge(e, t) {
417
- return Ke(e, t, Je);
417
+ function Je(e, t) {
418
+ return Ye(e, t, Ze);
418
419
  }
419
- function Ke(e, t, n) {
420
- for (let r of N.routeStore.markersData.markers) {
421
- let i = N.routeStore.markersData.icons.find((e) => e.name === r.icon);
420
+ function Ye(e, t, n) {
421
+ for (let r of P.routeStore.markersData.markers) {
422
+ let i = P.routeStore.markersData.icons.find((e) => e.name === r.icon);
422
423
  if (!i) continue;
423
424
  let a = i.width * n * devicePixelRatio, o = i.height * n * devicePixelRatio;
424
- if (qe(e, t, r.x, r.y, a, o)) {
425
- let e = N.layerStore.findLayer(r.z);
425
+ if (Xe(e, t, r.x, r.y, a, o)) {
426
+ let e = P.layerStore.findLayer(r.z);
426
427
  if (!e || e && e.visible) return r;
427
428
  }
428
429
  }
429
430
  return null;
430
431
  }
431
- function qe(e, t, n, r, i, a) {
432
- return ae.fromCenter({
432
+ function Xe(e, t, n, r, i, a) {
433
+ return oe.fromCenter({
433
434
  x: n,
434
435
  y: r
435
436
  }, {
@@ -440,20 +441,20 @@ function qe(e, t, n, r, i, a) {
440
441
  y: t
441
442
  });
442
443
  }
443
- var Je = 1;
444
+ var Ze = 1;
444
445
  //#endregion
445
446
  //#region src/components/Map/drawing/config/config-all.ts
446
- function Ye() {
447
- let { defaultLayer: e } = N.layerStore, { layers: t } = N.layerStore;
447
+ function Qe() {
448
+ let { defaultLayer: e } = P.layerStore, { layers: t } = P.layerStore;
448
449
  if (e) {
449
450
  let n = [...t], r = t.indexOf(e);
450
451
  n.splice(r, 1), t = [e, ...n];
451
452
  }
452
- let n = t.filter((e) => !e.rootParent).map((e) => M(e));
453
+ let n = t.filter((e) => !e.rootParent).map((e) => N(e));
453
454
  return Promise.all(n).then((e) => {
454
- let t = _(I, [], { dim: 0 }), n = _(o, [], { dim: 0 }), r = _(Ve, []), i = _(v, [], { dim: 0 }), a = _(ie, [], { dim: 0 }), s = _(x, [], { dim: 0 }), c = [], l = [];
455
- for (let t of e.flat()) P(t.name) ? (t.dim = 0, l.push(t)) : c.push(t);
456
- let { layer: u, cleanup: d } = ze("root", N.boothStore.booths);
455
+ let t = v(re, [], { dim: 0 }), n = v(s, [], { dim: 0 }), r = v(We, []), i = v(y, [], { dim: 0 }), a = v(ae, [], { dim: 0 }), o = v(S, [], { dim: 0 }), c = [], l = [];
456
+ for (let t of e.flat()) F(t.name) ? (t.dim = 0, l.push(t)) : c.push(t);
457
+ let { layer: u, cleanup: d } = He("root", P.boothStore.booths);
457
458
  return {
458
459
  layers: [
459
460
  ...c,
@@ -465,24 +466,52 @@ function Ye() {
465
466
  n,
466
467
  a,
467
468
  t,
468
- s
469
+ o
469
470
  ],
470
471
  cleanup: d
471
472
  };
472
473
  });
473
474
  }
474
475
  //#endregion
476
+ //#region src/components/Map/MapCursorCoords.tsx
477
+ var W = /* @__PURE__ */ e(r(), 1), $e = 2;
478
+ function et(e) {
479
+ let { canvas: t } = e, n = C(), r = a(), i = (0, W.useCallback)(() => r("cursor", void 0), [r]), o = (0, W.useEffectEvent)((e) => {
480
+ if (!e.isPrimary) return;
481
+ let t = n.canvasToPlan({
482
+ x: e.offsetX,
483
+ y: e.offsetY
484
+ });
485
+ r("cursor", t ? nt(t, tt()) : void 0);
486
+ });
487
+ return (0, W.useEffect)(() => {
488
+ let e = t.current;
489
+ if (!e) return;
490
+ let n = (e) => o(e), r = () => i();
491
+ return e.addEventListener("pointermove", n), e.addEventListener("pointerleave", r), () => {
492
+ e.removeEventListener("pointermove", n), e.removeEventListener("pointerleave", r);
493
+ };
494
+ }, [t, i]), null;
495
+ }
496
+ function tt() {
497
+ let e = P.layerStore.layers.find((e) => e.visible && (e.mode === le.TurnedOn || e.mode === le.TurnedOff));
498
+ return (e == null ? void 0 : e.name) || null;
499
+ }
500
+ function nt(e, t) {
501
+ let n = `[${e.x.toFixed($e)}, ${e.y.toFixed($e)}]`;
502
+ return t ? `${n} · layer ${t}` : n;
503
+ }
504
+ //#endregion
475
505
  //#region src/components/Map/MapViewport.tsx
476
- var G = /* @__PURE__ */ e(r(), 1);
477
- function Xe() {
478
- let e = S(), t = (0, G.useRef)({ api: e }), [n] = (0, G.useState)(() => de(t));
479
- return (0, G.useLayoutEffect)(() => {
506
+ function rt() {
507
+ let e = C(), t = (0, W.useRef)({ api: e }), [n] = (0, W.useState)(() => pe(t));
508
+ return (0, W.useLayoutEffect)(() => {
480
509
  t.current = { api: e };
481
- }), (0, G.useEffect)(() => (ue(n), () => ue(void 0)), [n]), null;
510
+ }), (0, W.useEffect)(() => (fe(n), () => fe(void 0)), [n]), null;
482
511
  }
483
512
  //#endregion
484
513
  //#region src/components/Map/traffic/UpdateQueue.ts
485
- var Ze = class {
514
+ var it = class {
486
515
  constructor() {
487
516
  this.queue = [], this.isProcessing = !1, this.rafId = null, this.CHUNK_SIZE = 100, this.TIME_BUDGET = 4;
488
517
  }
@@ -524,7 +553,7 @@ var Ze = class {
524
553
  destroy() {
525
554
  this.rafId !== null && (cancelAnimationFrame(this.rafId), this.rafId = null), this.queue = [], this.isProcessing = !1;
526
555
  }
527
- }, K = 49, Qe = `hsl(257, 76%, ${K}%)`, $e = `hsl(339.903, 82%, ${K}%)`, et = `hsl(257, 76%, ${Math.round(K * 1.82)}%)`, q = 4, tt = q, nt = "U", rt = "R", it = "S", at = "P", ot = class {
556
+ }, G = 49, at = `hsl(257, 76%, ${G}%)`, ot = `hsl(339.903, 82%, ${G}%)`, st = `hsl(257, 76%, ${Math.round(G * 1.82)}%)`, K = 4, ct = K, lt = "U", ut = "R", dt = "S", ft = "P", pt = class {
528
557
  constructor() {
529
558
  this._state = [[]], this.index = 0, this.pointHashSet = /* @__PURE__ */ new Set(), this.locked = !1, this.storageKey = "expofp_build_route_state", this._selected = 0;
530
559
  }
@@ -563,10 +592,10 @@ var Ze = class {
563
592
  instruct() {
564
593
  this.log(`How to Build a Route:
565
594
  Add Point: Click on the map.
566
- Apply Smoothing: Press ${rt}.
567
- Apply Simplification: Press ${it}.
568
- Undo: Press ${nt}.
569
- Enable/Disable Preview: Press ${at}.
595
+ Apply Smoothing: Press ${ut}.
596
+ Apply Simplification: Press ${dt}.
597
+ Undo: Press ${lt}.
598
+ Enable/Disable Preview: Press ${ft}.
570
599
  `, 16);
571
600
  }
572
601
  applyChaikinSmoothing(e, t, n) {
@@ -628,7 +657,7 @@ Enable/Disable Preview: Press ${at}.
628
657
  let r = e.x, i = e.y, a = t.x, o = t.y, s = n.x, c = n.y;
629
658
  return Math.abs((c - o) * r - (s - a) * i + s * o - c * a) / (Math.sqrt((c - o) ** 2 + (s - a) ** 2) || 1e-10);
630
659
  }, r = (e, t, n, r) => {
631
- let i = s({
660
+ let i = c({
632
661
  p0: e,
633
662
  p1: t
634
663
  }, {
@@ -666,72 +695,72 @@ Enable/Disable Preview: Press ${at}.
666
695
  this._selected = Math.max(0, Math.min(e, this.points.length - 1));
667
696
  }
668
697
  };
669
- function st({ enabled: e, scene: t }) {
670
- let n = (0, G.useRef)(!1), r = (0, G.useRef)(), i = (0, G.useMemo)(() => T(q, Qe), []), o = (0, G.useMemo)(() => T(q, $e), []), s = (0, G.useMemo)(() => new ot(), []), l = (0, G.useRef)(new Ze()), u = (0, G.useMemo)(() => {
698
+ function mt({ enabled: e, scene: t }) {
699
+ let n = (0, W.useRef)(!1), r = (0, W.useRef)(), i = (0, W.useMemo)(() => E(K, at), []), a = (0, W.useMemo)(() => E(K, ot), []), s = (0, W.useMemo)(() => new pt(), []), c = (0, W.useRef)(new it()), u = (0, W.useMemo)(() => {
671
700
  if (!t) return {};
672
701
  let e = t.rootLayer.children;
673
702
  return {
674
703
  linesLayer: e.find((e) => e.name === me),
675
704
  pointsLayer: e.find((e) => e.name === he)
676
705
  };
677
- }, [t]), d = (0, G.useCallback)(() => {
678
- if (!u || !i || !o) return;
706
+ }, [t]), d = (0, W.useCallback)(() => {
707
+ if (!u || !i || !a) return;
679
708
  let { linesLayer: e, pointsLayer: t } = u;
680
709
  if (!e || !t) return;
681
- let c = s.points, d = n.current;
682
- d ? t.children.length = 0 : t.children = c.map(({ x: e, y: t }, n) => {
683
- let c = n == s.selected ? o : i;
710
+ let l = s.points, d = n.current;
711
+ d ? t.children.length = 0 : t.children = l.map(({ x: e, y: t }, n) => {
712
+ let c = n == s.selected ? a : i;
684
713
  return {
685
714
  source: c,
686
- bounds: a(e, t, c.width, c.height, r.current)
715
+ bounds: o(e, t, c.width, c.height, r.current)
687
716
  };
688
717
  });
689
718
  let f = [];
690
- for (let e = 1; e < c.length; e++) {
691
- let t = c[e - 1], n = c[e];
719
+ for (let e = 1; e < l.length; e++) {
720
+ let t = l[e - 1], n = l[e];
692
721
  f.push({
693
722
  points: {
694
723
  p0: t,
695
724
  p1: n
696
725
  },
697
- color: d ? Qe : et,
698
- width: tt
726
+ color: d ? at : st,
727
+ width: ct
699
728
  });
700
729
  }
701
- f.length ? e.children = f : e.children.length = 0, l.current.add(() => w(t, e)), s.instruct(), s.log(JSON.stringify(s.points));
730
+ f.length ? e.children = f : e.children.length = 0, c.current.add(() => T(t, e)), s.instruct(), s.log(JSON.stringify(s.points));
702
731
  }, [
703
732
  s,
704
733
  u,
705
734
  i,
706
- o
707
- ]), f = (0, G.useCallback)((e) => {
735
+ a
736
+ ]), f = (0, W.useCallback)((e) => {
708
737
  let t = e.key.toUpperCase();
709
738
  s.execute(() => {
710
739
  switch (t) {
711
- case nt:
740
+ case lt:
712
741
  e.preventDefault(), s.undo(), n.current = !1, d();
713
742
  break;
714
- case rt:
743
+ case ut:
715
744
  e.preventDefault(), s.applySmoothing(), n.current = !1, d();
716
745
  break;
717
- case it:
746
+ case dt:
718
747
  e.preventDefault(), s.applySimplification(), n.current = !1, d();
719
748
  break;
720
- case at:
749
+ case ft:
721
750
  e.preventDefault(), n.current = !n.current, d();
722
751
  break;
723
752
  }
724
753
  });
725
- }, [s, d]), p = (0, G.useCallback)((e) => {
754
+ }, [s, d]), p = (0, W.useCallback)((e) => {
726
755
  r.current = e;
727
756
  let { pointsLayer: t } = u;
728
757
  if (!t) return [];
729
758
  let n = [];
730
759
  return s.execute(() => {
731
760
  let e = t.children;
732
- for (let t of e) t.bounds = a(t.bounds.center.x, t.bounds.center.y, t.source.width, t.source.height, r.current), n.push(t);
761
+ for (let t of e) t.bounds = o(t.bounds.center.x, t.bounds.center.y, t.source.width, t.source.height, r.current), n.push(t);
733
762
  }), n;
734
- }, [u, s]), m = (0, G.useCallback)((e) => {
763
+ }, [u, s]), m = (0, W.useCallback)((e) => {
735
764
  s.execute(() => {
736
765
  s.add({
737
766
  x: e.x,
@@ -739,14 +768,14 @@ function st({ enabled: e, scene: t }) {
739
768
  }), s.select(s.points.length - 1), d();
740
769
  });
741
770
  }, [s, d]);
742
- (0, G.useEffect)(() => {
771
+ (0, W.useEffect)(() => {
743
772
  var t, n;
744
773
  if (!e || !(u != null && u.pointsLayer)) return;
745
774
  let { pointsLayer: i } = u;
746
- return r.current = (t = (n = O()) == null ? void 0 : n.state().pixelSize) == null ? 1 : t, s.execute(() => {
775
+ return r.current = (t = (n = k()) == null ? void 0 : n.state().pixelSize) == null ? 1 : t, s.execute(() => {
747
776
  s.restore(), d();
748
- }), i.onScale = ({ pixelSize: e }) => p(e), l.current.add(() => w(i)), c(m), window.addEventListener("keyup", f), () => {
749
- window.removeEventListener("keyup", f), c(), i.onScale = void 0, l.current.destroy();
777
+ }), i.onScale = ({ pixelSize: e }) => p(e), c.current.add(() => T(i)), l(m), window.addEventListener("keyup", f), () => {
778
+ window.removeEventListener("keyup", f), l(), i.onScale = void 0, c.current.destroy();
750
779
  };
751
780
  }, [
752
781
  e,
@@ -760,40 +789,40 @@ function st({ enabled: e, scene: t }) {
760
789
  }
761
790
  //#endregion
762
791
  //#region src/components/Map/traffic/useManageTraffic.ts
763
- var J = 2, ct = J * 3.5, Y = J * 12, lt = Y * .7, ut = 8, dt = "transport_locations", ft = 150, pt = "#a4aab6", mt = 1e3, ht = 2e4, gt = 500;
764
- function _t({ permission: e, scene: n, dataJsonUrl: r, websocketUrl: o }) {
765
- let s = (0, G.useRef)(window.devicePixelRatio), c = (0, G.useRef)(/* @__PURE__ */ new Map()), l = (0, G.useRef)(/* @__PURE__ */ new Map()), u = (0, G.useRef)(null), d = (0, G.useRef)(null), f = (0, G.useRef)(0), p = (0, G.useRef)(1), m = (0, G.useRef)(new Ze()), h = (0, G.useRef)(/* @__PURE__ */ new Map()), g = (0, G.useRef)(mt), _ = (0, G.useRef)(/* @__PURE__ */ new Map()), v = (0, G.useRef)(void 0);
766
- (0, G.useEffect)(() => {
792
+ var q = 2, ht = q * 3.5, J = q * 12, gt = J * .7, _t = 8, vt = "transport_locations", yt = 150, bt = "#a4aab6", xt = 1e3, St = 2e4, Ct = 500;
793
+ function wt({ permission: e, scene: n, dataJsonUrl: r, websocketUrl: a }) {
794
+ let s = (0, W.useRef)(window.devicePixelRatio), c = (0, W.useRef)(/* @__PURE__ */ new Map()), l = (0, W.useRef)(/* @__PURE__ */ new Map()), u = (0, W.useRef)(null), d = (0, W.useRef)(null), f = (0, W.useRef)(0), p = (0, W.useRef)(1), m = (0, W.useRef)(new it()), h = (0, W.useRef)(/* @__PURE__ */ new Map()), g = (0, W.useRef)(xt), _ = (0, W.useRef)(/* @__PURE__ */ new Map()), v = (0, W.useRef)(void 0);
795
+ (0, W.useEffect)(() => {
767
796
  if (!e || !n) return;
768
- let y = !1, b, x = n.rootLayer.children, S = l.current, C = c.current, T = m.current;
797
+ let y = !1, b, x = n.rootLayer.children, S = l.current, C = c.current, w = m.current;
769
798
  async function E() {
770
799
  try {
771
800
  var e, n;
772
- let o;
801
+ let a;
773
802
  try {
774
803
  let e = await fetch(r, {
775
804
  method: "GET",
776
805
  headers: { "Content-Type": "application/json" }
777
806
  });
778
807
  if (!e.ok || e.status === 204) return;
779
- o = await e.json();
808
+ a = await e.json();
780
809
  } catch (e) {
781
810
  console.warn("useManageTraffic failed to get JSON", e);
782
811
  }
783
- if (!o || o.disabled || o.error) return;
784
- s.current = vt((e = (n = O()) == null ? void 0 : n.state().pixelSize) == null ? window.devicePixelRatio : e);
785
- let l = new Map(o.routes.map(({ id: e, color: t }) => [e, t])), u = /* @__PURE__ */ new Map();
812
+ if (!a || a.disabled || a.error) return;
813
+ s.current = Tt((e = (n = k()) == null ? void 0 : n.state().pixelSize) == null ? window.devicePixelRatio : e);
814
+ let l = new Map(a.routes.map(({ id: e, color: t }) => [e, t])), u = /* @__PURE__ */ new Map();
786
815
  l.forEach((e) => {
787
- u.set(e, bt({
788
- radius: ct,
816
+ u.set(e, Dt({
817
+ radius: ht,
789
818
  color: e,
790
819
  scale: window.devicePixelRatio
791
820
  }));
792
821
  });
793
822
  let m = be(), g = x.filter((e) => m.test(e.name)), v = xe(), y = x.filter((e) => v.test(e.name));
794
- o.routes.slice(0, g.length).forEach(({ id: e, color: t, path: n, stops: r, hiddenPoints: i }, o) => {
823
+ a.routes.slice(0, g.length).forEach(({ id: e, color: t, path: n, stops: r, hiddenPoints: i }, a) => {
795
824
  h.current.set(e, n);
796
- let c = g[o];
825
+ let c = g[a];
797
826
  if (c) {
798
827
  var l;
799
828
  let e = new Map((l = i == null ? void 0 : i.map((e) => [$(e), e])) == null ? [] : l);
@@ -805,52 +834,52 @@ function _t({ permission: e, scene: n, dataJsonUrl: r, websocketUrl: o }) {
805
834
  p1: a
806
835
  },
807
836
  color: t,
808
- width: J
837
+ width: q
809
838
  });
810
839
  }
811
- c.children.length && T.add(() => w(c));
840
+ c.children.length && w.add(() => T(c));
812
841
  }
813
- let d = y[o], f = u.get(t);
842
+ let d = y[a], f = u.get(t);
814
843
  d && f && r != null && r.length && (r.forEach((e) => {
815
844
  d.children.push({
816
845
  source: f,
817
- bounds: a(e.x, e.y, f.width, f.height, s.current)
846
+ bounds: o(e.x, e.y, f.width, f.height, s.current)
818
847
  });
819
- }), d.children.length && T.add(() => w(d)));
848
+ }), d.children.length && w.add(() => T(d)));
820
849
  });
821
- let b = x.find((e) => e.name === z);
850
+ let b = x.find((e) => e.name === V);
822
851
  if (!b) {
823
- console.warn(`useManageTraffic: the scene has no "${z}" layer`);
852
+ console.warn(`useManageTraffic: the scene has no "${V}" layer`);
824
853
  return;
825
854
  }
826
855
  let E = /* @__PURE__ */ new Map();
827
856
  b.onScale = ({ pixelSize: e }) => {
828
- s.current = vt(e);
857
+ s.current = Tt(e);
829
858
  let t = [];
830
859
  for (let e of y) {
831
860
  let n = e.children;
832
- for (let e of n) e.bounds = a(e.bounds.center.x, e.bounds.center.y, e.source.width, e.source.height, s.current, e.bounds.rotation), t.push(e);
861
+ for (let e of n) e.bounds = o(e.bounds.center.x, e.bounds.center.y, e.source.width, e.source.height, s.current, e.bounds.rotation), t.push(e);
833
862
  }
834
- for (let e of c.current.values()) e.bounds = a(e.bounds.center.x, e.bounds.center.y, e.source.width, e.source.height, s.current, e.bounds.rotation), t.push(e);
863
+ for (let e of c.current.values()) e.bounds = o(e.bounds.center.x, e.bounds.center.y, e.source.width, e.source.height, s.current, e.bounds.rotation), t.push(e);
835
864
  return t;
836
- }, T.add(() => w(b)), l.forEach((e, t) => {
837
- E.set(t, xt({
865
+ }, w.add(() => T(b)), l.forEach((e, t) => {
866
+ E.set(t, Ot({
838
867
  id: t,
839
- width: Y,
840
- height: Y,
868
+ width: J,
869
+ height: J,
841
870
  color: e,
842
871
  scale: window.devicePixelRatio
843
872
  }));
844
873
  });
845
- let te = xt({
874
+ let te = Ot({
846
875
  id: "orphan",
847
- width: Y,
848
- height: Y,
849
- color: pt,
876
+ width: J,
877
+ height: J,
878
+ color: bt,
850
879
  scale: window.devicePixelRatio
851
880
  }), A = null;
852
881
  try {
853
- A = L(await i(`${t}icons/bus-white.svg`), lt, lt, window.devicePixelRatio);
882
+ A = L(await i(`${t}icons/bus-white.svg`), gt, gt, window.devicePixelRatio);
854
883
  } catch (e) {
855
884
  console.error(e);
856
885
  }
@@ -858,57 +887,57 @@ function _t({ permission: e, scene: n, dataJsonUrl: r, websocketUrl: o }) {
858
887
  try {
859
888
  var t;
860
889
  let n = JSON.parse(e.data);
861
- if (n.type !== dt) return;
890
+ if (n.type !== vt) return;
862
891
  let r = e.timeStamp || performance.now();
863
892
  p.current = Math.round(r - f.current), f.current = r;
864
- let i = Math.max((t = p.current) == null ? gt : t, gt), o = b.children, c = !1;
893
+ let i = Math.max((t = p.current) == null ? Ct : t, Ct), a = b.children, c = !1;
865
894
  n.data.forEach(({ id: e, x: t, y: n, route_id: r, hidden: l }) => {
866
895
  var u;
867
896
  if (S.has(e)) {
868
897
  var d;
869
898
  (d = S.get(e)) == null || d(), S.delete(e);
870
899
  }
871
- let f = C.get(e), p = (u = C.get(Z(e))) == null ? null : u;
900
+ let f = C.get(e), p = (u = C.get(X(e))) == null ? null : u;
872
901
  if (l && f && p) {
873
- f.hidden = !0, p.hidden = !0, T.add(() => w(f, p));
902
+ f.hidden = !0, p.hidden = !0, w.add(() => T(f, p));
874
903
  return;
875
904
  }
876
905
  if (_.current.set(e, performance.now()), !f) {
877
906
  var m;
878
907
  let i = (m = E.get(r)) == null ? te : m, l = {
879
908
  source: i,
880
- bounds: a(t, n, i.width, i.height, s.current, 0)
909
+ bounds: o(t, n, i.width, i.height, s.current, 0)
881
910
  };
882
911
  if (C.set(e, l), A) {
883
- let r = Z(e), i = {
912
+ let r = X(e), i = {
884
913
  source: A,
885
- bounds: a(t, n, A.width, A.height, s.current, 0)
914
+ bounds: o(t, n, A.width, A.height, s.current, 0)
886
915
  };
887
- A.setAttribute("id", r), C.set(r, i), o.push(l, i);
888
- } else o.push(l);
916
+ A.setAttribute("id", r), C.set(r, i), a.push(l, i);
917
+ } else a.push(l);
889
918
  c = !0;
890
919
  return;
891
920
  }
892
- let g = f.bounds.center, v = Tt(g, {
921
+ let g = f.bounds.center, v = jt(g, {
893
922
  x: t,
894
923
  y: n
895
924
  }, h.current.get(r));
896
- if (v.reduce((e, t, n) => n === 0 ? e : e + X(v[n - 1], t), 0) >= ft || document.hidden) St({
897
- updateQueue: T,
925
+ if (v.reduce((e, t, n) => n === 0 ? e : e + Y(v[n - 1], t), 0) >= yt || document.hidden) Z({
926
+ updateQueue: w,
898
927
  vehicle: f,
899
928
  vehicleFinery: p,
900
929
  x: t,
901
930
  y: n,
902
931
  scale: s.current,
903
- angle: yt(f.bounds.center, {
932
+ angle: Et(f.bounds.center, {
904
933
  x: t,
905
934
  y: n
906
935
  })
907
936
  });
908
937
  else {
909
- let t = Et(v, i, (e) => {
910
- St({
911
- updateQueue: T,
938
+ let t = Mt(v, i, (e) => {
939
+ Z({
940
+ updateQueue: w,
912
941
  vehicle: f,
913
942
  vehicleFinery: p,
914
943
  x: e.x,
@@ -919,11 +948,11 @@ function _t({ permission: e, scene: n, dataJsonUrl: r, websocketUrl: o }) {
919
948
  });
920
949
  S.set(e, t);
921
950
  }
922
- }), c && T.add(() => w(b));
951
+ }), c && w.add(() => T(b));
923
952
  } catch (e) {
924
953
  console.error("handleSocketMessage", e);
925
954
  }
926
- }, f.current = performance.now(), D(), window.addEventListener("online", k), ee(o.config ? (Number(o.config.vehicle_inactive_interval) || 20) * 1e3 : ht);
955
+ }, f.current = performance.now(), D(), window.addEventListener("online", O), ee(a.config ? (Number(a.config.vehicle_inactive_interval) || 20) * 1e3 : St);
927
956
  } catch (e) {
928
957
  console.warn(e);
929
958
  }
@@ -931,13 +960,13 @@ function _t({ permission: e, scene: n, dataJsonUrl: r, websocketUrl: o }) {
931
960
  E();
932
961
  function D() {
933
962
  var e, t;
934
- y || ((e = u.current) == null ? void 0 : e.readyState) === WebSocket.OPEN || ((t = u.current) == null ? void 0 : t.readyState) === WebSocket.CONNECTING || (u.current = new WebSocket(o), u.current.onmessage = d.current, u.current.onopen = () => {
935
- g.current = mt;
963
+ y || ((e = u.current) == null ? void 0 : e.readyState) === WebSocket.OPEN || ((t = u.current) == null ? void 0 : t.readyState) === WebSocket.CONNECTING || (u.current = new WebSocket(a), u.current.onmessage = d.current, u.current.onopen = () => {
964
+ g.current = xt;
936
965
  }, u.current.onclose = () => {
937
966
  y || !navigator.onLine || (b = window.setTimeout(D, g.current), g.current = Math.min(g.current * 2, 3e4));
938
967
  });
939
968
  }
940
- function k() {
969
+ function O() {
941
970
  D();
942
971
  }
943
972
  function ee(e) {
@@ -947,37 +976,37 @@ function _t({ permission: e, scene: n, dataJsonUrl: r, websocketUrl: o }) {
947
976
  if (t - i < e) return;
948
977
  let o = C.get(a);
949
978
  o && (o.hidden = !0, r.push(o), n.push(a));
950
- let s = Z(a), c = C.get(s);
979
+ let s = X(a), c = C.get(s);
951
980
  c && (c.hidden = !0, r.push(c), n.push(s));
952
- }), r.length && T.add(() => w(...r)), n.forEach((e) => _.current.delete(e));
981
+ }), r.length && w.add(() => T(...r)), n.forEach((e) => _.current.delete(e));
953
982
  }, e);
954
983
  }
955
984
  return () => {
956
985
  var e;
957
986
  y = !0, clearTimeout(b), (e = u.current) == null || e.close(), u.current = null;
958
- let t = x.find((e) => e.name === z);
959
- t && (t.onScale = void 0), S.forEach((e) => e == null ? void 0 : e()), S.clear(), C.clear(), T.destroy(), window.removeEventListener("online", k), clearInterval(v.current);
987
+ let t = x.find((e) => e.name === V);
988
+ t && (t.onScale = void 0), S.forEach((e) => e == null ? void 0 : e()), S.clear(), C.clear(), w.destroy(), window.removeEventListener("online", O), clearInterval(v.current);
960
989
  };
961
990
  }, [
962
991
  e,
963
992
  n,
964
993
  r,
965
- o
994
+ a
966
995
  ]);
967
996
  }
968
- function vt(e) {
969
- return Math.min(e || window.devicePixelRatio, ut);
997
+ function Tt(e) {
998
+ return Math.min(e || window.devicePixelRatio, _t);
970
999
  }
971
- function yt(e, t) {
972
- return d(e, t);
1000
+ function Et(e, t) {
1001
+ return f(e, t);
973
1002
  }
974
- function bt({ radius: e, scale: t, color: n }) {
1003
+ function Dt({ radius: e, scale: t, color: n }) {
975
1004
  let r = document.createElement("canvas"), i = r.getContext("2d");
976
1005
  i.imageSmoothingEnabled = !1;
977
1006
  let a = Math.ceil(e * 2 * t), o = a / 2, s = e * .78, c = e * .33;
978
1007
  return r.width = a, r.height = a, i.translate(o, o), i.scale(t, t), i.beginPath(), i.arc(0, 0, e, 0, 2 * Math.PI), i.fillStyle = "#FFFFFF", i.fill(), i.beginPath(), i.arc(0, 0, s, 0, 2 * Math.PI), i.fillStyle = n, i.fill(), i.beginPath(), i.arc(0, 0, c, 0, 2 * Math.PI), i.fillStyle = "#FFFFFF", i.fill(), r;
979
1008
  }
980
- function xt({ id: e, width: t, height: n, color: r, scale: i }) {
1009
+ function Ot({ id: e, width: t, height: n, color: r, scale: i }) {
981
1010
  let a = 2 * i, o = t / 2 * i, s = n * i, c = .01, l = s * .6, u = s, d = 8 * i, f = u + a + l / 2 + d * 2, p = o * 2 + l + a + d * 2, m = document.createElement("canvas");
982
1011
  m.setAttribute("id", e), m.width = f, m.height = p;
983
1012
  let h = m.getContext("2d"), g = f / 2, _ = p / 2;
@@ -985,18 +1014,18 @@ function xt({ id: e, width: t, height: n, color: r, scale: i }) {
985
1014
  let v = g, y = _ - u / 2 + o, b = y + l;
986
1015
  return h.shadowColor = "rgba(16, 24, 40, 0.2)", h.shadowBlur = d / 2, h.beginPath(), h.arc(v, y, o, Math.PI, 0, !1), h.bezierCurveTo(v + o, y + s * .3, v + c * o, b, v, b), h.bezierCurveTo(v - c * o, b, v - o, y + s * .3, v - o, y), h.closePath(), h.fillStyle = r, h.fill(), h.strokeStyle = "#FFFFFF", h.lineWidth = a, h.stroke(), h.restore(), m;
987
1016
  }
988
- function X(e, t) {
989
- return b(e, t);
1017
+ function Y(e, t) {
1018
+ return x(e, t);
990
1019
  }
991
- function Z(e) {
1020
+ function X(e) {
992
1021
  return `${e}_finery`;
993
1022
  }
994
- function St({ updateQueue: e, vehicle: t, vehicleFinery: n, x: r, y: i, scale: o, angle: s }) {
995
- if (t.bounds = a(r, i, t.source.width, t.source.height, o, s), t.hidden = !1, n) {
1023
+ function Z({ updateQueue: e, vehicle: t, vehicleFinery: n, x: r, y: i, scale: a, angle: s }) {
1024
+ if (t.bounds = o(r, i, t.source.width, t.source.height, a, s), t.hidden = !1, n) {
996
1025
  var c, l;
997
- let s = (c = (l = O()) == null ? void 0 : l.state().roll) == null ? 0 : c;
998
- n.bounds = a(r, i, n.source.width, n.source.height, o, m(s)), n.hidden = !1, e.add(() => w(n, t));
999
- } else e.add(() => w(t));
1026
+ let s = (c = (l = k()) == null ? void 0 : l.state().roll) == null ? 0 : c;
1027
+ n.bounds = o(r, i, n.source.width, n.source.height, a, h(s)), n.hidden = !1, e.add(() => T(n, t));
1028
+ } else e.add(() => T(t));
1000
1029
  }
1001
1030
  function Q(e, t, n) {
1002
1031
  return {
@@ -1004,13 +1033,13 @@ function Q(e, t, n) {
1004
1033
  y: e.y + (t.y - e.y) * n
1005
1034
  };
1006
1035
  }
1007
- function Ct(e, t) {
1036
+ function kt(e, t) {
1008
1037
  let n = Infinity, r = {
1009
1038
  index: 0,
1010
1039
  t: 0
1011
1040
  };
1012
1041
  for (let i = 0; i < t.length - 1; i++) {
1013
- let a = t[i], o = t[i + 1], s = o.x - a.x, c = o.y - a.y, l = s * s + c * c, u = l ? ((e.x - a.x) * s + (e.y - a.y) * c) / l : 0, d = Math.max(0, Math.min(1, u)), f = X(e, Q(a, o, d));
1042
+ let a = t[i], o = t[i + 1], s = o.x - a.x, c = o.y - a.y, l = s * s + c * c, u = l ? ((e.x - a.x) * s + (e.y - a.y) * c) / l : 0, d = Math.max(0, Math.min(1, u)), f = Y(e, Q(a, o, d));
1014
1043
  f < n && (n = f, r = {
1015
1044
  index: i,
1016
1045
  t: d
@@ -1018,39 +1047,39 @@ function Ct(e, t) {
1018
1047
  }
1019
1048
  return r;
1020
1049
  }
1021
- function wt(e, t, n) {
1022
- let r = X(e, t), i = Math.max(2, Math.ceil(r / n) + 1), a = [];
1050
+ function At(e, t, n) {
1051
+ let r = Y(e, t), i = Math.max(2, Math.ceil(r / n) + 1), a = [];
1023
1052
  for (let n = 0; n < i; n++) {
1024
1053
  let r = Q(e, t, n / (i - 1));
1025
1054
  a.push(r);
1026
1055
  }
1027
1056
  return a;
1028
1057
  }
1029
- function Tt(e, t, n) {
1030
- if (!n || !n.length) return wt(e, t, 10);
1031
- let r = Ct(e, n), i = Ct(t, n), a = [], o = (e) => a.push(e);
1058
+ function jt(e, t, n) {
1059
+ if (!n || !n.length) return At(e, t, 10);
1060
+ let r = kt(e, n), i = kt(t, n), a = [], o = (e) => a.push(e);
1032
1061
  r.index + 1 < n.length ? o(Q(n[r.index], n[r.index + 1], r.t)) : o(n[r.index]);
1033
1062
  for (let e = r.index + 1; e <= i.index && e < n.length; e++) o(n[e]);
1034
1063
  return i.index + 1 < n.length ? o(Q(n[i.index], n[i.index + 1], i.t)) : o(n[i.index]), a;
1035
1064
  }
1036
- function Et(e, t, n, r) {
1065
+ function Mt(e, t, n, r) {
1037
1066
  if (e.length < 2) return () => {};
1038
1067
  let i = null, a, o = [], s = 0;
1039
1068
  for (let t = 0; t < e.length - 1; t++) {
1040
- let n = b(e[t], e[t + 1]);
1069
+ let n = x(e[t], e[t + 1]);
1041
1070
  o.push(n), s += n;
1042
1071
  }
1043
1072
  let c = (l) => {
1044
1073
  i || (i = l);
1045
- let u = l - i, f = Math.min(u / t, 1), p = f * s, m = 0, h = 0;
1074
+ let u = l - i, d = Math.min(u / t, 1), p = d * s, m = 0, h = 0;
1046
1075
  for (; h < o.length && m + o[h] < p;) m += o[h], h++;
1047
1076
  h >= o.length && (h = o.length - 1);
1048
1077
  let g = e[h], _ = e[Math.min(h + 1, e.length - 1)], v = o[h] || 0, y = v === 0 ? 0 : (p - m) / v;
1049
1078
  n({
1050
1079
  x: g.x + (_.x - g.x) * y,
1051
1080
  y: g.y + (_.y - g.y) * y,
1052
- angle: d(g, _)
1053
- }), f < 1 ? a = requestAnimationFrame(c) : r && r();
1081
+ angle: f(g, _)
1082
+ }), d < 1 ? a = requestAnimationFrame(c) : r && r();
1054
1083
  };
1055
1084
  return a = requestAnimationFrame(c), () => {
1056
1085
  a && cancelAnimationFrame(a);
@@ -1061,11 +1090,11 @@ function $(e) {
1061
1090
  }
1062
1091
  //#endregion
1063
1092
  //#region src/utils/dimming.ts
1064
- var Dt = .5, Ot = "cubic";
1065
- function kt(e, t) {
1093
+ var Nt = .5, Pt = "cubic";
1094
+ function Ft(e, t) {
1066
1095
  return !e || e.rootLayer.dim === t ? !1 : (e.rootLayer.dim = t, !0);
1067
1096
  }
1068
- function At(e, t = 300, n = Ot) {
1097
+ function It(e, t = 300, n = Pt) {
1069
1098
  let r = null, i = 0, a = 0, o = 0, s = 0, c = Math.max(t, 0);
1070
1099
  function l() {
1071
1100
  r === null || typeof cancelAnimationFrame != "function" || (cancelAnimationFrame(r), r = null);
@@ -1074,7 +1103,7 @@ function At(e, t = 300, n = Ot) {
1074
1103
  l(), i = t, e(i);
1075
1104
  }
1076
1105
  function d(t) {
1077
- let l = t - s, u = Math.min(l / c, 1), f = jt(u, n);
1106
+ let l = t - s, u = Math.min(l / c, 1), f = Lt(u, n);
1078
1107
  if (i = a + (o - a) * f, e(i), u < 1) {
1079
1108
  r = requestAnimationFrame(d);
1080
1109
  return;
@@ -1100,11 +1129,11 @@ function At(e, t = 300, n = Ot) {
1100
1129
  }
1101
1130
  };
1102
1131
  }
1103
- function jt(e, t) {
1104
- return t === "linear" ? e : Mt(e);
1132
+ function Lt(e, t) {
1133
+ return t === "linear" ? e : Rt(e);
1105
1134
  }
1106
- function Mt(e) {
1135
+ function Rt(e) {
1107
1136
  return e < .5 ? 4 * e * e * e : 1 - (-2 * e + 2) ** 3 / 2;
1108
1137
  }
1109
1138
  //#endregion
1110
- export { st as a, We as c, _t as i, kt as n, Xe as o, At as r, Ye as s, Dt as t };
1139
+ export { mt as a, Qe as c, wt as i, qe as l, Ft as n, rt as o, It as r, et as s, Nt as t };