@annotorious/annotorious 3.3.0 → 3.3.2
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.es.js
CHANGED
|
@@ -418,7 +418,7 @@ const ft = (e) => lt(e.target), lt = (e) => {
|
|
|
418
418
|
var t, n;
|
|
419
419
|
return (e == null ? void 0 : e.annotation) !== void 0 && ((n = (t = e == null ? void 0 : e.selector) == null ? void 0 : t.geometry) == null ? void 0 : n.bounds) !== void 0;
|
|
420
420
|
}, _i = (e, t = !1) => {
|
|
421
|
-
const n = typeof e == "string" ? e : e.value, i =
|
|
421
|
+
const n = typeof e == "string" ? e : e.value, i = /(xywh)=(pixel|percent)?:?(.+?),(.+?),(.+?),(.+)*/g, o = [...n.matchAll(i)][0], [r, s, a, l, u, c, f] = o;
|
|
422
422
|
if (s !== "xywh") throw new Error("Unsupported MediaFragment: " + n);
|
|
423
423
|
if (a && a !== "pixel") throw new Error(`Unsupported MediaFragment unit: ${a}`);
|
|
424
424
|
const [d, p, g, y] = [l, u, c, f].map(parseFloat);
|
|
@@ -1547,7 +1547,7 @@ const uo = (e, t) => {
|
|
|
1547
1547
|
const R = co(O) ? M : O, B = a(T, O);
|
|
1548
1548
|
B && r(R, { updated: [B] });
|
|
1549
1549
|
}, u = (T, O = z.LOCAL) => {
|
|
1550
|
-
e.get(T.id) ? l(T) : s(T);
|
|
1550
|
+
e.get(T.id) ? l(T, O) : s(T, O);
|
|
1551
1551
|
}, c = (T, O = z.LOCAL) => {
|
|
1552
1552
|
const M = T.reduce((R, B) => {
|
|
1553
1553
|
const D = a(B);
|
|
@@ -2020,7 +2020,7 @@ const us = (e, t = { strict: !0, invertY: !1 }) => ({ parse: (o) => Io(o, t), se
|
|
|
2020
2020
|
modified: r,
|
|
2021
2021
|
body: s,
|
|
2022
2022
|
...a
|
|
2023
|
-
} = e, l = Ro(s || [], n), u = Array.isArray(e.target) ? e.target[0] : e.target, c = Array.isArray(u.selector) ? u.selector[0] : u.selector, f = (c == null ? void 0 : c.type) === "FragmentSelector" ? _i(c, t.invertY) : (c == null ? void 0 : c.type) === "SvgSelector" ? zi(c) : void 0;
|
|
2023
|
+
} = e, l = Ro(s || [], n), u = Array.isArray(e.target) ? e.target[0] : e.target, c = typeof u == "string" ? u : Array.isArray(u.selector) ? u.selector[0] : u.selector, f = typeof c == "string" || (c == null ? void 0 : c.type) === "FragmentSelector" ? _i(c, t.invertY) : (c == null ? void 0 : c.type) === "SvgSelector" ? zi(c) : void 0;
|
|
2024
2024
|
return f || !t.strict ? {
|
|
2025
2025
|
parsed: {
|
|
2026
2026
|
...a,
|