dbf-mirador 4.3.6 → 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.
Files changed (49) hide show
  1. package/README.md +8 -0
  2. package/dist/{CommentSharp-CqGF7axd.js → CommentSharp-c9-KZf2H.js} +2 -2
  3. package/dist/{CommentSharp-CqGF7axd.js.map → CommentSharp-c9-KZf2H.js.map} +1 -1
  4. package/dist/{FailedImageContext-yYxY_Y6U.js → FailedImageContext-B8nqS86j.js} +7 -1
  5. package/dist/FailedImageContext-B8nqS86j.js.map +1 -0
  6. package/dist/{GalleryView-CVBvyOpD.js → GalleryView-UEgvJwF4.js} +3 -3
  7. package/dist/{GalleryView-CVBvyOpD.js.map → GalleryView-UEgvJwF4.js.map} +1 -1
  8. package/dist/{OpenSeadragonViewer-CYMXINoT.js → OpenSeadragonViewer-Dm_GZoQ8.js} +407 -363
  9. package/dist/OpenSeadragonViewer-Dm_GZoQ8.js.map +1 -0
  10. package/dist/{WindowViewer-CCpOO735.js → WindowViewer-DARS4uQ5.js} +2 -2
  11. package/dist/{WindowViewer-CCpOO735.js.map → WindowViewer-DARS4uQ5.js.map} +1 -1
  12. package/dist/{WorkspaceArea-DklqbMLL.js → WorkspaceArea-CjoBaSS5.js} +46 -39
  13. package/dist/WorkspaceArea-CjoBaSS5.js.map +1 -0
  14. package/dist/mirador.es.js +3365 -1958
  15. package/dist/mirador.es.js.map +1 -1
  16. package/dist/mirador.min.js +73 -73
  17. package/dist/mirador.min.js.map +1 -1
  18. package/package.json +1 -1
  19. package/src/components/AnnotationsOverlay.jsx +9 -1
  20. package/src/components/AppProviders.jsx +22 -2
  21. package/src/components/CompanionWindow.jsx +61 -52
  22. package/src/components/MapViewer.jsx +31 -3
  23. package/src/components/OpenSeadragonViewer.jsx +3 -1
  24. package/src/components/Workspace.jsx +8 -3
  25. package/src/components/WorkspaceArea.jsx +10 -1
  26. package/src/containers/AppProviders.js +3 -0
  27. package/src/containers/OpenSeadragonViewer.js +2 -0
  28. package/src/containers/Workspace.js +2 -0
  29. package/src/containers/WorkspaceArea.js +2 -0
  30. package/src/lib/AnnotationItem.js +5 -0
  31. package/src/lib/AnnotationResource.js +5 -0
  32. package/src/lib/CanvasAnnotationDisplay.js +23 -2
  33. package/src/lib/smoothPath.js +54 -0
  34. package/src/plugins/audioPlayer.tsx +244 -0
  35. package/src/plugins/fillView.ts +152 -0
  36. package/src/plugins/index.js +2 -0
  37. package/src/plugins/mapInteractionPlugin.tsx +13 -49
  38. package/src/plugins/nestedMapPlugin.tsx +161 -12
  39. package/src/plugins/poiPreviewPlugin.tsx +974 -36
  40. package/src/plugins/previewIds.ts +15 -0
  41. package/src/plugins/scrollSelect.ts +146 -0
  42. package/src/plugins/sheetGestures.ts +215 -0
  43. package/src/plugins/siteMapToolsPlugin.tsx +264 -0
  44. package/src/plugins/sitePanelState.ts +162 -0
  45. package/src/plugins/sitePins.ts +295 -0
  46. package/src/plugins/tourOrder.ts +48 -0
  47. package/dist/FailedImageContext-yYxY_Y6U.js.map +0 -1
  48. package/dist/OpenSeadragonViewer-CYMXINoT.js.map +0 -1
  49. package/dist/WorkspaceArea-DklqbMLL.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 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";
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 Se = p([
15
+ var xe = p([
16
16
  C,
17
- ce,
17
+ se,
18
18
  y,
19
19
  b
20
- ], (e, t, n, r) => new R(e.map(r), t, n)), Ce = /* @__PURE__ */ g(((e, t) => {
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
- })), we = /* @__PURE__ */ g(((e, t) => {
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
- })), Te = /* @__PURE__ */ g(((e, t) => {
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
- })), Ee = /* @__PURE__ */ g(((e, t) => {
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
- })), De = /* @__PURE__ */ g(((e, t) => {
54
- var n = Ee();
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
- })), 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();
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
- })), ke = /* @__PURE__ */ g(((e, n) => {
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
- })), Ae = /* @__PURE__ */ g(((e, t) => {
94
- var n = L(), r = Oe(), i = I(), a = ke();
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
- })), je = /* @__PURE__ */ g(((e, t) => {
101
- var n = se(), r = L(), i = F();
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
- })), Me = /* @__PURE__ */ g(((e, t) => {
110
- var n = T(), r = I(), i = je(), a = le();
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
- })), Ne = /* @__PURE__ */ g(((e, t) => {
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
- oe(a, e);
1112
+ P(a, e);
1113
1113
  },
1114
1114
  mouseout: function(e) {
1115
- P(a, e);
1115
+ F(a, e);
1116
1116
  },
1117
1117
  mousedown: function(e) {
1118
- F(a, e);
1118
+ I(a, e);
1119
1119
  },
1120
1120
  mouseup: function(e) {
1121
- I(a, e);
1121
+ L(a, e);
1122
1122
  },
1123
1123
  mousemove: function(e) {
1124
- R(a, e);
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
- oe(a, e);
1157
+ P(a, e);
1158
1158
  },
1159
1159
  pointerout: function(e) {
1160
- P(a, e);
1160
+ F(a, e);
1161
1161
  },
1162
1162
  pointerdown: function(e) {
1163
- F(a, e);
1163
+ I(a, e);
1164
1164
  },
1165
1165
  pointerup: function(e) {
1166
- I(a, e);
1166
+ L(a, e);
1167
1167
  },
1168
1168
  pointermove: function(e) {
1169
- R(a, e);
1169
+ z(a, e);
1170
1170
  },
1171
1171
  pointercancel: function(e) {
1172
- le(a, e);
1172
+ ce(a, e);
1173
1173
  },
1174
1174
  pointerupcaptured: function(e) {
1175
- se(a, e);
1175
+ oe(a, e);
1176
1176
  },
1177
1177
  pointermovecaptured: function(e) {
1178
- ce(a, e);
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++) V(e, a, s[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
- U(t, n, !0);
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
- U(t, n, !1);
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
- H(t, r), r.preventDefault && !r.defaultPrevented && e.cancelEvent(n), r.stopPropagation && e.stopEvent(n);
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
- H(t, r), r.preventDefault && !r.defaultPrevented && e.cancelEvent(n), r.stopPropagation && e.stopEvent(n);
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
- H(t, i), t.keyDownHandler && !i.preventGesture && !i.defaultPrevented && (r = {
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
- H(t, i), t.keyUpHandler && !i.preventGesture && !i.defaultPrevented && (r = {
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
- H(t, i), t.keyHandler && !i.preventGesture && !i.defaultPrevented && (r = {
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
- H(e, n), e.focusHandler && !n.preventGesture && e.focusHandler({
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
- H(e, n), e.blurHandler && !n.preventGesture && e.blurHandler({
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
- H(t, i), t.contextMenuHandler && !i.preventGesture && !i.defaultPrevented && (r = {
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
- }, H(t, a), t.scrollHandler && !a.preventGesture && !a.defaultPrevented && (o = {
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
- H(t, i), n.target === t.element && U(t, r, !1), i.stopPropagation && e.stopEvent(n);
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 (H(t, c), i = 0; i < a; i++) o = {
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
- }, de(t, c, o), K(t, c, o, 0), U(t, o, !0);
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 (H(t, s), i = 0; i < a; i++) o = {
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
- }, pe(t, s, o, 0), U(t, o, !1), fe(t, s, o);
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 (H(t, s), i = 0; i < a; i++) o = {
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
- }, q(t, s, o);
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 (H(t, o), i = 0; i < r; i++) a = {
1648
+ for (U(t, o), i = 0; i < r; i++) a = {
1649
1649
  id: n.changedTouches[i].identifier,
1650
1650
  type: "touch"
1651
- }, me(t, o, a);
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
- H(t, r), n.target === t.element && U(t, {
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
- H(t, r), n.target === t.element && U(t, {
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
- H(t, i), de(t, i, r);
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
- H(t, i), fe(t, i, r);
1712
+ U(t, i), de(t, i, r);
1713
1713
  }
1714
- function oe(t, n) {
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
- H(t, i), W(t, i, r), i.preventDefault && !i.defaultPrevented && e.cancelEvent(n), i.stopPropagation && e.stopEvent(n);
1727
+ U(t, i), G(t, i, r), i.preventDefault && !i.defaultPrevented && e.cancelEvent(n), i.stopPropagation && e.stopEvent(n);
1728
1728
  }
1729
- function P(t, n) {
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
- H(t, i), G(t, i, r), i.preventDefault && !i.defaultPrevented && e.cancelEvent(n), i.stopPropagation && e.stopEvent(n);
1742
+ U(t, i), K(t, i, r), i.preventDefault && !i.defaultPrevented && e.cancelEvent(n), i.stopPropagation && e.stopEvent(n);
1743
1743
  }
1744
- function F(t, n) {
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
- 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));
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 I(e, t) {
1760
- L(e, t);
1759
+ function L(e, t) {
1760
+ R(e, t);
1761
1761
  }
1762
- function se(t, n) {
1763
- t.getActivePointersListByType(f(n)).getById(n.pointerId) && L(t, n), e.stopEvent(n);
1762
+ function oe(t, n) {
1763
+ t.getActivePointersListByType(f(n)).getById(n.pointerId) && R(t, n), e.stopEvent(n);
1764
1764
  }
1765
- function L(t, n) {
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
- 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));
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 R(e, t) {
1781
- z(e, t);
1780
+ function z(e, t) {
1781
+ B(e, t);
1782
1782
  }
1783
- function ce(t, n) {
1784
- t.getActivePointersListByType(f(n)).getById(n.pointerId) && z(t, n), e.stopEvent(n);
1783
+ function se(t, n) {
1784
+ t.getActivePointersListByType(f(n)).getById(n.pointerId) && B(t, n), e.stopEvent(n);
1785
1785
  }
1786
- function z(t, n) {
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
- H(t, i), q(t, i, r), i.preventDefault && !i.defaultPrevented && e.cancelEvent(n), i.stopPropagation && e.stopEvent(n);
1799
+ U(t, i), J(t, i, r), i.preventDefault && !i.defaultPrevented && e.cancelEvent(n), i.stopPropagation && e.stopEvent(n);
1800
1800
  }
1801
- function le(t, n) {
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
- H(t, i), me(t, i, r), i.stopPropagation && e.stopEvent(n);
1811
+ U(t, i), pe(t, i, r), i.stopPropagation && e.stopEvent(n);
1812
1812
  }
1813
- function B(e, t) {
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 V(t, n, r) {
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 ue(e, t) {
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 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);
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 U(t, n, r) {
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 de(e, t, n) {
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, B(r, n)), e.enterHandler && e.enterHandler({
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 fe(e, t, n) {
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) : V(e, r, i), n = i) : (n.captured = !1, n.insideElementPressed = !1), (e.leaveHandler || e.exitHandler) && (a = {
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 W(e, t, n) {
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 G(e, t, n) {
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 K(t, r, i, a) {
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, 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({
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 pe(t, r, i, a) {
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 || 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({
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 q(e, t, r) {
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
- J(e, t.originalEvent, r.type);
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 me(e, t, n) {
2070
+ function pe(e, t, n) {
2071
2071
  var r = e.getActivePointersListByType(n.type), i = r.getById(n.id);
2072
- i && V(e, r, i);
2072
+ i && H(e, r, i);
2073
2073
  }
2074
- function J(e, t, n) {
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, 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;
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, R)), 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;
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, F(this);
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 F(t) {
3412
- e.requestAnimationFrame(e.delegate(t, I));
3411
+ function I(t) {
3412
+ e.requestAnimationFrame(e.delegate(t, L));
3413
3413
  }
3414
- function I() {
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, F(this));
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 se() {
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 L() {
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 R() {
3424
+ function z() {
3425
3425
  this.buttonGroup && (this.buttonGroup.emulateEnter(), this.buttonGroup.emulateLeave());
3426
3426
  }
3427
- function ce() {
3427
+ function se() {
3428
3428
  this.viewport && this.viewport.goHome();
3429
3429
  }
3430
- function z() {
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 le() {
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 B() {
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 V() {
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
- })), 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 {
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 Z.default.Point(0, 0);
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 Be(e) {
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 Ve[t]?.(r, e, n), r;
7266
+ return Be[t]?.(r, e, n), r;
7267
7267
  }
7268
- var Ve = {
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) => He(e, t, !0),
7282
- polyline: (e, t) => He(e, t, !1)
7281
+ polygon: (e, t) => Ve(e, t, !0),
7282
+ polyline: (e, t) => Ve(e, t, !1)
7283
7283
  };
7284
- function He(e, t, n) {
7285
- Ue(t.getAttribute("points")).forEach(([t, n], r) => {
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 Ue(e) {
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 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 = {
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
- }, Ke = 1.6, qe = "#1e88e5", Je = 1.3, Ye = "#212121";
7304
- function Xe(e, t, n) {
7305
- let r = 44 / n / Ge;
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 - Q.x) * r,
7309
- y: t + ($.y - Q.y) * r
7336
+ x: e + ($.x - qe.x) * r,
7337
+ y: t + ($.y - qe.y) * r
7310
7338
  };
7311
7339
  }
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;
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 ? 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));
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 || qe;
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 * Ke}px sans-serif`, this.context.textAlign = "center", this.context.textBaseline = "middle", this.context.fillText(String(e), $.x, $.y);
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 !== 0 && [...this.svgPaths].forEach((t) => {
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 = Be(t);
7352
- this.context.strokeStyle = this.color, t.getAttribute("stroke-dasharray") && this.context.setLineDash(t.getAttribute("stroke-dasharray").split(","));
7353
- let r = {
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(r).forEach((e) => {
7363
- t.getAttribute(e) && (this.context[r[e]] = t.getAttribute(e));
7364
- }), this.context.lineWidth /= this.zoomRatio, (this.selected || this.hovered) && (this.context.strokeStyle = e.strokeStyle || e.fillStyle), this.context.globalAlpha = e.globalAlpha, t.getAttribute("fill") && t.getAttribute("fill") !== "none" && (t.getAttribute("fill-opacity") && (this.context.globalAlpha = e.globalAlpha * this.parseOpacity(t.getAttribute("fill-opacity"))), this.context.fill(n)), t.getAttribute("stroke-opacity") ? this.context.globalAlpha = e.globalAlpha * this.parseOpacity(t.getAttribute("stroke-opacity")) : this.context.globalAlpha = e.globalAlpha, this.context.stroke(n), this.context.restore();
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 Qe({ canvasWorld: e, osdCanvasOverlay: t, viewer: n }, r, i, a) {
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 Ze({ resource: r });
7386
- return [...n].some((t) => e.isPointInPath(Be(t), c, l));
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 = Xe(t, a, s.viewportToImageZoom(n.viewport.getZoom(!0))), d = c - u.x, f = l - u.y;
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 $e(e) {
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 et(e) {
7438
+ function nt(e) {
7405
7439
  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));
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 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) => {
7412
- d === e ? n(p, e) : u(p, e);
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
- d,
7448
+ f,
7415
7449
  n,
7416
- u,
7417
- p
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);
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
- ...l,
7423
- ...u
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 = f.world.getItemAt(i);
7461
+ let o = p.world.getItemAt(i);
7428
7462
  if (!o) return;
7429
- let c = t.offsetByCanvas(e.targetId), l = o.viewportToImageZoom(f.viewport.getZoom(!0));
7430
- new Ze({
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: p.get(e.id),
7433
- offset: c,
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: d === e.id,
7443
- zoomRatio: l
7477
+ selected: f === e.id,
7478
+ zoomRatio: u
7444
7479
  }).toContext(r);
7445
7480
  });
7446
7481
  }, [
7447
- h,
7448
- f,
7482
+ g,
7483
+ p,
7449
7484
  t,
7450
7485
  a,
7451
7486
  s,
7452
- d
7453
- ]), v = W(() => {
7454
- i && _(l, c.search), r && _(e, c.annotations);
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
- c,
7461
- l
7462
- ]), y = W(() => {
7463
- h && (h.clear(), h.resize(), h.canvasUpdate(v));
7464
- }, [h, v]), b = W((n, r) => [...e, ...l].flatMap((e) => e.resources).filter((e) => n.id === e.targetId && Qe({
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: h,
7467
- viewer: f
7502
+ osdCanvasOverlay: g,
7503
+ viewer: p
7468
7504
  }, e, n, r)), [
7469
7505
  e,
7470
7506
  t,
7471
- h,
7472
- l,
7473
- f
7474
- ]), x = W((e) => {
7475
- if ($e(e)) return;
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 = b(a, i);
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), p = d.length > 0 ? d : u;
7481
- if (p.length === 1) g(p[0].id);
7482
- else if (p.length > 0) {
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
- Qe({
7525
+ et({
7490
7526
  canvasWorld: t,
7491
- osdCanvasOverlay: h,
7492
- viewer: f
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, 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");
7505
- g(r[0].anno.id);
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
- b,
7544
+ x,
7509
7545
  t,
7510
- h,
7511
7546
  g,
7512
- f
7513
- ]), S = z(W((n) => {
7514
- if (e.length === 0 && l.length === 0) return;
7515
- let { position: r } = n, i = f.viewport.pointFromPixel(r), a = t.canvasAtPoint(i);
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(p, []);
7553
+ o(m, []);
7518
7554
  return;
7519
7555
  }
7520
- let c = b(a, i);
7521
- (0, Re.default)(s, c.map((e) => e.id)).length > 0 && o(p, c.map((e) => e.id));
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
- b,
7560
+ x,
7525
7561
  t,
7526
7562
  o,
7527
7563
  s,
7528
- l,
7529
- f,
7530
- p
7531
- ]), 10), C = W(() => {
7532
- S.cancel(), o(p, []);
7564
+ u,
7565
+ p,
7566
+ m
7567
+ ]), 10), w = G(() => {
7568
+ C.cancel(), o(m, []);
7533
7569
  }, [
7534
7570
  o,
7535
- S,
7536
- p
7537
- ]), w = W(() => {
7538
- y();
7539
- }, [y]);
7540
- return K(() => {
7541
- if (f) return f.addHandler("canvas-click", x), f.addHandler("canvas-exit", C), f.addHandler("mouse-move", S), f.addHandler("update-viewport", w), () => {
7542
- f.removeHandler("canvas-click", x), f.removeHandler("canvas-exit", C), f.removeHandler("mouse-move", S), f.removeHandler("update-viewport", w);
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
- f
7550
- ]), K(() => {
7551
- f && f.forceRedraw();
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
- l,
7559
- d,
7560
- f
7561
- ]), K(() => {
7562
- m.current && (s.length > 0 ? m.current.style.cursor = "pointer" : m.current.style.cursor = "");
7563
- }, [s, m]), f ? be.createPortal(/* @__PURE__ */ Y("div", {
7564
- ref: m,
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__ */ Y("canvas", {})
7573
- }), f.canvas) : null;
7608
+ children: /* @__PURE__ */ X("canvas", {})
7609
+ }), p.canvas) : null;
7574
7610
  }
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
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 nt = ve(xe)(({ theme: e }) => ({
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 rt({ imageUrls: e = [] }) {
7606
- let { failedImages: t } = G(P), { t: n } = _e();
7607
- return e.some((e) => t.has(e)) ? /* @__PURE__ */ Y(nt, {
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__ */ Y(ye, {
7652
+ children: /* @__PURE__ */ X(ve, {
7611
7653
  variant: "body2",
7612
7654
  children: n("imageFailedToLoad")
7613
7655
  })
7614
7656
  }) : null;
7615
7657
  }
7616
- rt.propTypes = { imageUrls: X.default.arrayOf(X.default.string) };
7617
- var it = i(h((e, { windowId: t }) => ({
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: Se(e, { windowId: t }),
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: oe,
7677
+ hoverAnnotation: P,
7636
7678
  selectAnnotation: ie
7637
- }), d("AnnotationsOverlay"))(tt), at = {
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
- }, ot = fe(void 0);
7690
+ }, ct = de(void 0);
7649
7691
  //#endregion
7650
7692
  //#region src/components/OpenSeadragonComponent.jsx
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) => {
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 = W((e) => {
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 = 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)));
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
- K(() => {
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 Z.default.Rect(...r.bounds);
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 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));
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
- ]), K(() => {
7689
- let e = (0, Z.default)({
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]), K(() => () => {
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 } = _e();
7709
- return K(() => {
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__ */ Y(ot.Provider, {
7758
+ ]), /* @__PURE__ */ X(ct.Provider, {
7717
7759
  value: f,
7718
- children: /* @__PURE__ */ Y(t, {
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
- 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
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 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(() => {
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]), K(() => {
7753
- n && c.current?.fitBounds(new Z.default.Rect(...n));
7754
- }, [n]), K(() => {
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]), K(() => {
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 Z.default.Rect(...n) : void 0,
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 Z.default.Rect(...n) : void 0,
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
- 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
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 lt = ve("section")({
7848
+ var dt = _e("section")({
7807
7849
  cursor: "grab",
7808
7850
  flex: 1,
7809
7851
  position: "relative"
7810
7852
  });
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 }) => {
7813
- l(n, {
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
- }, [l, n]), g = W((e = !0) => {
7821
- f.current?.viewport && f.current.viewport.fitBounds(new Z.default.Rect(...s.worldBounds()), e);
7822
- }, [s, f]);
7823
- K(() => (at.set(n, f), () => at.remove(n)), [f, n]), K(() => {
7824
- f.current = p;
7825
- }, [f, p]);
7826
- let _ = U.map(e, (e) => de(e, { zoomToWorld: g })), v = {
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: d,
7834
- updateViewport: l,
7875
+ t: f,
7876
+ updateViewport: u,
7835
7877
  viewerConfig: i,
7836
7878
  windowId: n,
7837
- ...u
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,
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: h,
7845
- setViewer: m,
7846
- "aria-label": d("item", { label: t }),
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__ */ Y(ct, {
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__ */ Y(ct, {
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__ */ Y(it, {
7872
- viewer: p,
7913
+ a && /* @__PURE__ */ X(ot, {
7914
+ viewer: m,
7873
7915
  windowId: n
7874
7916
  }),
7875
- _,
7876
- /* @__PURE__ */ Y(rt, { imageUrls: y }),
7877
- /* @__PURE__ */ Y(H, {
7917
+ v,
7918
+ /* @__PURE__ */ X(at, { imageUrls: b }),
7919
+ /* @__PURE__ */ X(U, {
7878
7920
  targetName: "OpenSeadragonViewer",
7879
- viewer: p,
7880
- ...v
7921
+ viewer: m,
7922
+ ...y
7881
7923
  })
7882
7924
  ]
7883
7925
  });
7884
7926
  }
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
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 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);
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: B }), d("OpenSeadragonViewer"))(ut);
7963
+ }, { updateViewport: V }), d("OpenSeadragonViewer"))(ft);
7920
7964
  //#endregion
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 };
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-CYMXINoT.js.map
7967
+ //# sourceMappingURL=OpenSeadragonViewer-Dm_GZoQ8.js.map