@expofp/floorplan 3.44.7 → 3.44.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/{Button-CleQDd3q.js → Button-C1iQgU3z.js} +5 -5
- package/dist/browser/{CookieConsent-DBf69NUJ.js → CookieConsent-Dv1LCPG3.js} +7 -7
- package/dist/browser/{Debug-B5dACqLH.js → Debug-DPy0A0cw.js} +7 -7
- package/dist/browser/{DebugTools-CJqVrNUk.js → DebugTools-Dp8d4gPZ.js} +6 -6
- package/dist/browser/{Demo-Bn0xGm2R.js → Demo-CHH4a7sZ.js} +9 -9
- package/dist/browser/{Free-DdJFphUM.js → Free-BidfuRjG.js} +10 -10
- package/dist/browser/{GalleryContainer-Dr3XdE_K.js → GalleryContainer-7IYWWKkK.js} +11 -11
- package/dist/browser/{GpsLoader-x1X6cIIo.js → GpsLoader-CrO61Fpj.js} +13 -13
- package/dist/browser/{KioskStore-DAX0R23S.js → KioskStore-BE_V60tp.js} +9 -9
- package/dist/browser/{LayerStore-CchaypH9.js → LayerStore-BM7GOQ3J.js} +23 -23
- package/dist/browser/{MaplibreAdapter-DTEZ-jxf.js → MaplibreAdapter-DmrCTw3Q.js} +17 -17
- package/dist/browser/{ModalContainer-Cj8s9wg0.js → ModalContainer-DqsSRv60.js} +10 -10
- package/dist/browser/{PermissionNotice-CAMpf8J5.js → PermissionNotice--Vn_MkaQ.js} +6 -6
- package/dist/browser/{RouteStore-BG2GPSXR.js → RouteStore-D7G9YROM.js} +9 -9
- package/dist/browser/{SetKioskMode-B7Dki7mM.js → SetKioskMode-CMndo5d3.js} +11 -11
- package/dist/browser/{ShowKiosk-CrMZ-Nzh.js → ShowKiosk-CUiprdS9.js} +10 -10
- package/dist/browser/{UIState-C-Y4d_-F.js → UIState-D0GHKRf4.js} +13 -13
- package/dist/browser/{ViewerMenuPanel-ByEmJoRl.js → ViewerMenuPanel-B7corw44.js} +10 -10
- package/dist/browser/{add-debug-secret-listener-BGDZfpcC.js → add-debug-secret-listener-uMLIuPW5.js} +1 -1
- package/dist/browser/{adopt-global-settings-Dk05fnXw.js → adopt-global-settings-BVVdz-YX.js} +9 -9
- package/dist/browser/{boolean-editor-o6yCthBy.js → boolean-editor-Dg3cfoLy.js} +9 -9
- package/dist/browser/{bootIntercom-BwnVPXBt.js → bootIntercom-7FTJ0piX.js} +2 -2
- package/dist/browser/bundle.json +85 -85
- package/dist/browser/{camera-events-DWOBiqIB.js → camera-events-DbYubA01.js} +1 -1
- package/dist/browser/{classnames-CZclRloQ.js → classnames-BryLpfgQ.js} +2 -2
- package/dist/browser/{client-BvQ9Gczi.js → client-DnnJr0Ks.js} +5 -5
- package/dist/browser/{components-nLLOu6UV.js → components-DHNMQbqJ.js} +48 -48
- package/dist/browser/{create-live-plan-CWx504lG.js → create-live-plan-BgCjK-Kh.js} +13 -13
- package/dist/browser/{debug-context-D39JjNZt.js → debug-context-BEABO7OL.js} +5 -5
- package/dist/browser/{debug-overlay-m0mSmVHJ.js → debug-overlay-Bv-C1rmT.js} +10 -10
- package/dist/browser/{debug-ui-BnyOgnPt.js → debug-ui-FirQ0EQb.js} +6 -6
- package/dist/browser/{dimming-BUP_9LMs.js → dimming-B7lpw_UN.js} +189 -177
- package/dist/browser/{dist-yVxNF_HZ.js → dist-DN5ATV5p.js} +3 -3
- package/dist/browser/{dist-DLh73aaY.js → dist-p14a9te8.js} +6 -6
- package/dist/browser/{dist-B0uHOfHb.js → dist-sup8YcEL.js} +5 -5
- package/dist/browser/{efp-debug-init-CCymXgr-.js → efp-debug-init-DUPmVtYg.js} +3 -3
- package/dist/browser/{enum-editor-Du2N0dRj.js → enum-editor-g46R4Zq7.js} +4 -4
- package/dist/browser/{es5-l7cNM1JQ.js → es5-D_WEVRPo.js} +2 -2
- package/dist/browser/{event-head-DaeIW6ZC.js → event-head-DBemDpob.js} +1 -1
- package/dist/browser/{event-not-found-CFWIRPAy.js → event-not-found-m_QUX3nl.js} +3 -3
- package/dist/browser/{event-scoped-cache-793HawJt.js → event-scoped-cache-BpjbCC59.js} +2 -2
- package/dist/browser/{expofpUrl-BLqQlx4U.js → expofpUrl-CAOzqFzt.js} +1 -1
- package/dist/browser/{exports-BmgyMAW1.js → exports-svWN4mLB.js} +1 -1
- package/dist/browser/{favicon-BCSYqkNZ.js → favicon-hR5BaEm4.js} +1 -1
- package/dist/browser/{fetch-retry.umd-BFKfjB2M.js → fetch-retry.umd-DS-5XmpN.js} +2 -2
- package/dist/browser/{flex-CK3VOHMW.js → flex-BAz1Zlx4.js} +5 -5
- package/dist/browser/{floorplan.loader-C9TjDBmt.js → floorplan.loader-DPHmWNvd.js} +12 -12
- package/dist/browser/{floorplan.ready-c_FJgMPD.js → floorplan.ready-clG372Lo.js} +23 -23
- package/dist/browser/{freeBanner-DgUUkI2a.js → freeBanner-D0nU1aT0.js} +2 -2
- package/dist/browser/{fuse-BYRtXyUs.js → fuse-DFf-hk6f.js} +2 -2
- package/dist/browser/{i18n-D6mkjwGK.js → i18n-CPJmxFQX.js} +6 -6
- package/dist/browser/index.js +17 -17
- package/dist/browser/{index.module-WJQpxtrH.js → index.module-COSPv-bu.js} +4 -4
- package/dist/browser/{init-ui-DRwSj40I.js → init-ui-Cj38w8tb.js} +9 -9
- package/dist/browser/{integrateKiosk-eGXJsNiO.js → integrateKiosk-Du5HThkw.js} +5 -5
- package/dist/browser/{is-debug-m1W_6MrE.js → is-debug-CmeNjnvW.js} +4 -4
- package/dist/browser/{is-own-domain-Bdfz0zQ0.js → is-own-domain-z0V4JpKp.js} +1 -1
- package/dist/browser/{is-webview-B8VsNIoN.js → is-webview-JHA9dtnx.js} +1 -1
- package/dist/browser/{jsx-runtime-C1oR0Zi0.js → jsx-runtime-D-d_UIhH.js} +2 -2
- package/dist/browser/{kiosk-mode-B1Xr_IyL.js → kiosk-mode-ZBMSIWbK.js} +3 -3
- package/dist/browser/{kiosk-record-BOx9wVlW.js → kiosk-record-Djd0ZbEF.js} +1 -1
- package/dist/browser/{kioskApi-BenqwSpt.js → kioskApi-CXqDoN71.js} +7 -7
- package/dist/browser/{lib-BMUuspHa.js → lib-GyGKAKXf.js} +3 -3
- package/dist/browser/{loadImage-BVv4a2P0.js → loadImage-cnbZD9uN.js} +1 -1
- package/dist/browser/{logDeviceInfo-Ca0FCWzJ.js → logDeviceInfo-BSf9sLzS.js} +9 -9
- package/dist/browser/{mobx-Dd5eFIow.js → mobx-D3NQFhEq.js} +4 -4
- package/dist/browser/{mobx.module-C48iLaGi.js → mobx.module-CAKsDOYI.js} +1 -1
- package/dist/browser/{optional-boolean-editor-B-42x5e-.js → optional-boolean-editor-IR9THgLK.js} +3 -3
- package/dist/browser/{optional-enum-editor-Bxiw2Z8x.js → optional-enum-editor-PRQn6yzK.js} +4 -4
- package/dist/browser/{optional-string-editor-CqHfXBvX.js → optional-string-editor-bZCuZ1tn.js} +4 -4
- package/dist/browser/{particles.min-U6rx5JeG.js → particles.min-CwWuVwyg.js} +2 -2
- package/dist/browser/{react-C3MD_6wk.js → react-DQVTc7xG.js} +2 -2
- package/dist/browser/{react-dom-_B4zRwEv.js → react-dom-BsqqKfoG.js} +3 -3
- package/dist/browser/{rolldown-runtime-D2hCdFW8.js → rolldown-runtime-Cyn7iuGp.js} +1 -1
- package/dist/browser/{scene-DyfGtdIg.js → scene-CqJCEbSr.js} +2 -2
- package/dist/browser/{scheduler-Bg382KcU.js → scheduler-CVY86sNW.js} +2 -2
- package/dist/browser/{select-D8SjUiUb.js → select-Du3T8Mpj.js} +10 -10
- package/dist/browser/{settings-Bh45PRJm.js → settings-NB72PTux.js} +2 -2
- package/dist/browser/{settings-item-DoHYH97F.js → settings-item-BIPeCHmD.js} +6 -6
- package/dist/browser/{store-zbZemYUA.js → store-BvnDl4Sc.js} +2 -2
- package/dist/browser/{string-editor-23PXPywz.js → string-editor-o-TMbaK8.js} +4 -4
- package/dist/browser/{text-field-C1dH_sz6.js → text-field-BZ5346fV.js} +5 -5
- package/dist/browser/{theme-CHTbq4Fs.js → theme-CPcxdYz7.js} +8 -8
- package/dist/browser/{ui-D2xk_zF-.js → ui-CesJTtUW.js} +8 -8
- package/dist/browser/{useRenderTarget-CHnba2yS.js → useRenderTarget-DpLNpx1f.js} +4 -4
- package/dist/browser/{viewport-Cz5rd5Zn.js → viewport-QrHclV_L.js} +3 -3
- package/dist/browser/{wayfinding-CQCzv2e-.js → wayfinding-v9-TVwHq.js} +5 -5
- package/dist/esm/components/Map/drawing/config/booth-badge-anchor.d.ts +11 -2
- package/dist/esm/components/Map/drawing/config/booth-badge-anchor.js +1 -1
- package/package.json +10 -10
|
@@ -1,24 +1,24 @@
|
|
|
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.44.
|
|
4
|
+
e.SENTRY_RELEASE = { id: "3.44.8" };
|
|
5
5
|
var t = new e.Error().stack;
|
|
6
|
-
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "
|
|
6
|
+
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "4fe757b8-ee61-475d-9899-aed10b25e418", e._sentryDebugIdIdentifier = "sentry-dbid-4fe757b8-ee61-475d-9899-aed10b25e418");
|
|
7
7
|
} catch {}
|
|
8
8
|
})();
|
|
9
|
-
import { r as e } from "./rolldown-runtime-
|
|
10
|
-
import { g as t } from "./i18n-
|
|
11
|
-
import { t as n } from "./react-
|
|
12
|
-
import { l as r } from "./mobx.module-
|
|
13
|
-
import { t as i } from "./loadImage-
|
|
14
|
-
import { r as a } from "./debug-context-
|
|
15
|
-
import { a as o, l as s, t as c, u as l } from "./store-
|
|
16
|
-
import { $ as u, Bt as d, D as f, Et as p, Ft as m, G as h, Ht as g, J as _, Kt as v, Nt as y, Rt as b, Vt as x, W as S, Wt as C, X as w, Y as T, _t as E, b as D, d as
|
|
17
|
-
import { _ as
|
|
18
|
-
import { i as le, n as ue } from "./viewport-
|
|
19
|
-
import { r as de } from "./scene-
|
|
9
|
+
import { r as e } from "./rolldown-runtime-Cyn7iuGp.js";
|
|
10
|
+
import { g as t } from "./i18n-CPJmxFQX.js";
|
|
11
|
+
import { t as n } from "./react-DQVTc7xG.js";
|
|
12
|
+
import { l as r } from "./mobx.module-CAKsDOYI.js";
|
|
13
|
+
import { t as i } from "./loadImage-cnbZD9uN.js";
|
|
14
|
+
import { r as a } from "./debug-context-BEABO7OL.js";
|
|
15
|
+
import { a as o, l as s, t as c, u as l } from "./store-BvnDl4Sc.js";
|
|
16
|
+
import { $ as u, Bt as d, D as f, Et as p, Ft as m, G as h, Ht as g, J as _, Kt as v, Nt as y, Rt as b, Vt as x, W as S, Wt as C, X as w, Y as T, _t as E, b as D, d as ee, dt as O, f as k, gt as A, i as j, it as M, kt as N, nt as te, q as ne, qt as P, rt as re, t as ie, vt as F, wt as ae, x as oe, xt as se } from "./LayerStore-BM7GOQ3J.js";
|
|
17
|
+
import { _ as I, l as ce } from "./wayfinding-v9-TVwHq.js";
|
|
18
|
+
import { i as le, n as ue } from "./viewport-QrHclV_L.js";
|
|
19
|
+
import { r as de } from "./scene-CqJCEbSr.js";
|
|
20
20
|
//#region src/components/Map/traffic/trafficLayers.ts
|
|
21
|
-
var
|
|
21
|
+
var fe = "traffic_route", L = "traffic_route_stop", R = "traffic_vehicles", pe = "build_route_lines", me = "build_route_dots", he = 5;
|
|
22
22
|
function ge() {
|
|
23
23
|
let e = [];
|
|
24
24
|
for (let t = 0; t < he; t++) e.push({
|
|
@@ -40,26 +40,26 @@ function ge() {
|
|
|
40
40
|
}), e;
|
|
41
41
|
}
|
|
42
42
|
function _e(e) {
|
|
43
|
-
return `${
|
|
43
|
+
return `${fe}_${e + 1}`;
|
|
44
44
|
}
|
|
45
45
|
function ve(e) {
|
|
46
|
-
return `${
|
|
46
|
+
return `${L}_${e + 1}`;
|
|
47
47
|
}
|
|
48
48
|
function ye() {
|
|
49
|
-
return RegExp(`^${
|
|
49
|
+
return RegExp(`^${fe}_\\d+$`);
|
|
50
50
|
}
|
|
51
51
|
function be() {
|
|
52
|
-
return RegExp(`^${
|
|
52
|
+
return RegExp(`^${L}_\\d+$`);
|
|
53
53
|
}
|
|
54
54
|
//#endregion
|
|
55
55
|
//#region src/components/Map/drawing/config/booth-badge-anchor.ts
|
|
56
|
-
var xe = /* @__PURE__ */ e(
|
|
56
|
+
var xe = /* @__PURE__ */ e(A(), 1), Se = .5, Ce = .3, we = 10, Te = 8, Ee = 4, De = 50, z = class e {
|
|
57
57
|
constructor(e, t, n, r) {
|
|
58
|
-
this.booth = e, this.triangles = t, this.border = n, this.source = r, this.fits = [], this.prefetchRotation = 0, this.polygon = void 0, this.bbox = void 0, this.vertices = null, this.polygon =
|
|
58
|
+
this.booth = e, this.triangles = t, this.border = n, this.source = r, this.fits = [], this.prefetchRotation = 0, this.polygon = void 0, this.bbox = void 0, this.vertices = null, this.polygon = ke(t), this.bbox = Oe(t);
|
|
59
59
|
}
|
|
60
60
|
fit(e, t) {
|
|
61
61
|
let n = this.fits[e];
|
|
62
|
-
return n || (this.fits[e] = n = this.compute(e, t)), n;
|
|
62
|
+
return n || (this.fits[e] = n = this.compute(e, t), this.fits.filter(Boolean).length === 4 && (this.vertices = null)), n;
|
|
63
63
|
}
|
|
64
64
|
prefetch(t) {
|
|
65
65
|
e.idle.has(this) || (this.prefetchRotation = t, e.idle.add(this), e.scheduleIdle());
|
|
@@ -68,16 +68,28 @@ var xe = /* @__PURE__ */ e(j(), 1), Se = .5, Ce = .3, we = 10, Te = 8, Ee = 50,
|
|
|
68
68
|
e.idle.delete(this);
|
|
69
69
|
}
|
|
70
70
|
static scheduleIdle() {
|
|
71
|
-
e.idleScheduled || !e.idle.size || (e.idleScheduled = !0, typeof requestIdleCallback == "function" ? requestIdleCallback(e.runIdle) :
|
|
71
|
+
e.idleScheduled || !e.idle.size || (e.idleScheduled = !0, typeof requestIdleCallback == "function" ? requestIdleCallback(e.runIdle) : typeof requestAnimationFrame == "function" ? requestAnimationFrame(() => setTimeout(e.runSlice, 0)) : setTimeout(e.runSlice, De));
|
|
72
|
+
}
|
|
73
|
+
static runSlice() {
|
|
74
|
+
let t = performance.now() + Ee;
|
|
75
|
+
e.runIdle({ timeRemaining: () => t - performance.now() });
|
|
72
76
|
}
|
|
73
77
|
static runIdle(t) {
|
|
74
78
|
e.idleScheduled = !1;
|
|
75
79
|
let n = performance.now() + Te;
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
80
|
+
try {
|
|
81
|
+
for (let r of e.idle) {
|
|
82
|
+
if (t.timeRemaining() <= 0 || performance.now() >= n) break;
|
|
83
|
+
let i = !1;
|
|
84
|
+
try {
|
|
85
|
+
i = r.prefetchNext();
|
|
86
|
+
} finally {
|
|
87
|
+
i || e.idle.delete(r);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
} finally {
|
|
91
|
+
e.scheduleIdle();
|
|
79
92
|
}
|
|
80
|
-
e.scheduleIdle();
|
|
81
93
|
}
|
|
82
94
|
prefetchNext() {
|
|
83
95
|
for (let e = 1; e < 4; e++) if (!this.fits[e]) return this.fit(e, this.prefetchRotation + e * Math.PI / 2), e < 3;
|
|
@@ -162,7 +174,7 @@ var xe = /* @__PURE__ */ e(j(), 1), Se = .5, Ce = .3, we = 10, Te = 8, Ee = 50,
|
|
|
162
174
|
}
|
|
163
175
|
};
|
|
164
176
|
z.idle = /* @__PURE__ */ new Set(), z.idleScheduled = !1;
|
|
165
|
-
function
|
|
177
|
+
function Oe(e) {
|
|
166
178
|
if (!e.length) return null;
|
|
167
179
|
let t = Infinity, n = Infinity, r = -Infinity, i = -Infinity;
|
|
168
180
|
for (let a of e) for (let [e, o] of a) e < t && (t = e), o < n && (n = o), e > r && (r = e), o > i && (i = o);
|
|
@@ -174,7 +186,7 @@ function De(e) {
|
|
|
174
186
|
y: i
|
|
175
187
|
});
|
|
176
188
|
}
|
|
177
|
-
function
|
|
189
|
+
function ke(e) {
|
|
178
190
|
let t = [], n = [];
|
|
179
191
|
for (let r of e) {
|
|
180
192
|
let e = t.length;
|
|
@@ -197,35 +209,35 @@ function Oe(e) {
|
|
|
197
209
|
}
|
|
198
210
|
//#endregion
|
|
199
211
|
//#region src/components/Map/drawing/config/config-booth-badge-eligibility.ts
|
|
200
|
-
function
|
|
212
|
+
function Ae(e) {
|
|
201
213
|
return e.hideExhibitorBoothNumber || e.hideBoothBadges || !e.hasExhibitors ? !1 : e.noLabels || !e.hideLogoInBooth && e.hasLogoInBooth;
|
|
202
214
|
}
|
|
203
215
|
//#endregion
|
|
204
216
|
//#region src/components/Map/drawing/config/config-booth-badge.ts
|
|
205
|
-
var
|
|
206
|
-
function Ie(e) {
|
|
207
|
-
return e.length <= Ae ? e : e.slice(0, Ae - 1) + "…";
|
|
208
|
-
}
|
|
217
|
+
var je = 15, Me = 24, Ne = 30, Pe = 12, Fe = .8, Ie = document.createElement("canvas").getContext("2d");
|
|
209
218
|
function Le(e) {
|
|
219
|
+
return e.length <= je ? e : e.slice(0, je - 1) + "…";
|
|
220
|
+
}
|
|
221
|
+
function Re(e) {
|
|
210
222
|
var t, n;
|
|
211
223
|
if (!((t = e.paths) != null && t.length)) return [];
|
|
212
224
|
let r = ((n = e.layer) == null ? void 0 : n.name) || "", i = [];
|
|
213
|
-
for (let t of e.paths) for (let e of
|
|
225
|
+
for (let t of e.paths) for (let e of N(t.index, r)) i.push(e);
|
|
214
226
|
return i;
|
|
215
227
|
}
|
|
216
228
|
function B(e) {
|
|
217
229
|
return e && e !== "none" ? e : void 0;
|
|
218
230
|
}
|
|
219
|
-
function
|
|
231
|
+
function ze(e) {
|
|
220
232
|
var t;
|
|
221
233
|
let n = B(e.borderColor) || B(p.boothBorderColor) || p.colors.booths.default;
|
|
222
234
|
return ((t = e.paths) == null ? void 0 : t.length) > 1 && B(e.paths[e.paths.length - 1].color) || n;
|
|
223
235
|
}
|
|
224
|
-
function
|
|
236
|
+
function Be(e) {
|
|
225
237
|
var t;
|
|
226
|
-
let n =
|
|
227
|
-
|
|
228
|
-
let s =
|
|
238
|
+
let n = Le(e.title || e.name), i = ze(e), a = de((0, xe.default)(i).hex()), o = ee();
|
|
239
|
+
Ie.font = ae(Ne, o);
|
|
240
|
+
let s = Ie.measureText(n).width, u = Math.ceil(s + Pe * 2), d = (e.borderWidth || c.borderWidth) / 2, f = u * Fe, p = 54 * Fe, m = new z(e, Re(e), d, {
|
|
229
241
|
x: f,
|
|
230
242
|
y: p
|
|
231
243
|
}), h = (t = e.rotate) == null ? 0 : t, g = 0, y = 0, b = 0, S = 0, C = () => {
|
|
@@ -245,14 +257,14 @@ function ze(e) {
|
|
|
245
257
|
x: t,
|
|
246
258
|
y: n
|
|
247
259
|
}, h, e.elevation);
|
|
248
|
-
}, D =
|
|
249
|
-
|
|
250
|
-
let
|
|
260
|
+
}, D = k(o, w()), A = ne(E(1, 1), i);
|
|
261
|
+
A.hidden = !0, A.dim = e.skipDim ? 0 : void 0;
|
|
262
|
+
let j = _(T([[n], []], a, 0, [D, D]), E(1, 1), [0, 0], {
|
|
251
263
|
horizontal: "center",
|
|
252
264
|
vertical: "center"
|
|
253
265
|
});
|
|
254
|
-
|
|
255
|
-
let
|
|
266
|
+
j.hidden = !0, j.dim = e.skipDim ? 0 : void 0;
|
|
267
|
+
let M = {
|
|
256
268
|
booth: e,
|
|
257
269
|
anchor: {
|
|
258
270
|
x: y,
|
|
@@ -264,33 +276,33 @@ function ze(e) {
|
|
|
264
276
|
},
|
|
265
277
|
rotation: h,
|
|
266
278
|
maxScale: S,
|
|
267
|
-
bg:
|
|
268
|
-
text:
|
|
269
|
-
},
|
|
270
|
-
|
|
271
|
-
let
|
|
272
|
-
return
|
|
273
|
-
|
|
274
|
-
})),
|
|
279
|
+
bg: A,
|
|
280
|
+
text: j
|
|
281
|
+
}, N = new Ve(M);
|
|
282
|
+
A.onScale = ({ pixelSize: e }) => N.layOutBg(e), j.onScale = ({ pixelSize: e }) => N.layOutText(e);
|
|
283
|
+
let P = [];
|
|
284
|
+
return P.push(r(() => e.skipDim, (e) => {
|
|
285
|
+
A.dim = e ? 0 : void 0, j.dim = e ? 0 : void 0, O(A, j);
|
|
286
|
+
})), P.push(r(() => {
|
|
275
287
|
var t, n;
|
|
276
288
|
return (t = (n = e.layer) == null ? void 0 : n.visible) == null || t;
|
|
277
289
|
}, (e) => {
|
|
278
|
-
|
|
279
|
-
})),
|
|
290
|
+
A.hidden = !e, j.hidden = !e, O(A, j);
|
|
291
|
+
})), P.push(r(() => l.mapSettings, ({ roll: t }) => {
|
|
280
292
|
var n;
|
|
281
|
-
|
|
282
|
-
let n =
|
|
283
|
-
if (n !== 0) return h += n * Math.PI / 2, g = ((g + n) % 4 + 4) % 4, C(),
|
|
293
|
+
re(t == null ? 0 : t) && (m.prefetch((n = e.rotate) == null ? 0 : n), A.onRoll = ({ roll: e, pixelSize: t }) => {
|
|
294
|
+
let n = te(e, h);
|
|
295
|
+
if (n !== 0) return h += n * Math.PI / 2, g = ((g + n) % 4 + 4) % 4, C(), M.anchor.x = y, M.anchor.y = b, M.rotation = h, M.maxScale = S, [...N.layOutBg(t), ...N.layOutText(t)];
|
|
284
296
|
});
|
|
285
297
|
}, { fireImmediately: !0 }), () => m.cancelPrefetch()), {
|
|
286
|
-
bg:
|
|
287
|
-
text:
|
|
298
|
+
bg: A,
|
|
299
|
+
text: j,
|
|
288
300
|
dispose: () => {
|
|
289
|
-
|
|
301
|
+
P.forEach((e) => e()), P.length = 0;
|
|
290
302
|
}
|
|
291
303
|
};
|
|
292
304
|
}
|
|
293
|
-
var
|
|
305
|
+
var Ve = class {
|
|
294
306
|
constructor(e) {
|
|
295
307
|
this.placement = e;
|
|
296
308
|
}
|
|
@@ -300,7 +312,7 @@ var Be = class {
|
|
|
300
312
|
}
|
|
301
313
|
layOutText(e) {
|
|
302
314
|
let { text: t, maxScale: n } = this.placement;
|
|
303
|
-
return t.lines[0].fontSize =
|
|
315
|
+
return t.lines[0].fontSize = Me * Math.min(e, n), t.bounds = this.rectScaled(e), t.hidden = this.isHidden(), t.hidden ? [] : [t];
|
|
304
316
|
}
|
|
305
317
|
rectScaled(e) {
|
|
306
318
|
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;
|
|
@@ -317,9 +329,9 @@ var Be = class {
|
|
|
317
329
|
return !!(e.layer && !e.layer.visible);
|
|
318
330
|
}
|
|
319
331
|
};
|
|
320
|
-
function
|
|
332
|
+
function He(e, t) {
|
|
321
333
|
let n = [], r = [], i = [];
|
|
322
|
-
for (let e of t) if (e instanceof u &&
|
|
334
|
+
for (let e of t) if (e instanceof u && Ae({
|
|
323
335
|
hideExhibitorBoothNumber: y.hideExhibitorBoothNumber,
|
|
324
336
|
hideBoothBadges: y.hideBoothBadges,
|
|
325
337
|
hideLogoInBooth: l.hideLogoInBooth,
|
|
@@ -327,7 +339,7 @@ function Ve(e, t) {
|
|
|
327
339
|
hasExhibitors: e.exhibitors.length > 0,
|
|
328
340
|
hasLogoInBooth: e.exhibitors.some((e) => e.logoInBooth && e.logo)
|
|
329
341
|
})) {
|
|
330
|
-
let { bg: t, text: a, dispose: o } =
|
|
342
|
+
let { bg: t, text: a, dispose: o } = Be(e);
|
|
331
343
|
n.push(t), r.push(a), i.push(o);
|
|
332
344
|
}
|
|
333
345
|
let a = () => {
|
|
@@ -353,16 +365,16 @@ function Ve(e, t) {
|
|
|
353
365
|
//#endregion
|
|
354
366
|
//#region src/components/Map/drawing/config/config-markers.ts
|
|
355
367
|
var V = "_selected", H = "markers";
|
|
356
|
-
function
|
|
368
|
+
function Ue(e, t) {
|
|
357
369
|
let { center: n, rotation: r, elevation: i } = e.bounds, { width: a, height: o } = e.source;
|
|
358
|
-
return e.bounds =
|
|
370
|
+
return e.bounds = F(n.x, n.y, a, o, t, r, i), [e];
|
|
359
371
|
}
|
|
360
|
-
function
|
|
372
|
+
function We(e) {
|
|
361
373
|
U = e;
|
|
362
374
|
}
|
|
363
|
-
function
|
|
375
|
+
function Ge(e) {
|
|
364
376
|
let { scene: t } = e, n = [], i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), c = [], u = t.rootLayer.children.find((e) => e.name === H);
|
|
365
|
-
u.onScale = ({ pixelSize: e }) =>
|
|
377
|
+
u.onScale = ({ pixelSize: e }) => We(e), D(Ke), O(u);
|
|
366
378
|
async function d(e) {
|
|
367
379
|
let t = [];
|
|
368
380
|
e.forEach((e) => {
|
|
@@ -384,7 +396,7 @@ function We(e) {
|
|
|
384
396
|
}), await Promise.all(t);
|
|
385
397
|
}
|
|
386
398
|
let f = (e) => {
|
|
387
|
-
e.onScale = ({ pixelSize: t }) =>
|
|
399
|
+
e.onScale = ({ pixelSize: t }) => Ue(e, t);
|
|
388
400
|
}, p = (e) => {
|
|
389
401
|
e.screenSpace || (e.onRoll = ({ roll: t }) => {
|
|
390
402
|
if (t !== e.bounds.rotation) return e.bounds.rotate(t - e.bounds.rotation, e.bounds), [e];
|
|
@@ -393,7 +405,7 @@ function We(e) {
|
|
|
393
405
|
function m(e, t, n) {
|
|
394
406
|
let r = a.get(e);
|
|
395
407
|
if (r) return r;
|
|
396
|
-
let i =
|
|
408
|
+
let i = se(t.img, t.width, t.height, n);
|
|
397
409
|
return a.set(e, i), i;
|
|
398
410
|
}
|
|
399
411
|
function h() {
|
|
@@ -407,7 +419,7 @@ function We(e) {
|
|
|
407
419
|
if (!a) return;
|
|
408
420
|
let s = i.get(e.selectedIcon);
|
|
409
421
|
if (!s) return;
|
|
410
|
-
let l = a.scale || window.devicePixelRatio, u = m(e.icon, a, l), d = m(e.selectedIcon, s, l), f = (n = (r = o.findLayer(e.z)) == null ? void 0 : r.visible) == null || n, p =
|
|
422
|
+
let l = a.scale || window.devicePixelRatio, u = m(e.icon, a, l), d = m(e.selectedIcon, s, l), f = (n = (r = o.findLayer(e.z)) == null ? void 0 : r.visible) == null || n, p = F(e.x, e.y, u.width, u.height, 1, 0), h = F(e.x, e.y, d.width, d.height, 1, 0), g;
|
|
411
423
|
switch (e.position) {
|
|
412
424
|
case "lefttop":
|
|
413
425
|
g = [0, 0];
|
|
@@ -457,34 +469,34 @@ function We(e) {
|
|
|
457
469
|
}
|
|
458
470
|
return n.push(r(() => [s.routeStore.selectedMarkers, s.layerStore.visible], () => {
|
|
459
471
|
if (!s.routeStore.markersData.markers.length) {
|
|
460
|
-
g(),
|
|
472
|
+
g(), O(u);
|
|
461
473
|
return;
|
|
462
474
|
}
|
|
463
|
-
_(),
|
|
475
|
+
_(), O(...c);
|
|
464
476
|
})), n.push(r(() => s.routeStore.markersData.markers, () => {
|
|
465
477
|
d(s.routeStore.markersData.icons).then(() => {
|
|
466
|
-
h(),
|
|
478
|
+
h(), O(u);
|
|
467
479
|
});
|
|
468
480
|
}, { fireImmediately: !0 })), function() {
|
|
469
|
-
n.forEach((e) => e()), n.length = 0, u.onScale = void 0, D(), U = 1,
|
|
481
|
+
n.forEach((e) => e()), n.length = 0, u.onScale = void 0, D(), U = 1, O(u);
|
|
470
482
|
};
|
|
471
483
|
}
|
|
472
|
-
function
|
|
473
|
-
return
|
|
484
|
+
function Ke(e, t) {
|
|
485
|
+
return qe(e, t, U);
|
|
474
486
|
}
|
|
475
|
-
function
|
|
487
|
+
function qe(e, t, n) {
|
|
476
488
|
for (let r of s.routeStore.markersData.markers) {
|
|
477
489
|
let i = s.routeStore.markersData.icons.find((e) => e.name === r.icon);
|
|
478
490
|
if (!i) continue;
|
|
479
491
|
let a = i.width * n * devicePixelRatio, o = i.height * n * devicePixelRatio;
|
|
480
|
-
if (
|
|
492
|
+
if (Je(e, t, r.x, r.y, a, o)) {
|
|
481
493
|
let e = s.layerStore.findLayer(r.z);
|
|
482
494
|
if (!e || e && e.visible) return r;
|
|
483
495
|
}
|
|
484
496
|
}
|
|
485
497
|
return null;
|
|
486
498
|
}
|
|
487
|
-
function
|
|
499
|
+
function Je(e, t, n, r, i, a) {
|
|
488
500
|
return b.fromCenter({
|
|
489
501
|
x: n,
|
|
490
502
|
y: r
|
|
@@ -499,19 +511,19 @@ function qe(e, t, n, r, i, a) {
|
|
|
499
511
|
var U = 1;
|
|
500
512
|
//#endregion
|
|
501
513
|
//#region src/components/Map/drawing/config/config-all.ts
|
|
502
|
-
function
|
|
514
|
+
function Ye() {
|
|
503
515
|
let { defaultLayer: e } = s.layerStore, { layers: t } = s.layerStore;
|
|
504
516
|
if (e) {
|
|
505
517
|
let n = [...t], r = t.indexOf(e);
|
|
506
518
|
n.splice(r, 1), t = [e, ...n];
|
|
507
519
|
}
|
|
508
|
-
let n = t.filter((e) => !e.rootParent).map((e) =>
|
|
520
|
+
let n = t.filter((e) => !e.rootParent).map((e) => j(e));
|
|
509
521
|
return Promise.all(n).then((e) => {
|
|
510
522
|
let t = h(H, []);
|
|
511
523
|
t.overlay = l.is3DView;
|
|
512
524
|
let n = ce({ overlay: l.is3DView }), r = [], i = [];
|
|
513
525
|
for (let t of e.flat()) f(t.name) ? (t.dim = 0, i.push(t)) : r.push(t);
|
|
514
|
-
let { layer: a, cleanup: o } =
|
|
526
|
+
let { layer: a, cleanup: o } = He("root", c.booths);
|
|
515
527
|
return {
|
|
516
528
|
layers: [
|
|
517
529
|
...r,
|
|
@@ -527,15 +539,15 @@ function Je() {
|
|
|
527
539
|
}
|
|
528
540
|
//#endregion
|
|
529
541
|
//#region src/components/Map/MapCursorCoords.tsx
|
|
530
|
-
var W = /* @__PURE__ */ e(n(), 1),
|
|
531
|
-
function
|
|
532
|
-
let { canvas: t } = e, n =
|
|
542
|
+
var W = /* @__PURE__ */ e(n(), 1), Xe = 2;
|
|
543
|
+
function Ze(e) {
|
|
544
|
+
let { canvas: t } = e, n = M(), r = a(), i = (0, W.useCallback)(() => r("cursor", void 0), [r]), o = (0, W.useEffectEvent)((e) => {
|
|
533
545
|
if (!e.isPrimary) return;
|
|
534
546
|
let t = n.canvasToPlan({
|
|
535
547
|
x: e.offsetX,
|
|
536
548
|
y: e.offsetY
|
|
537
549
|
});
|
|
538
|
-
r("cursor", t ?
|
|
550
|
+
r("cursor", t ? $e(t, Qe()) : void 0);
|
|
539
551
|
});
|
|
540
552
|
return (0, W.useEffect)(() => {
|
|
541
553
|
let e = t.current;
|
|
@@ -546,25 +558,25 @@ function Ye(e) {
|
|
|
546
558
|
};
|
|
547
559
|
}, [t, i]), null;
|
|
548
560
|
}
|
|
549
|
-
function
|
|
550
|
-
let e = s.layerStore.layers.find((e) => e.visible && (e.mode ===
|
|
561
|
+
function Qe() {
|
|
562
|
+
let e = s.layerStore.layers.find((e) => e.visible && (e.mode === ie.TurnedOn || e.mode === ie.TurnedOff));
|
|
551
563
|
return (e == null ? void 0 : e.name) || null;
|
|
552
564
|
}
|
|
553
|
-
function
|
|
554
|
-
let n = `[${e.x.toFixed(
|
|
565
|
+
function $e(e, t) {
|
|
566
|
+
let n = `[${e.x.toFixed(Xe)}, ${e.y.toFixed(Xe)}]`;
|
|
555
567
|
return t ? `${n} · layer ${t}` : n;
|
|
556
568
|
}
|
|
557
569
|
//#endregion
|
|
558
570
|
//#region src/components/Map/MapViewport.tsx
|
|
559
|
-
function
|
|
560
|
-
let e =
|
|
571
|
+
function et() {
|
|
572
|
+
let e = M(), t = (0, W.useRef)({ api: e }), [n] = (0, W.useState)(() => ue(t));
|
|
561
573
|
return (0, W.useLayoutEffect)(() => {
|
|
562
574
|
t.current = { api: e };
|
|
563
575
|
}), (0, W.useEffect)(() => (le(n), () => le(void 0)), [n]), null;
|
|
564
576
|
}
|
|
565
577
|
//#endregion
|
|
566
578
|
//#region src/components/Map/traffic/UpdateQueue.ts
|
|
567
|
-
var
|
|
579
|
+
var tt = class {
|
|
568
580
|
constructor() {
|
|
569
581
|
this.queue = [], this.isProcessing = !1, this.rafId = null, this.CHUNK_SIZE = 100, this.TIME_BUDGET = 4;
|
|
570
582
|
}
|
|
@@ -606,7 +618,7 @@ var $e = class {
|
|
|
606
618
|
destroy() {
|
|
607
619
|
this.rafId !== null && (cancelAnimationFrame(this.rafId), this.rafId = null), this.queue = [], this.isProcessing = !1;
|
|
608
620
|
}
|
|
609
|
-
},
|
|
621
|
+
}, G = 49, K = `hsl(257, 76%, ${G}%)`, nt = `hsl(339.903, 82%, ${G}%)`, rt = `hsl(257, 76%, ${Math.round(G * 1.82)}%)`, q = 4, it = q, at = "U", ot = "R", st = "S", ct = "P", lt = class {
|
|
610
622
|
constructor() {
|
|
611
623
|
this._state = [[]], this.index = 0, this.pointHashSet = /* @__PURE__ */ new Set(), this.locked = !1, this.storageKey = "expofp_build_route_state", this._selected = 0;
|
|
612
624
|
}
|
|
@@ -645,10 +657,10 @@ var $e = class {
|
|
|
645
657
|
instruct() {
|
|
646
658
|
this.log(`How to Build a Route:
|
|
647
659
|
Add Point: Click on the map.
|
|
648
|
-
Apply Smoothing: Press ${
|
|
649
|
-
Apply Simplification: Press ${
|
|
650
|
-
Undo: Press ${
|
|
651
|
-
Enable/Disable Preview: Press ${
|
|
660
|
+
Apply Smoothing: Press ${ot}.
|
|
661
|
+
Apply Simplification: Press ${st}.
|
|
662
|
+
Undo: Press ${at}.
|
|
663
|
+
Enable/Disable Preview: Press ${ct}.
|
|
652
664
|
`, 16);
|
|
653
665
|
}
|
|
654
666
|
applyChaikinSmoothing(e, t, n) {
|
|
@@ -748,8 +760,8 @@ Enable/Disable Preview: Press ${st}.
|
|
|
748
760
|
this._selected = Math.max(0, Math.min(e, this.points.length - 1));
|
|
749
761
|
}
|
|
750
762
|
};
|
|
751
|
-
function
|
|
752
|
-
let n = (0, W.useRef)(!1), r = (0, W.useRef)(), i = (0, W.useMemo)(() => E(q,
|
|
763
|
+
function ut({ enabled: e, scene: t }) {
|
|
764
|
+
let n = (0, W.useRef)(!1), r = (0, W.useRef)(), i = (0, W.useMemo)(() => E(q, K), []), a = (0, W.useMemo)(() => E(q, nt), []), o = (0, W.useMemo)(() => new lt(), []), s = (0, W.useRef)(new tt()), c = (0, W.useMemo)(() => {
|
|
753
765
|
if (!t) return {};
|
|
754
766
|
let e = t.rootLayer.children;
|
|
755
767
|
return {
|
|
@@ -765,7 +777,7 @@ function lt({ enabled: e, scene: t }) {
|
|
|
765
777
|
let s = n == o.selected ? a : i;
|
|
766
778
|
return {
|
|
767
779
|
source: s,
|
|
768
|
-
bounds:
|
|
780
|
+
bounds: F(e, t, s.width, s.height, r.current)
|
|
769
781
|
};
|
|
770
782
|
});
|
|
771
783
|
let d = [];
|
|
@@ -776,11 +788,11 @@ function lt({ enabled: e, scene: t }) {
|
|
|
776
788
|
p0: t,
|
|
777
789
|
p1: n
|
|
778
790
|
},
|
|
779
|
-
color: u ?
|
|
780
|
-
width:
|
|
791
|
+
color: u ? K : rt,
|
|
792
|
+
width: it
|
|
781
793
|
});
|
|
782
794
|
}
|
|
783
|
-
d.length ? e.children = d : e.children.length = 0, s.current.add(() =>
|
|
795
|
+
d.length ? e.children = d : e.children.length = 0, s.current.add(() => O(t, e)), o.instruct(), o.log(JSON.stringify(o.points));
|
|
784
796
|
}, [
|
|
785
797
|
o,
|
|
786
798
|
c,
|
|
@@ -790,16 +802,16 @@ function lt({ enabled: e, scene: t }) {
|
|
|
790
802
|
let t = e.key.toUpperCase();
|
|
791
803
|
o.execute(() => {
|
|
792
804
|
switch (t) {
|
|
793
|
-
case
|
|
805
|
+
case at:
|
|
794
806
|
e.preventDefault(), o.undo(), n.current = !1, l();
|
|
795
807
|
break;
|
|
796
|
-
case
|
|
808
|
+
case ot:
|
|
797
809
|
e.preventDefault(), o.applySmoothing(), n.current = !1, l();
|
|
798
810
|
break;
|
|
799
|
-
case
|
|
811
|
+
case st:
|
|
800
812
|
e.preventDefault(), o.applySimplification(), n.current = !1, l();
|
|
801
813
|
break;
|
|
802
|
-
case
|
|
814
|
+
case ct:
|
|
803
815
|
e.preventDefault(), n.current = !n.current, l();
|
|
804
816
|
break;
|
|
805
817
|
}
|
|
@@ -811,7 +823,7 @@ function lt({ enabled: e, scene: t }) {
|
|
|
811
823
|
let n = [];
|
|
812
824
|
return o.execute(() => {
|
|
813
825
|
let e = t.children;
|
|
814
|
-
for (let t of e) t.bounds =
|
|
826
|
+
for (let t of e) t.bounds = F(t.bounds.center.x, t.bounds.center.y, t.source.width, t.source.height, r.current), n.push(t);
|
|
815
827
|
}), n;
|
|
816
828
|
}, [c, o]), f = (0, W.useCallback)((e) => {
|
|
817
829
|
o.execute(() => {
|
|
@@ -827,8 +839,8 @@ function lt({ enabled: e, scene: t }) {
|
|
|
827
839
|
let { pointsLayer: i } = c;
|
|
828
840
|
return r.current = (t = (n = m()) == null ? void 0 : n.state().pixelSize) == null ? 1 : t, o.execute(() => {
|
|
829
841
|
o.restore(), l();
|
|
830
|
-
}), i.onScale = ({ pixelSize: e }) => d(e), s.current.add(() =>
|
|
831
|
-
window.removeEventListener("keyup", u),
|
|
842
|
+
}), i.onScale = ({ pixelSize: e }) => d(e), s.current.add(() => O(i)), oe(f), window.addEventListener("keyup", u), () => {
|
|
843
|
+
window.removeEventListener("keyup", u), oe(), i.onScale = void 0, s.current.destroy();
|
|
832
844
|
};
|
|
833
845
|
}, [
|
|
834
846
|
e,
|
|
@@ -842,9 +854,9 @@ function lt({ enabled: e, scene: t }) {
|
|
|
842
854
|
}
|
|
843
855
|
//#endregion
|
|
844
856
|
//#region src/components/Map/traffic/useManageTraffic.ts
|
|
845
|
-
var J = 2,
|
|
846
|
-
function
|
|
847
|
-
let o = (0, W.useRef)(window.devicePixelRatio), s = (0, W.useRef)(/* @__PURE__ */ new Map()), c = (0, W.useRef)(/* @__PURE__ */ new Map()), l = (0, W.useRef)(null), u = (0, W.useRef)(null), d = (0, W.useRef)(0), f = (0, W.useRef)(1), p = (0, W.useRef)(new
|
|
857
|
+
var J = 2, dt = J * 3.5, Y = J * 12, ft = Y * .7, pt = 8, mt = "transport_locations", ht = 150, gt = "#a4aab6", _t = 1e3, vt = 2e4, yt = 500;
|
|
858
|
+
function bt({ permission: e, scene: n, dataJsonUrl: r, websocketUrl: a }) {
|
|
859
|
+
let o = (0, W.useRef)(window.devicePixelRatio), s = (0, W.useRef)(/* @__PURE__ */ new Map()), c = (0, W.useRef)(/* @__PURE__ */ new Map()), l = (0, W.useRef)(null), u = (0, W.useRef)(null), d = (0, W.useRef)(0), f = (0, W.useRef)(1), p = (0, W.useRef)(new tt()), h = (0, W.useRef)(/* @__PURE__ */ new Map()), g = (0, W.useRef)(_t), _ = (0, W.useRef)(/* @__PURE__ */ new Map()), v = (0, W.useRef)(void 0);
|
|
848
860
|
(0, W.useEffect)(() => {
|
|
849
861
|
if (!e || !n) return;
|
|
850
862
|
let y = !1, b, x = n.rootLayer.children, S = c.current, C = s.current, w = p.current;
|
|
@@ -863,11 +875,11 @@ function yt({ permission: e, scene: n, dataJsonUrl: r, websocketUrl: a }) {
|
|
|
863
875
|
console.warn("useManageTraffic failed to get JSON", e);
|
|
864
876
|
}
|
|
865
877
|
if (y || !a || a.disabled || a.error) return;
|
|
866
|
-
o.current =
|
|
878
|
+
o.current = xt((e = (n = m()) == null ? void 0 : n.state().pixelSize) == null ? window.devicePixelRatio : e);
|
|
867
879
|
let c = new Map(a.routes.map(({ id: e, color: t }) => [e, t])), l = /* @__PURE__ */ new Map();
|
|
868
880
|
c.forEach((e) => {
|
|
869
|
-
l.set(e,
|
|
870
|
-
radius:
|
|
881
|
+
l.set(e, Ct({
|
|
882
|
+
radius: dt,
|
|
871
883
|
color: e,
|
|
872
884
|
scale: window.devicePixelRatio
|
|
873
885
|
}));
|
|
@@ -890,39 +902,39 @@ function yt({ permission: e, scene: n, dataJsonUrl: r, websocketUrl: a }) {
|
|
|
890
902
|
width: J
|
|
891
903
|
});
|
|
892
904
|
}
|
|
893
|
-
s.children.length && w.add(() =>
|
|
905
|
+
s.children.length && w.add(() => O(s));
|
|
894
906
|
}
|
|
895
907
|
let u = b[a], d = l.get(t);
|
|
896
908
|
u && d && r != null && r.length && (r.forEach((e) => {
|
|
897
909
|
u.children.push({
|
|
898
910
|
source: d,
|
|
899
|
-
bounds:
|
|
911
|
+
bounds: F(e.x, e.y, d.width, d.height, o.current)
|
|
900
912
|
});
|
|
901
|
-
}), u.children.length && w.add(() =>
|
|
913
|
+
}), u.children.length && w.add(() => O(u)));
|
|
902
914
|
});
|
|
903
915
|
let T = x.find((e) => e.name === R);
|
|
904
916
|
if (!T) {
|
|
905
917
|
console.warn(`useManageTraffic: the scene has no "${R}" layer`);
|
|
906
918
|
return;
|
|
907
919
|
}
|
|
908
|
-
let
|
|
920
|
+
let k = /* @__PURE__ */ new Map();
|
|
909
921
|
T.onScale = ({ pixelSize: e }) => {
|
|
910
|
-
o.current =
|
|
922
|
+
o.current = xt(e);
|
|
911
923
|
let t = [];
|
|
912
924
|
for (let e of b) {
|
|
913
925
|
let n = e.children;
|
|
914
926
|
for (let e of n) {
|
|
915
927
|
let n = e.source;
|
|
916
|
-
e.bounds =
|
|
928
|
+
e.bounds = F(e.bounds.center.x, e.bounds.center.y, n.width, n.height, o.current, e.bounds.rotation), t.push(e);
|
|
917
929
|
}
|
|
918
930
|
}
|
|
919
931
|
for (let e of s.current.values()) {
|
|
920
932
|
let n = e.source;
|
|
921
|
-
e.bounds =
|
|
933
|
+
e.bounds = F(e.bounds.center.x, e.bounds.center.y, n.width, n.height, o.current, e.bounds.rotation), t.push(e);
|
|
922
934
|
}
|
|
923
935
|
return t;
|
|
924
|
-
}, w.add(() =>
|
|
925
|
-
|
|
936
|
+
}, w.add(() => O(T)), c.forEach((e, t) => {
|
|
937
|
+
k.set(t, wt({
|
|
926
938
|
id: t,
|
|
927
939
|
width: Y,
|
|
928
940
|
height: Y,
|
|
@@ -930,17 +942,17 @@ function yt({ permission: e, scene: n, dataJsonUrl: r, websocketUrl: a }) {
|
|
|
930
942
|
scale: window.devicePixelRatio
|
|
931
943
|
}));
|
|
932
944
|
});
|
|
933
|
-
let
|
|
945
|
+
let A = wt({
|
|
934
946
|
id: "orphan",
|
|
935
947
|
width: Y,
|
|
936
948
|
height: Y,
|
|
937
|
-
color:
|
|
949
|
+
color: gt,
|
|
938
950
|
scale: window.devicePixelRatio
|
|
939
|
-
}),
|
|
951
|
+
}), j = null;
|
|
940
952
|
try {
|
|
941
953
|
let e = await i(`${t}icons/bus-white.svg`);
|
|
942
954
|
if (y) return;
|
|
943
|
-
|
|
955
|
+
j = se(e, ft, ft, window.devicePixelRatio);
|
|
944
956
|
} catch (e) {
|
|
945
957
|
console.error(e);
|
|
946
958
|
}
|
|
@@ -948,10 +960,10 @@ function yt({ permission: e, scene: n, dataJsonUrl: r, websocketUrl: a }) {
|
|
|
948
960
|
try {
|
|
949
961
|
var t;
|
|
950
962
|
let n = JSON.parse(e.data);
|
|
951
|
-
if (n.type !==
|
|
963
|
+
if (n.type !== mt) return;
|
|
952
964
|
let r = e.timeStamp || performance.now();
|
|
953
965
|
f.current = Math.round(r - d.current), d.current = r;
|
|
954
|
-
let i = Math.max((t = f.current) == null ?
|
|
966
|
+
let i = Math.max((t = f.current) == null ? yt : t, yt), a = T.children, s = !1;
|
|
955
967
|
n.data.forEach(({ id: e, x: t, y: n, route_id: r, hidden: c }) => {
|
|
956
968
|
var l;
|
|
957
969
|
if (S.has(e)) {
|
|
@@ -960,44 +972,44 @@ function yt({ permission: e, scene: n, dataJsonUrl: r, websocketUrl: a }) {
|
|
|
960
972
|
}
|
|
961
973
|
let d = C.get(e), f = (l = C.get(Z(e))) == null ? null : l;
|
|
962
974
|
if (c && d && f) {
|
|
963
|
-
d.hidden = !0, f.hidden = !0, w.add(() =>
|
|
975
|
+
d.hidden = !0, f.hidden = !0, w.add(() => O(d, f));
|
|
964
976
|
return;
|
|
965
977
|
}
|
|
966
978
|
if (_.current.set(e, performance.now()), !d) {
|
|
967
979
|
var p;
|
|
968
|
-
let i = (p =
|
|
980
|
+
let i = (p = k.get(r)) == null ? A : p, c = {
|
|
969
981
|
source: i,
|
|
970
|
-
bounds:
|
|
982
|
+
bounds: F(t, n, i.width, i.height, o.current, 0)
|
|
971
983
|
};
|
|
972
|
-
if (C.set(e, c),
|
|
984
|
+
if (C.set(e, c), j) {
|
|
973
985
|
let r = Z(e), i = {
|
|
974
|
-
source:
|
|
975
|
-
bounds:
|
|
986
|
+
source: j,
|
|
987
|
+
bounds: F(t, n, j.width, j.height, o.current, 0)
|
|
976
988
|
};
|
|
977
|
-
|
|
989
|
+
j.setAttribute("id", r), C.set(r, i), a.push(c, i);
|
|
978
990
|
} else a.push(c);
|
|
979
991
|
s = !0;
|
|
980
992
|
return;
|
|
981
993
|
}
|
|
982
|
-
let m = d.bounds.center, g =
|
|
994
|
+
let m = d.bounds.center, g = Ot(m, {
|
|
983
995
|
x: t,
|
|
984
996
|
y: n
|
|
985
997
|
}, h.current.get(r));
|
|
986
|
-
if (g.reduce((e, t, n) => n === 0 ? e : e + X(g[n - 1], t), 0) >=
|
|
998
|
+
if (g.reduce((e, t, n) => n === 0 ? e : e + X(g[n - 1], t), 0) >= ht || document.hidden) Tt({
|
|
987
999
|
updateQueue: w,
|
|
988
1000
|
vehicle: d,
|
|
989
1001
|
vehicleFinery: f,
|
|
990
1002
|
x: t,
|
|
991
1003
|
y: n,
|
|
992
1004
|
scale: o.current,
|
|
993
|
-
angle:
|
|
1005
|
+
angle: St(d.bounds.center, {
|
|
994
1006
|
x: t,
|
|
995
1007
|
y: n
|
|
996
1008
|
})
|
|
997
1009
|
});
|
|
998
1010
|
else {
|
|
999
|
-
let t =
|
|
1000
|
-
|
|
1011
|
+
let t = kt(g, i, (e) => {
|
|
1012
|
+
Tt({
|
|
1001
1013
|
updateQueue: w,
|
|
1002
1014
|
vehicle: d,
|
|
1003
1015
|
vehicleFinery: f,
|
|
@@ -1009,11 +1021,11 @@ function yt({ permission: e, scene: n, dataJsonUrl: r, websocketUrl: a }) {
|
|
|
1009
1021
|
});
|
|
1010
1022
|
S.set(e, t);
|
|
1011
1023
|
}
|
|
1012
|
-
}), s && w.add(() =>
|
|
1024
|
+
}), s && w.add(() => O(T));
|
|
1013
1025
|
} catch (e) {
|
|
1014
1026
|
console.error("handleSocketMessage", e);
|
|
1015
1027
|
}
|
|
1016
|
-
}, d.current = performance.now(), E(), window.addEventListener("online", D),
|
|
1028
|
+
}, d.current = performance.now(), E(), window.addEventListener("online", D), ee(a.config ? (Number(a.config.vehicle_inactive_interval) || 20) * 1e3 : vt);
|
|
1017
1029
|
} catch (e) {
|
|
1018
1030
|
console.warn(e);
|
|
1019
1031
|
}
|
|
@@ -1022,7 +1034,7 @@ function yt({ permission: e, scene: n, dataJsonUrl: r, websocketUrl: a }) {
|
|
|
1022
1034
|
function E() {
|
|
1023
1035
|
var e, t;
|
|
1024
1036
|
y || ((e = l.current) == null ? void 0 : e.readyState) === WebSocket.OPEN || ((t = l.current) == null ? void 0 : t.readyState) === WebSocket.CONNECTING || (l.current = new WebSocket(a), l.current.onmessage = u.current, l.current.onopen = () => {
|
|
1025
|
-
g.current =
|
|
1037
|
+
g.current = _t;
|
|
1026
1038
|
}, l.current.onclose = () => {
|
|
1027
1039
|
y || !navigator.onLine || (b = window.setTimeout(E, g.current), g.current = Math.min(g.current * 2, 3e4));
|
|
1028
1040
|
});
|
|
@@ -1030,7 +1042,7 @@ function yt({ permission: e, scene: n, dataJsonUrl: r, websocketUrl: a }) {
|
|
|
1030
1042
|
function D() {
|
|
1031
1043
|
E();
|
|
1032
1044
|
}
|
|
1033
|
-
function
|
|
1045
|
+
function ee(e) {
|
|
1034
1046
|
clearInterval(v.current), !y && (v.current = window.setInterval(() => {
|
|
1035
1047
|
let t = performance.now(), n = [], r = [];
|
|
1036
1048
|
_.current.forEach((i, a) => {
|
|
@@ -1039,7 +1051,7 @@ function yt({ permission: e, scene: n, dataJsonUrl: r, websocketUrl: a }) {
|
|
|
1039
1051
|
o && (o.hidden = !0, r.push(o), n.push(a));
|
|
1040
1052
|
let s = Z(a), c = C.get(s);
|
|
1041
1053
|
c && (c.hidden = !0, r.push(c), n.push(s));
|
|
1042
|
-
}), r.length && w.add(() =>
|
|
1054
|
+
}), r.length && w.add(() => O(...r)), n.forEach((e) => _.current.delete(e));
|
|
1043
1055
|
}, e));
|
|
1044
1056
|
}
|
|
1045
1057
|
return () => {
|
|
@@ -1056,19 +1068,19 @@ function yt({ permission: e, scene: n, dataJsonUrl: r, websocketUrl: a }) {
|
|
|
1056
1068
|
a
|
|
1057
1069
|
]);
|
|
1058
1070
|
}
|
|
1059
|
-
function
|
|
1060
|
-
return Math.min(e || window.devicePixelRatio,
|
|
1071
|
+
function xt(e) {
|
|
1072
|
+
return Math.min(e || window.devicePixelRatio, pt);
|
|
1061
1073
|
}
|
|
1062
|
-
function
|
|
1063
|
-
return
|
|
1074
|
+
function St(e, t) {
|
|
1075
|
+
return I(e, t);
|
|
1064
1076
|
}
|
|
1065
|
-
function
|
|
1077
|
+
function Ct({ radius: e, scale: t, color: n }) {
|
|
1066
1078
|
let r = document.createElement("canvas"), i = r.getContext("2d");
|
|
1067
1079
|
i.imageSmoothingEnabled = !1;
|
|
1068
1080
|
let a = Math.ceil(e * 2 * t), o = a / 2, s = e * .78, c = e * .33;
|
|
1069
1081
|
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;
|
|
1070
1082
|
}
|
|
1071
|
-
function
|
|
1083
|
+
function wt({ id: e, width: t, height: n, color: r, scale: i }) {
|
|
1072
1084
|
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");
|
|
1073
1085
|
m.setAttribute("id", e), m.width = f, m.height = p;
|
|
1074
1086
|
let h = m.getContext("2d"), g = f / 2, _ = p / 2;
|
|
@@ -1082,13 +1094,13 @@ function X(e, t) {
|
|
|
1082
1094
|
function Z(e) {
|
|
1083
1095
|
return `${e}_finery`;
|
|
1084
1096
|
}
|
|
1085
|
-
function
|
|
1097
|
+
function Tt({ updateQueue: e, vehicle: t, vehicleFinery: n, x: r, y: i, scale: a, angle: o }) {
|
|
1086
1098
|
let s = t.source;
|
|
1087
|
-
if (t.bounds =
|
|
1099
|
+
if (t.bounds = F(r, i, s.width, s.height, a, o), t.hidden = !1, n) {
|
|
1088
1100
|
var c, l;
|
|
1089
1101
|
let o = (c = (l = m()) == null ? void 0 : l.state().roll) == null ? 0 : c, s = n.source;
|
|
1090
|
-
n.bounds =
|
|
1091
|
-
} else e.add(() =>
|
|
1102
|
+
n.bounds = F(r, i, s.width, s.height, a, P(o)), n.hidden = !1, e.add(() => O(n, t));
|
|
1103
|
+
} else e.add(() => O(t));
|
|
1092
1104
|
}
|
|
1093
1105
|
function Q(e, t, n) {
|
|
1094
1106
|
return {
|
|
@@ -1096,7 +1108,7 @@ function Q(e, t, n) {
|
|
|
1096
1108
|
y: e.y + (t.y - e.y) * n
|
|
1097
1109
|
};
|
|
1098
1110
|
}
|
|
1099
|
-
function
|
|
1111
|
+
function Et(e, t) {
|
|
1100
1112
|
let n = Infinity, r = {
|
|
1101
1113
|
index: 0,
|
|
1102
1114
|
t: 0
|
|
@@ -1110,7 +1122,7 @@ function Tt(e, t) {
|
|
|
1110
1122
|
}
|
|
1111
1123
|
return r;
|
|
1112
1124
|
}
|
|
1113
|
-
function
|
|
1125
|
+
function Dt(e, t, n) {
|
|
1114
1126
|
let r = X(e, t), i = Math.max(2, Math.ceil(r / n) + 1), a = [];
|
|
1115
1127
|
for (let n = 0; n < i; n++) {
|
|
1116
1128
|
let r = Q(e, t, n / (i - 1));
|
|
@@ -1118,14 +1130,14 @@ function Et(e, t, n) {
|
|
|
1118
1130
|
}
|
|
1119
1131
|
return a;
|
|
1120
1132
|
}
|
|
1121
|
-
function
|
|
1122
|
-
if (!n || !n.length) return
|
|
1123
|
-
let r =
|
|
1133
|
+
function Ot(e, t, n) {
|
|
1134
|
+
if (!n || !n.length) return Dt(e, t, 10);
|
|
1135
|
+
let r = Et(e, n), i = Et(t, n), a = [], o = (e) => a.push(e);
|
|
1124
1136
|
r.index + 1 < n.length ? o(Q(n[r.index], n[r.index + 1], r.t)) : o(n[r.index]);
|
|
1125
1137
|
for (let e = r.index + 1; e <= i.index && e < n.length; e++) o(n[e]);
|
|
1126
1138
|
return i.index + 1 < n.length ? o(Q(n[i.index], n[i.index + 1], i.t)) : o(n[i.index]), a;
|
|
1127
1139
|
}
|
|
1128
|
-
function
|
|
1140
|
+
function kt(e, t, n, r) {
|
|
1129
1141
|
if (e.length < 2) return () => {};
|
|
1130
1142
|
let i = null, a, o = [], s = 0;
|
|
1131
1143
|
for (let t = 0; t < e.length - 1; t++) {
|
|
@@ -1141,7 +1153,7 @@ function Ot(e, t, n, r) {
|
|
|
1141
1153
|
n({
|
|
1142
1154
|
x: h.x + (g.x - h.x) * v,
|
|
1143
1155
|
y: h.y + (g.y - h.y) * v,
|
|
1144
|
-
angle:
|
|
1156
|
+
angle: I(h, g)
|
|
1145
1157
|
}), d < 1 ? a = requestAnimationFrame(c) : r && r();
|
|
1146
1158
|
};
|
|
1147
1159
|
return a = requestAnimationFrame(c), () => {
|
|
@@ -1153,11 +1165,11 @@ function $(e) {
|
|
|
1153
1165
|
}
|
|
1154
1166
|
//#endregion
|
|
1155
1167
|
//#region src/utils/dimming.ts
|
|
1156
|
-
var
|
|
1157
|
-
function
|
|
1168
|
+
var At = .5, jt = "cubic";
|
|
1169
|
+
function Mt(e, t) {
|
|
1158
1170
|
return !e || e.rootLayer.dim === t ? !1 : (e.rootLayer.dim = t, !0);
|
|
1159
1171
|
}
|
|
1160
|
-
function
|
|
1172
|
+
function Nt(e, t = 300, n = jt) {
|
|
1161
1173
|
let r = null, i = 0, a = 0, o = 0, s = 0, c = Math.max(t, 0);
|
|
1162
1174
|
function l() {
|
|
1163
1175
|
r === null || typeof cancelAnimationFrame != "function" || (cancelAnimationFrame(r), r = null);
|
|
@@ -1166,7 +1178,7 @@ function Mt(e, t = 300, n = At) {
|
|
|
1166
1178
|
l(), i = t, e(i);
|
|
1167
1179
|
}
|
|
1168
1180
|
function d(t) {
|
|
1169
|
-
let l = t - s, u = Math.min(l / c, 1), f =
|
|
1181
|
+
let l = t - s, u = Math.min(l / c, 1), f = Pt(u, n);
|
|
1170
1182
|
if (i = a + (o - a) * f, e(i), u < 1) {
|
|
1171
1183
|
r = requestAnimationFrame(d);
|
|
1172
1184
|
return;
|
|
@@ -1192,11 +1204,11 @@ function Mt(e, t = 300, n = At) {
|
|
|
1192
1204
|
}
|
|
1193
1205
|
};
|
|
1194
1206
|
}
|
|
1195
|
-
function
|
|
1196
|
-
return t === "linear" ? e :
|
|
1207
|
+
function Pt(e, t) {
|
|
1208
|
+
return t === "linear" ? e : Ft(e);
|
|
1197
1209
|
}
|
|
1198
|
-
function
|
|
1210
|
+
function Ft(e) {
|
|
1199
1211
|
return e < .5 ? 4 * e * e * e : 1 - (-2 * e + 2) ** 3 / 2;
|
|
1200
1212
|
}
|
|
1201
1213
|
//#endregion
|
|
1202
|
-
export {
|
|
1214
|
+
export { ut as a, Ye as c, bt as i, Ge as l, Mt as n, et as o, Nt as r, Ze as s, At as t };
|