@annotorious/svelte 3.0.0-rc.9 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/MouseOverTooltip.svelte.d.ts +1 -1
- package/dist/annotorious-svelte.es.js +17 -14
- package/dist/annotorious-svelte.es.js.map +1 -1
- package/dist/annotorious-svelte.es10.js +2 -122
- package/dist/annotorious-svelte.es10.js.map +1 -1
- package/dist/annotorious-svelte.es11.js +2 -2
- package/dist/annotorious-svelte.es11.js.map +1 -1
- package/dist/annotorious-svelte.es12.js +101 -15
- package/dist/annotorious-svelte.es12.js.map +1 -1
- package/dist/annotorious-svelte.es14.js +54 -7
- package/dist/annotorious-svelte.es14.js.map +1 -1
- package/dist/annotorious-svelte.es2.js +30 -25
- package/dist/annotorious-svelte.es2.js.map +1 -1
- package/dist/annotorious-svelte.es3.js +114 -2
- package/dist/annotorious-svelte.es3.js.map +1 -1
- package/dist/annotorious-svelte.es4.js +127 -9
- package/dist/annotorious-svelte.es4.js.map +1 -1
- package/dist/annotorious-svelte.es5.js +66 -1264
- package/dist/annotorious-svelte.es5.js.map +1 -1
- package/dist/annotorious-svelte.es6.js +37 -105
- package/dist/annotorious-svelte.es6.js.map +1 -1
- package/dist/annotorious-svelte.es7.js +24 -118
- package/dist/annotorious-svelte.es7.js.map +1 -1
- package/dist/annotorious-svelte.es8.js +17 -307
- package/dist/annotorious-svelte.es8.js.map +1 -1
- package/dist/annotorious-svelte.es9.js +89 -22133
- package/dist/annotorious-svelte.es9.js.map +1 -1
- package/dist/index.d.ts +9 -11
- package/dist/osd/OpenSeadragonAnnotator.svelte.d.ts +1 -1
- package/dist/osd/OpenSeadragonPopup.svelte.d.ts +1 -1
- package/dist/osd/index.d.ts +0 -1
- package/package.json +21 -15
- package/src/index.ts +42 -22
- package/src/osd/OpenSeadragonAnnotator.svelte +2 -2
- package/tsconfig.json +2 -3
- package/vite.config.js +8 -5
- package/dist/annotorious-svelte.es13.js +0 -7
- package/dist/annotorious-svelte.es13.js.map +0 -1
- package/dist/annotorious-svelte.es15.js +0 -10
- package/dist/annotorious-svelte.es15.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/osd/index.d.ts.map +0 -1
- /package/dist/{style.css → annotorious-svelte.css} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { SvelteComponent as default } from 'svelte';
|
|
@@ -1,17 +1,20 @@
|
|
|
1
|
-
import { default as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { default as
|
|
6
|
-
|
|
7
|
-
const c = o, m = e, s = t, i = r;
|
|
1
|
+
import { default as c } from "./annotorious-svelte.es2.js";
|
|
2
|
+
import { Origin as g, UserSelectAction as d, createAnonymousGuest as u, createBody as l, defaultColorProvider as i } from "@annotorious/core";
|
|
3
|
+
import { createImageAnnotator as e, ShapeType as o, W3CImageFormat as a } from "@annotorious/annotorious";
|
|
4
|
+
import { default as I } from "./annotorious-svelte.es3.js";
|
|
5
|
+
import { default as x } from "./annotorious-svelte.es4.js";
|
|
6
|
+
const r = e, n = o, p = a;
|
|
8
7
|
export {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
8
|
+
c as MouseOverTooltip,
|
|
9
|
+
I as OpenSeadragonAnnotator,
|
|
10
|
+
x as OpenSeadragonPopup,
|
|
11
|
+
g as Origin,
|
|
12
|
+
n as ShapeType,
|
|
13
|
+
d as UserSelectAction,
|
|
14
|
+
p as W3CImageFormat,
|
|
15
|
+
u as createAnonymousGuest,
|
|
16
|
+
l as createBody,
|
|
17
|
+
r as createImageAnnotator,
|
|
18
|
+
i as defaultColorProvider
|
|
16
19
|
};
|
|
17
20
|
//# sourceMappingURL=annotorious-svelte.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"annotorious-svelte.es.js","sources":["../src/index.ts"],"sourcesContent":["export * from './osd';\n\nexport { default as MouseOverTooltip } from './MouseOverTooltip.svelte';\n\n// Essential re-exports from @annotorious/core\nexport type {\n Annotation,\n AnnotationBody,\n AnnotationTarget,\n Annotator,\n AnnotatorState,\n
|
|
1
|
+
{"version":3,"file":"annotorious-svelte.es.js","sources":["../src/index.ts"],"sourcesContent":["export * from './osd';\n\nexport { default as MouseOverTooltip } from './MouseOverTooltip.svelte';\n\n// Essential re-exports from @annotorious/core\nexport type {\n Annotation,\n AnnotationBody,\n AnnotationTarget,\n Annotator,\n AnnotatorState,\n Appearance,\n AppearanceProvider,\n Color,\n DrawingStyle,\n Filter,\n FormatAdapter,\n HoverState,\n LifecycleEvents,\n ParseResult,\n PresentUser,\n Selection,\n SelectionState,\n Store,\n StoreChangeEvent,\n StoreObserver,\n SvelteAnnotator,\n SvelteAnnotatorState,\n User,\n W3CAnnotation,\n W3CAnnotationBody,\n W3CAnnotationTarget\n} from '@annotorious/core';\n\nimport {\n createAnonymousGuest as _createAnonymousGuest, \n createBody as _createBody,\n defaultColorProvider as _defaultColorProvider,\n Origin as _Origin,\n UserSelectAction as _UserSelectAction\n} from '@annotorious/core';\n\nexport {\n _createAnonymousGuest as createAnonymousGuest,\n _createBody as createBody,\n _defaultColorProvider as defaultColorProvider,\n _Origin as Origin,\n _UserSelectAction as UserSelectAction\n}\n\n// Essential re-exports from @annotorious/annotorious \nexport type {\n AnnotoriousOpts,\n DrawingMode,\n DrawingTool,\n ImageAnnotator as AnnotoriousImageAnnotator,\n ImageAnnotation,\n ImageAnnotator,\n ImageAnnotatorState,\n Polygon,\n PolygonGeometry,\n Rectangle,\n RectangleGeometry,\n Shape\n} from '@annotorious/annotorious';\n\nimport { \n createImageAnnotator as _createImageAnnotator,\n ShapeType as _ShapeType,\n W3CImageFormat as _W3CImageFormat\n} from '@annotorious/annotorious';\n\nexport const createImageAnnotator = _createImageAnnotator;\nexport const ShapeType = _ShapeType;\nexport const W3CImageFormat = _W3CImageFormat;\n\n// Essential re-exports from @annotorious/openseadragon \nexport type {\n OpenSeadragonAnnotator as AnnotoriousOpenSeadragonAnnotator\n} from '@annotorious/openseadragon';\n\nexport type { Viewer } from 'openseadragon';\n"],"names":["createImageAnnotator","_createImageAnnotator","ShapeType","_ShapeType","W3CImageFormat","_W3CImageFormat"],"mappings":";;;;;AAwEO,MAAMA,IAAuBC,GACvBC,IAAYC,GACZC,IAAiBC;"}
|
|
@@ -1,123 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
return [u(i, e), u(d, s)];
|
|
4
|
-
}, ot = (e, s) => e.some((i) => s.some((d) => i.contains(d)));
|
|
5
|
-
function I(e, s) {
|
|
6
|
-
if (e === void 0)
|
|
7
|
-
return;
|
|
8
|
-
if (J(e))
|
|
9
|
-
return e.getBoundingClientRect();
|
|
10
|
-
if (typeof e == "object") {
|
|
11
|
-
const { top: d = 0, left: u = 0, right: y = 0, bottom: f = 0 } = e;
|
|
12
|
-
return { top: d, right: window.innerWidth - y, bottom: window.innerHeight - f, left: u };
|
|
13
|
-
}
|
|
14
|
-
if (e === "parent")
|
|
15
|
-
return s.parentNode.getBoundingClientRect();
|
|
16
|
-
const i = document.querySelector(e);
|
|
17
|
-
if (i === null)
|
|
18
|
-
throw new Error("The selector provided for bound doesn't exists in the document.");
|
|
19
|
-
return i.getBoundingClientRect();
|
|
20
|
-
}
|
|
21
|
-
var H = (e, s, i) => e.style.setProperty(s, i), J = (e) => e instanceof HTMLElement, ut = (e, s = {}) => {
|
|
22
|
-
let i, d, { bounds: u, axis: y = "both", gpuAcceleration: f = !0, legacyTranslate: K = !0, transform: L, applyUserSelectHack: P = !0, disabled: O = !1, ignoreMultitouch: Q = !1, recomputeBounds: x = F, grid: T, position: p, cancel: N, handle: D, defaultClass: M = "neodrag", defaultClassDragging: X = "neodrag-dragging", defaultClassDragged: S = "neodrag-dragged", defaultPosition: it = { x: 0, y: 0 }, onDragStart: at, onDrag: st, onDragEnd: lt } = s, B = !1, b = 0, w = 0, A = 0, C = 0, Y = 0, q = 0, { x: $, y: R } = p ? { x: (p == null ? void 0 : p.x) ?? 0, y: (p == null ? void 0 : p.y) ?? 0 } : it;
|
|
23
|
-
W($, R);
|
|
24
|
-
let g, v, E, k, V, Z = "", ct = !!p;
|
|
25
|
-
x = { ...F, ...x };
|
|
26
|
-
const U = document.body.style, m = e.classList;
|
|
27
|
-
function W(t = b, r = w) {
|
|
28
|
-
if (!L) {
|
|
29
|
-
if (K) {
|
|
30
|
-
let a = `${+t}px, ${+r}px`;
|
|
31
|
-
return H(e, "transform", f ? `translate3d(${a}, 0)` : `translate(${a})`);
|
|
32
|
-
}
|
|
33
|
-
return H(e, "translate", `${+t}px ${+r}px ${f ? "1px" : ""}`);
|
|
34
|
-
}
|
|
35
|
-
const o = L({ offsetX: t, offsetY: r, rootNode: e });
|
|
36
|
-
G(o) && H(e, "transform", o);
|
|
37
|
-
}
|
|
38
|
-
const j = (t, r) => {
|
|
39
|
-
const o = { offsetX: b, offsetY: w, rootNode: e, currentNode: V };
|
|
40
|
-
e.dispatchEvent(new CustomEvent(t, { detail: o })), r == null || r(o);
|
|
41
|
-
}, z = addEventListener;
|
|
42
|
-
z("pointerdown", tt, !1), z("pointerup", et, !1), z("pointermove", nt, !1), H(e, "touch-action", "none");
|
|
43
|
-
const _ = () => {
|
|
44
|
-
let t = e.offsetWidth / v.width;
|
|
45
|
-
return isNaN(t) && (t = 1), t;
|
|
46
|
-
};
|
|
47
|
-
function tt(t) {
|
|
48
|
-
if (O || t.button === 2 || Q && !t.isPrimary)
|
|
49
|
-
return;
|
|
50
|
-
if (x.dragStart && (g = I(u, e)), G(D) && G(N) && D === N)
|
|
51
|
-
throw new Error("`handle` selector can't be same as `cancel` selector");
|
|
52
|
-
if (m.add(M), E = function(n, c) {
|
|
53
|
-
if (!n)
|
|
54
|
-
return [c];
|
|
55
|
-
if (J(n))
|
|
56
|
-
return [n];
|
|
57
|
-
if (Array.isArray(n))
|
|
58
|
-
return n;
|
|
59
|
-
const h = c.querySelectorAll(n);
|
|
60
|
-
if (h === null)
|
|
61
|
-
throw new Error("Selector passed for `handle` option should be child of the element on which the action is applied");
|
|
62
|
-
return Array.from(h.values());
|
|
63
|
-
}(D, e), k = function(n, c) {
|
|
64
|
-
if (!n)
|
|
65
|
-
return [];
|
|
66
|
-
if (J(n))
|
|
67
|
-
return [n];
|
|
68
|
-
if (Array.isArray(n))
|
|
69
|
-
return n;
|
|
70
|
-
const h = c.querySelectorAll(n);
|
|
71
|
-
if (h === null)
|
|
72
|
-
throw new Error("Selector passed for `cancel` option should be child of the element on which the action is applied");
|
|
73
|
-
return Array.from(h.values());
|
|
74
|
-
}(N, e), i = /(both|x)/.test(y), d = /(both|y)/.test(y), ot(k, E))
|
|
75
|
-
throw new Error("Element being dragged can't be a child of the element on which `cancel` is applied");
|
|
76
|
-
const r = t.composedPath()[0];
|
|
77
|
-
if (!E.some((n) => {
|
|
78
|
-
var c;
|
|
79
|
-
return n.contains(r) || ((c = n.shadowRoot) == null ? void 0 : c.contains(r));
|
|
80
|
-
}) || ot(k, [r]))
|
|
81
|
-
return;
|
|
82
|
-
V = E.length === 1 ? e : E.find((n) => n.contains(r)), B = !0, v = e.getBoundingClientRect(), P && (Z = U.userSelect, U.userSelect = "none"), j("neodrag:start", at);
|
|
83
|
-
const { clientX: o, clientY: a } = t, l = _();
|
|
84
|
-
i && (A = o - $ / l), d && (C = a - R / l), g && (Y = o - v.left, q = a - v.top);
|
|
85
|
-
}
|
|
86
|
-
function et() {
|
|
87
|
-
B && (x.dragEnd && (g = I(u, e)), m.remove(X), m.add(S), P && (U.userSelect = Z), j("neodrag:end", lt), i && (A = b), d && (C = w), B = !1);
|
|
88
|
-
}
|
|
89
|
-
function nt(t) {
|
|
90
|
-
if (!B)
|
|
91
|
-
return;
|
|
92
|
-
x.drag && (g = I(u, e)), m.add(X), t.preventDefault(), v = e.getBoundingClientRect();
|
|
93
|
-
let r = t.clientX, o = t.clientY;
|
|
94
|
-
const a = _();
|
|
95
|
-
if (g) {
|
|
96
|
-
const l = { left: g.left + Y, top: g.top + q, right: g.right + Y - v.width, bottom: g.bottom + q - v.height };
|
|
97
|
-
r = rt(r, l.left, l.right), o = rt(o, l.top, l.bottom);
|
|
98
|
-
}
|
|
99
|
-
if (Array.isArray(T)) {
|
|
100
|
-
let [l, n] = T;
|
|
101
|
-
if (isNaN(+l) || l < 0)
|
|
102
|
-
throw new Error("1st argument of `grid` must be a valid positive number");
|
|
103
|
-
if (isNaN(+n) || n < 0)
|
|
104
|
-
throw new Error("2nd argument of `grid` must be a valid positive number");
|
|
105
|
-
let c = r - A, h = o - C;
|
|
106
|
-
[c, h] = dt([l / a, n / a], c, h), r = A + c, o = C + h;
|
|
107
|
-
}
|
|
108
|
-
i && (b = Math.round((r - A) * a)), d && (w = Math.round((o - C) * a)), $ = b, R = w, j("neodrag", st), W();
|
|
109
|
-
}
|
|
110
|
-
return { destroy: () => {
|
|
111
|
-
const t = removeEventListener;
|
|
112
|
-
t("pointerdown", tt, !1), t("pointerup", et, !1), t("pointermove", nt, !1);
|
|
113
|
-
}, update: (t) => {
|
|
114
|
-
var o, a;
|
|
115
|
-
y = t.axis || "both", O = t.disabled ?? !1, Q = t.ignoreMultitouch ?? !1, D = t.handle, u = t.bounds, x = t.recomputeBounds ?? F, N = t.cancel, P = t.applyUserSelectHack ?? !0, T = t.grid, f = t.gpuAcceleration ?? !0, K = t.legacyTranslate ?? !0, L = t.transform;
|
|
116
|
-
const r = m.contains(S);
|
|
117
|
-
m.remove(M, S), M = t.defaultClass ?? "neodrag", X = t.defaultClassDragging ?? "neodrag-dragging", S = t.defaultClassDragged ?? "neodrag-dragged", m.add(M), r && m.add(S), ct && ($ = b = ((o = t.position) == null ? void 0 : o.x) ?? b, R = w = ((a = t.position) == null ? void 0 : a.y) ?? w, W());
|
|
118
|
-
} };
|
|
119
|
-
};
|
|
120
|
-
export {
|
|
121
|
-
ut as draggable
|
|
122
|
-
};
|
|
1
|
+
import { PUBLIC_VERSION as e } from "./annotorious-svelte.es11.js";
|
|
2
|
+
typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(e);
|
|
123
3
|
//# sourceMappingURL=annotorious-svelte.es10.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"annotorious-svelte.es10.js","sources":["../../../node_modules/@neodrag/svelte/dist/min/index.js"],"sourcesContent":["var t={dragStart:!0},e=(t,e,n)=>Math.min(Math.max(t,e),n),n=t=>\"string\"==typeof t,r=([t,e],n,r)=>{const o=(t,e)=>0===e?0:Math.ceil(t/e)*e;return[o(n,t),o(r,e)]};var o=(t,e)=>t.some((t=>e.some((e=>t.contains(e)))));function i(t,e){if(void 0===t)return;if(s(t))return t.getBoundingClientRect();if(\"object\"==typeof t){const{top:e=0,left:n=0,right:r=0,bottom:o=0}=t;return{top:e,right:window.innerWidth-r,bottom:window.innerHeight-o,left:n}}if(\"parent\"===t)return e.parentNode.getBoundingClientRect();const n=document.querySelector(t);if(null===n)throw new Error(\"The selector provided for bound doesn't exists in the document.\");return n.getBoundingClientRect()}var a=(t,e,n)=>t.style.setProperty(e,n),s=t=>t instanceof HTMLElement,d=(d,l={})=>{let c,u,{bounds:f,axis:g=\"both\",gpuAcceleration:h=!0,legacyTranslate:p=!0,transform:m,applyUserSelectHack:y=!0,disabled:b=!1,ignoreMultitouch:w=!1,recomputeBounds:v=t,grid:x,position:E,cancel:S,handle:A,defaultClass:C=\"neodrag\",defaultClassDragging:N=\"neodrag-dragging\",defaultClassDragged:D=\"neodrag-dragged\",defaultPosition:M={x:0,y:0},onDragStart:B,onDrag:$,onDragEnd:R}=l,H=!1,L=0,P=0,T=0,X=0,Y=0,q=0,{x:k,y:U}=E?{x:E?.x??0,y:E?.y??0}:M;Q(k,U);let W,j,z,F,G,I=\"\",J=!!E;v={...t,...v};const K=document.body.style,O=d.classList;function Q(t=L,e=P){if(!m){if(p){let n=`${+t}px, ${+e}px`;return a(d,\"transform\",h?`translate3d(${n}, 0)`:`translate(${n})`)}return a(d,\"translate\",`${+t}px ${+e}px ${h?\"1px\":\"\"}`)}const r=m({offsetX:t,offsetY:e,rootNode:d});n(r)&&a(d,\"transform\",r)}const V=(t,e)=>{const n={offsetX:L,offsetY:P,rootNode:d,currentNode:G};d.dispatchEvent(new CustomEvent(t,{detail:n})),e?.(n)};const Z=addEventListener;Z(\"pointerdown\",tt,!1),Z(\"pointerup\",et,!1),Z(\"pointermove\",nt,!1),a(d,\"touch-action\",\"none\");const _=()=>{let t=d.offsetWidth/j.width;return isNaN(t)&&(t=1),t};function tt(t){if(b)return;if(2===t.button)return;if(w&&!t.isPrimary)return;if(v.dragStart&&(W=i(f,d)),n(A)&&n(S)&&A===S)throw new Error(\"`handle` selector can't be same as `cancel` selector\");if(O.add(C),z=function(t,e){if(!t)return[e];if(s(t))return[t];if(Array.isArray(t))return t;const n=e.querySelectorAll(t);if(null===n)throw new Error(\"Selector passed for `handle` option should be child of the element on which the action is applied\");return Array.from(n.values())}(A,d),F=function(t,e){if(!t)return[];if(s(t))return[t];if(Array.isArray(t))return t;const n=e.querySelectorAll(t);if(null===n)throw new Error(\"Selector passed for `cancel` option should be child of the element on which the action is applied\");return Array.from(n.values())}(S,d),c=/(both|x)/.test(g),u=/(both|y)/.test(g),o(F,z))throw new Error(\"Element being dragged can't be a child of the element on which `cancel` is applied\");const e=t.composedPath()[0];if(!z.some((t=>t.contains(e)||t.shadowRoot?.contains(e)))||o(F,[e]))return;G=1===z.length?d:z.find((t=>t.contains(e))),H=!0,j=d.getBoundingClientRect(),y&&(I=K.userSelect,K.userSelect=\"none\"),V(\"neodrag:start\",B);const{clientX:r,clientY:a}=t,l=_();c&&(T=r-k/l),u&&(X=a-U/l),W&&(Y=r-j.left,q=a-j.top)}function et(){H&&(v.dragEnd&&(W=i(f,d)),O.remove(N),O.add(D),y&&(K.userSelect=I),V(\"neodrag:end\",R),c&&(T=L),u&&(X=P),H=!1)}function nt(t){if(!H)return;v.drag&&(W=i(f,d)),O.add(N),t.preventDefault(),j=d.getBoundingClientRect();let n=t.clientX,o=t.clientY;const a=_();if(W){const t={left:W.left+Y,top:W.top+q,right:W.right+Y-j.width,bottom:W.bottom+q-j.height};n=e(n,t.left,t.right),o=e(o,t.top,t.bottom)}if(Array.isArray(x)){let[t,e]=x;if(isNaN(+t)||t<0)throw new Error(\"1st argument of `grid` must be a valid positive number\");if(isNaN(+e)||e<0)throw new Error(\"2nd argument of `grid` must be a valid positive number\");let i=n-T,s=o-X;[i,s]=r([t/a,e/a],i,s),n=T+i,o=X+s}c&&(L=Math.round((n-T)*a)),u&&(P=Math.round((o-X)*a)),k=L,U=P,V(\"neodrag\",$),Q()}return{destroy:()=>{const t=removeEventListener;t(\"pointerdown\",tt,!1),t(\"pointerup\",et,!1),t(\"pointermove\",nt,!1)},update:e=>{g=e.axis||\"both\",b=e.disabled??!1,w=e.ignoreMultitouch??!1,A=e.handle,f=e.bounds,v=e.recomputeBounds??t,S=e.cancel,y=e.applyUserSelectHack??!0,x=e.grid,h=e.gpuAcceleration??!0,p=e.legacyTranslate??!0,m=e.transform;const n=O.contains(D);O.remove(C,D),C=e.defaultClass??\"neodrag\",N=e.defaultClassDragging??\"neodrag-dragging\",D=e.defaultClassDragged??\"neodrag-dragged\",O.add(C),n&&O.add(D),J&&(k=L=e.position?.x??L,U=P=e.position?.y??P,Q())}}};export{d as draggable};"],"names":["t","e","n","r","o","i","s","a","d","l","c","u","f","g","h","p","m","y","b","w","v","x","E","S","A","C","N","D","M","B","$","R","H","L","P","T","X","k","U","Q","W","j","z","F","G","I","J","K","O","V","Z","_a","_b"],"mappings":"AAAA,IAAIA,IAAE,EAAC,WAAU,GAAE,GAAEC,KAAE,CAACD,GAAEC,GAAEC,MAAI,KAAK,IAAI,KAAK,IAAIF,GAAEC,CAAC,GAAEC,CAAC,GAAEA,IAAE,CAAAF,MAAa,OAAOA,KAAjB,UAAmBG,KAAE,CAAC,CAACH,GAAEC,CAAC,GA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,eAAc,IAAG,EAAE,GAAE,EAAE,aAAY,IAAG,EAAE,GAAE,EAAE,eAAc,IAAG,EAAE;AAAA,EAAC,GAAE,QAAO,CAAAtC,MAAG;AAAt2H,QAAAkD,GAAAC;AAAu2H,IAAAvC,IAAEZ,EAAE,QAAM,QAAOiB,IAAEjB,EAAE,YAAU,IAAGkB,IAAElB,EAAE,oBAAkB,IAAGuB,IAAEvB,EAAE,QAAOW,IAAEX,EAAE,QAAOmB,IAAEnB,EAAE,mBAAiBD,GAAEuB,IAAEtB,EAAE,QAAOgB,IAAEhB,EAAE,uBAAqB,IAAGoB,IAAEpB,EAAE,MAAKa,IAAEb,EAAE,mBAAiB,IAAGc,IAAEd,EAAE,mBAAiB,IAAGe,IAAEf,EAAE;AAAU,UAAMC,IAAE8C,EAAE,SAASrB,CAAC;AAAE,IAAAqB,EAAE,OAAOvB,GAAEE,CAAC,GAAEF,IAAExB,EAAE,gBAAc,WAAUyB,IAAEzB,EAAE,wBAAsB,oBAAmB0B,IAAE1B,EAAE,uBAAqB,mBAAkB+C,EAAE,IAAIvB,CAAC,GAAEvB,KAAG8C,EAAE,IAAIrB,CAAC,GAAEmB,OAAIT,IAAEJ,MAAEkB,IAAAlD,EAAE,aAAF,gBAAAkD,EAAY,MAAGlB,GAAEK,IAAEJ,MAAEkB,IAAAnD,EAAE,aAAF,gBAAAmD,EAAY,MAAGlB,GAAEK,EAAC;AAAA,EAAG,EAAC;AAAC;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"annotorious-svelte.es10.js","sources":["../../../node_modules/svelte/src/runtime/internal/disclose-version/index.js"],"sourcesContent":["import { PUBLIC_VERSION } from '../../../shared/version.js';\n\nif (typeof window !== 'undefined')\n\t// @ts-ignore\n\t(window.__svelte || (window.__svelte = { v: new Set() })).v.add(PUBLIC_VERSION);\n"],"names":["PUBLIC_VERSION"],"mappings":";AAEI,OAAO,SAAW,QAEpB,OAAO,aAAa,OAAO,WAAW,EAAE,GAAG,oBAAI,IAAK,EAAA,IAAK,EAAE,IAAIA,CAAc;","x_google_ignoreList":[0]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"annotorious-svelte.es11.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
1
|
+
{"version":3,"file":"annotorious-svelte.es11.js","sources":["../../../node_modules/svelte/src/shared/version.js"],"sourcesContent":["// generated during release, do not modify\n\n/**\n * The current version, as set in package.json.\n *\n * https://svelte.dev/docs/svelte-compiler#svelte-version\n * @type {string}\n */\nexport const VERSION = '4.2.19';\nexport const PUBLIC_VERSION = '4';\n"],"names":["PUBLIC_VERSION"],"mappings":"AASY,MAACA,IAAiB;","x_google_ignoreList":[0]}
|
|
@@ -1,20 +1,106 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
for (let a = 0; a < 16; ++a)
|
|
12
|
-
m[t + a] = r[a];
|
|
13
|
-
return m;
|
|
1
|
+
var G = { dragStart: !0 }, oe = (t, s, i) => Math.min(Math.max(t, s), i), J = (t) => typeof t == "string", ue = ([t, s], i, c) => {
|
|
2
|
+
const u = (w, f) => f === 0 ? 0 : Math.ceil(w / f) * f;
|
|
3
|
+
return [u(i, t), u(c, s)];
|
|
4
|
+
}, ie = (t, s) => t.some((i) => s.some((c) => i.contains(c)));
|
|
5
|
+
function K(t, s) {
|
|
6
|
+
if (t === void 0) return;
|
|
7
|
+
if (O(t)) return t.getBoundingClientRect();
|
|
8
|
+
if (typeof t == "object") {
|
|
9
|
+
const { top: c = 0, left: u = 0, right: w = 0, bottom: f = 0 } = t;
|
|
10
|
+
return { top: c, right: window.innerWidth - w, bottom: window.innerHeight - f, left: u };
|
|
14
11
|
}
|
|
15
|
-
return
|
|
12
|
+
if (t === "parent") return s.parentNode.getBoundingClientRect();
|
|
13
|
+
const i = document.querySelector(t);
|
|
14
|
+
if (i === null) throw new Error("The selector provided for bound doesn't exists in the document.");
|
|
15
|
+
return i.getBoundingClientRect();
|
|
16
16
|
}
|
|
17
|
+
var L = (t, s, i) => t.style.setProperty(s, i), O = (t) => t instanceof HTMLElement, fe = (t, s = {}) => {
|
|
18
|
+
let i, c, { bounds: u, axis: w = "both", gpuAcceleration: f = !0, legacyTranslate: Q = !0, transform: T, applyUserSelectHack: X = !0, disabled: V = !1, ignoreMultitouch: Y = !1, recomputeBounds: x = G, grid: q, position: p, cancel: N, handle: D, defaultClass: M = "neodrag", defaultClassDragging: P = "neodrag-dragging", defaultClassDragged: S = "neodrag-dragged", defaultPosition: ae = { x: 0, y: 0 }, onDragStart: se, onDrag: le, onDragEnd: de } = s, B = !1, y = 0, b = 0, A = 0, C = 0, k = 0, z = 0, { x: $, y: R } = p ? { x: (p == null ? void 0 : p.x) ?? 0, y: (p == null ? void 0 : p.y) ?? 0 } : ae;
|
|
19
|
+
W($, R);
|
|
20
|
+
let g, v, E, I, Z, _ = "", ce = !!p;
|
|
21
|
+
x = { ...G, ...x };
|
|
22
|
+
let H = /* @__PURE__ */ new Set();
|
|
23
|
+
const U = document.body.style, m = t.classList;
|
|
24
|
+
function W(e = y, r = b) {
|
|
25
|
+
if (!T) {
|
|
26
|
+
if (Q) {
|
|
27
|
+
let a = `${+e}px, ${+r}px`;
|
|
28
|
+
return L(t, "transform", f ? `translate3d(${a}, 0)` : `translate(${a})`);
|
|
29
|
+
}
|
|
30
|
+
return L(t, "translate", `${+e}px ${+r}px ${f ? "1px" : ""}`);
|
|
31
|
+
}
|
|
32
|
+
const o = T({ offsetX: e, offsetY: r, rootNode: t });
|
|
33
|
+
J(o) && L(t, "transform", o);
|
|
34
|
+
}
|
|
35
|
+
const j = (e, r) => {
|
|
36
|
+
const o = { offsetX: y, offsetY: b, rootNode: t, currentNode: Z };
|
|
37
|
+
t.dispatchEvent(new CustomEvent(e, { detail: o })), r == null || r(o);
|
|
38
|
+
}, F = addEventListener;
|
|
39
|
+
F("pointerdown", te, !1), F("pointerup", ne, !1), F("pointermove", re, !1), L(t, "touch-action", "none");
|
|
40
|
+
const ee = () => {
|
|
41
|
+
let e = t.offsetWidth / v.width;
|
|
42
|
+
return isNaN(e) && (e = 1), e;
|
|
43
|
+
};
|
|
44
|
+
function te(e) {
|
|
45
|
+
if (V || e.button === 2) return;
|
|
46
|
+
if (H.add(e.pointerId), Y && H.size > 1) return e.preventDefault();
|
|
47
|
+
if (x.dragStart && (g = K(u, t)), J(D) && J(N) && D === N) throw new Error("`handle` selector can't be same as `cancel` selector");
|
|
48
|
+
if (m.add(M), E = function(n, d) {
|
|
49
|
+
if (!n) return [d];
|
|
50
|
+
if (O(n)) return [n];
|
|
51
|
+
if (Array.isArray(n)) return n;
|
|
52
|
+
const h = d.querySelectorAll(n);
|
|
53
|
+
if (h === null) throw new Error("Selector passed for `handle` option should be child of the element on which the action is applied");
|
|
54
|
+
return Array.from(h.values());
|
|
55
|
+
}(D, t), I = function(n, d) {
|
|
56
|
+
if (!n) return [];
|
|
57
|
+
if (O(n)) return [n];
|
|
58
|
+
if (Array.isArray(n)) return n;
|
|
59
|
+
const h = d.querySelectorAll(n);
|
|
60
|
+
if (h === null) throw new Error("Selector passed for `cancel` option should be child of the element on which the action is applied");
|
|
61
|
+
return Array.from(h.values());
|
|
62
|
+
}(N, t), i = /(both|x)/.test(w), c = /(both|y)/.test(w), ie(I, E)) throw new Error("Element being dragged can't be a child of the element on which `cancel` is applied");
|
|
63
|
+
const r = e.composedPath()[0];
|
|
64
|
+
if (!E.some((n) => {
|
|
65
|
+
var d;
|
|
66
|
+
return n.contains(r) || ((d = n.shadowRoot) == null ? void 0 : d.contains(r));
|
|
67
|
+
}) || ie(I, [r])) return;
|
|
68
|
+
Z = E.length === 1 ? t : E.find((n) => n.contains(r)), B = !0, v = t.getBoundingClientRect(), X && (_ = U.userSelect, U.userSelect = "none"), j("neodrag:start", se);
|
|
69
|
+
const { clientX: o, clientY: a } = e, l = ee();
|
|
70
|
+
i && (A = o - $ / l), c && (C = a - R / l), g && (k = o - v.left, z = a - v.top);
|
|
71
|
+
}
|
|
72
|
+
function ne(e) {
|
|
73
|
+
H.delete(e.pointerId), B && (x.dragEnd && (g = K(u, t)), m.remove(P), m.add(S), X && (U.userSelect = _), j("neodrag:end", de), i && (A = y), c && (C = b), B = !1);
|
|
74
|
+
}
|
|
75
|
+
function re(e) {
|
|
76
|
+
if (!B || Y && H.size > 1) return;
|
|
77
|
+
x.drag && (g = K(u, t)), m.add(P), e.preventDefault(), v = t.getBoundingClientRect();
|
|
78
|
+
let r = e.clientX, o = e.clientY;
|
|
79
|
+
const a = ee();
|
|
80
|
+
if (g) {
|
|
81
|
+
const l = { left: g.left + k, top: g.top + z, right: g.right + k - v.width, bottom: g.bottom + z - v.height };
|
|
82
|
+
r = oe(r, l.left, l.right), o = oe(o, l.top, l.bottom);
|
|
83
|
+
}
|
|
84
|
+
if (Array.isArray(q)) {
|
|
85
|
+
let [l, n] = q;
|
|
86
|
+
if (isNaN(+l) || l < 0) throw new Error("1st argument of `grid` must be a valid positive number");
|
|
87
|
+
if (isNaN(+n) || n < 0) throw new Error("2nd argument of `grid` must be a valid positive number");
|
|
88
|
+
let d = r - A, h = o - C;
|
|
89
|
+
[d, h] = ue([l / a, n / a], d, h), r = A + d, o = C + h;
|
|
90
|
+
}
|
|
91
|
+
i && (y = Math.round((r - A) * a)), c && (b = Math.round((o - C) * a)), $ = y, R = b, j("neodrag", le), W();
|
|
92
|
+
}
|
|
93
|
+
return { destroy: () => {
|
|
94
|
+
const e = removeEventListener;
|
|
95
|
+
e("pointerdown", te, !1), e("pointerup", ne, !1), e("pointermove", re, !1);
|
|
96
|
+
}, update: (e) => {
|
|
97
|
+
var o, a;
|
|
98
|
+
w = e.axis || "both", V = e.disabled ?? !1, Y = e.ignoreMultitouch ?? !1, D = e.handle, u = e.bounds, x = e.recomputeBounds ?? G, N = e.cancel, X = e.applyUserSelectHack ?? !0, q = e.grid, f = e.gpuAcceleration ?? !0, Q = e.legacyTranslate ?? !0, T = e.transform;
|
|
99
|
+
const r = m.contains(S);
|
|
100
|
+
m.remove(M, S), M = e.defaultClass ?? "neodrag", P = e.defaultClassDragging ?? "neodrag-dragging", S = e.defaultClassDragged ?? "neodrag-dragged", m.add(M), r && m.add(S), ce && ($ = y = ((o = e.position) == null ? void 0 : o.x) ?? y, R = b = ((a = e.position) == null ? void 0 : a.y) ?? b, W());
|
|
101
|
+
} };
|
|
102
|
+
};
|
|
17
103
|
export {
|
|
18
|
-
|
|
104
|
+
fe as draggable
|
|
19
105
|
};
|
|
20
106
|
//# sourceMappingURL=annotorious-svelte.es12.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"annotorious-svelte.es12.js","sources":["../../../node_modules/uuid/dist/esm-browser/v4.js"],"sourcesContent":["import native from './native.js';\nimport rng from './rng.js';\nimport { unsafeStringify } from './stringify.js';\n\nfunction v4(options, buf, offset) {\n if (native.randomUUID && !buf && !options) {\n return native.randomUUID();\n }\n\n options = options || {};\n const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return unsafeStringify(rnds);\n}\n\nexport default v4;"],"names":["v4","options","buf","offset","native","rnds","rng","i","unsafeStringify"],"mappings":";;;AAIA,SAASA,EAAGC,GAASC,GAAKC,GAAQ;AAChC,MAAIC,EAAO,cAAc,CAACF,KAAO,CAACD;AAChC,WAAOG,EAAO;AAGhB,EAAAH,IAAUA,KAAW;AACrB,QAAMI,IAAOJ,EAAQ,WAAWA,EAAQ,OAAOK;AAK/C,MAHAD,EAAK,CAAC,IAAIA,EAAK,CAAC,IAAI,KAAO,IAC3BA,EAAK,CAAC,IAAIA,EAAK,CAAC,IAAI,KAAO,KAEvBH,GAAK;AACP,IAAAC,IAASA,KAAU;AAEnB,aAASI,IAAI,GAAGA,IAAI,IAAI,EAAEA;AACxB,MAAAL,EAAIC,IAASI,CAAC,IAAIF,EAAKE,CAAC;AAG1B,WAAOL;AAAA,EACR;AAED,SAAOM,EAAgBH,CAAI;AAC7B;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"annotorious-svelte.es12.js","sources":["../../../node_modules/@neodrag/svelte/dist/min/index.js"],"sourcesContent":["var e={dragStart:!0},t=(e,t,n)=>Math.min(Math.max(e,t),n),n=e=>\"string\"==typeof e,r=([e,t],n,r)=>{const o=(e,t)=>0===t?0:Math.ceil(e/t)*t;return[o(n,e),o(r,t)]};var o=(e,t)=>e.some((e=>t.some((t=>e.contains(t)))));function i(e,t){if(void 0===e)return;if(s(e))return e.getBoundingClientRect();if(\"object\"==typeof e){const{top:t=0,left:n=0,right:r=0,bottom:o=0}=e;return{top:t,right:window.innerWidth-r,bottom:window.innerHeight-o,left:n}}if(\"parent\"===e)return t.parentNode.getBoundingClientRect();const n=document.querySelector(e);if(null===n)throw new Error(\"The selector provided for bound doesn't exists in the document.\");return n.getBoundingClientRect()}var a=(e,t,n)=>e.style.setProperty(t,n),s=e=>e instanceof HTMLElement,d=(d,l={})=>{let c,u,{bounds:f,axis:g=\"both\",gpuAcceleration:h=!0,legacyTranslate:p=!0,transform:m,applyUserSelectHack:w=!0,disabled:y=!1,ignoreMultitouch:b=!1,recomputeBounds:v=e,grid:x,position:E,cancel:S,handle:A,defaultClass:C=\"neodrag\",defaultClassDragging:N=\"neodrag-dragging\",defaultClassDragged:D=\"neodrag-dragged\",defaultPosition:M={x:0,y:0},onDragStart:B,onDrag:$,onDragEnd:R}=l,H=!1,L=0,T=0,X=0,Y=0,q=0,P=0,{x:k,y:z}=E?{x:E?.x??0,y:E?.y??0}:M;V(k,z);let I,U,W,j,F,G=\"\",J=!!E;v={...e,...v};let K=new Set;const O=document.body.style,Q=d.classList;function V(e=L,t=T){if(!m){if(p){let n=`${+e}px, ${+t}px`;return a(d,\"transform\",h?`translate3d(${n}, 0)`:`translate(${n})`)}return a(d,\"translate\",`${+e}px ${+t}px ${h?\"1px\":\"\"}`)}const r=m({offsetX:e,offsetY:t,rootNode:d});n(r)&&a(d,\"transform\",r)}const Z=(e,t)=>{const n={offsetX:L,offsetY:T,rootNode:d,currentNode:F};d.dispatchEvent(new CustomEvent(e,{detail:n})),t?.(n)};const _=addEventListener;_(\"pointerdown\",te,!1),_(\"pointerup\",ne,!1),_(\"pointermove\",re,!1),a(d,\"touch-action\",\"none\");const ee=()=>{let e=d.offsetWidth/U.width;return isNaN(e)&&(e=1),e};function te(e){if(y)return;if(2===e.button)return;if(K.add(e.pointerId),b&&K.size>1)return e.preventDefault();if(v.dragStart&&(I=i(f,d)),n(A)&&n(S)&&A===S)throw new Error(\"`handle` selector can't be same as `cancel` selector\");if(Q.add(C),W=function(e,t){if(!e)return[t];if(s(e))return[e];if(Array.isArray(e))return e;const n=t.querySelectorAll(e);if(null===n)throw new Error(\"Selector passed for `handle` option should be child of the element on which the action is applied\");return Array.from(n.values())}(A,d),j=function(e,t){if(!e)return[];if(s(e))return[e];if(Array.isArray(e))return e;const n=t.querySelectorAll(e);if(null===n)throw new Error(\"Selector passed for `cancel` option should be child of the element on which the action is applied\");return Array.from(n.values())}(S,d),c=/(both|x)/.test(g),u=/(both|y)/.test(g),o(j,W))throw new Error(\"Element being dragged can't be a child of the element on which `cancel` is applied\");const t=e.composedPath()[0];if(!W.some((e=>e.contains(t)||e.shadowRoot?.contains(t)))||o(j,[t]))return;F=1===W.length?d:W.find((e=>e.contains(t))),H=!0,U=d.getBoundingClientRect(),w&&(G=O.userSelect,O.userSelect=\"none\"),Z(\"neodrag:start\",B);const{clientX:r,clientY:a}=e,l=ee();c&&(X=r-k/l),u&&(Y=a-z/l),I&&(q=r-U.left,P=a-U.top)}function ne(e){K.delete(e.pointerId),H&&(v.dragEnd&&(I=i(f,d)),Q.remove(N),Q.add(D),w&&(O.userSelect=G),Z(\"neodrag:end\",R),c&&(X=L),u&&(Y=T),H=!1)}function re(e){if(!H||b&&K.size>1)return;v.drag&&(I=i(f,d)),Q.add(N),e.preventDefault(),U=d.getBoundingClientRect();let n=e.clientX,o=e.clientY;const a=ee();if(I){const e={left:I.left+q,top:I.top+P,right:I.right+q-U.width,bottom:I.bottom+P-U.height};n=t(n,e.left,e.right),o=t(o,e.top,e.bottom)}if(Array.isArray(x)){let[e,t]=x;if(isNaN(+e)||e<0)throw new Error(\"1st argument of `grid` must be a valid positive number\");if(isNaN(+t)||t<0)throw new Error(\"2nd argument of `grid` must be a valid positive number\");let i=n-X,s=o-Y;[i,s]=r([e/a,t/a],i,s),n=X+i,o=Y+s}c&&(L=Math.round((n-X)*a)),u&&(T=Math.round((o-Y)*a)),k=L,z=T,Z(\"neodrag\",$),V()}return{destroy:()=>{const e=removeEventListener;e(\"pointerdown\",te,!1),e(\"pointerup\",ne,!1),e(\"pointermove\",re,!1)},update:t=>{g=t.axis||\"both\",y=t.disabled??!1,b=t.ignoreMultitouch??!1,A=t.handle,f=t.bounds,v=t.recomputeBounds??e,S=t.cancel,w=t.applyUserSelectHack??!0,x=t.grid,h=t.gpuAcceleration??!0,p=t.legacyTranslate??!0,m=t.transform;const n=Q.contains(D);Q.remove(C,D),C=t.defaultClass??\"neodrag\",N=t.defaultClassDragging??\"neodrag-dragging\",D=t.defaultClassDragged??\"neodrag-dragged\",Q.add(C),n&&Q.add(D),J&&(k=L=t.position?.x??L,z=T=t.position?.y??T,V())}}};\n//!THIS IS HACK, WE WANNA IMPORT THE TYPE WHEN THE ISSUE IS FIXED LATER\nexport{d as draggable};"],"names":["e","t","n","r","o","i","s","a","d","l","c","u","f","g","h","p","m","w","y","b","v","x","E","S","A","C","N","D","M","B","$","R","H","L","T","X","Y","q","P","k","z","V","I","U","W","j","F","G","J","K","O","Q","Z","_","_a","_b"],"mappings":"AAAA,I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rB,GAAEO,EAAC;AAAA,EAAG,EAAC;AAAC;","x_google_ignoreList":[0]}
|
|
@@ -1,11 +1,58 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { run_all as i } from "./annotorious-svelte.es5.js";
|
|
2
|
+
import { set_current_component as a, current_component as u } from "./annotorious-svelte.es8.js";
|
|
3
|
+
const r = [], h = [];
|
|
4
|
+
let c = [];
|
|
5
|
+
const d = [], p = /* @__PURE__ */ Promise.resolve();
|
|
6
|
+
let f = !1;
|
|
7
|
+
function w() {
|
|
8
|
+
f || (f = !0, p.then(m));
|
|
9
|
+
}
|
|
10
|
+
function _(e) {
|
|
11
|
+
c.push(e);
|
|
12
|
+
}
|
|
13
|
+
const s = /* @__PURE__ */ new Set();
|
|
14
|
+
let l = 0;
|
|
15
|
+
function m() {
|
|
16
|
+
if (l !== 0)
|
|
17
|
+
return;
|
|
18
|
+
const e = u;
|
|
19
|
+
do {
|
|
20
|
+
try {
|
|
21
|
+
for (; l < r.length; ) {
|
|
22
|
+
const t = r[l];
|
|
23
|
+
l++, a(t), g(t.$$);
|
|
24
|
+
}
|
|
25
|
+
} catch (t) {
|
|
26
|
+
throw r.length = 0, l = 0, t;
|
|
27
|
+
}
|
|
28
|
+
for (a(null), r.length = 0, l = 0; h.length; ) h.pop()();
|
|
29
|
+
for (let t = 0; t < c.length; t += 1) {
|
|
30
|
+
const n = c[t];
|
|
31
|
+
s.has(n) || (s.add(n), n());
|
|
32
|
+
}
|
|
33
|
+
c.length = 0;
|
|
34
|
+
} while (r.length);
|
|
35
|
+
for (; d.length; )
|
|
36
|
+
d.pop()();
|
|
37
|
+
f = !1, s.clear(), a(e);
|
|
38
|
+
}
|
|
39
|
+
function g(e) {
|
|
40
|
+
if (e.fragment !== null) {
|
|
41
|
+
e.update(), i(e.before_update);
|
|
42
|
+
const t = e.dirty;
|
|
43
|
+
e.dirty = [-1], e.fragment && e.fragment.p(e.ctx, t), e.after_update.forEach(_);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
function y(e) {
|
|
47
|
+
const t = [], n = [];
|
|
48
|
+
c.forEach((o) => e.indexOf(o) === -1 ? t.push(o) : n.push(o)), n.forEach((o) => o()), c = t;
|
|
7
49
|
}
|
|
8
50
|
export {
|
|
9
|
-
|
|
51
|
+
_ as add_render_callback,
|
|
52
|
+
h as binding_callbacks,
|
|
53
|
+
r as dirty_components,
|
|
54
|
+
m as flush,
|
|
55
|
+
y as flush_render_callbacks,
|
|
56
|
+
w as schedule_update
|
|
10
57
|
};
|
|
11
58
|
//# sourceMappingURL=annotorious-svelte.es14.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"annotorious-svelte.es14.js","sources":["../../../node_modules/
|
|
1
|
+
{"version":3,"file":"annotorious-svelte.es14.js","sources":["../../../node_modules/svelte/src/runtime/internal/scheduler.js"],"sourcesContent":["import { run_all } from './utils.js';\nimport { current_component, set_current_component } from './lifecycle.js';\n\nexport const dirty_components = [];\nexport const intros = { enabled: false };\nexport const binding_callbacks = [];\n\nlet render_callbacks = [];\n\nconst flush_callbacks = [];\n\nconst resolved_promise = /* @__PURE__ */ Promise.resolve();\n\nlet update_scheduled = false;\n\n/** @returns {void} */\nexport function schedule_update() {\n\tif (!update_scheduled) {\n\t\tupdate_scheduled = true;\n\t\tresolved_promise.then(flush);\n\t}\n}\n\n/** @returns {Promise<void>} */\nexport function tick() {\n\tschedule_update();\n\treturn resolved_promise;\n}\n\n/** @returns {void} */\nexport function add_render_callback(fn) {\n\trender_callbacks.push(fn);\n}\n\n/** @returns {void} */\nexport function add_flush_callback(fn) {\n\tflush_callbacks.push(fn);\n}\n\n// flush() calls callbacks in this order:\n// 1. All beforeUpdate callbacks, in order: parents before children\n// 2. All bind:this callbacks, in reverse order: children before parents.\n// 3. All afterUpdate callbacks, in order: parents before children. EXCEPT\n// for afterUpdates called during the initial onMount, which are called in\n// reverse order: children before parents.\n// Since callbacks might update component values, which could trigger another\n// call to flush(), the following steps guard against this:\n// 1. During beforeUpdate, any updated components will be added to the\n// dirty_components array and will cause a reentrant call to flush(). Because\n// the flush index is kept outside the function, the reentrant call will pick\n// up where the earlier call left off and go through all dirty components. The\n// current_component value is saved and restored so that the reentrant call will\n// not interfere with the \"parent\" flush() call.\n// 2. bind:this callbacks cannot trigger new flush() calls.\n// 3. During afterUpdate, any updated components will NOT have their afterUpdate\n// callback called a second time; the seen_callbacks set, outside the flush()\n// function, guarantees this behavior.\nconst seen_callbacks = new Set();\n\nlet flushidx = 0; // Do *not* move this inside the flush() function\n\n/** @returns {void} */\nexport function flush() {\n\t// Do not reenter flush while dirty components are updated, as this can\n\t// result in an infinite loop. Instead, let the inner flush handle it.\n\t// Reentrancy is ok afterwards for bindings etc.\n\tif (flushidx !== 0) {\n\t\treturn;\n\t}\n\tconst saved_component = current_component;\n\tdo {\n\t\t// first, call beforeUpdate functions\n\t\t// and update components\n\t\ttry {\n\t\t\twhile (flushidx < dirty_components.length) {\n\t\t\t\tconst component = dirty_components[flushidx];\n\t\t\t\tflushidx++;\n\t\t\t\tset_current_component(component);\n\t\t\t\tupdate(component.$$);\n\t\t\t}\n\t\t} catch (e) {\n\t\t\t// reset dirty state to not end up in a deadlocked state and then rethrow\n\t\t\tdirty_components.length = 0;\n\t\t\tflushidx = 0;\n\t\t\tthrow e;\n\t\t}\n\t\tset_current_component(null);\n\t\tdirty_components.length = 0;\n\t\tflushidx = 0;\n\t\twhile (binding_callbacks.length) binding_callbacks.pop()();\n\t\t// then, once components are updated, call\n\t\t// afterUpdate functions. This may cause\n\t\t// subsequent updates...\n\t\tfor (let i = 0; i < render_callbacks.length; i += 1) {\n\t\t\tconst callback = render_callbacks[i];\n\t\t\tif (!seen_callbacks.has(callback)) {\n\t\t\t\t// ...so guard against infinite loops\n\t\t\t\tseen_callbacks.add(callback);\n\t\t\t\tcallback();\n\t\t\t}\n\t\t}\n\t\trender_callbacks.length = 0;\n\t} while (dirty_components.length);\n\twhile (flush_callbacks.length) {\n\t\tflush_callbacks.pop()();\n\t}\n\tupdate_scheduled = false;\n\tseen_callbacks.clear();\n\tset_current_component(saved_component);\n}\n\n/** @returns {void} */\nfunction update($$) {\n\tif ($$.fragment !== null) {\n\t\t$$.update();\n\t\trun_all($$.before_update);\n\t\tconst dirty = $$.dirty;\n\t\t$$.dirty = [-1];\n\t\t$$.fragment && $$.fragment.p($$.ctx, dirty);\n\t\t$$.after_update.forEach(add_render_callback);\n\t}\n}\n\n/**\n * Useful for example to execute remaining `afterUpdate` callbacks before executing `destroy`.\n * @param {Function[]} fns\n * @returns {void}\n */\nexport function flush_render_callbacks(fns) {\n\tconst filtered = [];\n\tconst targets = [];\n\trender_callbacks.forEach((c) => (fns.indexOf(c) === -1 ? filtered.push(c) : targets.push(c)));\n\ttargets.forEach((c) => c());\n\trender_callbacks = filtered;\n}\n"],"names":["dirty_components","binding_callbacks","render_callbacks","flush_callbacks","resolved_promise","update_scheduled","schedule_update","flush","add_render_callback","fn","seen_callbacks","flushidx","saved_component","current_component","component","set_current_component","update","e","i","callback","$$","run_all","dirty","flush_render_callbacks","fns","filtered","targets","c"],"mappings":";;AAGY,MAACA,IAAmB,CAAG,GAEtBC,IAAoB,CAAG;AAEpC,IAAIC,IAAmB,CAAA;AAEvB,MAAMC,IAAkB,CAAA,GAElBC,IAAmC,wBAAQ;AAEjD,IAAIC,IAAmB;AAGhB,SAASC,IAAkB;AACjC,EAAKD,MACJA,IAAmB,IACnBD,EAAiB,KAAKG,CAAK;AAE7B;AASO,SAASC,EAAoBC,GAAI;AACvC,EAAAP,EAAiB,KAAKO,CAAE;AACzB;AAyBA,MAAMC,IAAiB,oBAAI;AAE3B,IAAIC,IAAW;AAGR,SAASJ,IAAQ;AAIvB,MAAII,MAAa;AAChB;AAED,QAAMC,IAAkBC;AACxB,KAAG;AAGF,QAAI;AACH,aAAOF,IAAWX,EAAiB,UAAQ;AAC1C,cAAMc,IAAYd,EAA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1
|
-
import {
|
|
1
|
+
import { safe_not_equal as O, component_subscribe as T, create_slot as q, update_slot_base as w, get_all_dirty_from_scope as A, get_slot_changes as N } from "./annotorious-svelte.es5.js";
|
|
2
|
+
import { empty as S, insert as E, detach as L, element as X, attr as c } from "./annotorious-svelte.es6.js";
|
|
3
|
+
import { transition_in as u, transition_out as p, check_outros as Y, group_outros as j } from "./annotorious-svelte.es7.js";
|
|
4
|
+
import { getContext as z, onMount as B } from "./annotorious-svelte.es8.js";
|
|
5
|
+
import { SvelteComponent as D, init as F } from "./annotorious-svelte.es9.js";
|
|
6
|
+
import "./annotorious-svelte.es10.js";
|
|
2
7
|
const G = (o) => ({ hovered: o & /*hovered*/
|
|
3
8
|
16 }), b = (o) => ({ hovered: (
|
|
4
9
|
/*hovered*/
|
|
@@ -9,7 +14,7 @@ function g(o) {
|
|
|
9
14
|
const t = (
|
|
10
15
|
/*#slots*/
|
|
11
16
|
o[8].default
|
|
12
|
-
), n =
|
|
17
|
+
), n = q(
|
|
13
18
|
t,
|
|
14
19
|
o,
|
|
15
20
|
/*$$scope*/
|
|
@@ -18,7 +23,7 @@ function g(o) {
|
|
|
18
23
|
);
|
|
19
24
|
return {
|
|
20
25
|
c() {
|
|
21
|
-
r =
|
|
26
|
+
r = X("div"), n && n.c(), c(r, "class", "a9s-tooltip"), c(r, "style", s = `left:${/*left*/
|
|
22
27
|
o[2]}px; top:${/*top*/
|
|
23
28
|
o[1]}px; position: absolute;`);
|
|
24
29
|
},
|
|
@@ -27,19 +32,19 @@ function g(o) {
|
|
|
27
32
|
},
|
|
28
33
|
p(i, l) {
|
|
29
34
|
n && n.p && (!e || l & /*$$scope, hovered*/
|
|
30
|
-
144) &&
|
|
35
|
+
144) && w(
|
|
31
36
|
n,
|
|
32
37
|
t,
|
|
33
38
|
i,
|
|
34
39
|
/*$$scope*/
|
|
35
40
|
i[7],
|
|
36
|
-
e ?
|
|
41
|
+
e ? N(
|
|
37
42
|
t,
|
|
38
43
|
/*$$scope*/
|
|
39
44
|
i[7],
|
|
40
45
|
l,
|
|
41
46
|
G
|
|
42
|
-
) :
|
|
47
|
+
) : A(
|
|
43
48
|
/*$$scope*/
|
|
44
49
|
i[7]
|
|
45
50
|
),
|
|
@@ -53,7 +58,7 @@ function g(o) {
|
|
|
53
58
|
e || (u(n, i), e = !0);
|
|
54
59
|
},
|
|
55
60
|
o(i) {
|
|
56
|
-
|
|
61
|
+
p(n, i), e = !1;
|
|
57
62
|
},
|
|
58
63
|
d(i) {
|
|
59
64
|
i && L(r), n && n.d(i);
|
|
@@ -68,7 +73,7 @@ function H(o) {
|
|
|
68
73
|
);
|
|
69
74
|
return {
|
|
70
75
|
c() {
|
|
71
|
-
e && e.c(), r =
|
|
76
|
+
e && e.c(), r = S();
|
|
72
77
|
},
|
|
73
78
|
m(t, n) {
|
|
74
79
|
e && e.m(t, n), E(t, r, n), s = !0;
|
|
@@ -77,52 +82,52 @@ function H(o) {
|
|
|
77
82
|
/*$hover*/
|
|
78
83
|
t[0] && /*show*/
|
|
79
84
|
t[3] ? e ? (e.p(t, n), n & /*$hover, show*/
|
|
80
|
-
9 && u(e, 1)) : (e = g(t), e.c(), u(e, 1), e.m(r.parentNode, r)) : e && (
|
|
85
|
+
9 && u(e, 1)) : (e = g(t), e.c(), u(e, 1), e.m(r.parentNode, r)) : e && (j(), p(e, 1, 1, () => {
|
|
81
86
|
e = null;
|
|
82
|
-
}),
|
|
87
|
+
}), Y());
|
|
83
88
|
},
|
|
84
89
|
i(t) {
|
|
85
90
|
s || (u(e), s = !0);
|
|
86
91
|
},
|
|
87
92
|
o(t) {
|
|
88
|
-
|
|
93
|
+
p(e), s = !1;
|
|
89
94
|
},
|
|
90
95
|
d(t) {
|
|
91
|
-
|
|
96
|
+
t && L(r), e && e.d(t);
|
|
92
97
|
}
|
|
93
98
|
};
|
|
94
99
|
}
|
|
95
100
|
function I(o, r, s) {
|
|
96
101
|
let e, t, { $$slots: n = {}, $$scope: i } = r, { container: l } = r;
|
|
97
|
-
const k =
|
|
98
|
-
|
|
99
|
-
let
|
|
100
|
-
return
|
|
102
|
+
const k = z("anno"), { store: M, hover: _ } = k.state;
|
|
103
|
+
T(o, _, (f) => s(0, t = f));
|
|
104
|
+
let m, v, a = !0;
|
|
105
|
+
return B(() => {
|
|
101
106
|
const f = () => {
|
|
102
107
|
s(3, a = !0);
|
|
103
|
-
},
|
|
108
|
+
}, d = (y) => {
|
|
104
109
|
const { offsetX: P, offsetY: C } = y;
|
|
105
|
-
s(2,
|
|
110
|
+
s(2, v = P), s(1, m = C);
|
|
106
111
|
}, h = () => {
|
|
107
112
|
s(3, a = !1);
|
|
108
113
|
};
|
|
109
|
-
return l.addEventListener("pointerenter", f), l.addEventListener("pointermove",
|
|
110
|
-
l.removeEventListener("pointerenter", f), l.removeEventListener("pointermove",
|
|
114
|
+
return l.addEventListener("pointerenter", f), l.addEventListener("pointermove", d), l.addEventListener("pointerleave", h), () => {
|
|
115
|
+
l.removeEventListener("pointerenter", f), l.removeEventListener("pointermove", d), l.removeEventListener("pointerleave", h);
|
|
111
116
|
};
|
|
112
117
|
}), o.$$set = (f) => {
|
|
113
118
|
"container" in f && s(6, l = f.container), "$$scope" in f && s(7, i = f.$$scope);
|
|
114
119
|
}, o.$$.update = () => {
|
|
115
120
|
o.$$.dirty & /*$hover*/
|
|
116
121
|
1 && s(4, e = t ? M.getAnnotation(t) : void 0);
|
|
117
|
-
}, [t,
|
|
122
|
+
}, [t, m, v, a, e, _, l, i, n];
|
|
118
123
|
}
|
|
119
|
-
class J extends
|
|
124
|
+
class J extends D {
|
|
120
125
|
constructor(r) {
|
|
121
|
-
super(),
|
|
126
|
+
super(), F(this, r, I, H, O, { container: 6 });
|
|
122
127
|
}
|
|
123
128
|
}
|
|
124
|
-
const
|
|
129
|
+
const Z = J;
|
|
125
130
|
export {
|
|
126
|
-
|
|
131
|
+
Z as default
|
|
127
132
|
};
|
|
128
133
|
//# sourceMappingURL=annotorious-svelte.es2.js.map
|