@eyeon/map 2.0.13 → 2.0.14
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/assets/MapViewer.css +1 -1
- package/dist/chunks/MapViewer.js +2486 -2055
- package/dist/chunks/MapViewer.js.map +1 -1
- package/dist/chunks/stacking.js +962 -782
- package/dist/chunks/stacking.js.map +1 -1
- package/dist/chunks/wheelZoom.js +27 -27
- package/dist/core/currentLocation.d.ts +15 -0
- package/dist/core/currentLocation.d.ts.map +1 -0
- package/dist/core/hostChrome.d.ts +9 -1
- package/dist/core/hostChrome.d.ts.map +1 -1
- package/dist/core/index.d.ts +3 -0
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +144 -130
- package/dist/core/publicShapes.d.ts +18 -0
- package/dist/core/publicShapes.d.ts.map +1 -0
- package/dist/core/publish/index.d.ts.map +1 -1
- package/dist/core/types.d.ts +12 -1
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/websiteModal.d.ts +53 -0
- package/dist/core/websiteModal.d.ts.map +1 -0
- package/dist/editor/index.css +227 -0
- package/dist/editor/index.js +219 -219
- package/dist/specialIcons.d.ts +2 -2
- package/dist/viewer/MapViewer.d.ts +2 -0
- package/dist/viewer/MapViewer.d.ts.map +1 -1
- package/dist/viewer/camera.d.ts +10 -1
- package/dist/viewer/camera.d.ts.map +1 -1
- package/dist/viewer/components/LevelMeshes.d.ts +6 -2
- package/dist/viewer/components/LevelMeshes.d.ts.map +1 -1
- package/dist/viewer/components/MapScene.d.ts +7 -2
- package/dist/viewer/components/MapScene.d.ts.map +1 -1
- package/dist/viewer/components/RouteLine.d.ts +25 -4
- package/dist/viewer/components/RouteLine.d.ts.map +1 -1
- package/dist/viewer/fetchWebsiteRetailers.d.ts +3 -0
- package/dist/viewer/fetchWebsiteRetailers.d.ts.map +1 -0
- package/dist/viewer/index.css +227 -0
- package/dist/viewer/index.js +6 -6
- package/dist/viewer/orbitWheelZoom.d.ts +12 -0
- package/dist/viewer/orbitWheelZoom.d.ts.map +1 -0
- package/dist/viewer/ui/WebsiteInfoModal.d.ts +10 -0
- package/dist/viewer/ui/WebsiteInfoModal.d.ts.map +1 -0
- package/package.json +2 -2
package/dist/editor/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as k, jsx as c, Fragment as Je } from "react/jsx-runtime";
|
|
2
2
|
import qi, { useState as z, useMemo as me, useEffect as pe, useRef as ue, useImperativeHandle as ul, useLayoutEffect as pl, useCallback as fn, useId as hl, Suspense as fl } from "react";
|
|
3
|
-
import { a4 as ml,
|
|
4
|
-
import { c as Vl, d as
|
|
3
|
+
import { a4 as ml, ag as wr, b6 as dt, t as Qi, a6 as gn, bo as yl, P as es, d as Nt, ai as wn, ar as Eo, E as gl, V as xo, W as kl, bc as _l, g as Oo, b9 as vl, bq as Il, bn as bl, a as xt, aR as Cr, aH as xl, aI as wl, aj as Cl, aQ as Nl, aY as Jn, J as Sl, aD as Mn, L as Ll, T as Dt, Z as Al, v as cr, a7 as $t, x as ns, _ as ts, be as os, c as El, X as Ol, bm as Tl, n as Rl, aG as Ml, b as wo, Q as Pl, D as si, $ as Dl, aM as $l, aP as Fl, bw as zl, M as Bl, ak as Wl, p as Kl, H as Wo } from "../chunks/stacking.js";
|
|
4
|
+
import { c as Vl, d as Hl, e as Ul, f as Xl, g as zn, h as rs, i as jl, j as Yl, k as Gl, l as Zl, b as Jl, M as ql } from "../chunks/MapViewer.js";
|
|
5
5
|
import { n as Ql, o as ec, r as nc } from "../chunks/wheelZoom.js";
|
|
6
6
|
import { createPortal as is } from "react-dom";
|
|
7
7
|
function bo(e) {
|
|
@@ -29,7 +29,7 @@ function Vo(e) {
|
|
|
29
29
|
var n;
|
|
30
30
|
return ss(e) ?? ((n = e.find((t) => t.kind === "outdoor")) == null ? void 0 : n.id) ?? null;
|
|
31
31
|
}
|
|
32
|
-
function
|
|
32
|
+
function Ho(e) {
|
|
33
33
|
return ml(e);
|
|
34
34
|
}
|
|
35
35
|
function li(e, n) {
|
|
@@ -93,7 +93,7 @@ function ac(e) {
|
|
|
93
93
|
const n = e.key.toLowerCase();
|
|
94
94
|
return n === "z" && e.shiftKey ? !0 : n === "y" && !e.shiftKey;
|
|
95
95
|
}
|
|
96
|
-
const
|
|
96
|
+
const Uo = [
|
|
97
97
|
{ id: "select", label: "Select", group: "map" },
|
|
98
98
|
{ id: "pan", label: "Pan", group: "map" },
|
|
99
99
|
{ id: "draw-unit", label: "Draw rectangle", draw: !0, group: "map" },
|
|
@@ -546,9 +546,9 @@ function Ac({
|
|
|
546
546
|
canEdit: t,
|
|
547
547
|
group: o
|
|
548
548
|
}) {
|
|
549
|
-
const i =
|
|
549
|
+
const i = Uo.filter((p) => p.group !== "route"), r = Uo.filter(
|
|
550
550
|
(p) => p.group === "route" && p.id !== "draw-route"
|
|
551
|
-
), s = o !== "route", l = o !== "map", d =
|
|
551
|
+
), s = o !== "route", l = o !== "map", d = Uo.find((p) => p.id === "select"), u = o === "route" && d ? [d, ...r] : r, h = (p) => {
|
|
552
552
|
const m = Sc[p.id];
|
|
553
553
|
return /* @__PURE__ */ k(
|
|
554
554
|
"button",
|
|
@@ -690,7 +690,7 @@ function Rc(e, n, t, o, i, r, s) {
|
|
|
690
690
|
const $ = Math.sqrt(E);
|
|
691
691
|
l *= $, d *= $;
|
|
692
692
|
}
|
|
693
|
-
const N = l * l,
|
|
693
|
+
const N = l * l, H = d * d, T = N * H - N * w * w - H * O * O, U = N * w * w + H * O * O, B = Math.sqrt(Math.max(0, T / U)) * (i === r ? -1 : 1), q = B * l * w / d, W = -B * d * O / l, F = h * q - p * W + (e.x + s.x) / 2, oe = p * q + h * W + (e.y + s.y) / 2, j = (O - q) / l, Pe = (w - W) / d, We = (-O - q) / l, we = (-w - W) / d, De = Math.atan2(Pe, j);
|
|
694
694
|
let Se = Math.atan2(j * we - Pe * We, j * We + Pe * we);
|
|
695
695
|
!r && Se > 0 ? Se -= 2 * Math.PI : r && Se < 0 && (Se += 2 * Math.PI);
|
|
696
696
|
const ke = ($) => {
|
|
@@ -729,7 +729,7 @@ function Mc(e) {
|
|
|
729
729
|
closed: E,
|
|
730
730
|
anchors: o.map(se),
|
|
731
731
|
edges: i.map(
|
|
732
|
-
(
|
|
732
|
+
(H) => H.kind === "line" ? { kind: "line" } : { kind: "cubic", c1: se(H.c1), c2: se(H.c2) }
|
|
733
733
|
)
|
|
734
734
|
}), o = [], i = [], m = !1;
|
|
735
735
|
}, w = (E) => o.length > 0 && Bn(o[o.length - 1], E) ? !1 : (o.push(se(E)), !0);
|
|
@@ -738,8 +738,8 @@ function Mc(e) {
|
|
|
738
738
|
switch (/[a-zA-Z]/.test(E) && (p = E, h++), p) {
|
|
739
739
|
case "M":
|
|
740
740
|
case "m": {
|
|
741
|
-
const N = p === "m",
|
|
742
|
-
m && O(!1), r =
|
|
741
|
+
const N = p === "m", H = N ? r + y() : y(), T = N ? s + y() : y();
|
|
742
|
+
m && O(!1), r = H, s = T, l = r, d = s, w({ x: r, y: s }), m = !0, u = null, p = N ? "l" : "L";
|
|
743
743
|
break;
|
|
744
744
|
}
|
|
745
745
|
case "L":
|
|
@@ -760,43 +760,43 @@ function Mc(e) {
|
|
|
760
760
|
}
|
|
761
761
|
case "C":
|
|
762
762
|
case "c": {
|
|
763
|
-
const N = p === "c",
|
|
763
|
+
const N = p === "c", H = N ? r + y() : y(), T = N ? s + y() : y(), U = N ? r + y() : y(), B = N ? s + y() : y(), q = N ? r + y() : y(), W = N ? s + y() : y();
|
|
764
764
|
w({ x: q, y: W }) && i.push({
|
|
765
765
|
kind: "cubic",
|
|
766
|
-
c1: { x:
|
|
767
|
-
c2: { x:
|
|
768
|
-
}), u = { x:
|
|
766
|
+
c1: { x: H, y: T },
|
|
767
|
+
c2: { x: U, y: B }
|
|
768
|
+
}), u = { x: U, y: B }, r = q, s = W;
|
|
769
769
|
break;
|
|
770
770
|
}
|
|
771
771
|
case "S":
|
|
772
772
|
case "s": {
|
|
773
|
-
const N = p === "s",
|
|
773
|
+
const N = p === "s", H = u ? { x: 2 * r - u.x, y: 2 * s - u.y } : { x: r, y: s }, T = N ? r + y() : y(), U = N ? s + y() : y(), B = N ? r + y() : y(), q = N ? s + y() : y();
|
|
774
774
|
w({ x: B, y: q }) && i.push({
|
|
775
775
|
kind: "cubic",
|
|
776
|
-
c1:
|
|
777
|
-
c2: { x: T, y:
|
|
778
|
-
}), u = { x: T, y:
|
|
776
|
+
c1: H,
|
|
777
|
+
c2: { x: T, y: U }
|
|
778
|
+
}), u = { x: T, y: U }, r = B, s = q;
|
|
779
779
|
break;
|
|
780
780
|
}
|
|
781
781
|
case "Q":
|
|
782
782
|
case "q": {
|
|
783
|
-
const N = p === "q",
|
|
784
|
-
w({ x:
|
|
783
|
+
const N = p === "q", H = N ? r + y() : y(), T = N ? s + y() : y(), U = N ? r + y() : y(), B = N ? s + y() : y(), { c1: q, c2: W } = ui({ x: r, y: s }, { x: H, y: T }, { x: U, y: B });
|
|
784
|
+
w({ x: U, y: B }) && i.push({ kind: "cubic", c1: q, c2: W }), u = { x: H, y: T }, r = U, s = B;
|
|
785
785
|
break;
|
|
786
786
|
}
|
|
787
787
|
case "T":
|
|
788
788
|
case "t": {
|
|
789
|
-
const N = p === "t",
|
|
790
|
-
w({ x:
|
|
789
|
+
const N = p === "t", H = u ? 2 * r - u.x : r, T = u ? 2 * s - u.y : s, U = N ? r + y() : y(), B = N ? s + y() : y(), { c1: q, c2: W } = ui({ x: r, y: s }, { x: H, y: T }, { x: U, y: B });
|
|
790
|
+
w({ x: U, y: B }) && i.push({ kind: "cubic", c1: q, c2: W }), u = { x: H, y: T }, r = U, s = B;
|
|
791
791
|
break;
|
|
792
792
|
}
|
|
793
793
|
case "A":
|
|
794
794
|
case "a": {
|
|
795
|
-
const N = p === "a",
|
|
795
|
+
const N = p === "a", H = y(), T = y(), U = y(), B = y() !== 0, q = y() !== 0, W = N ? r + y() : y(), F = N ? s + y() : y(), oe = Rc(
|
|
796
796
|
{ x: r, y: s },
|
|
797
|
-
U,
|
|
798
|
-
T,
|
|
799
797
|
H,
|
|
798
|
+
T,
|
|
799
|
+
U,
|
|
800
800
|
B,
|
|
801
801
|
q,
|
|
802
802
|
{ x: W, y: F }
|
|
@@ -918,8 +918,8 @@ function Kc(e) {
|
|
|
918
918
|
const w = [];
|
|
919
919
|
for (let N = y; N <= O; N++)
|
|
920
920
|
w.push(e.anchors[t(s + N)]);
|
|
921
|
-
const E = w.slice(0, -1).every((N,
|
|
922
|
-
const T = e.edges[t(s + y +
|
|
921
|
+
const E = w.slice(0, -1).every((N, H) => {
|
|
922
|
+
const T = e.edges[t(s + y + H)];
|
|
923
923
|
return !T || T.kind === "line";
|
|
924
924
|
});
|
|
925
925
|
if (l.length === 0 && l.push(se(w[0])), E && $c(w)) {
|
|
@@ -959,7 +959,7 @@ function ao(e, n, t, o, i) {
|
|
|
959
959
|
function Vc(e) {
|
|
960
960
|
return e.map((n) => n.map((t) => ({ x: t.x, y: t.y })));
|
|
961
961
|
}
|
|
962
|
-
function
|
|
962
|
+
function Hc(e) {
|
|
963
963
|
return e.map((n) => {
|
|
964
964
|
if (n.length === 0) return "";
|
|
965
965
|
let t = `M ${n[0].x} ${n[0].y}`;
|
|
@@ -972,7 +972,7 @@ function so(e) {
|
|
|
972
972
|
const n = e.map((t) => t.length > 1 && t[0].x === t[t.length - 1].x && t[0].y === t[t.length - 1].y ? t.slice(0, -1) : t).filter((t) => t.length >= 3);
|
|
973
973
|
return {
|
|
974
974
|
paths: n.map((t) => ({
|
|
975
|
-
d:
|
|
975
|
+
d: Hc([t]),
|
|
976
976
|
closed: !0
|
|
977
977
|
})),
|
|
978
978
|
polygons: n
|
|
@@ -1007,7 +1007,7 @@ function hi(e, n, t) {
|
|
|
1007
1007
|
}
|
|
1008
1008
|
return ut(i);
|
|
1009
1009
|
}
|
|
1010
|
-
function
|
|
1010
|
+
function Uc(e, n, t, o) {
|
|
1011
1011
|
if (o.x === 0 && o.y === 0) return e;
|
|
1012
1012
|
const i = Ee(e), r = i[n];
|
|
1013
1013
|
if (!r || t < 0 || t >= Pn(r)) return e;
|
|
@@ -1551,7 +1551,7 @@ function ha(e, n, t = !1) {
|
|
|
1551
1551
|
pa(bs(e, n, t))
|
|
1552
1552
|
]);
|
|
1553
1553
|
}
|
|
1554
|
-
const zt = "Text", co = 48, xs = Vl, ws =
|
|
1554
|
+
const zt = "Text", co = 48, xs = Vl, ws = Hl, fa = 0.5;
|
|
1555
1555
|
function mr(e) {
|
|
1556
1556
|
var n, t;
|
|
1557
1557
|
return e.kind === "label" && !!((t = (n = e.label) == null ? void 0 : n.text) != null && t.trim());
|
|
@@ -1902,7 +1902,7 @@ function wt(e, n, t, o, i = "walk") {
|
|
|
1902
1902
|
kind: i
|
|
1903
1903
|
};
|
|
1904
1904
|
}
|
|
1905
|
-
function
|
|
1905
|
+
function Ha(e) {
|
|
1906
1906
|
const { shape: n, anchors: t, allocId: o } = e, i = e.point ?? Ka(n), r = t.find(
|
|
1907
1907
|
(l) => l.shapeId === n.id && gn(l, i) <= Nt
|
|
1908
1908
|
);
|
|
@@ -1918,7 +1918,7 @@ function Ua(e) {
|
|
|
1918
1918
|
};
|
|
1919
1919
|
return { ops: [{ op: "upsert_anchor", anchor: s }], anchorId: s.id };
|
|
1920
1920
|
}
|
|
1921
|
-
function
|
|
1921
|
+
function Ua(e) {
|
|
1922
1922
|
const { shape: n, anchors: t, edges: o, mapId: i, from: r, drop: s, maxDist: l, allocId: d } = e, u = [];
|
|
1923
1923
|
let h = t.find(
|
|
1924
1924
|
(w) => w.shapeId === n.id && gn(w, r) <= Nt
|
|
@@ -1945,7 +1945,7 @@ function Ha(e) {
|
|
|
1945
1945
|
if (p.type === "junction")
|
|
1946
1946
|
m = p.anchorId;
|
|
1947
1947
|
else {
|
|
1948
|
-
const w = o.find((
|
|
1948
|
+
const w = o.find((H) => H.id === p.edgeId);
|
|
1949
1949
|
if (!w) return u;
|
|
1950
1950
|
m = d(), u.push({
|
|
1951
1951
|
op: "upsert_anchor",
|
|
@@ -2108,9 +2108,9 @@ const Ms = qi.forwardRef(
|
|
|
2108
2108
|
underlayShapes: w = [],
|
|
2109
2109
|
openingUnderlayShapes: E = [],
|
|
2110
2110
|
interactiveOnly: N = !1,
|
|
2111
|
-
showGrid:
|
|
2111
|
+
showGrid: H = !0,
|
|
2112
2112
|
routeMode: T = !1,
|
|
2113
|
-
readOnly:
|
|
2113
|
+
readOnly: U = !1,
|
|
2114
2114
|
emptyMessage: B = "Choose a floor or Outdoor to edit",
|
|
2115
2115
|
onSelectShape: q,
|
|
2116
2116
|
onSelectAnchors: W,
|
|
@@ -2130,8 +2130,8 @@ const Ms = qi.forwardRef(
|
|
|
2130
2130
|
onRouteDraftActiveChange: $,
|
|
2131
2131
|
onToolChange: ee
|
|
2132
2132
|
}, ce) {
|
|
2133
|
-
|
|
2134
|
-
const ie = Ts(l, T), he = ue(null), $e = ue(null), rn = ue(null), [un, Ve] = z({ x: 0, y: 0 }), [ae, ne] = z(1), fe = ue({ pan: { x: 0, y: 0 }, zoom: 1 }), _e = ue(null), Fe = ue(null), ve = ue(null), Xe = ue(null), [qn, Sn] = z(1),
|
|
2133
|
+
Ul();
|
|
2134
|
+
const ie = Ts(l, T), he = ue(null), $e = ue(null), rn = ue(null), [un, Ve] = z({ x: 0, y: 0 }), [ae, ne] = z(1), fe = ue({ pan: { x: 0, y: 0 }, zoom: 1 }), _e = ue(null), Fe = ue(null), ve = ue(null), Xe = ue(null), [qn, Sn] = z(1), He = ue(/* @__PURE__ */ new Map()), Re = ue(null), [L, Ce] = z([]), [pn, ye] = z(!1), [Me, Ue] = z([]), [R, Z] = z(null), [te, x] = z(null), [S, D] = z(null), [X, A] = z(null), [Q, ze] = z(null), [Ge, Be] = z(null), [ge, yn] = z(
|
|
2135
2135
|
null
|
|
2136
2136
|
), [en, Ln] = z(
|
|
2137
2137
|
null
|
|
@@ -2145,7 +2145,7 @@ const Ms = qi.forwardRef(
|
|
|
2145
2145
|
}, [$, X]), pe(() => {
|
|
2146
2146
|
S != null && (o.some((a) => a.id === S) || (D(null), Be(null)));
|
|
2147
2147
|
}, [o, S]);
|
|
2148
|
-
const [Le, Lt] = z(null), [qe, ht] = z(null), [Kn, ft] = z({ x: 0, y: 0 }), [kn, sn] = z(null), [_n, hn] = z(null), [ln, nn] = z(null), [Ze, vn] = z(null), [Ae, nt] = z(null), [mt, Vn] = z(null), [Ro, g] = z(null), [I, v] = z(null), K = (I == null ? void 0 : I.type) === "edge" ? { edgeId: I.edgeId, point: I.point } : null, [J, xe] = z(null), Ie = ue(null), [
|
|
2148
|
+
const [Le, Lt] = z(null), [qe, ht] = z(null), [Kn, ft] = z({ x: 0, y: 0 }), [kn, sn] = z(null), [_n, hn] = z(null), [ln, nn] = z(null), [Ze, vn] = z(null), [Ae, nt] = z(null), [mt, Vn] = z(null), [Ro, g] = z(null), [I, v] = z(null), K = (I == null ? void 0 : I.type) === "edge" ? { edgeId: I.edgeId, point: I.point } : null, [J, xe] = z(null), Ie = ue(null), [Hn, Un] = z(!1), P = (a) => Aa(a, fe.current.zoom, qn), At = (a, f) => {
|
|
2149
2149
|
yt(), fe.current = { pan: a, zoom: f }, Ve(a), ne(f);
|
|
2150
2150
|
}, uo = () => {
|
|
2151
2151
|
var _;
|
|
@@ -2209,7 +2209,7 @@ const Ms = qi.forwardRef(
|
|
|
2209
2209
|
},
|
|
2210
2210
|
[]
|
|
2211
2211
|
), pe(() => {
|
|
2212
|
-
Ce([]), ye(!1),
|
|
2212
|
+
Ce([]), ye(!1), Ue([]), D(null), A(null), ze(null), Be(null), Lt(null), Vn(null), g(null), ht(null), sn(null), Z(null), x(null), nn(null), vn(null), ve.current != null && (cancelAnimationFrame(ve.current), ve.current = null), Xe.current = null, v(null), nt(null), Ln(null), _t(l) || (yn(null), An(null)), Qn(null), ft({ x: 0, y: 0 });
|
|
2213
2213
|
}, [l]), pe(() => {
|
|
2214
2214
|
hn(null), nn(null), vn(null), nt(null), xe(null), Vn(null), ht(null), sn(null), ft({ x: 0, y: 0 });
|
|
2215
2215
|
}, [d]), pe(() => {
|
|
@@ -2273,12 +2273,12 @@ const Ms = qi.forwardRef(
|
|
|
2273
2273
|
q(_ && _.action === "update" ? _.shapeId : null);
|
|
2274
2274
|
}
|
|
2275
2275
|
}, po = (a) => {
|
|
2276
|
-
if (!_t(l) ||
|
|
2276
|
+
if (!_t(l) || U) return !1;
|
|
2277
2277
|
const f = pt ?? ko(xn, a, P(Gn), ge);
|
|
2278
2278
|
return f ? ge ? ro(ge, f) ? (yn(null), An(null), !0) : (Vr(aa(xn, ge, f)), yn(null), Ln(null), An(null), !0) : (yn(f), q(f.shapeId), kt(l) && (ee == null || ee("select")), !0) : !1;
|
|
2279
2279
|
}, Do = (a) => {
|
|
2280
2280
|
if (po(a)) return !0;
|
|
2281
|
-
if (!kt(l) ||
|
|
2281
|
+
if (!kt(l) || U) return !1;
|
|
2282
2282
|
const f = P(Gn), _ = P(lt), b = _i(xn, a, _);
|
|
2283
2283
|
return b && !Vt(a, f) ? (Vr(
|
|
2284
2284
|
ca(xn, b, P(Pi))
|
|
@@ -2292,7 +2292,7 @@ const Ms = qi.forwardRef(
|
|
|
2292
2292
|
b,
|
|
2293
2293
|
C
|
|
2294
2294
|
);
|
|
2295
|
-
},
|
|
2295
|
+
}, Hr = (a, f) => {
|
|
2296
2296
|
var b;
|
|
2297
2297
|
const _ = (b = rn.current) == null ? void 0 : b.getBoundingClientRect();
|
|
2298
2298
|
_ && xe({
|
|
@@ -2306,7 +2306,7 @@ const Ms = qi.forwardRef(
|
|
|
2306
2306
|
polygonIndex: f,
|
|
2307
2307
|
vertexIndex: _ + 1
|
|
2308
2308
|
}), nn(null), vn(null);
|
|
2309
|
-
},
|
|
2309
|
+
}, Ur = (a, f, _, b) => {
|
|
2310
2310
|
var C, M;
|
|
2311
2311
|
G && (b.stopPropagation(), (M = (C = b.currentTarget).setPointerCapture) == null || M.call(C, b.pointerId), nt({
|
|
2312
2312
|
shapeId: G.id,
|
|
@@ -2340,7 +2340,7 @@ const Ms = qi.forwardRef(
|
|
|
2340
2340
|
polygonIndex: _.polygonIndex,
|
|
2341
2341
|
vertexIndex: _.vertexIndex
|
|
2342
2342
|
}), (C = (b = f.currentTarget).setPointerCapture) == null || C.call(b, f.pointerId), !0);
|
|
2343
|
-
},
|
|
2343
|
+
}, Ht = (a, f) => {
|
|
2344
2344
|
if (!G) return;
|
|
2345
2345
|
const _ = fi(G.geometry, a, f);
|
|
2346
2346
|
_ !== G.geometry && (Ke(G.id, _), nn(null), sn(null));
|
|
@@ -2398,13 +2398,13 @@ const Ms = qi.forwardRef(
|
|
|
2398
2398
|
pe(() => () => Gr(), []);
|
|
2399
2399
|
const Zr = () => {
|
|
2400
2400
|
if (Me.length < 3) {
|
|
2401
|
-
|
|
2401
|
+
Ue([]), Be(null), Qn(null);
|
|
2402
2402
|
return;
|
|
2403
2403
|
}
|
|
2404
2404
|
ke(
|
|
2405
2405
|
l === "draw-void" ? "void" : "unit",
|
|
2406
2406
|
so([Me])
|
|
2407
|
-
),
|
|
2407
|
+
), Ue([]), Be(null), Qn(null);
|
|
2408
2408
|
};
|
|
2409
2409
|
pe(() => {
|
|
2410
2410
|
if (!Pt(l)) return;
|
|
@@ -2416,7 +2416,7 @@ const Ms = qi.forwardRef(
|
|
|
2416
2416
|
};
|
|
2417
2417
|
}, [l]), pe(() => {
|
|
2418
2418
|
const a = (f) => {
|
|
2419
|
-
if (Mt(l) && (f.key === "Enter" ? (f.preventDefault(), Zr()) : f.key === "Escape" && (
|
|
2419
|
+
if (Mt(l) && (f.key === "Enter" ? (f.preventDefault(), Zr()) : f.key === "Escape" && (Ue([]), Be(null), Qn(null))), f.key === "Escape" && !ar(f.target) && ge != null) {
|
|
2420
2420
|
f.preventDefault(), yn(null), Ln(null), An(null);
|
|
2421
2421
|
return;
|
|
2422
2422
|
}
|
|
@@ -2471,28 +2471,28 @@ const Ms = qi.forwardRef(
|
|
|
2471
2471
|
}, [!!n]);
|
|
2472
2472
|
const el = () => {
|
|
2473
2473
|
yt(), Kt();
|
|
2474
|
-
const a = he.current, f = [...
|
|
2474
|
+
const a = he.current, f = [...He.current.values()];
|
|
2475
2475
|
if (!a || f.length < 2) return;
|
|
2476
2476
|
const _ = { x: (f[0].x + f[1].x) / 2, y: (f[0].y + f[1].y) / 2 }, b = vt(a, _.x, _.y), { pan: C, zoom: M } = fe.current;
|
|
2477
2477
|
Re.current = {
|
|
2478
2478
|
startDist: Math.max(1, Math.hypot(f[1].x - f[0].x, f[1].y - f[0].y)),
|
|
2479
2479
|
startZoom: M,
|
|
2480
2480
|
world: gr(b, C, M)
|
|
2481
|
-
}, Ie.current = null,
|
|
2481
|
+
}, Ie.current = null, Un(!1), Ce([]), ht(null), sn(null), Z(null), x(null);
|
|
2482
2482
|
}, nl = (a) => {
|
|
2483
|
-
|
|
2483
|
+
He.current.set(a.pointerId, { x: a.clientX, y: a.clientY }), !(He.current.size < 2) && (a.preventDefault(), a.stopPropagation(), el());
|
|
2484
2484
|
}, tl = (a) => {
|
|
2485
|
-
if (
|
|
2485
|
+
if (He.current.has(a.pointerId) && He.current.set(a.pointerId, { x: a.clientX, y: a.clientY }), !Re.current || He.current.size < 2) return;
|
|
2486
2486
|
const f = he.current;
|
|
2487
2487
|
if (!f) return;
|
|
2488
2488
|
a.stopPropagation();
|
|
2489
|
-
const _ = [...
|
|
2489
|
+
const _ = [...He.current.values()], b = Math.hypot(_[1].x - _[0].x, _[1].y - _[0].y), C = { x: (_[0].x + _[1].x) / 2, y: (_[0].y + _[1].y) / 2 }, M = vt(f, C.x, C.y), re = bi(
|
|
2490
2490
|
Re.current.startZoom * (b / Re.current.startDist)
|
|
2491
2491
|
);
|
|
2492
2492
|
At(Ea(M, Re.current.world, re), re);
|
|
2493
2493
|
}, Jr = (a) => {
|
|
2494
2494
|
const f = Re.current != null;
|
|
2495
|
-
|
|
2495
|
+
He.current.delete(a.pointerId), He.current.size < 2 && (Re.current = null), f && a.stopPropagation();
|
|
2496
2496
|
}, fo = (a, f) => {
|
|
2497
2497
|
var C, M;
|
|
2498
2498
|
Kt();
|
|
@@ -2505,16 +2505,16 @@ const Ms = qi.forwardRef(
|
|
|
2505
2505
|
clientX: a.clientX,
|
|
2506
2506
|
clientY: a.clientY,
|
|
2507
2507
|
fromEmptySelect: f
|
|
2508
|
-
},
|
|
2508
|
+
}, Un(!0), (M = (C = a.currentTarget).setPointerCapture) == null || M.call(C, a.pointerId);
|
|
2509
2509
|
}, qr = (a, f) => {
|
|
2510
2510
|
const _ = Pe(a, f);
|
|
2511
2511
|
Tn(l) && typeof _ == "number" && (X ? (F(X, _), A(null), D(it(l, _))) : S != null && S !== _ ? (j == null || j(S, _), D(it(l, _))) : D(_)), W(typeof _ == "number" ? [_] : []);
|
|
2512
2512
|
}, Qr = (a) => {
|
|
2513
|
-
|
|
2513
|
+
U || !ie || (We(a), D((f) => f === a ? null : f), Z(null), x(null), ze(null), A(null), Be(null), g((f) => f === a ? null : f));
|
|
2514
2514
|
}, ol = (a) => {
|
|
2515
2515
|
var _, b, C, M, re, le, de, tn;
|
|
2516
2516
|
if (Re.current) return;
|
|
2517
|
-
if (
|
|
2517
|
+
if (U || l === "pan" || a.button === 1) {
|
|
2518
2518
|
fo(a, !1);
|
|
2519
2519
|
return;
|
|
2520
2520
|
}
|
|
@@ -2533,7 +2533,7 @@ const Ms = qi.forwardRef(
|
|
|
2533
2533
|
return;
|
|
2534
2534
|
}
|
|
2535
2535
|
}
|
|
2536
|
-
|
|
2536
|
+
Ue((V) => [...V, Y]), Be(Y), Qn(null);
|
|
2537
2537
|
return;
|
|
2538
2538
|
}
|
|
2539
2539
|
if (ie) {
|
|
@@ -2613,7 +2613,7 @@ const Ms = qi.forwardRef(
|
|
|
2613
2613
|
const Y = Zc(je, f, P(to));
|
|
2614
2614
|
if (Y) {
|
|
2615
2615
|
if (a.detail >= 2) {
|
|
2616
|
-
|
|
2616
|
+
Ht(Y.ringIndex, Y.edgeIndex);
|
|
2617
2617
|
return;
|
|
2618
2618
|
}
|
|
2619
2619
|
nn({
|
|
@@ -2667,7 +2667,7 @@ const Ms = qi.forwardRef(
|
|
|
2667
2667
|
if (l === "select" && G && je) {
|
|
2668
2668
|
const Y = ms(je, f, P(lt));
|
|
2669
2669
|
if (Y) {
|
|
2670
|
-
|
|
2670
|
+
Ur(
|
|
2671
2671
|
Y.polygonIndex,
|
|
2672
2672
|
Y.afterVertexIndex,
|
|
2673
2673
|
Y.point,
|
|
@@ -2698,7 +2698,7 @@ const Ms = qi.forwardRef(
|
|
|
2698
2698
|
);
|
|
2699
2699
|
if (!Ae.dragging && C < Za) return;
|
|
2700
2700
|
Ae.dragging || (nt({ ...Ae, dragging: !0 }), vn(null));
|
|
2701
|
-
const M =
|
|
2701
|
+
const M = Uc(
|
|
2702
2702
|
Ae.originGeometry,
|
|
2703
2703
|
Ae.ringIndex,
|
|
2704
2704
|
Ae.edgeIndex,
|
|
@@ -2757,7 +2757,7 @@ const Ms = qi.forwardRef(
|
|
|
2757
2757
|
const b = Qe(a.clientX, a.clientY), C = Kr(b);
|
|
2758
2758
|
Qn(C), Be(C ?? b);
|
|
2759
2759
|
}
|
|
2760
|
-
if (ie && !Le && R == null && Qs(a.clientX, a.clientY), _t(l) && !
|
|
2760
|
+
if (ie && !Le && R == null && Qs(a.clientX, a.clientY), _t(l) && !U) {
|
|
2761
2761
|
const b = Qe(a.clientX, a.clientY), C = P(Gn), M = ko(
|
|
2762
2762
|
xn,
|
|
2763
2763
|
b,
|
|
@@ -2799,7 +2799,7 @@ const Ms = qi.forwardRef(
|
|
|
2799
2799
|
var _, b;
|
|
2800
2800
|
if (Re.current) return;
|
|
2801
2801
|
const f = Ie.current;
|
|
2802
|
-
if (Ie.current = null,
|
|
2802
|
+
if (Ie.current = null, Un(!1), f != null && f.fromEmptySelect && Math.hypot(
|
|
2803
2803
|
a.clientX - f.clientX,
|
|
2804
2804
|
a.clientY - f.clientY
|
|
2805
2805
|
) < 4 && (q(null), W([]), hn(null), nn(null), vn(null), yn(null), An(null), Be(null)), Oe == null || Oe(), Le) {
|
|
@@ -2861,12 +2861,12 @@ const Ms = qi.forwardRef(
|
|
|
2861
2861
|
Fo,
|
|
2862
2862
|
P(Ci),
|
|
2863
2863
|
En
|
|
2864
|
-
) : Q && Ge && Fo ? I : null, zo = S != null ? En.get(S) : void 0, Bo = !Le && !Q && Ge && (X || Tn(l) && S != null) ? I : null, ti = (K == null ? void 0 : K.edgeId) ?? ((cn == null ? void 0 : cn.type) === "edge" ? cn.edgeId : null), yo = ti == null ? null : i.find((a) => a.id === ti) ?? null,
|
|
2864
|
+
) : Q && Ge && Fo ? I : null, zo = S != null ? En.get(S) : void 0, Bo = !Le && !Q && Ge && (X || Tn(l) && S != null) ? I : null, ti = (K == null ? void 0 : K.edgeId) ?? ((cn == null ? void 0 : cn.type) === "edge" ? cn.edgeId : null), yo = ti == null ? null : i.find((a) => a.id === ti) ?? null, Ut = yo ? Ot.get(yo.fromAnchorId) : null, Xt = yo ? Ot.get(yo.toAnchorId) : null, On = (K == null ? void 0 : K.point) ?? ((cn == null ? void 0 : cn.type) === "edge" ? cn.point : null), ll = (Le == null ? void 0 : Le.origin) ?? (Q == null ? void 0 : Q.origin) ?? X ?? (Tn(l) && zo ? { x: zo.x, y: zo.y } : null), cl = Le != null ? (cn == null ? void 0 : cn.point) ?? Le.cursor : (cn == null ? void 0 : cn.point) ?? (Bo == null ? void 0 : Bo.point) ?? (K == null ? void 0 : K.point) ?? Ge, gt = Le != null || Q != null || X != null || Tn(l) && S != null && Ge != null ? qo(ll, cl) : null, jt = Mt(l) && Me.length > 0 ? qo(Me[Me.length - 1], Ge) : null, Yt = Mt(l) && Me.length >= 2 ? qo(Ge, Me[0]) : null;
|
|
2865
2865
|
return n ? /* @__PURE__ */ k(
|
|
2866
2866
|
"div",
|
|
2867
2867
|
{
|
|
2868
2868
|
ref: rn,
|
|
2869
|
-
className: `eyeon-map-canvas${
|
|
2869
|
+
className: `eyeon-map-canvas${H ? " eyeon-map-canvas--grid" : ""}`,
|
|
2870
2870
|
onPointerDownCapture: nl,
|
|
2871
2871
|
onPointerMoveCapture: tl,
|
|
2872
2872
|
onPointerUpCapture: Jr,
|
|
@@ -2880,7 +2880,7 @@ const Ms = qi.forwardRef(
|
|
|
2880
2880
|
viewBox: `${tt.x} ${tt.y} ${tt.width} ${tt.height}`,
|
|
2881
2881
|
preserveAspectRatio: "xMidYMid meet",
|
|
2882
2882
|
style: {
|
|
2883
|
-
cursor: K && !Le ? "none" : R != null || Le || Ae != null && Ae.dragging ? "grabbing" : Ze ? "none" : l === "draw-text" ? "text" : l === "draw-entrance" ? "cell" :
|
|
2883
|
+
cursor: K && !Le ? "none" : R != null || Le || Ae != null && Ae.dragging ? "grabbing" : Ze ? "none" : l === "draw-text" ? "text" : l === "draw-entrance" ? "cell" : Hn || qe ? "grabbing" : ai(l) ? "grab" : dr(l) && !U ? "cell" : void 0
|
|
2884
2884
|
},
|
|
2885
2885
|
onPointerDown: ol,
|
|
2886
2886
|
onPointerMove: rl,
|
|
@@ -2946,9 +2946,9 @@ const Ms = qi.forwardRef(
|
|
|
2946
2946
|
pointerEvents: f ? "auto" : "none",
|
|
2947
2947
|
style: { cursor: f ? "pointer" : void 0 },
|
|
2948
2948
|
onPointerEnter: f ? (b) => {
|
|
2949
|
-
Vn(a.id),
|
|
2949
|
+
Vn(a.id), Hr(b, a.kind);
|
|
2950
2950
|
} : void 0,
|
|
2951
|
-
onPointerMove: f ? (b) =>
|
|
2951
|
+
onPointerMove: f ? (b) => Hr(b, a.kind) : void 0,
|
|
2952
2952
|
onPointerLeave: f ? () => {
|
|
2953
2953
|
Vn((b) => b === a.id ? null : b), xe(null);
|
|
2954
2954
|
} : void 0,
|
|
@@ -2980,12 +2980,12 @@ const Ms = qi.forwardRef(
|
|
|
2980
2980
|
selected: _,
|
|
2981
2981
|
highlightable: f,
|
|
2982
2982
|
dragging: C,
|
|
2983
|
-
wayfinding: ie && !
|
|
2983
|
+
wayfinding: ie && !U && Ni(a.kind) && !le,
|
|
2984
2984
|
textLabel: M,
|
|
2985
2985
|
entranceIcon: re
|
|
2986
|
-
}) ?? (ur(l) || Xo(l) && !
|
|
2986
|
+
}) ?? (ur(l) || Xo(l) && !U ? void 0 : dr(l) ? "cell" : "default"), tn = (be) => {
|
|
2987
2987
|
var rt, Zt;
|
|
2988
|
-
if (
|
|
2988
|
+
if (U || Q) return;
|
|
2989
2989
|
if (ie && Si(n) && Ni(a.kind) && !le) {
|
|
2990
2990
|
be.stopPropagation();
|
|
2991
2991
|
const Jt = Qe(be.clientX, be.clientY);
|
|
@@ -3151,7 +3151,7 @@ const Ms = qi.forwardRef(
|
|
|
3151
3151
|
const V = Qe(Y.clientX, Y.clientY), Ne = Ee(
|
|
3152
3152
|
je ?? G.geometry
|
|
3153
3153
|
)[f];
|
|
3154
|
-
|
|
3154
|
+
Ur(
|
|
3155
3155
|
f,
|
|
3156
3156
|
C,
|
|
3157
3157
|
Ne ? pi(Ne, C, V) : V,
|
|
@@ -3295,12 +3295,12 @@ const Ms = qi.forwardRef(
|
|
|
3295
3295
|
strokeWidth: P(Yn),
|
|
3296
3296
|
cursor: "crosshair",
|
|
3297
3297
|
onDoubleClick: (Ne) => {
|
|
3298
|
-
Ne.stopPropagation(), Ne.preventDefault(), st(l) &&
|
|
3298
|
+
Ne.stopPropagation(), Ne.preventDefault(), st(l) && Ht(f, C);
|
|
3299
3299
|
},
|
|
3300
3300
|
onPointerDown: (Ne) => {
|
|
3301
3301
|
if (st(l)) {
|
|
3302
3302
|
if (Ne.stopPropagation(), Ne.detail >= 2) {
|
|
3303
|
-
|
|
3303
|
+
Ht(f, C);
|
|
3304
3304
|
return;
|
|
3305
3305
|
}
|
|
3306
3306
|
nn({
|
|
@@ -3331,12 +3331,12 @@ const Ms = qi.forwardRef(
|
|
|
3331
3331
|
strokeWidth: P(Yn),
|
|
3332
3332
|
cursor: "crosshair",
|
|
3333
3333
|
onDoubleClick: (Ne) => {
|
|
3334
|
-
Ne.stopPropagation(), Ne.preventDefault(), st(l) &&
|
|
3334
|
+
Ne.stopPropagation(), Ne.preventDefault(), st(l) && Ht(f, C);
|
|
3335
3335
|
},
|
|
3336
3336
|
onPointerDown: (Ne) => {
|
|
3337
3337
|
if (st(l)) {
|
|
3338
3338
|
if (Ne.stopPropagation(), Ne.detail >= 2) {
|
|
3339
|
-
|
|
3339
|
+
Ht(f, C);
|
|
3340
3340
|
return;
|
|
3341
3341
|
}
|
|
3342
3342
|
nn({
|
|
@@ -3440,12 +3440,12 @@ const Ms = qi.forwardRef(
|
|
|
3440
3440
|
pointerEvents: "none"
|
|
3441
3441
|
}
|
|
3442
3442
|
) : null,
|
|
3443
|
-
ie &&
|
|
3443
|
+
ie && Ut && Xt ? /* @__PURE__ */ k("g", { pointerEvents: "none", children: [
|
|
3444
3444
|
/* @__PURE__ */ c(
|
|
3445
3445
|
"line",
|
|
3446
3446
|
{
|
|
3447
|
-
x1:
|
|
3448
|
-
y1:
|
|
3447
|
+
x1: Ut.x,
|
|
3448
|
+
y1: Ut.y,
|
|
3449
3449
|
x2: Xt.x,
|
|
3450
3450
|
y2: Xt.y,
|
|
3451
3451
|
stroke: s.ACCENT_COLOR,
|
|
@@ -3457,8 +3457,8 @@ const Ms = qi.forwardRef(
|
|
|
3457
3457
|
/* @__PURE__ */ c(
|
|
3458
3458
|
"line",
|
|
3459
3459
|
{
|
|
3460
|
-
x1:
|
|
3461
|
-
y1:
|
|
3460
|
+
x1: Ut.x,
|
|
3461
|
+
y1: Ut.y,
|
|
3462
3462
|
x2: Xt.x,
|
|
3463
3463
|
y2: Xt.y,
|
|
3464
3464
|
stroke: "#22c55e",
|
|
@@ -3553,9 +3553,9 @@ const Ms = qi.forwardRef(
|
|
|
3553
3553
|
fillOpacity: 1,
|
|
3554
3554
|
stroke: f && b ? s.ACCENT_COLOR : "#fff",
|
|
3555
3555
|
strokeWidth: P(er),
|
|
3556
|
-
cursor:
|
|
3556
|
+
cursor: U ? "default" : R === a.id ? "grabbing" : "pointer",
|
|
3557
3557
|
onPointerEnter: () => {
|
|
3558
|
-
|
|
3558
|
+
U || g(a.id);
|
|
3559
3559
|
},
|
|
3560
3560
|
onPointerLeave: () => g((de) => de === a.id ? null : de),
|
|
3561
3561
|
onDoubleClick: (de) => {
|
|
@@ -3563,7 +3563,7 @@ const Ms = qi.forwardRef(
|
|
|
3563
3563
|
},
|
|
3564
3564
|
onPointerDown: (de) => {
|
|
3565
3565
|
var Ne, be;
|
|
3566
|
-
if (de.stopPropagation(),
|
|
3566
|
+
if (de.stopPropagation(), U || !ie) return;
|
|
3567
3567
|
if (de.detail >= 2) {
|
|
3568
3568
|
Qr(a.id);
|
|
3569
3569
|
return;
|
|
@@ -3626,7 +3626,7 @@ const Ms = qi.forwardRef(
|
|
|
3626
3626
|
}
|
|
3627
3627
|
) }, a.id);
|
|
3628
3628
|
}),
|
|
3629
|
-
_t(l) && !
|
|
3629
|
+
_t(l) && !U && xn.flatMap((a) => {
|
|
3630
3630
|
const f = Ee(a.geometry), _ = [];
|
|
3631
3631
|
return kt(l) && f.forEach((b, C) => {
|
|
3632
3632
|
const M = Pn(b);
|
|
@@ -3865,7 +3865,7 @@ const Ms = qi.forwardRef(
|
|
|
3865
3865
|
) : null
|
|
3866
3866
|
]
|
|
3867
3867
|
}
|
|
3868
|
-
) : /* @__PURE__ */ c("div", { className: `eyeon-map-canvas${
|
|
3868
|
+
) : /* @__PURE__ */ c("div", { className: `eyeon-map-canvas${H ? " eyeon-map-canvas--grid" : ""}`, children: /* @__PURE__ */ c("div", { className: "eyeon-map-canvas__empty", children: B }) });
|
|
3869
3869
|
}
|
|
3870
3870
|
);
|
|
3871
3871
|
Ms.displayName = "EditorCanvas";
|
|
@@ -4101,7 +4101,7 @@ function Bi(e, n) {
|
|
|
4101
4101
|
}
|
|
4102
4102
|
function dd(e, n, t, o) {
|
|
4103
4103
|
var E, N;
|
|
4104
|
-
const i = e.levels.find((
|
|
4104
|
+
const i = e.levels.find((H) => H.id === n.levelId), r = e.levels.find((H) => H.id === t.levelId), s = od(
|
|
4105
4105
|
(i == null ? void 0 : i.levelIndex) ?? 0,
|
|
4106
4106
|
(r == null ? void 0 : r.levelIndex) ?? 0,
|
|
4107
4107
|
((E = Rn(n.sourceSvgId)) == null ? void 0 : E.direction) ?? ((N = Rn(t.sourceSvgId)) == null ? void 0 : N.direction)
|
|
@@ -4111,8 +4111,8 @@ function dd(e, n, t, o) {
|
|
|
4111
4111
|
edges: e.edges.slice(),
|
|
4112
4112
|
connectors: e.connectors.slice()
|
|
4113
4113
|
};
|
|
4114
|
-
for (const
|
|
4115
|
-
h.push(...Ar(p,
|
|
4114
|
+
for (const H of new Set([d, u].filter((T) => T != null)))
|
|
4115
|
+
h.push(...Ar(p, H));
|
|
4116
4116
|
const m = p.allocId(), y = {
|
|
4117
4117
|
id: m,
|
|
4118
4118
|
mapId: p.mapId,
|
|
@@ -4512,7 +4512,7 @@ function St(e) {
|
|
|
4512
4512
|
function or(e) {
|
|
4513
4513
|
return St(e) ?? "#000000";
|
|
4514
4514
|
}
|
|
4515
|
-
function
|
|
4515
|
+
function Hi(e, n) {
|
|
4516
4516
|
if (Mn(e) || Mn(n))
|
|
4517
4517
|
return Mn(e) && Mn(n);
|
|
4518
4518
|
const t = St(e), o = St(n);
|
|
@@ -4695,7 +4695,7 @@ function So({
|
|
|
4695
4695
|
)
|
|
4696
4696
|
] });
|
|
4697
4697
|
}
|
|
4698
|
-
const
|
|
4698
|
+
const Ui = {
|
|
4699
4699
|
left: "Left",
|
|
4700
4700
|
center: "Center",
|
|
4701
4701
|
right: "Right"
|
|
@@ -4746,9 +4746,9 @@ function Fs({
|
|
|
4746
4746
|
type: "button",
|
|
4747
4747
|
className: i === o ? "is-active" : void 0,
|
|
4748
4748
|
disabled: n,
|
|
4749
|
-
"aria-label":
|
|
4749
|
+
"aria-label": Ui[i],
|
|
4750
4750
|
"aria-pressed": i === o,
|
|
4751
|
-
"data-tooltip":
|
|
4751
|
+
"data-tooltip": Ui[i],
|
|
4752
4752
|
onClick: () => t(i),
|
|
4753
4753
|
children: xd[i]
|
|
4754
4754
|
},
|
|
@@ -4920,7 +4920,7 @@ function wd({
|
|
|
4920
4920
|
[t.anchors, t.connectors, t.shapes, n, e.id, e.levelId]
|
|
4921
4921
|
), [E, N] = z(
|
|
4922
4922
|
y ? String(y.levelId) : ""
|
|
4923
|
-
), [
|
|
4923
|
+
), [H, T] = z(y ? String(y.id) : ""), [U, B] = z(""), [q, W] = z(
|
|
4924
4924
|
() => rr(e, i)
|
|
4925
4925
|
), F = ue(q);
|
|
4926
4926
|
F.current = q, pe(() => {
|
|
@@ -4943,7 +4943,7 @@ function wd({
|
|
|
4943
4943
|
const j = zi(w, t.levels), Pe = w.filter(
|
|
4944
4944
|
($) => String($.levelId) === E
|
|
4945
4945
|
), We = w.filter(($) => !h.includes($.id)), we = zi(We, t.levels), De = We.filter(
|
|
4946
|
-
($) => String($.levelId) ===
|
|
4946
|
+
($) => String($.levelId) === U
|
|
4947
4947
|
), Se = n === "escalator" ? pd(t.shapes, t.levels, t.anchors).filter(
|
|
4948
4948
|
($) => $.fromShapeId === e.id || $.toShapeId === e.id
|
|
4949
4949
|
) : [], ke = ($, ee) => {
|
|
@@ -5004,7 +5004,7 @@ function wd({
|
|
|
5004
5004
|
zn,
|
|
5005
5005
|
{
|
|
5006
5006
|
ariaLabel: "Escalator Point",
|
|
5007
|
-
value:
|
|
5007
|
+
value: H,
|
|
5008
5008
|
disabled: !o || !E,
|
|
5009
5009
|
placeholder: E ? "Choose an escalator on that floor" : "Choose a floor first",
|
|
5010
5010
|
searchable: !0,
|
|
@@ -5078,7 +5078,7 @@ function wd({
|
|
|
5078
5078
|
zn,
|
|
5079
5079
|
{
|
|
5080
5080
|
ariaLabel: "Add stop floor",
|
|
5081
|
-
value:
|
|
5081
|
+
value: U,
|
|
5082
5082
|
disabled: !o || we.length === 0,
|
|
5083
5083
|
placeholder: "Choose a floor",
|
|
5084
5084
|
options: we.map(($) => ({
|
|
@@ -5096,8 +5096,8 @@ function wd({
|
|
|
5096
5096
|
{
|
|
5097
5097
|
ariaLabel: "Elevator Point",
|
|
5098
5098
|
value: "",
|
|
5099
|
-
disabled: !o || !
|
|
5100
|
-
placeholder:
|
|
5099
|
+
disabled: !o || !U,
|
|
5100
|
+
placeholder: U ? "Choose an elevator on that floor" : "Choose a floor first",
|
|
5101
5101
|
searchable: !0,
|
|
5102
5102
|
options: Te(De, "elevator"),
|
|
5103
5103
|
onChange: Oe
|
|
@@ -5257,20 +5257,20 @@ function Wd(e) {
|
|
|
5257
5257
|
function Kd(e, n) {
|
|
5258
5258
|
return Wd(e) && n > 0;
|
|
5259
5259
|
}
|
|
5260
|
-
function
|
|
5260
|
+
function Hs(e) {
|
|
5261
5261
|
const n = e.filter((o) => o.kind === "outdoor"), t = e.filter((o) => o.kind === "floor").slice().sort(ts).reverse();
|
|
5262
5262
|
return [...n, ...t];
|
|
5263
5263
|
}
|
|
5264
5264
|
function Vd(e, n) {
|
|
5265
5265
|
const t = new Map(
|
|
5266
|
-
|
|
5266
|
+
Hs(n).map((o, i) => [o.id, i])
|
|
5267
5267
|
);
|
|
5268
5268
|
return e.slice().sort((o, i) => {
|
|
5269
5269
|
const r = t.get(o.levelId) ?? Number.POSITIVE_INFINITY, s = t.get(i.levelId) ?? Number.POSITIVE_INFINITY;
|
|
5270
5270
|
return r - s;
|
|
5271
5271
|
});
|
|
5272
5272
|
}
|
|
5273
|
-
function
|
|
5273
|
+
function Hd(e, n) {
|
|
5274
5274
|
if (e.mode === "add-base") return "Add Outdoor SVG";
|
|
5275
5275
|
if (e.mode === "add-floor") return "Add Floor";
|
|
5276
5276
|
if (e.mode === "edit") {
|
|
@@ -5279,7 +5279,7 @@ function Ud(e, n) {
|
|
|
5279
5279
|
}
|
|
5280
5280
|
return "Floors";
|
|
5281
5281
|
}
|
|
5282
|
-
function
|
|
5282
|
+
function Ud(e) {
|
|
5283
5283
|
return e.filter((n) => n.kind === "floor").length;
|
|
5284
5284
|
}
|
|
5285
5285
|
function Xd(e, n, t) {
|
|
@@ -5362,7 +5362,7 @@ function qd({
|
|
|
5362
5362
|
onDeleteLevel: d,
|
|
5363
5363
|
onReorderLevels: u
|
|
5364
5364
|
}) {
|
|
5365
|
-
const [h, p] = z(""), [m, y] = z(null), [O, w] = z(!1), [E, N] = z(null), [
|
|
5365
|
+
const [h, p] = z(""), [m, y] = z(null), [O, w] = z(!1), [E, N] = z(null), [H, T] = z(null), [U, B] = z(!1), [q, W] = z(null), [F, oe] = z(!1), [j, Pe] = z(null), [We, we] = z(null), [De, Se] = z(null), [ke, Ke] = z(!1), [Ye, Oe] = z(null), Te = ue(null), $ = ue(null), ee = ue(null), ce = ue(null), ie = ue(null), he = me(
|
|
5366
5366
|
() => e.find((R) => R.kind === "outdoor") ?? null,
|
|
5367
5367
|
[e]
|
|
5368
5368
|
), $e = !!(he != null && he.sourceSvgKey || he != null && he.sourceSvgUrl), rn = (R) => (t == null ? void 0 : t[R]) ?? 0, un = me(
|
|
@@ -5454,7 +5454,7 @@ function qd({
|
|
|
5454
5454
|
oe(!1);
|
|
5455
5455
|
}
|
|
5456
5456
|
}
|
|
5457
|
-
},
|
|
5457
|
+
}, He = () => {
|
|
5458
5458
|
const R = e.find((te) => te.id === q);
|
|
5459
5459
|
if (!R) return null;
|
|
5460
5460
|
const Z = Jd(R, rn(R.id));
|
|
@@ -5593,7 +5593,7 @@ function qd({
|
|
|
5593
5593
|
dropIndex: Ve.indexOf(R.id)
|
|
5594
5594
|
};
|
|
5595
5595
|
ie.current = A, Pe(A), we(Ve.indexOf(R.id)), Se(Ve);
|
|
5596
|
-
},
|
|
5596
|
+
}, Ue = j && We != null ? Yd(
|
|
5597
5597
|
j.originIds.indexOf(j.id),
|
|
5598
5598
|
We,
|
|
5599
5599
|
j.rowHeight,
|
|
@@ -5663,7 +5663,7 @@ function qd({
|
|
|
5663
5663
|
{
|
|
5664
5664
|
className: [
|
|
5665
5665
|
"eyeon-map-floors__drop",
|
|
5666
|
-
|
|
5666
|
+
U ? "is-over" : "",
|
|
5667
5667
|
m ? "has-file" : "",
|
|
5668
5668
|
O ? "is-busy" : ""
|
|
5669
5669
|
].filter(Boolean).join(" "),
|
|
@@ -5715,24 +5715,24 @@ function qd({
|
|
|
5715
5715
|
/* @__PURE__ */ c("li", { children: "The artboard must stay the same size, otherwise the import is rejected." })
|
|
5716
5716
|
] })
|
|
5717
5717
|
] }) : null,
|
|
5718
|
-
|
|
5718
|
+
H != null && /* @__PURE__ */ k(
|
|
5719
5719
|
"div",
|
|
5720
5720
|
{
|
|
5721
5721
|
className: "eyeon-map-floors__progress",
|
|
5722
5722
|
role: "progressbar",
|
|
5723
5723
|
"aria-valuemin": 0,
|
|
5724
5724
|
"aria-valuemax": 100,
|
|
5725
|
-
"aria-valuenow":
|
|
5725
|
+
"aria-valuenow": H,
|
|
5726
5726
|
children: [
|
|
5727
5727
|
/* @__PURE__ */ c("div", { className: "eyeon-map-floors__progress-track", children: /* @__PURE__ */ c(
|
|
5728
5728
|
"div",
|
|
5729
5729
|
{
|
|
5730
5730
|
className: "eyeon-map-floors__progress-bar",
|
|
5731
|
-
style: { width: `${Math.min(100, Math.max(0,
|
|
5731
|
+
style: { width: `${Math.min(100, Math.max(0, H))}%` }
|
|
5732
5732
|
}
|
|
5733
5733
|
) }),
|
|
5734
5734
|
/* @__PURE__ */ k("span", { className: "eyeon-map-floors__progress-label", children: [
|
|
5735
|
-
|
|
5735
|
+
H,
|
|
5736
5736
|
"%"
|
|
5737
5737
|
] })
|
|
5738
5738
|
]
|
|
@@ -5757,7 +5757,7 @@ function qd({
|
|
|
5757
5757
|
className: "eyeon-map-floors__primary",
|
|
5758
5758
|
disabled: O || F || !_e || ne.kind !== "outdoor" && !h.trim(),
|
|
5759
5759
|
onClick: () => void qn(),
|
|
5760
|
-
children: O ?
|
|
5760
|
+
children: O ? H != null ? `${A} ${H}%` : "Saving…" : m ? fe ? "Upload & Save" : "Import & Save" : "Save Changes"
|
|
5761
5761
|
}
|
|
5762
5762
|
)
|
|
5763
5763
|
] }) }) : /* @__PURE__ */ c("div", { className: "eyeon-map-rail__actions", children: /* @__PURE__ */ c(
|
|
@@ -5767,10 +5767,10 @@ function qd({
|
|
|
5767
5767
|
className: "eyeon-map-floors__primary",
|
|
5768
5768
|
disabled: O || F || !_e || (fe ? !m : !h.trim() || !m),
|
|
5769
5769
|
onClick: () => void qn(),
|
|
5770
|
-
children: O ?
|
|
5770
|
+
children: O ? H != null ? `${A} ${H}%` : `${A}…` : X
|
|
5771
5771
|
}
|
|
5772
5772
|
) }),
|
|
5773
|
-
|
|
5773
|
+
He()
|
|
5774
5774
|
] });
|
|
5775
5775
|
}
|
|
5776
5776
|
return /* @__PURE__ */ k("div", { className: ["eyeon-map-floors", j ? "is-reordering" : ""].filter(Boolean).join(" "), children: [
|
|
@@ -5831,11 +5831,11 @@ function qd({
|
|
|
5831
5831
|
},
|
|
5832
5832
|
R.id
|
|
5833
5833
|
)),
|
|
5834
|
-
|
|
5834
|
+
Ue == null ? null : /* @__PURE__ */ c(
|
|
5835
5835
|
"div",
|
|
5836
5836
|
{
|
|
5837
5837
|
className: "eyeon-map-floors__drop-line",
|
|
5838
|
-
style: { top:
|
|
5838
|
+
style: { top: Ue }
|
|
5839
5839
|
}
|
|
5840
5840
|
)
|
|
5841
5841
|
] })
|
|
@@ -5870,7 +5870,7 @@ function qd({
|
|
|
5870
5870
|
}
|
|
5871
5871
|
) : null }),
|
|
5872
5872
|
E ? /* @__PURE__ */ c("div", { className: "eyeon-map-floors__error", children: E }) : null,
|
|
5873
|
-
|
|
5873
|
+
He(),
|
|
5874
5874
|
j ? is(
|
|
5875
5875
|
/* @__PURE__ */ k(
|
|
5876
5876
|
"div",
|
|
@@ -6075,7 +6075,7 @@ function lu() {
|
|
|
6075
6075
|
)
|
|
6076
6076
|
] });
|
|
6077
6077
|
}
|
|
6078
|
-
function
|
|
6078
|
+
function Us() {
|
|
6079
6079
|
return /* @__PURE__ */ k("svg", { ...Wn, viewBox: "0 0 24 24", children: [
|
|
6080
6080
|
/* @__PURE__ */ c("circle", { cx: "12", cy: "12", r: "3", stroke: "currentColor", strokeWidth: "1.8" }),
|
|
6081
6081
|
/* @__PURE__ */ c(
|
|
@@ -6152,7 +6152,7 @@ const au = {
|
|
|
6152
6152
|
kiosks: iu,
|
|
6153
6153
|
escalators: su,
|
|
6154
6154
|
elevators: lu,
|
|
6155
|
-
style:
|
|
6155
|
+
style: Us,
|
|
6156
6156
|
unassigned: cu,
|
|
6157
6157
|
"edit-map": Xs,
|
|
6158
6158
|
wayfinding: js
|
|
@@ -6231,9 +6231,9 @@ function pu({
|
|
|
6231
6231
|
onDeleteLevel: w,
|
|
6232
6232
|
onReorderLevels: E,
|
|
6233
6233
|
onAutoroute: N,
|
|
6234
|
-
theme:
|
|
6234
|
+
theme: H,
|
|
6235
6235
|
onThemeChange: T,
|
|
6236
|
-
assignPanel:
|
|
6236
|
+
assignPanel: U,
|
|
6237
6237
|
catalogKioskPanel: B,
|
|
6238
6238
|
selectedCatalogKioskId: q = null,
|
|
6239
6239
|
onSelectCatalogKiosk: W,
|
|
@@ -6263,7 +6263,7 @@ function pu({
|
|
|
6263
6263
|
t.edges,
|
|
6264
6264
|
ce
|
|
6265
6265
|
), S = new Map(
|
|
6266
|
-
|
|
6266
|
+
Hs(t.levels).map((D, X) => [D.id, X])
|
|
6267
6267
|
);
|
|
6268
6268
|
return x.slice().sort((D, X) => {
|
|
6269
6269
|
const A = S.get(D.from.levelId) ?? Number.POSITIVE_INFINITY, Q = S.get(X.from.levelId) ?? Number.POSITIVE_INFINITY;
|
|
@@ -6325,7 +6325,7 @@ function pu({
|
|
|
6325
6325
|
for (const S of t.shapes)
|
|
6326
6326
|
S.orphanedAt || (x[S.levelId] = (x[S.levelId] ?? 0) + 1);
|
|
6327
6327
|
return x;
|
|
6328
|
-
}, [t.shapes]), Sn = r ?? (i != null ? [i] : []),
|
|
6328
|
+
}, [t.shapes]), Sn = r ?? (i != null ? [i] : []), He = (x) => Sn.includes(x), Re = q != null ? h.find((x) => x.id === q) ?? null : null, L = e === "kiosks" && Re != null, Ce = Kd(e, Sn.length) || L;
|
|
6329
6329
|
pe(() => {
|
|
6330
6330
|
Ce && (l == null || l(null));
|
|
6331
6331
|
}, [Ce, l]);
|
|
@@ -6345,8 +6345,8 @@ function pu({
|
|
|
6345
6345
|
return x ? { key: x.key, levelName: Xe(x.levelId) } : null;
|
|
6346
6346
|
})(), ye = (x, S) => {
|
|
6347
6347
|
W == null || W(null), s(x, { additive: S.shiftKey }), d == null || d();
|
|
6348
|
-
}, Me = $d(h, t.assignments),
|
|
6349
|
-
floors:
|
|
6348
|
+
}, Me = $d(h, t.assignments), Ue = {
|
|
6349
|
+
floors: Ud(t.levels),
|
|
6350
6350
|
stores: Se.length + Ye.length,
|
|
6351
6351
|
amenities: ke.length + Oe.length,
|
|
6352
6352
|
kiosks: Ke.length + Te.length + Me.length,
|
|
@@ -6369,7 +6369,7 @@ function pu({
|
|
|
6369
6369
|
"button",
|
|
6370
6370
|
{
|
|
6371
6371
|
type: "button",
|
|
6372
|
-
className:
|
|
6372
|
+
className: He(X.id) ? "eyeon-map-rail__row is-active" : "eyeon-map-rail__row",
|
|
6373
6373
|
onMouseDown: (Ge) => {
|
|
6374
6374
|
Ge.shiftKey && Ge.preventDefault();
|
|
6375
6375
|
},
|
|
@@ -6403,7 +6403,7 @@ function pu({
|
|
|
6403
6403
|
X.id
|
|
6404
6404
|
);
|
|
6405
6405
|
}), Z = () => $e.map((x) => {
|
|
6406
|
-
const S = ld(x, t.levels), D =
|
|
6406
|
+
const S = ld(x, t.levels), D = He(x.from.id) || He(x.to.id);
|
|
6407
6407
|
return /* @__PURE__ */ c(
|
|
6408
6408
|
"button",
|
|
6409
6409
|
{
|
|
@@ -6470,7 +6470,7 @@ function pu({
|
|
|
6470
6470
|
children: /* @__PURE__ */ c(nu, {})
|
|
6471
6471
|
}
|
|
6472
6472
|
),
|
|
6473
|
-
/* @__PURE__ */ c("div", { className: "eyeon-map-rail__header-title", children: e === "floors" ?
|
|
6473
|
+
/* @__PURE__ */ c("div", { className: "eyeon-map-rail__header-title", children: e === "floors" ? Hd(We, t.levels) : pn ? /* @__PURE__ */ c("span", { className: "eyeon-map-assign__tag", children: pn.key }) : eu[e] }),
|
|
6474
6474
|
pn ? /* @__PURE__ */ c("span", { className: "eyeon-map-rail__tag", children: pn.levelName }) : null
|
|
6475
6475
|
] }) : /* @__PURE__ */ c("div", { className: "eyeon-map-rail__header", children: /* @__PURE__ */ c("div", { className: "eyeon-map-rail__header-title", children: "Map options" }) }),
|
|
6476
6476
|
/* @__PURE__ */ k("div", { className: "eyeon-map-rail__body", children: [
|
|
@@ -6490,7 +6490,7 @@ function pu({
|
|
|
6490
6490
|
/* @__PURE__ */ c("span", { className: "eyeon-map-rail__nav-desc", children: x.description })
|
|
6491
6491
|
] }),
|
|
6492
6492
|
/* @__PURE__ */ k("span", { className: "eyeon-map-rail__nav-meta", children: [
|
|
6493
|
-
x.countKey != null ? /* @__PURE__ */ c("span", { className: "eyeon-map-rail__nav-count", children:
|
|
6493
|
+
x.countKey != null ? /* @__PURE__ */ c("span", { className: "eyeon-map-rail__nav-count", children: Ue[x.countKey] }) : null,
|
|
6494
6494
|
/* @__PURE__ */ c(Io, {})
|
|
6495
6495
|
] })
|
|
6496
6496
|
]
|
|
@@ -6539,7 +6539,7 @@ function pu({
|
|
|
6539
6539
|
className: "eyeon-map-rail__nav-item",
|
|
6540
6540
|
onClick: () => n("style"),
|
|
6541
6541
|
children: [
|
|
6542
|
-
/* @__PURE__ */ c("span", { className: "eyeon-map-rail__nav-icon", children: /* @__PURE__ */ c(
|
|
6542
|
+
/* @__PURE__ */ c("span", { className: "eyeon-map-rail__nav-icon", children: /* @__PURE__ */ c(Us, {}) }),
|
|
6543
6543
|
/* @__PURE__ */ k("span", { className: "eyeon-map-rail__nav-copy", children: [
|
|
6544
6544
|
/* @__PURE__ */ c("span", { className: "eyeon-map-rail__nav-title", children: "Settings" }),
|
|
6545
6545
|
/* @__PURE__ */ c("span", { className: "eyeon-map-rail__nav-desc", children: "Colors and map look" })
|
|
@@ -6569,12 +6569,12 @@ function pu({
|
|
|
6569
6569
|
onReorderLevels: E
|
|
6570
6570
|
}
|
|
6571
6571
|
),
|
|
6572
|
-
e === "stores" && /* @__PURE__ */ c("div", { className: "eyeon-map-rail__section", children: Ce ?
|
|
6573
|
-
e === "amenities" && /* @__PURE__ */ c("div", { className: "eyeon-map-rail__section", children: Ce ?
|
|
6572
|
+
e === "stores" && /* @__PURE__ */ c("div", { className: "eyeon-map-rail__section", children: Ce ? U : te(Se, Ye) }),
|
|
6573
|
+
e === "amenities" && /* @__PURE__ */ c("div", { className: "eyeon-map-rail__section", children: Ce ? U : te(
|
|
6574
6574
|
ke,
|
|
6575
6575
|
Oe
|
|
6576
6576
|
) }),
|
|
6577
|
-
e === "unassigned" && /* @__PURE__ */ c("div", { className: "eyeon-map-rail__section", children: Ce ?
|
|
6577
|
+
e === "unassigned" && /* @__PURE__ */ c("div", { className: "eyeon-map-rail__section", children: Ce ? U : /* @__PURE__ */ k(Je, { children: [
|
|
6578
6578
|
/* @__PURE__ */ k("div", { className: "eyeon-map-rail__heading", children: [
|
|
6579
6579
|
"Unassigned (",
|
|
6580
6580
|
$.length,
|
|
@@ -6586,7 +6586,7 @@ function pu({
|
|
|
6586
6586
|
{ showKindTag: !0 }
|
|
6587
6587
|
)
|
|
6588
6588
|
] }) }),
|
|
6589
|
-
e === "escalators" && /* @__PURE__ */ c("div", { className: "eyeon-map-rail__section", children: Ce ?
|
|
6589
|
+
e === "escalators" && /* @__PURE__ */ c("div", { className: "eyeon-map-rail__section", children: Ce ? U : /* @__PURE__ */ k(Je, { children: [
|
|
6590
6590
|
/* @__PURE__ */ c("p", { className: "eyeon-map-rail__hint", children: "Pick the boarding landing, then the floor and exit landing. A linked ride is one row: boarding on top, exit below. Rides are one-way." }),
|
|
6591
6591
|
/* @__PURE__ */ k("div", { className: "eyeon-map-rail__heading", children: [
|
|
6592
6592
|
"Assigned (",
|
|
@@ -6601,13 +6601,13 @@ function pu({
|
|
|
6601
6601
|
] }),
|
|
6602
6602
|
he.length > 0 ? R(he, "") : null
|
|
6603
6603
|
] }) }),
|
|
6604
|
-
e === "elevators" && /* @__PURE__ */ c("div", { className: "eyeon-map-rail__section", children: Ce ?
|
|
6604
|
+
e === "elevators" && /* @__PURE__ */ c("div", { className: "eyeon-map-rail__section", children: Ce ? U : te(
|
|
6605
6605
|
rn,
|
|
6606
6606
|
un,
|
|
6607
6607
|
void 0,
|
|
6608
6608
|
"elevator"
|
|
6609
6609
|
) }),
|
|
6610
|
-
e === "kiosks" && /* @__PURE__ */ c("div", { className: "eyeon-map-rail__section", children: L ? B : Ce ?
|
|
6610
|
+
e === "kiosks" && /* @__PURE__ */ c("div", { className: "eyeon-map-rail__section", children: L ? B : Ce ? U : /* @__PURE__ */ k(Je, { children: [
|
|
6611
6611
|
te(Ke, Te),
|
|
6612
6612
|
h.length > 0 ? /* @__PURE__ */ k(Je, { children: [
|
|
6613
6613
|
/* @__PURE__ */ k("div", { className: "eyeon-map-rail__heading", children: [
|
|
@@ -6668,12 +6668,12 @@ function pu({
|
|
|
6668
6668
|
["STORE_DEFAULT_COLOR", "Stores"],
|
|
6669
6669
|
["MAP_BACKGROUND_COLOR", "Background"]
|
|
6670
6670
|
].map(([x, S]) => {
|
|
6671
|
-
const D = El[x], X = !
|
|
6671
|
+
const D = El[x], X = !Hi(H[x], D);
|
|
6672
6672
|
return /* @__PURE__ */ c(
|
|
6673
6673
|
Yi,
|
|
6674
6674
|
{
|
|
6675
6675
|
label: S,
|
|
6676
|
-
value:
|
|
6676
|
+
value: H[x],
|
|
6677
6677
|
fallback: D,
|
|
6678
6678
|
onChange: (A) => T({ [x]: A }),
|
|
6679
6679
|
onReset: X ? () => T({ [x]: D }) : void 0
|
|
@@ -6689,19 +6689,19 @@ function pu({
|
|
|
6689
6689
|
min: 0,
|
|
6690
6690
|
step: 1,
|
|
6691
6691
|
inputMode: "decimal",
|
|
6692
|
-
value:
|
|
6692
|
+
value: H.STORE_RADIUS,
|
|
6693
6693
|
"aria-label": "Stores Radius",
|
|
6694
6694
|
onChange: (x) => T({ STORE_RADIUS: Ol(x.target.value) })
|
|
6695
6695
|
}
|
|
6696
6696
|
) }),
|
|
6697
6697
|
/* @__PURE__ */ c("div", { className: "eyeon-map-rail__sep", role: "separator" }),
|
|
6698
6698
|
uu.map(([x, S]) => {
|
|
6699
|
-
const D = du[x], X = !
|
|
6699
|
+
const D = du[x], X = !Hi(H[x], D);
|
|
6700
6700
|
return /* @__PURE__ */ c(
|
|
6701
6701
|
Yi,
|
|
6702
6702
|
{
|
|
6703
6703
|
label: S,
|
|
6704
|
-
value:
|
|
6704
|
+
value: H[x],
|
|
6705
6705
|
fallback: D,
|
|
6706
6706
|
onChange: (A) => T({ [x]: A }),
|
|
6707
6707
|
onReset: X ? () => T({ [x]: D }) : void 0
|
|
@@ -6712,7 +6712,7 @@ function pu({
|
|
|
6712
6712
|
] }) : /* @__PURE__ */ c("p", { className: "eyeon-map-rail__hint", children: "You do not have permission to change map colors." }) }),
|
|
6713
6713
|
e === "selection" && /* @__PURE__ */ k("div", { className: "eyeon-map-rail__section", children: [
|
|
6714
6714
|
/* @__PURE__ */ c("p", { className: "eyeon-map-rail__hint", children: Fe ? `Editing a shape on ${Fe.name}.` : "Editing the selected shape." }),
|
|
6715
|
-
|
|
6715
|
+
U
|
|
6716
6716
|
] })
|
|
6717
6717
|
] }),
|
|
6718
6718
|
Pe || j ? /* @__PURE__ */ k("div", { className: "eyeon-map-rail__footer", children: [
|
|
@@ -6895,7 +6895,7 @@ function bu({
|
|
|
6895
6895
|
};
|
|
6896
6896
|
}),
|
|
6897
6897
|
[E, o]
|
|
6898
|
-
),
|
|
6898
|
+
), H = me(() => Yl(), []), T = Gl(p.amenityId, t) || p.customLabel || "", U = me(() => {
|
|
6899
6899
|
var F;
|
|
6900
6900
|
return p.kioskId == null ? null : ((F = i.find((oe) => oe.id === p.kioskId)) == null ? void 0 : F.name) ?? null;
|
|
6901
6901
|
}, [p.kioskId, i]), B = [
|
|
@@ -7015,7 +7015,7 @@ function bu({
|
|
|
7015
7015
|
disabled: !r,
|
|
7016
7016
|
searchable: !0,
|
|
7017
7017
|
placeholder: "Choose Amenity…",
|
|
7018
|
-
options:
|
|
7018
|
+
options: H,
|
|
7019
7019
|
onChange: (F) => {
|
|
7020
7020
|
const oe = F ? Zl(F, t) : null;
|
|
7021
7021
|
w({
|
|
@@ -7032,7 +7032,7 @@ function bu({
|
|
|
7032
7032
|
e.kind === "kiosk_screen" ? /* @__PURE__ */ c(
|
|
7033
7033
|
xu,
|
|
7034
7034
|
{
|
|
7035
|
-
value: p.customLabel ??
|
|
7035
|
+
value: p.customLabel ?? U ?? "",
|
|
7036
7036
|
disabled: !r,
|
|
7037
7037
|
onChange: (F) => {
|
|
7038
7038
|
const oe = F.trim();
|
|
@@ -7306,12 +7306,12 @@ function Su({
|
|
|
7306
7306
|
}, []), y = fn(() => {
|
|
7307
7307
|
const E = i.current;
|
|
7308
7308
|
if (!E) return;
|
|
7309
|
-
const N = E.getBoundingClientRect(),
|
|
7309
|
+
const N = E.getBoundingClientRect(), H = window.innerHeight - N.bottom - 8, T = N.top - 8, U = Math.min(280, Math.max(H, T, 120)), B = H < 160 && T > H;
|
|
7310
7310
|
p({
|
|
7311
|
-
top: B ? Math.max(8, N.top -
|
|
7311
|
+
top: B ? Math.max(8, N.top - U - 4) : N.bottom + 4,
|
|
7312
7312
|
left: N.left,
|
|
7313
7313
|
width: Math.max(N.width, 168),
|
|
7314
|
-
maxHeight:
|
|
7314
|
+
maxHeight: U
|
|
7315
7315
|
});
|
|
7316
7316
|
}, []), O = e.map((E) => E.id).join(",");
|
|
7317
7317
|
if (pe(() => {
|
|
@@ -7321,14 +7321,14 @@ function Su({
|
|
|
7321
7321
|
y();
|
|
7322
7322
|
const E = (T) => {
|
|
7323
7323
|
var B, q;
|
|
7324
|
-
const
|
|
7325
|
-
(B = i.current) != null && B.contains(
|
|
7324
|
+
const U = T.target;
|
|
7325
|
+
(B = i.current) != null && B.contains(U) || (q = r.current) != null && q.contains(U) || m();
|
|
7326
7326
|
}, N = (T) => {
|
|
7327
|
-
var
|
|
7328
|
-
T.key === "Escape" && (m(), (
|
|
7329
|
-
},
|
|
7330
|
-
return document.addEventListener("mousedown", E), document.addEventListener("keydown", N), window.addEventListener("resize",
|
|
7331
|
-
document.removeEventListener("mousedown", E), document.removeEventListener("keydown", N), window.removeEventListener("resize",
|
|
7327
|
+
var U;
|
|
7328
|
+
T.key === "Escape" && (m(), (U = i.current) == null || U.blur());
|
|
7329
|
+
}, H = () => y();
|
|
7330
|
+
return document.addEventListener("mousedown", E), document.addEventListener("keydown", N), window.addEventListener("resize", H), window.addEventListener("scroll", H, !0), () => {
|
|
7331
|
+
document.removeEventListener("mousedown", E), document.removeEventListener("keydown", N), window.removeEventListener("resize", H), window.removeEventListener("scroll", H, !0);
|
|
7332
7332
|
};
|
|
7333
7333
|
}, [m, s, y]), e.length === 0) return null;
|
|
7334
7334
|
const w = s && h && !n ? is(
|
|
@@ -7410,12 +7410,12 @@ function Au({
|
|
|
7410
7410
|
const p = fn(
|
|
7411
7411
|
(E, N) => {
|
|
7412
7412
|
if (!n) return;
|
|
7413
|
-
const
|
|
7414
|
-
E.size != null && (r(
|
|
7413
|
+
const H = xo(E.size ?? d.current), T = E.rotate ?? u.current;
|
|
7414
|
+
E.size != null && (r(H), d.current = H), E.rotate != null && (l(T), u.current = T), o(
|
|
7415
7415
|
{
|
|
7416
7416
|
...e,
|
|
7417
7417
|
...E,
|
|
7418
|
-
size:
|
|
7418
|
+
size: H,
|
|
7419
7419
|
rotate: T
|
|
7420
7420
|
},
|
|
7421
7421
|
N
|
|
@@ -7506,7 +7506,7 @@ function Eu({
|
|
|
7506
7506
|
[]
|
|
7507
7507
|
);
|
|
7508
7508
|
const O = fn(
|
|
7509
|
-
(T,
|
|
7509
|
+
(T, U) => {
|
|
7510
7510
|
if (!n) return;
|
|
7511
7511
|
const B = Math.max(lr, T.size ?? h.current), q = T.rotate ?? p.current;
|
|
7512
7512
|
T.size != null && (l(B), h.current = B), T.rotate != null && (u(q), p.current = q);
|
|
@@ -7519,24 +7519,24 @@ function Eu({
|
|
|
7519
7519
|
size: B,
|
|
7520
7520
|
rotate: q
|
|
7521
7521
|
},
|
|
7522
|
-
|
|
7522
|
+
U
|
|
7523
7523
|
);
|
|
7524
7524
|
},
|
|
7525
7525
|
[n, e, o, i]
|
|
7526
|
-
), w = (T,
|
|
7526
|
+
), w = (T, U) => {
|
|
7527
7527
|
if (T === "size") {
|
|
7528
7528
|
O({
|
|
7529
|
-
size: Math.max(lr, Lo(h.current,
|
|
7529
|
+
size: Math.max(lr, Lo(h.current, U))
|
|
7530
7530
|
});
|
|
7531
7531
|
return;
|
|
7532
7532
|
}
|
|
7533
|
-
O({ rotate: Lo(p.current,
|
|
7533
|
+
O({ rotate: Lo(p.current, U) });
|
|
7534
7534
|
}, E = (T) => {
|
|
7535
|
-
const
|
|
7536
|
-
|
|
7537
|
-
}, N = (T,
|
|
7538
|
-
E(T), y.current[T] = window.setInterval(() => w(T,
|
|
7539
|
-
},
|
|
7535
|
+
const U = y.current[T];
|
|
7536
|
+
U && (window.clearInterval(U), y.current[T] = void 0);
|
|
7537
|
+
}, N = (T, U) => {
|
|
7538
|
+
E(T), y.current[T] = window.setInterval(() => w(T, U), 200);
|
|
7539
|
+
}, H = e.color ?? "";
|
|
7540
7540
|
return /* @__PURE__ */ k("div", { className: "eyeon-map-assign", children: [
|
|
7541
7541
|
/* @__PURE__ */ k("label", { className: "eyeon-map-rail__field", children: [
|
|
7542
7542
|
"Text",
|
|
@@ -7553,8 +7553,8 @@ function Eu({
|
|
|
7553
7553
|
m.current = !0;
|
|
7554
7554
|
},
|
|
7555
7555
|
onChange: (T) => {
|
|
7556
|
-
const
|
|
7557
|
-
r(
|
|
7556
|
+
const U = T.target.value;
|
|
7557
|
+
r(U), O({ text: U }, { live: !0 });
|
|
7558
7558
|
},
|
|
7559
7559
|
onBlur: () => {
|
|
7560
7560
|
m.current = !1;
|
|
@@ -7588,11 +7588,11 @@ function Eu({
|
|
|
7588
7588
|
So,
|
|
7589
7589
|
{
|
|
7590
7590
|
label: "Text color",
|
|
7591
|
-
value:
|
|
7591
|
+
value: H,
|
|
7592
7592
|
fallback: t,
|
|
7593
7593
|
disabled: !n,
|
|
7594
7594
|
onChange: (T) => O({ color: T || void 0 }),
|
|
7595
|
-
onReset:
|
|
7595
|
+
onReset: H ? () => O({ color: void 0 }) : void 0
|
|
7596
7596
|
}
|
|
7597
7597
|
),
|
|
7598
7598
|
/* @__PURE__ */ c(
|
|
@@ -7639,27 +7639,27 @@ function Ou({
|
|
|
7639
7639
|
onClearAssignment: w,
|
|
7640
7640
|
onSaveAssignment: E,
|
|
7641
7641
|
onUpdateLabel: N,
|
|
7642
|
-
selectedShapes:
|
|
7642
|
+
selectedShapes: H = [],
|
|
7643
7643
|
selectedAssignments: T = [],
|
|
7644
|
-
onBulkAssign:
|
|
7644
|
+
onBulkAssign: U,
|
|
7645
7645
|
storeDefaultColor: B,
|
|
7646
7646
|
storeTextColor: q
|
|
7647
7647
|
}) {
|
|
7648
7648
|
const [W, F] = z((e == null ? void 0 : e.key) ?? ""), [oe, j] = z(null), [Pe, We] = z(null);
|
|
7649
7649
|
if (pe(() => {
|
|
7650
7650
|
F((e == null ? void 0 : e.key) ?? ""), j(null), We(null);
|
|
7651
|
-
}, [e, n]), l &&
|
|
7651
|
+
}, [e, n]), l && H.length > 1 && U)
|
|
7652
7652
|
return /* @__PURE__ */ c("div", { className: "eyeon-map-inspector", children: /* @__PURE__ */ c(
|
|
7653
7653
|
wu,
|
|
7654
7654
|
{
|
|
7655
|
-
shapes:
|
|
7655
|
+
shapes: H,
|
|
7656
7656
|
assignments: T,
|
|
7657
7657
|
canEdit: s,
|
|
7658
7658
|
storeDefaultColor: B,
|
|
7659
7659
|
storeTextColor: q,
|
|
7660
|
-
onPatch:
|
|
7660
|
+
onPatch: U
|
|
7661
7661
|
},
|
|
7662
|
-
|
|
7662
|
+
H.map((ke) => ke.id).join(",")
|
|
7663
7663
|
) });
|
|
7664
7664
|
if (!e)
|
|
7665
7665
|
return !l || !d ? null : /* @__PURE__ */ c("div", { className: "eyeon-map-inspector__empty", children: d });
|
|
@@ -7911,9 +7911,9 @@ function Yu({
|
|
|
7911
7911
|
retailers: w = [],
|
|
7912
7912
|
kiosks: E = [],
|
|
7913
7913
|
imageProxyUrl: N,
|
|
7914
|
-
className:
|
|
7914
|
+
className: H,
|
|
7915
7915
|
sidebarFooter: T,
|
|
7916
|
-
onUseClassicMap:
|
|
7916
|
+
onUseClassicMap: U
|
|
7917
7917
|
}) {
|
|
7918
7918
|
const [B, q] = z(() => {
|
|
7919
7919
|
var g;
|
|
@@ -7924,12 +7924,12 @@ function Yu({
|
|
|
7924
7924
|
return g != null && n.levels.some((v) => v.id === g) ? g : Vo(n.levels);
|
|
7925
7925
|
}), [oe, j] = z([]), [Pe, We] = z(null), we = oe[0] ?? null, [De, Se] = z(null), [ke, Ke] = z(0), [Ye, Oe] = z([]), [Te, $] = z("select"), [ee, ce] = z(0), [ie, he] = z(!1), [$e, rn] = z(!1), [un, Ve] = z(jn), [ae, ne] = z(!1), fe = ue(null), _e = ue(un), Fe = ue([]), ve = ue(-1), Xe = ue(!1);
|
|
7926
7926
|
_e.current = un;
|
|
7927
|
-
const qn = e === "PORTAL", Sn = tc(e, B),
|
|
7928
|
-
isEditMap:
|
|
7927
|
+
const qn = e === "PORTAL", Sn = tc(e, B), He = Sn === "editor", Re = ue({
|
|
7928
|
+
isEditMap: He,
|
|
7929
7929
|
selectedShapeId: we,
|
|
7930
7930
|
selectedAnchorIds: Ye
|
|
7931
7931
|
});
|
|
7932
|
-
Re.current = { isEditMap:
|
|
7932
|
+
Re.current = { isEditMap: He, selectedShapeId: we, selectedAnchorIds: Ye }, pe(() => {
|
|
7933
7933
|
Fe.current = [], ve.current = -1, Xe.current = !1, ce(0), he(!1), _e.current = jn(), Ve(jn());
|
|
7934
7934
|
}, [n.mapId, n.centerId]), pe(() => {
|
|
7935
7935
|
if (B === "edit-map" || B === "wayfinding") {
|
|
@@ -7940,14 +7940,14 @@ function Yu({
|
|
|
7940
7940
|
}, [W, n.mapId, B]), pe(() => {
|
|
7941
7941
|
if (!n.levels.some((K) => K.id === W)) {
|
|
7942
7942
|
F(
|
|
7943
|
-
B === "wayfinding" ? Ko(n.levels) : bo(B) ? Vo(n.levels) :
|
|
7943
|
+
B === "wayfinding" ? Ko(n.levels) : bo(B) ? Vo(n.levels) : Ho(n.levels)
|
|
7944
7944
|
);
|
|
7945
7945
|
return;
|
|
7946
7946
|
}
|
|
7947
7947
|
if (B === "edit-map") return;
|
|
7948
7948
|
const I = n.levels.find((K) => K.id === W);
|
|
7949
7949
|
if ((I == null ? void 0 : I.kind) !== "outdoor") return;
|
|
7950
|
-
const v = B === "wayfinding" ? Ko(n.levels) :
|
|
7950
|
+
const v = B === "wayfinding" ? Ko(n.levels) : Ho(n.levels);
|
|
7951
7951
|
v != null && v !== W && F(v);
|
|
7952
7952
|
}, [n.levels, W, B]);
|
|
7953
7953
|
const L = me(
|
|
@@ -7956,7 +7956,7 @@ function Yu({
|
|
|
7956
7956
|
), Ce = me(
|
|
7957
7957
|
() => $l(L.theme),
|
|
7958
7958
|
[L.theme]
|
|
7959
|
-
), pn = Fe.current.length > 0 || ie, ye = L.levels.find((g) => g.id === W) ?? null, Me = ci(B, ye),
|
|
7959
|
+
), pn = Fe.current.length > 0 || ie, ye = L.levels.find((g) => g.id === W) ?? null, Me = ci(B, ye), Ue = t && !Me, R = L.levels.find((g) => g.kind === "outdoor") ?? null, Z = R && (ye == null ? void 0 : ye.kind) === "floor" ? L.shapes.filter((g) => g.levelId === R.id) : [], te = L.shapes.filter((g) => g.levelId === W), x = me(() => {
|
|
7960
7960
|
const g = L.levels.map((v) => ({
|
|
7961
7961
|
...v,
|
|
7962
7962
|
shapes: L.shapes.filter((K) => K.levelId === v.id)
|
|
@@ -8064,7 +8064,7 @@ function Yu({
|
|
|
8064
8064
|
}
|
|
8065
8065
|
}, [t, pn, l, $e]), bn = fn(
|
|
8066
8066
|
(g) => {
|
|
8067
|
-
j([]), We(null), Oe([]), Se(null), bo(B) && !bo(g) ? ($("select"), Xe.current = !1, _e.current = jn(), Ve(jn()), F(
|
|
8067
|
+
j([]), We(null), Oe([]), Se(null), bo(B) && !bo(g) ? ($("select"), Xe.current = !1, _e.current = jn(), Ve(jn()), F(Ho(n.levels))) : g === "edit-map" ? ($("select"), F(Vo(n.levels))) : g === "wayfinding" && ($("select"), F(Ko(n.levels))), q(g);
|
|
8068
8068
|
},
|
|
8069
8069
|
[n.levels, B]
|
|
8070
8070
|
), Qn = (g) => {
|
|
@@ -8074,7 +8074,7 @@ function Yu({
|
|
|
8074
8074
|
ci(B, I) && $("select");
|
|
8075
8075
|
};
|
|
8076
8076
|
pe(() => {
|
|
8077
|
-
if (!
|
|
8077
|
+
if (!He || !t) return;
|
|
8078
8078
|
const g = (I) => {
|
|
8079
8079
|
if (!ar(I.target)) {
|
|
8080
8080
|
if (cc(I)) {
|
|
@@ -8085,7 +8085,7 @@ function Yu({
|
|
|
8085
8085
|
}
|
|
8086
8086
|
};
|
|
8087
8087
|
return window.addEventListener("keydown", g), () => window.removeEventListener("keydown", g);
|
|
8088
|
-
}, [t,
|
|
8088
|
+
}, [t, He, Ln, en]);
|
|
8089
8089
|
const et = fn(
|
|
8090
8090
|
(g, I) => {
|
|
8091
8091
|
const v = g == null ? null : L.shapes.find((J) => J.id === g), K = !!(I != null && I.additive) && B !== "edit-map" && B !== "wayfinding" && (v == null || Wt(v.kind));
|
|
@@ -8179,7 +8179,7 @@ function Yu({
|
|
|
8179
8179
|
}, Kn = () => {
|
|
8180
8180
|
!A || !t || (ge({ op: "delete_shape", shapeId: A.id }), j([]));
|
|
8181
8181
|
}, ft = (g, I, v) => {
|
|
8182
|
-
if (!
|
|
8182
|
+
if (!Ue) return;
|
|
8183
8183
|
const K = L.shapes.find((J) => J.id === g);
|
|
8184
8184
|
K && ge(
|
|
8185
8185
|
{
|
|
@@ -8204,7 +8204,7 @@ function Yu({
|
|
|
8204
8204
|
I != null && I.live || yn();
|
|
8205
8205
|
return;
|
|
8206
8206
|
}
|
|
8207
|
-
const
|
|
8207
|
+
const Hn = ba(A.geometry, xe);
|
|
8208
8208
|
ge(
|
|
8209
8209
|
{
|
|
8210
8210
|
op: "upsert_shape",
|
|
@@ -8214,8 +8214,8 @@ function Yu({
|
|
|
8214
8214
|
key: A.key,
|
|
8215
8215
|
kind: A.kind,
|
|
8216
8216
|
label: g,
|
|
8217
|
-
geometry:
|
|
8218
|
-
bbox: wn(
|
|
8217
|
+
geometry: Hn,
|
|
8218
|
+
bbox: wn(Hn)
|
|
8219
8219
|
}
|
|
8220
8220
|
},
|
|
8221
8221
|
I != null && I.live ? "gesture" : "step"
|
|
@@ -8333,12 +8333,12 @@ function Yu({
|
|
|
8333
8333
|
}
|
|
8334
8334
|
const Ie = L.shapes.find((Dn) => Dn.id === I);
|
|
8335
8335
|
if (!Ie || !Vs(Ie.kind)) return;
|
|
8336
|
-
const
|
|
8336
|
+
const Hn = L.assignments.find((Dn) => Dn.shapeId === I), Un = Hn ? Jn(Hn, Ie.kind) : $t(Ie.id, Ie.kind), P = Jn(
|
|
8337
8337
|
{
|
|
8338
|
-
...
|
|
8338
|
+
...Un,
|
|
8339
8339
|
targetType: "kiosk",
|
|
8340
8340
|
kioskId: g,
|
|
8341
|
-
customLabel: ((uo = v == null ? void 0 : v.name) == null ? void 0 : uo.trim()) ||
|
|
8341
|
+
customLabel: ((uo = v == null ? void 0 : v.name) == null ? void 0 : uo.trim()) || Un.customLabel,
|
|
8342
8342
|
retailerId: null,
|
|
8343
8343
|
amenityId: null,
|
|
8344
8344
|
layerType: "kiosk"
|
|
@@ -8362,7 +8362,7 @@ function Yu({
|
|
|
8362
8362
|
for (const v of oe) {
|
|
8363
8363
|
const K = L.shapes.find((P) => P.id === v);
|
|
8364
8364
|
if (!K || !Wt(K.kind)) continue;
|
|
8365
|
-
const J = L.assignments.find((P) => P.shapeId === v), xe = J ? Jn(J, K.kind) : $t(v, K.kind), Ie = Kl(xe, g),
|
|
8365
|
+
const J = L.assignments.find((P) => P.shapeId === v), xe = J ? Jn(J, K.kind) : $t(v, K.kind), Ie = Kl(xe, g), Hn = w.find((P) => P.id === Ie.retailerId), Un = Wo(K, Ie, Hn);
|
|
8366
8366
|
I.push({ op: "upsert_assignment", assignment: Ie }), I.push({
|
|
8367
8367
|
op: "upsert_shape",
|
|
8368
8368
|
shape: {
|
|
@@ -8370,8 +8370,8 @@ function Yu({
|
|
|
8370
8370
|
levelId: K.levelId,
|
|
8371
8371
|
key: K.key,
|
|
8372
8372
|
kind: K.kind,
|
|
8373
|
-
style:
|
|
8374
|
-
label:
|
|
8373
|
+
style: Un.style,
|
|
8374
|
+
label: Un.label
|
|
8375
8375
|
}
|
|
8376
8376
|
});
|
|
8377
8377
|
}
|
|
@@ -8446,7 +8446,7 @@ function Yu({
|
|
|
8446
8446
|
onAssign: (g) => ln(mt.id, g)
|
|
8447
8447
|
}
|
|
8448
8448
|
) : null, Ro = B === "wayfinding" ? "route" : B === "edit-map" ? "map" : void 0;
|
|
8449
|
-
return /* @__PURE__ */ k("div", { className: `eyeon-map-editor eyeon-map-editor--${e} ${
|
|
8449
|
+
return /* @__PURE__ */ k("div", { className: `eyeon-map-editor eyeon-map-editor--${e} ${H ?? ""}`, children: [
|
|
8450
8450
|
qn ? /* @__PURE__ */ c(
|
|
8451
8451
|
pu,
|
|
8452
8452
|
{
|
|
@@ -8488,7 +8488,7 @@ function Yu({
|
|
|
8488
8488
|
},
|
|
8489
8489
|
footer: T,
|
|
8490
8490
|
catalogKioskPanel: Vn,
|
|
8491
|
-
onUseClassicMap: e === "PORTAL" ?
|
|
8491
|
+
onUseClassicMap: e === "PORTAL" ? U : void 0,
|
|
8492
8492
|
assignPanel: nt,
|
|
8493
8493
|
editMapPanel: /* @__PURE__ */ k(Je, { children: [
|
|
8494
8494
|
go(Te, "map") ? /* @__PURE__ */ c("p", { className: "eyeon-map-rail__hint", children: go(Te, "map") }) : null,
|
|
@@ -8510,17 +8510,17 @@ function Yu({
|
|
|
8510
8510
|
) : null,
|
|
8511
8511
|
/* @__PURE__ */ k("div", { className: "eyeon-map-editor__center", children: [
|
|
8512
8512
|
/* @__PURE__ */ k("div", { className: "eyeon-map-editor__toolbar", children: [
|
|
8513
|
-
/* @__PURE__ */ c("div", { className: "eyeon-map-editor__tools", children:
|
|
8513
|
+
/* @__PURE__ */ c("div", { className: "eyeon-map-editor__tools", children: He ? /* @__PURE__ */ c(
|
|
8514
8514
|
Ac,
|
|
8515
8515
|
{
|
|
8516
8516
|
tool: Te,
|
|
8517
8517
|
onToolChange: Le,
|
|
8518
|
-
canEdit:
|
|
8518
|
+
canEdit: Ue,
|
|
8519
8519
|
group: Ro
|
|
8520
8520
|
}
|
|
8521
8521
|
) : null }),
|
|
8522
8522
|
/* @__PURE__ */ k("div", { className: "eyeon-map-editor__actions", children: [
|
|
8523
|
-
|
|
8523
|
+
He ? /* @__PURE__ */ c(
|
|
8524
8524
|
Ec,
|
|
8525
8525
|
{
|
|
8526
8526
|
canUndo: un.past.length > 0 || ae,
|
|
@@ -8603,7 +8603,7 @@ function Yu({
|
|
|
8603
8603
|
onSelectShape: et,
|
|
8604
8604
|
onSelectAnchors: Oe,
|
|
8605
8605
|
onCreateRouteSegment: (g, I) => {
|
|
8606
|
-
if (!ye || !
|
|
8606
|
+
if (!ye || !Ue) return null;
|
|
8607
8607
|
const v = ve.current--, K = ve.current--;
|
|
8608
8608
|
return Ze([
|
|
8609
8609
|
{
|
|
@@ -8638,7 +8638,7 @@ function Yu({
|
|
|
8638
8638
|
]), K;
|
|
8639
8639
|
},
|
|
8640
8640
|
onCreateRoutePoint: (g, I) => {
|
|
8641
|
-
if (!ye || !
|
|
8641
|
+
if (!ye || !Ue) return null;
|
|
8642
8642
|
const v = ge({
|
|
8643
8643
|
op: "upsert_anchor",
|
|
8644
8644
|
anchor: {
|
|
@@ -8662,7 +8662,7 @@ function Yu({
|
|
|
8662
8662
|
), v;
|
|
8663
8663
|
},
|
|
8664
8664
|
onLinkRouteAnchors: (g, I) => {
|
|
8665
|
-
if (!
|
|
8665
|
+
if (!Ue) return;
|
|
8666
8666
|
const v = Xa(
|
|
8667
8667
|
L.mapId,
|
|
8668
8668
|
g,
|
|
@@ -8673,7 +8673,7 @@ function Yu({
|
|
|
8673
8673
|
v && ge(v);
|
|
8674
8674
|
},
|
|
8675
8675
|
onInsertRouteJunction: (g, I) => {
|
|
8676
|
-
if (!
|
|
8676
|
+
if (!Ue || !ye) return null;
|
|
8677
8677
|
const v = X.find((xe) => xe.id === g);
|
|
8678
8678
|
if (!v) return null;
|
|
8679
8679
|
const { ops: K, junctionId: J } = ja({
|
|
@@ -8686,7 +8686,7 @@ function Yu({
|
|
|
8686
8686
|
return K.length && Ze(K), J;
|
|
8687
8687
|
},
|
|
8688
8688
|
onDeleteRouteAnchor: (g) => {
|
|
8689
|
-
if (!
|
|
8689
|
+
if (!Ue) return;
|
|
8690
8690
|
const I = Ya(
|
|
8691
8691
|
g,
|
|
8692
8692
|
L.mapId,
|
|
@@ -8698,10 +8698,10 @@ function Yu({
|
|
|
8698
8698
|
);
|
|
8699
8699
|
},
|
|
8700
8700
|
onEnsureShapeAnchor: (g, I) => {
|
|
8701
|
-
if (!
|
|
8701
|
+
if (!Ue) return null;
|
|
8702
8702
|
const v = te.find((xe) => xe.id === g);
|
|
8703
8703
|
if (!v) return null;
|
|
8704
|
-
const { ops: K, anchorId: J } =
|
|
8704
|
+
const { ops: K, anchorId: J } = Ha({
|
|
8705
8705
|
shape: v,
|
|
8706
8706
|
anchors: D,
|
|
8707
8707
|
allocId: () => ve.current--,
|
|
@@ -8710,10 +8710,10 @@ function Yu({
|
|
|
8710
8710
|
return K.length && Ze(K), Oe([J]), J;
|
|
8711
8711
|
},
|
|
8712
8712
|
onConnectShapeToRoute: (g, I, v, K) => {
|
|
8713
|
-
if (!
|
|
8713
|
+
if (!Ue) return;
|
|
8714
8714
|
const J = te.find((Ie) => Ie.id === g);
|
|
8715
8715
|
if (!J) return;
|
|
8716
|
-
const xe =
|
|
8716
|
+
const xe = Ua({
|
|
8717
8717
|
shape: J,
|
|
8718
8718
|
anchors: D,
|
|
8719
8719
|
edges: X,
|
|
@@ -8727,7 +8727,7 @@ function Yu({
|
|
|
8727
8727
|
},
|
|
8728
8728
|
onHistoryGestureEnd: yn,
|
|
8729
8729
|
onMoveAnchor: (g, I, v) => {
|
|
8730
|
-
if (!
|
|
8730
|
+
if (!Ue) return;
|
|
8731
8731
|
const K = D.find((J) => J.id === g);
|
|
8732
8732
|
K && ge(
|
|
8733
8733
|
{
|
|
@@ -8738,7 +8738,7 @@ function Yu({
|
|
|
8738
8738
|
);
|
|
8739
8739
|
},
|
|
8740
8740
|
onCreateShape: (g, I, v) => {
|
|
8741
|
-
if (!ye || !
|
|
8741
|
+
if (!ye || !Ue) return;
|
|
8742
8742
|
const K = br(
|
|
8743
8743
|
g,
|
|
8744
8744
|
Ir(L.shapes, ye.id)
|
|
@@ -8759,7 +8759,7 @@ function Yu({
|
|
|
8759
8759
|
},
|
|
8760
8760
|
onUpdateShapeGeometry: ft,
|
|
8761
8761
|
onBatchShapeEdits: (g) => {
|
|
8762
|
-
if (!ye || !
|
|
8762
|
+
if (!ye || !Ue || g.length === 0)
|
|
8763
8763
|
return;
|
|
8764
8764
|
const I = [];
|
|
8765
8765
|
let v = !1;
|
|
@@ -8968,7 +8968,7 @@ export {
|
|
|
8968
8968
|
Ou as Inspector,
|
|
8969
8969
|
pu as LeftRail,
|
|
8970
8970
|
Yu as MapEditor,
|
|
8971
|
-
|
|
8971
|
+
Hd as floorsScreenTitle,
|
|
8972
8972
|
Yo as hitTestVertex,
|
|
8973
8973
|
Gc as insertVertex,
|
|
8974
8974
|
bo as isEditorSection,
|
|
@@ -8977,8 +8977,8 @@ export {
|
|
|
8977
8977
|
so as polygonsToGeometry,
|
|
8978
8978
|
tc as portalCenterSurface,
|
|
8979
8979
|
mi as removeVertex,
|
|
8980
|
-
|
|
8980
|
+
Uc as translateEdge,
|
|
8981
8981
|
hi as translateGeometry,
|
|
8982
|
-
|
|
8982
|
+
Ud as visibleFloorCount
|
|
8983
8983
|
};
|
|
8984
8984
|
//# sourceMappingURL=index.js.map
|