@expofp/floorplan 3.10.0 → 3.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/{Button-CbNlJYq-.js → Button-DdPvRBTh.js} +5 -5
- package/dist/browser/{CookieConsent-BVLqsKtm.js → CookieConsent-C39dYjaQ.js} +7 -7
- package/dist/browser/{Debug-DniNgMUO.js → Debug-B5r6LCAX.js} +7 -7
- package/dist/browser/{Demo-BXOuVfdG.js → Demo-Dbrjn3oi.js} +9 -9
- package/dist/browser/{Free-DbDrs1SH.js → Free-DUcGDkLZ.js} +9 -9
- package/dist/browser/{Gallery-CK2yO-rS.js → Gallery-CvO5_8hs.js} +9 -9
- package/dist/browser/{GpsLoader-B5WB_xlb.js → GpsLoader-Cybs-6Z0.js} +21 -21
- package/dist/browser/{KioskStore-CzIrPa11.js → KioskStore-Df_lwtgJ.js} +34 -34
- package/dist/browser/{MaplibreAdapter-CSa9XGJa.js → MaplibreAdapter-BgOzaHlx.js} +2387 -2387
- package/dist/browser/{ModalContainer-CduduGaw.js → ModalContainer-DXVCm1fb.js} +10 -10
- package/dist/browser/{PermissionNotice-B62dyKda.js → PermissionNotice-B0OJFFky.js} +6 -6
- package/dist/browser/{SetKioskMode-DvbL360U.js → SetKioskMode-BdOX40be.js} +12 -12
- package/dist/browser/ShowKiosk-cvnSTpd2.js +28 -0
- package/dist/browser/{TouchHand-BHu7qEu9.js → TouchHand-RDWCILm_.js} +4 -4
- package/dist/browser/{ViewerMenuPanel-TTUNLqUt.js → ViewerMenuPanel-BlCzm_mm.js} +10 -10
- package/dist/browser/{add-debug-secret-listener-DN1tIBbN.js → add-debug-secret-listener-lYBneebf.js} +1 -1
- package/dist/browser/{boolean-editor-CcJuEdkU.js → boolean-editor-C_bdHxC2.js} +9 -9
- package/dist/browser/{bootIntercom-DyEAiiah.js → bootIntercom-Bf4CaruD.js} +2 -2
- package/dist/browser/booth-by-xy-WnHwiopn.js +1067 -0
- package/dist/browser/{browser-Ctb0x-hW.js → browser-BGtGwkTn.js} +2 -2
- package/dist/browser/bundle.json +62 -62
- package/dist/browser/{classnames-CeriETl9.js → classnames-DRy7JPyJ.js} +2 -2
- package/dist/browser/{client-hS_SUT9J.js → client-BE52OM0U.js} +4 -4
- package/dist/browser/{components-CcIkwnTn.js → components-BfKSs6sY.js} +1647 -1647
- package/dist/browser/{debug-overlay-DBRVNju-.js → debug-overlay-mKmIzOYk.js} +10 -10
- package/dist/browser/{debug-ui-Vy_hMYMs.js → debug-ui-DLxMK2XU.js} +6 -6
- package/dist/browser/{dist-CyHdGr2I.js → dist-DSRSA5oz.js} +6 -6
- package/dist/browser/{dist-Bimiy1i5.js → dist-QsCYWHCu.js} +5 -5
- package/dist/browser/{dist-D3O88lUU.js → dist-eojWwYB5.js} +3 -3
- package/dist/browser/{efp-debug-init-C0HXaTIA.js → efp-debug-init-C5HgsgC2.js} +2 -2
- package/dist/browser/{enum-editor-DkQTyshB.js → enum-editor-BqpFqXiM.js} +11 -11
- package/dist/browser/{es5-BI29YLB7.js → es5-7bslpbjj.js} +2 -2
- package/dist/browser/{event-not-found-C45GofSi.js → event-not-found-Bc1SpnKw.js} +1 -1
- package/dist/browser/{exports-B2fVUjK8.js → exports-CYJRF2aW.js} +1 -1
- package/dist/browser/{favicon-CZB9txqZ.js → favicon-CRiidRYo.js} +1 -1
- package/dist/browser/{fetch-retry.umd-C_1YSqZv.js → fetch-retry.umd-Btwt1fg_.js} +2 -2
- package/dist/browser/{flex-C4nAB--c.js → flex-ITkzmA3C.js} +5 -5
- package/dist/browser/{floorplan.loader-D9ci7TWk.js → floorplan.loader-DJVlfwah.js} +11 -11
- package/dist/browser/{floorplan.ready-Cou1AYpA.js → floorplan.ready-7KwBZy9I.js} +156 -156
- package/dist/browser/{fuse-DLH3KYAO.js → fuse-CcYz7YAl.js} +2 -2
- package/dist/browser/{i18n-C0K3C5Jv.js → i18n-CeVxHTr1.js} +4 -4
- package/dist/browser/index.js +12 -12
- package/dist/browser/{index.module-BMETmKP4.js → index.module-CV2WVv52.js} +4 -4
- package/dist/browser/{is-webview-CxvtAxIZ.js → is-webview-BOqof5Uq.js} +1 -1
- package/dist/browser/{jsx-runtime-B9nB58Uq.js → jsx-runtime-BiSrB4Oo.js} +2 -2
- package/dist/browser/{lib-CcxG8Udi.js → lib-Dg9vXDVM.js} +4 -4
- package/dist/browser/{loadImage-B-fxupzg.js → loadImage-VYhbBgH6.js} +4 -4
- package/dist/browser/{logDeviceInfo-kZTVPeyv.js → logDeviceInfo-B8Mi-9H5.js} +9 -9
- package/dist/browser/{main-B_62LzEM.js → main-D6ItQIYj.js} +1 -1
- package/dist/browser/{mobx-CUQ-tbco.js → mobx-Deoo_wpx.js} +4 -4
- package/dist/browser/{particles.min-Csuxu9yr.js → particles.min-BNwqgit-.js} +2 -2
- package/dist/browser/{prop-types-B7Gun2Sn.js → prop-types-CuEYshV7.js} +2 -2
- package/dist/browser/{react-ZKXuYPAa.js → react-BMPhuMz9.js} +2 -2
- package/dist/browser/{react-dom-D82ielqJ.js → react-dom-DSdkXj0b.js} +3 -3
- package/dist/browser/{reset-all-settings-BwbmLw6_.js → reset-all-settings-C2yTiJ1V.js} +7 -7
- package/dist/browser/{rolldown-runtime-75nnKCA3.js → rolldown-runtime-I1EwXf_t.js} +1 -1
- package/dist/browser/{settings-CfbArDtc.js → settings-Dr8bs0FB.js} +2 -2
- package/dist/browser/{settings-item-R9UibMb5.js → settings-item-DjfyQTQB.js} +6 -6
- package/dist/browser/{store-DANngpFy.js → store-CVdrQCza.js} +6737 -5892
- package/dist/browser/{string-editor-CURRcjvv.js → string-editor-3sN4j-ci.js} +7 -7
- package/dist/browser/{theme-Nw3wi1eA.js → theme-BSTLt6eV.js} +8 -8
- package/dist/browser/{ui-CzHA_XVw.js → ui-CiFfwrN8.js} +8 -8
- package/dist/browser/{useRenderTarget-KMx97ZHc.js → useRenderTarget-DF7LdnYr.js} +4 -4
- package/dist/esm/components/Map/Map.js +1 -1
- package/dist/esm/components/Maplibre/useWayfindingAndMarkers.js +1 -1
- package/dist/esm/store/RouteStore.d.ts +1 -2
- package/dist/esm/store/RouteStore.js +1 -1
- package/dist/esm/wayfinding/adapters/canvasIconProvider.d.ts +1 -1
- package/dist/esm/wayfinding/adapters/canvasIconProvider.js +1 -1
- package/dist/esm/wayfinding/adapters/graphDataSource.d.ts +2 -1
- package/dist/esm/wayfinding/adapters/graphDataSource.js +1 -1
- package/dist/esm/wayfinding/adapters/index.d.ts +3 -4
- package/dist/esm/wayfinding/adapters/index.js +1 -1
- package/dist/esm/wayfinding/bindMobxReactions.d.ts +6 -0
- package/dist/esm/wayfinding/bindMobxReactions.js +1 -1
- package/dist/esm/wayfinding/core/__tests__/helpers.d.ts +4 -4
- package/dist/esm/wayfinding/core/createWayfindingEngine.js +1 -1
- package/dist/esm/wayfinding/core/graph/buildGraph.d.ts +1 -1
- package/dist/esm/wayfinding/core/graph/buildNGraph.d.ts +2 -2
- package/dist/esm/wayfinding/core/graph/findShortestPath.d.ts +2 -2
- package/dist/esm/wayfinding/core/graph/graphHelpers.d.ts +4 -4
- package/dist/esm/wayfinding/core/graph/graphHelpers.js +1 -1
- package/dist/esm/wayfinding/core/graph/linkCost.d.ts +2 -2
- package/dist/esm/wayfinding/core/index.d.ts +8 -8
- package/dist/esm/wayfinding/core/index.js +1 -1
- package/dist/esm/wayfinding/core/position/gpsThreshold.d.ts +2 -2
- package/dist/esm/wayfinding/core/routing/getRouteLength.d.ts +1 -1
- package/dist/esm/wayfinding/core/types.d.ts +19 -9
- package/dist/esm/wayfinding/createWayfinding.d.ts +15 -1
- package/dist/esm/wayfinding/createWayfinding.js +1 -1
- package/dist/esm/wayfinding/handlers/yahHandler.d.ts +3 -3
- package/dist/esm/wayfinding/handlers/yahHandler.js +1 -1
- package/dist/esm/wayfinding/index.d.ts +13 -0
- package/dist/esm/wayfinding/index.js +1 -0
- package/dist/esm/wayfinding/renderer/createWayfindingRenderer.js +1 -1
- package/dist/esm/wayfinding/renderer/iconManager.d.ts +3 -3
- package/dist/esm/wayfinding/renderer/routeLineManager.d.ts +5 -5
- package/dist/esm/wayfinding/renderer/trailManager.d.ts +2 -2
- package/dist/esm/wayfinding/runtime/createWayfindingRuntime.js +1 -1
- package/dist/esm/wayfinding/runtime/endpointView.d.ts +1 -2
- package/dist/esm/wayfinding/runtime/positionTrailView.d.ts +5 -6
- package/dist/esm/wayfinding/runtime/positionView.d.ts +2 -3
- package/dist/esm/wayfinding/runtime/routeUpdate.d.ts +3 -3
- package/dist/esm/wayfinding/runtime/trailView.d.ts +1 -2
- package/dist/esm/wayfinding/runtime/transitionView.d.ts +2 -3
- package/dist/esm/wayfinding/runtime/types.d.ts +10 -2
- package/package.json +4 -4
- package/dist/browser/ShowKiosk-CK47Q2V7.js +0 -28
- package/dist/browser/createWayfinding-D3oRCnRo.js +0 -1892
- package/dist/esm/wayfinding/adapters/iconProvider.d.ts +0 -15
- package/dist/esm/wayfinding/adapters/iconProvider.js +0 -1
|
@@ -1,1892 +0,0 @@
|
|
|
1
|
-
(function() {
|
|
2
|
-
try {
|
|
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.10.0" };
|
|
5
|
-
var t = new e.Error().stack;
|
|
6
|
-
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "c9ebbc1f-8955-473d-b39c-21b12c7b6cac", e._sentryDebugIdIdentifier = "sentry-dbid-c9ebbc1f-8955-473d-b39c-21b12c7b6cac");
|
|
7
|
-
} catch {}
|
|
8
|
-
})();
|
|
9
|
-
import { r as e } from "./rolldown-runtime-75nnKCA3.js";
|
|
10
|
-
import { t } from "./react-ZKXuYPAa.js";
|
|
11
|
-
import { t as n } from "./loadImage-B-fxupzg.js";
|
|
12
|
-
import { M as r, lt as i, p as a, v as o } from "./i18n-C0K3C5Jv.js";
|
|
13
|
-
import { $ as s, B as c, Bt as l, Ct as u, Et as d, F as f, Ft as p, G as m, Gt as h, H as g, I as _, J as v, K as y, L as b, Lt as x, M as S, N as C, Nt as w, Pt as T, Q as E, R as D, Rt as O, Sn as k, Tt as ee, Ut as A, V as j, Vt as M, W as te, Wt as N, X as ne, Xt as re, Y as ie, Z as ae, Zt as oe, _n as se, bn as P, cn as ce, et as le, gn as ue, hn as de, i as F, j as fe, jt as pe, ln as me, mn as I, o as L, on as he, p as ge, qt as _e, rn as ve, s as ye, st as R, t as z, tt as be, un as xe, vn as Se, xt as Ce, yn as we, z as Te, zt as Ee } from "./store-DANngpFy.js";
|
|
14
|
-
//#region src/wayfinding/layers.ts
|
|
15
|
-
var De = "wf-points", Oe = "wf-trail-points", ke = "wf-lines", Ae = "wf-lines-animated", je = "wf-current-position", Me = "traffic_route", Ne = "traffic_route_stop", Pe = "traffic_vehicles", Fe = "build_route_lines", Ie = "build_route_dots", Le = 5;
|
|
16
|
-
function Re() {
|
|
17
|
-
let e = [];
|
|
18
|
-
for (let t = 0; t < Le; t++) e.push({
|
|
19
|
-
name: ze(t),
|
|
20
|
-
children: []
|
|
21
|
-
}), e.push({
|
|
22
|
-
name: Be(t),
|
|
23
|
-
children: [],
|
|
24
|
-
interactive: !0
|
|
25
|
-
});
|
|
26
|
-
return e.push({
|
|
27
|
-
name: Pe,
|
|
28
|
-
children: [],
|
|
29
|
-
interactive: !0
|
|
30
|
-
}), e.push({
|
|
31
|
-
name: Fe,
|
|
32
|
-
children: []
|
|
33
|
-
}), e.push({
|
|
34
|
-
name: Ie,
|
|
35
|
-
children: [],
|
|
36
|
-
interactive: !0
|
|
37
|
-
}), e;
|
|
38
|
-
}
|
|
39
|
-
function ze(e) {
|
|
40
|
-
return `${Me}_${e + 1}`;
|
|
41
|
-
}
|
|
42
|
-
function Be(e) {
|
|
43
|
-
return `${Ne}_${e + 1}`;
|
|
44
|
-
}
|
|
45
|
-
function Ve() {
|
|
46
|
-
return RegExp(`^${Me}_\\d+$`);
|
|
47
|
-
}
|
|
48
|
-
function He() {
|
|
49
|
-
return RegExp(`^${Ne}_\\d+$`);
|
|
50
|
-
}
|
|
51
|
-
//#endregion
|
|
52
|
-
//#region src/components/Map/drawing/config/config-booth-badge.ts
|
|
53
|
-
var Ue = /* @__PURE__ */ e(me(), 1), We = .5, Ge = .3, Ke = 15, qe = 24, Je = 30, Ye = 12, Xe = .8, Ze = document.createElement("canvas").getContext("2d");
|
|
54
|
-
function Qe(e) {
|
|
55
|
-
return e.length <= Ke ? e : e.slice(0, Ke - 1) + "…";
|
|
56
|
-
}
|
|
57
|
-
function $e(e) {
|
|
58
|
-
var t, n;
|
|
59
|
-
if (!((t = e.paths) != null && t.length)) return [];
|
|
60
|
-
let r = ((n = e.layer) == null ? void 0 : n.name) || "", i = [];
|
|
61
|
-
for (let t of e.paths) for (let e of he(t.index, r)) i.push(e);
|
|
62
|
-
return i;
|
|
63
|
-
}
|
|
64
|
-
function et(e) {
|
|
65
|
-
let t = $e(e);
|
|
66
|
-
return t.length ? I.fromPoints(t.flat().map(([e, t]) => ({
|
|
67
|
-
x: e,
|
|
68
|
-
y: t
|
|
69
|
-
}))) : null;
|
|
70
|
-
}
|
|
71
|
-
function tt(e) {
|
|
72
|
-
let t = [], n = [];
|
|
73
|
-
for (let r of e) {
|
|
74
|
-
let e = t.length;
|
|
75
|
-
t.push({
|
|
76
|
-
x: r[0][0],
|
|
77
|
-
y: r[0][1]
|
|
78
|
-
}), t.push({
|
|
79
|
-
x: r[1][0],
|
|
80
|
-
y: r[1][1]
|
|
81
|
-
}), t.push({
|
|
82
|
-
x: r[2][0],
|
|
83
|
-
y: r[2][1]
|
|
84
|
-
}), n.push([
|
|
85
|
-
e,
|
|
86
|
-
e + 1,
|
|
87
|
-
e + 2
|
|
88
|
-
]);
|
|
89
|
-
}
|
|
90
|
-
return new se(t, n);
|
|
91
|
-
}
|
|
92
|
-
function B(e, t, n) {
|
|
93
|
-
return n.containsPoint({
|
|
94
|
-
x: e,
|
|
95
|
-
y: t
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
function nt(e, t, n, r, i, a, o) {
|
|
99
|
-
if (!e.length || !B(n, r, t)) return o;
|
|
100
|
-
let s = 0, c = o;
|
|
101
|
-
for (let e = 0; e < 10; e++) {
|
|
102
|
-
let e = (s + c) / 2, o = i * e, l = a * e;
|
|
103
|
-
B(n + o, r, t) && B(n, r + l, t) && B(n + o, r + l, t) ? s = e : c = e;
|
|
104
|
-
}
|
|
105
|
-
return s;
|
|
106
|
-
}
|
|
107
|
-
function rt(e) {
|
|
108
|
-
var t;
|
|
109
|
-
return (t = et(e)) == null ? e.rect : t;
|
|
110
|
-
}
|
|
111
|
-
function it(e, t, n, r, i) {
|
|
112
|
-
let a = rt(e);
|
|
113
|
-
if (t.length) {
|
|
114
|
-
let e = /* @__PURE__ */ new Set(), i = null, o = Infinity;
|
|
115
|
-
for (let s of t) for (let t of s) {
|
|
116
|
-
let s = `${t[0]},${t[1]}`;
|
|
117
|
-
if (e.has(s)) continue;
|
|
118
|
-
e.add(s);
|
|
119
|
-
let c = t[0] + r, l = t[1] + r;
|
|
120
|
-
if (B(c, l, n)) {
|
|
121
|
-
let e = c - a.min.x + (l - a.min.y);
|
|
122
|
-
e < o && (o = e, i = {
|
|
123
|
-
x: c,
|
|
124
|
-
y: l
|
|
125
|
-
});
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
if (i) return i;
|
|
129
|
-
}
|
|
130
|
-
let o = e.rect.min.x + r, s = e.rect.min.y + r;
|
|
131
|
-
return i ? we({
|
|
132
|
-
x: o,
|
|
133
|
-
y: s
|
|
134
|
-
}, i, e.rect.center) : {
|
|
135
|
-
x: o,
|
|
136
|
-
y: s
|
|
137
|
-
};
|
|
138
|
-
}
|
|
139
|
-
function V(e) {
|
|
140
|
-
return e && e !== "none" ? e : void 0;
|
|
141
|
-
}
|
|
142
|
-
function at(e) {
|
|
143
|
-
var t;
|
|
144
|
-
let n = V(e.borderColor) || V(k.boothBorderColor) || k.colors.booths.default;
|
|
145
|
-
return ((t = e.paths) == null ? void 0 : t.length) > 1 && V(e.paths[e.paths.length - 1].color) || n;
|
|
146
|
-
}
|
|
147
|
-
function ot(e, t) {
|
|
148
|
-
var n;
|
|
149
|
-
let r = Qe(t.title || t.name), i = at(t), a = ge((0, Ue.default)(i).hex()), s = window.devicePixelRatio || 1, c = ee();
|
|
150
|
-
Ze.font = oe(Je, c);
|
|
151
|
-
let l = Ze.measureText(r).width, u = Math.ceil(l + Ye * 2), f = (t.borderWidth || z.borderWidth) / 2, p = u * Xe, m = 54 * Xe, h = (n = t.rotate) == null ? 0 : n, g = t.rect.size.width, _ = t.rect.size.height, v = Math.min(g > 0 ? g * We / p : Infinity, _ > 0 ? _ * Ge / m : Infinity), y = $e(t), b = tt(y), { x: S, y: C } = it(t, y, b, f, h), w = nt(y, b, S, C, p, m, v), T = (e, t) => {
|
|
152
|
-
let n = e / 2, r = t / 2;
|
|
153
|
-
return new ue(we({
|
|
154
|
-
x: S + n,
|
|
155
|
-
y: C + r
|
|
156
|
-
}, h, {
|
|
157
|
-
x: S,
|
|
158
|
-
y: C
|
|
159
|
-
}), {
|
|
160
|
-
x: e,
|
|
161
|
-
y: t
|
|
162
|
-
}, h);
|
|
163
|
-
}, E = (e) => {
|
|
164
|
-
let t = Math.min(e, w);
|
|
165
|
-
return T(p * t, m * t);
|
|
166
|
-
}, D = d(c, e.fontUrls), k = x(T(1, 1), i);
|
|
167
|
-
k.hidden = !0, k.dim = t.skipDim ? !1 : void 0;
|
|
168
|
-
let j = O(Ee([[r], []], a, 0, [D, D]), T(1, 1), [0, 0], {
|
|
169
|
-
horizontal: "center",
|
|
170
|
-
vertical: "center"
|
|
171
|
-
});
|
|
172
|
-
j.hidden = !0, j.dim = t.skipDim ? !1 : void 0;
|
|
173
|
-
let M = () => !!(t.layer && !t.layer.visible);
|
|
174
|
-
return o(() => t.skipDim, (t) => {
|
|
175
|
-
k.dim = t ? !1 : void 0, j.dim = t ? !1 : void 0, e.update(k, j);
|
|
176
|
-
}), o(() => {
|
|
177
|
-
var e, n;
|
|
178
|
-
return (e = (n = t.layer) == null ? void 0 : n.visible) == null ? !0 : e;
|
|
179
|
-
}, (t) => {
|
|
180
|
-
k.hidden = !t, j.hidden = !t, e.update(k, j);
|
|
181
|
-
}), e.onPtScale(`badge-bg-${t.id}`, (e) => (k.shape = A(E(e)), k.hidden = M(), k)), e.onPtScale(`badge-text-${t.id}`, (e) => {
|
|
182
|
-
let t = Math.min(e, w);
|
|
183
|
-
return j.lines[0].fontSize = qe / s * t, j.bounds = A(E(e)), j.hidden = M(), j;
|
|
184
|
-
}), {
|
|
185
|
-
bg: k,
|
|
186
|
-
text: j
|
|
187
|
-
};
|
|
188
|
-
}
|
|
189
|
-
function st(e, t, n) {
|
|
190
|
-
if (ce.hideExhibitorBoothNumber) return null;
|
|
191
|
-
let r = [], i = [];
|
|
192
|
-
for (let t of n) if (t instanceof ve && t.noLabels && !ye.hideLogoInBooth && t.exhibitors.some((e) => e.logoInBooth && e.logo)) {
|
|
193
|
-
let { bg: n, text: a } = ot(e, t);
|
|
194
|
-
r.push(n), i.push(a);
|
|
195
|
-
}
|
|
196
|
-
return r.length ? {
|
|
197
|
-
name: `${t}:badges`,
|
|
198
|
-
children: [{
|
|
199
|
-
name: `${t}:badgeBgs`,
|
|
200
|
-
children: r
|
|
201
|
-
}, {
|
|
202
|
-
name: `${t}:badgeTexts`,
|
|
203
|
-
children: i
|
|
204
|
-
}]
|
|
205
|
-
} : null;
|
|
206
|
-
}
|
|
207
|
-
//#endregion
|
|
208
|
-
//#region src/components/Map/drawing/config/config-markers.ts
|
|
209
|
-
var ct = "_selected", lt = "markers";
|
|
210
|
-
function ut(e) {
|
|
211
|
-
let t = [], n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map(), i = [], a = e.scene.rootLayer.children.find((e) => e.name === lt);
|
|
212
|
-
async function s(e) {
|
|
213
|
-
let t = [];
|
|
214
|
-
e.forEach((e) => {
|
|
215
|
-
let { name: r, content: i, width: a, height: o, scale: s } = e;
|
|
216
|
-
if (n.has(r)) return;
|
|
217
|
-
let c = new Image(), l = new Promise((e, t) => {
|
|
218
|
-
c.onload = () => {
|
|
219
|
-
n.set(r, {
|
|
220
|
-
img: c,
|
|
221
|
-
width: a,
|
|
222
|
-
height: o,
|
|
223
|
-
scale: s
|
|
224
|
-
}), e();
|
|
225
|
-
}, c.onerror = (e) => {
|
|
226
|
-
t(e);
|
|
227
|
-
};
|
|
228
|
-
});
|
|
229
|
-
t.push(l), c.src = i, c.crossOrigin = "anonymous";
|
|
230
|
-
}), await Promise.all(t);
|
|
231
|
-
}
|
|
232
|
-
let c = (e) => `marker-ptScaleHandlers-${e.id}`, l = (e) => `marker-rollHandlers-${e.id}`, u = (t, n) => {
|
|
233
|
-
e.onPtScale(n, (e) => {
|
|
234
|
-
let { center: n, rotation: r } = t.bounds, { width: i, height: a } = t.source;
|
|
235
|
-
return t.bounds = A(h(n.x, n.y, i, a, e, r)), t;
|
|
236
|
-
});
|
|
237
|
-
}, d = (t, n) => {
|
|
238
|
-
e.onRoll(n, (e) => (t.bounds.rotation = e, t));
|
|
239
|
-
};
|
|
240
|
-
function f() {
|
|
241
|
-
let t = L.routeStore.markersData.markers;
|
|
242
|
-
if (!t.length) return;
|
|
243
|
-
i = [];
|
|
244
|
-
let o = e.scale, s = P(e.angle);
|
|
245
|
-
t.forEach((e) => {
|
|
246
|
-
var t, a;
|
|
247
|
-
let c = n.get(e.icon);
|
|
248
|
-
if (!c) return;
|
|
249
|
-
let l = c.scale || window.devicePixelRatio, u = e.icon;
|
|
250
|
-
if (!r.has(u)) {
|
|
251
|
-
let e = re(c.img, c.width, c.height, l);
|
|
252
|
-
r.set(u, e);
|
|
253
|
-
}
|
|
254
|
-
let d = r.get(u), f = n.get(e.selectedIcon), p = e.selectedIcon;
|
|
255
|
-
if (!r.has(p)) {
|
|
256
|
-
let e = re(f.img, f.width, f.height, l);
|
|
257
|
-
r.set(p, e);
|
|
258
|
-
}
|
|
259
|
-
let m = r.get(p), g = (t = (a = F.findLayer(e.z)) == null ? void 0 : a.visible) == null ? !0 : t, _ = h(e.x, e.y, d.width, d.height, o, s), v = h(e.x, e.y, m.width, m.height, o, s), y;
|
|
260
|
-
switch (e.position) {
|
|
261
|
-
case "lefttop":
|
|
262
|
-
y = [0, 0];
|
|
263
|
-
break;
|
|
264
|
-
case "centertop":
|
|
265
|
-
y = [.5, 0];
|
|
266
|
-
break;
|
|
267
|
-
case "centerbottom":
|
|
268
|
-
y = [.5, 1];
|
|
269
|
-
break;
|
|
270
|
-
default: y = [.5, .5];
|
|
271
|
-
}
|
|
272
|
-
let b = {
|
|
273
|
-
...w(d, _, {
|
|
274
|
-
hidden: !g,
|
|
275
|
-
origin: y
|
|
276
|
-
}),
|
|
277
|
-
id: e.id,
|
|
278
|
-
scale: l
|
|
279
|
-
}, x = {
|
|
280
|
-
...w(m, v, {
|
|
281
|
-
hidden: !(g && e.active),
|
|
282
|
-
origin: y
|
|
283
|
-
}),
|
|
284
|
-
id: `${e.id}${ct}`,
|
|
285
|
-
scale: l
|
|
286
|
-
};
|
|
287
|
-
i.push(b, x);
|
|
288
|
-
}), a.children = i, i.forEach((e) => {
|
|
289
|
-
u(e, c(e)), d(e, l(e));
|
|
290
|
-
});
|
|
291
|
-
}
|
|
292
|
-
function p() {
|
|
293
|
-
i.forEach((t) => {
|
|
294
|
-
e.ptScaleRegistry.unregisterByName(c(t)), e.rollRegistry.unregisterByName(l(t));
|
|
295
|
-
}), a.children = [], i = [];
|
|
296
|
-
}
|
|
297
|
-
function m() {
|
|
298
|
-
let e = L.routeStore.markersData.markers;
|
|
299
|
-
e.length && e.forEach((e) => {
|
|
300
|
-
var t, n;
|
|
301
|
-
let r = i.find((t) => t.id === e.id), a = i.find((t) => t.id === `${e.id}${ct}`);
|
|
302
|
-
if (!r) return;
|
|
303
|
-
let o = (t = (n = F.findLayer(e.z)) == null ? void 0 : n.visible) == null ? !0 : t;
|
|
304
|
-
e.active ? (r.hidden = !0, a.hidden = !(o && e.active)) : (r.hidden = !o, a.hidden = !0);
|
|
305
|
-
});
|
|
306
|
-
}
|
|
307
|
-
return t.push(o(() => [L.routeStore.selectedMarkers, L.layerStore.visible], () => {
|
|
308
|
-
if (!L.routeStore.markersData.markers.length) {
|
|
309
|
-
p(), e.update(a);
|
|
310
|
-
return;
|
|
311
|
-
}
|
|
312
|
-
m(), e.update(...i);
|
|
313
|
-
})), t.push(o(() => L.routeStore.markersData.markers, () => {
|
|
314
|
-
s(L.routeStore.markersData.icons).then(() => {
|
|
315
|
-
f(), e.update(a);
|
|
316
|
-
});
|
|
317
|
-
}, { fireImmediately: !0 })), function() {
|
|
318
|
-
t.forEach((e) => e()), t.length = 0;
|
|
319
|
-
};
|
|
320
|
-
}
|
|
321
|
-
function dt(e, t, n) {
|
|
322
|
-
for (let r of L.routeStore.markersData.markers) {
|
|
323
|
-
let i = L.routeStore.markersData.icons.find((e) => e.name === r.icon);
|
|
324
|
-
if (!i) continue;
|
|
325
|
-
let a = i.width * n * devicePixelRatio, o = i.height * n * devicePixelRatio;
|
|
326
|
-
if (ft(e, t, r.x, r.y, a, o)) {
|
|
327
|
-
let e = L.layerStore.findLayer(r.z);
|
|
328
|
-
if (!e || e && e.visible) return r;
|
|
329
|
-
}
|
|
330
|
-
}
|
|
331
|
-
return null;
|
|
332
|
-
}
|
|
333
|
-
function ft(e, t, n, r, i, a) {
|
|
334
|
-
return I.fromCenter({
|
|
335
|
-
x: n,
|
|
336
|
-
y: r
|
|
337
|
-
}, {
|
|
338
|
-
x: 2 * i,
|
|
339
|
-
y: 2 * a
|
|
340
|
-
}).containsPoint({
|
|
341
|
-
x: e,
|
|
342
|
-
y: t
|
|
343
|
-
});
|
|
344
|
-
}
|
|
345
|
-
//#endregion
|
|
346
|
-
//#region src/components/Map/drawing/config/config-all.ts
|
|
347
|
-
function pt(e) {
|
|
348
|
-
let { layers: t, defaultLayer: n } = L.layerStore;
|
|
349
|
-
if (n) {
|
|
350
|
-
let e = [].concat(t), r = t.find((e) => e === n), i = t.indexOf(r);
|
|
351
|
-
e.splice(i, 1), t = [r].concat(e);
|
|
352
|
-
}
|
|
353
|
-
let r = t.filter((e) => !e.rootParent).map((t) => u(t, e));
|
|
354
|
-
return Promise.all(r).then((t) => {
|
|
355
|
-
let n = T(De, [], {
|
|
356
|
-
dim: !1,
|
|
357
|
-
interactive: !0
|
|
358
|
-
}), r = T(ke, [], { dim: !1 }), i = T(lt, []), a = T(Oe, [], { dim: !1 }), o = T(Ae, [], { dim: !1 }), s = T(je, [], { dim: !1 }), c = [], l = [];
|
|
359
|
-
for (let e of t.flat()) _e(e.name) ? (e.dim = !1, l.push(e)) : c.push(e);
|
|
360
|
-
let u = st(e, "root", L.boothStore.booths);
|
|
361
|
-
return [
|
|
362
|
-
...c,
|
|
363
|
-
...u ? [u] : [],
|
|
364
|
-
...l,
|
|
365
|
-
...Re(),
|
|
366
|
-
i,
|
|
367
|
-
a,
|
|
368
|
-
r,
|
|
369
|
-
o,
|
|
370
|
-
n,
|
|
371
|
-
s
|
|
372
|
-
];
|
|
373
|
-
});
|
|
374
|
-
}
|
|
375
|
-
//#endregion
|
|
376
|
-
//#region src/components/Map/traffic/UpdateQueue.ts
|
|
377
|
-
var H = /* @__PURE__ */ e(t(), 1), mt = class {
|
|
378
|
-
constructor() {
|
|
379
|
-
this.queue = [], this.isProcessing = !1, this.rafId = null, this.CHUNK_SIZE = 100, this.TIME_BUDGET = 4;
|
|
380
|
-
}
|
|
381
|
-
add(e) {
|
|
382
|
-
this.queue.push(e), this.scheduleProcessing();
|
|
383
|
-
}
|
|
384
|
-
scheduleProcessing() {
|
|
385
|
-
this.isProcessing || this.queue.length === 0 || (this.isProcessing = !0, this.queue.length <= this.CHUNK_SIZE * 2 ? Promise.resolve().then(() => this.processMicrotaskQueue()) : this.rafId = requestAnimationFrame((e) => {
|
|
386
|
-
this.processQueue(e);
|
|
387
|
-
}));
|
|
388
|
-
}
|
|
389
|
-
processMicrotaskQueue() {
|
|
390
|
-
let e = performance.now(), t = 0;
|
|
391
|
-
for (; this.queue.length > 0 && t < this.CHUNK_SIZE;) {
|
|
392
|
-
let n = this.queue.shift();
|
|
393
|
-
try {
|
|
394
|
-
n();
|
|
395
|
-
} catch (e) {
|
|
396
|
-
console.warn("UpdateQueue task error:", e);
|
|
397
|
-
}
|
|
398
|
-
if (t++, performance.now() - e > this.TIME_BUDGET) break;
|
|
399
|
-
}
|
|
400
|
-
this.queue.length > 0 ? Promise.resolve().then(() => this.processMicrotaskQueue()) : this.isProcessing = !1;
|
|
401
|
-
}
|
|
402
|
-
processQueue(e) {
|
|
403
|
-
this.rafId = null;
|
|
404
|
-
let t = 0;
|
|
405
|
-
for (; this.queue.length > 0 && t < this.CHUNK_SIZE;) {
|
|
406
|
-
let n = this.queue.shift();
|
|
407
|
-
try {
|
|
408
|
-
n();
|
|
409
|
-
} catch (e) {
|
|
410
|
-
console.warn("UpdateQueue task error:", e);
|
|
411
|
-
}
|
|
412
|
-
if (t++, performance.now() - e > this.TIME_BUDGET) break;
|
|
413
|
-
}
|
|
414
|
-
this.queue.length > 0 ? this.rafId = requestAnimationFrame((e) => this.processQueue(e)) : this.isProcessing = !1;
|
|
415
|
-
}
|
|
416
|
-
destroy() {
|
|
417
|
-
this.rafId !== null && (cancelAnimationFrame(this.rafId), this.rafId = null), this.queue = [], this.isProcessing = !1;
|
|
418
|
-
}
|
|
419
|
-
}, U = 49, ht = `hsl(257, 76%, ${U}%)`, gt = `hsl(339.903, 82%, ${U}%)`, _t = `hsl(257, 76%, ${Math.round(U * 1.82)}%)`, W = 4, vt = W, yt = "U", bt = "R", xt = "S", St = "P", Ct = class {
|
|
420
|
-
constructor() {
|
|
421
|
-
this._state = [[]], this.index = 0, this.pointHashSet = /* @__PURE__ */ new Set(), this.locked = !1, this.storageKey = "expofp_build_route_state", this._selected = 0;
|
|
422
|
-
}
|
|
423
|
-
get points() {
|
|
424
|
-
return this._state[this.index];
|
|
425
|
-
}
|
|
426
|
-
set points(e) {
|
|
427
|
-
this._state.push(e), this.setIndex(), this.save();
|
|
428
|
-
}
|
|
429
|
-
setIndex() {
|
|
430
|
-
this.index = Math.max(this._state.length - 1, 0);
|
|
431
|
-
}
|
|
432
|
-
genPointHash(e) {
|
|
433
|
-
return `${e.x},${e.y}`;
|
|
434
|
-
}
|
|
435
|
-
add(e) {
|
|
436
|
-
let t = this.genPointHash(e);
|
|
437
|
-
this.pointHashSet.has(t) || (this.pointHashSet.add(t), this.points = [...this.points, e]);
|
|
438
|
-
}
|
|
439
|
-
undo() {
|
|
440
|
-
this.index && (this._state.pop(), this.setIndex(), this.save(), this.select(this.points.length - 1));
|
|
441
|
-
}
|
|
442
|
-
execute(e) {
|
|
443
|
-
try {
|
|
444
|
-
if (this.locked) return;
|
|
445
|
-
this.locked = !0, e();
|
|
446
|
-
} finally {
|
|
447
|
-
requestAnimationFrame(() => {
|
|
448
|
-
this.locked = !1;
|
|
449
|
-
});
|
|
450
|
-
}
|
|
451
|
-
}
|
|
452
|
-
log(e, t = 12) {
|
|
453
|
-
console.log(`%c${e}`, `color: black; font-size: ${t}px; background: LemonChiffon;`);
|
|
454
|
-
}
|
|
455
|
-
instruct() {
|
|
456
|
-
this.log(`How to Build a Route:
|
|
457
|
-
Add Point: Click on the map.
|
|
458
|
-
Apply Smoothing: Press ${bt}.
|
|
459
|
-
Apply Simplification: Press ${xt}.
|
|
460
|
-
Undo: Press ${yt}.
|
|
461
|
-
Enable/Disable Preview: Press ${St}.
|
|
462
|
-
`, 16);
|
|
463
|
-
}
|
|
464
|
-
applyChaikinSmoothing(e, t, n) {
|
|
465
|
-
let r = [];
|
|
466
|
-
if (n >= 1 && e.length >= 2) {
|
|
467
|
-
r = [e[0]];
|
|
468
|
-
for (let t = 1; t < e.length; t++) {
|
|
469
|
-
let i = e[t - 1], a = e[t];
|
|
470
|
-
for (let e = 1; e <= n; e++) {
|
|
471
|
-
let t = e / (n + 1);
|
|
472
|
-
r.push({
|
|
473
|
-
x: i.x + (a.x - i.x) * t,
|
|
474
|
-
y: i.y + (a.y - i.y) * t
|
|
475
|
-
});
|
|
476
|
-
}
|
|
477
|
-
r.push(a);
|
|
478
|
-
}
|
|
479
|
-
} else r = e.slice();
|
|
480
|
-
for (let e = 0; e < t && !(r.length < 2); e++) {
|
|
481
|
-
let e = [{ ...r[0] }];
|
|
482
|
-
for (let t = 1; t < r.length; t++) {
|
|
483
|
-
let n = r[t - 1], i = r[t];
|
|
484
|
-
e.push({
|
|
485
|
-
x: .75 * n.x + .25 * i.x,
|
|
486
|
-
y: .75 * n.y + .25 * i.y
|
|
487
|
-
}), e.push({
|
|
488
|
-
x: .25 * n.x + .75 * i.x,
|
|
489
|
-
y: .25 * n.y + .75 * i.y
|
|
490
|
-
});
|
|
491
|
-
}
|
|
492
|
-
e.push({ ...r[r.length - 1] }), r = e;
|
|
493
|
-
}
|
|
494
|
-
return r;
|
|
495
|
-
}
|
|
496
|
-
applySmoothing() {
|
|
497
|
-
this.points.length < 3 || (this.points = this.applyChaikinSmoothing(this.points, 1, 0), this.select(this.points.length - 1));
|
|
498
|
-
}
|
|
499
|
-
save() {
|
|
500
|
-
try {
|
|
501
|
-
this.points.length ? sessionStorage.setItem(this.storageKey, JSON.stringify(this.points)) : sessionStorage.removeItem(this.storageKey);
|
|
502
|
-
} catch (e) {
|
|
503
|
-
console.warn(e);
|
|
504
|
-
}
|
|
505
|
-
}
|
|
506
|
-
restore() {
|
|
507
|
-
try {
|
|
508
|
-
let e = sessionStorage.getItem(this.storageKey);
|
|
509
|
-
if (!e) return;
|
|
510
|
-
let t = JSON.parse(e);
|
|
511
|
-
if (!Array.isArray(t)) return;
|
|
512
|
-
t.forEach((e) => this.add(e)), this.select(this.points.length - 1);
|
|
513
|
-
} catch (e) {
|
|
514
|
-
console.warn(e);
|
|
515
|
-
}
|
|
516
|
-
}
|
|
517
|
-
topologyPreservingSimplify(e, t) {
|
|
518
|
-
if (e.length <= 2) return e.map((e) => ({ ...e }));
|
|
519
|
-
let n = (e, t, n) => {
|
|
520
|
-
let r = e.x, i = e.y, a = t.x, o = t.y, s = n.x, c = n.y;
|
|
521
|
-
return Math.abs((c - o) * r - (s - a) * i + s * o - c * a) / (Math.sqrt((c - o) ** 2 + (s - a) ** 2) || 1e-10);
|
|
522
|
-
}, r = (e, t, n, r) => {
|
|
523
|
-
let i = de({
|
|
524
|
-
p0: e,
|
|
525
|
-
p1: t
|
|
526
|
-
}, {
|
|
527
|
-
p0: n,
|
|
528
|
-
p1: r
|
|
529
|
-
});
|
|
530
|
-
return i !== null && i.onLine1 && i.onLine2;
|
|
531
|
-
}, i = Array(e.length).fill(!1);
|
|
532
|
-
i[0] = i[i.length - 1] = !0;
|
|
533
|
-
let a = [], o = (s, c) => {
|
|
534
|
-
if (c <= s + 1) return;
|
|
535
|
-
let l = e[s], u = e[c], d = 0, f = 0;
|
|
536
|
-
for (let t = s + 1; t < c; t++) {
|
|
537
|
-
let r = n(e[t], l, u);
|
|
538
|
-
r > d && (d = r, f = t);
|
|
539
|
-
}
|
|
540
|
-
if (d > t) {
|
|
541
|
-
let t = e[f], n = !0;
|
|
542
|
-
for (let e = 0; e < a.length - 1; e++) if (r(a[e], a[e + 1], l, t) || r(a[e], a[e + 1], t, u)) {
|
|
543
|
-
n = !1;
|
|
544
|
-
break;
|
|
545
|
-
}
|
|
546
|
-
n && (i[f] = !0, o(s, f), o(f, c));
|
|
547
|
-
}
|
|
548
|
-
};
|
|
549
|
-
return o(0, e.length - 1), e.filter((e, t) => i[t]);
|
|
550
|
-
}
|
|
551
|
-
applySimplification() {
|
|
552
|
-
this.points = this.topologyPreservingSimplify(this.points, .5), this.select(this.points.length - 1);
|
|
553
|
-
}
|
|
554
|
-
get selected() {
|
|
555
|
-
return this._selected;
|
|
556
|
-
}
|
|
557
|
-
select(e) {
|
|
558
|
-
this._selected = Math.max(0, Math.min(e, this.points.length - 1));
|
|
559
|
-
}
|
|
560
|
-
};
|
|
561
|
-
function wt({ enabled: e, rendererService: t }) {
|
|
562
|
-
let n = (0, H.useRef)(!1), r = (0, H.useRef)(), i = (0, H.useMemo)(() => N(W, ht), []), a = (0, H.useMemo)(() => N(W, gt), []), o = (0, H.useMemo)(() => new Ct(), []), s = (0, H.useRef)(new mt()), c = (0, H.useMemo)(() => {
|
|
563
|
-
if (!t.scene) return {};
|
|
564
|
-
let e = t.scene.rootLayer.children;
|
|
565
|
-
return {
|
|
566
|
-
linesLayer: e.find((e) => e.name === Fe),
|
|
567
|
-
pointsLayer: e.find((e) => e.name === Ie)
|
|
568
|
-
};
|
|
569
|
-
}, [t.scene]), u = (0, H.useCallback)(() => {
|
|
570
|
-
if (!(t != null && t.renderer) || !c || !i || !a) return;
|
|
571
|
-
let { linesLayer: e, pointsLayer: l } = c;
|
|
572
|
-
if (!e || !l) return;
|
|
573
|
-
let u = o.points, d = n.current;
|
|
574
|
-
d ? l.children.length = 0 : l.children = u.map(({ x: e, y: t }, n) => {
|
|
575
|
-
let s = n == o.selected ? a : i;
|
|
576
|
-
return {
|
|
577
|
-
source: s,
|
|
578
|
-
bounds: A(h(e, t, s.width, s.height, r.current))
|
|
579
|
-
};
|
|
580
|
-
});
|
|
581
|
-
let f = [];
|
|
582
|
-
for (let e = 1; e < u.length; e++) {
|
|
583
|
-
let t = u[e - 1], n = u[e];
|
|
584
|
-
f.push({
|
|
585
|
-
points: [t, n],
|
|
586
|
-
color: d ? ht : _t,
|
|
587
|
-
width: vt
|
|
588
|
-
});
|
|
589
|
-
}
|
|
590
|
-
f.length ? e.children = f : e.children.length = 0, s.current.add(() => t.update(l, e)), o.instruct(), o.log(JSON.stringify(o.points));
|
|
591
|
-
}, [
|
|
592
|
-
t,
|
|
593
|
-
o,
|
|
594
|
-
c,
|
|
595
|
-
i,
|
|
596
|
-
a
|
|
597
|
-
]), d = (0, H.useCallback)((e) => {
|
|
598
|
-
let t = e.key.toUpperCase();
|
|
599
|
-
o.execute(() => {
|
|
600
|
-
switch (t) {
|
|
601
|
-
case yt:
|
|
602
|
-
e.preventDefault(), o.undo(), n.current = !1, u();
|
|
603
|
-
break;
|
|
604
|
-
case bt:
|
|
605
|
-
e.preventDefault(), o.applySmoothing(), n.current = !1, u();
|
|
606
|
-
break;
|
|
607
|
-
case xt:
|
|
608
|
-
e.preventDefault(), o.applySimplification(), n.current = !1, u();
|
|
609
|
-
break;
|
|
610
|
-
case St:
|
|
611
|
-
e.preventDefault(), n.current = !n.current, u();
|
|
612
|
-
break;
|
|
613
|
-
}
|
|
614
|
-
});
|
|
615
|
-
}, [o, u]), f = (0, H.useCallback)(({ ptScale: e, sceneId: n }) => {
|
|
616
|
-
if (!l(n) || !(t != null && t.renderer) || !c) return;
|
|
617
|
-
let { pointsLayer: i } = c;
|
|
618
|
-
i && (r.current = e, o.execute(() => {
|
|
619
|
-
let e = i.children, n = [];
|
|
620
|
-
for (let t of e) t.bounds = A(h(t.bounds.center.x, t.bounds.center.y, t.source.width, t.source.height, r.current)), n.push(t);
|
|
621
|
-
s.current.add(() => t.update(...n));
|
|
622
|
-
}));
|
|
623
|
-
}, [
|
|
624
|
-
t,
|
|
625
|
-
c,
|
|
626
|
-
o
|
|
627
|
-
]), p = (0, H.useCallback)(({ data: e }) => {
|
|
628
|
-
o.execute(() => {
|
|
629
|
-
let { point: t } = M(e);
|
|
630
|
-
o.add({
|
|
631
|
-
x: t.x,
|
|
632
|
-
y: t.y
|
|
633
|
-
}), o.select(o.points.length - 1), u();
|
|
634
|
-
});
|
|
635
|
-
}, [o, u]);
|
|
636
|
-
(0, H.useEffect)(() => {
|
|
637
|
-
let n = t.renderer;
|
|
638
|
-
if (!(!e || !n)) return r.current = t.scale, o.execute(() => {
|
|
639
|
-
o.restore(), u();
|
|
640
|
-
}), n.events.addEventListener("pointer:click", p), n.events.addEventListener("viewport:ptscale", f), window.addEventListener("keyup", d), () => {
|
|
641
|
-
window.removeEventListener("keyup", d), n.events.removeEventListener("pointer:click", p), n.events.removeEventListener("viewport:ptscale", f), s.current.destroy();
|
|
642
|
-
};
|
|
643
|
-
}, [
|
|
644
|
-
e,
|
|
645
|
-
t,
|
|
646
|
-
o,
|
|
647
|
-
u,
|
|
648
|
-
p,
|
|
649
|
-
f,
|
|
650
|
-
d
|
|
651
|
-
]);
|
|
652
|
-
}
|
|
653
|
-
//#endregion
|
|
654
|
-
//#region src/components/Map/traffic/useManageTraffic.ts
|
|
655
|
-
var G = 2, Tt = G * 3.5, K = G * 12, Et = K * .7, Dt = 8, Ot = "transport_locations", kt = 150, q = "#a4aab6", At = 1e3, jt = 2e4, Mt = 500;
|
|
656
|
-
function Nt({ permission: e, rendererService: t, dataJsonUrl: i, websocketUrl: a }) {
|
|
657
|
-
let o = (0, H.useRef)(window.devicePixelRatio), s = (0, H.useRef)(/* @__PURE__ */ new Map()), c = (0, H.useRef)(/* @__PURE__ */ new Map()), u = (0, H.useRef)(), d = (0, H.useRef)(), f = (0, H.useRef)(performance.now()), p = (0, H.useRef)(1), m = (0, H.useRef)(new mt()), g = (0, H.useRef)(/* @__PURE__ */ new Map()), _ = (0, H.useRef)(), v = (0, H.useRef)(At), y = (0, H.useRef)(/* @__PURE__ */ new Map()), b = (0, H.useRef)();
|
|
658
|
-
(0, H.useEffect)(() => {
|
|
659
|
-
let x;
|
|
660
|
-
async function S() {
|
|
661
|
-
if (!(!e || !t.scene)) try {
|
|
662
|
-
let e;
|
|
663
|
-
try {
|
|
664
|
-
let t = await fetch(i, {
|
|
665
|
-
method: "GET",
|
|
666
|
-
headers: { "Content-Type": "application/json" }
|
|
667
|
-
});
|
|
668
|
-
if (!t.ok || t.status === 204) return;
|
|
669
|
-
e = await t.json();
|
|
670
|
-
} catch (e) {
|
|
671
|
-
console.warn("useManageTraffic failed to get JSON", e);
|
|
672
|
-
}
|
|
673
|
-
if (!e || e != null && e.disabled || e != null && e.error) return;
|
|
674
|
-
o.current = Pt(t.scale);
|
|
675
|
-
let a = new Map(e.routes.map(({ id: e, color: t }) => [e, t])), u = t.scene.rootLayer.children, v = /* @__PURE__ */ new Map();
|
|
676
|
-
a.forEach((e) => {
|
|
677
|
-
v.set(e, Lt({
|
|
678
|
-
radius: Tt,
|
|
679
|
-
color: e,
|
|
680
|
-
scale: window.devicePixelRatio
|
|
681
|
-
}));
|
|
682
|
-
});
|
|
683
|
-
let b = Ve(), S = u.filter((e) => b.test(e.name)), w = He(), E = u.filter((e) => w.test(e.name));
|
|
684
|
-
e.routes.slice(0, S.length).forEach(({ id: e, color: n, path: r, stops: i, hiddenPoints: a }, s) => {
|
|
685
|
-
g.current.set(e, r);
|
|
686
|
-
let c = S[s];
|
|
687
|
-
if (c) {
|
|
688
|
-
var l;
|
|
689
|
-
let e = new Map((l = a == null ? void 0 : a.map((e) => [Wt(e), e])) == null ? [] : l);
|
|
690
|
-
for (let t = 1; t < r.length; t++) {
|
|
691
|
-
let i = r[t - 1], a = r[t];
|
|
692
|
-
e.has(Wt(i)) || e.has(Wt(a)) || c.children.push({
|
|
693
|
-
points: [i, a],
|
|
694
|
-
color: n,
|
|
695
|
-
width: G
|
|
696
|
-
});
|
|
697
|
-
}
|
|
698
|
-
c.children.length && m.current.add(() => t.update(c));
|
|
699
|
-
}
|
|
700
|
-
let u = E[s];
|
|
701
|
-
if (u && i != null && i.length) {
|
|
702
|
-
let e = v.get(n);
|
|
703
|
-
i.forEach((t) => {
|
|
704
|
-
u.children.push({
|
|
705
|
-
source: e,
|
|
706
|
-
bounds: A(h(t.x, t.y, e.width, e.height, o.current))
|
|
707
|
-
});
|
|
708
|
-
}), u.children.length && m.current.add(() => t.update(u));
|
|
709
|
-
}
|
|
710
|
-
});
|
|
711
|
-
let D = u.find((e) => e.name === Pe), O = /* @__PURE__ */ new Map();
|
|
712
|
-
_.current = (e) => {
|
|
713
|
-
try {
|
|
714
|
-
let { ptScale: n, sceneId: r } = Ft(e);
|
|
715
|
-
if (!l(r)) return;
|
|
716
|
-
o.current = Pt(n);
|
|
717
|
-
let i = [];
|
|
718
|
-
for (let e of E) {
|
|
719
|
-
let t = e.children;
|
|
720
|
-
for (let e of t) e.bounds = A(h(e.bounds.center.x, e.bounds.center.y, e.source.width, e.source.height, o.current, e.bounds.rotation)), i.push(e);
|
|
721
|
-
}
|
|
722
|
-
let a = [...s.current.values()];
|
|
723
|
-
for (let e of a) e.bounds = A(h(e.bounds.center.x, e.bounds.center.y, e.source.width, e.source.height, o.current, e.bounds.rotation));
|
|
724
|
-
m.current.add(() => t.update(...i, ...a));
|
|
725
|
-
} catch (e) {
|
|
726
|
-
console.error("ptscale", e);
|
|
727
|
-
}
|
|
728
|
-
}, t.renderer.events.addEventListener("viewport:ptscale", _.current), x = requestAnimationFrame(() => {
|
|
729
|
-
var e;
|
|
730
|
-
(e = _.current) == null || e.call(_, t.scale);
|
|
731
|
-
}), a.forEach((e, t) => {
|
|
732
|
-
O.set(t, Rt({
|
|
733
|
-
id: t,
|
|
734
|
-
width: K,
|
|
735
|
-
height: K,
|
|
736
|
-
color: e,
|
|
737
|
-
scale: window.devicePixelRatio
|
|
738
|
-
}));
|
|
739
|
-
}), O.set(q, Rt({
|
|
740
|
-
id: "orphan",
|
|
741
|
-
width: K,
|
|
742
|
-
height: K,
|
|
743
|
-
color: q,
|
|
744
|
-
scale: window.devicePixelRatio
|
|
745
|
-
}));
|
|
746
|
-
let k = null;
|
|
747
|
-
try {
|
|
748
|
-
k = re(await n(`${r}icons/bus-white.svg`), Et, Et, window.devicePixelRatio);
|
|
749
|
-
} catch (e) {
|
|
750
|
-
console.error(e);
|
|
751
|
-
}
|
|
752
|
-
d.current = (e) => {
|
|
753
|
-
try {
|
|
754
|
-
var n;
|
|
755
|
-
let r = JSON.parse(e.data);
|
|
756
|
-
if (r.type !== Ot) return;
|
|
757
|
-
let i = e.timeStamp || performance.now();
|
|
758
|
-
p.current = Math.round(i - f.current), f.current = i;
|
|
759
|
-
let a = Math.max((n = p.current) == null ? Mt : n, Mt), l = c.current, u = s.current, d = D.children, _ = m.current, v = !1;
|
|
760
|
-
r.data.forEach(({ id: e, x: n, y: r, route_id: i, hidden: s }) => {
|
|
761
|
-
if (l.has(e)) {
|
|
762
|
-
var c;
|
|
763
|
-
(c = l.get(e)) == null || c(), l.delete(e);
|
|
764
|
-
}
|
|
765
|
-
if (s && u.has(e) && u.has(Y(e))) {
|
|
766
|
-
let n = u.get(e);
|
|
767
|
-
n.hidden = !0;
|
|
768
|
-
let r = u.get(Y(e));
|
|
769
|
-
r.hidden = !0, _.add(() => t.update(n, r));
|
|
770
|
-
return;
|
|
771
|
-
}
|
|
772
|
-
if (y.current.set(e, performance.now()), !u.has(e)) {
|
|
773
|
-
let t = O.get(i) || O.get(q), a = {
|
|
774
|
-
id: e,
|
|
775
|
-
source: t,
|
|
776
|
-
bounds: A(h(n, r, t.width, t.height, o.current, 0))
|
|
777
|
-
};
|
|
778
|
-
if (u.set(e, a), k) {
|
|
779
|
-
let t = Y(e), i = {
|
|
780
|
-
id: t,
|
|
781
|
-
source: k,
|
|
782
|
-
bounds: A(h(n, r, k.width, k.height, o.current, 0))
|
|
783
|
-
};
|
|
784
|
-
k.setAttribute("id", t), u.set(t, i), d.push(a, i);
|
|
785
|
-
} else d.push(a);
|
|
786
|
-
v = !0;
|
|
787
|
-
return;
|
|
788
|
-
}
|
|
789
|
-
let f = u.get(e), p = u.get(Y(e)), m = f.bounds.center, b = Ht(m, {
|
|
790
|
-
x: n,
|
|
791
|
-
y: r
|
|
792
|
-
}, g.current.get(i));
|
|
793
|
-
if (b.reduce((e, t, n) => n === 0 ? e : e + J(b[n - 1], t), 0) >= kt || document.hidden) zt({
|
|
794
|
-
rendererService: t,
|
|
795
|
-
updateQueue: _,
|
|
796
|
-
vehicle: f,
|
|
797
|
-
vehicleFinery: p,
|
|
798
|
-
x: n,
|
|
799
|
-
y: r,
|
|
800
|
-
scale: o.current,
|
|
801
|
-
angle: It(f.bounds.center, {
|
|
802
|
-
x: n,
|
|
803
|
-
y: r
|
|
804
|
-
})
|
|
805
|
-
});
|
|
806
|
-
else {
|
|
807
|
-
let n = Ut(b, a, (e) => {
|
|
808
|
-
zt({
|
|
809
|
-
rendererService: t,
|
|
810
|
-
updateQueue: _,
|
|
811
|
-
vehicle: f,
|
|
812
|
-
vehicleFinery: p,
|
|
813
|
-
x: e.x,
|
|
814
|
-
y: e.y,
|
|
815
|
-
scale: o.current,
|
|
816
|
-
angle: e.angle
|
|
817
|
-
});
|
|
818
|
-
});
|
|
819
|
-
l.set(e, n);
|
|
820
|
-
}
|
|
821
|
-
}), v && _.add(() => t.update(D));
|
|
822
|
-
} catch (e) {
|
|
823
|
-
console.error("handleSocketMessage", e);
|
|
824
|
-
}
|
|
825
|
-
}, C(), T(e.config ? (Number(e.config.vehicle_inactive_interval) || 20) * 1e3 : jt);
|
|
826
|
-
} catch (e) {
|
|
827
|
-
console.warn(e);
|
|
828
|
-
}
|
|
829
|
-
}
|
|
830
|
-
S();
|
|
831
|
-
function C() {
|
|
832
|
-
var e, t;
|
|
833
|
-
((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 = () => {
|
|
834
|
-
v.current = At;
|
|
835
|
-
}, u.current.onclose = () => {
|
|
836
|
-
navigator.onLine && (setTimeout(C, v.current), v.current = Math.min(v.current * 2, 3e4));
|
|
837
|
-
});
|
|
838
|
-
}
|
|
839
|
-
function w() {
|
|
840
|
-
C();
|
|
841
|
-
}
|
|
842
|
-
window.addEventListener("online", w);
|
|
843
|
-
function T(e) {
|
|
844
|
-
clearInterval(b.current), b.current = window.setInterval(() => {
|
|
845
|
-
let n = performance.now(), r = [], i = [];
|
|
846
|
-
y.current.forEach((t, a) => {
|
|
847
|
-
if (n - t < e) return;
|
|
848
|
-
let o = s.current.get(a);
|
|
849
|
-
o && (o.hidden = !0, i.push(o), r.push(a));
|
|
850
|
-
let c = Y(a), l = s.current.get(c);
|
|
851
|
-
l && (l.hidden = !0, i.push(l), r.push(c));
|
|
852
|
-
}), i.length && m.current.add(() => t.update(...i)), r.forEach((e) => y.current.delete(e));
|
|
853
|
-
}, e);
|
|
854
|
-
}
|
|
855
|
-
return () => {
|
|
856
|
-
_.current && t.renderer && t.renderer.events.removeEventListener("viewport:ptscale", _.current), x !== void 0 && cancelAnimationFrame(x), c.current.forEach((e) => e == null ? void 0 : e()), c.current.clear(), s.current.clear(), m.current.destroy(), window.removeEventListener("online", w), clearInterval(b.current);
|
|
857
|
-
};
|
|
858
|
-
}, [
|
|
859
|
-
e,
|
|
860
|
-
t,
|
|
861
|
-
i,
|
|
862
|
-
a
|
|
863
|
-
]);
|
|
864
|
-
}
|
|
865
|
-
function Pt(e) {
|
|
866
|
-
return Math.min(e || window.devicePixelRatio, Dt);
|
|
867
|
-
}
|
|
868
|
-
function Ft(e) {
|
|
869
|
-
return typeof e == "number" ? { ptScale: e } : e;
|
|
870
|
-
}
|
|
871
|
-
function It(e, t) {
|
|
872
|
-
return xe(e, t);
|
|
873
|
-
}
|
|
874
|
-
function Lt({ radius: e, scale: t, color: n }) {
|
|
875
|
-
let r = document.createElement("canvas"), i = r.getContext("2d");
|
|
876
|
-
i.imageSmoothingEnabled = !1;
|
|
877
|
-
let a = Math.ceil(e * 2 * t), o = a / 2, s = e * .78, c = e * .33;
|
|
878
|
-
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;
|
|
879
|
-
}
|
|
880
|
-
function Rt({ id: e, width: t, height: n, color: r, scale: i }) {
|
|
881
|
-
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");
|
|
882
|
-
m.setAttribute("id", e), m.width = f, m.height = p;
|
|
883
|
-
let h = m.getContext("2d"), g = f / 2, _ = p / 2;
|
|
884
|
-
h.save(), h.translate(g, _), h.rotate(-Math.PI / 2), h.translate(-g, -_);
|
|
885
|
-
let v = g, y = _ - u / 2 + o, b = y + l;
|
|
886
|
-
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;
|
|
887
|
-
}
|
|
888
|
-
function J(e, t) {
|
|
889
|
-
return Se(e, t);
|
|
890
|
-
}
|
|
891
|
-
function Y(e) {
|
|
892
|
-
return `${e}_finery`;
|
|
893
|
-
}
|
|
894
|
-
function zt({ rendererService: e, updateQueue: t, vehicle: n, vehicleFinery: r, x: i, y: a, scale: o, angle: s }) {
|
|
895
|
-
n.bounds = A(h(i, a, n.source.width, n.source.height, o, s)), n.hidden = !1, r ? (r.bounds = A(h(i, a, r.source.width, r.source.height, o, P(e.angle))), r.hidden = !1, t.add(() => e.update(r, n))) : t.add(() => e.update(n));
|
|
896
|
-
}
|
|
897
|
-
function X(e, t, n) {
|
|
898
|
-
return {
|
|
899
|
-
x: e.x + (t.x - e.x) * n,
|
|
900
|
-
y: e.y + (t.y - e.y) * n
|
|
901
|
-
};
|
|
902
|
-
}
|
|
903
|
-
function Bt(e, t) {
|
|
904
|
-
let n = Infinity, r = {
|
|
905
|
-
index: 0,
|
|
906
|
-
t: 0
|
|
907
|
-
};
|
|
908
|
-
for (let i = 0; i < t.length - 1; i++) {
|
|
909
|
-
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 = J(e, X(a, o, d));
|
|
910
|
-
f < n && (n = f, r = {
|
|
911
|
-
index: i,
|
|
912
|
-
t: d
|
|
913
|
-
});
|
|
914
|
-
}
|
|
915
|
-
return r;
|
|
916
|
-
}
|
|
917
|
-
function Vt(e, t, n) {
|
|
918
|
-
let r = J(e, t), i = Math.max(2, Math.ceil(r / n) + 1), a = [];
|
|
919
|
-
for (let n = 0; n < i; n++) {
|
|
920
|
-
let r = X(e, t, n / (i - 1));
|
|
921
|
-
a.push(r);
|
|
922
|
-
}
|
|
923
|
-
return a;
|
|
924
|
-
}
|
|
925
|
-
function Ht(e, t, n) {
|
|
926
|
-
if (!n || !n.length) return Vt(e, t, 10);
|
|
927
|
-
let r = Bt(e, n), i = Bt(t, n), a = [], o = (e) => a.push(e);
|
|
928
|
-
r.index + 1 < n.length ? o(X(n[r.index], n[r.index + 1], r.t)) : o(n[r.index]);
|
|
929
|
-
for (let e = r.index + 1; e <= i.index && e < n.length; e++) o(n[e]);
|
|
930
|
-
return i.index + 1 < n.length ? o(X(n[i.index], n[i.index + 1], i.t)) : o(n[i.index]), a;
|
|
931
|
-
}
|
|
932
|
-
function Ut(e, t, n, r) {
|
|
933
|
-
if (e.length < 2) return () => {};
|
|
934
|
-
let i = null, a, o = [], s = 0;
|
|
935
|
-
for (let t = 0; t < e.length - 1; t++) {
|
|
936
|
-
let n = Se(e[t], e[t + 1]);
|
|
937
|
-
o.push(n), s += n;
|
|
938
|
-
}
|
|
939
|
-
let c = (l) => {
|
|
940
|
-
i || (i = l);
|
|
941
|
-
let u = l - i, d = Math.min(u / t, 1), f = d * s, p = 0, m = 0;
|
|
942
|
-
for (; m < o.length && p + o[m] < f;) p += o[m], m++;
|
|
943
|
-
m >= o.length && (m = o.length - 1);
|
|
944
|
-
let h = e[m], g = e[Math.min(m + 1, e.length - 1)], _ = o[m] || 0, v = _ === 0 ? 0 : (f - p) / _;
|
|
945
|
-
n({
|
|
946
|
-
x: h.x + (g.x - h.x) * v,
|
|
947
|
-
y: h.y + (g.y - h.y) * v,
|
|
948
|
-
angle: xe(h, g)
|
|
949
|
-
}), d < 1 ? a = requestAnimationFrame(c) : r && r();
|
|
950
|
-
};
|
|
951
|
-
return a = requestAnimationFrame(c), () => {
|
|
952
|
-
a && cancelAnimationFrame(a);
|
|
953
|
-
};
|
|
954
|
-
}
|
|
955
|
-
function Wt(e) {
|
|
956
|
-
return `${e.x},${e.y}`;
|
|
957
|
-
}
|
|
958
|
-
//#endregion
|
|
959
|
-
//#region src/utils/dimming.ts
|
|
960
|
-
var Gt = .5, Kt = "cubic";
|
|
961
|
-
function qt(e, t) {
|
|
962
|
-
let n = e.scene;
|
|
963
|
-
if (!n) return;
|
|
964
|
-
let r = n.rootLayer;
|
|
965
|
-
r.dim !== t && (r.dim = t, e.update(n.rootLayer));
|
|
966
|
-
}
|
|
967
|
-
function Jt(e, t = 300, n = Kt) {
|
|
968
|
-
let r = null, i = 0, a = 0, o = 0, s = 0, c = Math.max(t, 0);
|
|
969
|
-
function l() {
|
|
970
|
-
r === null || typeof cancelAnimationFrame != "function" || (cancelAnimationFrame(r), r = null);
|
|
971
|
-
}
|
|
972
|
-
function u(t) {
|
|
973
|
-
l(), i = t, e(i);
|
|
974
|
-
}
|
|
975
|
-
function d(t) {
|
|
976
|
-
let l = t - s, u = Math.min(l / c, 1), f = Yt(u, n);
|
|
977
|
-
if (i = a + (o - a) * f, e(i), u < 1) {
|
|
978
|
-
r = requestAnimationFrame(d);
|
|
979
|
-
return;
|
|
980
|
-
}
|
|
981
|
-
r = null, i = o, e(i);
|
|
982
|
-
}
|
|
983
|
-
return {
|
|
984
|
-
getValue() {
|
|
985
|
-
return i;
|
|
986
|
-
},
|
|
987
|
-
setTarget(e, t = {}) {
|
|
988
|
-
let n = +!!e;
|
|
989
|
-
if (!(!t.immediate && n === o && r === null)) {
|
|
990
|
-
if (o = n, t.immediate || c === 0 || typeof requestAnimationFrame != "function") {
|
|
991
|
-
u(o);
|
|
992
|
-
return;
|
|
993
|
-
}
|
|
994
|
-
l(), a = i, s = typeof performance > "u" ? Date.now() : performance.now(), r = requestAnimationFrame(d);
|
|
995
|
-
}
|
|
996
|
-
},
|
|
997
|
-
stop() {
|
|
998
|
-
l();
|
|
999
|
-
}
|
|
1000
|
-
};
|
|
1001
|
-
}
|
|
1002
|
-
function Yt(e, t) {
|
|
1003
|
-
return t === "linear" ? e : Xt(e);
|
|
1004
|
-
}
|
|
1005
|
-
function Xt(e) {
|
|
1006
|
-
return e < .5 ? 4 * e * e * e : 1 - (-2 * e + 2) ** 3 / 2;
|
|
1007
|
-
}
|
|
1008
|
-
//#endregion
|
|
1009
|
-
//#region src/components/Map/booth-by-xy.ts
|
|
1010
|
-
function Zt(e) {
|
|
1011
|
-
let t = e.center.x, n = e.center.y, r = e.size.width, i = e.size.height;
|
|
1012
|
-
return new I(t - i / 2, n - r / 2, i, r);
|
|
1013
|
-
}
|
|
1014
|
-
var Z = /* @__PURE__ */ new Map(), Qt = [], $t = [], en = [], Q = /* @__PURE__ */ new Map(), $;
|
|
1015
|
-
function tn() {
|
|
1016
|
-
let e = z.booths.filter((e) => e.visible && e.rect && e.rect.size.width > 0 && e.rect.size.height > 0);
|
|
1017
|
-
if (Z = /* @__PURE__ */ new Map(), Qt = [], en = [], $ = null, Q = /* @__PURE__ */ new Map(), !e.length) return;
|
|
1018
|
-
$t = e.filter((e) => e.paths);
|
|
1019
|
-
let t = I.fromUnion(...e.map((e) => e.rect));
|
|
1020
|
-
for (let t of e) {
|
|
1021
|
-
let e = t.rect;
|
|
1022
|
-
Math.abs(t.rotate) === P(90) && (e = Zt(e)), Qt.push(e), Z.set(e, t);
|
|
1023
|
-
}
|
|
1024
|
-
let n = Math.ceil(t.size.width / 2), r = Math.ceil(t.size.height / 2);
|
|
1025
|
-
for (let e = 0; e < 2; e++) for (let i = 0; i < 2; i++) {
|
|
1026
|
-
let a = new I(t.min.x + e * n, t.min.y + i * r, n, r);
|
|
1027
|
-
en.push(a);
|
|
1028
|
-
let o = Qt.filter((e) => a.intersects(e));
|
|
1029
|
-
Q.set(a, o);
|
|
1030
|
-
}
|
|
1031
|
-
i.log("hover segmentToRects", Q);
|
|
1032
|
-
}
|
|
1033
|
-
o(() => [
|
|
1034
|
-
z.booths,
|
|
1035
|
-
F.loaded,
|
|
1036
|
-
F.visible
|
|
1037
|
-
], () => tn());
|
|
1038
|
-
function nn(e, t) {
|
|
1039
|
-
let n = {
|
|
1040
|
-
x: e,
|
|
1041
|
-
y: t
|
|
1042
|
-
}, r;
|
|
1043
|
-
r = $ && $.containsPoint(n) ? $ : en.find((e) => e.containsPoint(n)), r && ($ = r);
|
|
1044
|
-
let i = Q.get(r);
|
|
1045
|
-
if (i) {
|
|
1046
|
-
let e = i.filter((e) => e.containsPoint(n));
|
|
1047
|
-
if (e.length) {
|
|
1048
|
-
let t;
|
|
1049
|
-
t = e.length > 1 ? e.sort((e, t) => e.size.width - t.size.width)[0] : e[0];
|
|
1050
|
-
let n = Z.get(t);
|
|
1051
|
-
return n.visible ? n : null;
|
|
1052
|
-
}
|
|
1053
|
-
}
|
|
1054
|
-
for (let e of $t) for (let t of e.paths) for (let r of he(t.index, F.mode === Ce.Default ? "" : e.layer.name)) {
|
|
1055
|
-
let t = r.map((e) => ({
|
|
1056
|
-
x: e[0],
|
|
1057
|
-
y: e[1]
|
|
1058
|
-
}));
|
|
1059
|
-
if (se.fromConvexRing(t).containsPoint(n)) return e.visible ? e : null;
|
|
1060
|
-
}
|
|
1061
|
-
return null;
|
|
1062
|
-
}
|
|
1063
|
-
function rn(e, t) {
|
|
1064
|
-
return nn(e, t);
|
|
1065
|
-
}
|
|
1066
|
-
//#endregion
|
|
1067
|
-
//#region src/wayfinding/bindMobxReactions.ts
|
|
1068
|
-
var an = (e) => "rect" in e ? be(e) : e;
|
|
1069
|
-
function on({ runtime: e, kioskHandler: t, yahHandler: n, stores: { routeStore: r, uiState: i, layerStore: s }, rerouteThresholdSvg: c }) {
|
|
1070
|
-
let l = [], u = C(c);
|
|
1071
|
-
function d() {
|
|
1072
|
-
var t;
|
|
1073
|
-
let n = i.selectedRoute, a = n != null && n.from ? an(n.from) : null, o = n != null && n.to ? an(n.to) : null;
|
|
1074
|
-
if (!a || !o) {
|
|
1075
|
-
e.clearRoute();
|
|
1076
|
-
return;
|
|
1077
|
-
}
|
|
1078
|
-
e.setRoute({
|
|
1079
|
-
from: a,
|
|
1080
|
-
to: o,
|
|
1081
|
-
waypoints: n == null || (t = n.waypoints) == null ? void 0 : t.map(be),
|
|
1082
|
-
accessible: r.onlyAccessible
|
|
1083
|
-
}) === !1 && console.error(/* @__PURE__ */ Error(`Route not found: (${a.x},${a.y}) → (${o.x},${o.y})`));
|
|
1084
|
-
}
|
|
1085
|
-
function f() {
|
|
1086
|
-
let t = r.currentPosition, a = r.iconType !== 0, o = i.selectedRoute, s = !!(o != null && o.from && o != null && o.to), c = a && !s;
|
|
1087
|
-
if (!t) {
|
|
1088
|
-
e.onPositionChanged(null), n(null);
|
|
1089
|
-
return;
|
|
1090
|
-
}
|
|
1091
|
-
let l = m(t);
|
|
1092
|
-
c ? (e.onPositionChanged(null), n({
|
|
1093
|
-
x: l.x,
|
|
1094
|
-
y: l.y,
|
|
1095
|
-
layer: l.layer
|
|
1096
|
-
})) : (n(null), e.onPositionChanged(l));
|
|
1097
|
-
}
|
|
1098
|
-
function p() {
|
|
1099
|
-
var e;
|
|
1100
|
-
let t = r.currentPosition, n = i.selectedRoute;
|
|
1101
|
-
if (!t || !(n != null && n.to)) return;
|
|
1102
|
-
let a = !n.from, o = ((e = n.from) == null ? void 0 : e.id) === "current-position" && u.shouldReroute(m(t), r.routeLines);
|
|
1103
|
-
!a && !o || r.rebuildRouteFromPosition(v(t, y, ie));
|
|
1104
|
-
}
|
|
1105
|
-
function h() {
|
|
1106
|
-
var e, n;
|
|
1107
|
-
let r = (e = s.floors.find((e) => e.active)) == null ? void 0 : e.name;
|
|
1108
|
-
t((n = i.kioskData) == null ? null : n, r, s.mode);
|
|
1109
|
-
}
|
|
1110
|
-
function g() {
|
|
1111
|
-
var e;
|
|
1112
|
-
let t = i.selectedRoute, n = r.currentPosition;
|
|
1113
|
-
if (!(t != null && t.to) || !n || ((e = t.from) == null ? void 0 : e.id) !== "current-position" || r.routeLines.length > 0) return;
|
|
1114
|
-
let a = n.z == null ? "" : String(n.z);
|
|
1115
|
-
t.from.x === n.x && t.from.y === n.y && t.from.layer === a || r.rebuildRouteFromPosition(v(n, y, ie));
|
|
1116
|
-
}
|
|
1117
|
-
l.push(o(() => s.layersLoaded, () => {
|
|
1118
|
-
d(), f();
|
|
1119
|
-
}), o(() => [i.selectedRoute, r.onlyAccessible], () => {
|
|
1120
|
-
d(), f();
|
|
1121
|
-
}), o(() => r.currentPosition, () => {
|
|
1122
|
-
f();
|
|
1123
|
-
}), o(() => {
|
|
1124
|
-
let e = r.currentPosition;
|
|
1125
|
-
return e ? {
|
|
1126
|
-
x: e.x,
|
|
1127
|
-
y: e.y,
|
|
1128
|
-
z: e.z
|
|
1129
|
-
} : null;
|
|
1130
|
-
}, () => {
|
|
1131
|
-
p(), g();
|
|
1132
|
-
}, { equals: a.structural }), o(() => [i.kioskData, s.floors.find((e) => e.active)], () => h()));
|
|
1133
|
-
let _ = null, b = o(() => [r.currentRouteLayer, i.getRouteNextFloor], () => {
|
|
1134
|
-
s.layersLoaded && (_ !== null && clearTimeout(_), _ = setTimeout(() => {
|
|
1135
|
-
e.onFloorChanged(), f(), _ = null;
|
|
1136
|
-
}, 0));
|
|
1137
|
-
});
|
|
1138
|
-
return l.push(() => {
|
|
1139
|
-
_ !== null && clearTimeout(_), b();
|
|
1140
|
-
}), d(), f(), h(), () => {
|
|
1141
|
-
for (let e of l) e();
|
|
1142
|
-
l.length = 0;
|
|
1143
|
-
};
|
|
1144
|
-
}
|
|
1145
|
-
//#endregion
|
|
1146
|
-
//#region src/wayfinding/handlers/kioskHandler.ts
|
|
1147
|
-
var sn = "kiosk", cn = 0;
|
|
1148
|
-
function ln({ renderer: e, kioskIconMap: t, layer: n }) {
|
|
1149
|
-
return (r, i, a) => {
|
|
1150
|
-
var o;
|
|
1151
|
-
if (!r) {
|
|
1152
|
-
e.setIcon(sn, null), e.flush();
|
|
1153
|
-
return;
|
|
1154
|
-
}
|
|
1155
|
-
if (a !== cn && r.z && i && r.z !== i) {
|
|
1156
|
-
e.setIcon(sn, null), e.flush();
|
|
1157
|
-
return;
|
|
1158
|
-
}
|
|
1159
|
-
e.setIcon(sn, {
|
|
1160
|
-
canvas: ae(t, r.iconSizePercent),
|
|
1161
|
-
layer: n,
|
|
1162
|
-
x: r.x,
|
|
1163
|
-
y: r.y,
|
|
1164
|
-
rotation: P((o = r.heading) == null ? 0 : o)
|
|
1165
|
-
}), e.flush();
|
|
1166
|
-
};
|
|
1167
|
-
}
|
|
1168
|
-
//#endregion
|
|
1169
|
-
//#region src/wayfinding/handlers/yahHandler.ts
|
|
1170
|
-
var un = "yah";
|
|
1171
|
-
function dn({ renderer: e, iconProvider: t, floorContext: n, layer: r }) {
|
|
1172
|
-
return (i) => {
|
|
1173
|
-
if (!i) {
|
|
1174
|
-
e.setIcon(un, null), e.flush();
|
|
1175
|
-
return;
|
|
1176
|
-
}
|
|
1177
|
-
let a = n.isLayerVisible(i.layer);
|
|
1178
|
-
e.setIcon(un, {
|
|
1179
|
-
canvas: t.getIcon("yah").canvas,
|
|
1180
|
-
layer: r,
|
|
1181
|
-
x: i.x,
|
|
1182
|
-
y: i.y,
|
|
1183
|
-
hidden: !a,
|
|
1184
|
-
dimmed: !a,
|
|
1185
|
-
origin: [.5, 1]
|
|
1186
|
-
}), e.flush();
|
|
1187
|
-
};
|
|
1188
|
-
}
|
|
1189
|
-
//#endregion
|
|
1190
|
-
//#region src/wayfinding/runtime/getRouteLines.ts
|
|
1191
|
-
function fn({ engine: e, from: t, to: n, waypoints: r, accessible: i }) {
|
|
1192
|
-
return r != null && r.length ? e.buildWaypointsRoute([
|
|
1193
|
-
t,
|
|
1194
|
-
...r,
|
|
1195
|
-
n
|
|
1196
|
-
], { accessible: i }).lines : e.buildRoute(t, n, { accessible: i }).lines;
|
|
1197
|
-
}
|
|
1198
|
-
//#endregion
|
|
1199
|
-
//#region src/wayfinding/runtime/endpointView.ts
|
|
1200
|
-
function pn(e, t) {
|
|
1201
|
-
return !t || !e.bounds && e.id !== "current-position";
|
|
1202
|
-
}
|
|
1203
|
-
function mn({ renderer: e, iconProvider: t, floorContext: n, layer: r }) {
|
|
1204
|
-
return {
|
|
1205
|
-
place(i, a, o, s) {
|
|
1206
|
-
if (!o.length) return;
|
|
1207
|
-
let c = n.isLayerVisible(i.layer), l = n.isLayerVisible(a.layer), u = o[o.length - 1], d = o[0], f = i.id === "current-position" && s;
|
|
1208
|
-
e.setIcon("source", {
|
|
1209
|
-
canvas: t.getIcon(f ? "source_inactive" : "source").canvas,
|
|
1210
|
-
layer: r,
|
|
1211
|
-
x: u.x,
|
|
1212
|
-
y: u.y,
|
|
1213
|
-
hidden: pn(i, c),
|
|
1214
|
-
dimmed: !c,
|
|
1215
|
-
cardinalSnap: !0
|
|
1216
|
-
}), e.setIcon("destination", {
|
|
1217
|
-
canvas: t.getIcon("destination").canvas,
|
|
1218
|
-
layer: r,
|
|
1219
|
-
x: d.x,
|
|
1220
|
-
y: d.y,
|
|
1221
|
-
hidden: !l || !a.bounds,
|
|
1222
|
-
dimmed: !l,
|
|
1223
|
-
cardinalSnap: !0
|
|
1224
|
-
});
|
|
1225
|
-
},
|
|
1226
|
-
hide() {
|
|
1227
|
-
e.setIcon("source", null), e.setIcon("destination", null);
|
|
1228
|
-
}
|
|
1229
|
-
};
|
|
1230
|
-
}
|
|
1231
|
-
//#endregion
|
|
1232
|
-
//#region src/wayfinding/runtime/positionTrailView.ts
|
|
1233
|
-
var hn = "trail";
|
|
1234
|
-
function gn({ renderer: e, iconProvider: t, floorContext: n, trails: r, iconLayer: i, snapThreshold: a }) {
|
|
1235
|
-
let o = ne({
|
|
1236
|
-
renderer: e,
|
|
1237
|
-
iconProvider: t,
|
|
1238
|
-
layer: i
|
|
1239
|
-
});
|
|
1240
|
-
return {
|
|
1241
|
-
placeIcon(e) {
|
|
1242
|
-
let t = !n.isLayerVisible(e.layer);
|
|
1243
|
-
o.place(e, t);
|
|
1244
|
-
},
|
|
1245
|
-
hideIcon() {
|
|
1246
|
-
o.hide();
|
|
1247
|
-
},
|
|
1248
|
-
applyToRoute(e, t, r) {
|
|
1249
|
-
let i = S(e, [...r], {
|
|
1250
|
-
snapThreshold: a,
|
|
1251
|
-
from: t.from,
|
|
1252
|
-
to: t.to
|
|
1253
|
-
}), s = !n.isLayerVisible(e.layer);
|
|
1254
|
-
return i.snapped ? o.place({
|
|
1255
|
-
...e,
|
|
1256
|
-
x: i.snappedPoint.x,
|
|
1257
|
-
y: i.snappedPoint.y
|
|
1258
|
-
}, s) : o.place(e, s), i;
|
|
1259
|
-
},
|
|
1260
|
-
setTrail(e, t) {
|
|
1261
|
-
e && t ? r.place(hn, e, t) : r.clear(hn);
|
|
1262
|
-
},
|
|
1263
|
-
clearTrail() {
|
|
1264
|
-
r.clear(hn);
|
|
1265
|
-
}
|
|
1266
|
-
};
|
|
1267
|
-
}
|
|
1268
|
-
//#endregion
|
|
1269
|
-
//#region src/wayfinding/runtime/routeLinesView.ts
|
|
1270
|
-
function _n({ renderer: e, linesLayer: t, animatedLinesLayer: n }) {
|
|
1271
|
-
return {
|
|
1272
|
-
draw({ passed: r, remaining: i }, a = !1) {
|
|
1273
|
-
e.setRouteLines(r, i, {
|
|
1274
|
-
linesLayer: t,
|
|
1275
|
-
animatedLinesLayer: n,
|
|
1276
|
-
resetAnimation: !a
|
|
1277
|
-
});
|
|
1278
|
-
},
|
|
1279
|
-
clear() {
|
|
1280
|
-
e.setRouteLines([], [], {
|
|
1281
|
-
linesLayer: t,
|
|
1282
|
-
animatedLinesLayer: n,
|
|
1283
|
-
resetAnimation: !0
|
|
1284
|
-
});
|
|
1285
|
-
}
|
|
1286
|
-
};
|
|
1287
|
-
}
|
|
1288
|
-
//#endregion
|
|
1289
|
-
//#region src/wayfinding/runtime/routeRenderData.ts
|
|
1290
|
-
function vn({ routeLines: e, currentRouteLayer: t, from: n, to: r, snap: i }) {
|
|
1291
|
-
let a = D(e.filter((e) => !e.virtual), n, r), o = t === null ? a : a.filter((e) => e.p0.layer === t);
|
|
1292
|
-
if (!(i != null && i.snapped)) return {
|
|
1293
|
-
passed: [],
|
|
1294
|
-
remaining: o,
|
|
1295
|
-
distance: te(a)
|
|
1296
|
-
};
|
|
1297
|
-
let { passed: s, remaining: c } = fe(o, i.snappedPoint);
|
|
1298
|
-
return {
|
|
1299
|
-
passed: s,
|
|
1300
|
-
remaining: c !== o && c.length > 0 ? [{
|
|
1301
|
-
...c[0],
|
|
1302
|
-
p0: i.snappedPoint
|
|
1303
|
-
}, ...c.slice(1)] : c,
|
|
1304
|
-
distance: i.distance
|
|
1305
|
-
};
|
|
1306
|
-
}
|
|
1307
|
-
//#endregion
|
|
1308
|
-
//#region src/wayfinding/runtime/routeUpdate.ts
|
|
1309
|
-
function yn(e, t) {
|
|
1310
|
-
return {
|
|
1311
|
-
lines: e.filter((e) => !e.virtual),
|
|
1312
|
-
bounds: Te(t.flatMap((e) => [e.p0, e.p1]))
|
|
1313
|
-
};
|
|
1314
|
-
}
|
|
1315
|
-
//#endregion
|
|
1316
|
-
//#region src/wayfinding/runtime/trailView.ts
|
|
1317
|
-
function bn({ renderer: e, iconProvider: t, floorContext: n, layer: r }) {
|
|
1318
|
-
let i = /* @__PURE__ */ new Set();
|
|
1319
|
-
function a(e, t) {
|
|
1320
|
-
if (n.showAllFloors()) return !0;
|
|
1321
|
-
let r = n.getActiveFloor();
|
|
1322
|
-
return r ? e === r && t === r : !1;
|
|
1323
|
-
}
|
|
1324
|
-
function o(t) {
|
|
1325
|
-
e.setTrail(t, null, null), i.delete(t);
|
|
1326
|
-
}
|
|
1327
|
-
return {
|
|
1328
|
-
place(n, s, c) {
|
|
1329
|
-
if (!a(s.layer, c.layer)) {
|
|
1330
|
-
o(n);
|
|
1331
|
-
return;
|
|
1332
|
-
}
|
|
1333
|
-
e.setTrail(n, s, c, {
|
|
1334
|
-
canvas: t.getIcon("trail").canvas,
|
|
1335
|
-
layer: r
|
|
1336
|
-
}), i.add(n);
|
|
1337
|
-
},
|
|
1338
|
-
clear(e) {
|
|
1339
|
-
o(e);
|
|
1340
|
-
},
|
|
1341
|
-
clearAll() {
|
|
1342
|
-
for (let t of i) e.setTrail(t, null, null);
|
|
1343
|
-
i.clear();
|
|
1344
|
-
}
|
|
1345
|
-
};
|
|
1346
|
-
}
|
|
1347
|
-
//#endregion
|
|
1348
|
-
//#region src/wayfinding/runtime/transitionView.ts
|
|
1349
|
-
var xn = "transition";
|
|
1350
|
-
function Sn({ renderer: e, iconProvider: t, floorContext: n, onTransitionClick: r, layer: i }) {
|
|
1351
|
-
return {
|
|
1352
|
-
place(a) {
|
|
1353
|
-
e.clearIcons(xn);
|
|
1354
|
-
let o;
|
|
1355
|
-
if (n.showAllFloors()) o = null;
|
|
1356
|
-
else {
|
|
1357
|
-
let e = n.getActiveFloor();
|
|
1358
|
-
if (!e) return;
|
|
1359
|
-
o = e;
|
|
1360
|
-
}
|
|
1361
|
-
let s = j({
|
|
1362
|
-
routeLines: a,
|
|
1363
|
-
currentLayerName: o,
|
|
1364
|
-
floorOrder: n.getFloorOrder()
|
|
1365
|
-
});
|
|
1366
|
-
for (let [n, a] of s.entries()) e.setIcon(xn, {
|
|
1367
|
-
canvas: t.getIcon(Cn(a.role, a.direction)).canvas,
|
|
1368
|
-
layer: i,
|
|
1369
|
-
x: a.x,
|
|
1370
|
-
y: a.y,
|
|
1371
|
-
cardinalSnap: !0,
|
|
1372
|
-
onClick: a.role === "exit" ? () => r(a) : void 0
|
|
1373
|
-
}, n);
|
|
1374
|
-
},
|
|
1375
|
-
clear() {
|
|
1376
|
-
e.clearIcons(xn);
|
|
1377
|
-
}
|
|
1378
|
-
};
|
|
1379
|
-
}
|
|
1380
|
-
function Cn(e, t) {
|
|
1381
|
-
return e === "entry" ? "transition_entry" : t === "up" ? "transition_up" : t === "down" ? "transition_down" : "transition";
|
|
1382
|
-
}
|
|
1383
|
-
//#endregion
|
|
1384
|
-
//#region src/wayfinding/runtime/createWayfindingRuntime.ts
|
|
1385
|
-
var wn = (e) => e.flatMap((e) => [e.p0, e.p1]);
|
|
1386
|
-
function Tn({ engine: e, renderer: t, iconProvider: n, floorContext: r, layers: i, snapThreshold: a, onTransitionClick: o, onRouteUpdate: s, onRouteDistance: c }) {
|
|
1387
|
-
let l = mn({
|
|
1388
|
-
renderer: t,
|
|
1389
|
-
iconProvider: n,
|
|
1390
|
-
floorContext: r,
|
|
1391
|
-
layer: i.points
|
|
1392
|
-
}), u = Sn({
|
|
1393
|
-
renderer: t,
|
|
1394
|
-
iconProvider: n,
|
|
1395
|
-
floorContext: r,
|
|
1396
|
-
onTransitionClick: o,
|
|
1397
|
-
layer: i.points
|
|
1398
|
-
}), d = gn({
|
|
1399
|
-
renderer: t,
|
|
1400
|
-
iconProvider: n,
|
|
1401
|
-
floorContext: r,
|
|
1402
|
-
trails: bn({
|
|
1403
|
-
renderer: t,
|
|
1404
|
-
iconProvider: n,
|
|
1405
|
-
floorContext: r,
|
|
1406
|
-
layer: i.trail
|
|
1407
|
-
}),
|
|
1408
|
-
iconLayer: i.currentPosition,
|
|
1409
|
-
snapThreshold: a
|
|
1410
|
-
}), f = _n({
|
|
1411
|
-
renderer: t,
|
|
1412
|
-
linesLayer: i.lines,
|
|
1413
|
-
animatedLinesLayer: i.linesAnimated
|
|
1414
|
-
}), p = [], m = null, h = null, g = null, _ = 0, v = !1, y = !1;
|
|
1415
|
-
function b() {
|
|
1416
|
-
return r.showAllFloors() ? null : r.getActiveFloor();
|
|
1417
|
-
}
|
|
1418
|
-
function x() {
|
|
1419
|
-
let e = b();
|
|
1420
|
-
return e === null ? p.filter((e) => !e.virtual) : p.filter((t) => t.p0.layer === e && !t.virtual);
|
|
1421
|
-
}
|
|
1422
|
-
function C() {
|
|
1423
|
-
if (!m || !h) return null;
|
|
1424
|
-
let e = x();
|
|
1425
|
-
return e.length ? {
|
|
1426
|
-
from: m,
|
|
1427
|
-
to: h,
|
|
1428
|
-
routePoints: wn(e),
|
|
1429
|
-
visibleLines: e
|
|
1430
|
-
} : null;
|
|
1431
|
-
}
|
|
1432
|
-
function w(e = null, t = !1) {
|
|
1433
|
-
if (!m || !h) return;
|
|
1434
|
-
let n = vn({
|
|
1435
|
-
routeLines: p,
|
|
1436
|
-
currentRouteLayer: b(),
|
|
1437
|
-
from: m,
|
|
1438
|
-
to: h,
|
|
1439
|
-
snap: e
|
|
1440
|
-
});
|
|
1441
|
-
f.draw(n, t), _ = n.distance;
|
|
1442
|
-
}
|
|
1443
|
-
function T(e) {
|
|
1444
|
-
let t = C();
|
|
1445
|
-
if (!t) {
|
|
1446
|
-
d.setTrail(null, null);
|
|
1447
|
-
return;
|
|
1448
|
-
}
|
|
1449
|
-
let n = g && e && !e.snapped ? g : null, r = (e) => {
|
|
1450
|
-
var t;
|
|
1451
|
-
return (t = e.bounds) != null && t.length ? null : e.id === "current-position" ? n : e;
|
|
1452
|
-
}, i = v ? null : r(t.from);
|
|
1453
|
-
if (i) {
|
|
1454
|
-
d.setTrail(t.routePoints[t.routePoints.length - 1], i);
|
|
1455
|
-
return;
|
|
1456
|
-
}
|
|
1457
|
-
let a = r(t.to);
|
|
1458
|
-
d.setTrail(a ? t.routePoints[0] : null, a);
|
|
1459
|
-
}
|
|
1460
|
-
function E() {
|
|
1461
|
-
if (!m || !h) return;
|
|
1462
|
-
let e = C();
|
|
1463
|
-
if (!e) {
|
|
1464
|
-
l.hide(), u.clear(), d.clearTrail(), w();
|
|
1465
|
-
return;
|
|
1466
|
-
}
|
|
1467
|
-
l.place(m, h, e.routePoints, y), u.place(p), w(), T(null);
|
|
1468
|
-
}
|
|
1469
|
-
function D() {
|
|
1470
|
-
if (!m || !h) return;
|
|
1471
|
-
let e = C();
|
|
1472
|
-
e && l.place(m, h, e.routePoints, y);
|
|
1473
|
-
}
|
|
1474
|
-
function O() {
|
|
1475
|
-
if (y = !1, !g || !m || !h) return null;
|
|
1476
|
-
let e = p.filter((e) => !e.virtual);
|
|
1477
|
-
if (!e.length) return null;
|
|
1478
|
-
let t = C(), n = t ? d.applyToRoute(g, t, e) : S(g, e, {
|
|
1479
|
-
snapThreshold: a,
|
|
1480
|
-
from: m,
|
|
1481
|
-
to: h
|
|
1482
|
-
});
|
|
1483
|
-
return n.snapped && (v = !0), y = n.snapped, n;
|
|
1484
|
-
}
|
|
1485
|
-
function k() {
|
|
1486
|
-
let e = yn(p, x());
|
|
1487
|
-
return s(e.lines, e.bounds), e;
|
|
1488
|
-
}
|
|
1489
|
-
function ee({ from: n, to: r, waypoints: i, accessible: a }) {
|
|
1490
|
-
let o = fn({
|
|
1491
|
-
engine: e,
|
|
1492
|
-
from: n,
|
|
1493
|
-
to: r,
|
|
1494
|
-
waypoints: i,
|
|
1495
|
-
accessible: a
|
|
1496
|
-
});
|
|
1497
|
-
if (!o.length) return M(), !1;
|
|
1498
|
-
v = !1, m = n, h = r, p = o, E();
|
|
1499
|
-
let { lines: s } = k(), l = O();
|
|
1500
|
-
return D(), T(l), l && w(l, !0), c(l ? _ : te(s)), t.flush(), !0;
|
|
1501
|
-
}
|
|
1502
|
-
function A(e) {
|
|
1503
|
-
let n = g !== null;
|
|
1504
|
-
if (g = e, !e) {
|
|
1505
|
-
y = !1, d.hideIcon(), T(null), n && D(), w(), c(_), t.flush();
|
|
1506
|
-
return;
|
|
1507
|
-
}
|
|
1508
|
-
d.placeIcon(e);
|
|
1509
|
-
let r = O();
|
|
1510
|
-
D(), T(r), r && w(r, !0), c(_), t.flush();
|
|
1511
|
-
}
|
|
1512
|
-
function j() {
|
|
1513
|
-
E();
|
|
1514
|
-
let e = O();
|
|
1515
|
-
D(), T(e), e && w(e, !0), p.length && k(), c(_), t.flush();
|
|
1516
|
-
}
|
|
1517
|
-
function M() {
|
|
1518
|
-
v = !1, p = [], m = null, h = null, _ = 0, l.hide(), u.clear(), d.clearTrail(), f.clear(), s([], new I()), c(0), t.flush();
|
|
1519
|
-
}
|
|
1520
|
-
function N() {
|
|
1521
|
-
M(), g = null, t.destroy();
|
|
1522
|
-
}
|
|
1523
|
-
return {
|
|
1524
|
-
setRoute: ee,
|
|
1525
|
-
onPositionChanged: A,
|
|
1526
|
-
onFloorChanged: j,
|
|
1527
|
-
clearRoute: M,
|
|
1528
|
-
destroy: N
|
|
1529
|
-
};
|
|
1530
|
-
}
|
|
1531
|
-
//#endregion
|
|
1532
|
-
//#region src/wayfinding/renderer/layerManager.ts
|
|
1533
|
-
function En(e) {
|
|
1534
|
-
let t = e.scene;
|
|
1535
|
-
if (!t) throw Error("renderer: rendererService.scene is null — start RendererService before constructing renderer");
|
|
1536
|
-
let n = t.rootLayer.children, r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map();
|
|
1537
|
-
return {
|
|
1538
|
-
touchedLayers: i,
|
|
1539
|
-
resolveLayer(e) {
|
|
1540
|
-
let t = r.get(e);
|
|
1541
|
-
if (t) return t;
|
|
1542
|
-
let i = n.find((t) => t.name === e);
|
|
1543
|
-
if (!i) throw Error(`renderer: layer "${e}" not found in scene`);
|
|
1544
|
-
return r.set(e, i), i;
|
|
1545
|
-
},
|
|
1546
|
-
touchLayer(e) {
|
|
1547
|
-
let t = this.resolveLayer(e);
|
|
1548
|
-
return i.set(e, t), t;
|
|
1549
|
-
},
|
|
1550
|
-
flush() {
|
|
1551
|
-
if (i.size !== 0) {
|
|
1552
|
-
for (let e of i.values()) e.children = [...e.children];
|
|
1553
|
-
e.update(...i.values()), i.clear();
|
|
1554
|
-
}
|
|
1555
|
-
},
|
|
1556
|
-
destroy() {
|
|
1557
|
-
i.clear(), r.clear();
|
|
1558
|
-
}
|
|
1559
|
-
};
|
|
1560
|
-
}
|
|
1561
|
-
//#endregion
|
|
1562
|
-
//#region src/wayfinding/renderer/iconManager.ts
|
|
1563
|
-
function Dn(e, t) {
|
|
1564
|
-
let n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map();
|
|
1565
|
-
function a(e, t) {
|
|
1566
|
-
return t === void 0 ? e : `${e}#${t}`;
|
|
1567
|
-
}
|
|
1568
|
-
function o(e, t) {
|
|
1569
|
-
let n = r.get(e);
|
|
1570
|
-
n || (n = /* @__PURE__ */ new Set(), r.set(e, n)), n.add(t), i.set(t, e);
|
|
1571
|
-
}
|
|
1572
|
-
function s(e) {
|
|
1573
|
-
let t = i.get(e);
|
|
1574
|
-
if (!t) return;
|
|
1575
|
-
let n = r.get(t);
|
|
1576
|
-
n && n.delete(e), i.delete(e);
|
|
1577
|
-
}
|
|
1578
|
-
function c(r, i, a) {
|
|
1579
|
-
var s, c, l;
|
|
1580
|
-
let u = e.touchLayer(a.layer), d = w(a.canvas, h(a.x, a.y, a.canvas.width, a.canvas.height, t.scale, a.rotation), {
|
|
1581
|
-
hidden: (s = a.hidden) == null ? !1 : s,
|
|
1582
|
-
dim: (c = a.dimmed) == null ? !1 : c,
|
|
1583
|
-
origin: a.origin
|
|
1584
|
-
});
|
|
1585
|
-
u.children.push(d), t.onPtScale(r, (e) => {
|
|
1586
|
-
let t = n.get(r);
|
|
1587
|
-
if (!(!t || t.imageDef.hidden)) return t.imageDef.bounds = A(h(t.imageDef.bounds.center.x, t.imageDef.bounds.center.y, t.imageDef.source.width, t.imageDef.source.height, e, t.imageDef.bounds.rotation)), t.imageDef;
|
|
1588
|
-
}), a.cardinalSnap && t.onRoll(r, (e) => {
|
|
1589
|
-
let t = n.get(r);
|
|
1590
|
-
if (!t) return;
|
|
1591
|
-
let i = pe(e, t.imageDef.bounds.rotation);
|
|
1592
|
-
if (i !== void 0) return t.imageDef.bounds.rotation += i, t.imageDef;
|
|
1593
|
-
});
|
|
1594
|
-
let f = {
|
|
1595
|
-
imageDef: d,
|
|
1596
|
-
layerName: a.layer,
|
|
1597
|
-
callback: (l = a.onClick) == null ? null : l
|
|
1598
|
-
};
|
|
1599
|
-
return n.set(r, f), o(i, r), f;
|
|
1600
|
-
}
|
|
1601
|
-
function l(r, i, a, o) {
|
|
1602
|
-
let l = e.resolveLayer(a.layerName), u = l.children, d = u.indexOf(a.imageDef);
|
|
1603
|
-
d >= 0 && u.splice(d, 1), e.touchedLayers.set(a.layerName, l), t.ptScaleRegistry.unregisterByName(r), t.rollRegistry.unregisterByName(r), n.delete(r), s(r), c(r, i, o);
|
|
1604
|
-
}
|
|
1605
|
-
function u(n, r, i, a) {
|
|
1606
|
-
var o, s, c;
|
|
1607
|
-
if (i.layerName !== a.layer) throw Error(`renderer: icon "${n}" cannot move between layers (was "${i.layerName}", got "${a.layer}")`);
|
|
1608
|
-
if (i.imageDef.source !== a.canvas) {
|
|
1609
|
-
l(n, r, i, a);
|
|
1610
|
-
return;
|
|
1611
|
-
}
|
|
1612
|
-
i.imageDef.bounds = A(h(a.x, a.y, a.canvas.width, a.canvas.height, t.scale, a.rotation)), i.imageDef.hidden = (o = a.hidden) == null ? !1 : o, i.imageDef.dim = (s = a.dimmed) == null ? !1 : s, i.callback = (c = a.onClick) == null ? null : c, e.touchLayer(a.layer);
|
|
1613
|
-
}
|
|
1614
|
-
return {
|
|
1615
|
-
setIcon(t, r, i) {
|
|
1616
|
-
let o = a(t, i);
|
|
1617
|
-
if (r === null) {
|
|
1618
|
-
let t = n.get(o);
|
|
1619
|
-
t && (t.imageDef.hidden = !0, t.callback = null, e.touchLayer(t.layerName));
|
|
1620
|
-
return;
|
|
1621
|
-
}
|
|
1622
|
-
let s = n.get(o);
|
|
1623
|
-
s ? u(o, t, s, r) : c(o, t, r);
|
|
1624
|
-
},
|
|
1625
|
-
clearIcons(t) {
|
|
1626
|
-
let i = typeof t == "string" ? [t] : t;
|
|
1627
|
-
for (let t of i) {
|
|
1628
|
-
let i = r.get(t);
|
|
1629
|
-
if (i) for (let t of i) {
|
|
1630
|
-
let r = n.get(t);
|
|
1631
|
-
r && (r.imageDef.hidden = !0, r.callback = null, e.touchLayer(r.layerName));
|
|
1632
|
-
}
|
|
1633
|
-
}
|
|
1634
|
-
},
|
|
1635
|
-
hideAll() {
|
|
1636
|
-
for (let t of n.values()) t.imageDef.hidden = !0, t.callback = null, e.touchedLayers.set(t.layerName, e.resolveLayer(t.layerName));
|
|
1637
|
-
},
|
|
1638
|
-
destroy() {
|
|
1639
|
-
for (let e of n.keys()) t.ptScaleRegistry.unregisterByName(e), t.rollRegistry.unregisterByName(e);
|
|
1640
|
-
n.clear(), r.clear(), i.clear();
|
|
1641
|
-
},
|
|
1642
|
-
handleClick({ data: e }) {
|
|
1643
|
-
let { defs: t } = M(e);
|
|
1644
|
-
for (let e of n.values()) if (e.callback && !e.imageDef.hidden && t.includes(e.imageDef)) {
|
|
1645
|
-
e.callback();
|
|
1646
|
-
return;
|
|
1647
|
-
}
|
|
1648
|
-
},
|
|
1649
|
-
handleHover({ data: e }) {
|
|
1650
|
-
let r = t.renderer;
|
|
1651
|
-
if (!r) return;
|
|
1652
|
-
let { defs: i } = M(e), a = !1;
|
|
1653
|
-
for (let e of n.values()) if (e.callback && !e.imageDef.hidden && i.includes(e.imageDef)) {
|
|
1654
|
-
a = !0;
|
|
1655
|
-
break;
|
|
1656
|
-
}
|
|
1657
|
-
r.canvas.style.cursor = a ? "pointer" : "";
|
|
1658
|
-
}
|
|
1659
|
-
};
|
|
1660
|
-
}
|
|
1661
|
-
//#endregion
|
|
1662
|
-
//#region src/wayfinding/renderer/trailManager.ts
|
|
1663
|
-
var On = 40;
|
|
1664
|
-
function kn(e, t) {
|
|
1665
|
-
let n = /* @__PURE__ */ new Map();
|
|
1666
|
-
function r(e) {
|
|
1667
|
-
return `trail#${e}`;
|
|
1668
|
-
}
|
|
1669
|
-
function i(t) {
|
|
1670
|
-
if (!t.dotDefs.length) return;
|
|
1671
|
-
let n = e.touchLayer(t.layerName), r = new Set(t.dotDefs);
|
|
1672
|
-
n.children = n.children.filter((e) => !r.has(e)), t.dotDefs = [];
|
|
1673
|
-
}
|
|
1674
|
-
function a(n) {
|
|
1675
|
-
let r = e.touchLayer(n.layerName), a = t.scale, o = On * a, s = c(n.from, n.to, o), l = n.canvas, u = s.map((e) => w(l, h(e.x, e.y, l.width, l.height, a)));
|
|
1676
|
-
i(n), r.children.push(...u), n.dotDefs = u;
|
|
1677
|
-
}
|
|
1678
|
-
function o(e) {
|
|
1679
|
-
let a = n.get(e);
|
|
1680
|
-
a && (i(a), t.ptScaleRegistry.unregisterByName(r(e)), n.delete(e));
|
|
1681
|
-
}
|
|
1682
|
-
return {
|
|
1683
|
-
setTrail(i, s, c, l) {
|
|
1684
|
-
if (s === null || c === null) {
|
|
1685
|
-
o(i);
|
|
1686
|
-
return;
|
|
1687
|
-
}
|
|
1688
|
-
if (!l) throw Error(`renderer: setTrail("${i}") requires options when from/to are non-null`);
|
|
1689
|
-
let u = n.get(i);
|
|
1690
|
-
if (u) {
|
|
1691
|
-
if (u.canvas !== l.canvas || u.layerName !== l.layer) throw Error(`renderer: trail "${i}" cannot change canvas or layer after first call`);
|
|
1692
|
-
u.from = s, u.to = c, a(u);
|
|
1693
|
-
return;
|
|
1694
|
-
}
|
|
1695
|
-
let d = {
|
|
1696
|
-
from: s,
|
|
1697
|
-
to: c,
|
|
1698
|
-
canvas: l.canvas,
|
|
1699
|
-
layerName: l.layer,
|
|
1700
|
-
dotDefs: []
|
|
1701
|
-
};
|
|
1702
|
-
n.set(i, d), t.onPtScale(r(i), () => (a(d), e.touchLayer(d.layerName))), a(d);
|
|
1703
|
-
},
|
|
1704
|
-
destroy() {
|
|
1705
|
-
for (let e of [...n.keys()]) o(e);
|
|
1706
|
-
}
|
|
1707
|
-
};
|
|
1708
|
-
}
|
|
1709
|
-
//#endregion
|
|
1710
|
-
//#region src/renderer/engine-core/animation.ts
|
|
1711
|
-
function An(e, t, n, r = 0) {
|
|
1712
|
-
let i = 0, a = 0, o = null, s = null;
|
|
1713
|
-
if (!e.length) return;
|
|
1714
|
-
let c = e.map((e) => {
|
|
1715
|
-
let t = e.points[1].x - e.points[0].x, n = e.points[1].y - e.points[0].y;
|
|
1716
|
-
return Math.sqrt(t * t + n * n);
|
|
1717
|
-
}), l = c.reduce((e, t) => e + t, 0), u = Math.max(20, Math.min(l / 2, 300));
|
|
1718
|
-
function d(e) {
|
|
1719
|
-
let t = e % 1 * l, n = 0;
|
|
1720
|
-
i = 0, a = 0;
|
|
1721
|
-
for (let e = 0; e < c.length; e++) {
|
|
1722
|
-
if (n + c[e] > t) {
|
|
1723
|
-
i = e, a = t - n;
|
|
1724
|
-
break;
|
|
1725
|
-
}
|
|
1726
|
-
n += c[e], e === c.length - 1 && (i = 0, a = 0);
|
|
1727
|
-
}
|
|
1728
|
-
}
|
|
1729
|
-
function f(e, t) {
|
|
1730
|
-
let n = e.points[0], r = e.points[1], i = r.x - n.x, a = r.y - n.y, o = Math.sqrt(i * i + a * a), s = Math.min(t / o, 1);
|
|
1731
|
-
return {
|
|
1732
|
-
points: [{
|
|
1733
|
-
x: n.x,
|
|
1734
|
-
y: n.y
|
|
1735
|
-
}, {
|
|
1736
|
-
x: n.x + i * s,
|
|
1737
|
-
y: n.y + a * s
|
|
1738
|
-
}],
|
|
1739
|
-
color: e.color,
|
|
1740
|
-
width: e.width
|
|
1741
|
-
};
|
|
1742
|
-
}
|
|
1743
|
-
function p(r) {
|
|
1744
|
-
o || (o = r);
|
|
1745
|
-
let l = (r - o) / 1e3;
|
|
1746
|
-
o = r;
|
|
1747
|
-
let d = n(), m = u * Math.sqrt(d);
|
|
1748
|
-
for (a += m * l; a >= c[i];) a -= c[i], i++, i >= e.length && (i = 0);
|
|
1749
|
-
let h = e[i];
|
|
1750
|
-
t(f(h, a), i, !1), s = requestAnimationFrame(p);
|
|
1751
|
-
}
|
|
1752
|
-
function m() {
|
|
1753
|
-
h(), r <= 0 && (i = 0, a = 0), o = null, s = requestAnimationFrame(p);
|
|
1754
|
-
}
|
|
1755
|
-
function h() {
|
|
1756
|
-
s && (cancelAnimationFrame(s), s = null, o = null);
|
|
1757
|
-
}
|
|
1758
|
-
function g() {
|
|
1759
|
-
if (l <= 0) return 0;
|
|
1760
|
-
let e = 0;
|
|
1761
|
-
for (let t = 0; t < i; t++) e += c[t];
|
|
1762
|
-
return e += a, e / l;
|
|
1763
|
-
}
|
|
1764
|
-
function _() {
|
|
1765
|
-
document.visibilityState === "visible" ? m() : h();
|
|
1766
|
-
}
|
|
1767
|
-
return r > 0 && d(r), document.addEventListener("visibilitychange", _), m(), {
|
|
1768
|
-
stop: () => {
|
|
1769
|
-
h(), document.removeEventListener("visibilitychange", _);
|
|
1770
|
-
},
|
|
1771
|
-
getProgress: g
|
|
1772
|
-
};
|
|
1773
|
-
}
|
|
1774
|
-
//#endregion
|
|
1775
|
-
//#region src/wayfinding/renderer/routeLineManager.ts
|
|
1776
|
-
function jn(e, t, n) {
|
|
1777
|
-
let r = null, i = null, a = null;
|
|
1778
|
-
return {
|
|
1779
|
-
setRouteLines(o, s, c) {
|
|
1780
|
-
var l, u;
|
|
1781
|
-
let d = e.touchLayer(c.linesLayer), f = e.touchLayer(c.animatedLinesLayer);
|
|
1782
|
-
i = d, a = f;
|
|
1783
|
-
let m = (l = c.resetAnimation) == null ? !0 : l, h = 0;
|
|
1784
|
-
r && (m || (h = r.getProgress()), r.stop(), r = null);
|
|
1785
|
-
let g = o.map((e) => p(e, n.passed)), _ = s.map((e) => p(e, n.remaining));
|
|
1786
|
-
if (d.children = [...g, ..._], !_.length) {
|
|
1787
|
-
f.children = [];
|
|
1788
|
-
return;
|
|
1789
|
-
}
|
|
1790
|
-
let v = _.map((e) => ({
|
|
1791
|
-
...e,
|
|
1792
|
-
color: n.active
|
|
1793
|
-
}));
|
|
1794
|
-
r = (u = An(v, (e, n, r) => {
|
|
1795
|
-
f.children = r ? [] : [...v.slice(0, n), e], t.update(f);
|
|
1796
|
-
}, () => t.scale, h)) == null ? null : u;
|
|
1797
|
-
},
|
|
1798
|
-
clearLines() {
|
|
1799
|
-
r && (r.stop(), r = null), i && (i.children = [], e.touchedLayers.set(i.name, i)), a && (a.children = [], e.touchedLayers.set(a.name, a));
|
|
1800
|
-
},
|
|
1801
|
-
destroy() {
|
|
1802
|
-
this.clearLines();
|
|
1803
|
-
}
|
|
1804
|
-
};
|
|
1805
|
-
}
|
|
1806
|
-
//#endregion
|
|
1807
|
-
//#region src/wayfinding/renderer/createWayfindingRenderer.ts
|
|
1808
|
-
var Mn = {
|
|
1809
|
-
passed: "#B5B7BC",
|
|
1810
|
-
remaining: "#A4CCE2",
|
|
1811
|
-
active: "#0794EA"
|
|
1812
|
-
};
|
|
1813
|
-
function Nn(e, t = {}) {
|
|
1814
|
-
let n = {
|
|
1815
|
-
...Mn,
|
|
1816
|
-
...t.colors
|
|
1817
|
-
}, r = En(e), i = Dn(r, e), a = kn(r, e), o = jn(r, e, n), s = e.renderer;
|
|
1818
|
-
if (!s) throw Error("renderer: rendererService.renderer is null — start RendererService before constructing renderer");
|
|
1819
|
-
s.events.addEventListener("pointer:click", i.handleClick), s.events.addEventListener("pointer:move", i.handleHover);
|
|
1820
|
-
let c = {
|
|
1821
|
-
setIcon: i.setIcon,
|
|
1822
|
-
clearIcons: i.clearIcons,
|
|
1823
|
-
setTrail: a.setTrail,
|
|
1824
|
-
setRouteLines: o.setRouteLines,
|
|
1825
|
-
clearRoute() {
|
|
1826
|
-
o.clearLines(), a.destroy(), i.hideAll();
|
|
1827
|
-
},
|
|
1828
|
-
flush: r.flush,
|
|
1829
|
-
destroy() {
|
|
1830
|
-
c.clearRoute();
|
|
1831
|
-
let t = e.renderer;
|
|
1832
|
-
t && (t.events.removeEventListener("pointer:click", i.handleClick), t.events.removeEventListener("pointer:move", i.handleHover)), i.destroy(), a.destroy(), o.destroy(), r.destroy();
|
|
1833
|
-
}
|
|
1834
|
-
};
|
|
1835
|
-
return c;
|
|
1836
|
-
}
|
|
1837
|
-
//#endregion
|
|
1838
|
-
//#region src/wayfinding/createWayfinding.ts
|
|
1839
|
-
function Pn(e) {
|
|
1840
|
-
var t, n, r;
|
|
1841
|
-
let i = g(E), a = le({
|
|
1842
|
-
iconMap: L.fp.icons,
|
|
1843
|
-
pixelRatio: devicePixelRatio
|
|
1844
|
-
}), o = Nn(e), c = s(F, L.routeStore), l = {
|
|
1845
|
-
points: De,
|
|
1846
|
-
trail: Oe,
|
|
1847
|
-
lines: ke,
|
|
1848
|
-
linesAnimated: Ae,
|
|
1849
|
-
currentPosition: je
|
|
1850
|
-
}, u = Tn({
|
|
1851
|
-
engine: i,
|
|
1852
|
-
renderer: o,
|
|
1853
|
-
iconProvider: a,
|
|
1854
|
-
floorContext: c,
|
|
1855
|
-
layers: l,
|
|
1856
|
-
snapThreshold: f({
|
|
1857
|
-
thresholdInMeters: _(R == null || (t = R.properties) == null || (t = t.config) == null ? void 0 : t.snapThreshold) || 7.5,
|
|
1858
|
-
gpsConfig: R == null || (n = R.properties) == null ? void 0 : n.config
|
|
1859
|
-
}),
|
|
1860
|
-
onTransitionClick: (e) => {
|
|
1861
|
-
e.role === "exit" && F.updateVisibility(e.targetLayer, !0);
|
|
1862
|
-
},
|
|
1863
|
-
onRouteUpdate: (e, t) => {
|
|
1864
|
-
L.routeStore.updateRoute(e), t.isEmpty() || (ye.moveToRect = t);
|
|
1865
|
-
},
|
|
1866
|
-
onRouteDistance: (e) => L.routeStore.updateRouteDistance(e)
|
|
1867
|
-
}), d = ln({
|
|
1868
|
-
renderer: o,
|
|
1869
|
-
kioskIconMap: L.fp.icons,
|
|
1870
|
-
layer: l.points
|
|
1871
|
-
}), p = dn({
|
|
1872
|
-
renderer: o,
|
|
1873
|
-
iconProvider: a,
|
|
1874
|
-
floorContext: c,
|
|
1875
|
-
layer: l.points
|
|
1876
|
-
}), m = b(R == null || (r = R.properties) == null ? void 0 : r.config), h = on({
|
|
1877
|
-
runtime: u,
|
|
1878
|
-
kioskHandler: d,
|
|
1879
|
-
yahHandler: p,
|
|
1880
|
-
stores: {
|
|
1881
|
-
routeStore: L.routeStore,
|
|
1882
|
-
uiState: ye,
|
|
1883
|
-
layerStore: F
|
|
1884
|
-
},
|
|
1885
|
-
rerouteThresholdSvg: m
|
|
1886
|
-
});
|
|
1887
|
-
return o.flush(), () => {
|
|
1888
|
-
h(), u.destroy();
|
|
1889
|
-
};
|
|
1890
|
-
}
|
|
1891
|
-
//#endregion
|
|
1892
|
-
export { Jt as a, pt as c, qt as i, ut as l, rn as n, Nt as o, Gt as r, wt as s, Pn as t, dt as u };
|