@annotorious/svelte 3.0.0-rc.21 → 3.0.0-rc.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/dist/annotorious-svelte.es.js +14 -17
  2. package/dist/annotorious-svelte.es.js.map +1 -1
  3. package/dist/annotorious-svelte.es10.js +119 -23
  4. package/dist/annotorious-svelte.es10.js.map +1 -1
  5. package/dist/annotorious-svelte.es11.js +2 -111
  6. package/dist/annotorious-svelte.es11.js.map +1 -1
  7. package/dist/annotorious-svelte.es12.js +19 -2
  8. package/dist/annotorious-svelte.es12.js.map +1 -1
  9. package/dist/annotorious-svelte.es13.js +4 -2
  10. package/dist/annotorious-svelte.es13.js.map +1 -1
  11. package/dist/annotorious-svelte.es14.js +6 -27434
  12. package/dist/annotorious-svelte.es14.js.map +1 -1
  13. package/dist/annotorious-svelte.es15.js +6 -119
  14. package/dist/annotorious-svelte.es15.js.map +1 -1
  15. package/dist/annotorious-svelte.es2.js +25 -30
  16. package/dist/annotorious-svelte.es2.js.map +1 -1
  17. package/dist/annotorious-svelte.es3.js +2 -95
  18. package/dist/annotorious-svelte.es3.js.map +1 -1
  19. package/dist/annotorious-svelte.es4.js +8 -4238
  20. package/dist/annotorious-svelte.es4.js.map +1 -1
  21. package/dist/annotorious-svelte.es5.js +1263 -86
  22. package/dist/annotorious-svelte.es5.js.map +1 -1
  23. package/dist/annotorious-svelte.es6.js +86 -104
  24. package/dist/annotorious-svelte.es6.js.map +1 -1
  25. package/dist/annotorious-svelte.es7.js +118 -92
  26. package/dist/annotorious-svelte.es7.js.map +1 -1
  27. package/dist/annotorious-svelte.es8.js +303 -31
  28. package/dist/annotorious-svelte.es8.js.map +1 -1
  29. package/dist/annotorious-svelte.es9.js +20115 -21
  30. package/dist/annotorious-svelte.es9.js.map +1 -1
  31. package/dist/index.d.ts +8 -11
  32. package/dist/index.d.ts.map +1 -1
  33. package/package.json +11 -22
  34. package/src/index.ts +21 -40
  35. package/vite.config.js +0 -1
  36. package/dist/annotorious-svelte.es16.js +0 -2
  37. package/dist/annotorious-svelte.es16.js.map +0 -1
  38. package/dist/annotorious-svelte.es17.js +0 -59
  39. package/dist/annotorious-svelte.es17.js.map +0 -1
  40. /package/dist/{annotorious-svelte.css → style.css} +0 -0
@@ -1,20 +1,17 @@
1
- import { default as c } from "./annotorious-svelte.es2.js";
2
- import { Origin as i, PointerSelectAction as d, createAnonymousGuest as u, createBody as g, defaultColorProvider as l } from "./annotorious-svelte.es3.js";
3
- import { createImageAnnotator as e, ShapeType as o, W3CImageFormat as t } from "./annotorious-svelte.es4.js";
4
- import { default as A } from "./annotorious-svelte.es5.js";
5
- import { default as y } from "./annotorious-svelte.es6.js";
6
- const r = e, n = o, p = t;
1
+ import { default as l } from "./annotorious-svelte.es2.js";
2
+ import { PointerSelectAction as o } from "./annotorious-svelte.es3.js";
3
+ import { createBody as e } from "./annotorious-svelte.es4.js";
4
+ import { ShapeType as t, W3CImageFormat as r } from "./annotorious-svelte.es5.js";
5
+ import { default as u } from "./annotorious-svelte.es6.js";
6
+ import { default as A } from "./annotorious-svelte.es7.js";
7
+ const c = o, m = e, s = t, i = r;
7
8
  export {
8
- c as MouseOverTooltip,
9
- A as OpenSeadragonAnnotator,
10
- y as OpenSeadragonPopup,
11
- i as Origin,
12
- d as PointerSelectAction,
13
- n as ShapeType,
14
- p as W3CImageFormat,
15
- u as createAnonymousGuest,
16
- g as createBody,
17
- r as createImageAnnotator,
18
- l as defaultColorProvider
9
+ l as MouseOverTooltip,
10
+ u as OpenSeadragonAnnotator,
11
+ A as OpenSeadragonPopup,
12
+ c as PointerSelectAction,
13
+ s as ShapeType,
14
+ i as W3CImageFormat,
15
+ m as createBody
19
16
  };
