dbf-mirador 4.3.2 → 4.3.4
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/{AudioViewer-tRH73pbt.js → AudioViewer-Bw9Dw4zn.js} +3 -3
- package/dist/{AudioViewer-tRH73pbt.js.map → AudioViewer-Bw9Dw4zn.js.map} +1 -1
- package/dist/{CommentSharp-BJ6oQAe3.js → CommentSharp-CqGF7axd.js} +4 -4
- package/dist/{CommentSharp-BJ6oQAe3.js.map → CommentSharp-CqGF7axd.js.map} +1 -1
- package/dist/{FailedImageContext-BhA0TpVp.js → FailedImageContext-yYxY_Y6U.js} +15 -9
- package/dist/FailedImageContext-yYxY_Y6U.js.map +1 -0
- package/dist/{GalleryView-rCx0Q4f3.js → GalleryView-CVBvyOpD.js} +7 -7
- package/dist/{GalleryView-rCx0Q4f3.js.map → GalleryView-CVBvyOpD.js.map} +1 -1
- package/dist/{OpenSeadragonViewer-4nw8qaVM.js → OpenSeadragonViewer-CYMXINoT.js} +317 -296
- package/dist/{OpenSeadragonViewer-4nw8qaVM.js.map → OpenSeadragonViewer-CYMXINoT.js.map} +1 -1
- package/dist/{PluginHook-DWFCXIIp.js → PluginHook-Bs9Qkrjd.js} +2 -2
- package/dist/{PluginHook-DWFCXIIp.js.map → PluginHook-Bs9Qkrjd.js.map} +1 -1
- package/dist/{SelectCollection-BK9ZDkK3.js → SelectCollection-3NmzQDwN.js} +3 -3
- package/dist/{SelectCollection-BK9ZDkK3.js.map → SelectCollection-3NmzQDwN.js.map} +1 -1
- package/dist/{TextViewer-D_1qzQE4.js → TextViewer-CVXiOE35.js} +4 -4
- package/dist/{TextViewer-D_1qzQE4.js.map → TextViewer-CVXiOE35.js.map} +1 -1
- package/dist/{VideoViewer-DzNjgLWE.js → VideoViewer-cPgF9ddg.js} +3 -3
- package/dist/{VideoViewer-DzNjgLWE.js.map → VideoViewer-cPgF9ddg.js.map} +1 -1
- package/dist/{WindowCanvasNavigationControls-D2uLtL_A.js → WindowCanvasNavigationControls-D5yfHP-5.js} +6 -6
- package/dist/{WindowCanvasNavigationControls-D2uLtL_A.js.map → WindowCanvasNavigationControls-D5yfHP-5.js.map} +1 -1
- package/dist/{WindowViewer-uHVYcMsX.js → WindowViewer-CCpOO735.js} +4 -4
- package/dist/{WindowViewer-uHVYcMsX.js.map → WindowViewer-CCpOO735.js.map} +1 -1
- package/dist/{WorkspaceArea-7bydz9m-.js → WorkspaceArea-DklqbMLL.js} +4023 -4002
- package/dist/WorkspaceArea-DklqbMLL.js.map +1 -0
- package/dist/{canvas-2ACcnS9Y.js → canvas-DNE0BtDK.js} +2 -2
- package/dist/{canvas-2ACcnS9Y.js.map → canvas-DNE0BtDK.js.map} +1 -1
- package/dist/{canvases-DTR37lo-.js → canvases-DKeoerqc.js} +256 -256
- package/dist/{canvases-DTR37lo-.js.map → canvases-DKeoerqc.js.map} +1 -1
- package/dist/{getters-B4oepJRC.js → getters-CD0HjudG.js} +2 -2
- package/dist/{getters-B4oepJRC.js.map → getters-CD0HjudG.js.map} +1 -1
- package/dist/{index.module-CgUBfaXx.js → index.module-B1DwyIwz.js} +8 -8
- package/dist/{index.module-CgUBfaXx.js.map → index.module-B1DwyIwz.js.map} +1 -1
- package/dist/mirador.es.js +1793 -1426
- package/dist/mirador.es.js.map +1 -1
- package/dist/mirador.min.js +75 -72
- package/dist/mirador.min.js.map +1 -1
- package/dist/{visuallyHidden-C4mhQkB0.js → visuallyHidden-BKK1-SDh.js} +2 -2
- package/dist/{visuallyHidden-C4mhQkB0.js.map → visuallyHidden-BKK1-SDh.js.map} +1 -1
- package/dist/{window-COQOIAli.js → window-DiDL2pT4.js} +2 -2
- package/dist/{window-COQOIAli.js.map → window-DiDL2pT4.js.map} +1 -1
- package/package.json +1 -1
- package/src/components/AnnotationsOverlay.jsx +36 -3
- package/src/components/CompanionWindow.jsx +40 -3
- package/src/components/MapViewer.jsx +93 -4
- package/src/config/settings.js +1 -1
- package/src/lib/AnnotationItem.js +5 -0
- package/src/lib/AnnotationResource.js +5 -0
- package/src/lib/CanvasAnnotationDisplay.js +52 -14
- package/src/plugins/index.js +2 -0
- package/src/plugins/mapInteractionPlugin.tsx +321 -0
- package/src/plugins/nestedMapPlugin.tsx +152 -0
- package/src/plugins/poiPreviewPlugin.tsx +520 -109
- package/dist/FailedImageContext-BhA0TpVp.js.map +0 -1
- package/dist/WorkspaceArea-7bydz9m-.js.map +0 -1
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import { G as e, K as t, Q as n, S as r, U as i, Z as a, a as o, at as s, b as c, dt as l, ft as u, g as d, i as f, m as p, rt as m, st as h, ut as g } from "./getters-
|
|
2
|
-
import { At as _,
|
|
3
|
-
import { O as
|
|
4
|
-
import { d as F, f as I, l as
|
|
5
|
-
import { i as
|
|
6
|
-
import { i as V, r as
|
|
7
|
-
import { Children as U, cloneElement as
|
|
8
|
-
import { jsx as
|
|
9
|
-
import { useTranslation as
|
|
10
|
-
import { styled as
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
1
|
+
import { G as e, K as t, Q as n, S as r, U as i, Z as a, a as o, at as s, b as c, dt as l, ft as u, g as d, i as f, m as p, rt as m, st as h, ut as g } from "./getters-CD0HjudG.js";
|
|
2
|
+
import { At as _, Ft as v, I as y, Lt as b, Pt as x, Wt as S, _ as C, a as w, an as T, bt as ee, c as E, dn as D, m as te, mt as O, nn as ne, pn as k, sn as A, y as j } from "./canvases-DKeoerqc.js";
|
|
3
|
+
import { O as re, c as ie, h as ae, k as M, n as N, r as oe, t as P } from "./FailedImageContext-yYxY_Y6U.js";
|
|
4
|
+
import { d as F, f as I, l as se, m as L, n as R, o as ce, t as z, u as le } from "./index.module-B1DwyIwz.js";
|
|
5
|
+
import { i as B } from "./canvas-DNE0BtDK.js";
|
|
6
|
+
import { i as V, r as ue, t as H } from "./PluginHook-Bs9Qkrjd.js";
|
|
7
|
+
import { Children as U, cloneElement as de, createContext as fe, useCallback as W, useContext as G, useEffect as K, useId as pe, useMemo as q, useReducer as me, useRef as J, useState as he } from "react";
|
|
8
|
+
import { jsx as Y, jsxs as ge } from "react/jsx-runtime";
|
|
9
|
+
import { useTranslation as _e } from "react-i18next";
|
|
10
|
+
import { styled as ve } from "@mui/material/styles";
|
|
11
|
+
import ye from "@mui/material/Typography";
|
|
12
|
+
import be from "react-dom";
|
|
13
|
+
import xe from "@mui/material/Box";
|
|
14
14
|
//#region src/state/selectors/viewer.js
|
|
15
|
-
var
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
], (e, t, n, r) => new
|
|
21
|
-
t.exports =
|
|
15
|
+
var Se = p([
|
|
16
|
+
C,
|
|
17
|
+
ce,
|
|
18
|
+
y,
|
|
19
|
+
b
|
|
20
|
+
], (e, t, n, r) => new R(e.map(r), t, n)), Ce = /* @__PURE__ */ g(((e, t) => {
|
|
21
|
+
t.exports = v()(function(e, t, n) {
|
|
22
22
|
e[+!n].push(t);
|
|
23
23
|
}, function() {
|
|
24
24
|
return [[], []];
|
|
25
25
|
});
|
|
26
|
-
})),
|
|
26
|
+
})), we = /* @__PURE__ */ g(((e, t) => {
|
|
27
27
|
var n = ne(), i = r();
|
|
28
28
|
function a(e, t) {
|
|
29
29
|
var r = -1, a = i(e) ? Array(e.length) : [];
|
|
@@ -32,14 +32,14 @@ var be = p([
|
|
|
32
32
|
}), a;
|
|
33
33
|
}
|
|
34
34
|
t.exports = a;
|
|
35
|
-
})),
|
|
35
|
+
})), Te = /* @__PURE__ */ g(((e, t) => {
|
|
36
36
|
function n(e, t) {
|
|
37
37
|
var n = e.length;
|
|
38
38
|
for (e.sort(t); n--;) e[n] = e[n].value;
|
|
39
39
|
return e;
|
|
40
40
|
}
|
|
41
41
|
t.exports = n;
|
|
42
|
-
})),
|
|
42
|
+
})), Ee = /* @__PURE__ */ g(((e, t) => {
|
|
43
43
|
var r = n();
|
|
44
44
|
function i(e, t) {
|
|
45
45
|
if (e !== t) {
|
|
@@ -50,8 +50,8 @@ var be = p([
|
|
|
50
50
|
return 0;
|
|
51
51
|
}
|
|
52
52
|
t.exports = i;
|
|
53
|
-
})),
|
|
54
|
-
var n =
|
|
53
|
+
})), De = /* @__PURE__ */ g(((e, t) => {
|
|
54
|
+
var n = Ee();
|
|
55
55
|
function r(e, t, r) {
|
|
56
56
|
for (var i = -1, a = e.criteria, o = t.criteria, s = a.length, c = r.length; ++i < s;) {
|
|
57
57
|
var l = n(a[i], o[i]);
|
|
@@ -60,8 +60,8 @@ var be = p([
|
|
|
60
60
|
return e.index - t.index;
|
|
61
61
|
}
|
|
62
62
|
t.exports = r;
|
|
63
|
-
})),
|
|
64
|
-
var r =
|
|
63
|
+
})), Oe = /* @__PURE__ */ g(((t, n) => {
|
|
64
|
+
var r = D(), i = A(), a = S(), o = we(), s = Te(), l = c(), u = De(), d = e(), f = m();
|
|
65
65
|
function p(e, t, n) {
|
|
66
66
|
t = t.length ? r(t, function(e) {
|
|
67
67
|
return f(e) ? function(t) {
|
|
@@ -82,23 +82,23 @@ var be = p([
|
|
|
82
82
|
});
|
|
83
83
|
}
|
|
84
84
|
n.exports = p;
|
|
85
|
-
})),
|
|
86
|
-
var i =
|
|
85
|
+
})), ke = /* @__PURE__ */ g(((e, n) => {
|
|
86
|
+
var i = k(), o = r(), s = t(), c = a();
|
|
87
87
|
function l(e, t, n) {
|
|
88
88
|
if (!c(n)) return !1;
|
|
89
89
|
var r = typeof t;
|
|
90
90
|
return (r == "number" ? o(n) && s(t, n.length) : r == "string" && t in n) ? i(n[t], e) : !1;
|
|
91
91
|
}
|
|
92
92
|
n.exports = l;
|
|
93
|
-
})),
|
|
94
|
-
var n =
|
|
93
|
+
})), Ae = /* @__PURE__ */ g(((e, t) => {
|
|
94
|
+
var n = L(), r = Oe(), i = I(), a = ke();
|
|
95
95
|
t.exports = i(function(e, t) {
|
|
96
96
|
if (e == null) return [];
|
|
97
97
|
var i = t.length;
|
|
98
98
|
return i > 1 && a(e, t[0], t[1]) ? t = [] : i > 2 && a(t[0], t[1], t[2]) && (t = [t[0]]), r(e, n(t, 1), []);
|
|
99
99
|
});
|
|
100
|
-
})),
|
|
101
|
-
var n =
|
|
100
|
+
})), je = /* @__PURE__ */ g(((e, t) => {
|
|
101
|
+
var n = se(), r = L(), i = F();
|
|
102
102
|
function a(e, t, a) {
|
|
103
103
|
var o = e.length;
|
|
104
104
|
if (o < 2) return o ? i(e[0]) : [];
|
|
@@ -106,12 +106,12 @@ var be = p([
|
|
|
106
106
|
return i(r(c, 1), t, a);
|
|
107
107
|
}
|
|
108
108
|
t.exports = a;
|
|
109
|
-
})),
|
|
110
|
-
var n =
|
|
109
|
+
})), Me = /* @__PURE__ */ g(((e, t) => {
|
|
110
|
+
var n = T(), r = I(), i = je(), a = le();
|
|
111
111
|
t.exports = r(function(e) {
|
|
112
112
|
return i(n(e, a));
|
|
113
113
|
});
|
|
114
|
-
})),
|
|
114
|
+
})), Ne = /* @__PURE__ */ g(((e, t) => {
|
|
115
115
|
function n(e) {
|
|
116
116
|
return new n.Viewer(e);
|
|
117
117
|
}
|
|
@@ -1100,7 +1100,7 @@ var be = p([
|
|
|
1100
1100
|
E(a, e);
|
|
1101
1101
|
},
|
|
1102
1102
|
losecapture: function(e) {
|
|
1103
|
-
|
|
1103
|
+
te(a, e);
|
|
1104
1104
|
},
|
|
1105
1105
|
mouseenter: function(e) {
|
|
1106
1106
|
M(a, e);
|
|
@@ -1109,22 +1109,22 @@ var be = p([
|
|
|
1109
1109
|
N(a, e);
|
|
1110
1110
|
},
|
|
1111
1111
|
mouseover: function(e) {
|
|
1112
|
-
|
|
1112
|
+
oe(a, e);
|
|
1113
1113
|
},
|
|
1114
1114
|
mouseout: function(e) {
|
|
1115
|
-
|
|
1115
|
+
P(a, e);
|
|
1116
1116
|
},
|
|
1117
1117
|
mousedown: function(e) {
|
|
1118
|
-
|
|
1118
|
+
F(a, e);
|
|
1119
1119
|
},
|
|
1120
1120
|
mouseup: function(e) {
|
|
1121
|
-
|
|
1121
|
+
I(a, e);
|
|
1122
1122
|
},
|
|
1123
1123
|
mousemove: function(e) {
|
|
1124
1124
|
R(a, e);
|
|
1125
1125
|
},
|
|
1126
1126
|
touchstart: function(e) {
|
|
1127
|
-
|
|
1127
|
+
O(a, e);
|
|
1128
1128
|
},
|
|
1129
1129
|
touchend: function(e) {
|
|
1130
1130
|
ne(a, e);
|
|
@@ -1154,28 +1154,28 @@ var be = p([
|
|
|
1154
1154
|
N(a, e);
|
|
1155
1155
|
},
|
|
1156
1156
|
pointerover: function(e) {
|
|
1157
|
-
|
|
1157
|
+
oe(a, e);
|
|
1158
1158
|
},
|
|
1159
1159
|
pointerout: function(e) {
|
|
1160
|
-
|
|
1160
|
+
P(a, e);
|
|
1161
1161
|
},
|
|
1162
1162
|
pointerdown: function(e) {
|
|
1163
|
-
|
|
1163
|
+
F(a, e);
|
|
1164
1164
|
},
|
|
1165
1165
|
pointerup: function(e) {
|
|
1166
|
-
|
|
1166
|
+
I(a, e);
|
|
1167
1167
|
},
|
|
1168
1168
|
pointermove: function(e) {
|
|
1169
1169
|
R(a, e);
|
|
1170
1170
|
},
|
|
1171
1171
|
pointercancel: function(e) {
|
|
1172
|
-
|
|
1172
|
+
le(a, e);
|
|
1173
1173
|
},
|
|
1174
1174
|
pointerupcaptured: function(e) {
|
|
1175
1175
|
se(a, e);
|
|
1176
1176
|
},
|
|
1177
1177
|
pointermovecaptured: function(e) {
|
|
1178
|
-
|
|
1178
|
+
ce(a, e);
|
|
1179
1179
|
},
|
|
1180
1180
|
tracking: !1,
|
|
1181
1181
|
activePointersLists: [],
|
|
@@ -1336,7 +1336,7 @@ var be = p([
|
|
|
1336
1336
|
var t = n[e.hash], r, i, a, o, s, c = t.activePointersLists.length;
|
|
1337
1337
|
for (r = 0; r < c; r++) if (a = t.activePointersLists[r], a.getLength() > 0) {
|
|
1338
1338
|
for (s = [], o = a.asArray(), i = 0; i < o.length; i++) s.push(o[i]);
|
|
1339
|
-
for (i = 0; i < s.length; i++)
|
|
1339
|
+
for (i = 0; i < s.length; i++) V(e, a, s[i]);
|
|
1340
1340
|
}
|
|
1341
1341
|
for (r = 0; r < c; r++) t.activePointersLists.pop();
|
|
1342
1342
|
t.sentDragEvent = !1;
|
|
@@ -1385,7 +1385,7 @@ var be = p([
|
|
|
1385
1385
|
}
|
|
1386
1386
|
else t.element.setCapture(!0);
|
|
1387
1387
|
} else a = c(t, e.MouseTracker.havePointerEvents ? "pointerevent" : n.type), r && i(window.top) && e.addEvent(window.top, a.upName, a.upHandler, !0), e.addEvent(e.MouseTracker.captureElement, a.upName, a.upHandler, !0), e.addEvent(e.MouseTracker.captureElement, a.moveName, a.moveHandler, !0);
|
|
1388
|
-
|
|
1388
|
+
U(t, n, !0);
|
|
1389
1389
|
}
|
|
1390
1390
|
function u(t, n) {
|
|
1391
1391
|
var a, o, s;
|
|
@@ -1397,7 +1397,7 @@ var be = p([
|
|
|
1397
1397
|
} catch {}
|
|
1398
1398
|
} else t.element.releaseCapture();
|
|
1399
1399
|
} else a = c(t, e.MouseTracker.havePointerEvents ? "pointerevent" : n.type), r && i(window.top) && e.removeEvent(window.top, a.upName, a.upHandler, !0), e.removeEvent(e.MouseTracker.captureElement, a.moveName, a.moveHandler, !0), e.removeEvent(e.MouseTracker.captureElement, a.upName, a.upHandler, !0);
|
|
1400
|
-
|
|
1400
|
+
U(t, n, !1);
|
|
1401
1401
|
}
|
|
1402
1402
|
function d(t) {
|
|
1403
1403
|
return e.MouseTracker.havePointerEvents ? t.pointerId : e.MouseTracker.mousePointerId;
|
|
@@ -1428,7 +1428,7 @@ var be = p([
|
|
|
1428
1428
|
pointerType: "mouse",
|
|
1429
1429
|
isEmulated: !1
|
|
1430
1430
|
};
|
|
1431
|
-
|
|
1431
|
+
H(t, r), r.preventDefault && !r.defaultPrevented && e.cancelEvent(n), r.stopPropagation && e.stopEvent(n);
|
|
1432
1432
|
}
|
|
1433
1433
|
function y(t, n) {
|
|
1434
1434
|
var r = {
|
|
@@ -1437,7 +1437,7 @@ var be = p([
|
|
|
1437
1437
|
pointerType: "mouse",
|
|
1438
1438
|
isEmulated: !1
|
|
1439
1439
|
};
|
|
1440
|
-
|
|
1440
|
+
H(t, r), r.preventDefault && !r.defaultPrevented && e.cancelEvent(n), r.stopPropagation && e.stopEvent(n);
|
|
1441
1441
|
}
|
|
1442
1442
|
function b(t, n) {
|
|
1443
1443
|
var r = null, i = {
|
|
@@ -1446,7 +1446,7 @@ var be = p([
|
|
|
1446
1446
|
pointerType: "",
|
|
1447
1447
|
isEmulated: !1
|
|
1448
1448
|
};
|
|
1449
|
-
|
|
1449
|
+
H(t, i), t.keyDownHandler && !i.preventGesture && !i.defaultPrevented && (r = {
|
|
1450
1450
|
eventSource: t,
|
|
1451
1451
|
keyCode: n.keyCode ? n.keyCode : n.charCode,
|
|
1452
1452
|
ctrl: n.ctrlKey,
|
|
@@ -1465,7 +1465,7 @@ var be = p([
|
|
|
1465
1465
|
pointerType: "",
|
|
1466
1466
|
isEmulated: !1
|
|
1467
1467
|
};
|
|
1468
|
-
|
|
1468
|
+
H(t, i), t.keyUpHandler && !i.preventGesture && !i.defaultPrevented && (r = {
|
|
1469
1469
|
eventSource: t,
|
|
1470
1470
|
keyCode: n.keyCode ? n.keyCode : n.charCode,
|
|
1471
1471
|
ctrl: n.ctrlKey,
|
|
@@ -1484,7 +1484,7 @@ var be = p([
|
|
|
1484
1484
|
pointerType: "",
|
|
1485
1485
|
isEmulated: !1
|
|
1486
1486
|
};
|
|
1487
|
-
|
|
1487
|
+
H(t, i), t.keyHandler && !i.preventGesture && !i.defaultPrevented && (r = {
|
|
1488
1488
|
eventSource: t,
|
|
1489
1489
|
keyCode: n.keyCode ? n.keyCode : n.charCode,
|
|
1490
1490
|
ctrl: n.ctrlKey,
|
|
@@ -1503,7 +1503,7 @@ var be = p([
|
|
|
1503
1503
|
pointerType: "",
|
|
1504
1504
|
isEmulated: !1
|
|
1505
1505
|
};
|
|
1506
|
-
|
|
1506
|
+
H(e, n), e.focusHandler && !n.preventGesture && e.focusHandler({
|
|
1507
1507
|
eventSource: e,
|
|
1508
1508
|
originalEvent: t,
|
|
1509
1509
|
userData: e.userData
|
|
@@ -1516,7 +1516,7 @@ var be = p([
|
|
|
1516
1516
|
pointerType: "",
|
|
1517
1517
|
isEmulated: !1
|
|
1518
1518
|
};
|
|
1519
|
-
|
|
1519
|
+
H(e, n), e.blurHandler && !n.preventGesture && e.blurHandler({
|
|
1520
1520
|
eventSource: e,
|
|
1521
1521
|
originalEvent: t,
|
|
1522
1522
|
userData: e.userData
|
|
@@ -1529,7 +1529,7 @@ var be = p([
|
|
|
1529
1529
|
pointerType: "mouse",
|
|
1530
1530
|
isEmulated: !1
|
|
1531
1531
|
};
|
|
1532
|
-
|
|
1532
|
+
H(t, i), t.contextMenuHandler && !i.preventGesture && !i.defaultPrevented && (r = {
|
|
1533
1533
|
eventSource: t,
|
|
1534
1534
|
position: g(m(n), t.element),
|
|
1535
1535
|
originalEvent: i.originalEvent,
|
|
@@ -1562,7 +1562,7 @@ var be = p([
|
|
|
1562
1562
|
eventType: "wheel",
|
|
1563
1563
|
pointerType: "mouse",
|
|
1564
1564
|
isEmulated: n !== r
|
|
1565
|
-
},
|
|
1565
|
+
}, H(t, a), t.scrollHandler && !a.preventGesture && !a.defaultPrevented && (o = {
|
|
1566
1566
|
eventSource: t,
|
|
1567
1567
|
pointerType: "mouse",
|
|
1568
1568
|
position: h(n, t.element),
|
|
@@ -1574,7 +1574,7 @@ var be = p([
|
|
|
1574
1574
|
userData: t.userData
|
|
1575
1575
|
}, t.scrollHandler(o)), a.stopPropagation && e.stopEvent(r), (o && o.preventDefault || a.preventDefault && !a.defaultPrevented) && e.cancelEvent(r);
|
|
1576
1576
|
}
|
|
1577
|
-
function
|
|
1577
|
+
function te(t, n) {
|
|
1578
1578
|
var r = {
|
|
1579
1579
|
id: e.MouseTracker.mousePointerId,
|
|
1580
1580
|
type: "mouse"
|
|
@@ -1584,9 +1584,9 @@ var be = p([
|
|
|
1584
1584
|
pointerType: "mouse",
|
|
1585
1585
|
isEmulated: !1
|
|
1586
1586
|
};
|
|
1587
|
-
|
|
1587
|
+
H(t, i), n.target === t.element && U(t, r, !1), i.stopPropagation && e.stopEvent(n);
|
|
1588
1588
|
}
|
|
1589
|
-
function
|
|
1589
|
+
function O(t, n) {
|
|
1590
1590
|
var r, i, a = n.changedTouches.length, o, s = t.getActivePointersListByType("touch");
|
|
1591
1591
|
r = e.now(), s.getLength() > n.touches.length - a && e.console.warn("Tracked touch contact count doesn't match event.touches.length");
|
|
1592
1592
|
var c = {
|
|
@@ -1595,13 +1595,13 @@ var be = p([
|
|
|
1595
1595
|
pointerType: "touch",
|
|
1596
1596
|
isEmulated: !1
|
|
1597
1597
|
};
|
|
1598
|
-
for (
|
|
1598
|
+
for (H(t, c), i = 0; i < a; i++) o = {
|
|
1599
1599
|
id: n.changedTouches[i].identifier,
|
|
1600
1600
|
type: "touch",
|
|
1601
1601
|
isPrimary: s.getLength() === 0,
|
|
1602
1602
|
currentPos: m(n.changedTouches[i]),
|
|
1603
1603
|
currentTime: r
|
|
1604
|
-
},
|
|
1604
|
+
}, de(t, c, o), K(t, c, o, 0), U(t, o, !0);
|
|
1605
1605
|
c.preventDefault && !c.defaultPrevented && e.cancelEvent(n), c.stopPropagation && e.stopEvent(n);
|
|
1606
1606
|
}
|
|
1607
1607
|
function ne(t, n) {
|
|
@@ -1613,12 +1613,12 @@ var be = p([
|
|
|
1613
1613
|
pointerType: "touch",
|
|
1614
1614
|
isEmulated: !1
|
|
1615
1615
|
};
|
|
1616
|
-
for (
|
|
1616
|
+
for (H(t, s), i = 0; i < a; i++) o = {
|
|
1617
1617
|
id: n.changedTouches[i].identifier,
|
|
1618
1618
|
type: "touch",
|
|
1619
1619
|
currentPos: m(n.changedTouches[i]),
|
|
1620
1620
|
currentTime: r
|
|
1621
|
-
},
|
|
1621
|
+
}, pe(t, s, o, 0), U(t, o, !1), fe(t, s, o);
|
|
1622
1622
|
s.preventDefault && !s.defaultPrevented && e.cancelEvent(n), s.stopPropagation && e.stopEvent(n);
|
|
1623
1623
|
}
|
|
1624
1624
|
function k(t, n) {
|
|
@@ -1630,12 +1630,12 @@ var be = p([
|
|
|
1630
1630
|
pointerType: "touch",
|
|
1631
1631
|
isEmulated: !1
|
|
1632
1632
|
};
|
|
1633
|
-
for (
|
|
1633
|
+
for (H(t, s), i = 0; i < a; i++) o = {
|
|
1634
1634
|
id: n.changedTouches[i].identifier,
|
|
1635
1635
|
type: "touch",
|
|
1636
1636
|
currentPos: m(n.changedTouches[i]),
|
|
1637
1637
|
currentTime: r
|
|
1638
|
-
},
|
|
1638
|
+
}, q(t, s, o);
|
|
1639
1639
|
s.preventDefault && !s.defaultPrevented && e.cancelEvent(n), s.stopPropagation && e.stopEvent(n);
|
|
1640
1640
|
}
|
|
1641
1641
|
function A(t, n) {
|
|
@@ -1645,10 +1645,10 @@ var be = p([
|
|
|
1645
1645
|
pointerType: "touch",
|
|
1646
1646
|
isEmulated: !1
|
|
1647
1647
|
};
|
|
1648
|
-
for (
|
|
1648
|
+
for (H(t, o), i = 0; i < r; i++) a = {
|
|
1649
1649
|
id: n.changedTouches[i].identifier,
|
|
1650
1650
|
type: "touch"
|
|
1651
|
-
},
|
|
1651
|
+
}, me(t, o, a);
|
|
1652
1652
|
o.stopPropagation && e.stopEvent(n);
|
|
1653
1653
|
}
|
|
1654
1654
|
function j(t, n) {
|
|
@@ -1664,7 +1664,7 @@ var be = p([
|
|
|
1664
1664
|
pointerType: f(n),
|
|
1665
1665
|
isEmulated: !1
|
|
1666
1666
|
};
|
|
1667
|
-
|
|
1667
|
+
H(t, r), n.target === t.element && U(t, {
|
|
1668
1668
|
id: n.pointerId,
|
|
1669
1669
|
type: f(n)
|
|
1670
1670
|
}, !0), r.stopPropagation && e.stopEvent(n);
|
|
@@ -1676,7 +1676,7 @@ var be = p([
|
|
|
1676
1676
|
pointerType: f(n),
|
|
1677
1677
|
isEmulated: !1
|
|
1678
1678
|
};
|
|
1679
|
-
|
|
1679
|
+
H(t, r), n.target === t.element && U(t, {
|
|
1680
1680
|
id: n.pointerId,
|
|
1681
1681
|
type: f(n)
|
|
1682
1682
|
}, !1), r.stopPropagation && e.stopEvent(n);
|
|
@@ -1694,7 +1694,7 @@ var be = p([
|
|
|
1694
1694
|
pointerType: r.type,
|
|
1695
1695
|
isEmulated: !1
|
|
1696
1696
|
};
|
|
1697
|
-
|
|
1697
|
+
H(t, i), de(t, i, r);
|
|
1698
1698
|
}
|
|
1699
1699
|
function N(t, n) {
|
|
1700
1700
|
var r = {
|
|
@@ -1709,9 +1709,9 @@ var be = p([
|
|
|
1709
1709
|
pointerType: r.type,
|
|
1710
1710
|
isEmulated: !1
|
|
1711
1711
|
};
|
|
1712
|
-
|
|
1712
|
+
H(t, i), fe(t, i, r);
|
|
1713
1713
|
}
|
|
1714
|
-
function
|
|
1714
|
+
function oe(t, n) {
|
|
1715
1715
|
var r = {
|
|
1716
1716
|
id: d(n),
|
|
1717
1717
|
type: f(n),
|
|
@@ -1724,9 +1724,9 @@ var be = p([
|
|
|
1724
1724
|
pointerType: r.type,
|
|
1725
1725
|
isEmulated: !1
|
|
1726
1726
|
};
|
|
1727
|
-
|
|
1727
|
+
H(t, i), W(t, i, r), i.preventDefault && !i.defaultPrevented && e.cancelEvent(n), i.stopPropagation && e.stopEvent(n);
|
|
1728
1728
|
}
|
|
1729
|
-
function
|
|
1729
|
+
function P(t, n) {
|
|
1730
1730
|
var r = {
|
|
1731
1731
|
id: d(n),
|
|
1732
1732
|
type: f(n),
|
|
@@ -1739,9 +1739,9 @@ var be = p([
|
|
|
1739
1739
|
pointerType: r.type,
|
|
1740
1740
|
isEmulated: !1
|
|
1741
1741
|
};
|
|
1742
|
-
|
|
1742
|
+
H(t, i), G(t, i, r), i.preventDefault && !i.defaultPrevented && e.cancelEvent(n), i.stopPropagation && e.stopEvent(n);
|
|
1743
1743
|
}
|
|
1744
|
-
function
|
|
1744
|
+
function F(t, n) {
|
|
1745
1745
|
var r = {
|
|
1746
1746
|
id: d(n),
|
|
1747
1747
|
type: f(n),
|
|
@@ -1754,9 +1754,9 @@ var be = p([
|
|
|
1754
1754
|
pointerType: r.type,
|
|
1755
1755
|
isEmulated: !1
|
|
1756
1756
|
};
|
|
1757
|
-
|
|
1757
|
+
H(t, a), K(t, a, r, n.button), a.preventDefault && !a.defaultPrevented && e.cancelEvent(n), a.stopPropagation && e.stopEvent(n), a.shouldCapture && (i ? U(t, r, !0) : l(t, r));
|
|
1758
1758
|
}
|
|
1759
|
-
function
|
|
1759
|
+
function I(e, t) {
|
|
1760
1760
|
L(e, t);
|
|
1761
1761
|
}
|
|
1762
1762
|
function se(t, n) {
|
|
@@ -1775,15 +1775,15 @@ var be = p([
|
|
|
1775
1775
|
pointerType: r.type,
|
|
1776
1776
|
isEmulated: !1
|
|
1777
1777
|
};
|
|
1778
|
-
|
|
1778
|
+
H(t, i), pe(t, i, r, n.button), i.preventDefault && !i.defaultPrevented && e.cancelEvent(n), i.stopPropagation && e.stopEvent(n), i.shouldReleaseCapture && (n.target === t.element ? u(t, r) : U(t, r, !1));
|
|
1779
1779
|
}
|
|
1780
1780
|
function R(e, t) {
|
|
1781
|
-
|
|
1781
|
+
z(e, t);
|
|
1782
1782
|
}
|
|
1783
|
-
function
|
|
1784
|
-
t.getActivePointersListByType(f(n)).getById(n.pointerId) &&
|
|
1783
|
+
function ce(t, n) {
|
|
1784
|
+
t.getActivePointersListByType(f(n)).getById(n.pointerId) && z(t, n), e.stopEvent(n);
|
|
1785
1785
|
}
|
|
1786
|
-
function
|
|
1786
|
+
function z(t, n) {
|
|
1787
1787
|
var r = {
|
|
1788
1788
|
id: d(n),
|
|
1789
1789
|
type: f(n),
|
|
@@ -1796,9 +1796,9 @@ var be = p([
|
|
|
1796
1796
|
pointerType: r.type,
|
|
1797
1797
|
isEmulated: !1
|
|
1798
1798
|
};
|
|
1799
|
-
|
|
1799
|
+
H(t, i), q(t, i, r), i.preventDefault && !i.defaultPrevented && e.cancelEvent(n), i.stopPropagation && e.stopEvent(n);
|
|
1800
1800
|
}
|
|
1801
|
-
function
|
|
1801
|
+
function le(t, n) {
|
|
1802
1802
|
var r = {
|
|
1803
1803
|
id: n.pointerId,
|
|
1804
1804
|
type: f(n)
|
|
@@ -1808,16 +1808,16 @@ var be = p([
|
|
|
1808
1808
|
pointerType: r.type,
|
|
1809
1809
|
isEmulated: !1
|
|
1810
1810
|
};
|
|
1811
|
-
|
|
1811
|
+
H(t, i), me(t, i, r), i.stopPropagation && e.stopEvent(n);
|
|
1812
1812
|
}
|
|
1813
|
-
function
|
|
1813
|
+
function B(e, t) {
|
|
1814
1814
|
return t.speed = 0, t.direction = 0, t.contactPos = t.currentPos, t.contactTime = t.currentTime, t.lastPos = t.currentPos, t.lastTime = t.currentTime, e.add(t);
|
|
1815
1815
|
}
|
|
1816
|
-
function
|
|
1816
|
+
function V(t, n, r) {
|
|
1817
1817
|
var i, a = n.getById(r.id);
|
|
1818
1818
|
return a ? (a.captured && (e.console.warn("stopTrackingPointer() called on captured pointer"), u(t, a)), n.removeContact(), i = n.removeById(r.id)) : i = n.getLength(), i;
|
|
1819
1819
|
}
|
|
1820
|
-
function
|
|
1820
|
+
function ue(e, t) {
|
|
1821
1821
|
switch (t.eventType) {
|
|
1822
1822
|
case "pointermove":
|
|
1823
1823
|
t.isStoppable = !0, t.isCancelable = !0, t.preventDefault = !1, t.preventGesture = !e.hasGestureHandlers, t.stopPropagation = !1;
|
|
@@ -1853,16 +1853,16 @@ var be = p([
|
|
|
1853
1853
|
default: t.isStoppable = !1, t.isCancelable = !1, t.preventDefault = !1, t.preventGesture = !1, t.stopPropagation = !1;
|
|
1854
1854
|
}
|
|
1855
1855
|
}
|
|
1856
|
-
function
|
|
1857
|
-
n.eventSource = t, n.eventPhase = n.originalEvent ? n.originalEvent.eventPhase === void 0 ? 0 : n.originalEvent.eventPhase : 0, n.defaultPrevented = e.eventIsCanceled(n.originalEvent), n.shouldCapture = !1, n.shouldReleaseCapture = !1, n.userData = t.userData,
|
|
1856
|
+
function H(t, n) {
|
|
1857
|
+
n.eventSource = t, n.eventPhase = n.originalEvent ? n.originalEvent.eventPhase === void 0 ? 0 : n.originalEvent.eventPhase : 0, n.defaultPrevented = e.eventIsCanceled(n.originalEvent), n.shouldCapture = !1, n.shouldReleaseCapture = !1, n.userData = t.userData, ue(t, n), t.preProcessEventHandler && t.preProcessEventHandler(n);
|
|
1858
1858
|
}
|
|
1859
|
-
function
|
|
1859
|
+
function U(t, n, r) {
|
|
1860
1860
|
var i = t.getActivePointersListByType(n.type), a = i.getById(n.id);
|
|
1861
1861
|
a ? r && !a.captured ? (a.captured = !0, i.captureCount++) : !r && a.captured && (a.captured = !1, i.captureCount--, i.captureCount < 0 && (i.captureCount = 0, e.console.warn("updatePointerCaptured() - pointsList.captureCount went negative"))) : e.console.warn("updatePointerCaptured() called on untracked pointer");
|
|
1862
1862
|
}
|
|
1863
|
-
function
|
|
1863
|
+
function de(e, t, n) {
|
|
1864
1864
|
var r = e.getActivePointersListByType(n.type), i = r.getById(n.id);
|
|
1865
|
-
i ? (i.insideElement = !0, i.lastPos = i.currentPos, i.lastTime = i.currentTime, i.currentPos = n.currentPos, i.currentTime = n.currentTime, n = i) : (n.captured = !1, n.insideElementPressed = !1, n.insideElement = !0,
|
|
1865
|
+
i ? (i.insideElement = !0, i.lastPos = i.currentPos, i.lastTime = i.currentTime, i.currentPos = n.currentPos, i.currentTime = n.currentTime, n = i) : (n.captured = !1, n.insideElementPressed = !1, n.insideElement = !0, B(r, n)), e.enterHandler && e.enterHandler({
|
|
1866
1866
|
eventSource: e,
|
|
1867
1867
|
pointerType: n.type,
|
|
1868
1868
|
position: g(n.currentPos, e.element),
|
|
@@ -1875,9 +1875,9 @@ var be = p([
|
|
|
1875
1875
|
userData: e.userData
|
|
1876
1876
|
});
|
|
1877
1877
|
}
|
|
1878
|
-
function
|
|
1878
|
+
function fe(e, t, n) {
|
|
1879
1879
|
var r = e.getActivePointersListByType(n.type), i = r.getById(n.id), a;
|
|
1880
|
-
i ? (i.captured ? (i.insideElement = !1, i.lastPos = i.currentPos, i.lastTime = i.currentTime, i.currentPos = n.currentPos, i.currentTime = n.currentTime) :
|
|
1880
|
+
i ? (i.captured ? (i.insideElement = !1, i.lastPos = i.currentPos, i.lastTime = i.currentTime, i.currentPos = n.currentPos, i.currentTime = n.currentTime) : V(e, r, i), n = i) : (n.captured = !1, n.insideElementPressed = !1), (e.leaveHandler || e.exitHandler) && (a = {
|
|
1881
1881
|
eventSource: e,
|
|
1882
1882
|
pointerType: n.type,
|
|
1883
1883
|
position: n.currentPos && g(n.currentPos, e.element),
|
|
@@ -1890,7 +1890,7 @@ var be = p([
|
|
|
1890
1890
|
userData: e.userData
|
|
1891
1891
|
}, e.leaveHandler && e.leaveHandler(a), e.exitHandler && e.exitHandler(a));
|
|
1892
1892
|
}
|
|
1893
|
-
function
|
|
1893
|
+
function W(e, t, n) {
|
|
1894
1894
|
var r = e.getActivePointersListByType(n.type), i = r.getById(n.id);
|
|
1895
1895
|
i ? n = i : (n.captured = !1, n.insideElementPressed = !1), e.overHandler && e.overHandler({
|
|
1896
1896
|
eventSource: e,
|
|
@@ -1905,7 +1905,7 @@ var be = p([
|
|
|
1905
1905
|
userData: e.userData
|
|
1906
1906
|
});
|
|
1907
1907
|
}
|
|
1908
|
-
function
|
|
1908
|
+
function G(e, t, n) {
|
|
1909
1909
|
var r = e.getActivePointersListByType(n.type), i = r.getById(n.id);
|
|
1910
1910
|
i ? n = i : (n.captured = !1, n.insideElementPressed = !1), e.outHandler && e.outHandler({
|
|
1911
1911
|
eventSource: e,
|
|
@@ -1920,7 +1920,7 @@ var be = p([
|
|
|
1920
1920
|
userData: e.userData
|
|
1921
1921
|
});
|
|
1922
1922
|
}
|
|
1923
|
-
function
|
|
1923
|
+
function K(t, r, i, a) {
|
|
1924
1924
|
var o = n[t.hash], s = t.getActivePointersListByType(i.type), c;
|
|
1925
1925
|
if (r.originalEvent.buttons === void 0 ? a === 0 ? s.buttons |= 1 : a === 1 ? s.buttons |= 4 : a === 2 ? s.buttons |= 2 : a === 3 ? s.buttons |= 8 : a === 4 ? s.buttons |= 16 : a === 5 && (s.buttons |= 32) : s.buttons = r.originalEvent.buttons, a !== 0) {
|
|
1926
1926
|
r.shouldCapture = !1, r.shouldReleaseCapture = !1, t.nonPrimaryPressHandler && !r.preventGesture && !r.defaultPrevented && (r.preventDefault = !0, t.nonPrimaryPressHandler({
|
|
@@ -1935,7 +1935,7 @@ var be = p([
|
|
|
1935
1935
|
}));
|
|
1936
1936
|
return;
|
|
1937
1937
|
}
|
|
1938
|
-
c = s.getById(i.id), c ? (c.insideElementPressed = !0, c.insideElement = !0, c.originalTarget = r.originalEvent.target, c.contactPos = i.currentPos, c.contactTime = i.currentTime, c.lastPos = c.currentPos, c.lastTime = c.currentTime, c.currentPos = i.currentPos, c.currentTime = i.currentTime, i = c) : (i.captured = !1, i.insideElementPressed = !0, i.insideElement = !0, i.originalTarget = r.originalEvent.target,
|
|
1938
|
+
c = s.getById(i.id), c ? (c.insideElementPressed = !0, c.insideElement = !0, c.originalTarget = r.originalEvent.target, c.contactPos = i.currentPos, c.contactTime = i.currentTime, c.lastPos = c.currentPos, c.lastTime = c.currentTime, c.currentPos = i.currentPos, c.currentTime = i.currentTime, i = c) : (i.captured = !1, i.insideElementPressed = !0, i.insideElement = !0, i.originalTarget = r.originalEvent.target, B(s, i)), s.addContact(), !r.preventGesture && !r.defaultPrevented ? (r.shouldCapture = !0, r.shouldReleaseCapture = !1, r.preventDefault = !0, (t.dragHandler || t.dragEndHandler || t.pinchHandler) && e.MouseTracker.gesturePointVelocityTracker.addPoint(t, i), s.contacts === 1 ? t.pressHandler && !r.preventGesture && t.pressHandler({
|
|
1939
1939
|
eventSource: t,
|
|
1940
1940
|
pointerType: i.type,
|
|
1941
1941
|
position: g(i.contactPos, t.element),
|
|
@@ -1945,7 +1945,7 @@ var be = p([
|
|
|
1945
1945
|
userData: t.userData
|
|
1946
1946
|
}) : s.contacts === 2 && t.pinchHandler && i.type === "touch" && (o.pinchGPoints = s.asArray(), o.lastPinchDist = o.currentPinchDist = o.pinchGPoints[0].currentPos.distanceTo(o.pinchGPoints[1].currentPos), o.lastPinchCenter = o.currentPinchCenter = _(o.pinchGPoints[0].currentPos, o.pinchGPoints[1].currentPos))) : (r.shouldCapture = !1, r.shouldReleaseCapture = !1);
|
|
1947
1947
|
}
|
|
1948
|
-
function
|
|
1948
|
+
function pe(t, r, i, a) {
|
|
1949
1949
|
var o = n[t.hash], s = t.getActivePointersListByType(i.type), c, l, u, d = !1, f;
|
|
1950
1950
|
if (r.originalEvent.buttons === void 0 ? a === 0 ? s.buttons ^= -2 : a === 1 ? s.buttons ^= -5 : a === 2 ? s.buttons ^= -3 : a === 3 ? s.buttons ^= -9 : a === 4 ? s.buttons ^= -17 : a === 5 && (s.buttons ^= -33) : s.buttons = r.originalEvent.buttons, r.shouldCapture = !1, a !== 0) {
|
|
1951
1951
|
r.shouldReleaseCapture = !1, t.nonPrimaryReleaseHandler && !r.preventGesture && !r.defaultPrevented && (r.preventDefault = !0, t.nonPrimaryReleaseHandler({
|
|
@@ -1960,7 +1960,7 @@ var be = p([
|
|
|
1960
1960
|
}));
|
|
1961
1961
|
return;
|
|
1962
1962
|
}
|
|
1963
|
-
u = s.getById(i.id), u ? (s.removeContact(), u.captured && (d = !0), u.lastPos = u.currentPos, u.lastTime = u.currentTime, u.currentPos = i.currentPos, u.currentTime = i.currentTime, u.insideElement ||
|
|
1963
|
+
u = s.getById(i.id), u ? (s.removeContact(), u.captured && (d = !0), u.lastPos = u.currentPos, u.lastTime = u.currentTime, u.currentPos = i.currentPos, u.currentTime = i.currentTime, u.insideElement || V(t, s, u), c = u.currentPos, l = u.currentTime) : (i.captured = !1, i.insideElementPressed = !1, i.insideElement = !0, B(s, i), u = i), !r.preventGesture && !r.defaultPrevented && (d ? (r.shouldReleaseCapture = !0, r.preventDefault = !0, (t.dragHandler || t.dragEndHandler || t.pinchHandler) && e.MouseTracker.gesturePointVelocityTracker.removePoint(t, u), s.contacts === 0 ? (t.releaseHandler && c && t.releaseHandler({
|
|
1964
1964
|
eventSource: t,
|
|
1965
1965
|
pointerType: u.type,
|
|
1966
1966
|
position: g(c, t.element),
|
|
@@ -2012,12 +2012,12 @@ var be = p([
|
|
|
2012
2012
|
userData: t.userData
|
|
2013
2013
|
}), r.preventDefault = !0)));
|
|
2014
2014
|
}
|
|
2015
|
-
function
|
|
2015
|
+
function q(e, t, r) {
|
|
2016
2016
|
var i = n[e.hash], a = e.getActivePointersListByType(r.type), o, s, c;
|
|
2017
2017
|
if (t.originalEvent.buttons !== void 0 && (a.buttons = t.originalEvent.buttons), o = a.getById(r.id), o) o.lastPos = o.currentPos, o.lastTime = o.currentTime, o.currentPos = r.currentPos, o.currentTime = r.currentTime;
|
|
2018
2018
|
else return;
|
|
2019
2019
|
t.shouldCapture = !1, t.shouldReleaseCapture = !1, e.stopHandler && r.type === "mouse" && (clearTimeout(e.stopTimeOut), e.stopTimeOut = setTimeout(function() {
|
|
2020
|
-
|
|
2020
|
+
J(e, t.originalEvent, r.type);
|
|
2021
2021
|
}, e.stopDelay)), a.contacts === 0 ? e.moveHandler && e.moveHandler({
|
|
2022
2022
|
eventSource: e,
|
|
2023
2023
|
pointerType: r.type,
|
|
@@ -2067,11 +2067,11 @@ var be = p([
|
|
|
2067
2067
|
userData: e.userData
|
|
2068
2068
|
}), t.preventDefault = !0)));
|
|
2069
2069
|
}
|
|
2070
|
-
function
|
|
2070
|
+
function me(e, t, n) {
|
|
2071
2071
|
var r = e.getActivePointersListByType(n.type), i = r.getById(n.id);
|
|
2072
|
-
i &&
|
|
2072
|
+
i && V(e, r, i);
|
|
2073
2073
|
}
|
|
2074
|
-
function
|
|
2074
|
+
function J(e, t, n) {
|
|
2075
2075
|
e.stopHandler && e.stopHandler({
|
|
2076
2076
|
eventSource: e,
|
|
2077
2077
|
pointerType: n,
|
|
@@ -2339,8 +2339,8 @@ var be = p([
|
|
|
2339
2339
|
nonPrimaryReleaseHandler: e.delegate(this, E),
|
|
2340
2340
|
scrollHandler: e.delegate(this, ne),
|
|
2341
2341
|
pinchHandler: e.delegate(this, D),
|
|
2342
|
-
focusHandler: e.delegate(this,
|
|
2343
|
-
blurHandler: e.delegate(this,
|
|
2342
|
+
focusHandler: e.delegate(this, te),
|
|
2343
|
+
blurHandler: e.delegate(this, O)
|
|
2344
2344
|
}), this.outerTracker = new e.MouseTracker({
|
|
2345
2345
|
userData: "Viewer.outerTracker",
|
|
2346
2346
|
element: this.container,
|
|
@@ -2752,7 +2752,7 @@ var be = p([
|
|
|
2752
2752
|
}), this.pagingControl = this.paging.element, this.toolbar ? this.toolbar.addControl(this.pagingControl, { anchor: e.ControlAnchor.BOTTOM_RIGHT }) : this.addControl(this.pagingControl, { anchor: this.sequenceControlAnchor || e.ControlAnchor.TOP_LEFT }))), this;
|
|
2753
2753
|
},
|
|
2754
2754
|
bindStandardControls: function() {
|
|
2755
|
-
var t = e.delegate(this, N), n = e.delegate(this,
|
|
2755
|
+
var t = e.delegate(this, N), n = e.delegate(this, P), r = e.delegate(this, se), i = e.delegate(this, oe), a = e.delegate(this, L), o = e.delegate(this, ce), s = e.delegate(this, z), c = e.delegate(this, le), l = e.delegate(this, B), u = e.delegate(this, V), d = e.delegate(this, p), f = e.delegate(this, m), h = this.navImages, g = [], _ = !0;
|
|
2756
2756
|
return this.showNavigationControl && ((this.zoomInButton || this.zoomOutButton || this.homeButton || this.fullPageButton || this.rotateLeftButton || this.rotateRightButton || this.flipButton) && (_ = !1), this.showZoomControl && (g.push(this.zoomInButton = new e.Button({
|
|
2757
2757
|
element: this.zoomInButton ? e.getElement(this.zoomInButton) : null,
|
|
2758
2758
|
clickTimeThreshold: this.clickTimeThreshold,
|
|
@@ -3312,13 +3312,13 @@ var be = p([
|
|
|
3312
3312
|
n = this.viewport.pointFromPixel(e.center, !0), this.viewport.rotateTo(this.viewport.getRotation(!0) + (o - s) * (180 / Math.PI), n, !0);
|
|
3313
3313
|
}
|
|
3314
3314
|
}
|
|
3315
|
-
function
|
|
3315
|
+
function te(e) {
|
|
3316
3316
|
this.raiseEvent("canvas-focus", {
|
|
3317
3317
|
tracker: e.eventSource,
|
|
3318
3318
|
originalEvent: e.originalEvent
|
|
3319
3319
|
});
|
|
3320
3320
|
}
|
|
3321
|
-
function
|
|
3321
|
+
function O(e) {
|
|
3322
3322
|
this.raiseEvent("canvas-blur", {
|
|
3323
3323
|
tracker: e.eventSource,
|
|
3324
3324
|
originalEvent: e.originalEvent
|
|
@@ -3400,20 +3400,20 @@ var be = p([
|
|
|
3400
3400
|
return e ? e + t : t;
|
|
3401
3401
|
}
|
|
3402
3402
|
function N() {
|
|
3403
|
-
t[this.hash].lastZoomTime = e.now(), t[this.hash].zoomFactor = this.zoomPerSecond, t[this.hash].zooming = !0,
|
|
3403
|
+
t[this.hash].lastZoomTime = e.now(), t[this.hash].zoomFactor = this.zoomPerSecond, t[this.hash].zooming = !0, F(this);
|
|
3404
3404
|
}
|
|
3405
|
-
function
|
|
3406
|
-
t[this.hash].lastZoomTime = e.now(), t[this.hash].zoomFactor = 1 / this.zoomPerSecond, t[this.hash].zooming = !0,
|
|
3405
|
+
function oe() {
|
|
3406
|
+
t[this.hash].lastZoomTime = e.now(), t[this.hash].zoomFactor = 1 / this.zoomPerSecond, t[this.hash].zooming = !0, F(this);
|
|
3407
3407
|
}
|
|
3408
|
-
function
|
|
3408
|
+
function P() {
|
|
3409
3409
|
t[this.hash].zooming = !1;
|
|
3410
3410
|
}
|
|
3411
|
-
function
|
|
3412
|
-
e.requestAnimationFrame(e.delegate(t,
|
|
3411
|
+
function F(t) {
|
|
3412
|
+
e.requestAnimationFrame(e.delegate(t, I));
|
|
3413
3413
|
}
|
|
3414
|
-
function
|
|
3414
|
+
function I() {
|
|
3415
3415
|
var n, r, i;
|
|
3416
|
-
t[this.hash].zooming && this.viewport && (n = e.now(), r = n - t[this.hash].lastZoomTime, i = t[this.hash].zoomFactor ** (r / 1e3), this.viewport.zoomBy(i), this.viewport.applyConstraints(), t[this.hash].lastZoomTime = n,
|
|
3416
|
+
t[this.hash].zooming && this.viewport && (n = e.now(), r = n - t[this.hash].lastZoomTime, i = t[this.hash].zoomFactor ** (r / 1e3), this.viewport.zoomBy(i), this.viewport.applyConstraints(), t[this.hash].lastZoomTime = n, F(this));
|
|
3417
3417
|
}
|
|
3418
3418
|
function se() {
|
|
3419
3419
|
this.viewport && (t[this.hash].zooming = !1, this.viewport.zoomBy(this.zoomPerClick / 1), this.viewport.applyConstraints());
|
|
@@ -3424,25 +3424,25 @@ var be = p([
|
|
|
3424
3424
|
function R() {
|
|
3425
3425
|
this.buttonGroup && (this.buttonGroup.emulateEnter(), this.buttonGroup.emulateLeave());
|
|
3426
3426
|
}
|
|
3427
|
-
function
|
|
3427
|
+
function ce() {
|
|
3428
3428
|
this.viewport && this.viewport.goHome();
|
|
3429
3429
|
}
|
|
3430
|
-
function
|
|
3430
|
+
function z() {
|
|
3431
3431
|
this.isFullPage() && !e.isFullScreen() ? this.setFullPage(!1) : this.setFullScreen(!this.isFullPage()), this.buttonGroup && this.buttonGroup.emulateLeave(), this.fullPageButton.element.focus(), this.viewport && this.viewport.applyConstraints();
|
|
3432
3432
|
}
|
|
3433
|
-
function
|
|
3433
|
+
function le() {
|
|
3434
3434
|
if (this.viewport) {
|
|
3435
3435
|
var e = this.viewport.getRotation();
|
|
3436
3436
|
this.viewport.flipped ? e += this.rotationIncrement : e -= this.rotationIncrement, this.viewport.setRotation(e);
|
|
3437
3437
|
}
|
|
3438
3438
|
}
|
|
3439
|
-
function
|
|
3439
|
+
function B() {
|
|
3440
3440
|
if (this.viewport) {
|
|
3441
3441
|
var e = this.viewport.getRotation();
|
|
3442
3442
|
this.viewport.flipped ? e -= this.rotationIncrement : e += this.rotationIncrement, this.viewport.setRotation(e);
|
|
3443
3443
|
}
|
|
3444
3444
|
}
|
|
3445
|
-
function
|
|
3445
|
+
function V() {
|
|
3446
3446
|
this.viewport.toggleFlip();
|
|
3447
3447
|
}
|
|
3448
3448
|
e.determineDrawer = function(t) {
|
|
@@ -7222,7 +7222,7 @@ var be = p([
|
|
|
7222
7222
|
}
|
|
7223
7223
|
});
|
|
7224
7224
|
})(n);
|
|
7225
|
-
})),
|
|
7225
|
+
})), X = /* @__PURE__ */ u(s(), 1), Pe = /* @__PURE__ */ u(x(), 1), Fe = /* @__PURE__ */ u(V(), 1), Ie = /* @__PURE__ */ u(Ce(), 1), Le = /* @__PURE__ */ u(Ae(), 1), Re = /* @__PURE__ */ u(Me(), 1), Z = /* @__PURE__ */ u(Ne(), 1), ze = class {
|
|
7226
7226
|
constructor(e, t) {
|
|
7227
7227
|
this.viewer = e, this.ref = t, this.containerWidth = 0, this.containerHeight = 0, this.imgAspectRatio = 1;
|
|
7228
7228
|
}
|
|
@@ -7239,7 +7239,7 @@ var be = p([
|
|
|
7239
7239
|
this.context2d && this.context2d.clearRect(0, 0, this.containerWidth, this.containerHeight);
|
|
7240
7240
|
}
|
|
7241
7241
|
resize() {
|
|
7242
|
-
this.containerWidth !== this.viewer.container.clientWidth && (this.containerWidth = this.viewer.container.clientWidth, this.canvasDiv.setAttribute("width", this.containerWidth), this.canvas.setAttribute("width", this.containerWidth)), this.containerHeight !== this.viewer.container.clientHeight && (this.containerHeight = this.viewer.container.clientHeight, this.canvasDiv.setAttribute("height", this.containerHeight), this.canvas.setAttribute("height", this.containerHeight)), this.viewportOrigin = new
|
|
7242
|
+
this.containerWidth !== this.viewer.container.clientWidth && (this.containerWidth = this.viewer.container.clientWidth, this.canvasDiv.setAttribute("width", this.containerWidth), this.canvas.setAttribute("width", this.containerWidth)), this.containerHeight !== this.viewer.container.clientHeight && (this.containerHeight = this.viewer.container.clientHeight, this.canvasDiv.setAttribute("height", this.containerHeight), this.canvas.setAttribute("height", this.containerHeight)), this.viewportOrigin = new Z.default.Point(0, 0);
|
|
7243
7243
|
let e = this.viewer.viewport.getBoundsNoRotateWithMargins(!0);
|
|
7244
7244
|
this.viewportOrigin.x = e.x, this.viewportOrigin.y = e.y * this.imgAspectRatio, this.viewportWidth = e.width, this.viewportHeight = e.height * this.imgAspectRatio;
|
|
7245
7245
|
let t = this.viewer.world.getItemAt(0);
|
|
@@ -7259,13 +7259,13 @@ var be = p([
|
|
|
7259
7259
|
};
|
|
7260
7260
|
//#endregion
|
|
7261
7261
|
//#region src/lib/svgShapesToPath.js
|
|
7262
|
-
function
|
|
7262
|
+
function Be(e) {
|
|
7263
7263
|
let t = e.tagName.toLowerCase(), n = (t) => parseFloat(e.getAttribute(t)) || 0;
|
|
7264
7264
|
if (t === "path") return new Path2D(e.getAttribute("d"));
|
|
7265
7265
|
let r = new Path2D();
|
|
7266
|
-
return
|
|
7266
|
+
return Ve[t]?.(r, e, n), r;
|
|
7267
7267
|
}
|
|
7268
|
-
var
|
|
7268
|
+
var Ve = {
|
|
7269
7269
|
circle: (e, t, n) => {
|
|
7270
7270
|
e.arc(n("cx"), n("cy"), n("r"), 0, 2 * Math.PI);
|
|
7271
7271
|
},
|
|
@@ -7278,40 +7278,40 @@ var Re = {
|
|
|
7278
7278
|
line: (e, t, n) => {
|
|
7279
7279
|
e.moveTo(n("x1"), n("y1")), e.lineTo(n("x2"), n("y2"));
|
|
7280
7280
|
},
|
|
7281
|
-
polygon: (e, t) =>
|
|
7282
|
-
polyline: (e, t) =>
|
|
7281
|
+
polygon: (e, t) => He(e, t, !0),
|
|
7282
|
+
polyline: (e, t) => He(e, t, !1)
|
|
7283
7283
|
};
|
|
7284
|
-
function
|
|
7285
|
-
|
|
7284
|
+
function He(e, t, n) {
|
|
7285
|
+
Ue(t.getAttribute("points")).forEach(([t, n], r) => {
|
|
7286
7286
|
r === 0 ? e.moveTo(t, n) : e.lineTo(t, n);
|
|
7287
7287
|
}), n && e.closePath();
|
|
7288
7288
|
}
|
|
7289
|
-
function
|
|
7289
|
+
function Ue(e) {
|
|
7290
7290
|
let t = e.trim().split(/[\s,]+/).map(Number), n = [];
|
|
7291
7291
|
for (let e = 0; e < t.length - 1; e += 2) n.push([t[e], t[e + 1]]);
|
|
7292
7292
|
return n;
|
|
7293
7293
|
}
|
|
7294
7294
|
//#endregion
|
|
7295
7295
|
//#region src/lib/CanvasAnnotationDisplay.js
|
|
7296
|
-
var
|
|
7296
|
+
var We = "M50.002 0C30.763 0 15 15.718 15 34.902c0 7.432 2.374 14.34 6.392 20.019L45.73 96.994c3.409 4.453 5.675 3.607 8.51-.235l26.843-45.683c.542-.981.967-2.026 1.338-3.092A34.446 34.446 0 0 0 85 34.902C85 15.718 69.24 0 50.002 0zm0 16.354c10.359 0 18.597 8.218 18.597 18.548c0 10.33-8.238 18.544-18.597 18.544c-10.36 0-18.601-8.215-18.601-18.544c0-10.33 8.241-18.548 18.6-18.548z", Ge = 100, Q = {
|
|
7297
7297
|
x: 50,
|
|
7298
7298
|
y: 100
|
|
7299
7299
|
}, $ = {
|
|
7300
7300
|
x: 50,
|
|
7301
7301
|
y: 34.9,
|
|
7302
7302
|
radius: 18.6
|
|
7303
|
-
},
|
|
7304
|
-
function
|
|
7305
|
-
let r = 44 / n /
|
|
7303
|
+
}, Ke = 1.6, qe = "#1e88e5", Je = 1.3, Ye = "#212121";
|
|
7304
|
+
function Xe(e, t, n) {
|
|
7305
|
+
let r = 44 / n / Ge;
|
|
7306
7306
|
return {
|
|
7307
7307
|
radius: 32 / n,
|
|
7308
|
-
x: e + ($.x -
|
|
7309
|
-
y: t + ($.y -
|
|
7308
|
+
x: e + ($.x - Q.x) * r,
|
|
7309
|
+
y: t + ($.y - Q.y) * r
|
|
7310
7310
|
};
|
|
7311
7311
|
}
|
|
7312
|
-
var
|
|
7313
|
-
constructor({ resource: e, palette: t, zoomRatio: n, offset: r, selected: i, hovered: a }) {
|
|
7314
|
-
this.resource = e, this.palette = t, this.zoomRatio = n, this.offset = r, this.selected = i, this.hovered = a;
|
|
7312
|
+
var Ze = class {
|
|
7313
|
+
constructor({ resource: e, palette: t, zoomRatio: n, offset: r, selected: i, hovered: a, journeyStopNumber: o }) {
|
|
7314
|
+
this.resource = e, this.journeyStopNumber = o, this.palette = t, this.zoomRatio = n, this.offset = r, this.selected = i, this.hovered = a;
|
|
7315
7315
|
}
|
|
7316
7316
|
toContext(e) {
|
|
7317
7317
|
this.context = e, this.resource.svgSelector ? this.svgContext() : this.resource.pointSelector ? this.pointContext() : this.resource.fragmentSelector && this.fragmentContext();
|
|
@@ -7322,13 +7322,21 @@ var qe = class {
|
|
|
7322
7322
|
pointContext() {
|
|
7323
7323
|
let { x: e, y: t } = this.resource.pointSelector, n = this.currentPalette();
|
|
7324
7324
|
if (n.globalAlpha === 0) return;
|
|
7325
|
-
let r = 44 / this.zoomRatio /
|
|
7326
|
-
this.context.save(), this.context.translate(this.offset.x + e, this.offset.y + t), this.context.scale(
|
|
7327
|
-
let
|
|
7328
|
-
|
|
7325
|
+
let r = this.selected ? Je : 1, i = 44 * r / this.zoomRatio / Ge, a = new Path2D(We), o = this.poiFill();
|
|
7326
|
+
this.context.save(), this.context.translate(this.offset.x + e, this.offset.y + t), this.context.scale(i, i), this.context.translate(-Q.x, -Q.y), this.context.globalAlpha = n.globalAlpha ?? 1, this.context.fillStyle = o, this.context.fill(a), this.selected && (this.context.strokeStyle = Ye, this.context.lineWidth = 200 / (44 * r), this.context.stroke(a));
|
|
7327
|
+
let s = this.journeyStopNumberToDisplay();
|
|
7328
|
+
s != null && this.journeyOrderBadgeContext(s, o), this.context.restore();
|
|
7329
|
+
}
|
|
7330
|
+
poiFill() {
|
|
7331
|
+
return this.palette.default?.fillStyle || qe;
|
|
7329
7332
|
}
|
|
7330
|
-
|
|
7331
|
-
|
|
7333
|
+
journeyStopNumberToDisplay() {
|
|
7334
|
+
if (this.journeyStopNumber != null) return this.journeyStopNumber;
|
|
7335
|
+
let { journeyOrder: e } = this.resource;
|
|
7336
|
+
return e == null ? null : e + 1;
|
|
7337
|
+
}
|
|
7338
|
+
journeyOrderBadgeContext(e, t) {
|
|
7339
|
+
this.context.beginPath(), this.context.arc($.x, $.y, $.radius, 0, Math.PI * 2), this.context.fillStyle = "#ffffff", this.context.fill(), this.context.fillStyle = t, this.context.font = `bold ${$.radius * Ke}px sans-serif`, this.context.textAlign = "center", this.context.textBaseline = "middle", this.context.fillText(String(e), $.x, $.y);
|
|
7332
7340
|
}
|
|
7333
7341
|
get svgString() {
|
|
7334
7342
|
return this.resource.svgSelector.value;
|
|
@@ -7340,7 +7348,7 @@ var qe = class {
|
|
|
7340
7348
|
let e;
|
|
7341
7349
|
e = this.hovered ? this.palette.hovered : this.selected ? this.palette.selected : this.palette.default, e.globalAlpha !== 0 && [...this.svgPaths].forEach((t) => {
|
|
7342
7350
|
this.context.save(), this.context.translate(this.offset.x, this.offset.y);
|
|
7343
|
-
let n =
|
|
7351
|
+
let n = Be(t);
|
|
7344
7352
|
this.context.strokeStyle = this.color, t.getAttribute("stroke-dasharray") && this.context.setLineDash(t.getAttribute("stroke-dasharray").split(","));
|
|
7345
7353
|
let r = {
|
|
7346
7354
|
fill: "fillStyle",
|
|
@@ -7371,16 +7379,16 @@ var qe = class {
|
|
|
7371
7379
|
};
|
|
7372
7380
|
//#endregion
|
|
7373
7381
|
//#region src/components/AnnotationsOverlay.jsx
|
|
7374
|
-
function
|
|
7382
|
+
function Qe({ canvasWorld: e, osdCanvasOverlay: t, viewer: n }, r, i, a) {
|
|
7375
7383
|
let [o, s] = e.canvasToWorldCoordinates(i.id), c = a.x - o, l = a.y - s;
|
|
7376
7384
|
if (r.svgSelector) {
|
|
7377
|
-
let e = t.context2d, { svgPaths: n } = new
|
|
7378
|
-
return [...n].some((t) => e.isPointInPath(
|
|
7385
|
+
let e = t.context2d, { svgPaths: n } = new Ze({ resource: r });
|
|
7386
|
+
return [...n].some((t) => e.isPointInPath(Be(t), c, l));
|
|
7379
7387
|
}
|
|
7380
7388
|
if (r.pointSelector) {
|
|
7381
7389
|
let { x: t, y: a } = r.pointSelector, o = e.canvases.findIndex((e) => e.id === i.id), s = n.world.getItemAt(o);
|
|
7382
7390
|
if (!s) return !1;
|
|
7383
|
-
let u =
|
|
7391
|
+
let u = Xe(t, a, s.viewportToImageZoom(n.viewport.getZoom(!0))), d = c - u.x, f = l - u.y;
|
|
7384
7392
|
return d * d + f * f <= u.radius * u.radius;
|
|
7385
7393
|
}
|
|
7386
7394
|
if (r.fragmentSelector) {
|
|
@@ -7389,28 +7397,39 @@ function Je({ canvasWorld: e, osdCanvasOverlay: t, viewer: n }, r, i, a) {
|
|
|
7389
7397
|
}
|
|
7390
7398
|
return !1;
|
|
7391
7399
|
}
|
|
7392
|
-
function
|
|
7400
|
+
function $e(e) {
|
|
7393
7401
|
let t = e.originalEvent?.pointerType;
|
|
7394
7402
|
return (t === "touch" || t === "pen") && e.quick === !1;
|
|
7395
7403
|
}
|
|
7396
|
-
function
|
|
7397
|
-
let
|
|
7404
|
+
function et(e) {
|
|
7405
|
+
let t = /* @__PURE__ */ new Map();
|
|
7406
|
+
return Object.values((0, Pe.default)(e.filter((e) => e.journeyId != null), (e) => e.journeyId)).forEach((e) => {
|
|
7407
|
+
(0, Le.default)(e, (e) => e.journeyOrder).forEach((e, n) => t.set(e.id, n + 1));
|
|
7408
|
+
}), t;
|
|
7409
|
+
}
|
|
7410
|
+
function tt({ annotations: e = [], canvasWorld: t, deselectAnnotation: n = () => {}, drawAnnotations: r = !0, drawSearchAnnotations: i = !0, highlightAllAnnotations: a = !1, hoverAnnotation: o = () => {}, hoveredAnnotationIds: s = [], palette: c = {}, searchAnnotations: l = [], selectAnnotation: u = () => {}, selectedAnnotationId: d = null, viewer: f = null, windowId: p }) {
|
|
7411
|
+
let m = J(), h = q(() => new ze(f, m), [m, f]), g = W((e) => {
|
|
7398
7412
|
d === e ? n(p, e) : u(p, e);
|
|
7399
7413
|
}, [
|
|
7400
7414
|
d,
|
|
7401
7415
|
n,
|
|
7402
7416
|
u,
|
|
7403
7417
|
p
|
|
7404
|
-
]), _ =
|
|
7405
|
-
let r = h.context2d, i = e.flatMap((e) => e.resources), [o, c] = (0,
|
|
7406
|
-
[
|
|
7418
|
+
]), _ = W((e, n) => {
|
|
7419
|
+
let r = h.context2d, i = e.flatMap((e) => e.resources), [o, c] = (0, Ie.default)(i, (e) => !e.pointSelector), [l, u] = (0, Ie.default)(c, (e) => e.id !== d), p = et(c);
|
|
7420
|
+
[
|
|
7421
|
+
...o,
|
|
7422
|
+
...l,
|
|
7423
|
+
...u
|
|
7424
|
+
].forEach((e) => {
|
|
7407
7425
|
let i = t.canvases.findIndex((t) => t.id === e.targetId);
|
|
7408
7426
|
if (i === -1) return;
|
|
7409
7427
|
let o = f.world.getItemAt(i);
|
|
7410
7428
|
if (!o) return;
|
|
7411
7429
|
let c = t.offsetByCanvas(e.targetId), l = o.viewportToImageZoom(f.viewport.getZoom(!0));
|
|
7412
|
-
new
|
|
7430
|
+
new Ze({
|
|
7413
7431
|
hovered: s.includes(e.id),
|
|
7432
|
+
journeyStopNumber: p.get(e.id),
|
|
7414
7433
|
offset: c,
|
|
7415
7434
|
palette: {
|
|
7416
7435
|
...n,
|
|
@@ -7431,7 +7450,7 @@ function Xe({ annotations: e = [], canvasWorld: t, deselectAnnotation: n = () =>
|
|
|
7431
7450
|
a,
|
|
7432
7451
|
s,
|
|
7433
7452
|
d
|
|
7434
|
-
]), v =
|
|
7453
|
+
]), v = W(() => {
|
|
7435
7454
|
i && _(l, c.search), r && _(e, c.annotations);
|
|
7436
7455
|
}, [
|
|
7437
7456
|
e,
|
|
@@ -7440,9 +7459,9 @@ function Xe({ annotations: e = [], canvasWorld: t, deselectAnnotation: n = () =>
|
|
|
7440
7459
|
i,
|
|
7441
7460
|
c,
|
|
7442
7461
|
l
|
|
7443
|
-
]), y =
|
|
7462
|
+
]), y = W(() => {
|
|
7444
7463
|
h && (h.clear(), h.resize(), h.canvasUpdate(v));
|
|
7445
|
-
}, [h, v]), b =
|
|
7464
|
+
}, [h, v]), b = W((n, r) => [...e, ...l].flatMap((e) => e.resources).filter((e) => n.id === e.targetId && Qe({
|
|
7446
7465
|
canvasWorld: t,
|
|
7447
7466
|
osdCanvasOverlay: h,
|
|
7448
7467
|
viewer: f
|
|
@@ -7452,20 +7471,22 @@ function Xe({ annotations: e = [], canvasWorld: t, deselectAnnotation: n = () =>
|
|
|
7452
7471
|
h,
|
|
7453
7472
|
l,
|
|
7454
7473
|
f
|
|
7455
|
-
]), x =
|
|
7456
|
-
if (
|
|
7474
|
+
]), x = W((e) => {
|
|
7475
|
+
if ($e(e)) return;
|
|
7457
7476
|
let { position: n, eventSource: { viewport: r } } = e, i = r.pointFromPixel(n), a = t.canvasAtPoint(i);
|
|
7458
7477
|
if (!a) return;
|
|
7459
7478
|
let [o, s, c, l] = t.canvasToWorldCoordinates(a.id), u = b(a, i);
|
|
7460
|
-
|
|
7461
|
-
|
|
7479
|
+
u.length > 0 && (e.preventDefaultAction = !0);
|
|
7480
|
+
let d = u.filter((e) => e.pointSelector), p = d.length > 0 ? d : u;
|
|
7481
|
+
if (p.length === 1) g(p[0].id);
|
|
7482
|
+
else if (p.length > 0) {
|
|
7462
7483
|
let e = (e) => {
|
|
7463
7484
|
let n = Math.PI / 180;
|
|
7464
7485
|
return (r) => {
|
|
7465
7486
|
let o = 0;
|
|
7466
7487
|
for (let s = 0; s < 360; s += 1) {
|
|
7467
7488
|
let c = Math.cos(s * n) * e + i.x, l = Math.sin(s * n) * e + i.y;
|
|
7468
|
-
|
|
7489
|
+
Qe({
|
|
7469
7490
|
canvasWorld: t,
|
|
7470
7491
|
osdCanvasOverlay: h,
|
|
7471
7492
|
viewer: f
|
|
@@ -7479,8 +7500,8 @@ function Xe({ annotations: e = [], canvasWorld: t, deselectAnnotation: n = () =>
|
|
|
7479
7500
|
score: o
|
|
7480
7501
|
};
|
|
7481
7502
|
};
|
|
7482
|
-
}, n = 1, r = (0,
|
|
7483
|
-
for (; n < Math.max(c, l) && r[0].score === r[1].score;) n *= 2, r = (0,
|
|
7503
|
+
}, n = 1, r = (0, Le.default)(p.map(e(n)), "score");
|
|
7504
|
+
for (; n < Math.max(c, l) && r[0].score === r[1].score;) n *= 2, r = (0, Le.default)(p.map(e(n)), "score");
|
|
7484
7505
|
g(r[0].anno.id);
|
|
7485
7506
|
}
|
|
7486
7507
|
}, [
|
|
@@ -7489,7 +7510,7 @@ function Xe({ annotations: e = [], canvasWorld: t, deselectAnnotation: n = () =>
|
|
|
7489
7510
|
h,
|
|
7490
7511
|
g,
|
|
7491
7512
|
f
|
|
7492
|
-
]), S = z(
|
|
7513
|
+
]), S = z(W((n) => {
|
|
7493
7514
|
if (e.length === 0 && l.length === 0) return;
|
|
7494
7515
|
let { position: r } = n, i = f.viewport.pointFromPixel(r), a = t.canvasAtPoint(i);
|
|
7495
7516
|
if (!a) {
|
|
@@ -7497,7 +7518,7 @@ function Xe({ annotations: e = [], canvasWorld: t, deselectAnnotation: n = () =>
|
|
|
7497
7518
|
return;
|
|
7498
7519
|
}
|
|
7499
7520
|
let c = b(a, i);
|
|
7500
|
-
(0,
|
|
7521
|
+
(0, Re.default)(s, c.map((e) => e.id)).length > 0 && o(p, c.map((e) => e.id));
|
|
7501
7522
|
}, [
|
|
7502
7523
|
e,
|
|
7503
7524
|
b,
|
|
@@ -7507,16 +7528,16 @@ function Xe({ annotations: e = [], canvasWorld: t, deselectAnnotation: n = () =>
|
|
|
7507
7528
|
l,
|
|
7508
7529
|
f,
|
|
7509
7530
|
p
|
|
7510
|
-
]), 10), C =
|
|
7531
|
+
]), 10), C = W(() => {
|
|
7511
7532
|
S.cancel(), o(p, []);
|
|
7512
7533
|
}, [
|
|
7513
7534
|
o,
|
|
7514
7535
|
S,
|
|
7515
7536
|
p
|
|
7516
|
-
]), w =
|
|
7537
|
+
]), w = W(() => {
|
|
7517
7538
|
y();
|
|
7518
7539
|
}, [y]);
|
|
7519
|
-
return
|
|
7540
|
+
return K(() => {
|
|
7520
7541
|
if (f) return f.addHandler("canvas-click", x), f.addHandler("canvas-exit", C), f.addHandler("mouse-move", S), f.addHandler("update-viewport", w), () => {
|
|
7521
7542
|
f.removeHandler("canvas-click", x), f.removeHandler("canvas-exit", C), f.removeHandler("mouse-move", S), f.removeHandler("update-viewport", w);
|
|
7522
7543
|
};
|
|
@@ -7526,7 +7547,7 @@ function Xe({ annotations: e = [], canvasWorld: t, deselectAnnotation: n = () =>
|
|
|
7526
7547
|
S,
|
|
7527
7548
|
w,
|
|
7528
7549
|
f
|
|
7529
|
-
]),
|
|
7550
|
+
]), K(() => {
|
|
7530
7551
|
f && f.forceRedraw();
|
|
7531
7552
|
}, [
|
|
7532
7553
|
e,
|
|
@@ -7537,9 +7558,9 @@ function Xe({ annotations: e = [], canvasWorld: t, deselectAnnotation: n = () =>
|
|
|
7537
7558
|
l,
|
|
7538
7559
|
d,
|
|
7539
7560
|
f
|
|
7540
|
-
]),
|
|
7561
|
+
]), K(() => {
|
|
7541
7562
|
m.current && (s.length > 0 ? m.current.style.cursor = "pointer" : m.current.style.cursor = "");
|
|
7542
|
-
}, [s, m]), f ?
|
|
7563
|
+
}, [s, m]), f ? be.createPortal(/* @__PURE__ */ Y("div", {
|
|
7543
7564
|
ref: m,
|
|
7544
7565
|
style: {
|
|
7545
7566
|
height: "100%",
|
|
@@ -7548,28 +7569,28 @@ function Xe({ annotations: e = [], canvasWorld: t, deselectAnnotation: n = () =>
|
|
|
7548
7569
|
top: 0,
|
|
7549
7570
|
width: "100%"
|
|
7550
7571
|
},
|
|
7551
|
-
children: /* @__PURE__ */
|
|
7572
|
+
children: /* @__PURE__ */ Y("canvas", {})
|
|
7552
7573
|
}), f.canvas) : null;
|
|
7553
7574
|
}
|
|
7554
|
-
|
|
7555
|
-
annotations:
|
|
7556
|
-
canvasWorld:
|
|
7557
|
-
deselectAnnotation:
|
|
7558
|
-
drawAnnotations:
|
|
7559
|
-
drawSearchAnnotations:
|
|
7560
|
-
highlightAllAnnotations:
|
|
7561
|
-
hoverAnnotation:
|
|
7562
|
-
hoveredAnnotationIds:
|
|
7563
|
-
palette:
|
|
7564
|
-
searchAnnotations:
|
|
7565
|
-
selectAnnotation:
|
|
7566
|
-
selectedAnnotationId:
|
|
7567
|
-
viewer:
|
|
7568
|
-
windowId:
|
|
7575
|
+
tt.propTypes = {
|
|
7576
|
+
annotations: X.default.arrayOf(X.default.object),
|
|
7577
|
+
canvasWorld: X.default.instanceOf(R).isRequired,
|
|
7578
|
+
deselectAnnotation: X.default.func,
|
|
7579
|
+
drawAnnotations: X.default.bool,
|
|
7580
|
+
drawSearchAnnotations: X.default.bool,
|
|
7581
|
+
highlightAllAnnotations: X.default.bool,
|
|
7582
|
+
hoverAnnotation: X.default.func,
|
|
7583
|
+
hoveredAnnotationIds: X.default.arrayOf(X.default.string),
|
|
7584
|
+
palette: X.default.object,
|
|
7585
|
+
searchAnnotations: X.default.arrayOf(X.default.object),
|
|
7586
|
+
selectAnnotation: X.default.func,
|
|
7587
|
+
selectedAnnotationId: X.default.string,
|
|
7588
|
+
viewer: X.default.object,
|
|
7589
|
+
windowId: X.default.string.isRequired
|
|
7569
7590
|
};
|
|
7570
7591
|
//#endregion
|
|
7571
7592
|
//#region src/components/ImageFailureMessage.jsx
|
|
7572
|
-
var
|
|
7593
|
+
var nt = ve(xe)(({ theme: e }) => ({
|
|
7573
7594
|
position: "absolute",
|
|
7574
7595
|
top: e.spacing(2),
|
|
7575
7596
|
left: "50%",
|
|
@@ -7581,21 +7602,21 @@ var Ze = ge(ye)(({ theme: e }) => ({
|
|
|
7581
7602
|
zIndex: 1e3,
|
|
7582
7603
|
pointerEvents: "none"
|
|
7583
7604
|
}));
|
|
7584
|
-
function
|
|
7585
|
-
let { failedImages: t } =
|
|
7586
|
-
return e.some((e) => t.has(e)) ? /* @__PURE__ */
|
|
7605
|
+
function rt({ imageUrls: e = [] }) {
|
|
7606
|
+
let { failedImages: t } = G(P), { t: n } = _e();
|
|
7607
|
+
return e.some((e) => t.has(e)) ? /* @__PURE__ */ Y(nt, {
|
|
7587
7608
|
role: "status",
|
|
7588
7609
|
"aria-live": "polite",
|
|
7589
|
-
children: /* @__PURE__ */
|
|
7610
|
+
children: /* @__PURE__ */ Y(ye, {
|
|
7590
7611
|
variant: "body2",
|
|
7591
7612
|
children: n("imageFailedToLoad")
|
|
7592
7613
|
})
|
|
7593
7614
|
}) : null;
|
|
7594
7615
|
}
|
|
7595
|
-
|
|
7596
|
-
var
|
|
7597
|
-
annotations:
|
|
7598
|
-
canvasWorld:
|
|
7616
|
+
rt.propTypes = { imageUrls: X.default.arrayOf(X.default.string) };
|
|
7617
|
+
var it = i(h((e, { windowId: t }) => ({
|
|
7618
|
+
annotations: re(e, { windowId: t }),
|
|
7619
|
+
canvasWorld: Se(e, { windowId: t }),
|
|
7599
7620
|
drawAnnotations: O(e).window.forceDrawAnnotations || _(e, {
|
|
7600
7621
|
content: "annotations",
|
|
7601
7622
|
windowId: t
|
|
@@ -7606,14 +7627,14 @@ var $e = i(h((e, { windowId: t }) => ({
|
|
|
7606
7627
|
}).length > 0,
|
|
7607
7628
|
highlightAllAnnotations: o(e, { windowId: t }).highlightAllAnnotations,
|
|
7608
7629
|
hoveredAnnotationIds: o(e, { windowId: t }).hoveredAnnotationIds,
|
|
7609
|
-
palette:
|
|
7610
|
-
searchAnnotations:
|
|
7611
|
-
selectedAnnotationId:
|
|
7630
|
+
palette: ee(e).palette,
|
|
7631
|
+
searchAnnotations: ae(e, { windowId: t }),
|
|
7632
|
+
selectedAnnotationId: M(e, { windowId: t })
|
|
7612
7633
|
}), {
|
|
7613
|
-
deselectAnnotation:
|
|
7614
|
-
hoverAnnotation:
|
|
7615
|
-
selectAnnotation:
|
|
7616
|
-
}), d("AnnotationsOverlay"))(
|
|
7634
|
+
deselectAnnotation: N,
|
|
7635
|
+
hoverAnnotation: oe,
|
|
7636
|
+
selectAnnotation: ie
|
|
7637
|
+
}), d("AnnotationsOverlay"))(tt), at = {
|
|
7617
7638
|
get(e) {
|
|
7618
7639
|
return this.refs[e];
|
|
7619
7640
|
},
|
|
@@ -7624,13 +7645,13 @@ var $e = i(h((e, { windowId: t }) => ({
|
|
|
7624
7645
|
set(e, t) {
|
|
7625
7646
|
this.refs[e] = t;
|
|
7626
7647
|
}
|
|
7627
|
-
},
|
|
7648
|
+
}, ot = fe(void 0);
|
|
7628
7649
|
//#endregion
|
|
7629
7650
|
//#region src/components/OpenSeadragonComponent.jsx
|
|
7630
|
-
function
|
|
7631
|
-
let c =
|
|
7651
|
+
function st({ children: e = void 0, Container: t = "div", osdConfig: n = {}, viewerConfig: r = {}, onUpdateViewport: i = () => {}, setViewer: a = () => {}, style: o = {}, ...s }) {
|
|
7652
|
+
let c = pe(), l = J(), [u, d] = he(!1), f = J(void 0), p = J(!1), m = J(null), h = J(!1), [, g] = me((e) => e + 1, 0), _ = z(W((e) => {
|
|
7632
7653
|
f.current?.raiseEvent("mouse-move", e);
|
|
7633
|
-
}, [f]), 10), v =
|
|
7654
|
+
}, [f]), 10), v = W((e) => {
|
|
7634
7655
|
let { viewport: t } = e.eventSource;
|
|
7635
7656
|
p.current && (h.current || i({
|
|
7636
7657
|
bounds: t.getBounds(),
|
|
@@ -7640,10 +7661,10 @@ function nt({ children: e = void 0, Container: t = "div", osdConfig: n = {}, vie
|
|
|
7640
7661
|
y: Math.round(t.centerSpringY.target.value),
|
|
7641
7662
|
zoom: t.zoomSpring.target.value
|
|
7642
7663
|
}));
|
|
7643
|
-
}, [i, p]), y =
|
|
7644
|
-
p.current || (p.current = !0, r.x != null && r.y != null && e.panTo(new
|
|
7664
|
+
}, [i, p]), y = W(({ viewport: e }) => {
|
|
7665
|
+
p.current || (p.current = !0, r.x != null && r.y != null && e.panTo(new Z.default.Point(r.x, r.y), !0), r.zoom != null && e.zoomTo(r.zoom, new Z.default.Point(r.x, r.y), !0), r.rotation != null && r.rotation !== e.getRotation() && e.setRotation(r.rotation), r.flip != null && (r.flip || !1) !== e.getFlip() && e.setFlip(r.flip), !r.x && !r.y && !r.zoom && (r.bounds ? (e.fitBounds(new Z.default.Rect(...r.bounds), !0), m.current = r.bounds) : e.goHome(!0)));
|
|
7645
7666
|
}, [p, r]);
|
|
7646
|
-
|
|
7667
|
+
K(() => {
|
|
7647
7668
|
let e = f.current;
|
|
7648
7669
|
if (!e) return;
|
|
7649
7670
|
let { viewport: t } = e;
|
|
@@ -7653,19 +7674,19 @@ function nt({ children: e = void 0, Container: t = "div", osdConfig: n = {}, vie
|
|
|
7653
7674
|
}
|
|
7654
7675
|
if (r.bounds && (!m.current || r.bounds.length !== m.current.length || r.bounds.some((e, t) => e !== m.current[t]))) {
|
|
7655
7676
|
h.current = !0, m.current = r.bounds, e.addOnceHandler("tile-loaded", () => {
|
|
7656
|
-
let e = new
|
|
7677
|
+
let e = new Z.default.Rect(...r.bounds);
|
|
7657
7678
|
t.fitBoundsWithConstraints(e, !0), h.current = !1;
|
|
7658
7679
|
});
|
|
7659
7680
|
return;
|
|
7660
7681
|
}
|
|
7661
|
-
!r.x || !r.y || !r.zoom || (r.x != null && r.y != null && (Math.round(r.x) !== Math.round(t.centerSpringX.target.value) || Math.round(r.y) !== Math.round(t.centerSpringY.target.value)) && t.panTo(new
|
|
7682
|
+
!r.x || !r.y || !r.zoom || (r.x != null && r.y != null && (Math.round(r.x) !== Math.round(t.centerSpringX.target.value) || Math.round(r.y) !== Math.round(t.centerSpringY.target.value)) && t.panTo(new Z.default.Point(r.x, r.y), !1), r.zoom != null && r.zoom !== t.zoomSpring.target.value && t.zoomTo(r.zoom, new Z.default.Point(r.x, r.y), !1), r.rotation != null && r.rotation !== t.getRotation() && t.setRotation(r.rotation), r.flip != null && (r.flip || !1) !== t.getFlip() && t.setFlip(r.flip));
|
|
7662
7683
|
}, [
|
|
7663
7684
|
p,
|
|
7664
7685
|
y,
|
|
7665
7686
|
r,
|
|
7666
7687
|
f
|
|
7667
|
-
]),
|
|
7668
|
-
let e = (0,
|
|
7688
|
+
]), K(() => {
|
|
7689
|
+
let e = (0, Z.default)({
|
|
7669
7690
|
element: l.current,
|
|
7670
7691
|
...n
|
|
7671
7692
|
});
|
|
@@ -7680,21 +7701,21 @@ function nt({ children: e = void 0, Container: t = "div", osdConfig: n = {}, vie
|
|
|
7680
7701
|
}), e.addHandler("animation-finish", v), e.innerTracker.moveHandler = _, f.current = e, a(e), e.addOnceHandler("tile-loaded", () => {
|
|
7681
7702
|
p.current = !1, y(e);
|
|
7682
7703
|
}), g();
|
|
7683
|
-
}, [l]),
|
|
7704
|
+
}, [l]), K(() => () => {
|
|
7684
7705
|
let e = f.current;
|
|
7685
7706
|
e && (e.innerTracker?.moveHandler === _ && (e.innerTracker.moveHandler = () => {}), e.removeAllHandlers(), e.destroy(), f.current = void 0, a(null));
|
|
7686
7707
|
}, []);
|
|
7687
|
-
let { t: b } =
|
|
7688
|
-
return
|
|
7708
|
+
let { t: b } = _e();
|
|
7709
|
+
return K(() => {
|
|
7689
7710
|
let e = f?.current?.canvas?.firstElementChild;
|
|
7690
7711
|
e && (e.setAttribute("role", "img"), e.setAttribute("aria-label", b("digitizedView")), e.setAttribute("aria-describedby", c));
|
|
7691
7712
|
}, [
|
|
7692
7713
|
f?.current?.canvas?.firstElementChild,
|
|
7693
7714
|
c,
|
|
7694
7715
|
b
|
|
7695
|
-
]), /* @__PURE__ */
|
|
7716
|
+
]), /* @__PURE__ */ Y(ot.Provider, {
|
|
7696
7717
|
value: f,
|
|
7697
|
-
children: /* @__PURE__ */
|
|
7718
|
+
children: /* @__PURE__ */ Y(t, {
|
|
7698
7719
|
id: c,
|
|
7699
7720
|
ref: l,
|
|
7700
7721
|
style: {
|
|
@@ -7706,33 +7727,33 @@ function nt({ children: e = void 0, Container: t = "div", osdConfig: n = {}, vie
|
|
|
7706
7727
|
})
|
|
7707
7728
|
});
|
|
7708
7729
|
}
|
|
7709
|
-
|
|
7710
|
-
children:
|
|
7711
|
-
Container:
|
|
7712
|
-
onUpdateViewport:
|
|
7713
|
-
osdConfig:
|
|
7714
|
-
setViewer:
|
|
7715
|
-
style:
|
|
7716
|
-
viewerConfig:
|
|
7717
|
-
bounds:
|
|
7718
|
-
flip:
|
|
7719
|
-
rotation:
|
|
7720
|
-
x:
|
|
7721
|
-
y:
|
|
7722
|
-
zoom:
|
|
7730
|
+
st.propTypes = {
|
|
7731
|
+
children: X.default.node,
|
|
7732
|
+
Container: X.default.elementType,
|
|
7733
|
+
onUpdateViewport: X.default.func,
|
|
7734
|
+
osdConfig: X.default.object,
|
|
7735
|
+
setViewer: X.default.func,
|
|
7736
|
+
style: X.default.object,
|
|
7737
|
+
viewerConfig: X.default.shape({
|
|
7738
|
+
bounds: X.default.arrayOf(X.default.number),
|
|
7739
|
+
flip: X.default.bool,
|
|
7740
|
+
rotation: X.default.number,
|
|
7741
|
+
x: X.default.number,
|
|
7742
|
+
y: X.default.number,
|
|
7743
|
+
zoom: X.default.number
|
|
7723
7744
|
})
|
|
7724
7745
|
};
|
|
7725
7746
|
//#endregion
|
|
7726
7747
|
//#region src/components/OpenSeadragonTileSource.jsx
|
|
7727
|
-
function
|
|
7728
|
-
let a =
|
|
7729
|
-
return
|
|
7748
|
+
function ct({ index: e = void 0, opacity: t = void 0, fitBounds: n = void 0, tileSource: r = {}, url: i = void 0 }) {
|
|
7749
|
+
let a = G(ot), { notifyFailure: o, fallbackImage: s } = G(P), c = J(void 0);
|
|
7750
|
+
return K(() => {
|
|
7730
7751
|
t != null && c.current?.setOpacity(t);
|
|
7731
|
-
}, [t]),
|
|
7732
|
-
n && c.current?.fitBounds(new
|
|
7733
|
-
}, [n]),
|
|
7752
|
+
}, [t]), K(() => {
|
|
7753
|
+
n && c.current?.fitBounds(new Z.default.Rect(...n));
|
|
7754
|
+
}, [n]), K(() => {
|
|
7734
7755
|
!c.current || !a?.current || e == null || a.current.world.setItemIndex(c.current, e);
|
|
7735
|
-
}, [e, a]),
|
|
7756
|
+
}, [e, a]), K(() => {
|
|
7736
7757
|
if (!a?.current) return;
|
|
7737
7758
|
let l = () => {
|
|
7738
7759
|
s && a.current.addTiledImage({
|
|
@@ -7742,7 +7763,7 @@ function rt({ index: e = void 0, opacity: t = void 0, fitBounds: n = void 0, til
|
|
|
7742
7763
|
},
|
|
7743
7764
|
index: e,
|
|
7744
7765
|
opacity: t,
|
|
7745
|
-
fitBounds: n ? new
|
|
7766
|
+
fitBounds: n ? new Z.default.Rect(...n) : void 0,
|
|
7746
7767
|
success: (e) => {
|
|
7747
7768
|
c.current = e.item;
|
|
7748
7769
|
}
|
|
@@ -7756,7 +7777,7 @@ function rt({ index: e = void 0, opacity: t = void 0, fitBounds: n = void 0, til
|
|
|
7756
7777
|
tileSource: u,
|
|
7757
7778
|
index: e,
|
|
7758
7779
|
opacity: t,
|
|
7759
|
-
fitBounds: n ? new
|
|
7780
|
+
fitBounds: n ? new Z.default.Rect(...n) : void 0,
|
|
7760
7781
|
success: (e) => s(e),
|
|
7761
7782
|
error: (e) => {
|
|
7762
7783
|
let t = i || (typeof r == "string" ? r : r?.["@id"]);
|
|
@@ -7773,22 +7794,22 @@ function rt({ index: e = void 0, opacity: t = void 0, fitBounds: n = void 0, til
|
|
|
7773
7794
|
});
|
|
7774
7795
|
}, [a?.current, i]), null;
|
|
7775
7796
|
}
|
|
7776
|
-
|
|
7777
|
-
fitBounds:
|
|
7778
|
-
index:
|
|
7779
|
-
opacity:
|
|
7780
|
-
tileSource:
|
|
7781
|
-
url:
|
|
7797
|
+
ct.propTypes = {
|
|
7798
|
+
fitBounds: X.default.arrayOf(X.default.number),
|
|
7799
|
+
index: X.default.number,
|
|
7800
|
+
opacity: X.default.number,
|
|
7801
|
+
tileSource: X.default.oneOfType([X.default.string, X.default.object]),
|
|
7802
|
+
url: X.default.string
|
|
7782
7803
|
};
|
|
7783
7804
|
//#endregion
|
|
7784
7805
|
//#region src/components/OpenSeadragonViewer.jsx
|
|
7785
|
-
var
|
|
7806
|
+
var lt = ve("section")({
|
|
7786
7807
|
cursor: "grab",
|
|
7787
7808
|
flex: 1,
|
|
7788
7809
|
position: "relative"
|
|
7789
7810
|
});
|
|
7790
|
-
function
|
|
7791
|
-
let { t: d } =
|
|
7811
|
+
function ut({ children: e = null, label: t = null, windowId: n, osdConfig: r = {}, viewerConfig: i = null, drawAnnotations: a = !1, infoResponses: o = [], canvasWorld: s, nonTiledImages: c = [], updateViewport: l, ...u }) {
|
|
7812
|
+
let { t: d } = _e(), f = J(), [p, m] = he(null), h = W(({ flip: e, rotation: t, x: r, y: i, zoom: a }) => {
|
|
7792
7813
|
l(n, {
|
|
7793
7814
|
flip: e,
|
|
7794
7815
|
rotation: t,
|
|
@@ -7796,13 +7817,13 @@ function at({ children: e = null, label: t = null, windowId: n, osdConfig: r = {
|
|
|
7796
7817
|
y: i,
|
|
7797
7818
|
zoom: a
|
|
7798
7819
|
});
|
|
7799
|
-
}, [l, n]), g =
|
|
7800
|
-
f.current?.viewport && f.current.viewport.fitBounds(new
|
|
7820
|
+
}, [l, n]), g = W((e = !0) => {
|
|
7821
|
+
f.current?.viewport && f.current.viewport.fitBounds(new Z.default.Rect(...s.worldBounds()), e);
|
|
7801
7822
|
}, [s, f]);
|
|
7802
|
-
|
|
7823
|
+
K(() => (at.set(n, f), () => at.remove(n)), [f, n]), K(() => {
|
|
7803
7824
|
f.current = p;
|
|
7804
7825
|
}, [f, p]);
|
|
7805
|
-
let _ = U.map(e, (e) =>
|
|
7826
|
+
let _ = U.map(e, (e) => de(e, { zoomToWorld: g })), v = {
|
|
7806
7827
|
canvasWorld: s,
|
|
7807
7828
|
drawAnnotations: a,
|
|
7808
7829
|
infoResponses: o,
|
|
@@ -7814,10 +7835,10 @@ function at({ children: e = null, label: t = null, windowId: n, osdConfig: r = {
|
|
|
7814
7835
|
viewerConfig: i,
|
|
7815
7836
|
windowId: n,
|
|
7816
7837
|
...u
|
|
7817
|
-
}, y =
|
|
7818
|
-
return /* @__PURE__ */
|
|
7819
|
-
className: (0,
|
|
7820
|
-
Container:
|
|
7838
|
+
}, y = q(() => [...o.map((e) => e.id), ...c.map((e) => e.id)], [o, c]);
|
|
7839
|
+
return /* @__PURE__ */ ge(st, {
|
|
7840
|
+
className: (0, Fe.default)(ue("osd-container")),
|
|
7841
|
+
Container: lt,
|
|
7821
7842
|
osdConfig: r,
|
|
7822
7843
|
viewerConfig: i || (s.hasDimensions() ? { bounds: s.worldBounds() } : void 0),
|
|
7823
7844
|
onUpdateViewport: h,
|
|
@@ -7829,7 +7850,7 @@ function at({ children: e = null, label: t = null, windowId: n, osdConfig: r = {
|
|
|
7829
7850
|
let t = s.contentResource(e.id);
|
|
7830
7851
|
if (!t) return null;
|
|
7831
7852
|
let n = s.contentResourceToWorldCoordinates(t), r = s.layerIndexOfImageResource(t), i = s.layerOpacityOfImageResource(t);
|
|
7832
|
-
return /* @__PURE__ */
|
|
7853
|
+
return /* @__PURE__ */ Y(ct, {
|
|
7833
7854
|
tileSource: e.json,
|
|
7834
7855
|
fitBounds: n,
|
|
7835
7856
|
index: r,
|
|
@@ -7840,20 +7861,20 @@ function at({ children: e = null, label: t = null, windowId: n, osdConfig: r = {
|
|
|
7840
7861
|
let t = e.getProperty("type"), n = e.getProperty("format") || "";
|
|
7841
7862
|
if (!(t === "Image" || t === "dctypes:Image" || n.startsWith("image/"))) return null;
|
|
7842
7863
|
let r = s.contentResourceToWorldCoordinates(e), i = s.layerIndexOfImageResource(e), a = s.layerOpacityOfImageResource(e);
|
|
7843
|
-
return /* @__PURE__ */
|
|
7864
|
+
return /* @__PURE__ */ Y(ct, {
|
|
7844
7865
|
url: e.id,
|
|
7845
7866
|
fitBounds: r,
|
|
7846
7867
|
index: i,
|
|
7847
7868
|
opacity: a
|
|
7848
7869
|
}, e.id);
|
|
7849
7870
|
}),
|
|
7850
|
-
a && /* @__PURE__ */
|
|
7871
|
+
a && /* @__PURE__ */ Y(it, {
|
|
7851
7872
|
viewer: p,
|
|
7852
7873
|
windowId: n
|
|
7853
7874
|
}),
|
|
7854
7875
|
_,
|
|
7855
|
-
/* @__PURE__ */
|
|
7856
|
-
/* @__PURE__ */
|
|
7876
|
+
/* @__PURE__ */ Y(rt, { imageUrls: y }),
|
|
7877
|
+
/* @__PURE__ */ Y(H, {
|
|
7857
7878
|
targetName: "OpenSeadragonViewer",
|
|
7858
7879
|
viewer: p,
|
|
7859
7880
|
...v
|
|
@@ -7861,22 +7882,22 @@ function at({ children: e = null, label: t = null, windowId: n, osdConfig: r = {
|
|
|
7861
7882
|
]
|
|
7862
7883
|
});
|
|
7863
7884
|
}
|
|
7864
|
-
|
|
7865
|
-
canvasWorld:
|
|
7866
|
-
children:
|
|
7867
|
-
drawAnnotations:
|
|
7868
|
-
infoResponses:
|
|
7869
|
-
label:
|
|
7870
|
-
nonTiledImages:
|
|
7871
|
-
osdConfig:
|
|
7872
|
-
updateViewport:
|
|
7873
|
-
viewerConfig:
|
|
7874
|
-
windowId:
|
|
7885
|
+
ut.propTypes = {
|
|
7886
|
+
canvasWorld: X.default.instanceOf(R).isRequired,
|
|
7887
|
+
children: X.default.node,
|
|
7888
|
+
drawAnnotations: X.default.bool,
|
|
7889
|
+
infoResponses: X.default.arrayOf(X.default.object),
|
|
7890
|
+
label: X.default.string,
|
|
7891
|
+
nonTiledImages: X.default.array,
|
|
7892
|
+
osdConfig: X.default.object,
|
|
7893
|
+
updateViewport: X.default.func.isRequired,
|
|
7894
|
+
viewerConfig: X.default.object,
|
|
7895
|
+
windowId: X.default.string.isRequired
|
|
7875
7896
|
};
|
|
7876
7897
|
//#endregion
|
|
7877
7898
|
//#region src/containers/OpenSeadragonViewer.js
|
|
7878
|
-
var
|
|
7879
|
-
let n =
|
|
7899
|
+
var dt = /* @__PURE__ */ l({ default: () => ft }), ft = i(h((e, { windowId: t }) => {
|
|
7900
|
+
let n = Se(e, { windowId: t }), r = j(e), i = n.canvases.flatMap((e) => e.imageServiceIds);
|
|
7880
7901
|
return {
|
|
7881
7902
|
canvasWorld: n,
|
|
7882
7903
|
drawAnnotations: O(e).window.forceDrawAnnotations || _(e, {
|
|
@@ -7887,16 +7908,16 @@ var ot = /* @__PURE__ */ l({ default: () => st }), st = i(h((e, { windowId: t })
|
|
|
7887
7908
|
windowId: t
|
|
7888
7909
|
}).length > 0,
|
|
7889
7910
|
infoResponses: i.map((e) => r[e]).filter((e) => e !== void 0 && e.isFetching === !1 && e.error === void 0),
|
|
7890
|
-
label:
|
|
7891
|
-
canvasId: (
|
|
7911
|
+
label: w(e, {
|
|
7912
|
+
canvasId: (E(e, { windowId: t }) || {}).id,
|
|
7892
7913
|
windowId: t
|
|
7893
7914
|
}),
|
|
7894
|
-
nonTiledImages:
|
|
7915
|
+
nonTiledImages: te(e, { windowId: t }),
|
|
7895
7916
|
osdConfig: O(e).osdConfig,
|
|
7896
7917
|
viewerConfig: f(e, { windowId: t })
|
|
7897
7918
|
};
|
|
7898
|
-
}, { updateViewport:
|
|
7919
|
+
}, { updateViewport: B }), d("OpenSeadragonViewer"))(ut);
|
|
7899
7920
|
//#endregion
|
|
7900
|
-
export {
|
|
7921
|
+
export { it as a, et as c, Ne as d, Se as f, at as i, Ze as l, dt as n, rt as o, ut as r, tt as s, ft as t, ze as u };
|
|
7901
7922
|
|
|
7902
|
-
//# sourceMappingURL=OpenSeadragonViewer-
|
|
7923
|
+
//# sourceMappingURL=OpenSeadragonViewer-CYMXINoT.js.map
|