@annotorious/svelte 3.0.20 → 3.0.21
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.
|
@@ -1,81 +1,81 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { toSvelteStore as
|
|
5
|
-
import { Origin as
|
|
6
|
-
import { ShapeType as
|
|
7
|
-
import { createOSDAnnotator as
|
|
8
|
-
import
|
|
9
|
-
function
|
|
10
|
-
}
|
|
11
|
-
function
|
|
1
|
+
var ct = Object.defineProperty;
|
|
2
|
+
var dt = (e, t, n) => t in e ? ct(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var ve = (e, t, n) => dt(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
import { toSvelteStore as gt } from "@annotorious/core";
|
|
5
|
+
import { Origin as $t, UserSelectAction as Jt, createAnonymousGuest as Kt, createBody as Qt, defaultColorProvider as Zt } from "@annotorious/core";
|
|
6
|
+
import { ShapeType as tn, W3CImageFormat as nn, createImageAnnotator as on } from "@annotorious/annotorious";
|
|
7
|
+
import { createOSDAnnotator as pt } from "@annotorious/openseadragon";
|
|
8
|
+
import Re from "openseadragon";
|
|
9
|
+
function R() {
|
|
10
|
+
}
|
|
11
|
+
function ht(e, t) {
|
|
12
12
|
for (const n in t) e[n] = t[n];
|
|
13
13
|
return (
|
|
14
14
|
/** @type {T & S} */
|
|
15
15
|
e
|
|
16
16
|
);
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function Ke(e) {
|
|
19
19
|
return e();
|
|
20
20
|
}
|
|
21
|
-
function
|
|
21
|
+
function Xe() {
|
|
22
22
|
return /* @__PURE__ */ Object.create(null);
|
|
23
23
|
}
|
|
24
|
-
function
|
|
25
|
-
e.forEach(
|
|
24
|
+
function z(e) {
|
|
25
|
+
e.forEach(Ke);
|
|
26
26
|
}
|
|
27
|
-
function
|
|
27
|
+
function se(e) {
|
|
28
28
|
return typeof e == "function";
|
|
29
29
|
}
|
|
30
|
-
function
|
|
30
|
+
function De(e, t) {
|
|
31
31
|
return e != e ? t == t : e !== t || e && typeof e == "object" || typeof e == "function";
|
|
32
32
|
}
|
|
33
|
-
function
|
|
33
|
+
function mt(e) {
|
|
34
34
|
return Object.keys(e).length === 0;
|
|
35
35
|
}
|
|
36
|
-
function
|
|
36
|
+
function _t(e, ...t) {
|
|
37
37
|
if (e == null) {
|
|
38
38
|
for (const o of t)
|
|
39
39
|
o(void 0);
|
|
40
|
-
return
|
|
40
|
+
return R;
|
|
41
41
|
}
|
|
42
42
|
const n = e.subscribe(...t);
|
|
43
43
|
return n.unsubscribe ? () => n.unsubscribe() : n;
|
|
44
44
|
}
|
|
45
|
-
function
|
|
46
|
-
e.$$.on_destroy.push(
|
|
45
|
+
function Qe(e, t, n) {
|
|
46
|
+
e.$$.on_destroy.push(_t(t, n));
|
|
47
47
|
}
|
|
48
|
-
function
|
|
48
|
+
function Ze(e, t, n, o) {
|
|
49
49
|
if (e) {
|
|
50
|
-
const r =
|
|
50
|
+
const r = et(e, t, n, o);
|
|
51
51
|
return e[0](r);
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
-
function
|
|
55
|
-
return e[1] && o ?
|
|
54
|
+
function et(e, t, n, o) {
|
|
55
|
+
return e[1] && o ? ht(n.ctx.slice(), e[1](o(t))) : n.ctx;
|
|
56
56
|
}
|
|
57
|
-
function
|
|
57
|
+
function tt(e, t, n, o) {
|
|
58
58
|
if (e[2] && o) {
|
|
59
59
|
const r = e[2](o(n));
|
|
60
60
|
if (t.dirty === void 0)
|
|
61
61
|
return r;
|
|
62
62
|
if (typeof r == "object") {
|
|
63
|
-
const i = [],
|
|
64
|
-
for (let
|
|
65
|
-
i[
|
|
63
|
+
const i = [], l = Math.max(t.dirty.length, r.length);
|
|
64
|
+
for (let a = 0; a < l; a += 1)
|
|
65
|
+
i[a] = t.dirty[a] | r[a];
|
|
66
66
|
return i;
|
|
67
67
|
}
|
|
68
68
|
return t.dirty | r;
|
|
69
69
|
}
|
|
70
70
|
return t.dirty;
|
|
71
71
|
}
|
|
72
|
-
function
|
|
72
|
+
function nt(e, t, n, o, r, i) {
|
|
73
73
|
if (r) {
|
|
74
|
-
const
|
|
75
|
-
e.p(
|
|
74
|
+
const l = et(t, n, o, i);
|
|
75
|
+
e.p(l, r);
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
|
-
function
|
|
78
|
+
function ot(e) {
|
|
79
79
|
if (e.ctx.length > 32) {
|
|
80
80
|
const t = [], n = e.ctx.length / 32;
|
|
81
81
|
for (let o = 0; o < n; o++)
|
|
@@ -84,182 +84,182 @@ function Ke(e) {
|
|
|
84
84
|
}
|
|
85
85
|
return -1;
|
|
86
86
|
}
|
|
87
|
-
function
|
|
88
|
-
return e &&
|
|
87
|
+
function yt(e) {
|
|
88
|
+
return e && se(e.destroy) ? e.destroy : R;
|
|
89
89
|
}
|
|
90
|
-
function
|
|
90
|
+
function bt(e, t) {
|
|
91
91
|
e.appendChild(t);
|
|
92
92
|
}
|
|
93
|
-
function
|
|
93
|
+
function K(e, t, n) {
|
|
94
94
|
e.insertBefore(t, n || null);
|
|
95
95
|
}
|
|
96
|
-
function
|
|
96
|
+
function W(e) {
|
|
97
97
|
e.parentNode && e.parentNode.removeChild(e);
|
|
98
98
|
}
|
|
99
|
-
function
|
|
99
|
+
function rt(e) {
|
|
100
100
|
return document.createElement(e);
|
|
101
101
|
}
|
|
102
|
-
function
|
|
102
|
+
function it(e) {
|
|
103
103
|
return document.createTextNode(e);
|
|
104
104
|
}
|
|
105
|
-
function
|
|
106
|
-
return
|
|
105
|
+
function Me() {
|
|
106
|
+
return it("");
|
|
107
107
|
}
|
|
108
|
-
function
|
|
108
|
+
function Ye(e, t, n, o) {
|
|
109
109
|
return e.addEventListener(t, n, o), () => e.removeEventListener(t, n, o);
|
|
110
110
|
}
|
|
111
|
-
function
|
|
111
|
+
function re(e, t, n) {
|
|
112
112
|
n == null ? e.removeAttribute(t) : e.getAttribute(t) !== n && e.setAttribute(t, n);
|
|
113
113
|
}
|
|
114
|
-
function
|
|
114
|
+
function vt(e) {
|
|
115
115
|
return Array.from(e.childNodes);
|
|
116
116
|
}
|
|
117
|
-
function
|
|
117
|
+
function wt(e, t) {
|
|
118
118
|
t = "" + t, e.data !== t && (e.data = /** @type {string} */
|
|
119
119
|
t);
|
|
120
120
|
}
|
|
121
|
-
let
|
|
122
|
-
function
|
|
123
|
-
|
|
121
|
+
let J;
|
|
122
|
+
function $(e) {
|
|
123
|
+
J = e;
|
|
124
124
|
}
|
|
125
|
-
function
|
|
126
|
-
if (
|
|
127
|
-
return
|
|
125
|
+
function Pe() {
|
|
126
|
+
if (!J) throw new Error("Function called outside component initialization");
|
|
127
|
+
return J;
|
|
128
128
|
}
|
|
129
|
-
function
|
|
130
|
-
|
|
129
|
+
function st(e) {
|
|
130
|
+
Pe().$$.on_mount.push(e);
|
|
131
131
|
}
|
|
132
|
-
function
|
|
133
|
-
return
|
|
132
|
+
function He(e, t) {
|
|
133
|
+
return Pe().$$.context.set(e, t), t;
|
|
134
134
|
}
|
|
135
|
-
function
|
|
136
|
-
return
|
|
137
|
-
}
|
|
138
|
-
const
|
|
139
|
-
let
|
|
140
|
-
const
|
|
141
|
-
let
|
|
142
|
-
function
|
|
143
|
-
|
|
144
|
-
}
|
|
145
|
-
function
|
|
146
|
-
|
|
147
|
-
}
|
|
148
|
-
const
|
|
149
|
-
let
|
|
150
|
-
function
|
|
151
|
-
if (
|
|
135
|
+
function Et(e) {
|
|
136
|
+
return Pe().$$.context.get(e);
|
|
137
|
+
}
|
|
138
|
+
const U = [], Ue = [];
|
|
139
|
+
let q = [];
|
|
140
|
+
const qe = [], St = /* @__PURE__ */ Promise.resolve();
|
|
141
|
+
let Ae = !1;
|
|
142
|
+
function xt() {
|
|
143
|
+
Ae || (Ae = !0, St.then(lt));
|
|
144
|
+
}
|
|
145
|
+
function Ne(e) {
|
|
146
|
+
q.push(e);
|
|
147
|
+
}
|
|
148
|
+
const we = /* @__PURE__ */ new Set();
|
|
149
|
+
let H = 0;
|
|
150
|
+
function lt() {
|
|
151
|
+
if (H !== 0)
|
|
152
152
|
return;
|
|
153
|
-
const e =
|
|
153
|
+
const e = J;
|
|
154
154
|
do {
|
|
155
155
|
try {
|
|
156
|
-
for (;
|
|
157
|
-
const t =
|
|
158
|
-
|
|
156
|
+
for (; H < U.length; ) {
|
|
157
|
+
const t = U[H];
|
|
158
|
+
H++, $(t), Ct(t.$$);
|
|
159
159
|
}
|
|
160
160
|
} catch (t) {
|
|
161
|
-
throw
|
|
161
|
+
throw U.length = 0, H = 0, t;
|
|
162
162
|
}
|
|
163
|
-
for (
|
|
164
|
-
for (let t = 0; t <
|
|
165
|
-
const n =
|
|
166
|
-
|
|
163
|
+
for ($(null), U.length = 0, H = 0; Ue.length; ) Ue.pop()();
|
|
164
|
+
for (let t = 0; t < q.length; t += 1) {
|
|
165
|
+
const n = q[t];
|
|
166
|
+
we.has(n) || (we.add(n), n());
|
|
167
167
|
}
|
|
168
|
-
|
|
169
|
-
} while (
|
|
170
|
-
for (;
|
|
171
|
-
|
|
172
|
-
|
|
168
|
+
q.length = 0;
|
|
169
|
+
} while (U.length);
|
|
170
|
+
for (; qe.length; )
|
|
171
|
+
qe.pop()();
|
|
172
|
+
Ae = !1, we.clear(), $(e);
|
|
173
173
|
}
|
|
174
|
-
function
|
|
174
|
+
function Ct(e) {
|
|
175
175
|
if (e.fragment !== null) {
|
|
176
|
-
e.update(),
|
|
176
|
+
e.update(), z(e.before_update);
|
|
177
177
|
const t = e.dirty;
|
|
178
|
-
e.dirty = [-1], e.fragment && e.fragment.p(e.ctx, t), e.after_update.forEach(
|
|
178
|
+
e.dirty = [-1], e.fragment && e.fragment.p(e.ctx, t), e.after_update.forEach(Ne);
|
|
179
179
|
}
|
|
180
180
|
}
|
|
181
|
-
function
|
|
181
|
+
function At(e) {
|
|
182
182
|
const t = [], n = [];
|
|
183
|
-
|
|
183
|
+
q.forEach((o) => e.indexOf(o) === -1 ? t.push(o) : n.push(o)), n.forEach((o) => o()), q = t;
|
|
184
184
|
}
|
|
185
|
-
const
|
|
186
|
-
let
|
|
187
|
-
function
|
|
188
|
-
|
|
185
|
+
const ie = /* @__PURE__ */ new Set();
|
|
186
|
+
let I;
|
|
187
|
+
function at() {
|
|
188
|
+
I = {
|
|
189
189
|
r: 0,
|
|
190
190
|
c: [],
|
|
191
|
-
p:
|
|
191
|
+
p: I
|
|
192
192
|
// parent group
|
|
193
193
|
};
|
|
194
194
|
}
|
|
195
|
-
function
|
|
196
|
-
|
|
195
|
+
function ut() {
|
|
196
|
+
I.r || z(I.c), I = I.p;
|
|
197
197
|
}
|
|
198
|
-
function
|
|
199
|
-
e && e.i && (
|
|
198
|
+
function k(e, t) {
|
|
199
|
+
e && e.i && (ie.delete(e), e.i(t));
|
|
200
200
|
}
|
|
201
|
-
function
|
|
201
|
+
function V(e, t, n, o) {
|
|
202
202
|
if (e && e.o) {
|
|
203
|
-
if (
|
|
204
|
-
|
|
205
|
-
|
|
203
|
+
if (ie.has(e)) return;
|
|
204
|
+
ie.add(e), I.c.push(() => {
|
|
205
|
+
ie.delete(e), o && (n && e.d(1), o());
|
|
206
206
|
}), e.o(t);
|
|
207
207
|
} else o && o();
|
|
208
208
|
}
|
|
209
|
-
function
|
|
209
|
+
function Nt(e, t, n) {
|
|
210
210
|
const { fragment: o, after_update: r } = e.$$;
|
|
211
|
-
o && o.m(t, n),
|
|
212
|
-
const i = e.$$.on_mount.map(
|
|
213
|
-
e.$$.on_destroy ? e.$$.on_destroy.push(...i) :
|
|
214
|
-
}), r.forEach(
|
|
211
|
+
o && o.m(t, n), Ne(() => {
|
|
212
|
+
const i = e.$$.on_mount.map(Ke).filter(se);
|
|
213
|
+
e.$$.on_destroy ? e.$$.on_destroy.push(...i) : z(i), e.$$.on_mount = [];
|
|
214
|
+
}), r.forEach(Ne);
|
|
215
215
|
}
|
|
216
|
-
function
|
|
216
|
+
function kt(e, t) {
|
|
217
217
|
const n = e.$$;
|
|
218
|
-
n.fragment !== null && (
|
|
218
|
+
n.fragment !== null && (At(n.after_update), z(n.on_destroy), n.fragment && n.fragment.d(t), n.on_destroy = n.fragment = null, n.ctx = []);
|
|
219
219
|
}
|
|
220
|
-
function
|
|
221
|
-
e.$$.dirty[0] === -1 && (
|
|
220
|
+
function Dt(e, t) {
|
|
221
|
+
e.$$.dirty[0] === -1 && (U.push(e), xt(), e.$$.dirty.fill(0)), e.$$.dirty[t / 31 | 0] |= 1 << t % 31;
|
|
222
222
|
}
|
|
223
|
-
function
|
|
224
|
-
const
|
|
225
|
-
|
|
226
|
-
const
|
|
223
|
+
function Le(e, t, n, o, r, i, l = null, a = [-1]) {
|
|
224
|
+
const g = J;
|
|
225
|
+
$(e);
|
|
226
|
+
const u = e.$$ = {
|
|
227
227
|
fragment: null,
|
|
228
228
|
ctx: [],
|
|
229
229
|
// state
|
|
230
230
|
props: i,
|
|
231
|
-
update:
|
|
231
|
+
update: R,
|
|
232
232
|
not_equal: r,
|
|
233
|
-
bound:
|
|
233
|
+
bound: Xe(),
|
|
234
234
|
// lifecycle
|
|
235
235
|
on_mount: [],
|
|
236
236
|
on_destroy: [],
|
|
237
237
|
on_disconnect: [],
|
|
238
238
|
before_update: [],
|
|
239
239
|
after_update: [],
|
|
240
|
-
context: new Map(t.context || (
|
|
240
|
+
context: new Map(t.context || (g ? g.$$.context : [])),
|
|
241
241
|
// everything else
|
|
242
|
-
callbacks:
|
|
243
|
-
dirty:
|
|
242
|
+
callbacks: Xe(),
|
|
243
|
+
dirty: a,
|
|
244
244
|
skip_bound: !1,
|
|
245
|
-
root: t.target ||
|
|
245
|
+
root: t.target || g.$$.root
|
|
246
246
|
};
|
|
247
|
-
|
|
248
|
-
let
|
|
249
|
-
if (
|
|
250
|
-
const
|
|
251
|
-
return
|
|
252
|
-
}) : [],
|
|
247
|
+
l && l(u.root);
|
|
248
|
+
let b = !1;
|
|
249
|
+
if (u.ctx = n ? n(e, t.props || {}, (p, m, ...E) => {
|
|
250
|
+
const h = E.length ? E[0] : m;
|
|
251
|
+
return u.ctx && r(u.ctx[p], u.ctx[p] = h) && (!u.skip_bound && u.bound[p] && u.bound[p](h), b && Dt(e, p)), m;
|
|
252
|
+
}) : [], u.update(), b = !0, z(u.before_update), u.fragment = o ? o(u.ctx) : !1, t.target) {
|
|
253
253
|
if (t.hydrate) {
|
|
254
|
-
const
|
|
255
|
-
|
|
254
|
+
const p = vt(t.target);
|
|
255
|
+
u.fragment && u.fragment.l(p), p.forEach(W);
|
|
256
256
|
} else
|
|
257
|
-
|
|
258
|
-
t.intro &&
|
|
257
|
+
u.fragment && u.fragment.c();
|
|
258
|
+
t.intro && k(e.$$.fragment), Nt(e, t.target, t.anchor), lt();
|
|
259
259
|
}
|
|
260
|
-
|
|
260
|
+
$(g);
|
|
261
261
|
}
|
|
262
|
-
class
|
|
262
|
+
class Oe {
|
|
263
263
|
constructor() {
|
|
264
264
|
/**
|
|
265
265
|
* ### PRIVATE API
|
|
@@ -268,7 +268,7 @@ class Ae {
|
|
|
268
268
|
*
|
|
269
269
|
* @type {any}
|
|
270
270
|
*/
|
|
271
|
-
|
|
271
|
+
ve(this, "$$");
|
|
272
272
|
/**
|
|
273
273
|
* ### PRIVATE API
|
|
274
274
|
*
|
|
@@ -276,11 +276,11 @@ class Ae {
|
|
|
276
276
|
*
|
|
277
277
|
* @type {any}
|
|
278
278
|
*/
|
|
279
|
-
|
|
279
|
+
ve(this, "$$set");
|
|
280
280
|
}
|
|
281
281
|
/** @returns {void} */
|
|
282
282
|
$destroy() {
|
|
283
|
-
|
|
283
|
+
kt(this, 1), this.$destroy = R;
|
|
284
284
|
}
|
|
285
285
|
/**
|
|
286
286
|
* @template {Extract<keyof Events, string>} K
|
|
@@ -289,8 +289,8 @@ class Ae {
|
|
|
289
289
|
* @returns {() => void}
|
|
290
290
|
*/
|
|
291
291
|
$on(t, n) {
|
|
292
|
-
if (!
|
|
293
|
-
return
|
|
292
|
+
if (!se(n))
|
|
293
|
+
return R;
|
|
294
294
|
const o = this.$$.callbacks[t] || (this.$$.callbacks[t] = []);
|
|
295
295
|
return o.push(n), () => {
|
|
296
296
|
const r = o.indexOf(n);
|
|
@@ -302,17 +302,17 @@ class Ae {
|
|
|
302
302
|
* @returns {void}
|
|
303
303
|
*/
|
|
304
304
|
$set(t) {
|
|
305
|
-
this.$$set && !
|
|
305
|
+
this.$$set && !mt(t) && (this.$$.skip_bound = !0, this.$$set(t), this.$$.skip_bound = !1);
|
|
306
306
|
}
|
|
307
307
|
}
|
|
308
|
-
const
|
|
309
|
-
typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(
|
|
310
|
-
function
|
|
308
|
+
const Mt = "4";
|
|
309
|
+
typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(Mt);
|
|
310
|
+
function Ve(e) {
|
|
311
311
|
let t;
|
|
312
312
|
const n = (
|
|
313
313
|
/*#slots*/
|
|
314
314
|
e[4].default
|
|
315
|
-
), o =
|
|
315
|
+
), o = Ze(
|
|
316
316
|
n,
|
|
317
317
|
e,
|
|
318
318
|
/*$$scope*/
|
|
@@ -328,19 +328,19 @@ function Re(e) {
|
|
|
328
328
|
},
|
|
329
329
|
p(r, i) {
|
|
330
330
|
o && o.p && (!t || i & /*$$scope*/
|
|
331
|
-
8) &&
|
|
331
|
+
8) && nt(
|
|
332
332
|
o,
|
|
333
333
|
n,
|
|
334
334
|
r,
|
|
335
335
|
/*$$scope*/
|
|
336
336
|
r[3],
|
|
337
|
-
t ?
|
|
337
|
+
t ? tt(
|
|
338
338
|
n,
|
|
339
339
|
/*$$scope*/
|
|
340
340
|
r[3],
|
|
341
341
|
i,
|
|
342
342
|
null
|
|
343
|
-
) :
|
|
343
|
+
) : ot(
|
|
344
344
|
/*$$scope*/
|
|
345
345
|
r[3]
|
|
346
346
|
),
|
|
@@ -348,183 +348,191 @@ function Re(e) {
|
|
|
348
348
|
);
|
|
349
349
|
},
|
|
350
350
|
i(r) {
|
|
351
|
-
t || (
|
|
351
|
+
t || (k(o, r), t = !0);
|
|
352
352
|
},
|
|
353
353
|
o(r) {
|
|
354
|
-
|
|
354
|
+
V(o, r), t = !1;
|
|
355
355
|
},
|
|
356
356
|
d(r) {
|
|
357
357
|
o && o.d(r);
|
|
358
358
|
}
|
|
359
359
|
};
|
|
360
360
|
}
|
|
361
|
-
function
|
|
361
|
+
function Pt(e) {
|
|
362
362
|
let t, n, o = (
|
|
363
363
|
/*viewer*/
|
|
364
|
-
e[0] &&
|
|
364
|
+
e[0] && Ve(e)
|
|
365
365
|
);
|
|
366
366
|
return {
|
|
367
367
|
c() {
|
|
368
|
-
o && o.c(), t =
|
|
368
|
+
o && o.c(), t = Me();
|
|
369
369
|
},
|
|
370
370
|
m(r, i) {
|
|
371
|
-
o && o.m(r, i),
|
|
371
|
+
o && o.m(r, i), K(r, t, i), n = !0;
|
|
372
372
|
},
|
|
373
373
|
p(r, [i]) {
|
|
374
374
|
/*viewer*/
|
|
375
375
|
r[0] ? o ? (o.p(r, i), i & /*viewer*/
|
|
376
|
-
1 &&
|
|
376
|
+
1 && k(o, 1)) : (o = Ve(r), o.c(), k(o, 1), o.m(t.parentNode, t)) : o && (at(), V(o, 1, 1, () => {
|
|
377
377
|
o = null;
|
|
378
|
-
}),
|
|
378
|
+
}), ut());
|
|
379
379
|
},
|
|
380
380
|
i(r) {
|
|
381
|
-
n || (
|
|
381
|
+
n || (k(o), n = !0);
|
|
382
382
|
},
|
|
383
383
|
o(r) {
|
|
384
|
-
|
|
384
|
+
V(o), n = !1;
|
|
385
385
|
},
|
|
386
386
|
d(r) {
|
|
387
|
-
r &&
|
|
387
|
+
r && W(t), o && o.d(r);
|
|
388
388
|
}
|
|
389
389
|
};
|
|
390
390
|
}
|
|
391
|
-
function
|
|
392
|
-
let { $$slots: o = {}, $$scope: r } = t, { viewer: i } = t, { opts:
|
|
393
|
-
const
|
|
394
|
-
if (
|
|
395
|
-
const
|
|
396
|
-
...
|
|
397
|
-
state: { ...
|
|
391
|
+
function Lt(e, t, n) {
|
|
392
|
+
let { $$slots: o = {}, $$scope: r } = t, { viewer: i } = t, { opts: l = {} } = t, { anno: a = void 0 } = t;
|
|
393
|
+
const g = (u) => {
|
|
394
|
+
if (u) {
|
|
395
|
+
const b = pt(u, l), p = gt(b.state.store), m = {
|
|
396
|
+
...b,
|
|
397
|
+
state: { ...b.state, store: p }
|
|
398
398
|
};
|
|
399
|
-
|
|
399
|
+
He("anno", m), He("viewer", u), n(1, a = m);
|
|
400
400
|
}
|
|
401
401
|
};
|
|
402
|
-
return e.$$set = (
|
|
403
|
-
"viewer" in
|
|
402
|
+
return e.$$set = (u) => {
|
|
403
|
+
"viewer" in u && n(0, i = u.viewer), "opts" in u && n(2, l = u.opts), "anno" in u && n(1, a = u.anno), "$$scope" in u && n(3, r = u.$$scope);
|
|
404
404
|
}, e.$$.update = () => {
|
|
405
405
|
e.$$.dirty & /*viewer*/
|
|
406
|
-
1 &&
|
|
407
|
-
}, [i,
|
|
406
|
+
1 && g(i);
|
|
407
|
+
}, [i, a, l, r, o];
|
|
408
408
|
}
|
|
409
|
-
class
|
|
409
|
+
class Vt extends Oe {
|
|
410
410
|
constructor(t) {
|
|
411
|
-
super(),
|
|
411
|
+
super(), Le(this, t, Lt, Pt, De, { viewer: 0, opts: 2, anno: 1 });
|
|
412
412
|
}
|
|
413
413
|
}
|
|
414
|
-
var
|
|
415
|
-
const r = (i,
|
|
414
|
+
var Ee = { dragStart: !0 }, Se = { delay: 0, distance: 3 }, ze = (e, t, n) => Math.min(Math.max(e, t), n), xe = (e) => typeof e == "string", Ot = ([e, t], n, o) => {
|
|
415
|
+
const r = (i, l) => l === 0 ? 0 : Math.ceil(i / l) * l;
|
|
416
416
|
return [r(n, e), r(o, t)];
|
|
417
|
-
},
|
|
418
|
-
function
|
|
417
|
+
}, We = (e, t) => e.some((n) => t.some((o) => n.contains(o)));
|
|
418
|
+
function Ce(e, t) {
|
|
419
419
|
if (e === void 0) return;
|
|
420
|
-
if (
|
|
420
|
+
if (ke(e)) return e.getBoundingClientRect();
|
|
421
421
|
if (typeof e == "object") {
|
|
422
|
-
const { top: o = 0, left: r = 0, right: i = 0, bottom:
|
|
423
|
-
return { top: o, right: window.innerWidth - i, bottom: window.innerHeight -
|
|
422
|
+
const { top: o = 0, left: r = 0, right: i = 0, bottom: l = 0 } = e;
|
|
423
|
+
return { top: o, right: window.innerWidth - i, bottom: window.innerHeight - l, left: r };
|
|
424
424
|
}
|
|
425
425
|
if (e === "parent") return t.parentNode.getBoundingClientRect();
|
|
426
426
|
const n = document.querySelector(e);
|
|
427
427
|
if (n === null) throw new Error("The selector provided for bound doesn't exists in the document.");
|
|
428
428
|
return n.getBoundingClientRect();
|
|
429
429
|
}
|
|
430
|
-
var
|
|
431
|
-
let n, o, { bounds: r, axis: i = "both", gpuAcceleration:
|
|
432
|
-
|
|
433
|
-
let
|
|
434
|
-
m = { ...
|
|
435
|
-
let
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
430
|
+
var oe = (e, t, n) => e.style.setProperty(t, n), ke = (e) => e instanceof HTMLElement, Bt = function(e, t = {}) {
|
|
431
|
+
let n, o, { bounds: r, axis: i = "both", gpuAcceleration: l = !0, legacyTranslate: a = !1, transform: g, applyUserSelectHack: u = !0, disabled: b = !1, ignoreMultitouch: p = !1, recomputeBounds: m = Ee, grid: E, threshold: h = Se, position: w, cancel: S, handle: d, defaultClass: x = "neodrag", defaultClassDragging: P = "neodrag-dragging", defaultClassDragged: L = "neodrag-dragged", defaultPosition: le = { x: 0, y: 0 }, onDragStart: ae, onDrag: ue, onDragEnd: fe } = t, O = !1, D = !1, Be = 0, F = !1, Q = !1, B = 0, j = 0, X = 0, Y = 0, ce = 0, de = 0, { x: Z, y: ee } = w ? { x: (w == null ? void 0 : w.x) ?? 0, y: (w == null ? void 0 : w.y) ?? 0 } : le;
|
|
432
|
+
me(Z, ee);
|
|
433
|
+
let A, T, G, ge, pe, je = "", ft = !!w;
|
|
434
|
+
m = { ...Ee, ...m }, h = { ...Se, ...h ?? {} };
|
|
435
|
+
let te = /* @__PURE__ */ new Set();
|
|
436
|
+
function Te(s) {
|
|
437
|
+
O && !D && Q && F && pe && (D = !0, function(f) {
|
|
438
|
+
_e("neodrag:start", ae, f);
|
|
439
|
+
}(s), M.add(P), u && (je = he.userSelect, he.userSelect = "none"));
|
|
440
|
+
}
|
|
441
|
+
const he = document.body.style, M = e.classList;
|
|
442
|
+
function me(s = B, f = j) {
|
|
443
|
+
if (!g) {
|
|
444
|
+
if (a) {
|
|
445
|
+
let y = `${+s}px, ${+f}px`;
|
|
446
|
+
return oe(e, "transform", l ? `translate3d(${y}, 0)` : `translate(${y})`);
|
|
442
447
|
}
|
|
443
|
-
return
|
|
448
|
+
return oe(e, "translate", `${+s}px ${+f}px`);
|
|
444
449
|
}
|
|
445
|
-
const _ =
|
|
446
|
-
|
|
450
|
+
const _ = g({ offsetX: s, offsetY: f, rootNode: e });
|
|
451
|
+
xe(_) && oe(e, "transform", _);
|
|
447
452
|
}
|
|
448
|
-
|
|
449
|
-
const
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
const ke = () => {
|
|
454
|
-
let l = e.offsetWidth / O.width;
|
|
455
|
-
return isNaN(l) && (l = 1), l;
|
|
456
|
-
};
|
|
457
|
-
function Le(l) {
|
|
458
|
-
if (y || l.button === 2) return;
|
|
459
|
-
if (K.add(l.pointerId), g && K.size > 1) return l.preventDefault();
|
|
460
|
-
if (m.dragStart && (L = _e(r, e)), me(w) && me(A) && w === A) throw new Error("`handle` selector can't be same as `cancel` selector");
|
|
461
|
-
if (P.add(c), z = function(p, S) {
|
|
462
|
-
if (!p) return [S];
|
|
463
|
-
if (be(p)) return [p];
|
|
464
|
-
if (Array.isArray(p)) return p;
|
|
465
|
-
const M = S.querySelectorAll(p);
|
|
466
|
-
if (M === null) throw new Error("Selector passed for `handle` option should be child of the element on which the action is applied");
|
|
467
|
-
return Array.from(M.values());
|
|
468
|
-
}(w, e), ue = function(p, S) {
|
|
469
|
-
if (!p) return [];
|
|
470
|
-
if (be(p)) return [p];
|
|
471
|
-
if (Array.isArray(p)) return p;
|
|
472
|
-
const M = S.querySelectorAll(p);
|
|
473
|
-
if (M === null) throw new Error("Selector passed for `cancel` option should be child of the element on which the action is applied");
|
|
474
|
-
return Array.from(M.values());
|
|
475
|
-
}(A, e), n = /(both|x)/.test(i), o = /(both|y)/.test(i), Ye(ue, z)) throw new Error("Element being dragged can't be a child of the element on which `cancel` is applied");
|
|
476
|
-
const h = l.composedPath()[0];
|
|
477
|
-
if (!z.some((p) => {
|
|
478
|
-
var S;
|
|
479
|
-
return p.contains(h) || ((S = p.shadowRoot) == null ? void 0 : S.contains(h));
|
|
480
|
-
}) || Ye(ue, [h])) return;
|
|
481
|
-
Ce = z.length === 1 ? e : z.find((p) => p.contains(h)), T = !0, O = e.getBoundingClientRect(), a && (Ne = ae.userSelect, ae.userSelect = "none"), ce("neodrag:start", oe);
|
|
482
|
-
const { clientX: _, clientY: v } = l, E = ke();
|
|
483
|
-
n && (V = _ - G / E), o && (q = v - J / E), L && (se = _ - O.left, le = v - O.top);
|
|
453
|
+
function _e(s, f, _) {
|
|
454
|
+
const y = /* @__PURE__ */ function(v) {
|
|
455
|
+
return { offsetX: B, offsetY: j, rootNode: e, currentNode: pe, event: v };
|
|
456
|
+
}(_);
|
|
457
|
+
e.dispatchEvent(new CustomEvent(s, { detail: y })), f == null || f(y);
|
|
484
458
|
}
|
|
485
|
-
|
|
486
|
-
|
|
459
|
+
const ne = addEventListener, ye = new AbortController(), be = { signal: ye.signal, capture: !1 };
|
|
460
|
+
function Ie() {
|
|
461
|
+
let s = e.offsetWidth / T.width;
|
|
462
|
+
return isNaN(s) && (s = 1), s;
|
|
487
463
|
}
|
|
488
|
-
|
|
489
|
-
if (
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
464
|
+
return oe(e, "touch-action", "none"), ne("pointerdown", (s) => {
|
|
465
|
+
if (b || s.button === 2) return;
|
|
466
|
+
if (te.add(s.pointerId), p && te.size > 1) return s.preventDefault();
|
|
467
|
+
if (m.dragStart && (A = Ce(r, e)), xe(d) && xe(S) && d === S) throw new Error("`handle` selector can't be same as `cancel` selector");
|
|
468
|
+
if (M.add(x), G = function(c, C) {
|
|
469
|
+
if (!c) return [C];
|
|
470
|
+
if (ke(c)) return [c];
|
|
471
|
+
if (Array.isArray(c)) return c;
|
|
472
|
+
const N = C.querySelectorAll(c);
|
|
473
|
+
if (N === null) throw new Error("Selector passed for `handle` option should be child of the element on which the action is applied");
|
|
474
|
+
return Array.from(N.values());
|
|
475
|
+
}(d, e), ge = function(c, C) {
|
|
476
|
+
if (!c) return [];
|
|
477
|
+
if (ke(c)) return [c];
|
|
478
|
+
if (Array.isArray(c)) return c;
|
|
479
|
+
const N = C.querySelectorAll(c);
|
|
480
|
+
if (N === null) throw new Error("Selector passed for `cancel` option should be child of the element on which the action is applied");
|
|
481
|
+
return Array.from(N.values());
|
|
482
|
+
}(S, e), n = /(both|x)/.test(i), o = /(both|y)/.test(i), We(ge, G)) throw new Error("Element being dragged can't be a child of the element on which `cancel` is applied");
|
|
483
|
+
const f = s.composedPath()[0];
|
|
484
|
+
if (!G.some((c) => {
|
|
485
|
+
var C;
|
|
486
|
+
return c.contains(f) || ((C = c.shadowRoot) == null ? void 0 : C.contains(f));
|
|
487
|
+
}) || We(ge, [f])) return;
|
|
488
|
+
pe = G.length === 1 ? e : G.find((c) => c.contains(f)), O = !0, Be = Date.now(), h.delay || (F = !0), T = e.getBoundingClientRect();
|
|
489
|
+
const { clientX: _, clientY: y } = s, v = Ie();
|
|
490
|
+
n && (X = _ - Z / v), o && (Y = y - ee / v), A && (ce = _ - T.left, de = y - T.top);
|
|
491
|
+
}, be), ne("pointermove", (s) => {
|
|
492
|
+
if (!O || p && te.size > 1) return;
|
|
493
|
+
if (!D) {
|
|
494
|
+
if (F || Date.now() - Be >= h.delay && (F = !0, Te(s)), !Q) {
|
|
495
|
+
const v = s.clientX - X, c = s.clientY - Y;
|
|
496
|
+
Math.sqrt(v ** 2 + c ** 2) >= h.distance && (Q = !0, Te(s));
|
|
497
|
+
}
|
|
498
|
+
if (!D) return;
|
|
496
499
|
}
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
500
|
+
m.drag && (A = Ce(r, e)), s.preventDefault(), T = e.getBoundingClientRect();
|
|
501
|
+
let f = s.clientX, _ = s.clientY;
|
|
502
|
+
const y = Ie();
|
|
503
|
+
if (A) {
|
|
504
|
+
const v = { left: A.left + ce, top: A.top + de, right: A.right + ce - T.width, bottom: A.bottom + de - T.height };
|
|
505
|
+
f = ze(f, v.left, v.right), _ = ze(_, v.top, v.bottom);
|
|
503
506
|
}
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
507
|
+
if (Array.isArray(E)) {
|
|
508
|
+
let [v, c] = E;
|
|
509
|
+
if (isNaN(+v) || v < 0) throw new Error("1st argument of `grid` must be a valid positive number");
|
|
510
|
+
if (isNaN(+c) || c < 0) throw new Error("2nd argument of `grid` must be a valid positive number");
|
|
511
|
+
let C = f - X, N = _ - Y;
|
|
512
|
+
[C, N] = Ot([v / y, c / y], C, N), f = X + C, _ = Y + N;
|
|
513
|
+
}
|
|
514
|
+
n && (B = Math.round((f - X) * y)), o && (j = Math.round((_ - Y) * y)), Z = B, ee = j, _e("neodrag", ue, s), me();
|
|
515
|
+
}, be), ne("pointerup", (s) => {
|
|
516
|
+
te.delete(s.pointerId), O && (D && (ne("click", (f) => f.stopPropagation(), { once: !0, signal: ye.signal, capture: !0 }), m.dragEnd && (A = Ce(r, e)), M.remove(P), M.add(L), u && (he.userSelect = je), _e("neodrag:end", fe, s), n && (X = B), o && (Y = j)), O = !1, D = !1, F = !1, Q = !1);
|
|
517
|
+
}, be), { destroy: () => ye.abort(), update: (s) => {
|
|
518
|
+
var _, y;
|
|
519
|
+
i = s.axis || "both", b = s.disabled ?? !1, p = s.ignoreMultitouch ?? !1, d = s.handle, r = s.bounds, m = s.recomputeBounds ?? Ee, S = s.cancel, u = s.applyUserSelectHack ?? !0, E = s.grid, l = s.gpuAcceleration ?? !0, a = s.legacyTranslate ?? !0, g = s.transform, h = { ...Se, ...s.threshold ?? {} };
|
|
520
|
+
const f = M.contains(L);
|
|
521
|
+
M.remove(x, L), x = s.defaultClass ?? "neodrag", P = s.defaultClassDragging ?? "neodrag-dragging", L = s.defaultClassDragged ?? "neodrag-dragged", M.add(x), f && M.add(L), ft && (Z = B = ((_ = s.position) == null ? void 0 : _.x) ?? B, ee = j = ((y = s.position) == null ? void 0 : y.y) ?? j, me());
|
|
514
522
|
} };
|
|
515
523
|
};
|
|
516
|
-
function
|
|
524
|
+
function Fe(e) {
|
|
517
525
|
let t, n = (
|
|
518
526
|
/*$selection*/
|
|
519
|
-
e[0].selected.map(
|
|
520
|
-
), o, r, i,
|
|
527
|
+
e[0].selected.map(Ge).join(", ") + ""
|
|
528
|
+
), o, r, i, l;
|
|
521
529
|
return {
|
|
522
530
|
c() {
|
|
523
|
-
t =
|
|
531
|
+
t = rt("div"), o = it(n), re(t, "class", "a9s-popup a9s-osd-popup svelte-1xuxeat");
|
|
524
532
|
},
|
|
525
|
-
m(
|
|
526
|
-
|
|
527
|
-
|
|
533
|
+
m(a, g) {
|
|
534
|
+
K(a, t, g), bt(t, o), i || (l = [
|
|
535
|
+
yt(r = Bt.call(null, t, {
|
|
528
536
|
position: { x: (
|
|
529
537
|
/*left*/
|
|
530
538
|
e[1]
|
|
@@ -533,13 +541,13 @@ function He(e) {
|
|
|
533
541
|
e[2]
|
|
534
542
|
) }
|
|
535
543
|
})),
|
|
536
|
-
|
|
544
|
+
Ye(
|
|
537
545
|
t,
|
|
538
546
|
"neodrag:start",
|
|
539
547
|
/*onDragStart*/
|
|
540
548
|
e[4]
|
|
541
549
|
),
|
|
542
|
-
|
|
550
|
+
Ye(
|
|
543
551
|
t,
|
|
544
552
|
"neodrag:end",
|
|
545
553
|
/*onDragEnd*/
|
|
@@ -547,222 +555,222 @@ function He(e) {
|
|
|
547
555
|
)
|
|
548
556
|
], i = !0);
|
|
549
557
|
},
|
|
550
|
-
p(
|
|
551
|
-
|
|
558
|
+
p(a, g) {
|
|
559
|
+
g & /*$selection*/
|
|
552
560
|
1 && n !== (n = /*$selection*/
|
|
553
|
-
|
|
561
|
+
a[0].selected.map(Ge).join(", ") + "") && wt(o, n), r && se(r.update) && g & /*left, top*/
|
|
554
562
|
6 && r.update.call(null, {
|
|
555
563
|
position: { x: (
|
|
556
564
|
/*left*/
|
|
557
|
-
|
|
565
|
+
a[1]
|
|
558
566
|
), y: (
|
|
559
567
|
/*top*/
|
|
560
|
-
|
|
568
|
+
a[2]
|
|
561
569
|
) }
|
|
562
570
|
});
|
|
563
571
|
},
|
|
564
|
-
d(
|
|
565
|
-
|
|
572
|
+
d(a) {
|
|
573
|
+
a && W(t), i = !1, z(l);
|
|
566
574
|
}
|
|
567
575
|
};
|
|
568
576
|
}
|
|
569
|
-
function
|
|
577
|
+
function jt(e) {
|
|
570
578
|
let t, n = (
|
|
571
579
|
/*$selection*/
|
|
572
|
-
e[0] &&
|
|
580
|
+
e[0] && Fe(e)
|
|
573
581
|
);
|
|
574
582
|
return {
|
|
575
583
|
c() {
|
|
576
|
-
n && n.c(), t =
|
|
584
|
+
n && n.c(), t = Me();
|
|
577
585
|
},
|
|
578
586
|
m(o, r) {
|
|
579
|
-
n && n.m(o, r),
|
|
587
|
+
n && n.m(o, r), K(o, t, r);
|
|
580
588
|
},
|
|
581
589
|
p(o, [r]) {
|
|
582
590
|
/*$selection*/
|
|
583
|
-
o[0] ? n ? n.p(o, r) : (n =
|
|
591
|
+
o[0] ? n ? n.p(o, r) : (n = Fe(o), n.c(), n.m(t.parentNode, t)) : n && (n.d(1), n = null);
|
|
584
592
|
},
|
|
585
|
-
i:
|
|
586
|
-
o:
|
|
593
|
+
i: R,
|
|
594
|
+
o: R,
|
|
587
595
|
d(o) {
|
|
588
|
-
o &&
|
|
596
|
+
o && W(t), n && n.d(o);
|
|
589
597
|
}
|
|
590
598
|
};
|
|
591
599
|
}
|
|
592
|
-
const
|
|
593
|
-
function
|
|
594
|
-
let o, { state: r } = t, { viewer: i } = t,
|
|
595
|
-
const { selection:
|
|
596
|
-
|
|
597
|
-
const m = (
|
|
600
|
+
const Ge = (e) => e.id;
|
|
601
|
+
function Tt(e, t, n) {
|
|
602
|
+
let o, { state: r } = t, { viewer: i } = t, l, a, g = !1, u;
|
|
603
|
+
const { selection: b, store: p } = r;
|
|
604
|
+
Qe(e, b, (d) => n(0, o = d));
|
|
605
|
+
const m = (d) => {
|
|
598
606
|
var x;
|
|
599
|
-
return ((x =
|
|
600
|
-
},
|
|
601
|
-
|
|
602
|
-
},
|
|
607
|
+
return ((x = d.selected) == null ? void 0 : x.length) > 0;
|
|
608
|
+
}, E = () => {
|
|
609
|
+
g = !0, i.setMouseNavEnabled(!1);
|
|
610
|
+
}, h = () => {
|
|
603
611
|
i.setMouseNavEnabled(!0);
|
|
604
|
-
},
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
},
|
|
608
|
-
annotations: o.selected.map((
|
|
612
|
+
}, w = () => {
|
|
613
|
+
u && p.unobserve(u), m(o) && (g = !1, S(o), u = (d) => {
|
|
614
|
+
g || S(o);
|
|
615
|
+
}, p.observe(u, {
|
|
616
|
+
annotations: o.selected.map((d) => d.id)
|
|
609
617
|
}));
|
|
610
|
-
},
|
|
611
|
-
const x =
|
|
612
|
-
n(1,
|
|
618
|
+
}, S = (d) => {
|
|
619
|
+
const x = d.selected[0].id, P = p.getAnnotation(x), { minX: L, minY: le, maxX: ae, maxY: ue } = P.target.selector.geometry.bounds, fe = 14, O = i.viewport.imageToViewerElementCoordinates(new Re.Point(L, le)), D = i.viewport.imageToViewerElementCoordinates(new Re.Point(ae, ue));
|
|
620
|
+
n(1, l = D.x + fe), n(2, a = O.y);
|
|
613
621
|
};
|
|
614
|
-
return
|
|
615
|
-
const
|
|
616
|
-
m(o) && !
|
|
622
|
+
return st(() => {
|
|
623
|
+
const d = () => {
|
|
624
|
+
m(o) && !g && S(o);
|
|
617
625
|
};
|
|
618
|
-
return i.addHandler("update-viewport",
|
|
619
|
-
i.removeHandler("update-viewport",
|
|
626
|
+
return i.addHandler("update-viewport", d), () => {
|
|
627
|
+
i.removeHandler("update-viewport", d);
|
|
620
628
|
};
|
|
621
|
-
}), e.$$set = (
|
|
622
|
-
"state" in
|
|
629
|
+
}), e.$$set = (d) => {
|
|
630
|
+
"state" in d && n(6, r = d.state), "viewer" in d && n(7, i = d.viewer);
|
|
623
631
|
}, e.$$.update = () => {
|
|
624
632
|
e.$$.dirty & /*$selection*/
|
|
625
|
-
1 &&
|
|
626
|
-
}, [o,
|
|
633
|
+
1 && w();
|
|
634
|
+
}, [o, l, a, b, E, h, r, i];
|
|
627
635
|
}
|
|
628
|
-
class
|
|
636
|
+
class zt extends Oe {
|
|
629
637
|
constructor(t) {
|
|
630
|
-
super(),
|
|
638
|
+
super(), Le(this, t, Tt, jt, De, { state: 6, viewer: 7 });
|
|
631
639
|
}
|
|
632
640
|
}
|
|
633
|
-
const
|
|
634
|
-
16 }),
|
|
641
|
+
const It = (e) => ({ hovered: e & /*hovered*/
|
|
642
|
+
16 }), $e = (e) => ({ hovered: (
|
|
635
643
|
/*hovered*/
|
|
636
644
|
e[4]
|
|
637
645
|
) });
|
|
638
|
-
function
|
|
646
|
+
function Je(e) {
|
|
639
647
|
let t, n, o;
|
|
640
648
|
const r = (
|
|
641
649
|
/*#slots*/
|
|
642
650
|
e[8].default
|
|
643
|
-
), i =
|
|
651
|
+
), i = Ze(
|
|
644
652
|
r,
|
|
645
653
|
e,
|
|
646
654
|
/*$$scope*/
|
|
647
655
|
e[7],
|
|
648
|
-
|
|
656
|
+
$e
|
|
649
657
|
);
|
|
650
658
|
return {
|
|
651
659
|
c() {
|
|
652
|
-
t =
|
|
660
|
+
t = rt("div"), i && i.c(), re(t, "class", "a9s-tooltip svelte-14kj0as"), re(t, "style", n = `left:${/*left*/
|
|
653
661
|
e[2]}px; top:${/*top*/
|
|
654
662
|
e[1]}px; position: absolute;`);
|
|
655
663
|
},
|
|
656
|
-
m(
|
|
657
|
-
|
|
664
|
+
m(l, a) {
|
|
665
|
+
K(l, t, a), i && i.m(t, null), o = !0;
|
|
658
666
|
},
|
|
659
|
-
p(
|
|
660
|
-
i && i.p && (!o ||
|
|
661
|
-
144) &&
|
|
667
|
+
p(l, a) {
|
|
668
|
+
i && i.p && (!o || a & /*$$scope, hovered*/
|
|
669
|
+
144) && nt(
|
|
662
670
|
i,
|
|
663
671
|
r,
|
|
664
|
-
|
|
672
|
+
l,
|
|
665
673
|
/*$$scope*/
|
|
666
|
-
|
|
667
|
-
o ?
|
|
674
|
+
l[7],
|
|
675
|
+
o ? tt(
|
|
668
676
|
r,
|
|
669
677
|
/*$$scope*/
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
) :
|
|
678
|
+
l[7],
|
|
679
|
+
a,
|
|
680
|
+
It
|
|
681
|
+
) : ot(
|
|
674
682
|
/*$$scope*/
|
|
675
|
-
|
|
683
|
+
l[7]
|
|
676
684
|
),
|
|
677
|
-
|
|
678
|
-
), (!o ||
|
|
685
|
+
$e
|
|
686
|
+
), (!o || a & /*left, top*/
|
|
679
687
|
6 && n !== (n = `left:${/*left*/
|
|
680
|
-
|
|
681
|
-
|
|
688
|
+
l[2]}px; top:${/*top*/
|
|
689
|
+
l[1]}px; position: absolute;`)) && re(t, "style", n);
|
|
682
690
|
},
|
|
683
|
-
i(
|
|
684
|
-
o || (
|
|
691
|
+
i(l) {
|
|
692
|
+
o || (k(i, l), o = !0);
|
|
685
693
|
},
|
|
686
|
-
o(
|
|
687
|
-
|
|
694
|
+
o(l) {
|
|
695
|
+
V(i, l), o = !1;
|
|
688
696
|
},
|
|
689
|
-
d(
|
|
690
|
-
|
|
697
|
+
d(l) {
|
|
698
|
+
l && W(t), i && i.d(l);
|
|
691
699
|
}
|
|
692
700
|
};
|
|
693
701
|
}
|
|
694
|
-
function
|
|
702
|
+
function Rt(e) {
|
|
695
703
|
let t, n, o = (
|
|
696
704
|
/*$hover*/
|
|
697
705
|
e[0] && /*show*/
|
|
698
|
-
e[3] &&
|
|
706
|
+
e[3] && Je(e)
|
|
699
707
|
);
|
|
700
708
|
return {
|
|
701
709
|
c() {
|
|
702
|
-
o && o.c(), t =
|
|
710
|
+
o && o.c(), t = Me();
|
|
703
711
|
},
|
|
704
712
|
m(r, i) {
|
|
705
|
-
o && o.m(r, i),
|
|
713
|
+
o && o.m(r, i), K(r, t, i), n = !0;
|
|
706
714
|
},
|
|
707
715
|
p(r, [i]) {
|
|
708
716
|
/*$hover*/
|
|
709
717
|
r[0] && /*show*/
|
|
710
718
|
r[3] ? o ? (o.p(r, i), i & /*$hover, show*/
|
|
711
|
-
9 &&
|
|
719
|
+
9 && k(o, 1)) : (o = Je(r), o.c(), k(o, 1), o.m(t.parentNode, t)) : o && (at(), V(o, 1, 1, () => {
|
|
712
720
|
o = null;
|
|
713
|
-
}),
|
|
721
|
+
}), ut());
|
|
714
722
|
},
|
|
715
723
|
i(r) {
|
|
716
|
-
n || (
|
|
724
|
+
n || (k(o), n = !0);
|
|
717
725
|
},
|
|
718
726
|
o(r) {
|
|
719
|
-
|
|
727
|
+
V(o), n = !1;
|
|
720
728
|
},
|
|
721
729
|
d(r) {
|
|
722
|
-
r &&
|
|
730
|
+
r && W(t), o && o.d(r);
|
|
723
731
|
}
|
|
724
732
|
};
|
|
725
733
|
}
|
|
726
|
-
function
|
|
727
|
-
let o, r, { $$slots: i = {}, $$scope:
|
|
728
|
-
const
|
|
729
|
-
|
|
730
|
-
let
|
|
731
|
-
return
|
|
732
|
-
const
|
|
733
|
-
n(3,
|
|
734
|
-
},
|
|
735
|
-
const { offsetX: x, offsetY:
|
|
736
|
-
n(2, m = x), n(1,
|
|
737
|
-
},
|
|
738
|
-
n(3,
|
|
734
|
+
function Xt(e, t, n) {
|
|
735
|
+
let o, r, { $$slots: i = {}, $$scope: l } = t, { container: a } = t;
|
|
736
|
+
const g = Et("anno"), { store: u, hover: b } = g.state;
|
|
737
|
+
Qe(e, b, (h) => n(0, r = h));
|
|
738
|
+
let p, m, E = !0;
|
|
739
|
+
return st(() => {
|
|
740
|
+
const h = () => {
|
|
741
|
+
n(3, E = !0);
|
|
742
|
+
}, w = (d) => {
|
|
743
|
+
const { offsetX: x, offsetY: P } = d;
|
|
744
|
+
n(2, m = x), n(1, p = P);
|
|
745
|
+
}, S = () => {
|
|
746
|
+
n(3, E = !1);
|
|
739
747
|
};
|
|
740
|
-
return
|
|
741
|
-
|
|
748
|
+
return a.addEventListener("pointerenter", h), a.addEventListener("pointermove", w), a.addEventListener("pointerleave", S), () => {
|
|
749
|
+
a.removeEventListener("pointerenter", h), a.removeEventListener("pointermove", w), a.removeEventListener("pointerleave", S);
|
|
742
750
|
};
|
|
743
|
-
}), e.$$set = (
|
|
744
|
-
"container" in
|
|
751
|
+
}), e.$$set = (h) => {
|
|
752
|
+
"container" in h && n(6, a = h.container), "$$scope" in h && n(7, l = h.$$scope);
|
|
745
753
|
}, e.$$.update = () => {
|
|
746
754
|
e.$$.dirty & /*$hover*/
|
|
747
|
-
1 && n(4, o = r ?
|
|
748
|
-
}, [r,
|
|
755
|
+
1 && n(4, o = r ? u.getAnnotation(r) : void 0);
|
|
756
|
+
}, [r, p, m, E, o, b, a, l, i];
|
|
749
757
|
}
|
|
750
|
-
class
|
|
758
|
+
class Wt extends Oe {
|
|
751
759
|
constructor(t) {
|
|
752
|
-
super(),
|
|
760
|
+
super(), Le(this, t, Xt, Rt, De, { container: 6 });
|
|
753
761
|
}
|
|
754
762
|
}
|
|
755
763
|
export {
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
764
|
+
Wt as MouseOverTooltip,
|
|
765
|
+
Vt as OpenSeadragonAnnotator,
|
|
766
|
+
zt as OpenSeadragonPopup,
|
|
767
|
+
$t as Origin,
|
|
768
|
+
tn as ShapeType,
|
|
769
|
+
Jt as UserSelectAction,
|
|
770
|
+
nn as W3CImageFormat,
|
|
771
|
+
Kt as createAnonymousGuest,
|
|
772
|
+
Qt as createBody,
|
|
773
|
+
on as createImageAnnotator,
|
|
774
|
+
Zt as defaultColorProvider
|
|
767
775
|
};
|
|
768
776
|
//# sourceMappingURL=annotorious-svelte.es.js.map
|