@annotorious/annotorious 3.0.0-rc.19 → 3.0.0-rc.20
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.d.ts +3 -0
- package/dist/Annotorious.d.ts.map +1 -1
- package/dist/AnnotoriousOpts.d.ts.map +1 -1
- package/dist/annotorious.es.js +528 -523
- package/dist/annotorious.es.js.map +1 -1
- package/dist/annotorious.js +1 -1
- package/dist/annotorious.js.map +1 -1
- package/dist/keyboardCommands.d.ts.map +1 -1
- package/dist/model/w3c/svg/SVGSelector.d.ts.map +1 -1
- package/dist/state/ImageAnnotatorState.d.ts.map +1 -1
- package/package.json +8 -9
package/dist/annotorious.es.js
CHANGED
|
@@ -96,17 +96,17 @@ const fn = typeof window < "u" ? window : typeof globalThis < "u" ? globalThis :
|
|
|
96
96
|
function se(e, t) {
|
|
97
97
|
e.appendChild(t);
|
|
98
98
|
}
|
|
99
|
-
function
|
|
99
|
+
function O(e, t, n) {
|
|
100
100
|
e.insertBefore(t, n || null);
|
|
101
101
|
}
|
|
102
|
-
function
|
|
102
|
+
function L(e) {
|
|
103
103
|
e.parentNode && e.parentNode.removeChild(e);
|
|
104
104
|
}
|
|
105
105
|
function rt(e, t) {
|
|
106
106
|
for (let n = 0; n < e.length; n += 1)
|
|
107
107
|
e[n] && e[n].d(t);
|
|
108
108
|
}
|
|
109
|
-
function
|
|
109
|
+
function R(e) {
|
|
110
110
|
return document.createElementNS("http://www.w3.org/2000/svg", e);
|
|
111
111
|
}
|
|
112
112
|
function zt(e) {
|
|
@@ -231,7 +231,7 @@ function le() {
|
|
|
231
231
|
function P(e, t) {
|
|
232
232
|
e && e.i && (Ve.delete(e), e.i(t));
|
|
233
233
|
}
|
|
234
|
-
function
|
|
234
|
+
function D(e, t, n, o) {
|
|
235
235
|
if (e && e.o) {
|
|
236
236
|
if (Ve.has(e))
|
|
237
237
|
return;
|
|
@@ -293,7 +293,7 @@ function ee(e, t, n, o, i, s, r = null, l = [-1]) {
|
|
|
293
293
|
}) : [], c.update(), u = !0, ae(c.before_update), c.fragment = o ? o(c.ctx) : !1, t.target) {
|
|
294
294
|
if (t.hydrate) {
|
|
295
295
|
const f = un(t.target);
|
|
296
|
-
c.fragment && c.fragment.l(f), f.forEach(
|
|
296
|
+
c.fragment && c.fragment.l(f), f.forEach(L);
|
|
297
297
|
} else
|
|
298
298
|
c.fragment && c.fragment.c();
|
|
299
299
|
t.intro && P(e.$$.fragment), Q(e, t.target, t.anchor), Ft();
|
|
@@ -487,8 +487,8 @@ for (let e = 0; e < 256; ++e)
|
|
|
487
487
|
function Yn(e, t = 0) {
|
|
488
488
|
return K[e[t + 0]] + K[e[t + 1]] + K[e[t + 2]] + K[e[t + 3]] + "-" + K[e[t + 4]] + K[e[t + 5]] + "-" + K[e[t + 6]] + K[e[t + 7]] + "-" + K[e[t + 8]] + K[e[t + 9]] + "-" + K[e[t + 10]] + K[e[t + 11]] + K[e[t + 12]] + K[e[t + 13]] + K[e[t + 14]] + K[e[t + 15]];
|
|
489
489
|
}
|
|
490
|
-
const
|
|
491
|
-
randomUUID:
|
|
490
|
+
const Cn = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), yt = {
|
|
491
|
+
randomUUID: Cn
|
|
492
492
|
};
|
|
493
493
|
function qt(e, t, n) {
|
|
494
494
|
if (yt.randomUUID && !t && !e)
|
|
@@ -531,7 +531,7 @@ function he(e, t) {
|
|
|
531
531
|
}
|
|
532
532
|
function Je() {
|
|
533
533
|
}
|
|
534
|
-
function
|
|
534
|
+
function Dn(e, t) {
|
|
535
535
|
return e != e ? t == t : e !== t || e && typeof e == "object" || typeof e == "function";
|
|
536
536
|
}
|
|
537
537
|
const ye = [];
|
|
@@ -539,7 +539,7 @@ function ct(e, t = Je) {
|
|
|
539
539
|
let n;
|
|
540
540
|
const o = /* @__PURE__ */ new Set();
|
|
541
541
|
function i(l) {
|
|
542
|
-
if (
|
|
542
|
+
if (Dn(e, l) && (e = l, n)) {
|
|
543
543
|
const a = !ye.length;
|
|
544
544
|
for (const c of o)
|
|
545
545
|
c[1](), ye.push(c, e);
|
|
@@ -561,7 +561,7 @@ function ct(e, t = Je) {
|
|
|
561
561
|
}
|
|
562
562
|
return { set: i, update: s, subscribe: r };
|
|
563
563
|
}
|
|
564
|
-
const
|
|
564
|
+
const Xn = (e) => {
|
|
565
565
|
const { subscribe: t, set: n } = ct();
|
|
566
566
|
let o;
|
|
567
567
|
return t((i) => o = i), e.observe(({ changes: i }) => {
|
|
@@ -709,19 +709,19 @@ const Fn = (e, t) => {
|
|
|
709
709
|
throw Error(`Cannot add annotation ${p.id} - exists already`);
|
|
710
710
|
e.set(p.id, p), p.bodies.forEach((S) => t.set(S.id, p.id)), s(T, { created: [p] });
|
|
711
711
|
}, l = (p, T) => {
|
|
712
|
-
const S = typeof p == "string" ? T : p, M = typeof p == "string" ? p : p.id,
|
|
713
|
-
if (
|
|
714
|
-
const
|
|
715
|
-
return M === S.id ? e.set(M, S) : (e.delete(M), e.set(S.id, S)),
|
|
712
|
+
const S = typeof p == "string" ? T : p, M = typeof p == "string" ? p : p.id, k = e.get(M);
|
|
713
|
+
if (k) {
|
|
714
|
+
const C = Wt(k, S);
|
|
715
|
+
return M === S.id ? e.set(M, S) : (e.delete(M), e.set(S.id, S)), k.bodies.forEach((Z) => t.delete(Z.id)), S.bodies.forEach((Z) => t.set(Z.id, S.id)), C;
|
|
716
716
|
} else
|
|
717
717
|
console.warn(`Cannot update annotation ${M} - does not exist`);
|
|
718
718
|
}, a = (p, T = G.LOCAL, S = G.LOCAL) => {
|
|
719
|
-
const M = qn(T) ? S : T,
|
|
720
|
-
|
|
719
|
+
const M = qn(T) ? S : T, k = l(p, T);
|
|
720
|
+
k && s(M, { updated: [k] });
|
|
721
721
|
}, c = (p, T = G.LOCAL) => {
|
|
722
|
-
const S = p.reduce((M,
|
|
723
|
-
const
|
|
724
|
-
return
|
|
722
|
+
const S = p.reduce((M, k) => {
|
|
723
|
+
const C = l(k);
|
|
724
|
+
return C ? [...M, C] : M;
|
|
725
725
|
}, []);
|
|
726
726
|
S.length > 0 && s(T, { updated: S });
|
|
727
727
|
}, u = (p, T = G.LOCAL) => {
|
|
@@ -744,18 +744,18 @@ const Fn = (e, t) => {
|
|
|
744
744
|
}, g = (p, T = !0, S = G.LOCAL) => {
|
|
745
745
|
if (T) {
|
|
746
746
|
const M = [...e.values()];
|
|
747
|
-
e.clear(), t.clear(), p.forEach((
|
|
748
|
-
e.set(
|
|
747
|
+
e.clear(), t.clear(), p.forEach((k) => {
|
|
748
|
+
e.set(k.id, k), k.bodies.forEach((C) => t.set(C.id, k.id));
|
|
749
749
|
}), s(S, { created: p, deleted: M });
|
|
750
750
|
} else {
|
|
751
|
-
const M = p.reduce((
|
|
752
|
-
const Z = e.get(
|
|
753
|
-
return Z ? [...
|
|
751
|
+
const M = p.reduce((k, C) => {
|
|
752
|
+
const Z = e.get(C.id);
|
|
753
|
+
return Z ? [...k, Z] : k;
|
|
754
754
|
}, []);
|
|
755
755
|
if (M.length > 0)
|
|
756
|
-
throw Error(`Bulk insert would overwrite the following annotations: ${M.map((
|
|
757
|
-
p.forEach((
|
|
758
|
-
e.set(
|
|
756
|
+
throw Error(`Bulk insert would overwrite the following annotations: ${M.map((k) => k.id).join(", ")}`);
|
|
757
|
+
p.forEach((k) => {
|
|
758
|
+
e.set(k.id, k), k.bodies.forEach((C) => t.set(C.id, k.id));
|
|
759
759
|
}), s(S, { created: p });
|
|
760
760
|
}
|
|
761
761
|
}, m = (p) => {
|
|
@@ -766,66 +766,66 @@ const Fn = (e, t) => {
|
|
|
766
766
|
}, _ = (p, T = G.LOCAL) => {
|
|
767
767
|
const S = m(p);
|
|
768
768
|
S && s(T, { deleted: [S] });
|
|
769
|
-
},
|
|
770
|
-
const S = p.reduce((M,
|
|
771
|
-
const
|
|
772
|
-
return
|
|
769
|
+
}, b = (p, T = G.LOCAL) => {
|
|
770
|
+
const S = p.reduce((M, k) => {
|
|
771
|
+
const C = m(k);
|
|
772
|
+
return C ? [...M, C] : M;
|
|
773
773
|
}, []);
|
|
774
774
|
S.length > 0 && s(T, { deleted: S });
|
|
775
775
|
}, y = (p, T = G.LOCAL) => {
|
|
776
776
|
const S = e.get(p.annotation);
|
|
777
777
|
if (S) {
|
|
778
|
-
const M = S.bodies.find((
|
|
778
|
+
const M = S.bodies.find((k) => k.id === p.id);
|
|
779
779
|
if (M) {
|
|
780
780
|
t.delete(M.id);
|
|
781
|
-
const
|
|
781
|
+
const k = {
|
|
782
782
|
...S,
|
|
783
|
-
bodies: S.bodies.filter((
|
|
783
|
+
bodies: S.bodies.filter((C) => C.id !== p.id)
|
|
784
784
|
};
|
|
785
|
-
e.set(S.id,
|
|
785
|
+
e.set(S.id, k), s(T, { updated: [{
|
|
786
786
|
oldValue: S,
|
|
787
|
-
newValue:
|
|
787
|
+
newValue: k,
|
|
788
788
|
bodiesDeleted: [M]
|
|
789
789
|
}] });
|
|
790
790
|
} else
|
|
791
791
|
console.warn(`Attempt to delete missing body ${p.id} from annotation ${p.annotation}`);
|
|
792
792
|
} else
|
|
793
793
|
console.warn(`Attempt to delete body from missing annotation ${p.annotation}`);
|
|
794
|
-
},
|
|
794
|
+
}, A = (p) => {
|
|
795
795
|
const T = e.get(p);
|
|
796
796
|
return T ? { ...T } : void 0;
|
|
797
|
-
},
|
|
797
|
+
}, w = (p) => {
|
|
798
798
|
const T = t.get(p);
|
|
799
799
|
if (T) {
|
|
800
|
-
const S =
|
|
800
|
+
const S = A(T).bodies.find((M) => M.id === p);
|
|
801
801
|
if (S)
|
|
802
802
|
return S;
|
|
803
803
|
console.error(`Store integrity error: body ${p} in index, but not in annotation`);
|
|
804
804
|
} else
|
|
805
805
|
console.warn(`Attempt to retrieve missing body: ${p}`);
|
|
806
|
-
},
|
|
806
|
+
}, E = (p, T) => {
|
|
807
807
|
if (p.annotation !== T.annotation)
|
|
808
808
|
throw "Annotation integrity violation: annotation ID must be the same when updating bodies";
|
|
809
809
|
const S = e.get(p.annotation);
|
|
810
810
|
if (S) {
|
|
811
|
-
const M = S.bodies.find((
|
|
811
|
+
const M = S.bodies.find((C) => C.id === p.id), k = {
|
|
812
812
|
...S,
|
|
813
|
-
bodies: S.bodies.map((
|
|
813
|
+
bodies: S.bodies.map((C) => C.id === M.id ? T : C)
|
|
814
814
|
};
|
|
815
|
-
return e.set(S.id,
|
|
815
|
+
return e.set(S.id, k), M.id !== T.id && (t.delete(M.id), t.set(T.id, k.id)), {
|
|
816
816
|
oldValue: S,
|
|
817
|
-
newValue:
|
|
817
|
+
newValue: k,
|
|
818
818
|
bodiesUpdated: [{ oldBody: M, newBody: T }]
|
|
819
819
|
};
|
|
820
820
|
} else
|
|
821
821
|
console.warn(`Attempt to add body to missing annotation ${p.annotation}`);
|
|
822
|
-
},
|
|
823
|
-
const M =
|
|
822
|
+
}, B = (p, T, S = G.LOCAL) => {
|
|
823
|
+
const M = E(p, T);
|
|
824
824
|
M && s(S, { updated: [M] });
|
|
825
|
-
},
|
|
826
|
-
const S = p.map((M) =>
|
|
825
|
+
}, U = (p, T = G.LOCAL) => {
|
|
826
|
+
const S = p.map((M) => E({ id: M.id, annotation: M.annotation }, M)).filter(Boolean);
|
|
827
827
|
s(T, { updated: S });
|
|
828
|
-
},
|
|
828
|
+
}, X = (p) => {
|
|
829
829
|
const T = e.get(p.annotation);
|
|
830
830
|
if (T) {
|
|
831
831
|
const S = {
|
|
@@ -851,24 +851,24 @@ const Fn = (e, t) => {
|
|
|
851
851
|
addBody: u,
|
|
852
852
|
all: f,
|
|
853
853
|
bulkAddAnnotation: g,
|
|
854
|
-
bulkDeleteAnnotation:
|
|
854
|
+
bulkDeleteAnnotation: b,
|
|
855
855
|
bulkUpdateAnnotation: c,
|
|
856
|
-
bulkUpdateBodies:
|
|
856
|
+
bulkUpdateBodies: U,
|
|
857
857
|
bulkUpdateTargets: (p, T = G.LOCAL) => {
|
|
858
|
-
const S = p.map((M) =>
|
|
858
|
+
const S = p.map((M) => X(M)).filter(Boolean);
|
|
859
859
|
S.length > 0 && s(T, { updated: S });
|
|
860
860
|
},
|
|
861
861
|
clear: h,
|
|
862
862
|
deleteAnnotation: _,
|
|
863
863
|
deleteBody: y,
|
|
864
|
-
getAnnotation:
|
|
865
|
-
getBody:
|
|
864
|
+
getAnnotation: A,
|
|
865
|
+
getBody: w,
|
|
866
866
|
observe: o,
|
|
867
867
|
unobserve: i,
|
|
868
868
|
updateAnnotation: a,
|
|
869
|
-
updateBody:
|
|
869
|
+
updateBody: B,
|
|
870
870
|
updateTarget: (p, T = G.LOCAL) => {
|
|
871
|
-
const S =
|
|
871
|
+
const S = X(p);
|
|
872
872
|
S && s(T, { updated: [S] });
|
|
873
873
|
}
|
|
874
874
|
};
|
|
@@ -902,8 +902,8 @@ const Zn = 250, Qn = (e) => {
|
|
|
902
902
|
if (_ - s > Zn)
|
|
903
903
|
n.splice(o + 1), n.push(m), o = n.length - 1;
|
|
904
904
|
else {
|
|
905
|
-
const
|
|
906
|
-
n[
|
|
905
|
+
const b = n.length - 1;
|
|
906
|
+
n[b] = jn(n[b], m);
|
|
907
907
|
}
|
|
908
908
|
s = _;
|
|
909
909
|
}
|
|
@@ -940,75 +940,75 @@ const Zn = 250, Qn = (e) => {
|
|
|
940
940
|
}, $n = (e, t, n, o) => {
|
|
941
941
|
const { store: i, selection: s, hover: r, viewport: l } = e, a = /* @__PURE__ */ new Map();
|
|
942
942
|
let c = [], u, f;
|
|
943
|
-
const h = (y,
|
|
944
|
-
a.has(y) ? a.get(y).push(
|
|
945
|
-
}, g = (y,
|
|
946
|
-
const
|
|
947
|
-
|
|
948
|
-
}, m = (y,
|
|
943
|
+
const h = (y, A) => {
|
|
944
|
+
a.has(y) ? a.get(y).push(A) : a.set(y, [A]);
|
|
945
|
+
}, g = (y, A) => {
|
|
946
|
+
const w = a.get(y);
|
|
947
|
+
w && w.indexOf(A) > 0 && w.splice(w.indexOf(A), 1);
|
|
948
|
+
}, m = (y, A, w) => {
|
|
949
949
|
a.has(y) && setTimeout(() => {
|
|
950
|
-
a.get(y).forEach((
|
|
950
|
+
a.get(y).forEach((E) => {
|
|
951
951
|
if (n) {
|
|
952
|
-
const
|
|
953
|
-
|
|
952
|
+
const B = Array.isArray(A) ? A.map((X) => n.serialize(X)) : n.serialize(A), U = w ? w instanceof PointerEvent ? w : n.serialize(w) : void 0;
|
|
953
|
+
E(B, U);
|
|
954
954
|
} else
|
|
955
|
-
A
|
|
955
|
+
E(A, w);
|
|
956
956
|
});
|
|
957
957
|
}, 1);
|
|
958
958
|
}, _ = () => {
|
|
959
|
-
const { selected: y } = s,
|
|
960
|
-
|
|
961
|
-
const
|
|
962
|
-
(!
|
|
963
|
-
}), c = c.map((
|
|
959
|
+
const { selected: y } = s, A = (y || []).map(({ id: w }) => i.getAnnotation(w));
|
|
960
|
+
A.forEach((w) => {
|
|
961
|
+
const E = c.find((B) => B.id === w.id);
|
|
962
|
+
(!E || !he(E, w)) && m("updateAnnotation", w, E);
|
|
963
|
+
}), c = c.map((w) => A.find(({ id: B }) => B === w.id) || w);
|
|
964
964
|
};
|
|
965
965
|
s.subscribe(({ selected: y }) => {
|
|
966
966
|
if (!(c.length === 0 && y.length === 0)) {
|
|
967
967
|
if (c.length === 0 && y.length > 0)
|
|
968
|
-
c = y.map(({ id:
|
|
968
|
+
c = y.map(({ id: A }) => i.getAnnotation(A));
|
|
969
969
|
else if (c.length > 0 && y.length === 0)
|
|
970
|
-
c.forEach((
|
|
971
|
-
const
|
|
972
|
-
|
|
970
|
+
c.forEach((A) => {
|
|
971
|
+
const w = i.getAnnotation(A.id);
|
|
972
|
+
w && !he(w, A) && m("updateAnnotation", w, A);
|
|
973
973
|
}), c = [];
|
|
974
974
|
else {
|
|
975
|
-
const
|
|
976
|
-
c.filter((
|
|
977
|
-
const
|
|
978
|
-
|
|
975
|
+
const A = new Set(c.map((E) => E.id)), w = new Set(y.map(({ id: E }) => E));
|
|
976
|
+
c.filter((E) => !w.has(E.id)).forEach((E) => {
|
|
977
|
+
const B = i.getAnnotation(E.id);
|
|
978
|
+
B && !he(B, E) && m("updateAnnotation", B, E);
|
|
979
979
|
}), c = [
|
|
980
980
|
// Remove annotations that were deselected
|
|
981
|
-
...c.filter((
|
|
981
|
+
...c.filter((E) => w.has(E.id)),
|
|
982
982
|
// Add editable annotations that were selected
|
|
983
|
-
...y.filter(({ id:
|
|
983
|
+
...y.filter(({ id: E }) => !A.has(E)).map(({ id: E }) => i.getAnnotation(E))
|
|
984
984
|
];
|
|
985
985
|
}
|
|
986
986
|
m("selectionChanged", c);
|
|
987
987
|
}
|
|
988
988
|
}), r.subscribe((y) => {
|
|
989
989
|
!u && y ? m("mouseEnterAnnotation", i.getAnnotation(y)) : u && !y ? m("mouseLeaveAnnotation", i.getAnnotation(u)) : u && y && (m("mouseLeaveAnnotation", i.getAnnotation(u)), m("mouseEnterAnnotation", i.getAnnotation(y))), u = y;
|
|
990
|
-
}), l == null || l.subscribe((y) => m("viewportIntersect", y.map((
|
|
990
|
+
}), l == null || l.subscribe((y) => m("viewportIntersect", y.map((A) => i.getAnnotation(A)))), i.observe((y) => {
|
|
991
991
|
o && (f && clearTimeout(f), f = setTimeout(_, 1e3));
|
|
992
|
-
const { created:
|
|
993
|
-
(
|
|
994
|
-
...
|
|
995
|
-
...
|
|
996
|
-
...
|
|
997
|
-
].length > 0).forEach(({ oldValue:
|
|
998
|
-
const
|
|
999
|
-
c = c.map((
|
|
992
|
+
const { created: A, deleted: w } = y.changes;
|
|
993
|
+
(A || []).forEach((E) => m("createAnnotation", E)), (w || []).forEach((E) => m("deleteAnnotation", E)), (y.changes.updated || []).filter((E) => [
|
|
994
|
+
...E.bodiesCreated || [],
|
|
995
|
+
...E.bodiesDeleted || [],
|
|
996
|
+
...E.bodiesUpdated || []
|
|
997
|
+
].length > 0).forEach(({ oldValue: E, newValue: B }) => {
|
|
998
|
+
const U = c.find((X) => X.id === E.id) || E;
|
|
999
|
+
c = c.map((X) => X.id === E.id ? B : X), m("updateAnnotation", B, U);
|
|
1000
1000
|
});
|
|
1001
1001
|
}, { origin: G.LOCAL }), i.observe((y) => {
|
|
1002
1002
|
if (c) {
|
|
1003
|
-
const
|
|
1004
|
-
|
|
1003
|
+
const A = new Set(c.map((E) => E.id)), w = (y.changes.updated || []).filter(({ newValue: E }) => A.has(E.id)).map(({ newValue: E }) => E);
|
|
1004
|
+
w.length > 0 && (c = c.map((E) => w.find((U) => U.id === E.id) || E));
|
|
1005
1005
|
}
|
|
1006
1006
|
}, { origin: G.REMOTE });
|
|
1007
|
-
const
|
|
1008
|
-
const {
|
|
1009
|
-
|
|
1007
|
+
const b = (y) => (A) => {
|
|
1008
|
+
const { updated: w } = A;
|
|
1009
|
+
y ? (w || []).forEach((E) => m("updateAnnotation", E.oldValue, E.newValue)) : (w || []).forEach((E) => m("updateAnnotation", E.newValue, E.oldValue));
|
|
1010
1010
|
};
|
|
1011
|
-
return t.on("undo",
|
|
1011
|
+
return t.on("undo", b(!0)), t.on("redo", b(!1)), { on: h, off: g, emit: m };
|
|
1012
1012
|
}, eo = (e) => (t) => t.reduce((n, o) => {
|
|
1013
1013
|
const { parsed: i, error: s } = e.parse(o);
|
|
1014
1014
|
return s ? {
|
|
@@ -1021,44 +1021,44 @@ const Zn = 250, Qn = (e) => {
|
|
|
1021
1021
|
...n
|
|
1022
1022
|
};
|
|
1023
1023
|
}, { parsed: [], failed: [] }), to = (e, t, n) => {
|
|
1024
|
-
const { store: o, selection: i } = e, s = (
|
|
1024
|
+
const { store: o, selection: i } = e, s = (b) => {
|
|
1025
1025
|
if (n) {
|
|
1026
|
-
const { parsed: y, error:
|
|
1027
|
-
y ? o.addAnnotation(y, G.REMOTE) : console.error(
|
|
1026
|
+
const { parsed: y, error: A } = n.parse(b);
|
|
1027
|
+
y ? o.addAnnotation(y, G.REMOTE) : console.error(A);
|
|
1028
1028
|
} else
|
|
1029
|
-
o.addAnnotation(
|
|
1030
|
-
}, r = () => i.clear(), l = () => o.clear(), a = (
|
|
1031
|
-
const y = o.getAnnotation(
|
|
1029
|
+
o.addAnnotation(b, G.REMOTE);
|
|
1030
|
+
}, r = () => i.clear(), l = () => o.clear(), a = (b) => {
|
|
1031
|
+
const y = o.getAnnotation(b);
|
|
1032
1032
|
return n && y ? n.serialize(y) : y;
|
|
1033
1033
|
}, c = () => n ? o.all().map(n.serialize) : o.all(), u = () => {
|
|
1034
|
-
var
|
|
1035
|
-
const y = (((
|
|
1034
|
+
var b;
|
|
1035
|
+
const y = (((b = i.selected) == null ? void 0 : b.map((A) => A.id)) || []).map((A) => o.getAnnotation(A)).filter(Boolean);
|
|
1036
1036
|
return n ? y.map(n.serialize) : y;
|
|
1037
|
-
}, f = (
|
|
1038
|
-
if (typeof
|
|
1039
|
-
const y = o.getAnnotation(
|
|
1040
|
-
if (o.deleteAnnotation(
|
|
1037
|
+
}, f = (b, y = !0) => fetch(b).then((A) => A.json()).then((A) => (g(A, y), A)), h = (b) => {
|
|
1038
|
+
if (typeof b == "string") {
|
|
1039
|
+
const y = o.getAnnotation(b);
|
|
1040
|
+
if (o.deleteAnnotation(b), y)
|
|
1041
1041
|
return n ? n.serialize(y) : y;
|
|
1042
1042
|
} else {
|
|
1043
|
-
const y = n ? n.parse(
|
|
1043
|
+
const y = n ? n.parse(b).parsed : b;
|
|
1044
1044
|
if (y)
|
|
1045
|
-
return o.deleteAnnotation(y),
|
|
1045
|
+
return o.deleteAnnotation(y), b;
|
|
1046
1046
|
}
|
|
1047
|
-
}, g = (
|
|
1047
|
+
}, g = (b, y = !0) => {
|
|
1048
1048
|
if (n) {
|
|
1049
|
-
const { parsed:
|
|
1050
|
-
|
|
1049
|
+
const { parsed: A, failed: w } = eo(n)(b);
|
|
1050
|
+
w.length > 0 && console.warn(`Discarded ${w.length} invalid annotations`, w), o.bulkAddAnnotation(A, y, G.REMOTE);
|
|
1051
1051
|
} else
|
|
1052
|
-
o.bulkAddAnnotation(
|
|
1053
|
-
}, m = (
|
|
1054
|
-
|
|
1055
|
-
}, _ = (
|
|
1052
|
+
o.bulkAddAnnotation(b, y, G.REMOTE);
|
|
1053
|
+
}, m = (b) => {
|
|
1054
|
+
b ? i.setSelected(b) : i.clear();
|
|
1055
|
+
}, _ = (b) => {
|
|
1056
1056
|
if (n) {
|
|
1057
|
-
const y = n.parse(
|
|
1058
|
-
return o.updateAnnotation(y),
|
|
1057
|
+
const y = n.parse(b).parsed, A = n.serialize(o.getAnnotation(y.id));
|
|
1058
|
+
return o.updateAnnotation(y), A;
|
|
1059
1059
|
} else {
|
|
1060
|
-
const y = o.getAnnotation(
|
|
1061
|
-
return o.updateAnnotation(
|
|
1060
|
+
const y = o.getAnnotation(b.id);
|
|
1061
|
+
return o.updateAnnotation(b), y;
|
|
1062
1062
|
}
|
|
1063
1063
|
};
|
|
1064
1064
|
return {
|
|
@@ -1078,8 +1078,8 @@ const Zn = 250, Qn = (e) => {
|
|
|
1078
1078
|
undo: t.undo,
|
|
1079
1079
|
updateAnnotation: _
|
|
1080
1080
|
};
|
|
1081
|
-
};
|
|
1082
|
-
let
|
|
1081
|
+
}, no = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
|
|
1082
|
+
let oo = (e) => crypto.getRandomValues(new Uint8Array(e)), io = (e, t, n) => {
|
|
1083
1083
|
let o = (2 << Math.log(e.length - 1) / Math.LN2) - 1, i = -~(1.6 * o * t / e.length);
|
|
1084
1084
|
return (s = t) => {
|
|
1085
1085
|
let r = "";
|
|
@@ -1090,8 +1090,13 @@ let no = (e) => crypto.getRandomValues(new Uint8Array(e)), oo = (e, t, n) => {
|
|
|
1090
1090
|
return r;
|
|
1091
1091
|
}
|
|
1092
1092
|
};
|
|
1093
|
-
},
|
|
1094
|
-
|
|
1093
|
+
}, so = (e, t = 21) => io(e, t, oo), ro = (e = 21) => {
|
|
1094
|
+
let t = "", n = crypto.getRandomValues(new Uint8Array(e));
|
|
1095
|
+
for (; e--; )
|
|
1096
|
+
t += no[n[e] & 63];
|
|
1097
|
+
return t;
|
|
1098
|
+
};
|
|
1099
|
+
const lo = () => ({ isGuest: !0, id: so("1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_", 20)() }), ao = (e) => {
|
|
1095
1100
|
const t = JSON.stringify(e);
|
|
1096
1101
|
let n = 0;
|
|
1097
1102
|
for (let o = 0, i = t.length; o < i; o++) {
|
|
@@ -1099,10 +1104,10 @@ const ro = () => ({ isGuest: !0, id: io("1234567890abcdefghijklmnopqrstuvwxyzABC
|
|
|
1099
1104
|
n = (n << 5) - n + s, n |= 0;
|
|
1100
1105
|
}
|
|
1101
1106
|
return `${n}`;
|
|
1102
|
-
}, Jt = (e) => e ? typeof e == "object" ? { ...e } : e : void 0,
|
|
1107
|
+
}, Jt = (e) => e ? typeof e == "object" ? { ...e } : e : void 0, co = (e, t) => (Array.isArray(e) ? e : [e]).map((n) => {
|
|
1103
1108
|
const { id: o, type: i, purpose: s, value: r, created: l, creator: a, ...c } = n;
|
|
1104
1109
|
return {
|
|
1105
|
-
id: o || `temp-${
|
|
1110
|
+
id: o || `temp-${ao(n)}`,
|
|
1106
1111
|
annotation: t,
|
|
1107
1112
|
type: i,
|
|
1108
1113
|
purpose: s,
|
|
@@ -1111,20 +1116,20 @@ const ro = () => ({ isGuest: !0, id: io("1234567890abcdefghijklmnopqrstuvwxyzABC
|
|
|
1111
1116
|
creator: Jt(a),
|
|
1112
1117
|
...c
|
|
1113
1118
|
};
|
|
1114
|
-
}),
|
|
1119
|
+
}), fo = (e) => e.map((t) => {
|
|
1115
1120
|
var n, o;
|
|
1116
1121
|
const i = { ...t };
|
|
1117
1122
|
return delete i.annotation, (n = i.id) != null && n.startsWith("temp-") && delete i.id, { ...i, created: (o = i.created) == null ? void 0 : o.toISOString() };
|
|
1118
1123
|
});
|
|
1119
|
-
|
|
1120
|
-
const
|
|
1124
|
+
ro();
|
|
1125
|
+
const Yi = (e, t = !1) => ({ parse: (i) => uo(i, t), serialize: (i) => ho(i, e) }), uo = (e, t = !1) => {
|
|
1121
1126
|
const n = e.id || qt(), {
|
|
1122
1127
|
creator: o,
|
|
1123
1128
|
created: i,
|
|
1124
1129
|
modified: s,
|
|
1125
1130
|
body: r,
|
|
1126
1131
|
...l
|
|
1127
|
-
} = e, a =
|
|
1132
|
+
} = e, a = co(r, n), c = Array.isArray(e.target) ? e.target[0] : e.target, u = Array.isArray(c.selector) ? c.selector[0] : c.selector, f = (u == null ? void 0 : u.type) === "FragmentSelector" ? Sn(u, t) : (u == null ? void 0 : u.type) === "SvgSelector" ? On(u) : void 0;
|
|
1128
1133
|
return f ? {
|
|
1129
1134
|
parsed: {
|
|
1130
1135
|
...l,
|
|
@@ -1142,7 +1147,7 @@ const Pi = (e, t = !1) => ({ parse: (i) => fo(i, t), serialize: (i) => uo(i, e)
|
|
|
1142
1147
|
} : {
|
|
1143
1148
|
error: Error(`Invalid selector: ${JSON.stringify(u)}`)
|
|
1144
1149
|
};
|
|
1145
|
-
},
|
|
1150
|
+
}, ho = (e, t) => {
|
|
1146
1151
|
const {
|
|
1147
1152
|
selector: n,
|
|
1148
1153
|
creator: o,
|
|
@@ -1156,7 +1161,7 @@ const Pi = (e, t = !1) => ({ parse: (i) => fo(i, t), serialize: (i) => uo(i, e)
|
|
|
1156
1161
|
"@context": "http://www.w3.org/ns/anno.jsonld",
|
|
1157
1162
|
id: e.id,
|
|
1158
1163
|
type: "Annotation",
|
|
1159
|
-
body:
|
|
1164
|
+
body: fo(e.bodies),
|
|
1160
1165
|
created: i == null ? void 0 : i.toISOString(),
|
|
1161
1166
|
creator: o,
|
|
1162
1167
|
modified: s == null ? void 0 : s.toISOString(),
|
|
@@ -1218,26 +1223,26 @@ function bt(e) {
|
|
|
1218
1223
|
n || (P(t.$$.fragment, o), n = !0);
|
|
1219
1224
|
},
|
|
1220
1225
|
o(o) {
|
|
1221
|
-
|
|
1226
|
+
D(t.$$.fragment, o), n = !1;
|
|
1222
1227
|
},
|
|
1223
1228
|
d(o) {
|
|
1224
1229
|
x(t, o);
|
|
1225
1230
|
}
|
|
1226
1231
|
};
|
|
1227
1232
|
}
|
|
1228
|
-
function
|
|
1233
|
+
function go(e) {
|
|
1229
1234
|
let t, n, o, i, s, r, l, a, c, u, f, h = Se(
|
|
1230
1235
|
/*geom*/
|
|
1231
1236
|
e[4].points
|
|
1232
1237
|
), g = [];
|
|
1233
1238
|
for (let _ = 0; _ < h.length; _ += 1)
|
|
1234
1239
|
g[_] = bt(wt(e, h, _));
|
|
1235
|
-
const m = (_) =>
|
|
1240
|
+
const m = (_) => D(g[_], 1, 1, () => {
|
|
1236
1241
|
g[_] = null;
|
|
1237
1242
|
});
|
|
1238
1243
|
return {
|
|
1239
1244
|
c() {
|
|
1240
|
-
t =
|
|
1245
|
+
t = R("polygon"), i = oe(), s = R("polygon"), l = oe();
|
|
1241
1246
|
for (let _ = 0; _ < g.length; _ += 1)
|
|
1242
1247
|
g[_].c();
|
|
1243
1248
|
a = ce(), d(t, "class", "a9s-outer"), d(t, "style", n = /*computedStyle*/
|
|
@@ -1250,11 +1255,11 @@ function ho(e) {
|
|
|
1250
1255
|
), d(s, "points", r = /*geom*/
|
|
1251
1256
|
e[4].points.map(At).join(" "));
|
|
1252
1257
|
},
|
|
1253
|
-
m(_,
|
|
1254
|
-
|
|
1258
|
+
m(_, b) {
|
|
1259
|
+
O(_, t, b), O(_, i, b), O(_, s, b), O(_, l, b);
|
|
1255
1260
|
for (let y = 0; y < g.length; y += 1)
|
|
1256
|
-
g[y] && g[y].m(_,
|
|
1257
|
-
|
|
1261
|
+
g[y] && g[y].m(_, b);
|
|
1262
|
+
O(_, a, b), c = !0, u || (f = [
|
|
1258
1263
|
F(t, "pointerdown", function() {
|
|
1259
1264
|
q(
|
|
1260
1265
|
/*grab*/
|
|
@@ -1269,20 +1274,20 @@ function ho(e) {
|
|
|
1269
1274
|
})
|
|
1270
1275
|
], u = !0);
|
|
1271
1276
|
},
|
|
1272
|
-
p(_,
|
|
1273
|
-
if (e = _, (!c ||
|
|
1277
|
+
p(_, b) {
|
|
1278
|
+
if (e = _, (!c || b & /*computedStyle*/
|
|
1274
1279
|
2 && n !== (n = /*computedStyle*/
|
|
1275
|
-
e[1] ? "display:none;" : void 0)) && d(t, "style", n), (!c ||
|
|
1280
|
+
e[1] ? "display:none;" : void 0)) && d(t, "style", n), (!c || b & /*geom*/
|
|
1276
1281
|
16 && o !== (o = /*geom*/
|
|
1277
|
-
e[4].points.map(Et).join(" "))) && d(t, "points", o), (!c ||
|
|
1282
|
+
e[4].points.map(Et).join(" "))) && d(t, "points", o), (!c || b & /*computedStyle*/
|
|
1278
1283
|
2) && d(
|
|
1279
1284
|
s,
|
|
1280
1285
|
"style",
|
|
1281
1286
|
/*computedStyle*/
|
|
1282
1287
|
e[1]
|
|
1283
|
-
), (!c ||
|
|
1288
|
+
), (!c || b & /*geom*/
|
|
1284
1289
|
16 && r !== (r = /*geom*/
|
|
1285
|
-
e[4].points.map(At).join(" "))) && d(s, "points", r),
|
|
1290
|
+
e[4].points.map(At).join(" "))) && d(s, "points", r), b & /*geom, viewportScale, grab*/
|
|
1286
1291
|
536) {
|
|
1287
1292
|
h = Se(
|
|
1288
1293
|
/*geom*/
|
|
@@ -1290,8 +1295,8 @@ function ho(e) {
|
|
|
1290
1295
|
);
|
|
1291
1296
|
let y;
|
|
1292
1297
|
for (y = 0; y < h.length; y += 1) {
|
|
1293
|
-
const
|
|
1294
|
-
g[y] ? (g[y].p(
|
|
1298
|
+
const A = wt(e, h, y);
|
|
1299
|
+
g[y] ? (g[y].p(A, b), P(g[y], 1)) : (g[y] = bt(A), g[y].c(), P(g[y], 1), g[y].m(a.parentNode, a));
|
|
1295
1300
|
}
|
|
1296
1301
|
for (re(), y = h.length; y < g.length; y += 1)
|
|
1297
1302
|
m(y);
|
|
@@ -1300,23 +1305,23 @@ function ho(e) {
|
|
|
1300
1305
|
},
|
|
1301
1306
|
i(_) {
|
|
1302
1307
|
if (!c) {
|
|
1303
|
-
for (let
|
|
1304
|
-
P(g[
|
|
1308
|
+
for (let b = 0; b < h.length; b += 1)
|
|
1309
|
+
P(g[b]);
|
|
1305
1310
|
c = !0;
|
|
1306
1311
|
}
|
|
1307
1312
|
},
|
|
1308
1313
|
o(_) {
|
|
1309
1314
|
g = g.filter(Boolean);
|
|
1310
|
-
for (let
|
|
1311
|
-
|
|
1315
|
+
for (let b = 0; b < g.length; b += 1)
|
|
1316
|
+
D(g[b]);
|
|
1312
1317
|
c = !1;
|
|
1313
1318
|
},
|
|
1314
1319
|
d(_) {
|
|
1315
|
-
_ && (
|
|
1320
|
+
_ && (L(t), L(i), L(s), L(l), L(a)), rt(g, _), u = !1, ae(f);
|
|
1316
1321
|
}
|
|
1317
1322
|
};
|
|
1318
1323
|
}
|
|
1319
|
-
function
|
|
1324
|
+
function mo(e) {
|
|
1320
1325
|
let t, n;
|
|
1321
1326
|
return t = new Qt({
|
|
1322
1327
|
props: {
|
|
@@ -1334,7 +1339,7 @@ function go(e) {
|
|
|
1334
1339
|
),
|
|
1335
1340
|
$$slots: {
|
|
1336
1341
|
default: [
|
|
1337
|
-
|
|
1342
|
+
go,
|
|
1338
1343
|
({ grab: o }) => ({ 9: o }),
|
|
1339
1344
|
({ grab: o }) => o ? 512 : 0
|
|
1340
1345
|
]
|
|
@@ -1373,7 +1378,7 @@ function go(e) {
|
|
|
1373
1378
|
n || (P(t.$$.fragment, o), n = !0);
|
|
1374
1379
|
},
|
|
1375
1380
|
o(o) {
|
|
1376
|
-
|
|
1381
|
+
D(t.$$.fragment, o), n = !1;
|
|
1377
1382
|
},
|
|
1378
1383
|
d(o) {
|
|
1379
1384
|
x(t, o);
|
|
@@ -1381,12 +1386,12 @@ function go(e) {
|
|
|
1381
1386
|
};
|
|
1382
1387
|
}
|
|
1383
1388
|
const Et = (e) => e.join(","), At = (e) => e.join(",");
|
|
1384
|
-
function
|
|
1389
|
+
function po(e, t, n) {
|
|
1385
1390
|
let o, { shape: i } = t, { computedStyle: s } = t, { transform: r } = t, { viewportScale: l = 1 } = t;
|
|
1386
1391
|
const a = (h, g, m) => {
|
|
1387
1392
|
let _;
|
|
1388
|
-
const
|
|
1389
|
-
g === "SHAPE" ? _ =
|
|
1393
|
+
const b = h.geometry;
|
|
1394
|
+
g === "SHAPE" ? _ = b.points.map(([A, w]) => [A + m[0], w + m[1]]) : _ = b.points.map(([A, w], E) => g === `HANDLE-${E}` ? [A + m[0], w + m[1]] : [A, w]);
|
|
1390
1395
|
const y = Fe(_);
|
|
1391
1396
|
return { ...h, geometry: { points: _, bounds: y } };
|
|
1392
1397
|
};
|
|
@@ -1416,9 +1421,9 @@ function mo(e, t, n) {
|
|
|
1416
1421
|
f
|
|
1417
1422
|
];
|
|
1418
1423
|
}
|
|
1419
|
-
class
|
|
1424
|
+
class yo extends te {
|
|
1420
1425
|
constructor(t) {
|
|
1421
|
-
super(), ee(this, t,
|
|
1426
|
+
super(), ee(this, t, po, mo, W, {
|
|
1422
1427
|
shape: 0,
|
|
1423
1428
|
computedStyle: 1,
|
|
1424
1429
|
transform: 2,
|
|
@@ -1430,7 +1435,7 @@ const Qe = (e, t) => {
|
|
|
1430
1435
|
const n = Math.abs(t[0] - e[0]), o = Math.abs(t[1] - e[1]);
|
|
1431
1436
|
return Math.sqrt(Math.pow(n, 2) + Math.pow(o, 2));
|
|
1432
1437
|
}, _e = [];
|
|
1433
|
-
function
|
|
1438
|
+
function _o(e, t = V) {
|
|
1434
1439
|
let n;
|
|
1435
1440
|
const o = /* @__PURE__ */ new Set();
|
|
1436
1441
|
function i(l) {
|
|
@@ -1456,7 +1461,7 @@ function yo(e, t = V) {
|
|
|
1456
1461
|
}
|
|
1457
1462
|
return { set: i, update: s, subscribe: r };
|
|
1458
1463
|
}
|
|
1459
|
-
const
|
|
1464
|
+
const wo = (e, t) => {
|
|
1460
1465
|
const { naturalWidth: n, naturalHeight: o } = e;
|
|
1461
1466
|
if (!n && !o) {
|
|
1462
1467
|
const { width: i, height: s } = e;
|
|
@@ -1466,9 +1471,9 @@ const _o = (e, t) => {
|
|
|
1466
1471
|
});
|
|
1467
1472
|
} else
|
|
1468
1473
|
t.setAttribute("viewBox", `0 0 ${n} ${o}`);
|
|
1469
|
-
},
|
|
1470
|
-
|
|
1471
|
-
const { subscribe: n, set: o } =
|
|
1474
|
+
}, bo = (e, t) => {
|
|
1475
|
+
wo(e, t);
|
|
1476
|
+
const { subscribe: n, set: o } = _o(1);
|
|
1472
1477
|
let i;
|
|
1473
1478
|
return window.ResizeObserver && (i = new ResizeObserver(() => {
|
|
1474
1479
|
const r = t.getBoundingClientRect(), { width: l, height: a } = t.viewBox.baseVal, c = Math.max(
|
|
@@ -1479,12 +1484,12 @@ const _o = (e, t) => {
|
|
|
1479
1484
|
}), i.observe(t.parentElement)), { destroy: () => {
|
|
1480
1485
|
i && i.disconnect();
|
|
1481
1486
|
}, subscribe: n };
|
|
1482
|
-
},
|
|
1483
|
-
function
|
|
1487
|
+
}, Eo = "ontouchstart" in window || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0;
|
|
1488
|
+
function Ao(e) {
|
|
1484
1489
|
let t, n, o, i, s, r;
|
|
1485
1490
|
return {
|
|
1486
1491
|
c() {
|
|
1487
|
-
t =
|
|
1492
|
+
t = R("rect"), d(t, "class", n = Ge(`a9s-handle ${/*$$props*/
|
|
1488
1493
|
e[8].class || ""}`.trim()) + " svelte-1sgkh33"), d(t, "x", o = /*x*/
|
|
1489
1494
|
e[0] - /*handleSize*/
|
|
1490
1495
|
e[5] / 2), d(t, "y", i = /*y*/
|
|
@@ -1502,7 +1507,7 @@ function Eo(e) {
|
|
|
1502
1507
|
);
|
|
1503
1508
|
},
|
|
1504
1509
|
m(l, a) {
|
|
1505
|
-
|
|
1510
|
+
O(l, t, a), s || (r = F(
|
|
1506
1511
|
t,
|
|
1507
1512
|
"pointerdown",
|
|
1508
1513
|
/*pointerdown_handler_2*/
|
|
@@ -1533,15 +1538,15 @@ function Eo(e) {
|
|
|
1533
1538
|
);
|
|
1534
1539
|
},
|
|
1535
1540
|
d(l) {
|
|
1536
|
-
l &&
|
|
1541
|
+
l && L(t), s = !1, r();
|
|
1537
1542
|
}
|
|
1538
1543
|
};
|
|
1539
1544
|
}
|
|
1540
|
-
function
|
|
1545
|
+
function So(e) {
|
|
1541
1546
|
let t, n, o, i, s, r, l, a, c;
|
|
1542
1547
|
return {
|
|
1543
1548
|
c() {
|
|
1544
|
-
t =
|
|
1549
|
+
t = R("g"), n = R("circle"), i = R("rect"), d(
|
|
1545
1550
|
n,
|
|
1546
1551
|
"cx",
|
|
1547
1552
|
/*x*/
|
|
@@ -1576,7 +1581,7 @@ function Ao(e) {
|
|
|
1576
1581
|
), d(t, "class", "a9s-touch-handle");
|
|
1577
1582
|
},
|
|
1578
1583
|
m(u, f) {
|
|
1579
|
-
|
|
1584
|
+
O(u, t, f), se(t, n), se(t, i), a || (c = [
|
|
1580
1585
|
F(
|
|
1581
1586
|
n,
|
|
1582
1587
|
"pointerdown",
|
|
@@ -1660,14 +1665,14 @@ function Ao(e) {
|
|
|
1660
1665
|
);
|
|
1661
1666
|
},
|
|
1662
1667
|
d(u) {
|
|
1663
|
-
u &&
|
|
1668
|
+
u && L(t), a = !1, ae(c);
|
|
1664
1669
|
}
|
|
1665
1670
|
};
|
|
1666
1671
|
}
|
|
1667
|
-
function
|
|
1672
|
+
function To(e) {
|
|
1668
1673
|
let t;
|
|
1669
1674
|
function n(s, r) {
|
|
1670
|
-
return
|
|
1675
|
+
return Eo ? So : Ao;
|
|
1671
1676
|
}
|
|
1672
1677
|
let i = n()(e);
|
|
1673
1678
|
return {
|
|
@@ -1675,7 +1680,7 @@ function So(e) {
|
|
|
1675
1680
|
i.c(), t = ce();
|
|
1676
1681
|
},
|
|
1677
1682
|
m(s, r) {
|
|
1678
|
-
i.m(s, r),
|
|
1683
|
+
i.m(s, r), O(s, t, r);
|
|
1679
1684
|
},
|
|
1680
1685
|
p(s, [r]) {
|
|
1681
1686
|
i.p(s, r);
|
|
@@ -1683,11 +1688,11 @@ function So(e) {
|
|
|
1683
1688
|
i: V,
|
|
1684
1689
|
o: V,
|
|
1685
1690
|
d(s) {
|
|
1686
|
-
s &&
|
|
1691
|
+
s && L(t), i.d(s);
|
|
1687
1692
|
}
|
|
1688
1693
|
};
|
|
1689
1694
|
}
|
|
1690
|
-
function
|
|
1695
|
+
function Mo(e, t, n) {
|
|
1691
1696
|
let o, { x: i } = t, { y: s } = t, { scale: r } = t, { radius: l = 30 } = t, a = !1;
|
|
1692
1697
|
const c = (m) => {
|
|
1693
1698
|
m.pointerType === "touch" && n(4, a = !0);
|
|
@@ -1723,11 +1728,11 @@ function To(e, t, n) {
|
|
|
1723
1728
|
}
|
|
1724
1729
|
class Le extends te {
|
|
1725
1730
|
constructor(t) {
|
|
1726
|
-
super(), ee(this, t,
|
|
1731
|
+
super(), ee(this, t, Mo, To, W, { x: 0, y: 1, scale: 2, radius: 3 });
|
|
1727
1732
|
}
|
|
1728
1733
|
}
|
|
1729
|
-
function
|
|
1730
|
-
let t, n, o, i, s, r, l, a, c, u, f, h, g, m, _,
|
|
1734
|
+
function vo(e) {
|
|
1735
|
+
let t, n, o, i, s, r, l, a, c, u, f, h, g, m, _, b, y, A, w, E, B, U, X, p, T, S, M, k, C, Z, ge, me, Me, ie, I, z, H, J, fe, ne, N, qe, ut;
|
|
1731
1736
|
return ie = new Le({
|
|
1732
1737
|
props: {
|
|
1733
1738
|
class: "a9s-corner-handle-topleft",
|
|
@@ -1818,7 +1823,7 @@ function Mo(e) {
|
|
|
1818
1823
|
) && e[9]("BOTTOM_LEFT").apply(this, arguments);
|
|
1819
1824
|
}), {
|
|
1820
1825
|
c() {
|
|
1821
|
-
t =
|
|
1826
|
+
t = R("rect"), l = oe(), a = R("rect"), g = oe(), m = R("rect"), A = oe(), w = R("rect"), X = oe(), p = R("rect"), k = oe(), C = R("rect"), Me = oe(), $(ie.$$.fragment), I = oe(), $(z.$$.fragment), H = oe(), $(J.$$.fragment), fe = oe(), $(ne.$$.fragment), d(t, "class", "a9s-outer"), d(t, "style", n = /*computedStyle*/
|
|
1822
1827
|
e[1] ? "display:none;" : void 0), d(t, "x", o = /*geom*/
|
|
1823
1828
|
e[4].x), d(t, "y", i = /*geom*/
|
|
1824
1829
|
e[4].y), d(t, "width", s = /*geom*/
|
|
@@ -1833,23 +1838,23 @@ function Mo(e) {
|
|
|
1833
1838
|
e[4].y), d(a, "width", f = /*geom*/
|
|
1834
1839
|
e[4].w), d(a, "height", h = /*geom*/
|
|
1835
1840
|
e[4].h), d(m, "class", "a9s-edge-handle a9s-edge-handle-top"), d(m, "x", _ = /*geom*/
|
|
1836
|
-
e[4].x), d(m, "y",
|
|
1841
|
+
e[4].x), d(m, "y", b = /*geom*/
|
|
1837
1842
|
e[4].y), d(m, "height", 1), d(m, "width", y = /*geom*/
|
|
1838
|
-
e[4].w), d(
|
|
1843
|
+
e[4].w), d(w, "class", "a9s-edge-handle a9s-edge-handle-right"), d(w, "x", E = /*geom*/
|
|
1839
1844
|
e[4].x + /*geom*/
|
|
1840
|
-
e[4].w), d(
|
|
1841
|
-
e[4].y), d(
|
|
1842
|
-
e[4].h), d(
|
|
1845
|
+
e[4].w), d(w, "y", B = /*geom*/
|
|
1846
|
+
e[4].y), d(w, "height", U = /*geom*/
|
|
1847
|
+
e[4].h), d(w, "width", 1), d(p, "class", "a9s-edge-handle a9s-edge-handle-bottom"), d(p, "x", T = /*geom*/
|
|
1843
1848
|
e[4].x), d(p, "y", S = /*geom*/
|
|
1844
1849
|
e[4].y + /*geom*/
|
|
1845
1850
|
e[4].h), d(p, "height", 1), d(p, "width", M = /*geom*/
|
|
1846
|
-
e[4].w), d(
|
|
1847
|
-
e[4].x), d(
|
|
1848
|
-
e[4].y), d(
|
|
1849
|
-
e[4].h), d(
|
|
1851
|
+
e[4].w), d(C, "class", "a9s-edge-handle a9s-edge-handle-left"), d(C, "x", Z = /*geom*/
|
|
1852
|
+
e[4].x), d(C, "y", ge = /*geom*/
|
|
1853
|
+
e[4].y), d(C, "height", me = /*geom*/
|
|
1854
|
+
e[4].h), d(C, "width", 1);
|
|
1850
1855
|
},
|
|
1851
1856
|
m(Y, v) {
|
|
1852
|
-
|
|
1857
|
+
O(Y, t, v), O(Y, l, v), O(Y, a, v), O(Y, g, v), O(Y, m, v), O(Y, A, v), O(Y, w, v), O(Y, X, v), O(Y, p, v), O(Y, k, v), O(Y, C, v), O(Y, Me, v), Q(ie, Y, v), O(Y, I, v), Q(z, Y, v), O(Y, H, v), Q(J, Y, v), O(Y, fe, v), Q(ne, Y, v), N = !0, qe || (ut = [
|
|
1853
1858
|
F(t, "pointerdown", function() {
|
|
1854
1859
|
q(
|
|
1855
1860
|
/*grab*/
|
|
@@ -1868,7 +1873,7 @@ function Mo(e) {
|
|
|
1868
1873
|
e[9]("TOP")
|
|
1869
1874
|
) && e[9]("TOP").apply(this, arguments);
|
|
1870
1875
|
}),
|
|
1871
|
-
F(
|
|
1876
|
+
F(w, "pointerdown", function() {
|
|
1872
1877
|
q(
|
|
1873
1878
|
/*grab*/
|
|
1874
1879
|
e[9]("RIGHT")
|
|
@@ -1880,7 +1885,7 @@ function Mo(e) {
|
|
|
1880
1885
|
e[9]("BOTTOM")
|
|
1881
1886
|
) && e[9]("BOTTOM").apply(this, arguments);
|
|
1882
1887
|
}),
|
|
1883
|
-
F(
|
|
1888
|
+
F(C, "pointerdown", function() {
|
|
1884
1889
|
q(
|
|
1885
1890
|
/*grab*/
|
|
1886
1891
|
e[9]("LEFT")
|
|
@@ -1916,17 +1921,17 @@ function Mo(e) {
|
|
|
1916
1921
|
e[4].h)) && d(a, "height", h), (!N || v & /*geom*/
|
|
1917
1922
|
16 && _ !== (_ = /*geom*/
|
|
1918
1923
|
e[4].x)) && d(m, "x", _), (!N || v & /*geom*/
|
|
1919
|
-
16 &&
|
|
1920
|
-
e[4].y)) && d(m, "y",
|
|
1924
|
+
16 && b !== (b = /*geom*/
|
|
1925
|
+
e[4].y)) && d(m, "y", b), (!N || v & /*geom*/
|
|
1921
1926
|
16 && y !== (y = /*geom*/
|
|
1922
1927
|
e[4].w)) && d(m, "width", y), (!N || v & /*geom*/
|
|
1923
|
-
16 &&
|
|
1928
|
+
16 && E !== (E = /*geom*/
|
|
1924
1929
|
e[4].x + /*geom*/
|
|
1925
|
-
e[4].w)) && d(
|
|
1926
|
-
16 &&
|
|
1927
|
-
e[4].y)) && d(
|
|
1928
|
-
16 &&
|
|
1929
|
-
e[4].h)) && d(
|
|
1930
|
+
e[4].w)) && d(w, "x", E), (!N || v & /*geom*/
|
|
1931
|
+
16 && B !== (B = /*geom*/
|
|
1932
|
+
e[4].y)) && d(w, "y", B), (!N || v & /*geom*/
|
|
1933
|
+
16 && U !== (U = /*geom*/
|
|
1934
|
+
e[4].h)) && d(w, "height", U), (!N || v & /*geom*/
|
|
1930
1935
|
16 && T !== (T = /*geom*/
|
|
1931
1936
|
e[4].x)) && d(p, "x", T), (!N || v & /*geom*/
|
|
1932
1937
|
16 && S !== (S = /*geom*/
|
|
@@ -1935,11 +1940,11 @@ function Mo(e) {
|
|
|
1935
1940
|
16 && M !== (M = /*geom*/
|
|
1936
1941
|
e[4].w)) && d(p, "width", M), (!N || v & /*geom*/
|
|
1937
1942
|
16 && Z !== (Z = /*geom*/
|
|
1938
|
-
e[4].x)) && d(
|
|
1943
|
+
e[4].x)) && d(C, "x", Z), (!N || v & /*geom*/
|
|
1939
1944
|
16 && ge !== (ge = /*geom*/
|
|
1940
|
-
e[4].y)) && d(
|
|
1945
|
+
e[4].y)) && d(C, "y", ge), (!N || v & /*geom*/
|
|
1941
1946
|
16 && me !== (me = /*geom*/
|
|
1942
|
-
e[4].h)) && d(
|
|
1947
|
+
e[4].h)) && d(C, "height", me);
|
|
1943
1948
|
const Ye = {};
|
|
1944
1949
|
v & /*geom*/
|
|
1945
1950
|
16 && (Ye.x = /*geom*/
|
|
@@ -1948,47 +1953,47 @@ function Mo(e) {
|
|
|
1948
1953
|
e[4].y), v & /*viewportScale*/
|
|
1949
1954
|
8 && (Ye.scale = /*viewportScale*/
|
|
1950
1955
|
e[3]), ie.$set(Ye);
|
|
1956
|
+
const Ce = {};
|
|
1957
|
+
v & /*geom*/
|
|
1958
|
+
16 && (Ce.x = /*geom*/
|
|
1959
|
+
e[4].x + /*geom*/
|
|
1960
|
+
e[4].w), v & /*geom*/
|
|
1961
|
+
16 && (Ce.y = /*geom*/
|
|
1962
|
+
e[4].y), v & /*viewportScale*/
|
|
1963
|
+
8 && (Ce.scale = /*viewportScale*/
|
|
1964
|
+
e[3]), z.$set(Ce);
|
|
1951
1965
|
const De = {};
|
|
1952
1966
|
v & /*geom*/
|
|
1953
1967
|
16 && (De.x = /*geom*/
|
|
1954
1968
|
e[4].x + /*geom*/
|
|
1955
1969
|
e[4].w), v & /*geom*/
|
|
1956
1970
|
16 && (De.y = /*geom*/
|
|
1957
|
-
e[4].y
|
|
1971
|
+
e[4].y + /*geom*/
|
|
1972
|
+
e[4].h), v & /*viewportScale*/
|
|
1958
1973
|
8 && (De.scale = /*viewportScale*/
|
|
1959
|
-
e[3]),
|
|
1974
|
+
e[3]), J.$set(De);
|
|
1960
1975
|
const Xe = {};
|
|
1961
1976
|
v & /*geom*/
|
|
1962
1977
|
16 && (Xe.x = /*geom*/
|
|
1963
|
-
e[4].x
|
|
1964
|
-
e[4].w), v & /*geom*/
|
|
1978
|
+
e[4].x), v & /*geom*/
|
|
1965
1979
|
16 && (Xe.y = /*geom*/
|
|
1966
1980
|
e[4].y + /*geom*/
|
|
1967
1981
|
e[4].h), v & /*viewportScale*/
|
|
1968
1982
|
8 && (Xe.scale = /*viewportScale*/
|
|
1969
|
-
e[3]),
|
|
1970
|
-
const Ce = {};
|
|
1971
|
-
v & /*geom*/
|
|
1972
|
-
16 && (Ce.x = /*geom*/
|
|
1973
|
-
e[4].x), v & /*geom*/
|
|
1974
|
-
16 && (Ce.y = /*geom*/
|
|
1975
|
-
e[4].y + /*geom*/
|
|
1976
|
-
e[4].h), v & /*viewportScale*/
|
|
1977
|
-
8 && (Ce.scale = /*viewportScale*/
|
|
1978
|
-
e[3]), ne.$set(Ce);
|
|
1983
|
+
e[3]), ne.$set(Xe);
|
|
1979
1984
|
},
|
|
1980
1985
|
i(Y) {
|
|
1981
1986
|
N || (P(ie.$$.fragment, Y), P(z.$$.fragment, Y), P(J.$$.fragment, Y), P(ne.$$.fragment, Y), N = !0);
|
|
1982
1987
|
},
|
|
1983
1988
|
o(Y) {
|
|
1984
|
-
|
|
1989
|
+
D(ie.$$.fragment, Y), D(z.$$.fragment, Y), D(J.$$.fragment, Y), D(ne.$$.fragment, Y), N = !1;
|
|
1985
1990
|
},
|
|
1986
1991
|
d(Y) {
|
|
1987
|
-
Y && (
|
|
1992
|
+
Y && (L(t), L(l), L(a), L(g), L(m), L(A), L(w), L(X), L(p), L(k), L(C), L(Me), L(I), L(H), L(fe)), x(ie, Y), x(z, Y), x(J, Y), x(ne, Y), qe = !1, ae(ut);
|
|
1988
1993
|
}
|
|
1989
1994
|
};
|
|
1990
1995
|
}
|
|
1991
|
-
function
|
|
1996
|
+
function Lo(e) {
|
|
1992
1997
|
let t, n;
|
|
1993
1998
|
return t = new Qt({
|
|
1994
1999
|
props: {
|
|
@@ -2006,7 +2011,7 @@ function vo(e) {
|
|
|
2006
2011
|
),
|
|
2007
2012
|
$$slots: {
|
|
2008
2013
|
default: [
|
|
2009
|
-
|
|
2014
|
+
vo,
|
|
2010
2015
|
({ grab: o }) => ({ 9: o }),
|
|
2011
2016
|
({ grab: o }) => o ? 512 : 0
|
|
2012
2017
|
]
|
|
@@ -2045,33 +2050,33 @@ function vo(e) {
|
|
|
2045
2050
|
n || (P(t.$$.fragment, o), n = !0);
|
|
2046
2051
|
},
|
|
2047
2052
|
o(o) {
|
|
2048
|
-
|
|
2053
|
+
D(t.$$.fragment, o), n = !1;
|
|
2049
2054
|
},
|
|
2050
2055
|
d(o) {
|
|
2051
2056
|
x(t, o);
|
|
2052
2057
|
}
|
|
2053
2058
|
};
|
|
2054
2059
|
}
|
|
2055
|
-
function
|
|
2060
|
+
function ko(e, t, n) {
|
|
2056
2061
|
let o, { shape: i } = t, { computedStyle: s } = t, { transform: r } = t, { viewportScale: l = 1 } = t;
|
|
2057
2062
|
const a = (h, g, m) => {
|
|
2058
2063
|
const _ = h.geometry.bounds;
|
|
2059
|
-
let [
|
|
2060
|
-
const [
|
|
2064
|
+
let [b, y] = [_.minX, _.minY], [A, w] = [_.maxX, _.maxY];
|
|
2065
|
+
const [E, B] = m;
|
|
2061
2066
|
if (g === "SHAPE")
|
|
2062
|
-
|
|
2067
|
+
b += E, A += E, y += B, w += B;
|
|
2063
2068
|
else {
|
|
2064
2069
|
switch (g) {
|
|
2065
2070
|
case "TOP":
|
|
2066
2071
|
case "TOP_LEFT":
|
|
2067
2072
|
case "TOP_RIGHT": {
|
|
2068
|
-
y +=
|
|
2073
|
+
y += B;
|
|
2069
2074
|
break;
|
|
2070
2075
|
}
|
|
2071
2076
|
case "BOTTOM":
|
|
2072
2077
|
case "BOTTOM_LEFT":
|
|
2073
2078
|
case "BOTTOM_RIGHT": {
|
|
2074
|
-
|
|
2079
|
+
w += B;
|
|
2075
2080
|
break;
|
|
2076
2081
|
}
|
|
2077
2082
|
}
|
|
@@ -2079,30 +2084,30 @@ function Lo(e, t, n) {
|
|
|
2079
2084
|
case "LEFT":
|
|
2080
2085
|
case "TOP_LEFT":
|
|
2081
2086
|
case "BOTTOM_LEFT": {
|
|
2082
|
-
|
|
2087
|
+
b += E;
|
|
2083
2088
|
break;
|
|
2084
2089
|
}
|
|
2085
2090
|
case "RIGHT":
|
|
2086
2091
|
case "TOP_RIGHT":
|
|
2087
2092
|
case "BOTTOM_RIGHT": {
|
|
2088
|
-
|
|
2093
|
+
A += E;
|
|
2089
2094
|
break;
|
|
2090
2095
|
}
|
|
2091
2096
|
}
|
|
2092
2097
|
}
|
|
2093
|
-
const
|
|
2098
|
+
const U = Math.min(b, A), X = Math.min(y, w), p = Math.abs(A - b), T = Math.abs(w - y);
|
|
2094
2099
|
return {
|
|
2095
2100
|
...h,
|
|
2096
2101
|
geometry: {
|
|
2097
|
-
x:
|
|
2098
|
-
y:
|
|
2102
|
+
x: U,
|
|
2103
|
+
y: X,
|
|
2099
2104
|
w: p,
|
|
2100
2105
|
h: T,
|
|
2101
2106
|
bounds: {
|
|
2102
|
-
minX:
|
|
2103
|
-
minY:
|
|
2104
|
-
maxX:
|
|
2105
|
-
maxY:
|
|
2107
|
+
minX: U,
|
|
2108
|
+
minY: X,
|
|
2109
|
+
maxX: U + p,
|
|
2110
|
+
maxY: X + T
|
|
2106
2111
|
}
|
|
2107
2112
|
}
|
|
2108
2113
|
};
|
|
@@ -2133,9 +2138,9 @@ function Lo(e, t, n) {
|
|
|
2133
2138
|
f
|
|
2134
2139
|
];
|
|
2135
2140
|
}
|
|
2136
|
-
class
|
|
2141
|
+
class Oo extends te {
|
|
2137
2142
|
constructor(t) {
|
|
2138
|
-
super(), ee(this, t,
|
|
2143
|
+
super(), ee(this, t, ko, Lo, W, {
|
|
2139
2144
|
shape: 0,
|
|
2140
2145
|
computedStyle: 1,
|
|
2141
2146
|
transform: 2,
|
|
@@ -2144,13 +2149,13 @@ class ko extends te {
|
|
|
2144
2149
|
}
|
|
2145
2150
|
}
|
|
2146
2151
|
const Zt = /* @__PURE__ */ new Map([
|
|
2147
|
-
[j.RECTANGLE,
|
|
2148
|
-
[j.POLYGON,
|
|
2149
|
-
]),
|
|
2152
|
+
[j.RECTANGLE, Oo],
|
|
2153
|
+
[j.POLYGON, yo]
|
|
2154
|
+
]), Bo = (e) => Zt.get(e.type), Io = (e, t) => Zt.set(e, t), Po = (e) => ({}), St = (e) => ({ grab: (
|
|
2150
2155
|
/*onGrab*/
|
|
2151
2156
|
e[0]
|
|
2152
2157
|
) });
|
|
2153
|
-
function
|
|
2158
|
+
function Yo(e) {
|
|
2154
2159
|
let t, n, o, i;
|
|
2155
2160
|
const s = (
|
|
2156
2161
|
/*#slots*/
|
|
@@ -2164,10 +2169,10 @@ function Po(e) {
|
|
|
2164
2169
|
);
|
|
2165
2170
|
return {
|
|
2166
2171
|
c() {
|
|
2167
|
-
t =
|
|
2172
|
+
t = R("g"), r && r.c(), d(t, "class", "a9s-annotation selected");
|
|
2168
2173
|
},
|
|
2169
2174
|
m(l, a) {
|
|
2170
|
-
|
|
2175
|
+
O(l, t, a), r && r.m(t, null), n = !0, o || (i = [
|
|
2171
2176
|
F(
|
|
2172
2177
|
t,
|
|
2173
2178
|
"pointerup",
|
|
@@ -2195,7 +2200,7 @@ function Po(e) {
|
|
|
2195
2200
|
/*$$scope*/
|
|
2196
2201
|
l[6],
|
|
2197
2202
|
a,
|
|
2198
|
-
|
|
2203
|
+
Po
|
|
2199
2204
|
) : cn(
|
|
2200
2205
|
/*$$scope*/
|
|
2201
2206
|
l[6]
|
|
@@ -2207,23 +2212,23 @@ function Po(e) {
|
|
|
2207
2212
|
n || (P(r, l), n = !0);
|
|
2208
2213
|
},
|
|
2209
2214
|
o(l) {
|
|
2210
|
-
|
|
2215
|
+
D(r, l), n = !1;
|
|
2211
2216
|
},
|
|
2212
2217
|
d(l) {
|
|
2213
|
-
l &&
|
|
2218
|
+
l && L(t), r && r.d(l), o = !1, ae(i);
|
|
2214
2219
|
}
|
|
2215
2220
|
};
|
|
2216
2221
|
}
|
|
2217
|
-
function
|
|
2222
|
+
function Co(e, t, n) {
|
|
2218
2223
|
let { $$slots: o = {}, $$scope: i } = t;
|
|
2219
2224
|
const s = Te();
|
|
2220
2225
|
let { shape: r } = t, { editor: l } = t, { transform: a } = t, c, u, f;
|
|
2221
|
-
const h = (_) => (
|
|
2222
|
-
c = _, u = a.elementToImage(
|
|
2226
|
+
const h = (_) => (b) => {
|
|
2227
|
+
c = _, u = a.elementToImage(b.offsetX, b.offsetY), f = r, b.target.setPointerCapture(b.pointerId), s("grab", b);
|
|
2223
2228
|
}, g = (_) => {
|
|
2224
2229
|
if (c) {
|
|
2225
|
-
const [
|
|
2226
|
-
n(3, r = l(f, c,
|
|
2230
|
+
const [b, y] = a.elementToImage(_.offsetX, _.offsetY), A = [b - u[0], y - u[1]];
|
|
2231
|
+
n(3, r = l(f, c, A)), s("change", r);
|
|
2227
2232
|
}
|
|
2228
2233
|
}, m = (_) => {
|
|
2229
2234
|
_.target.releasePointerCapture(_.pointerId), c = void 0, f = r, s("release", _);
|
|
@@ -2234,7 +2239,7 @@ function Yo(e, t, n) {
|
|
|
2234
2239
|
}
|
|
2235
2240
|
class Qt extends te {
|
|
2236
2241
|
constructor(t) {
|
|
2237
|
-
super(), ee(this, t,
|
|
2242
|
+
super(), ee(this, t, Co, Yo, W, { shape: 3, editor: 4, transform: 5 });
|
|
2238
2243
|
}
|
|
2239
2244
|
}
|
|
2240
2245
|
const je = (e, t) => {
|
|
@@ -2283,7 +2288,7 @@ class Xo extends te {
|
|
|
2283
2288
|
});
|
|
2284
2289
|
}
|
|
2285
2290
|
}
|
|
2286
|
-
function
|
|
2291
|
+
function Ro(e, t, n) {
|
|
2287
2292
|
const o = Te();
|
|
2288
2293
|
let { drawingMode: i } = t, { target: s } = t, { tool: r } = t, { transform: l } = t, { viewportScale: a } = t, c;
|
|
2289
2294
|
return Pe(() => {
|
|
@@ -2309,9 +2314,9 @@ function Co(e, t, n) {
|
|
|
2309
2314
|
48 && c && c.$set({ viewportScale: a });
|
|
2310
2315
|
}, [i, s, r, l, a, c];
|
|
2311
2316
|
}
|
|
2312
|
-
class
|
|
2317
|
+
class Uo extends te {
|
|
2313
2318
|
constructor(t) {
|
|
2314
|
-
super(), ee(this, t,
|
|
2319
|
+
super(), ee(this, t, Ro, null, W, {
|
|
2315
2320
|
drawingMode: 0,
|
|
2316
2321
|
target: 1,
|
|
2317
2322
|
tool: 2,
|
|
@@ -2324,7 +2329,7 @@ function Tt(e) {
|
|
|
2324
2329
|
let t, n;
|
|
2325
2330
|
return {
|
|
2326
2331
|
c() {
|
|
2327
|
-
t =
|
|
2332
|
+
t = R("rect"), n = R("rect"), d(t, "class", "a9s-outer"), d(
|
|
2328
2333
|
t,
|
|
2329
2334
|
"x",
|
|
2330
2335
|
/*x*/
|
|
@@ -2367,7 +2372,7 @@ function Tt(e) {
|
|
|
2367
2372
|
);
|
|
2368
2373
|
},
|
|
2369
2374
|
m(o, i) {
|
|
2370
|
-
|
|
2375
|
+
O(o, t, i), O(o, n, i);
|
|
2371
2376
|
},
|
|
2372
2377
|
p(o, i) {
|
|
2373
2378
|
i & /*x*/
|
|
@@ -2421,21 +2426,21 @@ function Tt(e) {
|
|
|
2421
2426
|
);
|
|
2422
2427
|
},
|
|
2423
2428
|
d(o) {
|
|
2424
|
-
o && (
|
|
2429
|
+
o && (L(t), L(n));
|
|
2425
2430
|
}
|
|
2426
2431
|
};
|
|
2427
2432
|
}
|
|
2428
|
-
function
|
|
2433
|
+
function No(e) {
|
|
2429
2434
|
let t, n = (
|
|
2430
2435
|
/*origin*/
|
|
2431
2436
|
e[0] && Tt(e)
|
|
2432
2437
|
);
|
|
2433
2438
|
return {
|
|
2434
2439
|
c() {
|
|
2435
|
-
t =
|
|
2440
|
+
t = R("g"), n && n.c(), d(t, "class", "a9s-annotation a9s-rubberband");
|
|
2436
2441
|
},
|
|
2437
2442
|
m(o, i) {
|
|
2438
|
-
|
|
2443
|
+
O(o, t, i), n && n.m(t, null);
|
|
2439
2444
|
},
|
|
2440
2445
|
p(o, [i]) {
|
|
2441
2446
|
/*origin*/
|
|
@@ -2444,30 +2449,30 @@ function Uo(e) {
|
|
|
2444
2449
|
i: V,
|
|
2445
2450
|
o: V,
|
|
2446
2451
|
d(o) {
|
|
2447
|
-
o &&
|
|
2452
|
+
o && L(t), n && n.d();
|
|
2448
2453
|
}
|
|
2449
2454
|
};
|
|
2450
2455
|
}
|
|
2451
|
-
function
|
|
2456
|
+
function Vo(e, t, n) {
|
|
2452
2457
|
const o = Te();
|
|
2453
2458
|
let { addEventListener: i } = t, { drawingMode: s } = t, { transform: r } = t, l, a, c, u, f, h, g;
|
|
2454
|
-
const m = (
|
|
2455
|
-
const
|
|
2456
|
-
l = performance.now(), s === "drag" && (n(0, a = r.elementToImage(
|
|
2457
|
-
}, _ = (
|
|
2458
|
-
const
|
|
2459
|
-
a && (c = r.elementToImage(
|
|
2460
|
-
},
|
|
2461
|
-
const
|
|
2459
|
+
const m = (A) => {
|
|
2460
|
+
const w = A;
|
|
2461
|
+
l = performance.now(), s === "drag" && (n(0, a = r.elementToImage(w.offsetX, w.offsetY)), c = a, n(1, u = a[0]), n(2, f = a[1]), n(3, h = 1), n(4, g = 1));
|
|
2462
|
+
}, _ = (A) => {
|
|
2463
|
+
const w = A;
|
|
2464
|
+
a && (c = r.elementToImage(w.offsetX, w.offsetY), n(1, u = Math.min(c[0], a[0])), n(2, f = Math.min(c[1], a[1])), n(3, h = Math.abs(c[0] - a[0])), n(4, g = Math.abs(c[1] - a[1])));
|
|
2465
|
+
}, b = (A) => {
|
|
2466
|
+
const w = A, E = performance.now() - l;
|
|
2462
2467
|
if (s === "click") {
|
|
2463
|
-
if (
|
|
2468
|
+
if (E > 300)
|
|
2464
2469
|
return;
|
|
2465
|
-
|
|
2470
|
+
w.stopPropagation(), a ? y() : (n(0, a = r.elementToImage(w.offsetX, w.offsetY)), c = a, n(1, u = a[0]), n(2, f = a[1]), n(3, h = 1), n(4, g = 1));
|
|
2466
2471
|
} else
|
|
2467
|
-
a && (
|
|
2472
|
+
a && (E > 300 || h * g > 100 ? (w.stopPropagation(), y()) : (n(0, a = void 0), c = void 0));
|
|
2468
2473
|
}, y = () => {
|
|
2469
2474
|
if (h * g > 15) {
|
|
2470
|
-
const
|
|
2475
|
+
const A = {
|
|
2471
2476
|
type: j.RECTANGLE,
|
|
2472
2477
|
geometry: {
|
|
2473
2478
|
bounds: {
|
|
@@ -2482,19 +2487,19 @@ function No(e, t, n) {
|
|
|
2482
2487
|
h: g
|
|
2483
2488
|
}
|
|
2484
2489
|
};
|
|
2485
|
-
o("create",
|
|
2490
|
+
o("create", A);
|
|
2486
2491
|
}
|
|
2487
2492
|
n(0, a = void 0), c = void 0;
|
|
2488
2493
|
};
|
|
2489
2494
|
return Pe(() => {
|
|
2490
|
-
i("pointerdown", m), i("pointermove", _), i("pointerup",
|
|
2491
|
-
}), e.$$set = (
|
|
2492
|
-
"addEventListener" in
|
|
2495
|
+
i("pointerdown", m), i("pointermove", _), i("pointerup", b, !0);
|
|
2496
|
+
}), e.$$set = (A) => {
|
|
2497
|
+
"addEventListener" in A && n(5, i = A.addEventListener), "drawingMode" in A && n(6, s = A.drawingMode), "transform" in A && n(7, r = A.transform);
|
|
2493
2498
|
}, [a, u, f, h, g, i, s, r];
|
|
2494
2499
|
}
|
|
2495
|
-
class
|
|
2500
|
+
class Go extends te {
|
|
2496
2501
|
constructor(t) {
|
|
2497
|
-
super(), ee(this, t,
|
|
2502
|
+
super(), ee(this, t, Vo, No, W, {
|
|
2498
2503
|
addEventListener: 5,
|
|
2499
2504
|
drawingMode: 6,
|
|
2500
2505
|
transform: 7
|
|
@@ -2523,12 +2528,12 @@ function Mt(e) {
|
|
|
2523
2528
|
);
|
|
2524
2529
|
return {
|
|
2525
2530
|
c() {
|
|
2526
|
-
t =
|
|
2531
|
+
t = R("polygon"), o = R("polygon"), r && r.c(), s = ce(), d(t, "class", "a9s-outer"), d(t, "points", n = /*coords*/
|
|
2527
2532
|
e[16]), d(o, "class", "a9s-inner"), d(o, "points", i = /*coords*/
|
|
2528
2533
|
e[16]);
|
|
2529
2534
|
},
|
|
2530
2535
|
m(l, a) {
|
|
2531
|
-
|
|
2536
|
+
O(l, t, a), O(l, o, a), r && r.m(l, a), O(l, s, a);
|
|
2532
2537
|
},
|
|
2533
2538
|
p(l, a) {
|
|
2534
2539
|
a & /*isClosable, points, cursor*/
|
|
@@ -2539,7 +2544,7 @@ function Mt(e) {
|
|
|
2539
2544
|
l[2] ? r ? r.p(l, a) : (r = vt(l), r.c(), r.m(s.parentNode, s)) : r && (r.d(1), r = null);
|
|
2540
2545
|
},
|
|
2541
2546
|
d(l) {
|
|
2542
|
-
l && (
|
|
2547
|
+
l && (L(t), L(o), L(s)), r && r.d(l);
|
|
2543
2548
|
}
|
|
2544
2549
|
};
|
|
2545
2550
|
}
|
|
@@ -2547,7 +2552,7 @@ function vt(e) {
|
|
|
2547
2552
|
let t, n, o;
|
|
2548
2553
|
return {
|
|
2549
2554
|
c() {
|
|
2550
|
-
t =
|
|
2555
|
+
t = R("rect"), d(t, "class", "a9s-corner-handle"), d(t, "x", n = /*points*/
|
|
2551
2556
|
e[0][0][0] - /*handleSize*/
|
|
2552
2557
|
e[3] / 2), d(t, "y", o = /*points*/
|
|
2553
2558
|
e[0][0][1] - /*handleSize*/
|
|
@@ -2564,7 +2569,7 @@ function vt(e) {
|
|
|
2564
2569
|
);
|
|
2565
2570
|
},
|
|
2566
2571
|
m(i, s) {
|
|
2567
|
-
|
|
2572
|
+
O(i, t, s);
|
|
2568
2573
|
},
|
|
2569
2574
|
p(i, s) {
|
|
2570
2575
|
s & /*points, handleSize*/
|
|
@@ -2588,21 +2593,21 @@ function vt(e) {
|
|
|
2588
2593
|
);
|
|
2589
2594
|
},
|
|
2590
2595
|
d(i) {
|
|
2591
|
-
i &&
|
|
2596
|
+
i && L(t);
|
|
2592
2597
|
}
|
|
2593
2598
|
};
|
|
2594
2599
|
}
|
|
2595
|
-
function
|
|
2600
|
+
function zo(e) {
|
|
2596
2601
|
let t, n = (
|
|
2597
2602
|
/*cursor*/
|
|
2598
2603
|
e[1] && Mt(xe(e))
|
|
2599
2604
|
);
|
|
2600
2605
|
return {
|
|
2601
2606
|
c() {
|
|
2602
|
-
t =
|
|
2607
|
+
t = R("g"), n && n.c(), d(t, "class", "a9s-annotation a9s-rubberband");
|
|
2603
2608
|
},
|
|
2604
2609
|
m(o, i) {
|
|
2605
|
-
|
|
2610
|
+
O(o, t, i), n && n.m(t, null);
|
|
2606
2611
|
},
|
|
2607
2612
|
p(o, [i]) {
|
|
2608
2613
|
/*cursor*/
|
|
@@ -2611,46 +2616,46 @@ function Go(e) {
|
|
|
2611
2616
|
i: V,
|
|
2612
2617
|
o: V,
|
|
2613
2618
|
d(o) {
|
|
2614
|
-
o &&
|
|
2619
|
+
o && L(t), n && n.d();
|
|
2615
2620
|
}
|
|
2616
2621
|
};
|
|
2617
2622
|
}
|
|
2618
|
-
const
|
|
2619
|
-
function
|
|
2623
|
+
const Ho = 20, Fo = 1500;
|
|
2624
|
+
function jo(e, t, n) {
|
|
2620
2625
|
let o;
|
|
2621
2626
|
const i = Te();
|
|
2622
2627
|
let { addEventListener: s } = t, { drawingMode: r } = t, { transform: l } = t, { viewportScale: a = 1 } = t, c, u = [], f, h, g = !1;
|
|
2623
|
-
const m = (
|
|
2624
|
-
const
|
|
2625
|
-
if (c = { timeStamp:
|
|
2626
|
-
const p = l.elementToImage(
|
|
2628
|
+
const m = (w) => {
|
|
2629
|
+
const E = w, { timeStamp: B, offsetX: U, offsetY: X } = E;
|
|
2630
|
+
if (c = { timeStamp: B, offsetX: U, offsetY: X }, r === "drag" && u.length === 0) {
|
|
2631
|
+
const p = l.elementToImage(E.offsetX, E.offsetY);
|
|
2627
2632
|
u.push(p), n(1, f = p);
|
|
2628
2633
|
}
|
|
2629
|
-
}, _ = (
|
|
2630
|
-
const
|
|
2634
|
+
}, _ = (w) => {
|
|
2635
|
+
const E = w;
|
|
2631
2636
|
if (h && clearTimeout(h), u.length > 0) {
|
|
2632
|
-
if (n(1, f = l.elementToImage(
|
|
2633
|
-
const
|
|
2634
|
-
n(2, g =
|
|
2637
|
+
if (n(1, f = l.elementToImage(E.offsetX, E.offsetY)), u.length > 2) {
|
|
2638
|
+
const B = Qe(f, u[0]) * a;
|
|
2639
|
+
n(2, g = B < Ho);
|
|
2635
2640
|
}
|
|
2636
|
-
|
|
2641
|
+
E.pointerType === "touch" && (h = setTimeout(
|
|
2637
2642
|
() => {
|
|
2638
2643
|
y();
|
|
2639
2644
|
},
|
|
2640
|
-
|
|
2645
|
+
Fo
|
|
2641
2646
|
));
|
|
2642
2647
|
}
|
|
2643
|
-
},
|
|
2644
|
-
const
|
|
2648
|
+
}, b = (w) => {
|
|
2649
|
+
const E = w;
|
|
2645
2650
|
if (h && clearTimeout(h), r === "click") {
|
|
2646
|
-
const
|
|
2647
|
-
if (
|
|
2651
|
+
const B = E.timeStamp - c.timeStamp, U = Qe([c.offsetX, c.offsetY], [E.offsetX, E.offsetY]);
|
|
2652
|
+
if (B > 300 || U > 15)
|
|
2648
2653
|
return;
|
|
2649
2654
|
if (g)
|
|
2650
|
-
|
|
2655
|
+
A();
|
|
2651
2656
|
else if (u.length === 0) {
|
|
2652
|
-
const
|
|
2653
|
-
u.push(
|
|
2657
|
+
const X = l.elementToImage(E.offsetX, E.offsetY);
|
|
2658
|
+
u.push(X), n(1, f = X);
|
|
2654
2659
|
} else
|
|
2655
2660
|
u.push(f);
|
|
2656
2661
|
} else {
|
|
@@ -2658,30 +2663,30 @@ function Fo(e, t, n) {
|
|
|
2658
2663
|
n(0, u = []), n(1, f = void 0);
|
|
2659
2664
|
return;
|
|
2660
2665
|
}
|
|
2661
|
-
|
|
2666
|
+
E.stopImmediatePropagation(), g ? A() : u.push(f);
|
|
2662
2667
|
}
|
|
2663
2668
|
}, y = () => {
|
|
2664
2669
|
if (!f)
|
|
2665
2670
|
return;
|
|
2666
|
-
const
|
|
2671
|
+
const w = [...u, f], E = {
|
|
2667
2672
|
type: j.POLYGON,
|
|
2668
|
-
geometry: { bounds: Fe(
|
|
2673
|
+
geometry: { bounds: Fe(w), points: w }
|
|
2669
2674
|
};
|
|
2670
|
-
st(
|
|
2671
|
-
},
|
|
2672
|
-
const
|
|
2675
|
+
st(E) > 4 && (n(0, u = []), n(1, f = void 0), i("create", E));
|
|
2676
|
+
}, A = () => {
|
|
2677
|
+
const w = {
|
|
2673
2678
|
type: j.POLYGON,
|
|
2674
2679
|
geometry: {
|
|
2675
2680
|
bounds: Fe(u),
|
|
2676
2681
|
points: [...u]
|
|
2677
2682
|
}
|
|
2678
2683
|
};
|
|
2679
|
-
n(0, u = []), n(1, f = void 0), i("create",
|
|
2684
|
+
n(0, u = []), n(1, f = void 0), i("create", w);
|
|
2680
2685
|
};
|
|
2681
2686
|
return Pe(() => {
|
|
2682
|
-
s("pointerdown", m, !0), s("pointermove", _), s("pointerup",
|
|
2683
|
-
}), e.$$set = (
|
|
2684
|
-
"addEventListener" in
|
|
2687
|
+
s("pointerdown", m, !0), s("pointermove", _), s("pointerup", b, !0), s("dblclick", y, !0);
|
|
2688
|
+
}), e.$$set = (w) => {
|
|
2689
|
+
"addEventListener" in w && n(4, s = w.addEventListener), "drawingMode" in w && n(5, r = w.drawingMode), "transform" in w && n(6, l = w.transform), "viewportScale" in w && n(7, a = w.viewportScale);
|
|
2685
2690
|
}, e.$$.update = () => {
|
|
2686
2691
|
e.$$.dirty & /*viewportScale*/
|
|
2687
2692
|
128 && n(3, o = 10 / a);
|
|
@@ -2696,9 +2701,9 @@ function Fo(e, t, n) {
|
|
|
2696
2701
|
a
|
|
2697
2702
|
];
|
|
2698
2703
|
}
|
|
2699
|
-
class
|
|
2704
|
+
class qo extends te {
|
|
2700
2705
|
constructor(t) {
|
|
2701
|
-
super(), ee(this, t,
|
|
2706
|
+
super(), ee(this, t, jo, zo, W, {
|
|
2702
2707
|
addEventListener: 4,
|
|
2703
2708
|
drawingMode: 5,
|
|
2704
2709
|
transform: 6,
|
|
@@ -2707,14 +2712,14 @@ class jo extends te {
|
|
|
2707
2712
|
}
|
|
2708
2713
|
}
|
|
2709
2714
|
const ft = /* @__PURE__ */ new Map([
|
|
2710
|
-
["rectangle", { tool:
|
|
2711
|
-
["polygon", { tool:
|
|
2712
|
-
]), xt = () => [...ft.keys()], $t = (e) => ft.get(e),
|
|
2713
|
-
function
|
|
2715
|
+
["rectangle", { tool: Go }],
|
|
2716
|
+
["polygon", { tool: qo }]
|
|
2717
|
+
]), xt = () => [...ft.keys()], $t = (e) => ft.get(e), Ko = (e, t, n) => ft.set(e, { tool: t, opts: n });
|
|
2718
|
+
function Wo(e) {
|
|
2714
2719
|
let t, n, o, i, s;
|
|
2715
2720
|
return {
|
|
2716
2721
|
c() {
|
|
2717
|
-
t =
|
|
2722
|
+
t = R("g"), n = R("ellipse"), i = R("ellipse"), d(n, "class", "a9s-outer"), d(n, "style", o = /*computedStyle*/
|
|
2718
2723
|
e[1] ? "display:none;" : void 0), d(
|
|
2719
2724
|
n,
|
|
2720
2725
|
"cx",
|
|
@@ -2764,7 +2769,7 @@ function Ko(e) {
|
|
|
2764
2769
|
e[0].id);
|
|
2765
2770
|
},
|
|
2766
2771
|
m(r, l) {
|
|
2767
|
-
|
|
2772
|
+
O(r, t, l), se(t, n), se(t, i);
|
|
2768
2773
|
},
|
|
2769
2774
|
p(r, [l]) {
|
|
2770
2775
|
l & /*computedStyle*/
|
|
@@ -2782,11 +2787,11 @@ function Ko(e) {
|
|
|
2782
2787
|
i: V,
|
|
2783
2788
|
o: V,
|
|
2784
2789
|
d(r) {
|
|
2785
|
-
r &&
|
|
2790
|
+
r && L(t);
|
|
2786
2791
|
}
|
|
2787
2792
|
};
|
|
2788
2793
|
}
|
|
2789
|
-
function
|
|
2794
|
+
function Jo(e, t, n) {
|
|
2790
2795
|
let o, { annotation: i } = t, { geom: s } = t, { style: r } = t;
|
|
2791
2796
|
const { cx: l, cy: a, rx: c, ry: u } = s;
|
|
2792
2797
|
return e.$$set = (f) => {
|
|
@@ -2796,21 +2801,21 @@ function Wo(e, t, n) {
|
|
|
2796
2801
|
129 && n(1, o = je(i, r));
|
|
2797
2802
|
}, [i, o, l, a, c, u, s, r];
|
|
2798
2803
|
}
|
|
2799
|
-
class
|
|
2804
|
+
class Zo extends te {
|
|
2800
2805
|
constructor(t) {
|
|
2801
|
-
super(), ee(this, t,
|
|
2806
|
+
super(), ee(this, t, Jo, Wo, W, { annotation: 0, geom: 6, style: 7 });
|
|
2802
2807
|
}
|
|
2803
2808
|
}
|
|
2804
|
-
function
|
|
2809
|
+
function Qo(e) {
|
|
2805
2810
|
let t, n, o, i, s;
|
|
2806
2811
|
return {
|
|
2807
2812
|
c() {
|
|
2808
|
-
t =
|
|
2813
|
+
t = R("g"), n = R("polygon"), i = R("polygon"), d(n, "class", "a9s-outer"), d(n, "style", o = /*computedStyle*/
|
|
2809
2814
|
e[1] ? "display:none;" : void 0), d(
|
|
2810
2815
|
n,
|
|
2811
2816
|
"points",
|
|
2812
2817
|
/*points*/
|
|
2813
|
-
e[2].map(
|
|
2818
|
+
e[2].map(xo).join(" ")
|
|
2814
2819
|
), d(i, "class", "a9s-inner"), d(
|
|
2815
2820
|
i,
|
|
2816
2821
|
"style",
|
|
@@ -2820,12 +2825,12 @@ function Zo(e) {
|
|
|
2820
2825
|
i,
|
|
2821
2826
|
"points",
|
|
2822
2827
|
/*points*/
|
|
2823
|
-
e[2].map(
|
|
2828
|
+
e[2].map($o).join(" ")
|
|
2824
2829
|
), d(t, "data-id", s = /*annotation*/
|
|
2825
2830
|
e[0].id);
|
|
2826
2831
|
},
|
|
2827
2832
|
m(r, l) {
|
|
2828
|
-
|
|
2833
|
+
O(r, t, l), se(t, n), se(t, i);
|
|
2829
2834
|
},
|
|
2830
2835
|
p(r, [l]) {
|
|
2831
2836
|
l & /*computedStyle*/
|
|
@@ -2843,12 +2848,12 @@ function Zo(e) {
|
|
|
2843
2848
|
i: V,
|
|
2844
2849
|
o: V,
|
|
2845
2850
|
d(r) {
|
|
2846
|
-
r &&
|
|
2851
|
+
r && L(t);
|
|
2847
2852
|
}
|
|
2848
2853
|
};
|
|
2849
2854
|
}
|
|
2850
|
-
const
|
|
2851
|
-
function
|
|
2855
|
+
const xo = (e) => e.join(","), $o = (e) => e.join(",");
|
|
2856
|
+
function ei(e, t, n) {
|
|
2852
2857
|
let o, { annotation: i } = t, { geom: s } = t, { style: r } = t;
|
|
2853
2858
|
const { points: l } = s;
|
|
2854
2859
|
return e.$$set = (a) => {
|
|
@@ -2858,16 +2863,16 @@ function $o(e, t, n) {
|
|
|
2858
2863
|
17 && n(1, o = je(i, r));
|
|
2859
2864
|
}, [i, o, l, s, r];
|
|
2860
2865
|
}
|
|
2861
|
-
class
|
|
2866
|
+
class ti extends te {
|
|
2862
2867
|
constructor(t) {
|
|
2863
|
-
super(), ee(this, t,
|
|
2868
|
+
super(), ee(this, t, ei, Qo, W, { annotation: 0, geom: 3, style: 4 });
|
|
2864
2869
|
}
|
|
2865
2870
|
}
|
|
2866
|
-
function
|
|
2871
|
+
function ni(e) {
|
|
2867
2872
|
let t, n, o, i, s;
|
|
2868
2873
|
return {
|
|
2869
2874
|
c() {
|
|
2870
|
-
t =
|
|
2875
|
+
t = R("g"), n = R("rect"), i = R("rect"), d(n, "class", "a9s-outer"), d(n, "style", o = /*computedStyle*/
|
|
2871
2876
|
e[5] ? "display:none;" : void 0), d(
|
|
2872
2877
|
n,
|
|
2873
2878
|
"x",
|
|
@@ -2917,7 +2922,7 @@ function ti(e) {
|
|
|
2917
2922
|
e[0].id);
|
|
2918
2923
|
},
|
|
2919
2924
|
m(r, l) {
|
|
2920
|
-
|
|
2925
|
+
O(r, t, l), se(t, n), se(t, i);
|
|
2921
2926
|
},
|
|
2922
2927
|
p(r, [l]) {
|
|
2923
2928
|
l & /*computedStyle*/
|
|
@@ -2983,11 +2988,11 @@ function ti(e) {
|
|
|
2983
2988
|
i: V,
|
|
2984
2989
|
o: V,
|
|
2985
2990
|
d(r) {
|
|
2986
|
-
r &&
|
|
2991
|
+
r && L(t);
|
|
2987
2992
|
}
|
|
2988
2993
|
};
|
|
2989
2994
|
}
|
|
2990
|
-
function
|
|
2995
|
+
function oi(e, t, n) {
|
|
2991
2996
|
let o, i, s, r, l, { annotation: a } = t, { geom: c } = t, { style: u } = t;
|
|
2992
2997
|
return e.$$set = (f) => {
|
|
2993
2998
|
"annotation" in f && n(0, a = f.annotation), "geom" in f && n(6, c = f.geom), "style" in f && n(7, u = f.style);
|
|
@@ -2997,30 +3002,30 @@ function ni(e, t, n) {
|
|
|
2997
3002
|
64 && n(4, { x: i, y: s, w: r, h: l } = c, i, (n(3, s), n(6, c)), (n(2, r), n(6, c)), (n(1, l), n(6, c)));
|
|
2998
3003
|
}, [a, l, r, s, i, o, c, u];
|
|
2999
3004
|
}
|
|
3000
|
-
class
|
|
3005
|
+
class ii extends te {
|
|
3001
3006
|
constructor(t) {
|
|
3002
|
-
super(), ee(this, t,
|
|
3007
|
+
super(), ee(this, t, oi, ni, W, { annotation: 0, geom: 6, style: 7 });
|
|
3003
3008
|
}
|
|
3004
3009
|
}
|
|
3005
|
-
const
|
|
3010
|
+
const Ci = {
|
|
3006
3011
|
elementToImage: (e, t) => [e, t]
|
|
3007
|
-
},
|
|
3012
|
+
}, si = (e) => ({
|
|
3008
3013
|
elementToImage: (t, n) => {
|
|
3009
3014
|
const o = e.getBoundingClientRect(), i = e.createSVGPoint();
|
|
3010
3015
|
i.x = t + o.x, i.y = n + o.y;
|
|
3011
3016
|
const { x: s, y: r } = i.matrixTransform(e.getScreenCTM().inverse());
|
|
3012
3017
|
return [s, r];
|
|
3013
3018
|
}
|
|
3014
|
-
}),
|
|
3019
|
+
}), ri = 250, li = (e, t) => {
|
|
3015
3020
|
const n = Te();
|
|
3016
3021
|
let o;
|
|
3017
3022
|
return { onPointerDown: () => o = performance.now(), onPointerUp: (r) => {
|
|
3018
|
-
if (performance.now() - o <
|
|
3019
|
-
const { x: a, y: c } =
|
|
3023
|
+
if (performance.now() - o < ri) {
|
|
3024
|
+
const { x: a, y: c } = ai(r, e), u = t.getAt(a, c);
|
|
3020
3025
|
u ? n("click", { originalEvent: r, annotation: u }) : n("click", { originalEvent: r });
|
|
3021
3026
|
}
|
|
3022
3027
|
} };
|
|
3023
|
-
},
|
|
3028
|
+
}, ai = (e, t) => {
|
|
3024
3029
|
const n = t.createSVGPoint(), o = t.getBoundingClientRect(), i = e.clientX - o.x, s = e.clientY - o.y, { left: r, top: l } = t.getBoundingClientRect();
|
|
3025
3030
|
return n.x = i + r, n.y = s + l, n.matrixTransform(t.getScreenCTM().inverse());
|
|
3026
3031
|
}, { Boolean: en } = fn;
|
|
@@ -3049,27 +3054,27 @@ function Ot(e) {
|
|
|
3049
3054
|
i.c(), n = ce();
|
|
3050
3055
|
},
|
|
3051
3056
|
m(s, r) {
|
|
3052
|
-
i.m(s, r),
|
|
3057
|
+
i.m(s, r), O(s, n, r), o = !0;
|
|
3053
3058
|
},
|
|
3054
3059
|
p(s, r) {
|
|
3055
3060
|
r[0] & /*$store*/
|
|
3056
3061
|
8192 && W(t, t = /*annotation*/
|
|
3057
|
-
s[33].id) ? (re(),
|
|
3062
|
+
s[33].id) ? (re(), D(i, 1, 1, V), le(), i = Bt(s), i.c(), P(i, 1), i.m(n.parentNode, n)) : i.p(s, r);
|
|
3058
3063
|
},
|
|
3059
3064
|
i(s) {
|
|
3060
3065
|
o || (P(i), o = !0);
|
|
3061
3066
|
},
|
|
3062
3067
|
o(s) {
|
|
3063
|
-
|
|
3068
|
+
D(i), o = !1;
|
|
3064
3069
|
},
|
|
3065
3070
|
d(s) {
|
|
3066
|
-
s &&
|
|
3071
|
+
s && L(n), i.d(s);
|
|
3067
3072
|
}
|
|
3068
3073
|
};
|
|
3069
3074
|
}
|
|
3070
|
-
function
|
|
3075
|
+
function ci(e) {
|
|
3071
3076
|
let t, n;
|
|
3072
|
-
return t = new
|
|
3077
|
+
return t = new ti({
|
|
3073
3078
|
props: {
|
|
3074
3079
|
annotation: (
|
|
3075
3080
|
/*annotation*/
|
|
@@ -3105,16 +3110,16 @@ function ai(e) {
|
|
|
3105
3110
|
n || (P(t.$$.fragment, o), n = !0);
|
|
3106
3111
|
},
|
|
3107
3112
|
o(o) {
|
|
3108
|
-
|
|
3113
|
+
D(t.$$.fragment, o), n = !1;
|
|
3109
3114
|
},
|
|
3110
3115
|
d(o) {
|
|
3111
3116
|
x(t, o);
|
|
3112
3117
|
}
|
|
3113
3118
|
};
|
|
3114
3119
|
}
|
|
3115
|
-
function
|
|
3120
|
+
function fi(e) {
|
|
3116
3121
|
let t, n;
|
|
3117
|
-
return t = new
|
|
3122
|
+
return t = new ii({
|
|
3118
3123
|
props: {
|
|
3119
3124
|
annotation: (
|
|
3120
3125
|
/*annotation*/
|
|
@@ -3150,16 +3155,16 @@ function ci(e) {
|
|
|
3150
3155
|
n || (P(t.$$.fragment, o), n = !0);
|
|
3151
3156
|
},
|
|
3152
3157
|
o(o) {
|
|
3153
|
-
|
|
3158
|
+
D(t.$$.fragment, o), n = !1;
|
|
3154
3159
|
},
|
|
3155
3160
|
d(o) {
|
|
3156
3161
|
x(t, o);
|
|
3157
3162
|
}
|
|
3158
3163
|
};
|
|
3159
3164
|
}
|
|
3160
|
-
function
|
|
3165
|
+
function ui(e) {
|
|
3161
3166
|
let t, n;
|
|
3162
|
-
return t = new
|
|
3167
|
+
return t = new Zo({
|
|
3163
3168
|
props: {
|
|
3164
3169
|
annotation: (
|
|
3165
3170
|
/*annotation*/
|
|
@@ -3195,7 +3200,7 @@ function fi(e) {
|
|
|
3195
3200
|
n || (P(t.$$.fragment, o), n = !0);
|
|
3196
3201
|
},
|
|
3197
3202
|
o(o) {
|
|
3198
|
-
|
|
3203
|
+
D(t.$$.fragment, o), n = !1;
|
|
3199
3204
|
},
|
|
3200
3205
|
d(o) {
|
|
3201
3206
|
x(t, o);
|
|
@@ -3204,7 +3209,7 @@ function fi(e) {
|
|
|
3204
3209
|
}
|
|
3205
3210
|
function Bt(e) {
|
|
3206
3211
|
let t, n, o, i;
|
|
3207
|
-
const s = [fi, ci
|
|
3212
|
+
const s = [ui, fi, ci], r = [];
|
|
3208
3213
|
function l(a, c) {
|
|
3209
3214
|
return (
|
|
3210
3215
|
/*selector*/
|
|
@@ -3222,11 +3227,11 @@ function Bt(e) {
|
|
|
3222
3227
|
n && n.c(), o = ce();
|
|
3223
3228
|
},
|
|
3224
3229
|
m(a, c) {
|
|
3225
|
-
~t && r[t].m(a, c),
|
|
3230
|
+
~t && r[t].m(a, c), O(a, o, c), i = !0;
|
|
3226
3231
|
},
|
|
3227
3232
|
p(a, c) {
|
|
3228
3233
|
let u = t;
|
|
3229
|
-
t = l(a), t === u ? ~t && r[t].p(a, c) : (n && (re(),
|
|
3234
|
+
t = l(a), t === u ? ~t && r[t].p(a, c) : (n && (re(), D(r[u], 1, 1, () => {
|
|
3230
3235
|
r[u] = null;
|
|
3231
3236
|
}), le()), ~t ? (n = r[t], n ? n.p(a, c) : (n = r[t] = s[t](a), n.c()), P(n, 1), n.m(o.parentNode, o)) : n = null);
|
|
3232
3237
|
},
|
|
@@ -3234,10 +3239,10 @@ function Bt(e) {
|
|
|
3234
3239
|
i || (P(n), i = !0);
|
|
3235
3240
|
},
|
|
3236
3241
|
o(a) {
|
|
3237
|
-
|
|
3242
|
+
D(n), i = !1;
|
|
3238
3243
|
},
|
|
3239
3244
|
d(a) {
|
|
3240
|
-
a &&
|
|
3245
|
+
a && L(o), ~t && r[t].d(a);
|
|
3241
3246
|
}
|
|
3242
3247
|
};
|
|
3243
3248
|
}
|
|
@@ -3252,7 +3257,7 @@ function It(e) {
|
|
|
3252
3257
|
i && i.c(), n = ce();
|
|
3253
3258
|
},
|
|
3254
3259
|
m(s, r) {
|
|
3255
|
-
i && i.m(s, r),
|
|
3260
|
+
i && i.m(s, r), O(s, n, r), o = !0;
|
|
3256
3261
|
},
|
|
3257
3262
|
p(s, r) {
|
|
3258
3263
|
r[0] & /*isEditable, $store*/
|
|
@@ -3261,7 +3266,7 @@ function It(e) {
|
|
|
3261
3266
|
/*annotation*/
|
|
3262
3267
|
s[33]
|
|
3263
3268
|
)), t ? i ? (i.p($e(s), r), r[0] & /*isEditable, $store*/
|
|
3264
|
-
8320 && P(i, 1)) : (i = Ot($e(s)), i.c(), P(i, 1), i.m(n.parentNode, n)) : i && (re(),
|
|
3269
|
+
8320 && P(i, 1)) : (i = Ot($e(s)), i.c(), P(i, 1), i.m(n.parentNode, n)) : i && (re(), D(i, 1, 1, () => {
|
|
3265
3270
|
i = null;
|
|
3266
3271
|
}), le());
|
|
3267
3272
|
},
|
|
@@ -3269,16 +3274,16 @@ function It(e) {
|
|
|
3269
3274
|
o || (P(i), o = !0);
|
|
3270
3275
|
},
|
|
3271
3276
|
o(s) {
|
|
3272
|
-
|
|
3277
|
+
D(i), o = !1;
|
|
3273
3278
|
},
|
|
3274
3279
|
d(s) {
|
|
3275
|
-
s &&
|
|
3280
|
+
s && L(n), i && i.d(s);
|
|
3276
3281
|
}
|
|
3277
3282
|
};
|
|
3278
3283
|
}
|
|
3279
3284
|
function Pt(e) {
|
|
3280
3285
|
let t, n, o, i;
|
|
3281
|
-
const s = [
|
|
3286
|
+
const s = [hi, di], r = [];
|
|
3282
3287
|
function l(a, c) {
|
|
3283
3288
|
return (
|
|
3284
3289
|
/*editableAnnotations*/
|
|
@@ -3294,11 +3299,11 @@ function Pt(e) {
|
|
|
3294
3299
|
n && n.c(), o = ce();
|
|
3295
3300
|
},
|
|
3296
3301
|
m(a, c) {
|
|
3297
|
-
~t && r[t].m(a, c),
|
|
3302
|
+
~t && r[t].m(a, c), O(a, o, c), i = !0;
|
|
3298
3303
|
},
|
|
3299
3304
|
p(a, c) {
|
|
3300
3305
|
let u = t;
|
|
3301
|
-
t = l(a), t === u ? ~t && r[t].p(a, c) : (n && (re(),
|
|
3306
|
+
t = l(a), t === u ? ~t && r[t].p(a, c) : (n && (re(), D(r[u], 1, 1, () => {
|
|
3302
3307
|
r[u] = null;
|
|
3303
3308
|
}), le()), ~t ? (n = r[t], n ? n.p(a, c) : (n = r[t] = s[t](a), n.c()), P(n, 1), n.m(o.parentNode, o)) : n = null);
|
|
3304
3309
|
},
|
|
@@ -3306,14 +3311,14 @@ function Pt(e) {
|
|
|
3306
3311
|
i || (P(n), i = !0);
|
|
3307
3312
|
},
|
|
3308
3313
|
o(a) {
|
|
3309
|
-
|
|
3314
|
+
D(n), i = !1;
|
|
3310
3315
|
},
|
|
3311
3316
|
d(a) {
|
|
3312
|
-
a &&
|
|
3317
|
+
a && L(o), ~t && r[t].d(a);
|
|
3313
3318
|
}
|
|
3314
3319
|
};
|
|
3315
3320
|
}
|
|
3316
|
-
function
|
|
3321
|
+
function di(e) {
|
|
3317
3322
|
let t = (
|
|
3318
3323
|
/*toolName*/
|
|
3319
3324
|
e[2]
|
|
@@ -3323,32 +3328,32 @@ function ui(e) {
|
|
|
3323
3328
|
i.c(), n = ce();
|
|
3324
3329
|
},
|
|
3325
3330
|
m(s, r) {
|
|
3326
|
-
i.m(s, r),
|
|
3331
|
+
i.m(s, r), O(s, n, r), o = !0;
|
|
3327
3332
|
},
|
|
3328
3333
|
p(s, r) {
|
|
3329
3334
|
r[0] & /*toolName*/
|
|
3330
3335
|
4 && W(t, t = /*toolName*/
|
|
3331
|
-
s[2]) ? (re(),
|
|
3336
|
+
s[2]) ? (re(), D(i, 1, 1, V), le(), i = Yt(s), i.c(), P(i, 1), i.m(n.parentNode, n)) : i.p(s, r);
|
|
3332
3337
|
},
|
|
3333
3338
|
i(s) {
|
|
3334
3339
|
o || (P(i), o = !0);
|
|
3335
3340
|
},
|
|
3336
3341
|
o(s) {
|
|
3337
|
-
|
|
3342
|
+
D(i), o = !1;
|
|
3338
3343
|
},
|
|
3339
3344
|
d(s) {
|
|
3340
|
-
s &&
|
|
3345
|
+
s && L(n), i.d(s);
|
|
3341
3346
|
}
|
|
3342
3347
|
};
|
|
3343
3348
|
}
|
|
3344
|
-
function
|
|
3349
|
+
function hi(e) {
|
|
3345
3350
|
let t, n, o = Se(
|
|
3346
3351
|
/*editableAnnotations*/
|
|
3347
3352
|
e[6]
|
|
3348
3353
|
), i = [];
|
|
3349
3354
|
for (let r = 0; r < o.length; r += 1)
|
|
3350
|
-
i[r] =
|
|
3351
|
-
const s = (r) =>
|
|
3355
|
+
i[r] = Dt(Lt(e, o, r));
|
|
3356
|
+
const s = (r) => D(i[r], 1, 1, () => {
|
|
3352
3357
|
i[r] = null;
|
|
3353
3358
|
});
|
|
3354
3359
|
return {
|
|
@@ -3360,7 +3365,7 @@ function di(e) {
|
|
|
3360
3365
|
m(r, l) {
|
|
3361
3366
|
for (let a = 0; a < i.length; a += 1)
|
|
3362
3367
|
i[a] && i[a].m(r, l);
|
|
3363
|
-
|
|
3368
|
+
O(r, t, l), n = !0;
|
|
3364
3369
|
},
|
|
3365
3370
|
p(r, l) {
|
|
3366
3371
|
if (l[0] & /*editableAnnotations, drawingEl, getEditor, style, transform, $scale, onChangeSelected*/
|
|
@@ -3372,7 +3377,7 @@ function di(e) {
|
|
|
3372
3377
|
let a;
|
|
3373
3378
|
for (a = 0; a < o.length; a += 1) {
|
|
3374
3379
|
const c = Lt(r, o, a);
|
|
3375
|
-
i[a] ? (i[a].p(c, l), P(i[a], 1)) : (i[a] =
|
|
3380
|
+
i[a] ? (i[a].p(c, l), P(i[a], 1)) : (i[a] = Dt(c), i[a].c(), P(i[a], 1), i[a].m(t.parentNode, t));
|
|
3376
3381
|
}
|
|
3377
3382
|
for (re(), a = o.length; a < i.length; a += 1)
|
|
3378
3383
|
s(a);
|
|
@@ -3389,17 +3394,17 @@ function di(e) {
|
|
|
3389
3394
|
o(r) {
|
|
3390
3395
|
i = i.filter(en);
|
|
3391
3396
|
for (let l = 0; l < i.length; l += 1)
|
|
3392
|
-
|
|
3397
|
+
D(i[l]);
|
|
3393
3398
|
n = !1;
|
|
3394
3399
|
},
|
|
3395
3400
|
d(r) {
|
|
3396
|
-
r &&
|
|
3401
|
+
r && L(t), rt(i, r);
|
|
3397
3402
|
}
|
|
3398
3403
|
};
|
|
3399
3404
|
}
|
|
3400
3405
|
function Yt(e) {
|
|
3401
3406
|
let t, n;
|
|
3402
|
-
return t = new
|
|
3407
|
+
return t = new Uo({
|
|
3403
3408
|
props: {
|
|
3404
3409
|
target: (
|
|
3405
3410
|
/*drawingEl*/
|
|
@@ -3451,14 +3456,14 @@ function Yt(e) {
|
|
|
3451
3456
|
n || (P(t.$$.fragment, o), n = !0);
|
|
3452
3457
|
},
|
|
3453
3458
|
o(o) {
|
|
3454
|
-
|
|
3459
|
+
D(t.$$.fragment, o), n = !1;
|
|
3455
3460
|
},
|
|
3456
3461
|
d(o) {
|
|
3457
3462
|
x(t, o);
|
|
3458
3463
|
}
|
|
3459
3464
|
};
|
|
3460
3465
|
}
|
|
3461
|
-
function
|
|
3466
|
+
function Ct(e) {
|
|
3462
3467
|
let t, n;
|
|
3463
3468
|
return t = new Xo({
|
|
3464
3469
|
props: {
|
|
@@ -3532,49 +3537,49 @@ function Dt(e) {
|
|
|
3532
3537
|
n || (P(t.$$.fragment, o), n = !0);
|
|
3533
3538
|
},
|
|
3534
3539
|
o(o) {
|
|
3535
|
-
|
|
3540
|
+
D(t.$$.fragment, o), n = !1;
|
|
3536
3541
|
},
|
|
3537
3542
|
d(o) {
|
|
3538
3543
|
x(t, o);
|
|
3539
3544
|
}
|
|
3540
3545
|
};
|
|
3541
3546
|
}
|
|
3542
|
-
function
|
|
3547
|
+
function Dt(e) {
|
|
3543
3548
|
let t = (
|
|
3544
3549
|
/*editable*/
|
|
3545
3550
|
e[30].id
|
|
3546
|
-
), n, o, i =
|
|
3551
|
+
), n, o, i = Ct(e);
|
|
3547
3552
|
return {
|
|
3548
3553
|
c() {
|
|
3549
3554
|
i.c(), n = ce();
|
|
3550
3555
|
},
|
|
3551
3556
|
m(s, r) {
|
|
3552
|
-
i.m(s, r),
|
|
3557
|
+
i.m(s, r), O(s, n, r), o = !0;
|
|
3553
3558
|
},
|
|
3554
3559
|
p(s, r) {
|
|
3555
3560
|
r[0] & /*editableAnnotations*/
|
|
3556
3561
|
64 && W(t, t = /*editable*/
|
|
3557
|
-
s[30].id) ? (re(),
|
|
3562
|
+
s[30].id) ? (re(), D(i, 1, 1, V), le(), i = Ct(s), i.c(), P(i, 1), i.m(n.parentNode, n)) : i.p(s, r);
|
|
3558
3563
|
},
|
|
3559
3564
|
i(s) {
|
|
3560
3565
|
o || (P(i), o = !0);
|
|
3561
3566
|
},
|
|
3562
3567
|
o(s) {
|
|
3563
|
-
|
|
3568
|
+
D(i), o = !1;
|
|
3564
3569
|
},
|
|
3565
3570
|
d(s) {
|
|
3566
|
-
s &&
|
|
3571
|
+
s && L(n), i.d(s);
|
|
3567
3572
|
}
|
|
3568
3573
|
};
|
|
3569
3574
|
}
|
|
3570
|
-
function
|
|
3575
|
+
function gi(e) {
|
|
3571
3576
|
let t, n, o, i, s, r, l = Se(
|
|
3572
3577
|
/*$store*/
|
|
3573
3578
|
e[13]
|
|
3574
3579
|
), a = [];
|
|
3575
3580
|
for (let f = 0; f < l.length; f += 1)
|
|
3576
3581
|
a[f] = It(kt(e, l, f));
|
|
3577
|
-
const c = (f) =>
|
|
3582
|
+
const c = (f) => D(a[f], 1, 1, () => {
|
|
3578
3583
|
a[f] = null;
|
|
3579
3584
|
});
|
|
3580
3585
|
let u = (
|
|
@@ -3583,10 +3588,10 @@ function hi(e) {
|
|
|
3583
3588
|
);
|
|
3584
3589
|
return {
|
|
3585
3590
|
c() {
|
|
3586
|
-
t =
|
|
3591
|
+
t = R("svg"), n = R("g");
|
|
3587
3592
|
for (let f = 0; f < a.length; f += 1)
|
|
3588
3593
|
a[f].c();
|
|
3589
|
-
o =
|
|
3594
|
+
o = R("g"), u && u.c(), d(o, "class", "drawing"), d(t, "class", "a9s-annotationlayer"), ze(
|
|
3590
3595
|
t,
|
|
3591
3596
|
"drawing",
|
|
3592
3597
|
/*tool*/
|
|
@@ -3594,7 +3599,7 @@ function hi(e) {
|
|
|
3594
3599
|
);
|
|
3595
3600
|
},
|
|
3596
3601
|
m(f, h) {
|
|
3597
|
-
|
|
3602
|
+
O(f, t, h), se(t, n);
|
|
3598
3603
|
for (let g = 0; g < a.length; g += 1)
|
|
3599
3604
|
a[g] && a[g].m(n, null);
|
|
3600
3605
|
se(t, o), u && u.m(o, null), e[26](o), e[27](t), i = !0, s || (r = [
|
|
@@ -3630,7 +3635,7 @@ function hi(e) {
|
|
|
3630
3635
|
}
|
|
3631
3636
|
/*drawingEl*/
|
|
3632
3637
|
e[4] ? u ? (u.p(e, h), h[0] & /*drawingEl*/
|
|
3633
|
-
16 && P(u, 1)) : (u = Pt(e), u.c(), P(u, 1), u.m(o, null)) : u && (re(),
|
|
3638
|
+
16 && P(u, 1)) : (u = Pt(e), u.c(), P(u, 1), u.m(o, null)) : u && (re(), D(u, 1, 1, () => {
|
|
3634
3639
|
u = null;
|
|
3635
3640
|
}), le()), (!i || h[0] & /*tool*/
|
|
3636
3641
|
4096) && ze(
|
|
@@ -3650,29 +3655,29 @@ function hi(e) {
|
|
|
3650
3655
|
o(f) {
|
|
3651
3656
|
a = a.filter(en);
|
|
3652
3657
|
for (let h = 0; h < a.length; h += 1)
|
|
3653
|
-
|
|
3654
|
-
|
|
3658
|
+
D(a[h]);
|
|
3659
|
+
D(u), i = !1;
|
|
3655
3660
|
},
|
|
3656
3661
|
d(f) {
|
|
3657
|
-
f &&
|
|
3662
|
+
f && L(t), rt(a, f), u && u.d(), e[26](null), e[27](null), s = !1, ae(r);
|
|
3658
3663
|
}
|
|
3659
3664
|
};
|
|
3660
3665
|
}
|
|
3661
|
-
function
|
|
3666
|
+
function mi(e, t, n) {
|
|
3662
3667
|
let o, i, s, r, l, a, c, u, f, h, g = V, m = () => (g(), g = Vt(p, (I) => n(14, h = I)), p);
|
|
3663
3668
|
e.$$.on_destroy.push(() => g());
|
|
3664
|
-
let { drawingEnabled: _ } = t, { image:
|
|
3665
|
-
Pe(() => m(n(5, p =
|
|
3666
|
-
const { selection: T, store: S } =
|
|
3669
|
+
let { drawingEnabled: _ } = t, { image: b } = t, { preferredDrawingMode: y } = t, { state: A } = t, { style: w = void 0 } = t, { toolName: E = xt()[0] } = t, { user: B } = t, U, X, p;
|
|
3670
|
+
Pe(() => m(n(5, p = bo(b, X))));
|
|
3671
|
+
const { selection: T, store: S } = A;
|
|
3667
3672
|
ht(e, T, (I) => n(25, u = I)), ht(e, S, (I) => n(13, f = I));
|
|
3668
|
-
let M,
|
|
3669
|
-
const
|
|
3673
|
+
let M, k;
|
|
3674
|
+
const C = (I) => {
|
|
3670
3675
|
M && S.unobserve(M);
|
|
3671
3676
|
const z = I.filter(({ editable: H }) => H).map(({ id: H }) => H);
|
|
3672
|
-
z.length > 0 ? (n(6,
|
|
3677
|
+
z.length > 0 ? (n(6, k = z.map((H) => S.getAnnotation(H)).filter(Boolean)), M = (H) => {
|
|
3673
3678
|
const { updated: J } = H.changes;
|
|
3674
|
-
n(6,
|
|
3675
|
-
}, S.observe(M, { annotations: z })) : n(6,
|
|
3679
|
+
n(6, k = J == null ? void 0 : J.map((fe) => fe.newValue));
|
|
3680
|
+
}, S.observe(M, { annotations: z })) : n(6, k = void 0);
|
|
3676
3681
|
}, Z = (I) => {
|
|
3677
3682
|
const z = qt(), H = {
|
|
3678
3683
|
id: z,
|
|
@@ -3680,50 +3685,50 @@ function gi(e, t, n) {
|
|
|
3680
3685
|
target: {
|
|
3681
3686
|
annotation: z,
|
|
3682
3687
|
selector: I.detail,
|
|
3683
|
-
creator:
|
|
3688
|
+
creator: B,
|
|
3684
3689
|
created: /* @__PURE__ */ new Date()
|
|
3685
3690
|
}
|
|
3686
3691
|
};
|
|
3687
3692
|
S.addAnnotation(H), T.setSelected(H.id);
|
|
3688
3693
|
}, ge = (I) => (z) => {
|
|
3689
3694
|
var ne;
|
|
3690
|
-
const { target: H } = I, J = 10 * 60 * 1e3, fe = ((ne = H.creator) == null ? void 0 : ne.id) !==
|
|
3695
|
+
const { target: H } = I, J = 10 * 60 * 1e3, fe = ((ne = H.creator) == null ? void 0 : ne.id) !== B.id || !H.created || (/* @__PURE__ */ new Date()).getTime() - H.created.getTime() > J;
|
|
3691
3696
|
S.updateTarget({
|
|
3692
3697
|
...H,
|
|
3693
3698
|
selector: z.detail,
|
|
3694
3699
|
created: fe ? H.created : /* @__PURE__ */ new Date(),
|
|
3695
3700
|
updated: fe ? /* @__PURE__ */ new Date() : void 0,
|
|
3696
|
-
updatedBy: fe ?
|
|
3701
|
+
updatedBy: fe ? B : void 0
|
|
3697
3702
|
});
|
|
3698
|
-
}, me = (I) =>
|
|
3703
|
+
}, me = (I) => Bo(I);
|
|
3699
3704
|
function Me(I) {
|
|
3700
3705
|
He[I ? "unshift" : "push"](() => {
|
|
3701
|
-
|
|
3706
|
+
U = I, n(4, U);
|
|
3702
3707
|
});
|
|
3703
3708
|
}
|
|
3704
3709
|
function ie(I) {
|
|
3705
3710
|
He[I ? "unshift" : "push"](() => {
|
|
3706
|
-
|
|
3711
|
+
X = I, n(3, X);
|
|
3707
3712
|
});
|
|
3708
3713
|
}
|
|
3709
3714
|
return e.$$set = (I) => {
|
|
3710
|
-
"drawingEnabled" in I && n(0, _ = I.drawingEnabled), "image" in I && n(20,
|
|
3715
|
+
"drawingEnabled" in I && n(0, _ = I.drawingEnabled), "image" in I && n(20, b = I.image), "preferredDrawingMode" in I && n(21, y = I.preferredDrawingMode), "state" in I && n(22, A = I.state), "style" in I && n(1, w = I.style), "toolName" in I && n(2, E = I.toolName), "user" in I && n(23, B = I.user);
|
|
3711
3716
|
}, e.$$.update = () => {
|
|
3712
3717
|
e.$$.dirty[0] & /*toolName*/
|
|
3713
|
-
4 && n(12, { tool: o, opts: i } = $t(
|
|
3718
|
+
4 && n(12, { tool: o, opts: i } = $t(E) || { tool: void 0, opts: void 0 }, o, (n(24, i), n(2, E))), e.$$.dirty[0] & /*opts, preferredDrawingMode*/
|
|
3714
3719
|
18874368 && n(11, s = (i == null ? void 0 : i.drawingMode) || y), e.$$.dirty[0] & /*svgEl*/
|
|
3715
|
-
8 && n(10, r =
|
|
3716
|
-
8 && n(9, { onPointerDown: l, onPointerUp: a } =
|
|
3720
|
+
8 && n(10, r = si(X)), e.$$.dirty[0] & /*svgEl*/
|
|
3721
|
+
8 && n(9, { onPointerDown: l, onPointerUp: a } = li(X, S), l, (n(8, a), n(3, X))), e.$$.dirty[0] & /*$selection*/
|
|
3717
3722
|
33554432 && n(7, c = (I) => u.selected.find((z) => z.id === I.id && z.editable)), e.$$.dirty[0] & /*$selection*/
|
|
3718
|
-
33554432 &&
|
|
3723
|
+
33554432 && C(u.selected);
|
|
3719
3724
|
}, [
|
|
3720
3725
|
_,
|
|
3721
|
-
|
|
3722
|
-
|
|
3723
|
-
|
|
3724
|
-
|
|
3726
|
+
w,
|
|
3727
|
+
E,
|
|
3728
|
+
X,
|
|
3729
|
+
U,
|
|
3725
3730
|
p,
|
|
3726
|
-
|
|
3731
|
+
k,
|
|
3727
3732
|
c,
|
|
3728
3733
|
a,
|
|
3729
3734
|
l,
|
|
@@ -3737,23 +3742,23 @@ function gi(e, t, n) {
|
|
|
3737
3742
|
Z,
|
|
3738
3743
|
ge,
|
|
3739
3744
|
me,
|
|
3740
|
-
|
|
3745
|
+
b,
|
|
3741
3746
|
y,
|
|
3742
|
-
|
|
3743
|
-
|
|
3747
|
+
A,
|
|
3748
|
+
B,
|
|
3744
3749
|
i,
|
|
3745
3750
|
u,
|
|
3746
3751
|
Me,
|
|
3747
3752
|
ie
|
|
3748
3753
|
];
|
|
3749
3754
|
}
|
|
3750
|
-
class
|
|
3755
|
+
class pi extends te {
|
|
3751
3756
|
constructor(t) {
|
|
3752
3757
|
super(), ee(
|
|
3753
3758
|
this,
|
|
3754
3759
|
t,
|
|
3760
|
+
mi,
|
|
3755
3761
|
gi,
|
|
3756
|
-
hi,
|
|
3757
3762
|
W,
|
|
3758
3763
|
{
|
|
3759
3764
|
drawingEnabled: 0,
|
|
@@ -3769,8 +3774,8 @@ class mi extends te {
|
|
|
3769
3774
|
);
|
|
3770
3775
|
}
|
|
3771
3776
|
}
|
|
3772
|
-
function
|
|
3773
|
-
tn(e, t, n || 0, o || e.length - 1, i ||
|
|
3777
|
+
function yi(e, t, n, o, i) {
|
|
3778
|
+
tn(e, t, n || 0, o || e.length - 1, i || _i);
|
|
3774
3779
|
}
|
|
3775
3780
|
function tn(e, t, n, o, i) {
|
|
3776
3781
|
for (; o > n; ) {
|
|
@@ -3792,10 +3797,10 @@ function ve(e, t, n) {
|
|
|
3792
3797
|
var o = e[t];
|
|
3793
3798
|
e[t] = e[n], e[n] = o;
|
|
3794
3799
|
}
|
|
3795
|
-
function
|
|
3800
|
+
function _i(e, t) {
|
|
3796
3801
|
return e < t ? -1 : e > t ? 1 : 0;
|
|
3797
3802
|
}
|
|
3798
|
-
class
|
|
3803
|
+
class wi {
|
|
3799
3804
|
constructor(t = 9) {
|
|
3800
3805
|
this._maxEntries = Math.max(4, t), this._minEntries = Math.max(2, Math.ceil(this._maxEntries * 0.4)), this.clear();
|
|
3801
3806
|
}
|
|
@@ -3871,7 +3876,7 @@ class _i {
|
|
|
3871
3876
|
let l, a, c;
|
|
3872
3877
|
for (; o || s.length; ) {
|
|
3873
3878
|
if (o || (o = s.pop(), a = s[s.length - 1], l = r.pop(), c = !0), o.leaf) {
|
|
3874
|
-
const u =
|
|
3879
|
+
const u = bi(t, o.children, n);
|
|
3875
3880
|
if (u !== -1)
|
|
3876
3881
|
return o.children.splice(u, 1), s.push(o), this._condense(s), this;
|
|
3877
3882
|
}
|
|
@@ -3907,10 +3912,10 @@ class _i {
|
|
|
3907
3912
|
return l = Ee(t.slice(n, o + 1)), we(l, this.toBBox), l;
|
|
3908
3913
|
i || (i = Math.ceil(Math.log(s) / Math.log(r)), r = Math.ceil(s / Math.pow(r, i - 1))), l = Ee([]), l.leaf = !1, l.height = i;
|
|
3909
3914
|
const a = Math.ceil(s / r), c = a * Math.ceil(Math.sqrt(r));
|
|
3910
|
-
|
|
3915
|
+
Xt(t, n, o, c, this.compareMinX);
|
|
3911
3916
|
for (let u = n; u <= o; u += c) {
|
|
3912
3917
|
const f = Math.min(u + c - 1, o);
|
|
3913
|
-
|
|
3918
|
+
Xt(t, u, f, a, this.compareMinY);
|
|
3914
3919
|
for (let h = u; h <= f; h += a) {
|
|
3915
3920
|
const g = Math.min(h + a - 1, f);
|
|
3916
3921
|
l.children.push(this._build(t, h, g, i - 1));
|
|
@@ -3922,7 +3927,7 @@ class _i {
|
|
|
3922
3927
|
for (; i.push(n), !(n.leaf || i.length - 1 === o); ) {
|
|
3923
3928
|
let s = 1 / 0, r = 1 / 0, l;
|
|
3924
3929
|
for (let a = 0; a < n.children.length; a++) {
|
|
3925
|
-
const c = n.children[a], u = et(c), f =
|
|
3930
|
+
const c = n.children[a], u = et(c), f = Si(t, c) - u;
|
|
3926
3931
|
f < r ? (r = f, s = u < s ? u : s, l = c) : f === r && u < s && (s = u, l = c);
|
|
3927
3932
|
}
|
|
3928
3933
|
n = l || n.children[0];
|
|
@@ -3948,14 +3953,14 @@ class _i {
|
|
|
3948
3953
|
_chooseSplitIndex(t, n, o) {
|
|
3949
3954
|
let i, s = 1 / 0, r = 1 / 0;
|
|
3950
3955
|
for (let l = n; l <= o - n; l++) {
|
|
3951
|
-
const a = ke(t, 0, l, this.toBBox), c = ke(t, l, o, this.toBBox), u =
|
|
3956
|
+
const a = ke(t, 0, l, this.toBBox), c = ke(t, l, o, this.toBBox), u = Ti(a, c), f = et(a) + et(c);
|
|
3952
3957
|
u < s ? (s = u, i = l, r = f < r ? f : r) : u === s && f < r && (r = f, i = l);
|
|
3953
3958
|
}
|
|
3954
3959
|
return i || o - n;
|
|
3955
3960
|
}
|
|
3956
3961
|
// sorts node children by the best axis for split
|
|
3957
3962
|
_chooseSplitAxis(t, n, o) {
|
|
3958
|
-
const i = t.leaf ? this.compareMinX :
|
|
3963
|
+
const i = t.leaf ? this.compareMinX : Ei, s = t.leaf ? this.compareMinY : Ai, r = this._allDistMargin(t, n, o, i), l = this._allDistMargin(t, n, o, s);
|
|
3959
3964
|
r < l && t.children.sort(i);
|
|
3960
3965
|
}
|
|
3961
3966
|
// total margin of all possible split distributions where each node is at least m full
|
|
@@ -3982,7 +3987,7 @@ class _i {
|
|
|
3982
3987
|
t[n].children.length === 0 ? n > 0 ? (o = t[n - 1].children, o.splice(o.indexOf(t[n]), 1)) : this.clear() : we(t[n], this.toBBox);
|
|
3983
3988
|
}
|
|
3984
3989
|
}
|
|
3985
|
-
function
|
|
3990
|
+
function bi(e, t, n) {
|
|
3986
3991
|
if (!n)
|
|
3987
3992
|
return t.indexOf(e);
|
|
3988
3993
|
for (let o = 0; o < t.length; o++)
|
|
@@ -4004,10 +4009,10 @@ function ke(e, t, n, o, i) {
|
|
|
4004
4009
|
function Oe(e, t) {
|
|
4005
4010
|
return e.minX = Math.min(e.minX, t.minX), e.minY = Math.min(e.minY, t.minY), e.maxX = Math.max(e.maxX, t.maxX), e.maxY = Math.max(e.maxY, t.maxY), e;
|
|
4006
4011
|
}
|
|
4007
|
-
function
|
|
4012
|
+
function Ei(e, t) {
|
|
4008
4013
|
return e.minX - t.minX;
|
|
4009
4014
|
}
|
|
4010
|
-
function
|
|
4015
|
+
function Ai(e, t) {
|
|
4011
4016
|
return e.minY - t.minY;
|
|
4012
4017
|
}
|
|
4013
4018
|
function et(e) {
|
|
@@ -4016,10 +4021,10 @@ function et(e) {
|
|
|
4016
4021
|
function Ue(e) {
|
|
4017
4022
|
return e.maxX - e.minX + (e.maxY - e.minY);
|
|
4018
4023
|
}
|
|
4019
|
-
function
|
|
4024
|
+
function Si(e, t) {
|
|
4020
4025
|
return (Math.max(t.maxX, e.maxX) - Math.min(t.minX, e.minX)) * (Math.max(t.maxY, e.maxY) - Math.min(t.minY, e.minY));
|
|
4021
4026
|
}
|
|
4022
|
-
function
|
|
4027
|
+
function Ti(e, t) {
|
|
4023
4028
|
const n = Math.max(e.minX, t.minX), o = Math.max(e.minY, t.minY), i = Math.min(e.maxX, t.maxX), s = Math.min(e.maxY, t.maxY);
|
|
4024
4029
|
return Math.max(0, i - n) * Math.max(0, s - o);
|
|
4025
4030
|
}
|
|
@@ -4040,21 +4045,21 @@ function Ee(e) {
|
|
|
4040
4045
|
maxY: -1 / 0
|
|
4041
4046
|
};
|
|
4042
4047
|
}
|
|
4043
|
-
function
|
|
4048
|
+
function Xt(e, t, n, o, i) {
|
|
4044
4049
|
const s = [t, n];
|
|
4045
4050
|
for (; s.length; ) {
|
|
4046
4051
|
if (n = s.pop(), t = s.pop(), n - t <= o)
|
|
4047
4052
|
continue;
|
|
4048
4053
|
const r = t + Math.ceil((n - t) / o / 2) * o;
|
|
4049
|
-
|
|
4054
|
+
yi(e, r, t, n, i), s.push(t, r, r, n);
|
|
4050
4055
|
}
|
|
4051
4056
|
}
|
|
4052
|
-
const
|
|
4053
|
-
const e = new
|
|
4057
|
+
const Mi = () => {
|
|
4058
|
+
const e = new wi(), t = /* @__PURE__ */ new Map(), n = () => [...t.values()], o = () => {
|
|
4054
4059
|
e.clear(), t.clear();
|
|
4055
4060
|
}, i = (f) => {
|
|
4056
|
-
const { minX: h, minY: g, maxX: m, maxY: _ } = f.selector.geometry.bounds,
|
|
4057
|
-
e.insert(
|
|
4061
|
+
const { minX: h, minY: g, maxX: m, maxY: _ } = f.selector.geometry.bounds, b = { minX: h, minY: g, maxX: m, maxY: _, target: f };
|
|
4062
|
+
e.insert(b), t.set(f.annotation, b);
|
|
4058
4063
|
}, s = (f) => {
|
|
4059
4064
|
const h = t.get(f.annotation);
|
|
4060
4065
|
h && e.remove(h), t.delete(f.annotation);
|
|
@@ -4070,7 +4075,7 @@ const Ti = () => {
|
|
|
4070
4075
|
maxY: h
|
|
4071
4076
|
}).map((_) => _.target).filter((_) => _.selector.type === j.RECTANGLE || wn(_.selector, f, h));
|
|
4072
4077
|
if (m.length > 0)
|
|
4073
|
-
return m.sort((_,
|
|
4078
|
+
return m.sort((_, b) => st(_.selector) - st(b.selector)), m[0];
|
|
4074
4079
|
},
|
|
4075
4080
|
getIntersecting: (f, h, g, m) => e.search({
|
|
4076
4081
|
minX: f,
|
|
@@ -4083,8 +4088,8 @@ const Ti = () => {
|
|
|
4083
4088
|
set: (f, h = !0) => {
|
|
4084
4089
|
h && o();
|
|
4085
4090
|
const g = f.map((m) => {
|
|
4086
|
-
const { minX: _, minY:
|
|
4087
|
-
return { minX: _, minY:
|
|
4091
|
+
const { minX: _, minY: b, maxX: y, maxY: A } = m.selector.geometry.bounds;
|
|
4092
|
+
return { minX: _, minY: b, maxX: y, maxY: A, target: m };
|
|
4088
4093
|
});
|
|
4089
4094
|
g.forEach((m) => t.set(m.target.annotation, m)), e.load(g);
|
|
4090
4095
|
},
|
|
@@ -4093,8 +4098,8 @@ const Ti = () => {
|
|
|
4093
4098
|
s(f), i(h);
|
|
4094
4099
|
}
|
|
4095
4100
|
};
|
|
4096
|
-
},
|
|
4097
|
-
const t = Kn(), n =
|
|
4101
|
+
}, vi = (e) => {
|
|
4102
|
+
const t = Kn(), n = Mi(), o = Rn(t, e.pointerSelectAction), i = Xn(t), s = xn();
|
|
4098
4103
|
return t.observe(({ changes: a }) => {
|
|
4099
4104
|
n.set((a.created || []).map((c) => c.target), !1), (a.deleted || []).forEach((c) => n.remove(c.target)), (a.updated || []).forEach(({ oldValue: c, newValue: u }) => n.update(c.target, u.target));
|
|
4100
4105
|
}), {
|
|
@@ -4110,13 +4115,13 @@ const Ti = () => {
|
|
|
4110
4115
|
hover: i,
|
|
4111
4116
|
viewport: s
|
|
4112
4117
|
};
|
|
4113
|
-
},
|
|
4114
|
-
const t =
|
|
4118
|
+
}, Li = (e) => {
|
|
4119
|
+
const t = vi(e);
|
|
4115
4120
|
return {
|
|
4116
4121
|
...t,
|
|
4117
4122
|
store: Wn(t.store)
|
|
4118
4123
|
};
|
|
4119
|
-
},
|
|
4124
|
+
}, ki = (e) => {
|
|
4120
4125
|
let t, n;
|
|
4121
4126
|
if (e.nodeName === "CANVAS")
|
|
4122
4127
|
t = e, n = t.getContext("2d", { willReadFrequently: !0 });
|
|
@@ -4131,16 +4136,16 @@ const Ti = () => {
|
|
|
4131
4136
|
o += c;
|
|
4132
4137
|
}
|
|
4133
4138
|
return o / 81;
|
|
4134
|
-
},
|
|
4135
|
-
const t =
|
|
4139
|
+
}, Oi = (e) => {
|
|
4140
|
+
const t = ki(e), n = t > 0.6 ? "dark" : "light";
|
|
4136
4141
|
return console.log(`[Annotorious] Image brightness: ${t.toFixed(1)}. Setting ${n} theme.`), n;
|
|
4137
|
-
}, Rt = (e, t, n) => t.setAttribute("data-theme", n === "auto" ?
|
|
4142
|
+
}, Rt = (e, t, n) => t.setAttribute("data-theme", n === "auto" ? Oi(e) : n), Bi = (e, t) => ({
|
|
4138
4143
|
...e,
|
|
4139
4144
|
drawingEnabled: e.drawingEnabled === void 0 ? t.drawingEnabled : e.drawingEnabled,
|
|
4140
4145
|
drawingMode: e.drawingMode || t.drawingMode,
|
|
4141
4146
|
pointerSelectAction: e.pointerSelectAction || t.pointerSelectAction,
|
|
4142
4147
|
theme: e.theme || t.theme
|
|
4143
|
-
}), Ut = navigator.userAgent.indexOf("Mac OS X") !== -1,
|
|
4148
|
+
}), Ut = navigator.userAgent.indexOf("Mac OS X") !== -1, Ii = (e, t) => {
|
|
4144
4149
|
const n = t || document, o = (r) => {
|
|
4145
4150
|
const l = r;
|
|
4146
4151
|
l.key === "z" && l.ctrlKey ? e.undo() : l.key === "y" && l.ctrlKey && e.redo();
|
|
@@ -4156,22 +4161,22 @@ const Ti = () => {
|
|
|
4156
4161
|
}, Di = (e, t = {}) => {
|
|
4157
4162
|
if (!e)
|
|
4158
4163
|
throw "Missing argument: image";
|
|
4159
|
-
const n = typeof e == "string" ? document.getElementById(e) : e, o =
|
|
4164
|
+
const n = typeof e == "string" ? document.getElementById(e) : e, o = Bi(t, {
|
|
4160
4165
|
drawingEnabled: !0,
|
|
4161
4166
|
drawingMode: "drag",
|
|
4162
4167
|
pointerSelectAction: Kt.EDIT,
|
|
4163
4168
|
theme: "light"
|
|
4164
|
-
}), i =
|
|
4169
|
+
}), i = Li(o), { selection: s, store: r } = i, l = Qn(r), a = $n(
|
|
4165
4170
|
i,
|
|
4166
4171
|
l,
|
|
4167
4172
|
o.adapter,
|
|
4168
4173
|
o.autoSave
|
|
4169
4174
|
), c = document.createElement("DIV");
|
|
4170
4175
|
c.style.position = "relative", c.style.display = "inline-block", n.style.display = "block", n.parentNode.insertBefore(c, n), c.appendChild(n);
|
|
4171
|
-
const u =
|
|
4172
|
-
let f =
|
|
4176
|
+
const u = Ii(l);
|
|
4177
|
+
let f = lo();
|
|
4173
4178
|
Rt(n, c, o.theme);
|
|
4174
|
-
const h = new
|
|
4179
|
+
const h = new pi({
|
|
4175
4180
|
target: c,
|
|
4176
4181
|
props: {
|
|
4177
4182
|
drawingEnabled: !!o.drawingEnabled,
|
|
@@ -4188,13 +4193,13 @@ const Ti = () => {
|
|
|
4188
4193
|
});
|
|
4189
4194
|
const g = to(i, l, o.adapter), m = () => {
|
|
4190
4195
|
h.$destroy(), c.parentNode.insertBefore(n, c), c.parentNode.removeChild(c), u.destroy(), l.destroy();
|
|
4191
|
-
}, _ = () => f,
|
|
4196
|
+
}, _ = () => f, b = (p, T, S) => Ko(p, T, S), y = (p, T) => Io(p, T), A = (p) => {
|
|
4192
4197
|
if (!$t(p))
|
|
4193
4198
|
throw `No drawing tool named ${p}`;
|
|
4194
4199
|
h.$set({ toolName: p });
|
|
4195
|
-
},
|
|
4200
|
+
}, w = (p) => h.$set({ drawingEnabled: p }), E = (p) => {
|
|
4196
4201
|
console.warn("Filter not implemented yet");
|
|
4197
|
-
},
|
|
4202
|
+
}, B = (p) => h.$set({ style: p }), U = (p) => Rt(n, c, p), X = (p) => {
|
|
4198
4203
|
f = p, h.$set({ user: p });
|
|
4199
4204
|
};
|
|
4200
4205
|
return {
|
|
@@ -4204,14 +4209,14 @@ const Ti = () => {
|
|
|
4204
4209
|
listDrawingTools: xt,
|
|
4205
4210
|
on: a.on,
|
|
4206
4211
|
off: a.off,
|
|
4207
|
-
registerDrawingTool:
|
|
4212
|
+
registerDrawingTool: b,
|
|
4208
4213
|
registerShapeEditor: y,
|
|
4209
|
-
setDrawingEnabled:
|
|
4210
|
-
setDrawingTool:
|
|
4211
|
-
setFilter:
|
|
4212
|
-
setStyle:
|
|
4213
|
-
setTheme:
|
|
4214
|
-
setUser:
|
|
4214
|
+
setDrawingEnabled: w,
|
|
4215
|
+
setDrawingTool: A,
|
|
4216
|
+
setFilter: E,
|
|
4217
|
+
setStyle: B,
|
|
4218
|
+
setTheme: U,
|
|
4219
|
+
setUser: X,
|
|
4215
4220
|
state: i
|
|
4216
4221
|
};
|
|
4217
4222
|
};
|
|
@@ -4219,42 +4224,42 @@ export {
|
|
|
4219
4224
|
Qt as Editor,
|
|
4220
4225
|
Xo as EditorMount,
|
|
4221
4226
|
Le as Handle,
|
|
4222
|
-
|
|
4223
|
-
|
|
4224
|
-
|
|
4227
|
+
Ci as IdentityTransform,
|
|
4228
|
+
yo as PolygonEditor,
|
|
4229
|
+
Oo as RectangleEditor,
|
|
4225
4230
|
An as RectangleUtil,
|
|
4226
|
-
|
|
4227
|
-
|
|
4231
|
+
Go as RubberbandRectangle,
|
|
4232
|
+
pi as SVGAnnotationLayer,
|
|
4228
4233
|
j as ShapeType,
|
|
4229
|
-
|
|
4230
|
-
|
|
4231
|
-
|
|
4234
|
+
Uo as ToolMount,
|
|
4235
|
+
Yi as W3CImageFormat,
|
|
4236
|
+
li as addEventListeners,
|
|
4232
4237
|
Fe as boundsFromPoints,
|
|
4233
4238
|
st as computeArea,
|
|
4234
4239
|
Di as createImageAnnotator,
|
|
4235
|
-
|
|
4236
|
-
|
|
4237
|
-
|
|
4238
|
-
|
|
4240
|
+
vi as createImageAnnotatorState,
|
|
4241
|
+
si as createSVGTransform,
|
|
4242
|
+
Li as createSvelteImageAnnotatorState,
|
|
4243
|
+
Oi as detectTheme,
|
|
4239
4244
|
Qe as distance,
|
|
4240
|
-
|
|
4241
|
-
|
|
4242
|
-
|
|
4245
|
+
bo as enableResponsive,
|
|
4246
|
+
Bi as fillDefaults,
|
|
4247
|
+
Bo as getEditor,
|
|
4243
4248
|
$t as getTool,
|
|
4244
|
-
|
|
4249
|
+
Ii as initKeyboardCommands,
|
|
4245
4250
|
wn as intersects,
|
|
4246
|
-
|
|
4251
|
+
Eo as isTouch,
|
|
4247
4252
|
xt as listDrawingTools,
|
|
4248
4253
|
Sn as parseFragmentSelector,
|
|
4249
4254
|
On as parseSVGSelector,
|
|
4250
|
-
|
|
4251
|
-
|
|
4255
|
+
uo as parseW3CImageAnnotation,
|
|
4256
|
+
Io as registerEditor,
|
|
4252
4257
|
at as registerShapeUtil,
|
|
4253
|
-
|
|
4254
|
-
|
|
4258
|
+
Ko as registerTool,
|
|
4259
|
+
ki as sampleBrightness,
|
|
4255
4260
|
Tn as serializeFragmentSelector,
|
|
4256
4261
|
Bn as serializeSVGSelector,
|
|
4257
|
-
|
|
4262
|
+
ho as serializeW3CImageAnnotation,
|
|
4258
4263
|
Rt as setTheme
|
|
4259
4264
|
};
|
|
4260
4265
|
//# sourceMappingURL=annotorious.es.js.map
|