@annotorious/svelte 3.0.0-rc.7 → 3.0.0-rc.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/annotorious-svelte.es5.js +420 -422
- package/dist/annotorious-svelte.es5.js.map +1 -1
- package/dist/annotorious-svelte.es6.js +10 -10
- package/dist/annotorious-svelte.es9.js +814 -816
- package/dist/annotorious-svelte.es9.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
function
|
|
1
|
+
function wt() {
|
|
2
2
|
}
|
|
3
|
-
function
|
|
3
|
+
function Jt(t, n) {
|
|
4
4
|
for (const r in n)
|
|
5
5
|
t[r] = n[r];
|
|
6
6
|
return t;
|
|
@@ -8,29 +8,29 @@ function qt(t, n) {
|
|
|
8
8
|
function kt(t) {
|
|
9
9
|
return t();
|
|
10
10
|
}
|
|
11
|
-
function
|
|
11
|
+
function _t() {
|
|
12
12
|
return /* @__PURE__ */ Object.create(null);
|
|
13
13
|
}
|
|
14
|
-
function
|
|
14
|
+
function z(t) {
|
|
15
15
|
t.forEach(kt);
|
|
16
16
|
}
|
|
17
|
-
function
|
|
17
|
+
function P(t) {
|
|
18
18
|
return typeof t == "function";
|
|
19
19
|
}
|
|
20
20
|
function Et(t, n) {
|
|
21
21
|
return t != t ? n == n : t !== n || t && typeof t == "object" || typeof t == "function";
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function Kt(t) {
|
|
24
24
|
return Object.keys(t).length === 0;
|
|
25
25
|
}
|
|
26
|
-
function
|
|
26
|
+
function Zt(t, n, r, o) {
|
|
27
27
|
if (t) {
|
|
28
28
|
const s = jt(t, n, r, o);
|
|
29
29
|
return t[0](s);
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
function jt(t, n, r, o) {
|
|
33
|
-
return t[1] && o ?
|
|
33
|
+
return t[1] && o ? Jt(r.ctx.slice(), t[1](o(n))) : r.ctx;
|
|
34
34
|
}
|
|
35
35
|
function Qt(t, n, r, o) {
|
|
36
36
|
if (t[2] && o) {
|
|
@@ -47,13 +47,13 @@ function Qt(t, n, r, o) {
|
|
|
47
47
|
}
|
|
48
48
|
return n.dirty;
|
|
49
49
|
}
|
|
50
|
-
function
|
|
50
|
+
function Mt(t, n, r, o, s, a) {
|
|
51
51
|
if (s) {
|
|
52
52
|
const c = jt(n, r, o, a);
|
|
53
53
|
t.p(c, s);
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
|
-
function
|
|
56
|
+
function Yt(t) {
|
|
57
57
|
if (t.ctx.length > 32) {
|
|
58
58
|
const n = [], r = t.ctx.length / 32;
|
|
59
59
|
for (let o = 0; o < r; o++)
|
|
@@ -62,10 +62,10 @@ function Mt(t) {
|
|
|
62
62
|
}
|
|
63
63
|
return -1;
|
|
64
64
|
}
|
|
65
|
-
function
|
|
65
|
+
function T(t, n, r) {
|
|
66
66
|
t.insertBefore(n, r || null);
|
|
67
67
|
}
|
|
68
|
-
function
|
|
68
|
+
function w(t) {
|
|
69
69
|
t.parentNode && t.parentNode.removeChild(t);
|
|
70
70
|
}
|
|
71
71
|
function tn(t, n) {
|
|
@@ -97,14 +97,14 @@ function on(t, n, { bubbles: r = !1, cancelable: o = !1 } = {}) {
|
|
|
97
97
|
const s = document.createEvent("CustomEvent");
|
|
98
98
|
return s.initCustomEvent(t, r, o, n), s;
|
|
99
99
|
}
|
|
100
|
-
let
|
|
101
|
-
function
|
|
102
|
-
|
|
100
|
+
let Z;
|
|
101
|
+
function K(t) {
|
|
102
|
+
Z = t;
|
|
103
103
|
}
|
|
104
104
|
function en() {
|
|
105
|
-
if (!
|
|
105
|
+
if (!Z)
|
|
106
106
|
throw new Error("Function called outside component initialization");
|
|
107
|
-
return
|
|
107
|
+
return Z;
|
|
108
108
|
}
|
|
109
109
|
function sn() {
|
|
110
110
|
const t = en();
|
|
@@ -119,136 +119,136 @@ function sn() {
|
|
|
119
119
|
return !0;
|
|
120
120
|
};
|
|
121
121
|
}
|
|
122
|
-
function
|
|
122
|
+
function q(t, n) {
|
|
123
123
|
const r = t.$$.callbacks[n.type];
|
|
124
124
|
r && r.slice().forEach((o) => o.call(this, n));
|
|
125
125
|
}
|
|
126
|
-
const
|
|
127
|
-
let
|
|
128
|
-
const
|
|
129
|
-
let
|
|
126
|
+
const W = [], It = [];
|
|
127
|
+
let J = [];
|
|
128
|
+
const Ft = [], an = /* @__PURE__ */ Promise.resolve();
|
|
129
|
+
let xt = !1;
|
|
130
130
|
function cn() {
|
|
131
|
-
|
|
131
|
+
xt || (xt = !0, an.then(Dt));
|
|
132
132
|
}
|
|
133
|
-
function
|
|
134
|
-
|
|
133
|
+
function Tt(t) {
|
|
134
|
+
J.push(t);
|
|
135
135
|
}
|
|
136
136
|
const $t = /* @__PURE__ */ new Set();
|
|
137
|
-
let
|
|
138
|
-
function
|
|
139
|
-
if (
|
|
137
|
+
let V = 0;
|
|
138
|
+
function Dt() {
|
|
139
|
+
if (V !== 0)
|
|
140
140
|
return;
|
|
141
|
-
const t =
|
|
141
|
+
const t = Z;
|
|
142
142
|
do {
|
|
143
143
|
try {
|
|
144
|
-
for (;
|
|
145
|
-
const n = V
|
|
146
|
-
|
|
144
|
+
for (; V < W.length; ) {
|
|
145
|
+
const n = W[V];
|
|
146
|
+
V++, K(n), ln(n.$$);
|
|
147
147
|
}
|
|
148
148
|
} catch (n) {
|
|
149
|
-
throw
|
|
149
|
+
throw W.length = 0, V = 0, n;
|
|
150
150
|
}
|
|
151
|
-
for (
|
|
152
|
-
|
|
153
|
-
for (let n = 0; n <
|
|
154
|
-
const r =
|
|
151
|
+
for (K(null), W.length = 0, V = 0; It.length; )
|
|
152
|
+
It.pop()();
|
|
153
|
+
for (let n = 0; n < J.length; n += 1) {
|
|
154
|
+
const r = J[n];
|
|
155
155
|
$t.has(r) || ($t.add(r), r());
|
|
156
156
|
}
|
|
157
|
-
|
|
158
|
-
} while (
|
|
159
|
-
for (;
|
|
160
|
-
|
|
161
|
-
|
|
157
|
+
J.length = 0;
|
|
158
|
+
} while (W.length);
|
|
159
|
+
for (; Ft.length; )
|
|
160
|
+
Ft.pop()();
|
|
161
|
+
xt = !1, $t.clear(), K(t);
|
|
162
162
|
}
|
|
163
163
|
function ln(t) {
|
|
164
164
|
if (t.fragment !== null) {
|
|
165
|
-
t.update(),
|
|
165
|
+
t.update(), z(t.before_update);
|
|
166
166
|
const n = t.dirty;
|
|
167
|
-
t.dirty = [-1], t.fragment && t.fragment.p(t.ctx, n), t.after_update.forEach(
|
|
167
|
+
t.dirty = [-1], t.fragment && t.fragment.p(t.ctx, n), t.after_update.forEach(Tt);
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
|
-
function
|
|
170
|
+
function un(t) {
|
|
171
171
|
const n = [], r = [];
|
|
172
|
-
|
|
172
|
+
J.forEach((o) => t.indexOf(o) === -1 ? n.push(o) : r.push(o)), r.forEach((o) => o()), J = n;
|
|
173
173
|
}
|
|
174
|
-
const
|
|
175
|
-
let
|
|
176
|
-
function
|
|
177
|
-
t && t.i && (
|
|
174
|
+
const ut = /* @__PURE__ */ new Set();
|
|
175
|
+
let pn;
|
|
176
|
+
function pt(t, n) {
|
|
177
|
+
t && t.i && (ut.delete(t), t.i(n));
|
|
178
178
|
}
|
|
179
179
|
function Ot(t, n, r, o) {
|
|
180
180
|
if (t && t.o) {
|
|
181
|
-
if (
|
|
181
|
+
if (ut.has(t))
|
|
182
182
|
return;
|
|
183
|
-
|
|
184
|
-
|
|
183
|
+
ut.add(t), pn.c.push(() => {
|
|
184
|
+
ut.delete(t), o && (r && t.d(1), o());
|
|
185
185
|
}), t.o(n);
|
|
186
186
|
} else
|
|
187
187
|
o && o();
|
|
188
188
|
}
|
|
189
|
-
function
|
|
189
|
+
function zt(t) {
|
|
190
190
|
t && t.c();
|
|
191
191
|
}
|
|
192
192
|
function bt(t, n, r, o) {
|
|
193
193
|
const { fragment: s, after_update: a } = t.$$;
|
|
194
|
-
s && s.m(n, r), o ||
|
|
195
|
-
const c = t.$$.on_mount.map(kt).filter(
|
|
196
|
-
t.$$.on_destroy ? t.$$.on_destroy.push(...c) :
|
|
197
|
-
}), a.forEach(
|
|
194
|
+
s && s.m(n, r), o || Tt(() => {
|
|
195
|
+
const c = t.$$.on_mount.map(kt).filter(P);
|
|
196
|
+
t.$$.on_destroy ? t.$$.on_destroy.push(...c) : z(c), t.$$.on_mount = [];
|
|
197
|
+
}), a.forEach(Tt);
|
|
198
198
|
}
|
|
199
199
|
function St(t, n) {
|
|
200
200
|
const r = t.$$;
|
|
201
|
-
r.fragment !== null && (
|
|
201
|
+
r.fragment !== null && (un(r.after_update), z(r.on_destroy), r.fragment && r.fragment.d(n), r.on_destroy = r.fragment = null, r.ctx = []);
|
|
202
202
|
}
|
|
203
203
|
function hn(t, n) {
|
|
204
|
-
t.$$.dirty[0] === -1 && (
|
|
204
|
+
t.$$.dirty[0] === -1 && (W.push(t), cn(), t.$$.dirty.fill(0)), t.$$.dirty[n / 31 | 0] |= 1 << n % 31;
|
|
205
205
|
}
|
|
206
206
|
function vt(t, n, r, o, s, a, c, l = [-1]) {
|
|
207
|
-
const
|
|
208
|
-
|
|
209
|
-
const
|
|
207
|
+
const u = Z;
|
|
208
|
+
K(t);
|
|
209
|
+
const d = t.$$ = {
|
|
210
210
|
fragment: null,
|
|
211
211
|
ctx: [],
|
|
212
212
|
// state
|
|
213
213
|
props: a,
|
|
214
|
-
update:
|
|
214
|
+
update: wt,
|
|
215
215
|
not_equal: s,
|
|
216
|
-
bound:
|
|
216
|
+
bound: _t(),
|
|
217
217
|
// lifecycle
|
|
218
218
|
on_mount: [],
|
|
219
219
|
on_destroy: [],
|
|
220
220
|
on_disconnect: [],
|
|
221
221
|
before_update: [],
|
|
222
222
|
after_update: [],
|
|
223
|
-
context: new Map(n.context || (
|
|
223
|
+
context: new Map(n.context || (u ? u.$$.context : [])),
|
|
224
224
|
// everything else
|
|
225
|
-
callbacks:
|
|
225
|
+
callbacks: _t(),
|
|
226
226
|
dirty: l,
|
|
227
227
|
skip_bound: !1,
|
|
228
|
-
root: n.target ||
|
|
228
|
+
root: n.target || u.$$.root
|
|
229
229
|
};
|
|
230
|
-
c && c(
|
|
231
|
-
let
|
|
232
|
-
if (
|
|
233
|
-
const
|
|
234
|
-
return
|
|
235
|
-
}) : [],
|
|
230
|
+
c && c(d.root);
|
|
231
|
+
let x = !1;
|
|
232
|
+
if (d.ctx = r ? r(t, n.props || {}, ($, g, ...i) => {
|
|
233
|
+
const m = i.length ? i[0] : g;
|
|
234
|
+
return d.ctx && s(d.ctx[$], d.ctx[$] = m) && (!d.skip_bound && d.bound[$] && d.bound[$](m), x && hn(t, $)), g;
|
|
235
|
+
}) : [], d.update(), x = !0, z(d.before_update), d.fragment = o ? o(d.ctx) : !1, n.target) {
|
|
236
236
|
if (n.hydrate) {
|
|
237
237
|
const $ = rn(n.target);
|
|
238
|
-
|
|
238
|
+
d.fragment && d.fragment.l($), $.forEach(w);
|
|
239
239
|
} else
|
|
240
|
-
|
|
241
|
-
n.intro &&
|
|
240
|
+
d.fragment && d.fragment.c();
|
|
241
|
+
n.intro && pt(t.$$.fragment), bt(t, n.target, n.anchor, n.customElement), Dt();
|
|
242
242
|
}
|
|
243
|
-
|
|
243
|
+
K(u);
|
|
244
244
|
}
|
|
245
|
-
class
|
|
245
|
+
class Pt {
|
|
246
246
|
$destroy() {
|
|
247
|
-
St(this, 1), this.$destroy =
|
|
247
|
+
St(this, 1), this.$destroy = wt;
|
|
248
248
|
}
|
|
249
249
|
$on(n, r) {
|
|
250
|
-
if (!
|
|
251
|
-
return
|
|
250
|
+
if (!P(r))
|
|
251
|
+
return wt;
|
|
252
252
|
const o = this.$$.callbacks[n] || (this.$$.callbacks[n] = []);
|
|
253
253
|
return o.push(r), () => {
|
|
254
254
|
const s = o.indexOf(r);
|
|
@@ -256,24 +256,24 @@ class _t {
|
|
|
256
256
|
};
|
|
257
257
|
}
|
|
258
258
|
$set(n) {
|
|
259
|
-
this.$$set && !
|
|
259
|
+
this.$$set && !Kt(n) && (this.$$.skip_bound = !0, this.$$set(n), this.$$.skip_bound = !1);
|
|
260
260
|
}
|
|
261
261
|
}
|
|
262
|
-
var
|
|
263
|
-
const At = (t, n) => n,
|
|
262
|
+
var U = /* @__PURE__ */ ((t) => (t.ELLIPSE = "ELLIPSE", t.POLYGON = "POLYGON", t.RECTANGLE = "RECTANGLE", t))(U || {});
|
|
263
|
+
const At = (t, n) => n, Vt = (t) => {
|
|
264
264
|
let n = 1 / 0, r = 1 / 0, o = -1 / 0, s = -1 / 0;
|
|
265
265
|
return t.forEach(([a, c]) => {
|
|
266
266
|
n = Math.min(n, a), r = Math.min(r, c), o = Math.max(o, a), s = Math.max(s, c);
|
|
267
267
|
}), { minX: n, minY: r, maxX: o, maxY: s };
|
|
268
|
-
},
|
|
268
|
+
}, fn = {
|
|
269
269
|
area: (t) => Math.PI * t.geometry.rx * t.geometry.ry,
|
|
270
270
|
intersects: (t, n, r) => {
|
|
271
|
-
const { cx: o, cy: s, rx: a, ry: c } = t.geometry, l = 0,
|
|
272
|
-
return
|
|
271
|
+
const { cx: o, cy: s, rx: a, ry: c } = t.geometry, l = 0, u = Math.cos(l), d = Math.sin(l), x = n - o, $ = r - s, g = u * x + d * $, i = d * x - u * $;
|
|
272
|
+
return g * g / (a * a) + i * i / (c * c) <= 1;
|
|
273
273
|
}
|
|
274
274
|
};
|
|
275
|
-
At(
|
|
276
|
-
const
|
|
275
|
+
At(U.ELLIPSE, fn);
|
|
276
|
+
const dn = {
|
|
277
277
|
area: (t) => {
|
|
278
278
|
const { points: n } = t.geometry;
|
|
279
279
|
let r = 0, o = n.length - 1;
|
|
@@ -285,48 +285,48 @@ const fn = {
|
|
|
285
285
|
const { points: o } = t.geometry;
|
|
286
286
|
let s = !1;
|
|
287
287
|
for (let a = 0, c = o.length - 1; a < o.length; c = a++) {
|
|
288
|
-
const l = o[a][0],
|
|
289
|
-
|
|
288
|
+
const l = o[a][0], u = o[a][1], d = o[c][0], x = o[c][1];
|
|
289
|
+
u > r != x > r && n < (d - l) * (r - u) / (x - u) + l && (s = !s);
|
|
290
290
|
}
|
|
291
291
|
return s;
|
|
292
292
|
}
|
|
293
293
|
};
|
|
294
|
-
At(
|
|
295
|
-
const
|
|
294
|
+
At(U.POLYGON, dn);
|
|
295
|
+
const mn = {
|
|
296
296
|
area: (t) => t.geometry.w * t.geometry.h,
|
|
297
297
|
intersects: (t, n, r) => n >= t.geometry.x && n <= t.geometry.x + t.geometry.w && r >= t.geometry.y && r <= t.geometry.y + t.geometry.h
|
|
298
298
|
};
|
|
299
|
-
At(
|
|
299
|
+
At(U.RECTANGLE, mn);
|
|
300
300
|
const yn = (t, n = !1) => {
|
|
301
|
-
const r = typeof t == "string" ? t : t.value, o = /^(xywh)=(pixel|percent)?:?(.+?),(.+?),(.+?),(.+)*/g, s = [...r.matchAll(o)][0], [a, c, l,
|
|
301
|
+
const r = typeof t == "string" ? t : t.value, o = /^(xywh)=(pixel|percent)?:?(.+?),(.+?),(.+?),(.+)*/g, s = [...r.matchAll(o)][0], [a, c, l, u, d, x, $] = s;
|
|
302
302
|
if (c !== "xywh")
|
|
303
303
|
throw new Error("Unsupported MediaFragment: " + r);
|
|
304
304
|
if (l && l !== "pixel")
|
|
305
305
|
throw new Error(`Unsupported MediaFragment unit: ${l}`);
|
|
306
|
-
const [
|
|
306
|
+
const [g, i, m, h] = [u, d, x, $].map(parseFloat);
|
|
307
307
|
return {
|
|
308
|
-
type:
|
|
308
|
+
type: U.RECTANGLE,
|
|
309
309
|
geometry: {
|
|
310
|
-
x:
|
|
310
|
+
x: g,
|
|
311
311
|
y: i,
|
|
312
|
-
w:
|
|
312
|
+
w: m,
|
|
313
313
|
h,
|
|
314
314
|
bounds: {
|
|
315
|
-
minX:
|
|
315
|
+
minX: g,
|
|
316
316
|
minY: n ? i - h : i,
|
|
317
|
-
maxX:
|
|
317
|
+
maxX: g + m,
|
|
318
318
|
maxY: n ? i : i + h
|
|
319
319
|
}
|
|
320
320
|
}
|
|
321
321
|
};
|
|
322
|
-
},
|
|
322
|
+
}, gn = (t) => {
|
|
323
323
|
const { x: n, y: r, w: o, h: s } = t;
|
|
324
324
|
return {
|
|
325
325
|
type: "FragmentSelector",
|
|
326
326
|
conformsTo: "http://www.w3.org/TR/media-frags/",
|
|
327
327
|
value: `xywh=pixel:${n},${r},${o},${s}`
|
|
328
328
|
};
|
|
329
|
-
},
|
|
329
|
+
}, Wt = "http://www.w3.org/2000/svg", Gt = (t) => {
|
|
330
330
|
const n = (o) => {
|
|
331
331
|
Array.from(o.attributes).forEach((s) => {
|
|
332
332
|
s.name.startsWith("on") && o.removeAttribute(s.name);
|
|
@@ -334,32 +334,32 @@ const yn = (t, n = !1) => {
|
|
|
334
334
|
}, r = t.getElementsByTagName("script");
|
|
335
335
|
return Array.from(r).reverse().forEach((o) => o.parentNode.removeChild(o)), Array.from(t.querySelectorAll("*")).forEach(n), t;
|
|
336
336
|
}, $n = (t) => {
|
|
337
|
-
const n = new XMLSerializer().serializeToString(t.documentElement).replace("<svg>", `<svg xmlns="${
|
|
337
|
+
const n = new XMLSerializer().serializeToString(t.documentElement).replace("<svg>", `<svg xmlns="${Wt}">`);
|
|
338
338
|
return new DOMParser().parseFromString(n, "image/svg+xml").documentElement;
|
|
339
|
+
}, wn = (t) => {
|
|
340
|
+
const n = new DOMParser().parseFromString(t, "image/svg+xml"), r = n.lookupPrefix(Wt), o = n.lookupNamespaceURI(null);
|
|
341
|
+
return r || o ? Gt(n).firstChild : Gt($n(n)).firstChild;
|
|
339
342
|
}, xn = (t) => {
|
|
340
|
-
const n = new DOMParser().parseFromString(t, "image/svg+xml"), r = n.lookupPrefix(Vt), o = n.lookupNamespaceURI(null);
|
|
341
|
-
return r || o ? Ht(n).firstChild : Ht($n(n)).firstChild;
|
|
342
|
-
}, Tn = (t) => {
|
|
343
343
|
const [n, r, o] = t.match(/(<polygon points=["|'])([^("|')]*)/) || [];
|
|
344
344
|
if (!o)
|
|
345
345
|
return;
|
|
346
346
|
const s = o.split(" ").map((a) => a.split(",").map(parseFloat));
|
|
347
347
|
return {
|
|
348
|
-
type:
|
|
348
|
+
type: U.POLYGON,
|
|
349
349
|
geometry: {
|
|
350
350
|
points: s,
|
|
351
|
-
bounds:
|
|
351
|
+
bounds: Vt(s)
|
|
352
352
|
}
|
|
353
353
|
};
|
|
354
|
-
},
|
|
355
|
-
const n =
|
|
354
|
+
}, Tn = (t) => {
|
|
355
|
+
const n = wn(t), r = parseFloat(n.getAttribute("cx")), o = parseFloat(n.getAttribute("cy")), s = parseFloat(n.getAttribute("rx")), a = parseFloat(n.getAttribute("ry")), c = {
|
|
356
356
|
minX: r - s,
|
|
357
357
|
minY: o - a,
|
|
358
358
|
maxX: r + s,
|
|
359
359
|
maxY: o + a
|
|
360
360
|
};
|
|
361
361
|
return {
|
|
362
|
-
type:
|
|
362
|
+
type: U.ELLIPSE,
|
|
363
363
|
geometry: {
|
|
364
364
|
cx: r,
|
|
365
365
|
cy: o,
|
|
@@ -371,15 +371,15 @@ const yn = (t, n = !1) => {
|
|
|
371
371
|
}, En = (t) => {
|
|
372
372
|
const n = typeof t == "string" ? t : t.value;
|
|
373
373
|
if (n.includes("<polygon points="))
|
|
374
|
-
return
|
|
374
|
+
return xn(n);
|
|
375
375
|
if (n.includes("<ellipse "))
|
|
376
|
-
return
|
|
376
|
+
return Tn(n);
|
|
377
377
|
}, On = (t) => {
|
|
378
378
|
let n;
|
|
379
|
-
if (t.type ===
|
|
379
|
+
if (t.type === U.POLYGON) {
|
|
380
380
|
const r = t.geometry, { points: o } = r;
|
|
381
381
|
n = `<svg><polygon points="${o.map((s) => s.join(",")).join(" ")}" /></svg>`;
|
|
382
|
-
} else if (t.type ===
|
|
382
|
+
} else if (t.type === U.ELLIPSE) {
|
|
383
383
|
const r = t.geometry;
|
|
384
384
|
n = `<svg><ellipse cx="${r.cx}" cy="${r.cy}" rx="${r.rx}" ry="${r.ry}" /></svg>`;
|
|
385
385
|
}
|
|
@@ -400,12 +400,12 @@ for (let t = 0; t < 256; ++t)
|
|
|
400
400
|
function vn(t, n = 0) {
|
|
401
401
|
return b[t[n + 0]] + b[t[n + 1]] + b[t[n + 2]] + b[t[n + 3]] + "-" + b[t[n + 4]] + b[t[n + 5]] + "-" + b[t[n + 6]] + b[t[n + 7]] + "-" + b[t[n + 8]] + b[t[n + 9]] + "-" + b[t[n + 10]] + b[t[n + 11]] + b[t[n + 12]] + b[t[n + 13]] + b[t[n + 14]] + b[t[n + 15]];
|
|
402
402
|
}
|
|
403
|
-
const
|
|
404
|
-
randomUUID:
|
|
403
|
+
const Pn = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Ht = {
|
|
404
|
+
randomUUID: Pn
|
|
405
405
|
};
|
|
406
406
|
function An(t, n, r) {
|
|
407
|
-
if (
|
|
408
|
-
return
|
|
407
|
+
if (Ht.randomUUID && !n && !t)
|
|
408
|
+
return Ht.randomUUID();
|
|
409
409
|
t = t || {};
|
|
410
410
|
const o = t.random || (t.rng || Sn)();
|
|
411
411
|
if (o[6] = o[6] & 15 | 64, o[8] = o[8] & 63 | 128, n) {
|
|
@@ -420,8 +420,8 @@ const Ln = [];
|
|
|
420
420
|
for (let t = 0; t < 256; ++t)
|
|
421
421
|
Ln.push((t + 256).toString(16).slice(1));
|
|
422
422
|
typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
|
|
423
|
-
let
|
|
424
|
-
const
|
|
423
|
+
let _n = (t = 21) => crypto.getRandomValues(new Uint8Array(t)).reduce((n, r) => (r &= 63, r < 36 ? n += r.toString(36) : r < 62 ? n += (r - 26).toString(36).toUpperCase() : r > 62 ? n += "-" : n += "_", n), "");
|
|
424
|
+
const In = (t) => {
|
|
425
425
|
const n = JSON.stringify(t);
|
|
426
426
|
let r = 0;
|
|
427
427
|
for (let o = 0, s = n.length; o < s; o++) {
|
|
@@ -429,27 +429,27 @@ const Fn = (t) => {
|
|
|
429
429
|
r = (r << 5) - r + a, r |= 0;
|
|
430
430
|
}
|
|
431
431
|
return `${r}`;
|
|
432
|
-
},
|
|
433
|
-
const { id: o, type: s, purpose: a, value: c, created: l, creator:
|
|
432
|
+
}, Fn = (t, n) => (Array.isArray(t) ? t : [t]).map((r) => {
|
|
433
|
+
const { id: o, type: s, purpose: a, value: c, created: l, creator: u, ...d } = r;
|
|
434
434
|
return {
|
|
435
|
-
id: o || `temp-${
|
|
435
|
+
id: o || `temp-${In(r)}`,
|
|
436
436
|
annotation: n,
|
|
437
437
|
type: s,
|
|
438
438
|
purpose: a,
|
|
439
439
|
value: c,
|
|
440
440
|
created: l,
|
|
441
|
-
creator:
|
|
442
|
-
...
|
|
441
|
+
creator: u ? typeof u == "object" ? { ...u } : u : void 0,
|
|
442
|
+
...d
|
|
443
443
|
};
|
|
444
|
-
}),
|
|
444
|
+
}), Gn = (t) => t.map((n) => {
|
|
445
445
|
var r;
|
|
446
446
|
const o = { ...n };
|
|
447
447
|
return delete o.annotation, (r = o.id) != null && r.startsWith("temp-") && delete o.id, o;
|
|
448
448
|
});
|
|
449
|
-
|
|
450
|
-
const qn = (t, n = !1) => ({ parse: (r) =>
|
|
451
|
-
const r = t.id || An(), { body: o, ...s } = t, a =
|
|
452
|
-
return
|
|
449
|
+
_n();
|
|
450
|
+
const qn = (t, n = !1) => ({ parse: (r) => Hn(r, n), serialize: (r) => Rn(r, t) }), Hn = (t, n = !1) => {
|
|
451
|
+
const r = t.id || An(), { body: o, ...s } = t, a = Fn(o, r), c = Array.isArray(t.target) ? t.target[0] : t.target, l = Array.isArray(c.selector) ? c.selector[0] : c.selector, u = l.type === "FragmentSelector" ? yn(l, n) : l.type === "SvgSelector" ? En(l) : void 0;
|
|
452
|
+
return u ? {
|
|
453
453
|
parsed: {
|
|
454
454
|
...s,
|
|
455
455
|
id: r,
|
|
@@ -457,31 +457,31 @@ const qn = (t, n = !1) => ({ parse: (r) => Gn(r, n), serialize: (r) => Un(r, t)
|
|
|
457
457
|
target: {
|
|
458
458
|
...s.target,
|
|
459
459
|
annotation: r,
|
|
460
|
-
selector:
|
|
460
|
+
selector: u
|
|
461
461
|
}
|
|
462
462
|
}
|
|
463
463
|
} : {
|
|
464
464
|
error: Error(`Unknown selector type: ${l.type}`)
|
|
465
465
|
};
|
|
466
|
-
},
|
|
467
|
-
const r = t.target.selector, o = r.type ==
|
|
466
|
+
}, Rn = (t, n) => {
|
|
467
|
+
const r = t.target.selector, o = r.type == U.RECTANGLE ? gn(r.geometry) : On(r);
|
|
468
468
|
return {
|
|
469
469
|
...t,
|
|
470
470
|
"@context": "http://www.w3.org/ns/anno.jsonld",
|
|
471
471
|
id: t.id,
|
|
472
472
|
type: "Annotation",
|
|
473
|
-
body:
|
|
473
|
+
body: Gn(t.bodies),
|
|
474
474
|
target: {
|
|
475
475
|
source: n,
|
|
476
476
|
selector: o
|
|
477
477
|
}
|
|
478
478
|
};
|
|
479
479
|
};
|
|
480
|
-
function
|
|
480
|
+
function Rt(t, n, r) {
|
|
481
481
|
const o = t.slice();
|
|
482
482
|
return o[11] = n[r], o[13] = r, o;
|
|
483
483
|
}
|
|
484
|
-
function
|
|
484
|
+
function Ut(t) {
|
|
485
485
|
let n, r, o, s, a;
|
|
486
486
|
return {
|
|
487
487
|
c() {
|
|
@@ -502,14 +502,14 @@ function Nt(t) {
|
|
|
502
502
|
);
|
|
503
503
|
},
|
|
504
504
|
m(c, l) {
|
|
505
|
-
|
|
506
|
-
|
|
505
|
+
T(c, n, l), s || (a = A(n, "pointerdown", function() {
|
|
506
|
+
P(
|
|
507
507
|
/*grab*/
|
|
508
|
-
t[10](
|
|
508
|
+
t[10](f(
|
|
509
509
|
/*idx*/
|
|
510
510
|
t[13]
|
|
511
511
|
))
|
|
512
|
-
) && t[10](
|
|
512
|
+
) && t[10](f(
|
|
513
513
|
/*idx*/
|
|
514
514
|
t[13]
|
|
515
515
|
)).apply(this, arguments);
|
|
@@ -537,25 +537,25 @@ function Nt(t) {
|
|
|
537
537
|
);
|
|
538
538
|
},
|
|
539
539
|
d(c) {
|
|
540
|
-
c &&
|
|
540
|
+
c && w(n), s = !1, a();
|
|
541
541
|
}
|
|
542
542
|
};
|
|
543
543
|
}
|
|
544
|
-
function
|
|
545
|
-
let n, r, o, s, a, c, l,
|
|
544
|
+
function Un(t) {
|
|
545
|
+
let n, r, o, s, a, c, l, u, d, x, $ = (
|
|
546
546
|
/*geom*/
|
|
547
547
|
t[4].points
|
|
548
|
-
),
|
|
548
|
+
), g = [];
|
|
549
549
|
for (let i = 0; i < $.length; i += 1)
|
|
550
|
-
|
|
550
|
+
g[i] = Ut(Rt(t, $, i));
|
|
551
551
|
return {
|
|
552
552
|
c() {
|
|
553
553
|
n = L("polygon"), s = C(), a = L("polygon"), l = C();
|
|
554
|
-
for (let i = 0; i <
|
|
555
|
-
|
|
556
|
-
|
|
554
|
+
for (let i = 0; i < g.length; i += 1)
|
|
555
|
+
g[i].c();
|
|
556
|
+
u = nn(), e(n, "class", "a9s-outer"), e(n, "style", r = /*computedStyle*/
|
|
557
557
|
t[1] ? "display:none;" : void 0), e(n, "points", o = /*geom*/
|
|
558
|
-
t[4].points.map(
|
|
558
|
+
t[4].points.map(Nt).join(" ")), e(a, "class", "a9s-inner a9s-shape-handle"), e(
|
|
559
559
|
a,
|
|
560
560
|
"style",
|
|
561
561
|
/*computedStyle*/
|
|
@@ -563,60 +563,60 @@ function Nn(t) {
|
|
|
563
563
|
), e(a, "points", c = /*geom*/
|
|
564
564
|
t[4].points.map(Ct).join(" "));
|
|
565
565
|
},
|
|
566
|
-
m(i,
|
|
567
|
-
|
|
568
|
-
for (let h = 0; h <
|
|
569
|
-
|
|
570
|
-
|
|
566
|
+
m(i, m) {
|
|
567
|
+
T(i, n, m), T(i, s, m), T(i, a, m), T(i, l, m);
|
|
568
|
+
for (let h = 0; h < g.length; h += 1)
|
|
569
|
+
g[h] && g[h].m(i, m);
|
|
570
|
+
T(i, u, m), d || (x = [
|
|
571
571
|
A(n, "pointerdown", function() {
|
|
572
|
-
|
|
572
|
+
P(
|
|
573
573
|
/*grab*/
|
|
574
|
-
t[10](
|
|
575
|
-
) && t[10](
|
|
574
|
+
t[10](f.SHAPE)
|
|
575
|
+
) && t[10](f.SHAPE).apply(this, arguments);
|
|
576
576
|
}),
|
|
577
577
|
A(a, "pointerdown", function() {
|
|
578
|
-
|
|
578
|
+
P(
|
|
579
579
|
/*grab*/
|
|
580
|
-
t[10](
|
|
581
|
-
) && t[10](
|
|
580
|
+
t[10](f.SHAPE)
|
|
581
|
+
) && t[10](f.SHAPE).apply(this, arguments);
|
|
582
582
|
})
|
|
583
|
-
],
|
|
583
|
+
], d = !0);
|
|
584
584
|
},
|
|
585
|
-
p(i,
|
|
586
|
-
if (t = i,
|
|
585
|
+
p(i, m) {
|
|
586
|
+
if (t = i, m & /*computedStyle*/
|
|
587
587
|
2 && r !== (r = /*computedStyle*/
|
|
588
|
-
t[1] ? "display:none;" : void 0) && e(n, "style", r),
|
|
588
|
+
t[1] ? "display:none;" : void 0) && e(n, "style", r), m & /*geom*/
|
|
589
589
|
16 && o !== (o = /*geom*/
|
|
590
|
-
t[4].points.map(
|
|
590
|
+
t[4].points.map(Nt).join(" ")) && e(n, "points", o), m & /*computedStyle*/
|
|
591
591
|
2 && e(
|
|
592
592
|
a,
|
|
593
593
|
"style",
|
|
594
594
|
/*computedStyle*/
|
|
595
595
|
t[1]
|
|
596
|
-
),
|
|
596
|
+
), m & /*geom*/
|
|
597
597
|
16 && c !== (c = /*geom*/
|
|
598
|
-
t[4].points.map(Ct).join(" ")) && e(a, "points", c),
|
|
598
|
+
t[4].points.map(Ct).join(" ")) && e(a, "points", c), m & /*geom, handleSize, grab, Handle*/
|
|
599
599
|
1048) {
|
|
600
600
|
$ = /*geom*/
|
|
601
601
|
t[4].points;
|
|
602
602
|
let h;
|
|
603
603
|
for (h = 0; h < $.length; h += 1) {
|
|
604
|
-
const E =
|
|
605
|
-
|
|
604
|
+
const E = Rt(t, $, h);
|
|
605
|
+
g[h] ? g[h].p(E, m) : (g[h] = Ut(E), g[h].c(), g[h].m(u.parentNode, u));
|
|
606
606
|
}
|
|
607
|
-
for (; h <
|
|
608
|
-
|
|
609
|
-
|
|
607
|
+
for (; h < g.length; h += 1)
|
|
608
|
+
g[h].d(1);
|
|
609
|
+
g.length = $.length;
|
|
610
610
|
}
|
|
611
611
|
},
|
|
612
612
|
d(i) {
|
|
613
|
-
i &&
|
|
613
|
+
i && w(n), i && w(s), i && w(a), i && w(l), tn(g, i), i && w(u), d = !1, z(x);
|
|
614
614
|
}
|
|
615
615
|
};
|
|
616
616
|
}
|
|
617
|
-
function
|
|
617
|
+
function Nn(t) {
|
|
618
618
|
let n, r;
|
|
619
|
-
return n = new
|
|
619
|
+
return n = new qt({
|
|
620
620
|
props: {
|
|
621
621
|
shape: (
|
|
622
622
|
/*shape*/
|
|
@@ -632,7 +632,7 @@ function Bn(t) {
|
|
|
632
632
|
),
|
|
633
633
|
$$slots: {
|
|
634
634
|
default: [
|
|
635
|
-
|
|
635
|
+
Un,
|
|
636
636
|
({ grab: o }) => ({ 10: o }),
|
|
637
637
|
({ grab: o }) => o ? 1024 : 0
|
|
638
638
|
]
|
|
@@ -653,7 +653,7 @@ function Bn(t) {
|
|
|
653
653
|
t[9]
|
|
654
654
|
), {
|
|
655
655
|
c() {
|
|
656
|
-
|
|
656
|
+
zt(n.$$.fragment);
|
|
657
657
|
},
|
|
658
658
|
m(o, s) {
|
|
659
659
|
bt(n, o, s), r = !0;
|
|
@@ -668,7 +668,7 @@ function Bn(t) {
|
|
|
668
668
|
17434 && (a.$$scope = { dirty: s, ctx: o }), n.$set(a);
|
|
669
669
|
},
|
|
670
670
|
i(o) {
|
|
671
|
-
r || (
|
|
671
|
+
r || (pt(n.$$.fragment, o), r = !0);
|
|
672
672
|
},
|
|
673
673
|
o(o) {
|
|
674
674
|
Ot(n.$$.fragment, o), r = !1;
|
|
@@ -678,46 +678,46 @@ function Bn(t) {
|
|
|
678
678
|
}
|
|
679
679
|
};
|
|
680
680
|
}
|
|
681
|
-
const
|
|
681
|
+
const Nt = (t) => t.join(","), Ct = (t) => t.join(",");
|
|
682
682
|
function Cn(t, n, r) {
|
|
683
|
-
let o, s, { shape: a } = n, { computedStyle: c = void 0 } = n, { transform: l } = n, { viewportScale:
|
|
684
|
-
const
|
|
683
|
+
let o, s, { shape: a } = n, { computedStyle: c = void 0 } = n, { transform: l } = n, { viewportScale: u = 1 } = n;
|
|
684
|
+
const d = (i, m, h) => {
|
|
685
685
|
let E;
|
|
686
|
-
|
|
687
|
-
const
|
|
688
|
-
return { ...i, geometry: { points: E, bounds:
|
|
686
|
+
m === f.SHAPE ? E = i.geometry.points.map(([v, O]) => [v + h[0], O + h[1]]) : E = i.geometry.points.map(([v, O], N) => m === f(N) ? [v + h[0], O + h[1]] : [v, O]);
|
|
687
|
+
const _ = Vt(E);
|
|
688
|
+
return { ...i, geometry: { points: E, bounds: _ } };
|
|
689
689
|
};
|
|
690
|
-
function
|
|
691
|
-
|
|
690
|
+
function x(i) {
|
|
691
|
+
q.call(this, t, i);
|
|
692
692
|
}
|
|
693
693
|
function $(i) {
|
|
694
|
-
|
|
694
|
+
q.call(this, t, i);
|
|
695
695
|
}
|
|
696
|
-
function
|
|
697
|
-
|
|
696
|
+
function g(i) {
|
|
697
|
+
q.call(this, t, i);
|
|
698
698
|
}
|
|
699
699
|
return t.$$set = (i) => {
|
|
700
|
-
"shape" in i && r(0, a = i.shape), "computedStyle" in i && r(1, c = i.computedStyle), "transform" in i && r(2, l = i.transform), "viewportScale" in i && r(6,
|
|
700
|
+
"shape" in i && r(0, a = i.shape), "computedStyle" in i && r(1, c = i.computedStyle), "transform" in i && r(2, l = i.transform), "viewportScale" in i && r(6, u = i.viewportScale);
|
|
701
701
|
}, t.$$.update = () => {
|
|
702
702
|
t.$$.dirty & /*shape*/
|
|
703
703
|
1 && r(4, o = a.geometry), t.$$.dirty & /*viewportScale*/
|
|
704
|
-
64 && r(3, s = 10 /
|
|
704
|
+
64 && r(3, s = 10 / u);
|
|
705
705
|
}, [
|
|
706
706
|
a,
|
|
707
707
|
c,
|
|
708
708
|
l,
|
|
709
709
|
s,
|
|
710
710
|
o,
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
711
|
+
d,
|
|
712
|
+
u,
|
|
713
|
+
x,
|
|
714
714
|
$,
|
|
715
|
-
|
|
715
|
+
g
|
|
716
716
|
];
|
|
717
717
|
}
|
|
718
|
-
class
|
|
718
|
+
class Bn extends Pt {
|
|
719
719
|
constructor(n) {
|
|
720
|
-
super(), vt(this, n, Cn,
|
|
720
|
+
super(), vt(this, n, Cn, Nn, Et, {
|
|
721
721
|
shape: 0,
|
|
722
722
|
computedStyle: 1,
|
|
723
723
|
transform: 2,
|
|
@@ -726,300 +726,300 @@ class Yn extends _t {
|
|
|
726
726
|
}
|
|
727
727
|
}
|
|
728
728
|
function kn(t) {
|
|
729
|
-
let n, r, o, s, a, c, l,
|
|
729
|
+
let n, r, o, s, a, c, l, u, d, x, $, g, i, m, h, E, _, v, O, N, B, k, j, S, X, D, Q, ht, R, M, Y, tt, ft, I, nt, rt, dt, F, ot, et, mt, G, st, at, yt, H, it, ct, gt, Lt;
|
|
730
730
|
return {
|
|
731
731
|
c() {
|
|
732
|
-
n = L("rect"), l = C(),
|
|
732
|
+
n = L("rect"), l = C(), u = L("rect"), i = C(), m = L("rect"), v = C(), O = L("rect"), j = C(), S = L("rect"), ht = C(), R = L("rect"), ft = C(), I = L("rect"), dt = C(), F = L("rect"), mt = C(), G = L("rect"), yt = C(), H = L("rect"), e(n, "class", "a9s-outer"), e(n, "style", r = /*computedStyle*/
|
|
733
733
|
t[1] ? "display:none;" : void 0), e(n, "x", o = /*geom*/
|
|
734
734
|
t[4].x), e(n, "y", s = /*geom*/
|
|
735
735
|
t[4].y), e(n, "width", a = /*geom*/
|
|
736
736
|
t[4].w), e(n, "height", c = /*geom*/
|
|
737
|
-
t[4].h), e(
|
|
738
|
-
|
|
737
|
+
t[4].h), e(u, "class", "a9s-inner a9s-shape-handle"), e(
|
|
738
|
+
u,
|
|
739
739
|
"style",
|
|
740
740
|
/*computedStyle*/
|
|
741
741
|
t[1]
|
|
742
|
-
), e(
|
|
743
|
-
t[4].x), e(
|
|
744
|
-
t[4].y), e(
|
|
745
|
-
t[4].w), e(
|
|
746
|
-
t[4].h), e(
|
|
747
|
-
t[4].x), e(
|
|
748
|
-
t[4].y), e(
|
|
749
|
-
t[4].w), e(O, "class", "a9s-edge-handle a9s-edge-handle-right"), e(O, "x",
|
|
742
|
+
), e(u, "x", d = /*geom*/
|
|
743
|
+
t[4].x), e(u, "y", x = /*geom*/
|
|
744
|
+
t[4].y), e(u, "width", $ = /*geom*/
|
|
745
|
+
t[4].w), e(u, "height", g = /*geom*/
|
|
746
|
+
t[4].h), e(m, "class", "a9s-edge-handle a9s-edge-handle-top"), e(m, "x", h = /*geom*/
|
|
747
|
+
t[4].x), e(m, "y", E = /*geom*/
|
|
748
|
+
t[4].y), e(m, "height", 1), e(m, "width", _ = /*geom*/
|
|
749
|
+
t[4].w), e(O, "class", "a9s-edge-handle a9s-edge-handle-right"), e(O, "x", N = /*geom*/
|
|
750
750
|
t[4].x + /*geom*/
|
|
751
|
-
t[4].w), e(O, "y",
|
|
751
|
+
t[4].w), e(O, "y", B = /*geom*/
|
|
752
752
|
t[4].y), e(O, "height", k = /*geom*/
|
|
753
753
|
t[4].h), e(O, "width", 1), e(S, "class", "a9s-edge-handle a9s-edge-handle-bottom"), e(S, "x", X = /*geom*/
|
|
754
|
-
t[4].x), e(S, "y",
|
|
754
|
+
t[4].x), e(S, "y", D = /*geom*/
|
|
755
755
|
t[4].y + /*geom*/
|
|
756
756
|
t[4].h), e(S, "height", 1), e(S, "width", Q = /*geom*/
|
|
757
|
-
t[4].w), e(
|
|
758
|
-
t[4].x), e(
|
|
759
|
-
t[4].y), e(
|
|
760
|
-
t[4].h), e(
|
|
757
|
+
t[4].w), e(R, "class", "a9s-edge-handle a9s-edge-handle-left"), e(R, "x", M = /*geom*/
|
|
758
|
+
t[4].x), e(R, "y", Y = /*geom*/
|
|
759
|
+
t[4].y), e(R, "height", tt = /*geom*/
|
|
760
|
+
t[4].h), e(R, "width", 1), e(I, "class", "a9s-corner-handle a9s-corner-handle-topleft"), e(I, "x", nt = /*geom*/
|
|
761
761
|
t[4].x - /*handleSize*/
|
|
762
|
-
t[3] / 2), e(
|
|
762
|
+
t[3] / 2), e(I, "y", rt = /*geom*/
|
|
763
763
|
t[4].y - /*handleSize*/
|
|
764
764
|
t[3] / 2), e(
|
|
765
|
-
|
|
765
|
+
I,
|
|
766
766
|
"height",
|
|
767
767
|
/*handleSize*/
|
|
768
768
|
t[3]
|
|
769
769
|
), e(
|
|
770
|
-
|
|
770
|
+
I,
|
|
771
771
|
"width",
|
|
772
772
|
/*handleSize*/
|
|
773
773
|
t[3]
|
|
774
|
-
), e(
|
|
774
|
+
), e(F, "class", "a9s-corner-handle a9s-corner-handle-topright"), e(F, "x", ot = /*geom*/
|
|
775
775
|
t[4].x + /*geom*/
|
|
776
776
|
t[4].w - /*handleSize*/
|
|
777
|
-
t[3] / 2), e(
|
|
777
|
+
t[3] / 2), e(F, "y", et = /*geom*/
|
|
778
778
|
t[4].y - /*handleSize*/
|
|
779
779
|
t[3] / 2), e(
|
|
780
|
-
|
|
780
|
+
F,
|
|
781
781
|
"height",
|
|
782
782
|
/*handleSize*/
|
|
783
783
|
t[3]
|
|
784
784
|
), e(
|
|
785
|
-
|
|
785
|
+
F,
|
|
786
786
|
"width",
|
|
787
787
|
/*handleSize*/
|
|
788
788
|
t[3]
|
|
789
|
-
), e(
|
|
789
|
+
), e(G, "class", "a9s-corner-handle a9s-corner-handle-bottomright"), e(G, "x", st = /*geom*/
|
|
790
790
|
t[4].x + /*geom*/
|
|
791
791
|
t[4].w - /*handleSize*/
|
|
792
|
-
t[3] / 2), e(
|
|
792
|
+
t[3] / 2), e(G, "y", at = /*geom*/
|
|
793
793
|
t[4].y + /*geom*/
|
|
794
794
|
t[4].h - /*handleSize*/
|
|
795
795
|
t[3] / 2), e(
|
|
796
|
-
|
|
796
|
+
G,
|
|
797
797
|
"height",
|
|
798
798
|
/*handleSize*/
|
|
799
799
|
t[3]
|
|
800
800
|
), e(
|
|
801
|
-
|
|
801
|
+
G,
|
|
802
802
|
"width",
|
|
803
803
|
/*handleSize*/
|
|
804
804
|
t[3]
|
|
805
|
-
), e(
|
|
805
|
+
), e(H, "class", "a9s-corner-handle a9s-corner-handle-bottomleft"), e(H, "x", it = /*geom*/
|
|
806
806
|
t[4].x - /*handleSize*/
|
|
807
|
-
t[3] / 2), e(
|
|
807
|
+
t[3] / 2), e(H, "y", ct = /*geom*/
|
|
808
808
|
t[4].y + /*geom*/
|
|
809
809
|
t[4].h - /*handleSize*/
|
|
810
810
|
t[3] / 2), e(
|
|
811
|
-
|
|
811
|
+
H,
|
|
812
812
|
"height",
|
|
813
813
|
/*handleSize*/
|
|
814
814
|
t[3]
|
|
815
815
|
), e(
|
|
816
|
-
|
|
816
|
+
H,
|
|
817
817
|
"width",
|
|
818
818
|
/*handleSize*/
|
|
819
819
|
t[3]
|
|
820
820
|
);
|
|
821
821
|
},
|
|
822
|
-
m(y,
|
|
823
|
-
|
|
822
|
+
m(y, p) {
|
|
823
|
+
T(y, n, p), T(y, l, p), T(y, u, p), T(y, i, p), T(y, m, p), T(y, v, p), T(y, O, p), T(y, j, p), T(y, S, p), T(y, ht, p), T(y, R, p), T(y, ft, p), T(y, I, p), T(y, dt, p), T(y, F, p), T(y, mt, p), T(y, G, p), T(y, yt, p), T(y, H, p), gt || (Lt = [
|
|
824
824
|
A(n, "pointerdown", function() {
|
|
825
|
-
|
|
825
|
+
P(
|
|
826
826
|
/*grab*/
|
|
827
|
-
t[10](
|
|
828
|
-
) && t[10](
|
|
827
|
+
t[10](f.SHAPE)
|
|
828
|
+
) && t[10](f.SHAPE).apply(this, arguments);
|
|
829
829
|
}),
|
|
830
|
-
A(
|
|
831
|
-
|
|
830
|
+
A(u, "pointerdown", function() {
|
|
831
|
+
P(
|
|
832
832
|
/*grab*/
|
|
833
|
-
t[10](
|
|
834
|
-
) && t[10](
|
|
833
|
+
t[10](f.SHAPE)
|
|
834
|
+
) && t[10](f.SHAPE).apply(this, arguments);
|
|
835
835
|
}),
|
|
836
|
-
A(
|
|
837
|
-
|
|
836
|
+
A(m, "pointerdown", function() {
|
|
837
|
+
P(
|
|
838
838
|
/*grab*/
|
|
839
|
-
t[10](
|
|
840
|
-
) && t[10](
|
|
839
|
+
t[10](f.TOP)
|
|
840
|
+
) && t[10](f.TOP).apply(this, arguments);
|
|
841
841
|
}),
|
|
842
842
|
A(O, "pointerdown", function() {
|
|
843
|
-
|
|
843
|
+
P(
|
|
844
844
|
/*grab*/
|
|
845
|
-
t[10](
|
|
846
|
-
) && t[10](
|
|
845
|
+
t[10](f.RIGHT)
|
|
846
|
+
) && t[10](f.RIGHT).apply(this, arguments);
|
|
847
847
|
}),
|
|
848
848
|
A(S, "pointerdown", function() {
|
|
849
|
-
|
|
849
|
+
P(
|
|
850
850
|
/*grab*/
|
|
851
|
-
t[10](
|
|
852
|
-
) && t[10](
|
|
851
|
+
t[10](f.BOTTOM)
|
|
852
|
+
) && t[10](f.BOTTOM).apply(this, arguments);
|
|
853
853
|
}),
|
|
854
|
-
A(
|
|
855
|
-
|
|
854
|
+
A(R, "pointerdown", function() {
|
|
855
|
+
P(
|
|
856
856
|
/*grab*/
|
|
857
|
-
t[10](
|
|
858
|
-
) && t[10](
|
|
857
|
+
t[10](f.LEFT)
|
|
858
|
+
) && t[10](f.LEFT).apply(this, arguments);
|
|
859
859
|
}),
|
|
860
|
-
A(
|
|
861
|
-
|
|
860
|
+
A(I, "pointerdown", function() {
|
|
861
|
+
P(
|
|
862
862
|
/*grab*/
|
|
863
|
-
t[10](
|
|
864
|
-
) && t[10](
|
|
863
|
+
t[10](f.TOP_LEFT)
|
|
864
|
+
) && t[10](f.TOP_LEFT).apply(this, arguments);
|
|
865
865
|
}),
|
|
866
|
-
A(
|
|
867
|
-
|
|
866
|
+
A(F, "pointerdown", function() {
|
|
867
|
+
P(
|
|
868
868
|
/*grab*/
|
|
869
|
-
t[10](
|
|
870
|
-
) && t[10](
|
|
869
|
+
t[10](f.TOP_RIGHT)
|
|
870
|
+
) && t[10](f.TOP_RIGHT).apply(this, arguments);
|
|
871
871
|
}),
|
|
872
|
-
A(
|
|
873
|
-
|
|
872
|
+
A(G, "pointerdown", function() {
|
|
873
|
+
P(
|
|
874
874
|
/*grab*/
|
|
875
|
-
t[10](
|
|
876
|
-
) && t[10](
|
|
875
|
+
t[10](f.BOTTOM_RIGHT)
|
|
876
|
+
) && t[10](f.BOTTOM_RIGHT).apply(this, arguments);
|
|
877
877
|
}),
|
|
878
|
-
A(
|
|
879
|
-
|
|
878
|
+
A(H, "pointerdown", function() {
|
|
879
|
+
P(
|
|
880
880
|
/*grab*/
|
|
881
|
-
t[10](
|
|
882
|
-
) && t[10](
|
|
881
|
+
t[10](f.BOTTOM_LEFT)
|
|
882
|
+
) && t[10](f.BOTTOM_LEFT).apply(this, arguments);
|
|
883
883
|
})
|
|
884
|
-
],
|
|
884
|
+
], gt = !0);
|
|
885
885
|
},
|
|
886
|
-
p(y,
|
|
887
|
-
t = y,
|
|
886
|
+
p(y, p) {
|
|
887
|
+
t = y, p & /*computedStyle*/
|
|
888
888
|
2 && r !== (r = /*computedStyle*/
|
|
889
|
-
t[1] ? "display:none;" : void 0) && e(n, "style", r),
|
|
889
|
+
t[1] ? "display:none;" : void 0) && e(n, "style", r), p & /*geom*/
|
|
890
890
|
16 && o !== (o = /*geom*/
|
|
891
|
-
t[4].x) && e(n, "x", o),
|
|
891
|
+
t[4].x) && e(n, "x", o), p & /*geom*/
|
|
892
892
|
16 && s !== (s = /*geom*/
|
|
893
|
-
t[4].y) && e(n, "y", s),
|
|
893
|
+
t[4].y) && e(n, "y", s), p & /*geom*/
|
|
894
894
|
16 && a !== (a = /*geom*/
|
|
895
|
-
t[4].w) && e(n, "width", a),
|
|
895
|
+
t[4].w) && e(n, "width", a), p & /*geom*/
|
|
896
896
|
16 && c !== (c = /*geom*/
|
|
897
|
-
t[4].h) && e(n, "height", c),
|
|
897
|
+
t[4].h) && e(n, "height", c), p & /*computedStyle*/
|
|
898
898
|
2 && e(
|
|
899
|
-
|
|
899
|
+
u,
|
|
900
900
|
"style",
|
|
901
901
|
/*computedStyle*/
|
|
902
902
|
t[1]
|
|
903
|
-
),
|
|
904
|
-
16 &&
|
|
905
|
-
t[4].x) && e(
|
|
906
|
-
16 &&
|
|
907
|
-
t[4].y) && e(
|
|
903
|
+
), p & /*geom*/
|
|
904
|
+
16 && d !== (d = /*geom*/
|
|
905
|
+
t[4].x) && e(u, "x", d), p & /*geom*/
|
|
906
|
+
16 && x !== (x = /*geom*/
|
|
907
|
+
t[4].y) && e(u, "y", x), p & /*geom*/
|
|
908
908
|
16 && $ !== ($ = /*geom*/
|
|
909
|
-
t[4].w) && e(
|
|
910
|
-
16 &&
|
|
911
|
-
t[4].h) && e(
|
|
909
|
+
t[4].w) && e(u, "width", $), p & /*geom*/
|
|
910
|
+
16 && g !== (g = /*geom*/
|
|
911
|
+
t[4].h) && e(u, "height", g), p & /*geom*/
|
|
912
912
|
16 && h !== (h = /*geom*/
|
|
913
|
-
t[4].x) && e(
|
|
913
|
+
t[4].x) && e(m, "x", h), p & /*geom*/
|
|
914
914
|
16 && E !== (E = /*geom*/
|
|
915
|
-
t[4].y) && e(
|
|
916
|
-
16 &&
|
|
917
|
-
t[4].w) && e(
|
|
918
|
-
16 &&
|
|
915
|
+
t[4].y) && e(m, "y", E), p & /*geom*/
|
|
916
|
+
16 && _ !== (_ = /*geom*/
|
|
917
|
+
t[4].w) && e(m, "width", _), p & /*geom*/
|
|
918
|
+
16 && N !== (N = /*geom*/
|
|
919
919
|
t[4].x + /*geom*/
|
|
920
|
-
t[4].w) && e(O, "x",
|
|
921
|
-
16 &&
|
|
922
|
-
t[4].y) && e(O, "y",
|
|
920
|
+
t[4].w) && e(O, "x", N), p & /*geom*/
|
|
921
|
+
16 && B !== (B = /*geom*/
|
|
922
|
+
t[4].y) && e(O, "y", B), p & /*geom*/
|
|
923
923
|
16 && k !== (k = /*geom*/
|
|
924
|
-
t[4].h) && e(O, "height", k),
|
|
924
|
+
t[4].h) && e(O, "height", k), p & /*geom*/
|
|
925
925
|
16 && X !== (X = /*geom*/
|
|
926
|
-
t[4].x) && e(S, "x", X),
|
|
927
|
-
16 &&
|
|
926
|
+
t[4].x) && e(S, "x", X), p & /*geom*/
|
|
927
|
+
16 && D !== (D = /*geom*/
|
|
928
928
|
t[4].y + /*geom*/
|
|
929
|
-
t[4].h) && e(S, "y",
|
|
929
|
+
t[4].h) && e(S, "y", D), p & /*geom*/
|
|
930
930
|
16 && Q !== (Q = /*geom*/
|
|
931
|
-
t[4].w) && e(S, "width", Q),
|
|
932
|
-
16 && Z !== (Z = /*geom*/
|
|
933
|
-
t[4].x) && e(U, "x", Z), u & /*geom*/
|
|
931
|
+
t[4].w) && e(S, "width", Q), p & /*geom*/
|
|
934
932
|
16 && M !== (M = /*geom*/
|
|
935
|
-
t[4].
|
|
933
|
+
t[4].x) && e(R, "x", M), p & /*geom*/
|
|
934
|
+
16 && Y !== (Y = /*geom*/
|
|
935
|
+
t[4].y) && e(R, "y", Y), p & /*geom*/
|
|
936
936
|
16 && tt !== (tt = /*geom*/
|
|
937
|
-
t[4].h) && e(
|
|
937
|
+
t[4].h) && e(R, "height", tt), p & /*geom, handleSize*/
|
|
938
938
|
24 && nt !== (nt = /*geom*/
|
|
939
939
|
t[4].x - /*handleSize*/
|
|
940
|
-
t[3] / 2) && e(
|
|
940
|
+
t[3] / 2) && e(I, "x", nt), p & /*geom, handleSize*/
|
|
941
941
|
24 && rt !== (rt = /*geom*/
|
|
942
942
|
t[4].y - /*handleSize*/
|
|
943
|
-
t[3] / 2) && e(
|
|
943
|
+
t[3] / 2) && e(I, "y", rt), p & /*handleSize*/
|
|
944
944
|
8 && e(
|
|
945
|
-
|
|
945
|
+
I,
|
|
946
946
|
"height",
|
|
947
947
|
/*handleSize*/
|
|
948
948
|
t[3]
|
|
949
|
-
),
|
|
949
|
+
), p & /*handleSize*/
|
|
950
950
|
8 && e(
|
|
951
|
-
|
|
951
|
+
I,
|
|
952
952
|
"width",
|
|
953
953
|
/*handleSize*/
|
|
954
954
|
t[3]
|
|
955
|
-
),
|
|
955
|
+
), p & /*geom, handleSize*/
|
|
956
956
|
24 && ot !== (ot = /*geom*/
|
|
957
957
|
t[4].x + /*geom*/
|
|
958
958
|
t[4].w - /*handleSize*/
|
|
959
|
-
t[3] / 2) && e(
|
|
959
|
+
t[3] / 2) && e(F, "x", ot), p & /*geom, handleSize*/
|
|
960
960
|
24 && et !== (et = /*geom*/
|
|
961
961
|
t[4].y - /*handleSize*/
|
|
962
|
-
t[3] / 2) && e(
|
|
962
|
+
t[3] / 2) && e(F, "y", et), p & /*handleSize*/
|
|
963
963
|
8 && e(
|
|
964
|
-
|
|
964
|
+
F,
|
|
965
965
|
"height",
|
|
966
966
|
/*handleSize*/
|
|
967
967
|
t[3]
|
|
968
|
-
),
|
|
968
|
+
), p & /*handleSize*/
|
|
969
969
|
8 && e(
|
|
970
|
-
|
|
970
|
+
F,
|
|
971
971
|
"width",
|
|
972
972
|
/*handleSize*/
|
|
973
973
|
t[3]
|
|
974
|
-
),
|
|
974
|
+
), p & /*geom, handleSize*/
|
|
975
975
|
24 && st !== (st = /*geom*/
|
|
976
976
|
t[4].x + /*geom*/
|
|
977
977
|
t[4].w - /*handleSize*/
|
|
978
|
-
t[3] / 2) && e(
|
|
978
|
+
t[3] / 2) && e(G, "x", st), p & /*geom, handleSize*/
|
|
979
979
|
24 && at !== (at = /*geom*/
|
|
980
980
|
t[4].y + /*geom*/
|
|
981
981
|
t[4].h - /*handleSize*/
|
|
982
|
-
t[3] / 2) && e(
|
|
982
|
+
t[3] / 2) && e(G, "y", at), p & /*handleSize*/
|
|
983
983
|
8 && e(
|
|
984
|
-
|
|
984
|
+
G,
|
|
985
985
|
"height",
|
|
986
986
|
/*handleSize*/
|
|
987
987
|
t[3]
|
|
988
|
-
),
|
|
988
|
+
), p & /*handleSize*/
|
|
989
989
|
8 && e(
|
|
990
|
-
|
|
990
|
+
G,
|
|
991
991
|
"width",
|
|
992
992
|
/*handleSize*/
|
|
993
993
|
t[3]
|
|
994
|
-
),
|
|
994
|
+
), p & /*geom, handleSize*/
|
|
995
995
|
24 && it !== (it = /*geom*/
|
|
996
996
|
t[4].x - /*handleSize*/
|
|
997
|
-
t[3] / 2) && e(
|
|
997
|
+
t[3] / 2) && e(H, "x", it), p & /*geom, handleSize*/
|
|
998
998
|
24 && ct !== (ct = /*geom*/
|
|
999
999
|
t[4].y + /*geom*/
|
|
1000
1000
|
t[4].h - /*handleSize*/
|
|
1001
|
-
t[3] / 2) && e(
|
|
1001
|
+
t[3] / 2) && e(H, "y", ct), p & /*handleSize*/
|
|
1002
1002
|
8 && e(
|
|
1003
|
-
|
|
1003
|
+
H,
|
|
1004
1004
|
"height",
|
|
1005
1005
|
/*handleSize*/
|
|
1006
1006
|
t[3]
|
|
1007
|
-
),
|
|
1007
|
+
), p & /*handleSize*/
|
|
1008
1008
|
8 && e(
|
|
1009
|
-
|
|
1009
|
+
H,
|
|
1010
1010
|
"width",
|
|
1011
1011
|
/*handleSize*/
|
|
1012
1012
|
t[3]
|
|
1013
1013
|
);
|
|
1014
1014
|
},
|
|
1015
1015
|
d(y) {
|
|
1016
|
-
y &&
|
|
1016
|
+
y && w(n), y && w(l), y && w(u), y && w(i), y && w(m), y && w(v), y && w(O), y && w(j), y && w(S), y && w(ht), y && w(R), y && w(ft), y && w(I), y && w(dt), y && w(F), y && w(mt), y && w(G), y && w(yt), y && w(H), gt = !1, z(Lt);
|
|
1017
1017
|
}
|
|
1018
1018
|
};
|
|
1019
1019
|
}
|
|
1020
1020
|
function jn(t) {
|
|
1021
1021
|
let n, r;
|
|
1022
|
-
return n = new
|
|
1022
|
+
return n = new qt({
|
|
1023
1023
|
props: {
|
|
1024
1024
|
shape: (
|
|
1025
1025
|
/*shape*/
|
|
@@ -1056,7 +1056,7 @@ function jn(t) {
|
|
|
1056
1056
|
t[9]
|
|
1057
1057
|
), {
|
|
1058
1058
|
c() {
|
|
1059
|
-
|
|
1059
|
+
zt(n.$$.fragment);
|
|
1060
1060
|
},
|
|
1061
1061
|
m(o, s) {
|
|
1062
1062
|
bt(n, o, s), r = !0;
|
|
@@ -1071,7 +1071,7 @@ function jn(t) {
|
|
|
1071
1071
|
3098 && (a.$$scope = { dirty: s, ctx: o }), n.$set(a);
|
|
1072
1072
|
},
|
|
1073
1073
|
i(o) {
|
|
1074
|
-
r || (
|
|
1074
|
+
r || (pt(n.$$.fragment, o), r = !0);
|
|
1075
1075
|
},
|
|
1076
1076
|
o(o) {
|
|
1077
1077
|
Ot(n.$$.fragment, o), r = !1;
|
|
@@ -1082,89 +1082,89 @@ function jn(t) {
|
|
|
1082
1082
|
};
|
|
1083
1083
|
}
|
|
1084
1084
|
function Xn(t, n, r) {
|
|
1085
|
-
let o, s, { shape: a } = n, { computedStyle: c = void 0 } = n, { transform: l } = n, { viewportScale:
|
|
1086
|
-
const
|
|
1085
|
+
let o, s, { shape: a } = n, { computedStyle: c = void 0 } = n, { transform: l } = n, { viewportScale: u = 1 } = n;
|
|
1086
|
+
const d = (i, m, h) => {
|
|
1087
1087
|
const E = i.geometry.bounds;
|
|
1088
|
-
let [
|
|
1089
|
-
const [
|
|
1090
|
-
if (
|
|
1091
|
-
|
|
1088
|
+
let [_, v] = [E.minX, E.minY], [O, N] = [E.maxX, E.maxY];
|
|
1089
|
+
const [B, k] = h;
|
|
1090
|
+
if (m === f.SHAPE)
|
|
1091
|
+
_ += B, O += B, v += k, N += k;
|
|
1092
1092
|
else {
|
|
1093
|
-
switch (
|
|
1094
|
-
case
|
|
1095
|
-
case
|
|
1096
|
-
case
|
|
1093
|
+
switch (m) {
|
|
1094
|
+
case f.TOP:
|
|
1095
|
+
case f.TOP_LEFT:
|
|
1096
|
+
case f.TOP_RIGHT: {
|
|
1097
1097
|
v += k;
|
|
1098
1098
|
break;
|
|
1099
1099
|
}
|
|
1100
|
-
case
|
|
1101
|
-
case
|
|
1102
|
-
case
|
|
1103
|
-
|
|
1100
|
+
case f.BOTTOM:
|
|
1101
|
+
case f.BOTTOM_LEFT:
|
|
1102
|
+
case f.BOTTOM_RIGHT: {
|
|
1103
|
+
N += k;
|
|
1104
1104
|
break;
|
|
1105
1105
|
}
|
|
1106
1106
|
}
|
|
1107
|
-
switch (
|
|
1108
|
-
case
|
|
1109
|
-
case
|
|
1110
|
-
case
|
|
1111
|
-
|
|
1107
|
+
switch (m) {
|
|
1108
|
+
case f.LEFT:
|
|
1109
|
+
case f.TOP_LEFT:
|
|
1110
|
+
case f.BOTTOM_LEFT: {
|
|
1111
|
+
_ += B;
|
|
1112
1112
|
break;
|
|
1113
1113
|
}
|
|
1114
|
-
case
|
|
1115
|
-
case
|
|
1116
|
-
case
|
|
1117
|
-
O +=
|
|
1114
|
+
case f.RIGHT:
|
|
1115
|
+
case f.TOP_RIGHT:
|
|
1116
|
+
case f.BOTTOM_RIGHT: {
|
|
1117
|
+
O += B;
|
|
1118
1118
|
break;
|
|
1119
1119
|
}
|
|
1120
1120
|
}
|
|
1121
1121
|
}
|
|
1122
|
-
const j = Math.min(
|
|
1122
|
+
const j = Math.min(_, O), S = Math.min(v, N), X = Math.abs(O - _), D = Math.abs(N - v);
|
|
1123
1123
|
return {
|
|
1124
1124
|
...i,
|
|
1125
1125
|
geometry: {
|
|
1126
1126
|
x: j,
|
|
1127
1127
|
y: S,
|
|
1128
1128
|
w: X,
|
|
1129
|
-
h:
|
|
1129
|
+
h: D,
|
|
1130
1130
|
bounds: {
|
|
1131
1131
|
minX: j,
|
|
1132
1132
|
minY: S,
|
|
1133
1133
|
maxX: j + X,
|
|
1134
|
-
maxY: S +
|
|
1134
|
+
maxY: S + D
|
|
1135
1135
|
}
|
|
1136
1136
|
}
|
|
1137
1137
|
};
|
|
1138
1138
|
};
|
|
1139
|
-
function
|
|
1140
|
-
|
|
1139
|
+
function x(i) {
|
|
1140
|
+
q.call(this, t, i);
|
|
1141
1141
|
}
|
|
1142
1142
|
function $(i) {
|
|
1143
|
-
|
|
1143
|
+
q.call(this, t, i);
|
|
1144
1144
|
}
|
|
1145
|
-
function
|
|
1146
|
-
|
|
1145
|
+
function g(i) {
|
|
1146
|
+
q.call(this, t, i);
|
|
1147
1147
|
}
|
|
1148
1148
|
return t.$$set = (i) => {
|
|
1149
|
-
"shape" in i && r(0, a = i.shape), "computedStyle" in i && r(1, c = i.computedStyle), "transform" in i && r(2, l = i.transform), "viewportScale" in i && r(6,
|
|
1149
|
+
"shape" in i && r(0, a = i.shape), "computedStyle" in i && r(1, c = i.computedStyle), "transform" in i && r(2, l = i.transform), "viewportScale" in i && r(6, u = i.viewportScale);
|
|
1150
1150
|
}, t.$$.update = () => {
|
|
1151
1151
|
t.$$.dirty & /*shape*/
|
|
1152
1152
|
1 && r(4, o = a.geometry), t.$$.dirty & /*viewportScale*/
|
|
1153
|
-
64 && r(3, s = 10 /
|
|
1153
|
+
64 && r(3, s = 10 / u);
|
|
1154
1154
|
}, [
|
|
1155
1155
|
a,
|
|
1156
1156
|
c,
|
|
1157
1157
|
l,
|
|
1158
1158
|
s,
|
|
1159
1159
|
o,
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1160
|
+
d,
|
|
1161
|
+
u,
|
|
1162
|
+
x,
|
|
1163
1163
|
$,
|
|
1164
|
-
|
|
1164
|
+
g
|
|
1165
1165
|
];
|
|
1166
1166
|
}
|
|
1167
|
-
class
|
|
1167
|
+
class Dn extends Pt {
|
|
1168
1168
|
constructor(n) {
|
|
1169
1169
|
super(), vt(this, n, Xn, jn, Et, {
|
|
1170
1170
|
shape: 0,
|
|
@@ -1174,39 +1174,39 @@ class Pn extends _t {
|
|
|
1174
1174
|
});
|
|
1175
1175
|
}
|
|
1176
1176
|
}
|
|
1177
|
-
|
|
1178
|
-
const
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
const
|
|
1177
|
+
U.RECTANGLE, U.POLYGON;
|
|
1178
|
+
const f = (t) => `HANDLE-${t}`;
|
|
1179
|
+
f.SHAPE = "SHAPE";
|
|
1180
|
+
f.TOP = "TOP";
|
|
1181
|
+
f.RIGHT = "RIGHT";
|
|
1182
|
+
f.BOTTOM = "BOTTOM";
|
|
1183
|
+
f.LEFT = "LEFT";
|
|
1184
|
+
f.TOP_LEFT = "TOP_LEFT";
|
|
1185
|
+
f.TOP_RIGHT = "TOP_RIGHT";
|
|
1186
|
+
f.BOTTOM_RIGHT = "BOTTOM_RIGHT";
|
|
1187
|
+
f.BOTTOM_LEFT = "BOTTOM_LEFT";
|
|
1188
|
+
const zn = (t) => ({}), Bt = (t) => ({ grab: (
|
|
1189
1189
|
/*onGrab*/
|
|
1190
1190
|
t[0]
|
|
1191
1191
|
) });
|
|
1192
|
-
function
|
|
1192
|
+
function Vn(t) {
|
|
1193
1193
|
let n, r, o, s;
|
|
1194
1194
|
const a = (
|
|
1195
1195
|
/*#slots*/
|
|
1196
1196
|
t[7].default
|
|
1197
|
-
), c =
|
|
1197
|
+
), c = Zt(
|
|
1198
1198
|
a,
|
|
1199
1199
|
t,
|
|
1200
1200
|
/*$$scope*/
|
|
1201
1201
|
t[6],
|
|
1202
|
-
|
|
1202
|
+
Bt
|
|
1203
1203
|
);
|
|
1204
1204
|
return {
|
|
1205
1205
|
c() {
|
|
1206
1206
|
n = L("g"), c && c.c(), e(n, "class", "a9s-annotation selected");
|
|
1207
1207
|
},
|
|
1208
|
-
m(l,
|
|
1209
|
-
|
|
1208
|
+
m(l, u) {
|
|
1209
|
+
T(l, n, u), c && c.m(n, null), r = !0, o || (s = [
|
|
1210
1210
|
A(
|
|
1211
1211
|
n,
|
|
1212
1212
|
"pointerup",
|
|
@@ -1221,9 +1221,9 @@ function zn(t) {
|
|
|
1221
1221
|
)
|
|
1222
1222
|
], o = !0);
|
|
1223
1223
|
},
|
|
1224
|
-
p(l, [
|
|
1225
|
-
c && c.p && (!r ||
|
|
1226
|
-
64) &&
|
|
1224
|
+
p(l, [u]) {
|
|
1225
|
+
c && c.p && (!r || u & /*$$scope*/
|
|
1226
|
+
64) && Mt(
|
|
1227
1227
|
c,
|
|
1228
1228
|
a,
|
|
1229
1229
|
l,
|
|
@@ -1233,67 +1233,65 @@ function zn(t) {
|
|
|
1233
1233
|
a,
|
|
1234
1234
|
/*$$scope*/
|
|
1235
1235
|
l[6],
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
) :
|
|
1236
|
+
u,
|
|
1237
|
+
zn
|
|
1238
|
+
) : Yt(
|
|
1239
1239
|
/*$$scope*/
|
|
1240
1240
|
l[6]
|
|
1241
1241
|
),
|
|
1242
|
-
|
|
1242
|
+
Bt
|
|
1243
1243
|
);
|
|
1244
1244
|
},
|
|
1245
1245
|
i(l) {
|
|
1246
|
-
r || (
|
|
1246
|
+
r || (pt(c, l), r = !0);
|
|
1247
1247
|
},
|
|
1248
1248
|
o(l) {
|
|
1249
1249
|
Ot(c, l), r = !1;
|
|
1250
1250
|
},
|
|
1251
1251
|
d(l) {
|
|
1252
|
-
l &&
|
|
1252
|
+
l && w(n), c && c.d(l), o = !1, z(s);
|
|
1253
1253
|
}
|
|
1254
1254
|
};
|
|
1255
1255
|
}
|
|
1256
|
-
function
|
|
1256
|
+
function Wn(t, n, r) {
|
|
1257
1257
|
let { $$slots: o = {}, $$scope: s } = n;
|
|
1258
1258
|
const a = sn();
|
|
1259
|
-
let { shape: c } = n, { editor: l } = n, { transform:
|
|
1260
|
-
const
|
|
1261
|
-
|
|
1259
|
+
let { shape: c } = n, { editor: l } = n, { transform: u } = n, d = null, x, $ = null;
|
|
1260
|
+
const g = (h) => (E) => {
|
|
1261
|
+
d = h, x = u.elementToImage(E.offsetX, E.offsetY), $ = c, E.target.setPointerCapture(E.pointerId), a("grab");
|
|
1262
1262
|
}, i = (h) => {
|
|
1263
|
-
if (
|
|
1264
|
-
const [E,
|
|
1265
|
-
r(3, c = l($,
|
|
1263
|
+
if (d) {
|
|
1264
|
+
const [E, _] = u.elementToImage(h.offsetX, h.offsetY), v = [E - x[0], _ - x[1]];
|
|
1265
|
+
r(3, c = l($, d, v)), a("change", c);
|
|
1266
1266
|
}
|
|
1267
|
-
},
|
|
1268
|
-
h.target.releasePointerCapture(h.pointerId),
|
|
1267
|
+
}, m = (h) => {
|
|
1268
|
+
h.target.releasePointerCapture(h.pointerId), d = null, $ = c, a("release");
|
|
1269
1269
|
};
|
|
1270
1270
|
return t.$$set = (h) => {
|
|
1271
|
-
"shape" in h && r(3, c = h.shape), "editor" in h && r(4, l = h.editor), "transform" in h && r(5,
|
|
1272
|
-
}, [
|
|
1271
|
+
"shape" in h && r(3, c = h.shape), "editor" in h && r(4, l = h.editor), "transform" in h && r(5, u = h.transform), "$$scope" in h && r(6, s = h.$$scope);
|
|
1272
|
+
}, [g, i, m, c, l, u, s, o];
|
|
1273
1273
|
}
|
|
1274
|
-
class
|
|
1274
|
+
class qt extends Pt {
|
|
1275
1275
|
constructor(n) {
|
|
1276
|
-
super(), vt(this, n,
|
|
1276
|
+
super(), vt(this, n, Wn, Vn, Et, { shape: 3, editor: 4, transform: 5 });
|
|
1277
1277
|
}
|
|
1278
1278
|
}
|
|
1279
1279
|
navigator.userAgent.indexOf("Mac OS X");
|
|
1280
|
-
let Wn = (t = 21) => crypto.getRandomValues(new Uint8Array(t)).reduce((n, r) => (r &= 63, r < 36 ? n += r.toString(36) : r < 62 ? n += (r - 26).toString(36).toUpperCase() : r > 62 ? n += "-" : n += "_", n), "");
|
|
1281
|
-
Wn();
|
|
1282
1280
|
export {
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1281
|
+
qt as Editor,
|
|
1282
|
+
f as Handle,
|
|
1283
|
+
Bn as PolygonEditor,
|
|
1284
|
+
Dn as RectangleEditor,
|
|
1285
|
+
mn as RectangleUtil,
|
|
1286
|
+
U as ShapeType,
|
|
1289
1287
|
qn as W3CImageFormat,
|
|
1290
|
-
|
|
1288
|
+
Vt as boundsFromPoints,
|
|
1291
1289
|
yn as parseFragmentSelector,
|
|
1292
1290
|
En as parseSVGSelector,
|
|
1293
|
-
|
|
1291
|
+
Hn as parseW3CImageAnnotation,
|
|
1294
1292
|
At as registerShapeUtil,
|
|
1295
|
-
|
|
1293
|
+
gn as serializeFragmentSelector,
|
|
1296
1294
|
On as serializeSVGSelector,
|
|
1297
|
-
|
|
1295
|
+
Rn as serializeW3CImageAnnotation
|
|
1298
1296
|
};
|
|
1299
1297
|
//# sourceMappingURL=annotorious-svelte.es5.js.map
|