dbf-mirador 4.3.7 → 4.3.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -0
- package/dist/{CommentSharp-CqGF7axd.js → CommentSharp-c9-KZf2H.js} +2 -2
- package/dist/{CommentSharp-CqGF7axd.js.map → CommentSharp-c9-KZf2H.js.map} +1 -1
- package/dist/{FailedImageContext-yYxY_Y6U.js → FailedImageContext-B8nqS86j.js} +7 -1
- package/dist/FailedImageContext-B8nqS86j.js.map +1 -0
- package/dist/{GalleryView-CVBvyOpD.js → GalleryView-UEgvJwF4.js} +3 -3
- package/dist/{GalleryView-CVBvyOpD.js.map → GalleryView-UEgvJwF4.js.map} +1 -1
- package/dist/{OpenSeadragonViewer-CYMXINoT.js → OpenSeadragonViewer-Dm_GZoQ8.js} +407 -363
- package/dist/OpenSeadragonViewer-Dm_GZoQ8.js.map +1 -0
- package/dist/{WindowViewer-CCpOO735.js → WindowViewer-DARS4uQ5.js} +2 -2
- package/dist/{WindowViewer-CCpOO735.js.map → WindowViewer-DARS4uQ5.js.map} +1 -1
- package/dist/{WorkspaceArea-XNVTbI7k.js → WorkspaceArea-CjoBaSS5.js} +46 -39
- package/dist/WorkspaceArea-CjoBaSS5.js.map +1 -0
- package/dist/mirador.es.js +3311 -1974
- package/dist/mirador.es.js.map +1 -1
- package/dist/mirador.min.js +73 -73
- package/dist/mirador.min.js.map +1 -1
- package/package.json +1 -1
- package/src/components/AnnotationsOverlay.jsx +9 -1
- package/src/components/AppProviders.jsx +22 -2
- package/src/components/CompanionWindow.jsx +61 -52
- package/src/components/MapViewer.jsx +31 -3
- package/src/components/OpenSeadragonViewer.jsx +3 -1
- package/src/components/Workspace.jsx +8 -3
- package/src/components/WorkspaceArea.jsx +10 -1
- package/src/containers/AppProviders.js +3 -0
- package/src/containers/OpenSeadragonViewer.js +2 -0
- package/src/containers/Workspace.js +2 -0
- package/src/containers/WorkspaceArea.js +2 -0
- package/src/lib/AnnotationItem.js +5 -0
- package/src/lib/AnnotationResource.js +5 -0
- package/src/lib/CanvasAnnotationDisplay.js +23 -2
- package/src/lib/smoothPath.js +54 -0
- package/src/plugins/audioPlayer.tsx +244 -0
- package/src/plugins/fillView.ts +152 -0
- package/src/plugins/index.js +2 -0
- package/src/plugins/mapInteractionPlugin.tsx +13 -49
- package/src/plugins/nestedMapPlugin.tsx +161 -12
- package/src/plugins/poiPreviewPlugin.tsx +849 -35
- package/src/plugins/previewIds.ts +15 -0
- package/src/plugins/scrollSelect.ts +146 -0
- package/src/plugins/sheetGestures.ts +215 -0
- package/src/plugins/siteMapToolsPlugin.tsx +264 -0
- package/src/plugins/sitePanelState.ts +162 -0
- package/src/plugins/sitePins.ts +295 -0
- package/src/plugins/tourOrder.ts +48 -0
- package/dist/FailedImageContext-yYxY_Y6U.js.map +0 -1
- package/dist/OpenSeadragonViewer-CYMXINoT.js.map +0 -1
- package/dist/WorkspaceArea-XNVTbI7k.js.map +0 -1
|
@@ -1,29 +1,29 @@
|
|
|
1
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
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
|
|
4
|
-
import { d as
|
|
5
|
-
import { i as
|
|
6
|
-
import { i as
|
|
7
|
-
import { Children as
|
|
8
|
-
import { jsx as
|
|
9
|
-
import { useTranslation as
|
|
10
|
-
import { styled as
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
3
|
+
import { O as re, c as ie, h as ae, k as M, n as N, r as P, t as F } from "./FailedImageContext-B8nqS86j.js";
|
|
4
|
+
import { d as I, f as L, l as oe, m as R, n as z, o as se, t as B, u as ce } from "./index.module-B1DwyIwz.js";
|
|
5
|
+
import { i as V } from "./canvas-DNE0BtDK.js";
|
|
6
|
+
import { i as H, r as le, t as U } from "./PluginHook-Bs9Qkrjd.js";
|
|
7
|
+
import { Children as W, cloneElement as ue, createContext as de, useCallback as G, useContext as K, useEffect as q, useId as fe, useMemo as J, useReducer as pe, useRef as Y, useState as me } from "react";
|
|
8
|
+
import { jsx as X, jsxs as he } from "react/jsx-runtime";
|
|
9
|
+
import { useTranslation as ge } from "react-i18next";
|
|
10
|
+
import { styled as _e } from "@mui/material/styles";
|
|
11
|
+
import ve from "@mui/material/Typography";
|
|
12
|
+
import ye from "react-dom";
|
|
13
|
+
import be from "@mui/material/Box";
|
|
14
14
|
//#region src/state/selectors/viewer.js
|
|
15
|
-
var
|
|
15
|
+
var xe = p([
|
|
16
16
|
C,
|
|
17
|
-
|
|
17
|
+
se,
|
|
18
18
|
y,
|
|
19
19
|
b
|
|
20
|
-
], (e, t, n, r) => new
|
|
20
|
+
], (e, t, n, r) => new z(e.map(r), t, n)), Se = /* @__PURE__ */ g(((e, t) => {
|
|
21
21
|
t.exports = v()(function(e, t, n) {
|
|
22
22
|
e[+!n].push(t);
|
|
23
23
|
}, function() {
|
|
24
24
|
return [[], []];
|
|
25
25
|
});
|
|
26
|
-
})),
|
|
26
|
+
})), Ce = /* @__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 Se = p([
|
|
|
32
32
|
}), a;
|
|
33
33
|
}
|
|
34
34
|
t.exports = a;
|
|
35
|
-
})),
|
|
35
|
+
})), we = /* @__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
|
+
})), Te = /* @__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 Se = p([
|
|
|
50
50
|
return 0;
|
|
51
51
|
}
|
|
52
52
|
t.exports = i;
|
|
53
|
-
})),
|
|
54
|
-
var n =
|
|
53
|
+
})), Ee = /* @__PURE__ */ g(((e, t) => {
|
|
54
|
+
var n = Te();
|
|
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 Se = p([
|
|
|
60
60
|
return e.index - t.index;
|
|
61
61
|
}
|
|
62
62
|
t.exports = r;
|
|
63
|
-
})),
|
|
64
|
-
var r = D(), i = A(), a = S(), o =
|
|
63
|
+
})), De = /* @__PURE__ */ g(((t, n) => {
|
|
64
|
+
var r = D(), i = A(), a = S(), o = Ce(), s = we(), l = c(), u = Ee(), 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,7 +82,7 @@ var Se = p([
|
|
|
82
82
|
});
|
|
83
83
|
}
|
|
84
84
|
n.exports = p;
|
|
85
|
-
})),
|
|
85
|
+
})), Oe = /* @__PURE__ */ g(((e, n) => {
|
|
86
86
|
var i = k(), o = r(), s = t(), c = a();
|
|
87
87
|
function l(e, t, n) {
|
|
88
88
|
if (!c(n)) return !1;
|
|
@@ -90,15 +90,15 @@ var Se = p([
|
|
|
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
|
+
})), ke = /* @__PURE__ */ g(((e, t) => {
|
|
94
|
+
var n = R(), r = De(), i = L(), a = Oe();
|
|
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
|
+
})), Ae = /* @__PURE__ */ g(((e, t) => {
|
|
101
|
+
var n = oe(), r = R(), i = I();
|
|
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 Se = p([
|
|
|
106
106
|
return i(r(c, 1), t, a);
|
|
107
107
|
}
|
|
108
108
|
t.exports = a;
|
|
109
|
-
})),
|
|
110
|
-
var n = T(), r =
|
|
109
|
+
})), je = /* @__PURE__ */ g(((e, t) => {
|
|
110
|
+
var n = T(), r = L(), i = Ae(), a = ce();
|
|
111
111
|
t.exports = r(function(e) {
|
|
112
112
|
return i(n(e, a));
|
|
113
113
|
});
|
|
114
|
-
})),
|
|
114
|
+
})), Me = /* @__PURE__ */ g(((e, t) => {
|
|
115
115
|
function n(e) {
|
|
116
116
|
return new n.Viewer(e);
|
|
117
117
|
}
|
|
@@ -1109,19 +1109,19 @@ var Se = p([
|
|
|
1109
1109
|
N(a, e);
|
|
1110
1110
|
},
|
|
1111
1111
|
mouseover: function(e) {
|
|
1112
|
-
|
|
1112
|
+
P(a, e);
|
|
1113
1113
|
},
|
|
1114
1114
|
mouseout: function(e) {
|
|
1115
|
-
|
|
1115
|
+
F(a, e);
|
|
1116
1116
|
},
|
|
1117
1117
|
mousedown: function(e) {
|
|
1118
|
-
|
|
1118
|
+
I(a, e);
|
|
1119
1119
|
},
|
|
1120
1120
|
mouseup: function(e) {
|
|
1121
|
-
|
|
1121
|
+
L(a, e);
|
|
1122
1122
|
},
|
|
1123
1123
|
mousemove: function(e) {
|
|
1124
|
-
|
|
1124
|
+
z(a, e);
|
|
1125
1125
|
},
|
|
1126
1126
|
touchstart: function(e) {
|
|
1127
1127
|
O(a, e);
|
|
@@ -1154,28 +1154,28 @@ var Se = p([
|
|
|
1154
1154
|
N(a, e);
|
|
1155
1155
|
},
|
|
1156
1156
|
pointerover: function(e) {
|
|
1157
|
-
|
|
1157
|
+
P(a, e);
|
|
1158
1158
|
},
|
|
1159
1159
|
pointerout: function(e) {
|
|
1160
|
-
|
|
1160
|
+
F(a, e);
|
|
1161
1161
|
},
|
|
1162
1162
|
pointerdown: function(e) {
|
|
1163
|
-
|
|
1163
|
+
I(a, e);
|
|
1164
1164
|
},
|
|
1165
1165
|
pointerup: function(e) {
|
|
1166
|
-
|
|
1166
|
+
L(a, e);
|
|
1167
1167
|
},
|
|
1168
1168
|
pointermove: function(e) {
|
|
1169
|
-
|
|
1169
|
+
z(a, e);
|
|
1170
1170
|
},
|
|
1171
1171
|
pointercancel: function(e) {
|
|
1172
|
-
|
|
1172
|
+
ce(a, e);
|
|
1173
1173
|
},
|
|
1174
1174
|
pointerupcaptured: function(e) {
|
|
1175
|
-
|
|
1175
|
+
oe(a, e);
|
|
1176
1176
|
},
|
|
1177
1177
|
pointermovecaptured: function(e) {
|
|
1178
|
-
|
|
1178
|
+
se(a, e);
|
|
1179
1179
|
},
|
|
1180
1180
|
tracking: !1,
|
|
1181
1181
|
activePointersLists: [],
|
|
@@ -1336,7 +1336,7 @@ var Se = 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++) H(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 Se = 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
|
+
W(t, n, !0);
|
|
1389
1389
|
}
|
|
1390
1390
|
function u(t, n) {
|
|
1391
1391
|
var a, o, s;
|
|
@@ -1397,7 +1397,7 @@ var Se = 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
|
+
W(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 Se = p([
|
|
|
1428
1428
|
pointerType: "mouse",
|
|
1429
1429
|
isEmulated: !1
|
|
1430
1430
|
};
|
|
1431
|
-
|
|
1431
|
+
U(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 Se = p([
|
|
|
1437
1437
|
pointerType: "mouse",
|
|
1438
1438
|
isEmulated: !1
|
|
1439
1439
|
};
|
|
1440
|
-
|
|
1440
|
+
U(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 Se = p([
|
|
|
1446
1446
|
pointerType: "",
|
|
1447
1447
|
isEmulated: !1
|
|
1448
1448
|
};
|
|
1449
|
-
|
|
1449
|
+
U(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 Se = p([
|
|
|
1465
1465
|
pointerType: "",
|
|
1466
1466
|
isEmulated: !1
|
|
1467
1467
|
};
|
|
1468
|
-
|
|
1468
|
+
U(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 Se = p([
|
|
|
1484
1484
|
pointerType: "",
|
|
1485
1485
|
isEmulated: !1
|
|
1486
1486
|
};
|
|
1487
|
-
|
|
1487
|
+
U(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 Se = p([
|
|
|
1503
1503
|
pointerType: "",
|
|
1504
1504
|
isEmulated: !1
|
|
1505
1505
|
};
|
|
1506
|
-
|
|
1506
|
+
U(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 Se = p([
|
|
|
1516
1516
|
pointerType: "",
|
|
1517
1517
|
isEmulated: !1
|
|
1518
1518
|
};
|
|
1519
|
-
|
|
1519
|
+
U(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 Se = p([
|
|
|
1529
1529
|
pointerType: "mouse",
|
|
1530
1530
|
isEmulated: !1
|
|
1531
1531
|
};
|
|
1532
|
-
|
|
1532
|
+
U(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 Se = p([
|
|
|
1562
1562
|
eventType: "wheel",
|
|
1563
1563
|
pointerType: "mouse",
|
|
1564
1564
|
isEmulated: n !== r
|
|
1565
|
-
},
|
|
1565
|
+
}, U(t, a), t.scrollHandler && !a.preventGesture && !a.defaultPrevented && (o = {
|
|
1566
1566
|
eventSource: t,
|
|
1567
1567
|
pointerType: "mouse",
|
|
1568
1568
|
position: h(n, t.element),
|
|
@@ -1584,7 +1584,7 @@ var Se = p([
|
|
|
1584
1584
|
pointerType: "mouse",
|
|
1585
1585
|
isEmulated: !1
|
|
1586
1586
|
};
|
|
1587
|
-
|
|
1587
|
+
U(t, i), n.target === t.element && W(t, r, !1), i.stopPropagation && e.stopEvent(n);
|
|
1588
1588
|
}
|
|
1589
1589
|
function O(t, n) {
|
|
1590
1590
|
var r, i, a = n.changedTouches.length, o, s = t.getActivePointersListByType("touch");
|
|
@@ -1595,13 +1595,13 @@ var Se = p([
|
|
|
1595
1595
|
pointerType: "touch",
|
|
1596
1596
|
isEmulated: !1
|
|
1597
1597
|
};
|
|
1598
|
-
for (
|
|
1598
|
+
for (U(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
|
+
}, ue(t, c, o), q(t, c, o, 0), W(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 Se = p([
|
|
|
1613
1613
|
pointerType: "touch",
|
|
1614
1614
|
isEmulated: !1
|
|
1615
1615
|
};
|
|
1616
|
-
for (
|
|
1616
|
+
for (U(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
|
+
}, fe(t, s, o, 0), W(t, o, !1), de(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 Se = p([
|
|
|
1630
1630
|
pointerType: "touch",
|
|
1631
1631
|
isEmulated: !1
|
|
1632
1632
|
};
|
|
1633
|
-
for (
|
|
1633
|
+
for (U(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
|
+
}, J(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 Se = p([
|
|
|
1645
1645
|
pointerType: "touch",
|
|
1646
1646
|
isEmulated: !1
|
|
1647
1647
|
};
|
|
1648
|
-
for (
|
|
1648
|
+
for (U(t, o), i = 0; i < r; i++) a = {
|
|
1649
1649
|
id: n.changedTouches[i].identifier,
|
|
1650
1650
|
type: "touch"
|
|
1651
|
-
},
|
|
1651
|
+
}, pe(t, o, a);
|
|
1652
1652
|
o.stopPropagation && e.stopEvent(n);
|
|
1653
1653
|
}
|
|
1654
1654
|
function j(t, n) {
|
|
@@ -1664,7 +1664,7 @@ var Se = p([
|
|
|
1664
1664
|
pointerType: f(n),
|
|
1665
1665
|
isEmulated: !1
|
|
1666
1666
|
};
|
|
1667
|
-
|
|
1667
|
+
U(t, r), n.target === t.element && W(t, {
|
|
1668
1668
|
id: n.pointerId,
|
|
1669
1669
|
type: f(n)
|
|
1670
1670
|
}, !0), r.stopPropagation && e.stopEvent(n);
|
|
@@ -1676,7 +1676,7 @@ var Se = p([
|
|
|
1676
1676
|
pointerType: f(n),
|
|
1677
1677
|
isEmulated: !1
|
|
1678
1678
|
};
|
|
1679
|
-
|
|
1679
|
+
U(t, r), n.target === t.element && W(t, {
|
|
1680
1680
|
id: n.pointerId,
|
|
1681
1681
|
type: f(n)
|
|
1682
1682
|
}, !1), r.stopPropagation && e.stopEvent(n);
|
|
@@ -1694,7 +1694,7 @@ var Se = p([
|
|
|
1694
1694
|
pointerType: r.type,
|
|
1695
1695
|
isEmulated: !1
|
|
1696
1696
|
};
|
|
1697
|
-
|
|
1697
|
+
U(t, i), ue(t, i, r);
|
|
1698
1698
|
}
|
|
1699
1699
|
function N(t, n) {
|
|
1700
1700
|
var r = {
|
|
@@ -1709,9 +1709,9 @@ var Se = p([
|
|
|
1709
1709
|
pointerType: r.type,
|
|
1710
1710
|
isEmulated: !1
|
|
1711
1711
|
};
|
|
1712
|
-
|
|
1712
|
+
U(t, i), de(t, i, r);
|
|
1713
1713
|
}
|
|
1714
|
-
function
|
|
1714
|
+
function P(t, n) {
|
|
1715
1715
|
var r = {
|
|
1716
1716
|
id: d(n),
|
|
1717
1717
|
type: f(n),
|
|
@@ -1724,9 +1724,9 @@ var Se = p([
|
|
|
1724
1724
|
pointerType: r.type,
|
|
1725
1725
|
isEmulated: !1
|
|
1726
1726
|
};
|
|
1727
|
-
|
|
1727
|
+
U(t, i), G(t, i, r), i.preventDefault && !i.defaultPrevented && e.cancelEvent(n), i.stopPropagation && e.stopEvent(n);
|
|
1728
1728
|
}
|
|
1729
|
-
function
|
|
1729
|
+
function F(t, n) {
|
|
1730
1730
|
var r = {
|
|
1731
1731
|
id: d(n),
|
|
1732
1732
|
type: f(n),
|
|
@@ -1739,9 +1739,9 @@ var Se = p([
|
|
|
1739
1739
|
pointerType: r.type,
|
|
1740
1740
|
isEmulated: !1
|
|
1741
1741
|
};
|
|
1742
|
-
|
|
1742
|
+
U(t, i), K(t, i, r), i.preventDefault && !i.defaultPrevented && e.cancelEvent(n), i.stopPropagation && e.stopEvent(n);
|
|
1743
1743
|
}
|
|
1744
|
-
function
|
|
1744
|
+
function I(t, n) {
|
|
1745
1745
|
var r = {
|
|
1746
1746
|
id: d(n),
|
|
1747
1747
|
type: f(n),
|
|
@@ -1754,15 +1754,15 @@ var Se = p([
|
|
|
1754
1754
|
pointerType: r.type,
|
|
1755
1755
|
isEmulated: !1
|
|
1756
1756
|
};
|
|
1757
|
-
|
|
1757
|
+
U(t, a), q(t, a, r, n.button), a.preventDefault && !a.defaultPrevented && e.cancelEvent(n), a.stopPropagation && e.stopEvent(n), a.shouldCapture && (i ? W(t, r, !0) : l(t, r));
|
|
1758
1758
|
}
|
|
1759
|
-
function
|
|
1760
|
-
|
|
1759
|
+
function L(e, t) {
|
|
1760
|
+
R(e, t);
|
|
1761
1761
|
}
|
|
1762
|
-
function
|
|
1763
|
-
t.getActivePointersListByType(f(n)).getById(n.pointerId) &&
|
|
1762
|
+
function oe(t, n) {
|
|
1763
|
+
t.getActivePointersListByType(f(n)).getById(n.pointerId) && R(t, n), e.stopEvent(n);
|
|
1764
1764
|
}
|
|
1765
|
-
function
|
|
1765
|
+
function R(t, n) {
|
|
1766
1766
|
var r = {
|
|
1767
1767
|
id: d(n),
|
|
1768
1768
|
type: f(n),
|
|
@@ -1775,15 +1775,15 @@ var Se = p([
|
|
|
1775
1775
|
pointerType: r.type,
|
|
1776
1776
|
isEmulated: !1
|
|
1777
1777
|
};
|
|
1778
|
-
|
|
1778
|
+
U(t, i), fe(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) : W(t, r, !1));
|
|
1779
1779
|
}
|
|
1780
|
-
function
|
|
1781
|
-
|
|
1780
|
+
function z(e, t) {
|
|
1781
|
+
B(e, t);
|
|
1782
1782
|
}
|
|
1783
|
-
function
|
|
1784
|
-
t.getActivePointersListByType(f(n)).getById(n.pointerId) &&
|
|
1783
|
+
function se(t, n) {
|
|
1784
|
+
t.getActivePointersListByType(f(n)).getById(n.pointerId) && B(t, n), e.stopEvent(n);
|
|
1785
1785
|
}
|
|
1786
|
-
function
|
|
1786
|
+
function B(t, n) {
|
|
1787
1787
|
var r = {
|
|
1788
1788
|
id: d(n),
|
|
1789
1789
|
type: f(n),
|
|
@@ -1796,9 +1796,9 @@ var Se = p([
|
|
|
1796
1796
|
pointerType: r.type,
|
|
1797
1797
|
isEmulated: !1
|
|
1798
1798
|
};
|
|
1799
|
-
|
|
1799
|
+
U(t, i), J(t, i, r), i.preventDefault && !i.defaultPrevented && e.cancelEvent(n), i.stopPropagation && e.stopEvent(n);
|
|
1800
1800
|
}
|
|
1801
|
-
function
|
|
1801
|
+
function ce(t, n) {
|
|
1802
1802
|
var r = {
|
|
1803
1803
|
id: n.pointerId,
|
|
1804
1804
|
type: f(n)
|
|
@@ -1808,16 +1808,16 @@ var Se = p([
|
|
|
1808
1808
|
pointerType: r.type,
|
|
1809
1809
|
isEmulated: !1
|
|
1810
1810
|
};
|
|
1811
|
-
|
|
1811
|
+
U(t, i), pe(t, i, r), i.stopPropagation && e.stopEvent(n);
|
|
1812
1812
|
}
|
|
1813
|
-
function
|
|
1813
|
+
function V(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 H(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 le(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 Se = 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 U(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, le(t, n), t.preProcessEventHandler && t.preProcessEventHandler(n);
|
|
1858
1858
|
}
|
|
1859
|
-
function
|
|
1859
|
+
function W(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 ue(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, V(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 Se = p([
|
|
|
1875
1875
|
userData: e.userData
|
|
1876
1876
|
});
|
|
1877
1877
|
}
|
|
1878
|
-
function
|
|
1878
|
+
function de(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) : H(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 Se = p([
|
|
|
1890
1890
|
userData: e.userData
|
|
1891
1891
|
}, e.leaveHandler && e.leaveHandler(a), e.exitHandler && e.exitHandler(a));
|
|
1892
1892
|
}
|
|
1893
|
-
function
|
|
1893
|
+
function G(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 Se = p([
|
|
|
1905
1905
|
userData: e.userData
|
|
1906
1906
|
});
|
|
1907
1907
|
}
|
|
1908
|
-
function
|
|
1908
|
+
function K(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 Se = p([
|
|
|
1920
1920
|
userData: e.userData
|
|
1921
1921
|
});
|
|
1922
1922
|
}
|
|
1923
|
-
function
|
|
1923
|
+
function q(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 Se = 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, V(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 Se = 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 fe(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 Se = 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 || H(t, s, u), c = u.currentPos, l = u.currentTime) : (i.captured = !1, i.insideElementPressed = !1, i.insideElement = !0, V(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 Se = p([
|
|
|
2012
2012
|
userData: t.userData
|
|
2013
2013
|
}), r.preventDefault = !0)));
|
|
2014
2014
|
}
|
|
2015
|
-
function
|
|
2015
|
+
function J(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
|
+
Y(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 Se = p([
|
|
|
2067
2067
|
userData: e.userData
|
|
2068
2068
|
}), t.preventDefault = !0)));
|
|
2069
2069
|
}
|
|
2070
|
-
function
|
|
2070
|
+
function pe(e, t, n) {
|
|
2071
2071
|
var r = e.getActivePointersListByType(n.type), i = r.getById(n.id);
|
|
2072
|
-
i &&
|
|
2072
|
+
i && H(e, r, i);
|
|
2073
2073
|
}
|
|
2074
|
-
function
|
|
2074
|
+
function Y(e, t, n) {
|
|
2075
2075
|
e.stopHandler && e.stopHandler({
|
|
2076
2076
|
eventSource: e,
|
|
2077
2077
|
pointerType: n,
|
|
@@ -2752,7 +2752,7 @@ var Se = 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, F), r = e.delegate(this, oe), i = e.delegate(this, P), a = e.delegate(this, R), o = e.delegate(this, se), s = e.delegate(this, B), c = e.delegate(this, ce), l = e.delegate(this, V), u = e.delegate(this, H), 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,
|
|
@@ -2849,7 +2849,7 @@ var Se = p([
|
|
|
2849
2849
|
buttons: g,
|
|
2850
2850
|
clickTimeThreshold: this.clickTimeThreshold,
|
|
2851
2851
|
clickDistThreshold: this.clickDistThreshold
|
|
2852
|
-
}), this.navControl = this.buttonGroup.element, this.addHandler("open", e.delegate(this,
|
|
2852
|
+
}), this.navControl = this.buttonGroup.element, this.addHandler("open", e.delegate(this, z)), this.toolbar ? this.toolbar.addControl(this.navControl, { anchor: this.navigationControlAnchor || e.ControlAnchor.TOP_LEFT }) : this.addControl(this.navControl, { anchor: this.navigationControlAnchor || e.ControlAnchor.TOP_LEFT })) : this.customButtons = g), this;
|
|
2853
2853
|
},
|
|
2854
2854
|
currentPage: function() {
|
|
2855
2855
|
return this._sequenceIndex;
|
|
@@ -3400,49 +3400,49 @@ var Se = 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,
|
|
3404
|
-
}
|
|
3405
|
-
function oe() {
|
|
3406
|
-
t[this.hash].lastZoomTime = e.now(), t[this.hash].zoomFactor = 1 / this.zoomPerSecond, t[this.hash].zooming = !0, F(this);
|
|
3403
|
+
t[this.hash].lastZoomTime = e.now(), t[this.hash].zoomFactor = this.zoomPerSecond, t[this.hash].zooming = !0, I(this);
|
|
3407
3404
|
}
|
|
3408
3405
|
function P() {
|
|
3406
|
+
t[this.hash].lastZoomTime = e.now(), t[this.hash].zoomFactor = 1 / this.zoomPerSecond, t[this.hash].zooming = !0, I(this);
|
|
3407
|
+
}
|
|
3408
|
+
function F() {
|
|
3409
3409
|
t[this.hash].zooming = !1;
|
|
3410
3410
|
}
|
|
3411
|
-
function
|
|
3412
|
-
e.requestAnimationFrame(e.delegate(t,
|
|
3411
|
+
function I(t) {
|
|
3412
|
+
e.requestAnimationFrame(e.delegate(t, L));
|
|
3413
3413
|
}
|
|
3414
|
-
function
|
|
3414
|
+
function L() {
|
|
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, I(this));
|
|
3417
3417
|
}
|
|
3418
|
-
function
|
|
3418
|
+
function oe() {
|
|
3419
3419
|
this.viewport && (t[this.hash].zooming = !1, this.viewport.zoomBy(this.zoomPerClick / 1), this.viewport.applyConstraints());
|
|
3420
3420
|
}
|
|
3421
|
-
function
|
|
3421
|
+
function R() {
|
|
3422
3422
|
this.viewport && (t[this.hash].zooming = !1, this.viewport.zoomBy(1 / this.zoomPerClick), this.viewport.applyConstraints());
|
|
3423
3423
|
}
|
|
3424
|
-
function
|
|
3424
|
+
function z() {
|
|
3425
3425
|
this.buttonGroup && (this.buttonGroup.emulateEnter(), this.buttonGroup.emulateLeave());
|
|
3426
3426
|
}
|
|
3427
|
-
function
|
|
3427
|
+
function se() {
|
|
3428
3428
|
this.viewport && this.viewport.goHome();
|
|
3429
3429
|
}
|
|
3430
|
-
function
|
|
3430
|
+
function B() {
|
|
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 ce() {
|
|
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 V() {
|
|
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 H() {
|
|
3446
3446
|
this.viewport.toggleFlip();
|
|
3447
3447
|
}
|
|
3448
3448
|
e.determineDrawer = function(t) {
|
|
@@ -7222,7 +7222,7 @@ var Se = p([
|
|
|
7222
7222
|
}
|
|
7223
7223
|
});
|
|
7224
7224
|
})(n);
|
|
7225
|
-
})),
|
|
7225
|
+
})), Z = /* @__PURE__ */ u(s(), 1), Ne = /* @__PURE__ */ u(x(), 1), Pe = /* @__PURE__ */ u(H(), 1), Fe = /* @__PURE__ */ u(Se(), 1), Ie = /* @__PURE__ */ u(ke(), 1), Le = /* @__PURE__ */ u(je(), 1), Q = /* @__PURE__ */ u(Me(), 1), Re = 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 Se = 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 Q.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 Se = p([
|
|
|
7259
7259
|
};
|
|
7260
7260
|
//#endregion
|
|
7261
7261
|
//#region src/lib/svgShapesToPath.js
|
|
7262
|
-
function
|
|
7262
|
+
function ze(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 Be[t]?.(r, e, n), r;
|
|
7267
7267
|
}
|
|
7268
|
-
var
|
|
7268
|
+
var Be = {
|
|
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,68 @@ var Ve = {
|
|
|
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) => Ve(e, t, !0),
|
|
7282
|
+
polyline: (e, t) => Ve(e, t, !1)
|
|
7283
7283
|
};
|
|
7284
|
-
function
|
|
7285
|
-
|
|
7284
|
+
function Ve(e, t, n) {
|
|
7285
|
+
He(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 He(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
|
+
//#region src/lib/smoothPath.js
|
|
7296
|
+
function Ue(e) {
|
|
7297
|
+
let t = e.tagName.toLowerCase(), n;
|
|
7298
|
+
if (t === "polyline" || t === "polygon") n = e.getAttribute("points");
|
|
7299
|
+
else if (t === "path") {
|
|
7300
|
+
let t = e.getAttribute("d") ?? "";
|
|
7301
|
+
if (!/^\s*M[\d\s.,eE+-]+(L[\d\s.,eE+-]+)*$/.test(t)) return null;
|
|
7302
|
+
n = t.replace(/[ML]/g, " ");
|
|
7303
|
+
} else return null;
|
|
7304
|
+
let r = (n ?? "").trim().split(/[\s,]+/).map(Number);
|
|
7305
|
+
if (r.length < 4 || r.length % 2 || r.some(Number.isNaN)) return null;
|
|
7306
|
+
let i = [];
|
|
7307
|
+
for (let e = 0; e < r.length; e += 2) i.push({
|
|
7308
|
+
x: r[e],
|
|
7309
|
+
y: r[e + 1]
|
|
7310
|
+
});
|
|
7311
|
+
return i;
|
|
7312
|
+
}
|
|
7313
|
+
function We(e) {
|
|
7314
|
+
let t = new Path2D();
|
|
7315
|
+
t.moveTo(e[0].x, e[0].y);
|
|
7316
|
+
for (let n = 0; n < e.length - 1; n += 1) {
|
|
7317
|
+
let r = e[n - 1] ?? e[n], i = e[n], a = e[n + 1], o = e[n + 2] ?? a;
|
|
7318
|
+
t.bezierCurveTo(i.x + (a.x - r.x) / 6, i.y + (a.y - r.y) / 6, a.x - (o.x - i.x) / 6, a.y - (o.y - i.y) / 6, a.x, a.y);
|
|
7319
|
+
}
|
|
7320
|
+
return t;
|
|
7321
|
+
}
|
|
7322
|
+
//#endregion
|
|
7295
7323
|
//#region src/lib/CanvasAnnotationDisplay.js
|
|
7296
|
-
var
|
|
7324
|
+
var Ge = "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", Ke = 100, qe = {
|
|
7297
7325
|
x: 50,
|
|
7298
7326
|
y: 100
|
|
7299
7327
|
}, $ = {
|
|
7300
7328
|
x: 50,
|
|
7301
7329
|
y: 34.9,
|
|
7302
7330
|
radius: 18.6
|
|
7303
|
-
},
|
|
7304
|
-
function
|
|
7305
|
-
let r = 44 / n /
|
|
7331
|
+
}, Je = 1.6, Ye = "#1e88e5", Xe = 1.3, Ze = "#212121";
|
|
7332
|
+
function Qe(e, t, n) {
|
|
7333
|
+
let r = 44 / n / Ke;
|
|
7306
7334
|
return {
|
|
7307
7335
|
radius: 32 / n,
|
|
7308
|
-
x: e + ($.x -
|
|
7309
|
-
y: t + ($.y -
|
|
7336
|
+
x: e + ($.x - qe.x) * r,
|
|
7337
|
+
y: t + ($.y - qe.y) * r
|
|
7310
7338
|
};
|
|
7311
7339
|
}
|
|
7312
|
-
var
|
|
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;
|
|
7340
|
+
var $e = class {
|
|
7341
|
+
constructor({ resource: e, palette: t, zoomRatio: n, offset: r, selected: i, hovered: a, journeyStopNumber: o, lineStyle: s = null }) {
|
|
7342
|
+
this.resource = e, this.lineStyle = s, this.journeyStopNumber = o, this.palette = t, this.zoomRatio = n, this.offset = r, this.selected = i, this.hovered = a;
|
|
7315
7343
|
}
|
|
7316
7344
|
toContext(e) {
|
|
7317
7345
|
this.context = e, this.resource.svgSelector ? this.svgContext() : this.resource.pointSelector ? this.pointContext() : this.resource.fragmentSelector && this.fragmentContext();
|
|
@@ -7322,13 +7350,13 @@ var Ze = class {
|
|
|
7322
7350
|
pointContext() {
|
|
7323
7351
|
let { x: e, y: t } = this.resource.pointSelector, n = this.currentPalette();
|
|
7324
7352
|
if (n.globalAlpha === 0) return;
|
|
7325
|
-
let r = this.selected ?
|
|
7326
|
-
this.context.save(), this.context.translate(this.offset.x + e, this.offset.y + t), this.context.scale(i, i), this.context.translate(-
|
|
7353
|
+
let r = this.selected ? Xe : 1, i = 44 * r / this.zoomRatio / Ke, a = new Path2D(Ge), o = this.poiFill();
|
|
7354
|
+
this.context.save(), this.context.translate(this.offset.x + e, this.offset.y + t), this.context.scale(i, i), this.context.translate(-qe.x, -qe.y), this.context.globalAlpha = n.globalAlpha ?? 1, this.context.fillStyle = o, this.context.fill(a), this.selected && (this.context.strokeStyle = Ze, this.context.lineWidth = 200 / (44 * r), this.context.stroke(a));
|
|
7327
7355
|
let s = this.journeyStopNumberToDisplay();
|
|
7328
7356
|
s != null && this.journeyOrderBadgeContext(s, o), this.context.restore();
|
|
7329
7357
|
}
|
|
7330
7358
|
poiFill() {
|
|
7331
|
-
return this.palette.default?.fillStyle ||
|
|
7359
|
+
return this.palette.default?.fillStyle || Ye;
|
|
7332
7360
|
}
|
|
7333
7361
|
journeyStopNumberToDisplay() {
|
|
7334
7362
|
if (this.journeyStopNumber != null) return this.journeyStopNumber;
|
|
@@ -7336,7 +7364,7 @@ var Ze = class {
|
|
|
7336
7364
|
return e == null ? null : e + 1;
|
|
7337
7365
|
}
|
|
7338
7366
|
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 *
|
|
7367
|
+
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 * Je}px sans-serif`, this.context.textAlign = "center", this.context.textBaseline = "middle", this.context.fillText(String(e), $.x, $.y);
|
|
7340
7368
|
}
|
|
7341
7369
|
get svgString() {
|
|
7342
7370
|
return this.resource.svgSelector.value;
|
|
@@ -7346,11 +7374,13 @@ var Ze = class {
|
|
|
7346
7374
|
}
|
|
7347
7375
|
svgContext() {
|
|
7348
7376
|
let e;
|
|
7349
|
-
e = this.hovered ? this.palette.hovered : this.selected ? this.palette.selected : this.palette.default, e.globalAlpha
|
|
7377
|
+
if (e = this.hovered ? this.palette.hovered : this.selected ? this.palette.selected : this.palette.default, e.globalAlpha === 0) return;
|
|
7378
|
+
let t = this.resource.isJourney ? this.lineStyle : null;
|
|
7379
|
+
[...this.svgPaths].forEach((n) => {
|
|
7350
7380
|
this.context.save(), this.context.translate(this.offset.x, this.offset.y);
|
|
7351
|
-
let n =
|
|
7352
|
-
this.context.strokeStyle = this.color,
|
|
7353
|
-
let
|
|
7381
|
+
let r = t?.curve && n.tagName.toLowerCase() !== "polygon" ? Ue(n) : null, i = r ? We(r) : ze(n);
|
|
7382
|
+
this.context.strokeStyle = this.color, n.getAttribute("stroke-dasharray") && this.context.setLineDash(n.getAttribute("stroke-dasharray").split(","));
|
|
7383
|
+
let a = {
|
|
7354
7384
|
fill: "fillStyle",
|
|
7355
7385
|
stroke: "strokeStyle",
|
|
7356
7386
|
"stroke-dashoffset": "lineDashOffset",
|
|
@@ -7359,9 +7389,13 @@ var Ze = class {
|
|
|
7359
7389
|
"stroke-miterlimit": "miterlimit",
|
|
7360
7390
|
"stroke-width": "lineWidth"
|
|
7361
7391
|
};
|
|
7362
|
-
Object.keys(
|
|
7363
|
-
|
|
7364
|
-
}), this.context.lineWidth /= this.zoomRatio, (this.selected || this.hovered) && (this.context.strokeStyle = e.strokeStyle || e.fillStyle),
|
|
7392
|
+
if (Object.keys(a).forEach((e) => {
|
|
7393
|
+
n.getAttribute(e) && (this.context[a[e]] = n.getAttribute(e));
|
|
7394
|
+
}), this.context.lineWidth /= this.zoomRatio, (this.selected || this.hovered) && (this.context.strokeStyle = e.strokeStyle || e.fillStyle), t) {
|
|
7395
|
+
let { lineDash: e, lineWidth: n, strokeStyle: r } = t;
|
|
7396
|
+
r && (this.context.strokeStyle = r), n && (this.context.lineWidth = n / this.zoomRatio), e && this.context.setLineDash(e.map((e) => e / this.zoomRatio));
|
|
7397
|
+
}
|
|
7398
|
+
this.context.globalAlpha = e.globalAlpha, n.getAttribute("fill") && n.getAttribute("fill") !== "none" && (n.getAttribute("fill-opacity") && (this.context.globalAlpha = e.globalAlpha * this.parseOpacity(n.getAttribute("fill-opacity"))), this.context.fill(i)), n.getAttribute("stroke-opacity") ? this.context.globalAlpha = e.globalAlpha * this.parseOpacity(n.getAttribute("stroke-opacity")) : this.context.globalAlpha = e.globalAlpha, this.context.stroke(i), this.context.restore();
|
|
7365
7399
|
});
|
|
7366
7400
|
}
|
|
7367
7401
|
fragmentContext() {
|
|
@@ -7379,16 +7413,16 @@ var Ze = class {
|
|
|
7379
7413
|
};
|
|
7380
7414
|
//#endregion
|
|
7381
7415
|
//#region src/components/AnnotationsOverlay.jsx
|
|
7382
|
-
function
|
|
7416
|
+
function et({ canvasWorld: e, osdCanvasOverlay: t, viewer: n }, r, i, a) {
|
|
7383
7417
|
let [o, s] = e.canvasToWorldCoordinates(i.id), c = a.x - o, l = a.y - s;
|
|
7384
7418
|
if (r.svgSelector) {
|
|
7385
|
-
let e = t.context2d, { svgPaths: n } = new
|
|
7386
|
-
return [...n].some((t) => e.isPointInPath(
|
|
7419
|
+
let e = t.context2d, { svgPaths: n } = new $e({ resource: r });
|
|
7420
|
+
return [...n].some((t) => e.isPointInPath(ze(t), c, l));
|
|
7387
7421
|
}
|
|
7388
7422
|
if (r.pointSelector) {
|
|
7389
7423
|
let { x: t, y: a } = r.pointSelector, o = e.canvases.findIndex((e) => e.id === i.id), s = n.world.getItemAt(o);
|
|
7390
7424
|
if (!s) return !1;
|
|
7391
|
-
let u =
|
|
7425
|
+
let u = Qe(t, a, s.viewportToImageZoom(n.viewport.getZoom(!0))), d = c - u.x, f = l - u.y;
|
|
7392
7426
|
return d * d + f * f <= u.radius * u.radius;
|
|
7393
7427
|
}
|
|
7394
7428
|
if (r.fragmentSelector) {
|
|
@@ -7397,40 +7431,41 @@ function Qe({ canvasWorld: e, osdCanvasOverlay: t, viewer: n }, r, i, a) {
|
|
|
7397
7431
|
}
|
|
7398
7432
|
return !1;
|
|
7399
7433
|
}
|
|
7400
|
-
function
|
|
7434
|
+
function tt(e) {
|
|
7401
7435
|
let t = e.originalEvent?.pointerType;
|
|
7402
7436
|
return (t === "touch" || t === "pen") && e.quick === !1;
|
|
7403
7437
|
}
|
|
7404
|
-
function
|
|
7438
|
+
function nt(e) {
|
|
7405
7439
|
let t = /* @__PURE__ */ new Map();
|
|
7406
|
-
return Object.values((0,
|
|
7407
|
-
(0,
|
|
7440
|
+
return Object.values((0, Ne.default)(e.filter((e) => e.journeyId != null), (e) => e.journeyId)).forEach((e) => {
|
|
7441
|
+
(0, Ie.default)(e, (e) => e.journeyOrder).forEach((e, n) => t.set(e.id, n + 1));
|
|
7408
7442
|
}), t;
|
|
7409
7443
|
}
|
|
7410
|
-
function
|
|
7411
|
-
let
|
|
7412
|
-
|
|
7444
|
+
function rt({ annotations: e = [], canvasWorld: t, deselectAnnotation: n = () => {}, drawAnnotations: r = !0, drawSearchAnnotations: i = !0, highlightAllAnnotations: a = !1, hoverAnnotation: o = () => {}, hoveredAnnotationIds: s = [], lineStyle: c = null, palette: l = {}, searchAnnotations: u = [], selectAnnotation: d = () => {}, selectedAnnotationId: f = null, viewer: p = null, windowId: m }) {
|
|
7445
|
+
let h = Y(), g = J(() => new Re(p, h), [h, p]), _ = G((e) => {
|
|
7446
|
+
f === e ? n(m, e) : d(m, e);
|
|
7413
7447
|
}, [
|
|
7414
|
-
|
|
7448
|
+
f,
|
|
7415
7449
|
n,
|
|
7416
|
-
|
|
7417
|
-
|
|
7418
|
-
]),
|
|
7419
|
-
let r =
|
|
7450
|
+
d,
|
|
7451
|
+
m
|
|
7452
|
+
]), v = G((e, n) => {
|
|
7453
|
+
let r = g.context2d, i = e.flatMap((e) => e.resources), [o, l] = (0, Fe.default)(i, (e) => !e.pointSelector), [u, d] = (0, Fe.default)(l, (e) => e.id !== f), m = nt(l);
|
|
7420
7454
|
[
|
|
7421
7455
|
...o,
|
|
7422
|
-
...
|
|
7423
|
-
...
|
|
7456
|
+
...u,
|
|
7457
|
+
...d
|
|
7424
7458
|
].forEach((e) => {
|
|
7425
7459
|
let i = t.canvases.findIndex((t) => t.id === e.targetId);
|
|
7426
7460
|
if (i === -1) return;
|
|
7427
|
-
let o =
|
|
7461
|
+
let o = p.world.getItemAt(i);
|
|
7428
7462
|
if (!o) return;
|
|
7429
|
-
let
|
|
7430
|
-
new
|
|
7463
|
+
let l = t.offsetByCanvas(e.targetId), u = o.viewportToImageZoom(p.viewport.getZoom(!0));
|
|
7464
|
+
new $e({
|
|
7431
7465
|
hovered: s.includes(e.id),
|
|
7432
|
-
journeyStopNumber:
|
|
7433
|
-
|
|
7466
|
+
journeyStopNumber: m.get(e.id),
|
|
7467
|
+
lineStyle: c,
|
|
7468
|
+
offset: l,
|
|
7434
7469
|
palette: {
|
|
7435
7470
|
...n,
|
|
7436
7471
|
default: {
|
|
@@ -7439,57 +7474,58 @@ function tt({ annotations: e = [], canvasWorld: t, deselectAnnotation: n = () =>
|
|
|
7439
7474
|
}
|
|
7440
7475
|
},
|
|
7441
7476
|
resource: e,
|
|
7442
|
-
selected:
|
|
7443
|
-
zoomRatio:
|
|
7477
|
+
selected: f === e.id,
|
|
7478
|
+
zoomRatio: u
|
|
7444
7479
|
}).toContext(r);
|
|
7445
7480
|
});
|
|
7446
7481
|
}, [
|
|
7447
|
-
|
|
7448
|
-
|
|
7482
|
+
g,
|
|
7483
|
+
p,
|
|
7449
7484
|
t,
|
|
7450
7485
|
a,
|
|
7451
7486
|
s,
|
|
7452
|
-
|
|
7453
|
-
|
|
7454
|
-
|
|
7487
|
+
c,
|
|
7488
|
+
f
|
|
7489
|
+
]), y = G(() => {
|
|
7490
|
+
i && v(u, l.search), r && v(e, l.annotations);
|
|
7455
7491
|
}, [
|
|
7456
7492
|
e,
|
|
7457
|
-
|
|
7493
|
+
v,
|
|
7458
7494
|
r,
|
|
7459
7495
|
i,
|
|
7460
|
-
|
|
7461
|
-
|
|
7462
|
-
]),
|
|
7463
|
-
|
|
7464
|
-
}, [
|
|
7496
|
+
l,
|
|
7497
|
+
u
|
|
7498
|
+
]), b = G(() => {
|
|
7499
|
+
g && (g.clear(), g.resize(), g.canvasUpdate(y));
|
|
7500
|
+
}, [g, y]), x = G((n, r) => [...e, ...u].flatMap((e) => e.resources).filter((e) => n.id === e.targetId && et({
|
|
7465
7501
|
canvasWorld: t,
|
|
7466
|
-
osdCanvasOverlay:
|
|
7467
|
-
viewer:
|
|
7502
|
+
osdCanvasOverlay: g,
|
|
7503
|
+
viewer: p
|
|
7468
7504
|
}, e, n, r)), [
|
|
7469
7505
|
e,
|
|
7470
7506
|
t,
|
|
7471
|
-
|
|
7472
|
-
|
|
7473
|
-
|
|
7474
|
-
]),
|
|
7475
|
-
if (
|
|
7507
|
+
g,
|
|
7508
|
+
u,
|
|
7509
|
+
p
|
|
7510
|
+
]), S = G((e) => {
|
|
7511
|
+
if (tt(e)) return;
|
|
7476
7512
|
let { position: n, eventSource: { viewport: r } } = e, i = r.pointFromPixel(n), a = t.canvasAtPoint(i);
|
|
7477
7513
|
if (!a) return;
|
|
7478
|
-
let [o, s, c, l] = t.canvasToWorldCoordinates(a.id), u =
|
|
7514
|
+
let [o, s, c, l] = t.canvasToWorldCoordinates(a.id), u = x(a, i);
|
|
7479
7515
|
u.length > 0 && (e.preventDefaultAction = !0);
|
|
7480
|
-
let d = u.filter((e) => e.pointSelector),
|
|
7481
|
-
if (
|
|
7482
|
-
else if (
|
|
7516
|
+
let d = u.filter((e) => e.pointSelector), f = d.length > 0 ? d : u;
|
|
7517
|
+
if (f.length === 1) _(f[0].id);
|
|
7518
|
+
else if (f.length > 0) {
|
|
7483
7519
|
let e = (e) => {
|
|
7484
7520
|
let n = Math.PI / 180;
|
|
7485
7521
|
return (r) => {
|
|
7486
7522
|
let o = 0;
|
|
7487
7523
|
for (let s = 0; s < 360; s += 1) {
|
|
7488
7524
|
let c = Math.cos(s * n) * e + i.x, l = Math.sin(s * n) * e + i.y;
|
|
7489
|
-
|
|
7525
|
+
et({
|
|
7490
7526
|
canvasWorld: t,
|
|
7491
|
-
osdCanvasOverlay:
|
|
7492
|
-
viewer:
|
|
7527
|
+
osdCanvasOverlay: g,
|
|
7528
|
+
viewer: p
|
|
7493
7529
|
}, r, a, {
|
|
7494
7530
|
x: c,
|
|
7495
7531
|
y: l
|
|
@@ -7500,68 +7536,68 @@ function tt({ annotations: e = [], canvasWorld: t, deselectAnnotation: n = () =>
|
|
|
7500
7536
|
score: o
|
|
7501
7537
|
};
|
|
7502
7538
|
};
|
|
7503
|
-
}, n = 1, r = (0,
|
|
7504
|
-
for (; n < Math.max(c, l) && r[0].score === r[1].score;) n *= 2, r = (0,
|
|
7505
|
-
|
|
7539
|
+
}, n = 1, r = (0, Ie.default)(f.map(e(n)), "score");
|
|
7540
|
+
for (; n < Math.max(c, l) && r[0].score === r[1].score;) n *= 2, r = (0, Ie.default)(f.map(e(n)), "score");
|
|
7541
|
+
_(r[0].anno.id);
|
|
7506
7542
|
}
|
|
7507
7543
|
}, [
|
|
7508
|
-
|
|
7544
|
+
x,
|
|
7509
7545
|
t,
|
|
7510
|
-
h,
|
|
7511
7546
|
g,
|
|
7512
|
-
|
|
7513
|
-
|
|
7514
|
-
|
|
7515
|
-
|
|
7547
|
+
_,
|
|
7548
|
+
p
|
|
7549
|
+
]), C = B(G((n) => {
|
|
7550
|
+
if (e.length === 0 && u.length === 0) return;
|
|
7551
|
+
let { position: r } = n, i = p.viewport.pointFromPixel(r), a = t.canvasAtPoint(i);
|
|
7516
7552
|
if (!a) {
|
|
7517
|
-
o(
|
|
7553
|
+
o(m, []);
|
|
7518
7554
|
return;
|
|
7519
7555
|
}
|
|
7520
|
-
let c =
|
|
7521
|
-
(0,
|
|
7556
|
+
let c = x(a, i);
|
|
7557
|
+
(0, Le.default)(s, c.map((e) => e.id)).length > 0 && o(m, c.map((e) => e.id));
|
|
7522
7558
|
}, [
|
|
7523
7559
|
e,
|
|
7524
|
-
|
|
7560
|
+
x,
|
|
7525
7561
|
t,
|
|
7526
7562
|
o,
|
|
7527
7563
|
s,
|
|
7528
|
-
|
|
7529
|
-
|
|
7530
|
-
|
|
7531
|
-
]), 10),
|
|
7532
|
-
|
|
7564
|
+
u,
|
|
7565
|
+
p,
|
|
7566
|
+
m
|
|
7567
|
+
]), 10), w = G(() => {
|
|
7568
|
+
C.cancel(), o(m, []);
|
|
7533
7569
|
}, [
|
|
7534
7570
|
o,
|
|
7535
|
-
|
|
7536
|
-
|
|
7537
|
-
]),
|
|
7538
|
-
|
|
7539
|
-
}, [
|
|
7540
|
-
return
|
|
7541
|
-
if (
|
|
7542
|
-
|
|
7571
|
+
C,
|
|
7572
|
+
m
|
|
7573
|
+
]), T = G(() => {
|
|
7574
|
+
b();
|
|
7575
|
+
}, [b]);
|
|
7576
|
+
return q(() => {
|
|
7577
|
+
if (p) return p.addHandler("canvas-click", S), p.addHandler("canvas-exit", w), p.addHandler("mouse-move", C), p.addHandler("update-viewport", T), () => {
|
|
7578
|
+
p.removeHandler("canvas-click", S), p.removeHandler("canvas-exit", w), p.removeHandler("mouse-move", C), p.removeHandler("update-viewport", T);
|
|
7543
7579
|
};
|
|
7544
7580
|
}, [
|
|
7545
|
-
x,
|
|
7546
|
-
C,
|
|
7547
7581
|
S,
|
|
7548
7582
|
w,
|
|
7549
|
-
|
|
7550
|
-
|
|
7551
|
-
|
|
7583
|
+
C,
|
|
7584
|
+
T,
|
|
7585
|
+
p
|
|
7586
|
+
]), q(() => {
|
|
7587
|
+
p && p.forceRedraw();
|
|
7552
7588
|
}, [
|
|
7553
7589
|
e,
|
|
7554
7590
|
r,
|
|
7555
7591
|
i,
|
|
7556
7592
|
a,
|
|
7557
7593
|
s,
|
|
7558
|
-
|
|
7559
|
-
|
|
7560
|
-
|
|
7561
|
-
]),
|
|
7562
|
-
|
|
7563
|
-
}, [s,
|
|
7564
|
-
ref:
|
|
7594
|
+
u,
|
|
7595
|
+
f,
|
|
7596
|
+
p
|
|
7597
|
+
]), q(() => {
|
|
7598
|
+
h.current && (s.length > 0 ? h.current.style.cursor = "pointer" : h.current.style.cursor = "");
|
|
7599
|
+
}, [s, h]), p ? ye.createPortal(/* @__PURE__ */ X("div", {
|
|
7600
|
+
ref: h,
|
|
7565
7601
|
style: {
|
|
7566
7602
|
height: "100%",
|
|
7567
7603
|
left: 0,
|
|
@@ -7569,28 +7605,34 @@ function tt({ annotations: e = [], canvasWorld: t, deselectAnnotation: n = () =>
|
|
|
7569
7605
|
top: 0,
|
|
7570
7606
|
width: "100%"
|
|
7571
7607
|
},
|
|
7572
|
-
children: /* @__PURE__ */
|
|
7573
|
-
}),
|
|
7608
|
+
children: /* @__PURE__ */ X("canvas", {})
|
|
7609
|
+
}), p.canvas) : null;
|
|
7574
7610
|
}
|
|
7575
|
-
|
|
7576
|
-
annotations:
|
|
7577
|
-
canvasWorld:
|
|
7578
|
-
deselectAnnotation:
|
|
7579
|
-
drawAnnotations:
|
|
7580
|
-
drawSearchAnnotations:
|
|
7581
|
-
highlightAllAnnotations:
|
|
7582
|
-
hoverAnnotation:
|
|
7583
|
-
|
|
7584
|
-
|
|
7585
|
-
|
|
7586
|
-
|
|
7587
|
-
|
|
7588
|
-
|
|
7589
|
-
|
|
7611
|
+
rt.propTypes = {
|
|
7612
|
+
annotations: Z.default.arrayOf(Z.default.object),
|
|
7613
|
+
canvasWorld: Z.default.instanceOf(z).isRequired,
|
|
7614
|
+
deselectAnnotation: Z.default.func,
|
|
7615
|
+
drawAnnotations: Z.default.bool,
|
|
7616
|
+
drawSearchAnnotations: Z.default.bool,
|
|
7617
|
+
highlightAllAnnotations: Z.default.bool,
|
|
7618
|
+
hoverAnnotation: Z.default.func,
|
|
7619
|
+
lineStyle: Z.default.shape({
|
|
7620
|
+
curve: Z.default.bool,
|
|
7621
|
+
lineDash: Z.default.arrayOf(Z.default.number),
|
|
7622
|
+
lineWidth: Z.default.number,
|
|
7623
|
+
strokeStyle: Z.default.string
|
|
7624
|
+
}),
|
|
7625
|
+
hoveredAnnotationIds: Z.default.arrayOf(Z.default.string),
|
|
7626
|
+
palette: Z.default.object,
|
|
7627
|
+
searchAnnotations: Z.default.arrayOf(Z.default.object),
|
|
7628
|
+
selectAnnotation: Z.default.func,
|
|
7629
|
+
selectedAnnotationId: Z.default.string,
|
|
7630
|
+
viewer: Z.default.object,
|
|
7631
|
+
windowId: Z.default.string.isRequired
|
|
7590
7632
|
};
|
|
7591
7633
|
//#endregion
|
|
7592
7634
|
//#region src/components/ImageFailureMessage.jsx
|
|
7593
|
-
var
|
|
7635
|
+
var it = _e(be)(({ theme: e }) => ({
|
|
7594
7636
|
position: "absolute",
|
|
7595
7637
|
top: e.spacing(2),
|
|
7596
7638
|
left: "50%",
|
|
@@ -7602,21 +7644,21 @@ var nt = ve(xe)(({ theme: e }) => ({
|
|
|
7602
7644
|
zIndex: 1e3,
|
|
7603
7645
|
pointerEvents: "none"
|
|
7604
7646
|
}));
|
|
7605
|
-
function
|
|
7606
|
-
let { failedImages: t } =
|
|
7607
|
-
return e.some((e) => t.has(e)) ? /* @__PURE__ */
|
|
7647
|
+
function at({ imageUrls: e = [] }) {
|
|
7648
|
+
let { failedImages: t } = K(F), { t: n } = ge();
|
|
7649
|
+
return e.some((e) => t.has(e)) ? /* @__PURE__ */ X(it, {
|
|
7608
7650
|
role: "status",
|
|
7609
7651
|
"aria-live": "polite",
|
|
7610
|
-
children: /* @__PURE__ */
|
|
7652
|
+
children: /* @__PURE__ */ X(ve, {
|
|
7611
7653
|
variant: "body2",
|
|
7612
7654
|
children: n("imageFailedToLoad")
|
|
7613
7655
|
})
|
|
7614
7656
|
}) : null;
|
|
7615
7657
|
}
|
|
7616
|
-
|
|
7617
|
-
var
|
|
7658
|
+
at.propTypes = { imageUrls: Z.default.arrayOf(Z.default.string) };
|
|
7659
|
+
var ot = i(h((e, { windowId: t }) => ({
|
|
7618
7660
|
annotations: re(e, { windowId: t }),
|
|
7619
|
-
canvasWorld:
|
|
7661
|
+
canvasWorld: xe(e, { windowId: t }),
|
|
7620
7662
|
drawAnnotations: O(e).window.forceDrawAnnotations || _(e, {
|
|
7621
7663
|
content: "annotations",
|
|
7622
7664
|
windowId: t
|
|
@@ -7632,9 +7674,9 @@ var it = i(h((e, { windowId: t }) => ({
|
|
|
7632
7674
|
selectedAnnotationId: M(e, { windowId: t })
|
|
7633
7675
|
}), {
|
|
7634
7676
|
deselectAnnotation: N,
|
|
7635
|
-
hoverAnnotation:
|
|
7677
|
+
hoverAnnotation: P,
|
|
7636
7678
|
selectAnnotation: ie
|
|
7637
|
-
}), d("AnnotationsOverlay"))(
|
|
7679
|
+
}), d("AnnotationsOverlay"))(rt), st = {
|
|
7638
7680
|
get(e) {
|
|
7639
7681
|
return this.refs[e];
|
|
7640
7682
|
},
|
|
@@ -7645,13 +7687,13 @@ var it = i(h((e, { windowId: t }) => ({
|
|
|
7645
7687
|
set(e, t) {
|
|
7646
7688
|
this.refs[e] = t;
|
|
7647
7689
|
}
|
|
7648
|
-
},
|
|
7690
|
+
}, ct = de(void 0);
|
|
7649
7691
|
//#endregion
|
|
7650
7692
|
//#region src/components/OpenSeadragonComponent.jsx
|
|
7651
|
-
function
|
|
7652
|
-
let c =
|
|
7693
|
+
function lt({ children: e = void 0, Container: t = "div", osdConfig: n = {}, viewerConfig: r = {}, onUpdateViewport: i = () => {}, setViewer: a = () => {}, style: o = {}, ...s }) {
|
|
7694
|
+
let c = fe(), l = Y(), [u, d] = me(!1), f = Y(void 0), p = Y(!1), m = Y(null), h = Y(!1), [, g] = pe((e) => e + 1, 0), _ = B(G((e) => {
|
|
7653
7695
|
f.current?.raiseEvent("mouse-move", e);
|
|
7654
|
-
}, [f]), 10), v =
|
|
7696
|
+
}, [f]), 10), v = G((e) => {
|
|
7655
7697
|
let { viewport: t } = e.eventSource;
|
|
7656
7698
|
p.current && (h.current || i({
|
|
7657
7699
|
bounds: t.getBounds(),
|
|
@@ -7661,10 +7703,10 @@ function st({ children: e = void 0, Container: t = "div", osdConfig: n = {}, vie
|
|
|
7661
7703
|
y: Math.round(t.centerSpringY.target.value),
|
|
7662
7704
|
zoom: t.zoomSpring.target.value
|
|
7663
7705
|
}));
|
|
7664
|
-
}, [i, p]), y =
|
|
7665
|
-
p.current || (p.current = !0, r.x != null && r.y != null && e.panTo(new
|
|
7706
|
+
}, [i, p]), y = G(({ viewport: e }) => {
|
|
7707
|
+
p.current || (p.current = !0, r.x != null && r.y != null && e.panTo(new Q.default.Point(r.x, r.y), !0), r.zoom != null && e.zoomTo(r.zoom, new Q.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 Q.default.Rect(...r.bounds), !0), m.current = r.bounds) : e.goHome(!0)));
|
|
7666
7708
|
}, [p, r]);
|
|
7667
|
-
|
|
7709
|
+
q(() => {
|
|
7668
7710
|
let e = f.current;
|
|
7669
7711
|
if (!e) return;
|
|
7670
7712
|
let { viewport: t } = e;
|
|
@@ -7674,19 +7716,19 @@ function st({ children: e = void 0, Container: t = "div", osdConfig: n = {}, vie
|
|
|
7674
7716
|
}
|
|
7675
7717
|
if (r.bounds && (!m.current || r.bounds.length !== m.current.length || r.bounds.some((e, t) => e !== m.current[t]))) {
|
|
7676
7718
|
h.current = !0, m.current = r.bounds, e.addOnceHandler("tile-loaded", () => {
|
|
7677
|
-
let e = new
|
|
7719
|
+
let e = new Q.default.Rect(...r.bounds);
|
|
7678
7720
|
t.fitBoundsWithConstraints(e, !0), h.current = !1;
|
|
7679
7721
|
});
|
|
7680
7722
|
return;
|
|
7681
7723
|
}
|
|
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
|
|
7724
|
+
!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 Q.default.Point(r.x, r.y), !1), r.zoom != null && r.zoom !== t.zoomSpring.target.value && t.zoomTo(r.zoom, new Q.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));
|
|
7683
7725
|
}, [
|
|
7684
7726
|
p,
|
|
7685
7727
|
y,
|
|
7686
7728
|
r,
|
|
7687
7729
|
f
|
|
7688
|
-
]),
|
|
7689
|
-
let e = (0,
|
|
7730
|
+
]), q(() => {
|
|
7731
|
+
let e = (0, Q.default)({
|
|
7690
7732
|
element: l.current,
|
|
7691
7733
|
...n
|
|
7692
7734
|
});
|
|
@@ -7701,21 +7743,21 @@ function st({ children: e = void 0, Container: t = "div", osdConfig: n = {}, vie
|
|
|
7701
7743
|
}), e.addHandler("animation-finish", v), e.innerTracker.moveHandler = _, f.current = e, a(e), e.addOnceHandler("tile-loaded", () => {
|
|
7702
7744
|
p.current = !1, y(e);
|
|
7703
7745
|
}), g();
|
|
7704
|
-
}, [l]),
|
|
7746
|
+
}, [l]), q(() => () => {
|
|
7705
7747
|
let e = f.current;
|
|
7706
7748
|
e && (e.innerTracker?.moveHandler === _ && (e.innerTracker.moveHandler = () => {}), e.removeAllHandlers(), e.destroy(), f.current = void 0, a(null));
|
|
7707
7749
|
}, []);
|
|
7708
|
-
let { t: b } =
|
|
7709
|
-
return
|
|
7750
|
+
let { t: b } = ge();
|
|
7751
|
+
return q(() => {
|
|
7710
7752
|
let e = f?.current?.canvas?.firstElementChild;
|
|
7711
7753
|
e && (e.setAttribute("role", "img"), e.setAttribute("aria-label", b("digitizedView")), e.setAttribute("aria-describedby", c));
|
|
7712
7754
|
}, [
|
|
7713
7755
|
f?.current?.canvas?.firstElementChild,
|
|
7714
7756
|
c,
|
|
7715
7757
|
b
|
|
7716
|
-
]), /* @__PURE__ */
|
|
7758
|
+
]), /* @__PURE__ */ X(ct.Provider, {
|
|
7717
7759
|
value: f,
|
|
7718
|
-
children: /* @__PURE__ */
|
|
7760
|
+
children: /* @__PURE__ */ X(t, {
|
|
7719
7761
|
id: c,
|
|
7720
7762
|
ref: l,
|
|
7721
7763
|
style: {
|
|
@@ -7727,33 +7769,33 @@ function st({ children: e = void 0, Container: t = "div", osdConfig: n = {}, vie
|
|
|
7727
7769
|
})
|
|
7728
7770
|
});
|
|
7729
7771
|
}
|
|
7730
|
-
|
|
7731
|
-
children:
|
|
7732
|
-
Container:
|
|
7733
|
-
onUpdateViewport:
|
|
7734
|
-
osdConfig:
|
|
7735
|
-
setViewer:
|
|
7736
|
-
style:
|
|
7737
|
-
viewerConfig:
|
|
7738
|
-
bounds:
|
|
7739
|
-
flip:
|
|
7740
|
-
rotation:
|
|
7741
|
-
x:
|
|
7742
|
-
y:
|
|
7743
|
-
zoom:
|
|
7772
|
+
lt.propTypes = {
|
|
7773
|
+
children: Z.default.node,
|
|
7774
|
+
Container: Z.default.elementType,
|
|
7775
|
+
onUpdateViewport: Z.default.func,
|
|
7776
|
+
osdConfig: Z.default.object,
|
|
7777
|
+
setViewer: Z.default.func,
|
|
7778
|
+
style: Z.default.object,
|
|
7779
|
+
viewerConfig: Z.default.shape({
|
|
7780
|
+
bounds: Z.default.arrayOf(Z.default.number),
|
|
7781
|
+
flip: Z.default.bool,
|
|
7782
|
+
rotation: Z.default.number,
|
|
7783
|
+
x: Z.default.number,
|
|
7784
|
+
y: Z.default.number,
|
|
7785
|
+
zoom: Z.default.number
|
|
7744
7786
|
})
|
|
7745
7787
|
};
|
|
7746
7788
|
//#endregion
|
|
7747
7789
|
//#region src/components/OpenSeadragonTileSource.jsx
|
|
7748
|
-
function
|
|
7749
|
-
let a =
|
|
7750
|
-
return
|
|
7790
|
+
function ut({ index: e = void 0, opacity: t = void 0, fitBounds: n = void 0, tileSource: r = {}, url: i = void 0 }) {
|
|
7791
|
+
let a = K(ct), { notifyFailure: o, fallbackImage: s } = K(F), c = Y(void 0);
|
|
7792
|
+
return q(() => {
|
|
7751
7793
|
t != null && c.current?.setOpacity(t);
|
|
7752
|
-
}, [t]),
|
|
7753
|
-
n && c.current?.fitBounds(new
|
|
7754
|
-
}, [n]),
|
|
7794
|
+
}, [t]), q(() => {
|
|
7795
|
+
n && c.current?.fitBounds(new Q.default.Rect(...n));
|
|
7796
|
+
}, [n]), q(() => {
|
|
7755
7797
|
!c.current || !a?.current || e == null || a.current.world.setItemIndex(c.current, e);
|
|
7756
|
-
}, [e, a]),
|
|
7798
|
+
}, [e, a]), q(() => {
|
|
7757
7799
|
if (!a?.current) return;
|
|
7758
7800
|
let l = () => {
|
|
7759
7801
|
s && a.current.addTiledImage({
|
|
@@ -7763,7 +7805,7 @@ function ct({ index: e = void 0, opacity: t = void 0, fitBounds: n = void 0, til
|
|
|
7763
7805
|
},
|
|
7764
7806
|
index: e,
|
|
7765
7807
|
opacity: t,
|
|
7766
|
-
fitBounds: n ? new
|
|
7808
|
+
fitBounds: n ? new Q.default.Rect(...n) : void 0,
|
|
7767
7809
|
success: (e) => {
|
|
7768
7810
|
c.current = e.item;
|
|
7769
7811
|
}
|
|
@@ -7777,7 +7819,7 @@ function ct({ index: e = void 0, opacity: t = void 0, fitBounds: n = void 0, til
|
|
|
7777
7819
|
tileSource: u,
|
|
7778
7820
|
index: e,
|
|
7779
7821
|
opacity: t,
|
|
7780
|
-
fitBounds: n ? new
|
|
7822
|
+
fitBounds: n ? new Q.default.Rect(...n) : void 0,
|
|
7781
7823
|
success: (e) => s(e),
|
|
7782
7824
|
error: (e) => {
|
|
7783
7825
|
let t = i || (typeof r == "string" ? r : r?.["@id"]);
|
|
@@ -7794,63 +7836,63 @@ function ct({ index: e = void 0, opacity: t = void 0, fitBounds: n = void 0, til
|
|
|
7794
7836
|
});
|
|
7795
7837
|
}, [a?.current, i]), null;
|
|
7796
7838
|
}
|
|
7797
|
-
|
|
7798
|
-
fitBounds:
|
|
7799
|
-
index:
|
|
7800
|
-
opacity:
|
|
7801
|
-
tileSource:
|
|
7802
|
-
url:
|
|
7839
|
+
ut.propTypes = {
|
|
7840
|
+
fitBounds: Z.default.arrayOf(Z.default.number),
|
|
7841
|
+
index: Z.default.number,
|
|
7842
|
+
opacity: Z.default.number,
|
|
7843
|
+
tileSource: Z.default.oneOfType([Z.default.string, Z.default.object]),
|
|
7844
|
+
url: Z.default.string
|
|
7803
7845
|
};
|
|
7804
7846
|
//#endregion
|
|
7805
7847
|
//#region src/components/OpenSeadragonViewer.jsx
|
|
7806
|
-
var
|
|
7848
|
+
var dt = _e("section")({
|
|
7807
7849
|
cursor: "grab",
|
|
7808
7850
|
flex: 1,
|
|
7809
7851
|
position: "relative"
|
|
7810
7852
|
});
|
|
7811
|
-
function
|
|
7812
|
-
let { t:
|
|
7813
|
-
|
|
7853
|
+
function ft({ children: e = null, label: t = null, windowId: n, osdConfig: r = {}, viewerConfig: i = null, drawAnnotations: a = !1, infoResponses: o = [], canvasWorld: s, nonTiledImages: c = [], site: l = !1, updateViewport: u, ...d }) {
|
|
7854
|
+
let { t: f } = ge(), p = Y(), [m, h] = me(null), g = G(({ flip: e, rotation: t, x: r, y: i, zoom: a }) => {
|
|
7855
|
+
u(n, {
|
|
7814
7856
|
flip: e,
|
|
7815
7857
|
rotation: t,
|
|
7816
7858
|
x: r,
|
|
7817
7859
|
y: i,
|
|
7818
7860
|
zoom: a
|
|
7819
7861
|
});
|
|
7820
|
-
}, [
|
|
7821
|
-
|
|
7822
|
-
}, [s,
|
|
7823
|
-
|
|
7824
|
-
|
|
7825
|
-
}, [
|
|
7826
|
-
let
|
|
7862
|
+
}, [u, n]), _ = G((e = !0) => {
|
|
7863
|
+
p.current?.viewport && p.current.viewport.fitBounds(new Q.default.Rect(...s.worldBounds()), e);
|
|
7864
|
+
}, [s, p]);
|
|
7865
|
+
q(() => (st.set(n, p), () => st.remove(n)), [p, n]), q(() => {
|
|
7866
|
+
p.current = m;
|
|
7867
|
+
}, [p, m]);
|
|
7868
|
+
let v = W.map(e, (e) => ue(e, { zoomToWorld: _ })), y = {
|
|
7827
7869
|
canvasWorld: s,
|
|
7828
7870
|
drawAnnotations: a,
|
|
7829
7871
|
infoResponses: o,
|
|
7830
7872
|
label: t,
|
|
7831
7873
|
nonTiledImages: c,
|
|
7832
7874
|
osdConfig: r,
|
|
7833
|
-
t:
|
|
7834
|
-
updateViewport:
|
|
7875
|
+
t: f,
|
|
7876
|
+
updateViewport: u,
|
|
7835
7877
|
viewerConfig: i,
|
|
7836
7878
|
windowId: n,
|
|
7837
|
-
...
|
|
7838
|
-
},
|
|
7839
|
-
return /* @__PURE__ */
|
|
7840
|
-
className: (0,
|
|
7841
|
-
Container:
|
|
7879
|
+
...d
|
|
7880
|
+
}, b = J(() => [...o.map((e) => e.id), ...c.map((e) => e.id)], [o, c]);
|
|
7881
|
+
return /* @__PURE__ */ he(lt, {
|
|
7882
|
+
className: (0, Pe.default)(le("osd-container")),
|
|
7883
|
+
Container: dt,
|
|
7842
7884
|
osdConfig: r,
|
|
7843
7885
|
viewerConfig: i || (s.hasDimensions() ? { bounds: s.worldBounds() } : void 0),
|
|
7844
|
-
onUpdateViewport:
|
|
7845
|
-
setViewer:
|
|
7846
|
-
"aria-label":
|
|
7847
|
-
"aria-live": "polite",
|
|
7886
|
+
onUpdateViewport: g,
|
|
7887
|
+
setViewer: h,
|
|
7888
|
+
"aria-label": f("item", { label: t }),
|
|
7889
|
+
"aria-live": l ? void 0 : "polite",
|
|
7848
7890
|
children: [
|
|
7849
7891
|
o.map((e) => {
|
|
7850
7892
|
let t = s.contentResource(e.id);
|
|
7851
7893
|
if (!t) return null;
|
|
7852
7894
|
let n = s.contentResourceToWorldCoordinates(t), r = s.layerIndexOfImageResource(t), i = s.layerOpacityOfImageResource(t);
|
|
7853
|
-
return /* @__PURE__ */
|
|
7895
|
+
return /* @__PURE__ */ X(ut, {
|
|
7854
7896
|
tileSource: e.json,
|
|
7855
7897
|
fitBounds: n,
|
|
7856
7898
|
index: r,
|
|
@@ -7861,43 +7903,44 @@ function ut({ children: e = null, label: t = null, windowId: n, osdConfig: r = {
|
|
|
7861
7903
|
let t = e.getProperty("type"), n = e.getProperty("format") || "";
|
|
7862
7904
|
if (!(t === "Image" || t === "dctypes:Image" || n.startsWith("image/"))) return null;
|
|
7863
7905
|
let r = s.contentResourceToWorldCoordinates(e), i = s.layerIndexOfImageResource(e), a = s.layerOpacityOfImageResource(e);
|
|
7864
|
-
return /* @__PURE__ */
|
|
7906
|
+
return /* @__PURE__ */ X(ut, {
|
|
7865
7907
|
url: e.id,
|
|
7866
7908
|
fitBounds: r,
|
|
7867
7909
|
index: i,
|
|
7868
7910
|
opacity: a
|
|
7869
7911
|
}, e.id);
|
|
7870
7912
|
}),
|
|
7871
|
-
a && /* @__PURE__ */
|
|
7872
|
-
viewer:
|
|
7913
|
+
a && /* @__PURE__ */ X(ot, {
|
|
7914
|
+
viewer: m,
|
|
7873
7915
|
windowId: n
|
|
7874
7916
|
}),
|
|
7875
|
-
|
|
7876
|
-
/* @__PURE__ */
|
|
7877
|
-
/* @__PURE__ */
|
|
7917
|
+
v,
|
|
7918
|
+
/* @__PURE__ */ X(at, { imageUrls: b }),
|
|
7919
|
+
/* @__PURE__ */ X(U, {
|
|
7878
7920
|
targetName: "OpenSeadragonViewer",
|
|
7879
|
-
viewer:
|
|
7880
|
-
...
|
|
7921
|
+
viewer: m,
|
|
7922
|
+
...y
|
|
7881
7923
|
})
|
|
7882
7924
|
]
|
|
7883
7925
|
});
|
|
7884
7926
|
}
|
|
7885
|
-
|
|
7886
|
-
|
|
7887
|
-
|
|
7888
|
-
|
|
7889
|
-
|
|
7890
|
-
|
|
7891
|
-
|
|
7892
|
-
|
|
7893
|
-
|
|
7894
|
-
|
|
7895
|
-
|
|
7927
|
+
ft.propTypes = {
|
|
7928
|
+
site: Z.default.bool,
|
|
7929
|
+
canvasWorld: Z.default.instanceOf(z).isRequired,
|
|
7930
|
+
children: Z.default.node,
|
|
7931
|
+
drawAnnotations: Z.default.bool,
|
|
7932
|
+
infoResponses: Z.default.arrayOf(Z.default.object),
|
|
7933
|
+
label: Z.default.string,
|
|
7934
|
+
nonTiledImages: Z.default.array,
|
|
7935
|
+
osdConfig: Z.default.object,
|
|
7936
|
+
updateViewport: Z.default.func.isRequired,
|
|
7937
|
+
viewerConfig: Z.default.object,
|
|
7938
|
+
windowId: Z.default.string.isRequired
|
|
7896
7939
|
};
|
|
7897
7940
|
//#endregion
|
|
7898
7941
|
//#region src/containers/OpenSeadragonViewer.js
|
|
7899
|
-
var
|
|
7900
|
-
let n =
|
|
7942
|
+
var pt = /* @__PURE__ */ l({ default: () => mt }), mt = i(h((e, { windowId: t }) => {
|
|
7943
|
+
let n = xe(e, { windowId: t }), r = j(e), i = n.canvases.flatMap((e) => e.imageServiceIds);
|
|
7901
7944
|
return {
|
|
7902
7945
|
canvasWorld: n,
|
|
7903
7946
|
drawAnnotations: O(e).window.forceDrawAnnotations || _(e, {
|
|
@@ -7914,10 +7957,11 @@ var dt = /* @__PURE__ */ l({ default: () => ft }), ft = i(h((e, { windowId: t })
|
|
|
7914
7957
|
}),
|
|
7915
7958
|
nonTiledImages: te(e, { windowId: t }),
|
|
7916
7959
|
osdConfig: O(e).osdConfig,
|
|
7960
|
+
site: O(e).maps?.site === !0,
|
|
7917
7961
|
viewerConfig: f(e, { windowId: t })
|
|
7918
7962
|
};
|
|
7919
|
-
}, { updateViewport:
|
|
7963
|
+
}, { updateViewport: V }), d("OpenSeadragonViewer"))(ft);
|
|
7920
7964
|
//#endregion
|
|
7921
|
-
export {
|
|
7965
|
+
export { ot as a, nt as c, Me as d, xe as f, st as i, $e as l, pt as n, at as o, ft as r, rt as s, mt as t, Re as u };
|
|
7922
7966
|
|
|
7923
|
-
//# sourceMappingURL=OpenSeadragonViewer-
|
|
7967
|
+
//# sourceMappingURL=OpenSeadragonViewer-Dm_GZoQ8.js.map
|