20
17
  //# 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 Appearance,\n AppearanceProvider,\n Color,\n DrawingStyle,\n Filter,\n FormatAdapter,\n HoverState,\n LifecycleEvents,\n ParseResult,\n PresentUser,\n Purpose,\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 PointerSelectAction as _PointerSelectAction\n} from '@annotorious/core';\n\nexport { _createAnonymousGuest as createAnonymousGuest };\nexport { _createBody as createBody };\nexport { _defaultColorProvider as defaultColorProvider };\nexport { _Origin as Origin };\nexport { _PointerSelectAction as PointerSelectAction };\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":";;;;;AAuEO,MAAMA,IAAuBC,GACvBC,IAAYC,GACZC,IAAiBC;"}
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 Color,\n DrawingStyle,\n FormatAdapter,\n ParseResult,\n User,\n W3CAnnotation,\n W3CAnnotationBody,\n W3CAnnotationTarget,\n W3CSelector\n} from '@annotorious/core/src/model';\n\nexport type { \n HoverState,\n Selection,\n SelectionState,\n Store,\n StoreChangeEvent,\n StoreObserver,\n SvelteAnnotator,\n SvelteAnnotatorState\n} from '@annotorious/core/src/state';\n\nimport {\n PointerSelectAction as _PointerSelectAction\n} from '@annotorious/core/src/state';\n\nexport const PointerSelectAction = _PointerSelectAction;\n\nimport {\n createBody as _createBody\n} from '@annotorious/core/src/utils';\n\nexport const createBody = _createBody;\n\n// Essential re-exports from @annotorious/annotorious \nexport type {\n ImageAnnotator,\n ImageAnnotation,\n ImageAnnotatorState,\n Polygon,\n Rectangle,\n Shape\n} from '@annotorious/annotorious';\n\nimport { \n ShapeType as _ShapeType,\n W3CImageFormat as _W3CImageFormat\n} from '@annotorious/annotorious';\n\nexport const ShapeType = _ShapeType;\nexport const W3CImageFormat = _W3CImageFormat;"],"names":["PointerSelectAction","_PointerSelectAction","createBody","_createBody","ShapeType","_ShapeType","W3CImageFormat","_W3CImageFormat"],"mappings":";;;;;;AAqCO,MAAMA,IAAsBC,GAMtBC,IAAaC,GAiBbC,IAAYC,GACZC,IAAiBC;"}
@@ -1,27 +1,123 @@
1
- let t;
2
- function r(n) {
3
- t = n;
4
- }
5
- function o() {
6
- if (!t)
7
- throw new Error("Function called outside component initialization");
8
- return t;
9
- }
10
- function u(n) {
11
- o().$$.on_mount.push(n);
12
- }
13
- function c(n, e) {
14
- return o().$$.context.set(n, e), e;
15
- }
16
- function i(n) {
17
- return o().$$.context.get(n);
1
+ var F = { dragStart: !0 }, rt = (e, s, i) => Math.min(Math.max(e, s), i), G = (e) => typeof e == "string", dt = ([e, s], i, d) => {
2
+ const u = (y, f) => f === 0 ? 0 : Math.ceil(y / f) * f;
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();
18
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
+ };
19
120
  export {
20
- t as current_component,
21
- i as getContext,
22
- o as get_current_component,
23
- u as onMount,
24
- c as setContext,
25
- r as set_current_component
121
+ ut as draggable
26
122
  };
27
123
  //# sourceMappingURL=annotorious-svelte.es10.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"annotorious-svelte.es10.js","sources":["../../../node_modules/svelte/src/runtime/internal/lifecycle.js"],"sourcesContent":["import { custom_event } from './dom.js';\n\nexport let current_component;\n\n/** @returns {void} */\nexport function set_current_component(component) {\n\tcurrent_component = component;\n}\n\nexport function get_current_component() {\n\tif (!current_component) throw new Error('Function called outside component initialization');\n\treturn current_component;\n}\n\n/**\n * Schedules a callback to run immediately before the component is updated after any state change.\n *\n * The first time the callback runs will be before the initial `onMount`\n *\n * https://svelte.dev/docs/svelte#beforeupdate\n * @param {() => any} fn\n * @returns {void}\n */\nexport function beforeUpdate(fn) {\n\tget_current_component().$$.before_update.push(fn);\n}\n\n/**\n * The `onMount` function schedules a callback to run as soon as the component has been mounted to the DOM.\n * It must be called during the component's initialisation (but doesn't need to live *inside* the component;\n * it can be called from an external module).\n *\n * If a function is returned _synchronously_ from `onMount`, it will be called when the component is unmounted.\n *\n * `onMount` does not run inside a [server-side component](https://svelte.dev/docs#run-time-server-side-component-api).\n *\n * https://svelte.dev/docs/svelte#onmount\n * @template T\n * @param {() => import('./private.js').NotFunction<T> | Promise<import('./private.js').NotFunction<T>> | (() => any)} fn\n * @returns {void}\n */\nexport function onMount(fn) {\n\tget_current_component().$$.on_mount.push(fn);\n}\n\n/**\n * Schedules a callback to run immediately after the component has been updated.\n *\n * The first time the callback runs will be after the initial `onMount`\n *\n * https://svelte.dev/docs/svelte#afterupdate\n * @param {() => any} fn\n * @returns {void}\n */\nexport function afterUpdate(fn) {\n\tget_current_component().$$.after_update.push(fn);\n}\n\n/**\n * Schedules a callback to run immediately before the component is unmounted.\n *\n * Out of `onMount`, `beforeUpdate`, `afterUpdate` and `onDestroy`, this is the\n * only one that runs inside a server-side component.\n *\n * https://svelte.dev/docs/svelte#ondestroy\n * @param {() => any} fn\n * @returns {void}\n */\nexport function onDestroy(fn) {\n\tget_current_component().$$.on_destroy.push(fn);\n}\n\n/**\n * Creates an event dispatcher that can be used to dispatch [component events](https://svelte.dev/docs#template-syntax-component-directives-on-eventname).\n * Event dispatchers are functions that can take two arguments: `name` and `detail`.\n *\n * Component events created with `createEventDispatcher` create a\n * [CustomEvent](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent).\n * These events do not [bubble](https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Building_blocks/Events#Event_bubbling_and_capture).\n * The `detail` argument corresponds to the [CustomEvent.detail](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/detail)\n * property and can contain any type of data.\n *\n * The event dispatcher can be typed to narrow the allowed event names and the type of the `detail` argument:\n * ```ts\n * const dispatch = createEventDispatcher<{\n * loaded: never; // does not take a detail argument\n * change: string; // takes a detail argument of type string, which is required\n * optional: number | null; // takes an optional detail argument of type number\n * }>();\n * ```\n *\n * https://svelte.dev/docs/svelte#createeventdispatcher\n * @template {Record<string, any>} [EventMap=any]\n * @returns {import('./public.js').EventDispatcher<EventMap>}\n */\nexport function createEventDispatcher() {\n\tconst component = get_current_component();\n\treturn (type, detail, { cancelable = false } = {}) => {\n\t\tconst callbacks = component.$$.callbacks[type];\n\t\tif (callbacks) {\n\t\t\t// TODO are there situations where events could be dispatched\n\t\t\t// in a server (non-DOM) environment?\n\t\t\tconst event = custom_event(/** @type {string} */ (type), detail, { cancelable });\n\t\t\tcallbacks.slice().forEach((fn) => {\n\t\t\t\tfn.call(component, event);\n\t\t\t});\n\t\t\treturn !event.defaultPrevented;\n\t\t}\n\t\treturn true;\n\t};\n}\n\n/**\n * Associates an arbitrary `context` object with the current component and the specified `key`\n * and returns that object. The context is then available to children of the component\n * (including slotted content) with `getContext`.\n *\n * Like lifecycle functions, this must be called during component initialisation.\n *\n * https://svelte.dev/docs/svelte#setcontext\n * @template T\n * @param {any} key\n * @param {T} context\n * @returns {T}\n */\nexport function setContext(key, context) {\n\tget_current_component().$$.context.set(key, context);\n\treturn context;\n}\n\n/**\n * Retrieves the context that belongs to the closest parent component with the specified `key`.\n * Must be called during component initialisation.\n *\n * https://svelte.dev/docs/svelte#getcontext\n * @template T\n * @param {any} key\n * @returns {T}\n */\nexport function getContext(key) {\n\treturn get_current_component().$$.context.get(key);\n}\n\n/**\n * Retrieves the whole context map that belongs to the closest parent component.\n * Must be called during component initialisation. Useful, for example, if you\n * programmatically create a component and want to pass the existing context to it.\n *\n * https://svelte.dev/docs/svelte#getallcontexts\n * @template {Map<any, any>} [T=Map<any, any>]\n * @returns {T}\n */\nexport function getAllContexts() {\n\treturn get_current_component().$$.context;\n}\n\n/**\n * Checks whether a given `key` has been set in the context of a parent component.\n * Must be called during component initialisation.\n *\n * https://svelte.dev/docs/svelte#hascontext\n * @param {any} key\n * @returns {boolean}\n */\nexport function hasContext(key) {\n\treturn get_current_component().$$.context.has(key);\n}\n\n// TODO figure out if we still want to support\n// shorthand events, or if we want to implement\n// a real bubbling mechanism\n/**\n * @param component\n * @param event\n * @returns {void}\n */\nexport function bubble(component, event) {\n\tconst callbacks = component.$$.callbacks[event.type];\n\tif (callbacks) {\n\t\t// @ts-ignore\n\t\tcallbacks.slice().forEach((fn) => fn.call(this, event));\n\t}\n}\n"],"names":["current_component","set_current_component","component","get_current_component","onMount","fn","setContext","key","context","getContext"],"mappings":"AAEU,IAACA;AAGJ,SAASC,EAAsBC,GAAW;AAChD,EAAAF,IAAoBE;AACrB;AAEO,SAASC,IAAwB;AACvC,MAAI,CAACH;AAAmB,UAAM,IAAI,MAAM,kDAAkD;AAC1F,SAAOA;AACR;AA6BO,SAASI,EAAQC,GAAI;AAC3B,EAAAF,EAAuB,EAAC,GAAG,SAAS,KAAKE,CAAE;AAC5C;AAkFO,SAASC,EAAWC,GAAKC,GAAS;AACxC,SAAAL,EAAqB,EAAG,GAAG,QAAQ,IAAII,GAAKC,CAAO,GAC5CA;AACR;AAWO,SAASC,EAAWF,GAAK;AAC/B,SAAOJ,EAAuB,EAAC,GAAG,QAAQ,IAAII,CAAG;AAClD;","x_google_ignoreList":[0]}
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,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AES,EAAC;AAAA,EAAE;AAAC,SAAM,EAAC,SAAQ,MAAI;AAAC,UAAM,IAAE;AAAoB,MAAE,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,114 +1,5 @@
1
- var k = Object.defineProperty;
2
- var v = (e, t, r) => t in e ? k(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
- var d = (e, t, r) => (v(e, typeof t != "symbol" ? t + "" : t, r), r);
4
- import { flush as w, add_render_callback as g, flush_render_callbacks as E, dirty_components as j, schedule_update as C } from "./annotorious-svelte.es17.js";
5
- import { current_component as M, set_current_component as b } from "./annotorious-svelte.es10.js";
6
- import { noop as u, blank_object as y, run_all as i, is_function as x, is_empty as O, run as S } from "./annotorious-svelte.es7.js";
7
- import { children as z, detach as A } from "./annotorious-svelte.es8.js";
8
- import { transition_in as B } from "./annotorious-svelte.es9.js";
9
- function D(e, t, r) {
10
- const { fragment: f, after_update: o } = e.$$;
11
- f && f.m(t, r), g(() => {
12
- const $ = e.$$.on_mount.map(S).filter(x);
13
- e.$$.on_destroy ? e.$$.on_destroy.push(...$) : i($), e.$$.on_mount = [];
14
- }), o.forEach(g);
15
- }
16
- function F(e, t) {
17
- const r = e.$$;
18
- r.fragment !== null && (E(r.after_update), i(r.on_destroy), r.fragment && r.fragment.d(t), r.on_destroy = r.fragment = null, r.ctx = []);
19
- }
20
- function G(e, t) {
21
- e.$$.dirty[0] === -1 && (j.push(e), C(), e.$$.dirty.fill(0)), e.$$.dirty[t / 31 | 0] |= 1 << t % 31;
22
- }
23
- function P(e, t, r, f, o, $, c = null, p = [-1]) {
24
- const s = M;
25
- b(e);
26
- const n = e.$$ = {
27
- fragment: null,
28
- ctx: [],
29
- // state
30
- props: $,
31
- update: u,
32
- not_equal: o,
33
- bound: y(),
34
- // lifecycle
35
- on_mount: [],
36
- on_destroy: [],
37
- on_disconnect: [],
38
- before_update: [],
39
- after_update: [],
40
- context: new Map(t.context || (s ? s.$$.context : [])),
41
- // everything else
42
- callbacks: y(),
43
- dirty: p,
44
- skip_bound: !1,
45
- root: t.target || s.$$.root
46
- };
47
- c && c(n.root);
48
- let l = !1;
49
- if (n.ctx = r ? r(e, t.props || {}, (a, _, ...m) => {
50
- const h = m.length ? m[0] : _;
51
- return n.ctx && o(n.ctx[a], n.ctx[a] = h) && (!n.skip_bound && n.bound[a] && n.bound[a](h), l && G(e, a)), _;
52
- }) : [], n.update(), l = !0, i(n.before_update), n.fragment = f ? f(n.ctx) : !1, t.target) {
53
- if (t.hydrate) {
54
- const a = z(t.target);
55
- n.fragment && n.fragment.l(a), a.forEach(A);
56
- } else
57
- n.fragment && n.fragment.c();
58
- t.intro && B(e.$$.fragment), D(e, t.target, t.anchor), w();
59
- }
60
- b(s);
61
- }
62
- class Q {
63
- constructor() {
64
- /**
65
- * ### PRIVATE API
66
- *
67
- * Do not use, may change at any time
68
- *
69
- * @type {any}
70
- */
71
- d(this, "$$");
72
- /**
73
- * ### PRIVATE API
74
- *
75
- * Do not use, may change at any time
76
- *
77
- * @type {any}
78
- */
79
- d(this, "$$set");
80
- }
81
- /** @returns {void} */
82
- $destroy() {
83
- F(this, 1), this.$destroy = u;
84
- }
85
- /**
86
- * @template {Extract<keyof Events, string>} K
87
- * @param {K} type
88
- * @param {((e: Events[K]) => void) | null | undefined} callback
89
- * @returns {() => void}
90
- */
91
- $on(t, r) {
92
- if (!x(r))
93
- return u;
94
- const f = this.$$.callbacks[t] || (this.$$.callbacks[t] = []);
95
- return f.push(r), () => {
96
- const o = f.indexOf(r);
97
- o !== -1 && f.splice(o, 1);
98
- };
99
- }
100
- /**
101
- * @param {Partial<Props>} props
102
- * @returns {void}
103
- */
104
- $set(t) {
105
- this.$$set && !O(t) && (this.$$.skip_bound = !0, this.$$set(t), this.$$.skip_bound = !1);
106
- }
107
- }
1
+ const e = "";
108
2
  export {
109
- Q as SvelteComponent,
110
- F as destroy_component,
111
- P as init,
112
- D as mount_component
3
+ e as default
113
4
  };
114
5
  //# sourceMappingURL=annotorious-svelte.es11.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"annotorious-svelte.es11.js","sources":["../../../node_modules/svelte/src/runtime/internal/Component.js"],"sourcesContent":["import {\n\tadd_render_callback,\n\tflush,\n\tflush_render_callbacks,\n\tschedule_update,\n\tdirty_components\n} from './scheduler.js';\nimport { current_component, set_current_component } from './lifecycle.js';\nimport { blank_object, is_empty, is_function, run, run_all, noop } from './utils.js';\nimport {\n\tchildren,\n\tdetach,\n\tstart_hydrating,\n\tend_hydrating,\n\tget_custom_elements_slots,\n\tinsert,\n\telement,\n\tattr\n} from './dom.js';\nimport { transition_in } from './transitions.js';\n\n/** @returns {void} */\nexport function bind(component, name, callback) {\n\tconst index = component.$$.props[name];\n\tif (index !== undefined) {\n\t\tcomponent.$$.bound[index] = callback;\n\t\tcallback(component.$$.ctx[index]);\n\t}\n}\n\n/** @returns {void} */\nexport function create_component(block) {\n\tblock && block.c();\n}\n\n/** @returns {void} */\nexport function claim_component(block, parent_nodes) {\n\tblock && block.l(parent_nodes);\n}\n\n/** @returns {void} */\nexport function mount_component(component, target, anchor) {\n\tconst { fragment, after_update } = component.$$;\n\tfragment && fragment.m(target, anchor);\n\t// onMount happens before the initial afterUpdate\n\tadd_render_callback(() => {\n\t\tconst new_on_destroy = component.$$.on_mount.map(run).filter(is_function);\n\t\t// if the component was destroyed immediately\n\t\t// it will update the `$$.on_destroy` reference to `null`.\n\t\t// the destructured on_destroy may still reference to the old array\n\t\tif (component.$$.on_destroy) {\n\t\t\tcomponent.$$.on_destroy.push(...new_on_destroy);\n\t\t} else {\n\t\t\t// Edge case - component was destroyed immediately,\n\t\t\t// most likely as a result of a binding initialising\n\t\t\trun_all(new_on_destroy);\n\t\t}\n\t\tcomponent.$$.on_mount = [];\n\t});\n\tafter_update.forEach(add_render_callback);\n}\n\n/** @returns {void} */\nexport function destroy_component(component, detaching) {\n\tconst $$ = component.$$;\n\tif ($$.fragment !== null) {\n\t\tflush_render_callbacks($$.after_update);\n\t\trun_all($$.on_destroy);\n\t\t$$.fragment && $$.fragment.d(detaching);\n\t\t// TODO null out other refs, including component.$$ (but need to\n\t\t// preserve final state?)\n\t\t$$.on_destroy = $$.fragment = null;\n\t\t$$.ctx = [];\n\t}\n}\n\n/** @returns {void} */\nfunction make_dirty(component, i) {\n\tif (component.$$.dirty[0] === -1) {\n\t\tdirty_components.push(component);\n\t\tschedule_update();\n\t\tcomponent.$$.dirty.fill(0);\n\t}\n\tcomponent.$$.dirty[(i / 31) | 0] |= 1 << i % 31;\n}\n\n// TODO: Document the other params\n/**\n * @param {SvelteComponent} component\n * @param {import('./public.js').ComponentConstructorOptions} options\n *\n * @param {import('./utils.js')['not_equal']} not_equal Used to compare props and state values.\n * @param {(target: Element | ShadowRoot) => void} [append_styles] Function that appends styles to the DOM when the component is first initialised.\n * This will be the `add_css` function from the compiled component.\n *\n * @returns {void}\n */\nexport function init(\n\tcomponent,\n\toptions,\n\tinstance,\n\tcreate_fragment,\n\tnot_equal,\n\tprops,\n\tappend_styles = null,\n\tdirty = [-1]\n) {\n\tconst parent_component = current_component;\n\tset_current_component(component);\n\t/** @type {import('./private.js').T$$} */\n\tconst $$ = (component.$$ = {\n\t\tfragment: null,\n\t\tctx: [],\n\t\t// state\n\t\tprops,\n\t\tupdate: noop,\n\t\tnot_equal,\n\t\tbound: blank_object(),\n\t\t// lifecycle\n\t\ton_mount: [],\n\t\ton_destroy: [],\n\t\ton_disconnect: [],\n\t\tbefore_update: [],\n\t\tafter_update: [],\n\t\tcontext: new Map(options.context || (parent_component ? parent_component.$$.context : [])),\n\t\t// everything else\n\t\tcallbacks: blank_object(),\n\t\tdirty,\n\t\tskip_bound: false,\n\t\troot: options.target || parent_component.$$.root\n\t});\n\tappend_styles && append_styles($$.root);\n\tlet ready = false;\n\t$$.ctx = instance\n\t\t? instance(component, options.props || {}, (i, ret, ...rest) => {\n\t\t\t\tconst value = rest.length ? rest[0] : ret;\n\t\t\t\tif ($$.ctx && not_equal($$.ctx[i], ($$.ctx[i] = value))) {\n\t\t\t\t\tif (!$$.skip_bound && $$.bound[i]) $$.bound[i](value);\n\t\t\t\t\tif (ready) make_dirty(component, i);\n\t\t\t\t}\n\t\t\t\treturn ret;\n\t\t })\n\t\t: [];\n\t$$.update();\n\tready = true;\n\trun_all($$.before_update);\n\t// `false` as a special case of no DOM component\n\t$$.fragment = create_fragment ? create_fragment($$.ctx) : false;\n\tif (options.target) {\n\t\tif (options.hydrate) {\n\t\t\tstart_hydrating();\n\t\t\t// TODO: what is the correct type here?\n\t\t\t// @ts-expect-error\n\t\t\tconst nodes = children(options.target);\n\t\t\t$$.fragment && $$.fragment.l(nodes);\n\t\t\tnodes.forEach(detach);\n\t\t} else {\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\t\t\t$$.fragment && $$.fragment.c();\n\t\t}\n\t\tif (options.intro) transition_in(component.$$.fragment);\n\t\tmount_component(component, options.target, options.anchor);\n\t\tend_hydrating();\n\t\tflush();\n\t}\n\tset_current_component(parent_component);\n}\n\nexport let SvelteElement;\n\nif (typeof HTMLElement === 'function') {\n\tSvelteElement = class extends HTMLElement {\n\t\t/** The Svelte component constructor */\n\t\t$$ctor;\n\t\t/** Slots */\n\t\t$$s;\n\t\t/** The Svelte component instance */\n\t\t$$c;\n\t\t/** Whether or not the custom element is connected */\n\t\t$$cn = false;\n\t\t/** Component props data */\n\t\t$$d = {};\n\t\t/** `true` if currently in the process of reflecting component props back to attributes */\n\t\t$$r = false;\n\t\t/** @type {Record<string, CustomElementPropDefinition>} Props definition (name, reflected, type etc) */\n\t\t$$p_d = {};\n\t\t/** @type {Record<string, Function[]>} Event listeners */\n\t\t$$l = {};\n\t\t/** @type {Map<Function, Function>} Event listener unsubscribe functions */\n\t\t$$l_u = new Map();\n\n\t\tconstructor($$componentCtor, $$slots, use_shadow_dom) {\n\t\t\tsuper();\n\t\t\tthis.$$ctor = $$componentCtor;\n\t\t\tthis.$$s = $$slots;\n\t\t\tif (use_shadow_dom) {\n\t\t\t\tthis.attachShadow({ mode: 'open' });\n\t\t\t}\n\t\t}\n\n\t\taddEventListener(type, listener, options) {\n\t\t\t// We can't determine upfront if the event is a custom event or not, so we have to\n\t\t\t// listen to both. If someone uses a custom event with the same name as a regular\n\t\t\t// browser event, this fires twice - we can't avoid that.\n\t\t\tthis.$$l[type] = this.$$l[type] || [];\n\t\t\tthis.$$l[type].push(listener);\n\t\t\tif (this.$$c) {\n\t\t\t\tconst unsub = this.$$c.$on(type, listener);\n\t\t\t\tthis.$$l_u.set(listener, unsub);\n\t\t\t}\n\t\t\tsuper.addEventListener(type, listener, options);\n\t\t}\n\n\t\tremoveEventListener(type, listener, options) {\n\t\t\tsuper.removeEventListener(type, listener, options);\n\t\t\tif (this.$$c) {\n\t\t\t\tconst unsub = this.$$l_u.get(listener);\n\t\t\t\tif (unsub) {\n\t\t\t\t\tunsub();\n\t\t\t\t\tthis.$$l_u.delete(listener);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tasync connectedCallback() {\n\t\t\tthis.$$cn = true;\n\t\t\tif (!this.$$c) {\n\t\t\t\t// We wait one tick to let possible child slot elements be created/mounted\n\t\t\t\tawait Promise.resolve();\n\t\t\t\tif (!this.$$cn || this.$$c) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tfunction create_slot(name) {\n\t\t\t\t\treturn () => {\n\t\t\t\t\t\tlet node;\n\t\t\t\t\t\tconst obj = {\n\t\t\t\t\t\t\tc: function create() {\n\t\t\t\t\t\t\t\tnode = element('slot');\n\t\t\t\t\t\t\t\tif (name !== 'default') {\n\t\t\t\t\t\t\t\t\tattr(node, 'name', name);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t/**\n\t\t\t\t\t\t\t * @param {HTMLElement} target\n\t\t\t\t\t\t\t * @param {HTMLElement} [anchor]\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\tm: function mount(target, anchor) {\n\t\t\t\t\t\t\t\tinsert(target, node, anchor);\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\td: function destroy(detaching) {\n\t\t\t\t\t\t\t\tif (detaching) {\n\t\t\t\t\t\t\t\t\tdetach(node);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t};\n\t\t\t\t\t\treturn obj;\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\tconst $$slots = {};\n\t\t\t\tconst existing_slots = get_custom_elements_slots(this);\n\t\t\t\tfor (const name of this.$$s) {\n\t\t\t\t\tif (name in existing_slots) {\n\t\t\t\t\t\t$$slots[name] = [create_slot(name)];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfor (const attribute of this.attributes) {\n\t\t\t\t\t// this.$$data takes precedence over this.attributes\n\t\t\t\t\tconst name = this.$$g_p(attribute.name);\n\t\t\t\t\tif (!(name in this.$$d)) {\n\t\t\t\t\t\tthis.$$d[name] = get_custom_element_value(name, attribute.value, this.$$p_d, 'toProp');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Port over props that were set programmatically before ce was initialized\n\t\t\t\tfor (const key in this.$$p_d) {\n\t\t\t\t\tif (!(key in this.$$d) && this[key] !== undefined) {\n\t\t\t\t\t\tthis.$$d[key] = this[key]; // don't transform, these were set through JavaScript\n\t\t\t\t\t\tdelete this[key]; // remove the property that shadows the getter/setter\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.$$c = new this.$$ctor({\n\t\t\t\t\ttarget: this.shadowRoot || this,\n\t\t\t\t\tprops: {\n\t\t\t\t\t\t...this.$$d,\n\t\t\t\t\t\t$$slots,\n\t\t\t\t\t\t$$scope: {\n\t\t\t\t\t\t\tctx: []\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\t// Reflect component props as attributes\n\t\t\t\tconst reflect_attributes = () => {\n\t\t\t\t\tthis.$$r = true;\n\t\t\t\t\tfor (const key in this.$$p_d) {\n\t\t\t\t\t\tthis.$$d[key] = this.$$c.$$.ctx[this.$$c.$$.props[key]];\n\t\t\t\t\t\tif (this.$$p_d[key].reflect) {\n\t\t\t\t\t\t\tconst attribute_value = get_custom_element_value(\n\t\t\t\t\t\t\t\tkey,\n\t\t\t\t\t\t\t\tthis.$$d[key],\n\t\t\t\t\t\t\t\tthis.$$p_d,\n\t\t\t\t\t\t\t\t'toAttribute'\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tif (attribute_value == null) {\n\t\t\t\t\t\t\t\tthis.removeAttribute(this.$$p_d[key].attribute || key);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis.setAttribute(this.$$p_d[key].attribute || key, attribute_value);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tthis.$$r = false;\n\t\t\t\t};\n\t\t\t\tthis.$$c.$$.after_update.push(reflect_attributes);\n\t\t\t\treflect_attributes(); // once initially because after_update is added too late for first render\n\n\t\t\t\tfor (const type in this.$$l) {\n\t\t\t\t\tfor (const listener of this.$$l[type]) {\n\t\t\t\t\t\tconst unsub = this.$$c.$on(type, listener);\n\t\t\t\t\t\tthis.$$l_u.set(listener, unsub);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.$$l = {};\n\t\t\t}\n\t\t}\n\n\t\t// We don't need this when working within Svelte code, but for compatibility of people using this outside of Svelte\n\t\t// and setting attributes through setAttribute etc, this is helpful\n\t\tattributeChangedCallback(attr, _oldValue, newValue) {\n\t\t\tif (this.$$r) return;\n\t\t\tattr = this.$$g_p(attr);\n\t\t\tthis.$$d[attr] = get_custom_element_value(attr, newValue, this.$$p_d, 'toProp');\n\t\t\tthis.$$c?.$set({ [attr]: this.$$d[attr] });\n\t\t}\n\n\t\tdisconnectedCallback() {\n\t\t\tthis.$$cn = false;\n\t\t\t// In a microtask, because this could be a move within the DOM\n\t\t\tPromise.resolve().then(() => {\n\t\t\t\tif (!this.$$cn) {\n\t\t\t\t\tthis.$$c.$destroy();\n\t\t\t\t\tthis.$$c = undefined;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\t$$g_p(attribute_name) {\n\t\t\treturn (\n\t\t\t\tObject.keys(this.$$p_d).find(\n\t\t\t\t\t(key) =>\n\t\t\t\t\t\tthis.$$p_d[key].attribute === attribute_name ||\n\t\t\t\t\t\t(!this.$$p_d[key].attribute && key.toLowerCase() === attribute_name)\n\t\t\t\t) || attribute_name\n\t\t\t);\n\t\t}\n\t};\n}\n\n/**\n * @param {string} prop\n * @param {any} value\n * @param {Record<string, CustomElementPropDefinition>} props_definition\n * @param {'toAttribute' | 'toProp'} [transform]\n */\nfunction get_custom_element_value(prop, value, props_definition, transform) {\n\tconst type = props_definition[prop]?.type;\n\tvalue = type === 'Boolean' && typeof value !== 'boolean' ? value != null : value;\n\tif (!transform || !props_definition[prop]) {\n\t\treturn value;\n\t} else if (transform === 'toAttribute') {\n\t\tswitch (type) {\n\t\t\tcase 'Object':\n\t\t\tcase 'Array':\n\t\t\t\treturn value == null ? null : JSON.stringify(value);\n\t\t\tcase 'Boolean':\n\t\t\t\treturn value ? '' : null;\n\t\t\tcase 'Number':\n\t\t\t\treturn value == null ? null : value;\n\t\t\tdefault:\n\t\t\t\treturn value;\n\t\t}\n\t} else {\n\t\tswitch (type) {\n\t\t\tcase 'Object':\n\t\t\tcase 'Array':\n\t\t\t\treturn value && JSON.parse(value);\n\t\t\tcase 'Boolean':\n\t\t\t\treturn value; // conversion already handled above\n\t\t\tcase 'Number':\n\t\t\t\treturn value != null ? +value : value;\n\t\t\tdefault:\n\t\t\t\treturn value;\n\t\t}\n\t}\n}\n\n/**\n * @internal\n *\n * Turn a Svelte component into a custom element.\n * @param {import('./public.js').ComponentType} Component A Svelte component constructor\n * @param {Record<string, CustomElementPropDefinition>} props_definition The props to observe\n * @param {string[]} slots The slots to create\n * @param {string[]} accessors Other accessors besides the ones for props the component has\n * @param {boolean} use_shadow_dom Whether to use shadow DOM\n * @param {(ce: new () => HTMLElement) => new () => HTMLElement} [extend]\n */\nexport function create_custom_element(\n\tComponent,\n\tprops_definition,\n\tslots,\n\taccessors,\n\tuse_shadow_dom,\n\textend\n) {\n\tlet Class = class extends SvelteElement {\n\t\tconstructor() {\n\t\t\tsuper(Component, slots, use_shadow_dom);\n\t\t\tthis.$$p_d = props_definition;\n\t\t}\n\t\tstatic get observedAttributes() {\n\t\t\treturn Object.keys(props_definition).map((key) =>\n\t\t\t\t(props_definition[key].attribute || key).toLowerCase()\n\t\t\t);\n\t\t}\n\t};\n\tObject.keys(props_definition).forEach((prop) => {\n\t\tObject.defineProperty(Class.prototype, prop, {\n\t\t\tget() {\n\t\t\t\treturn this.$$c && prop in this.$$c ? this.$$c[prop] : this.$$d[prop];\n\t\t\t},\n\t\t\tset(value) {\n\t\t\t\tvalue = get_custom_element_value(prop, value, props_definition);\n\t\t\t\tthis.$$d[prop] = value;\n\t\t\t\tthis.$$c?.$set({ [prop]: value });\n\t\t\t}\n\t\t});\n\t});\n\taccessors.forEach((accessor) => {\n\t\tObject.defineProperty(Class.prototype, accessor, {\n\t\t\tget() {\n\t\t\t\treturn this.$$c?.[accessor];\n\t\t\t}\n\t\t});\n\t});\n\tif (extend) {\n\t\t// @ts-expect-error - assigning here is fine\n\t\tClass = extend(Class);\n\t}\n\tComponent.element = /** @type {any} */ (Class);\n\treturn Class;\n}\n\n/**\n * Base class for Svelte components. Used when dev=false.\n *\n * @template {Record<string, any>} [Props=any]\n * @template {Record<string, any>} [Events=any]\n */\nexport class SvelteComponent {\n\t/**\n\t * ### PRIVATE API\n\t *\n\t * Do not use, may change at any time\n\t *\n\t * @type {any}\n\t */\n\t$$ = undefined;\n\t/**\n\t * ### PRIVATE API\n\t *\n\t * Do not use, may change at any time\n\t *\n\t * @type {any}\n\t */\n\t$$set = undefined;\n\n\t/** @returns {void} */\n\t$destroy() {\n\t\tdestroy_component(this, 1);\n\t\tthis.$destroy = noop;\n\t}\n\n\t/**\n\t * @template {Extract<keyof Events, string>} K\n\t * @param {K} type\n\t * @param {((e: Events[K]) => void) | null | undefined} callback\n\t * @returns {() => void}\n\t */\n\t$on(type, callback) {\n\t\tif (!is_function(callback)) {\n\t\t\treturn noop;\n\t\t}\n\t\tconst callbacks = this.$$.callbacks[type] || (this.$$.callbacks[type] = []);\n\t\tcallbacks.push(callback);\n\t\treturn () => {\n\t\t\tconst index = callbacks.indexOf(callback);\n\t\t\tif (index !== -1) callbacks.splice(index, 1);\n\t\t};\n\t}\n\n\t/**\n\t * @param {Partial<Props>} props\n\t * @returns {void}\n\t */\n\t$set(props) {\n\t\tif (this.$$set && !is_empty(props)) {\n\t\t\tthis.$$.skip_bound = true;\n\t\t\tthis.$$set(props);\n\t\t\tthis.$$.skip_bound = false;\n\t\t}\n\t}\n}\n\n/**\n * @typedef {Object} CustomElementPropDefinition\n * @property {string} [attribute]\n * @property {boolean} [reflect]\n * @property {'String'|'Boolean'|'Number'|'Array'|'Object'} [type]\n */\n"],"names":["mount_component","component","target","anchor","fragment","after_update","add_render_callback","new_on_destroy","run","is_function","run_all","destroy_component","detaching","$$","flush_render_callbacks","make_dirty","i","dirty_components","schedule_update","init","options","instance","create_fragment","not_equal","props","append_styles","dirty","parent_component","current_component","set_current_component","noop","blank_object","ready","ret","rest","value","nodes","children","detach","transition_in","flush","SvelteComponent","__publicField","type","callback","callbacks","index","is_empty"],"mappings":";;;;;;;;AAyCO,SAASA,EAAgBC,GAAWC,GAAQC,GAAQ;AAC1D,QAAM,EAAE,UAAAC,GAAU,cAAAC,MAAiBJ,EAAU;AAC7C,EAAAG,KAAYA,EAAS,EAAEF,GAAQC,CAAM,GAErCG,EAAoB,MAAM;AACzB,UAAMC,IAAiBN,EAAU,GAAG,SAAS,IAAIO,CAAG,EAAE,OAAOC,CAAW;AAIxE,IAAIR,EAAU,GAAG,aAChBA,EAAU,GAAG,WAAW,KAAK,GAAGM,CAAc,IAI9CG,EAAQH,CAAc,GAEvBN,EAAU,GAAG,WAAW;EAC1B,CAAE,GACDI,EAAa,QAAQC,CAAmB;AACzC;AAGO,SAASK,EAAkBV,GAAWW,GAAW;AACvD,QAAMC,IAAKZ,EAAU;AACrB,EAAIY,EAAG,aAAa,SACnBC,EAAuBD,EAAG,YAAY,GACtCH,EAAQG,EAAG,UAAU,GACrBA,EAAG,YAAYA,EAAG,SAAS,EAAED,CAAS,GAGtCC,EAAG,aAAaA,EAAG,WAAW,MAC9BA,EAAG,MAAM;AAEX;AAGA,SAASE,EAAWd,GAAWe,GAAG;AACjC,EAAIf,EAAU,G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I,KAAK,SAAS,CAACuB,EAASvB,CAAK,MAChC,KAAK,GAAG,aAAa,IACrB,KAAK,MAAMA,CAAK,GAChB,KAAK,GAAG,aAAa;AAAA,EAEtB;AACF;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"annotorious-svelte.es11.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1,3 +1,20 @@
1
- import { PUBLIC_VERSION as e } from "./annotorious-svelte.es13.js";
2
- typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(e);
1
+ import e from "./annotorious-svelte.es13.js";
2
+ import i from "./annotorious-svelte.es14.js";
3
+ import { unsafeStringify as d } from "./annotorious-svelte.es15.js";
4
+ function g(n, m, t) {
5
+ if (e.randomUUID && !m && !n)
6
+ return e.randomUUID();
7
+ n = n || {};
8
+ const r = n.random || (n.rng || i)();
9
+ if (r[6] = r[6] & 15 | 64, r[8] = r[8] & 63 | 128, m) {
10
+ t = t || 0;
11
+ for (let a = 0; a < 16; ++a)
12
+ m[t + a] = r[a];
13
+ return m;
14
+ }
15
+ return d(r);
16
+ }
17
+ export {
18
+ g as default
19
+ };
3
20
  //# sourceMappingURL=annotorious-svelte.es12.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"annotorious-svelte.es12.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
+ {"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,5 +1,7 @@
1
- const o = "4";
1
+ const o = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), t = {
2
+ randomUUID: o
3
+ };
2
4
  export {
3
- o as PUBLIC_VERSION
5
+ t as default
4
6
  };
5
7
  //# sourceMappingURL=annotorious-svelte.es13.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"annotorious-svelte.es13.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.12';\nexport const PUBLIC_VERSION = '4';\n"],"names":["PUBLIC_VERSION"],"mappings":"AASY,MAACA,IAAiB;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"annotorious-svelte.es13.js","sources":["../../../node_modules/uuid/dist/esm-browser/native.js"],"sourcesContent":["const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);\nexport default {\n randomUUID\n};"],"names":["randomUUID","native"],"mappings":"AAAA,MAAMA,IAAa,OAAO,SAAW,OAAe,OAAO,cAAc,OAAO,WAAW,KAAK,MAAM,GACvFC,IAAA;AAAA,EACb,YAAAD;AACF;","x_google_ignoreList":[0]}