@component-hook/pdf-canvas 1.2.2-alpha.0 → 1.2.2-alpha.1
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/react/assets/pdfjs.worker-DawqtvLM.js +12 -0
- package/dist/react/pdf-canvas.es.js +545 -520
- package/dist/react/pdf-canvas.umd.js +38 -38
- package/dist/vue/assets/pdfjs.worker-DawqtvLM.js +12 -0
- package/dist/vue/pdf-canvas.es.js +867 -842
- package/dist/vue/pdf-canvas.umd.js +39 -39
- package/package.json +1 -1
|
@@ -11,10 +11,10 @@ var Io = (a, t, e, s) => ({
|
|
|
11
11
|
return oe(a, t, s);
|
|
12
12
|
}
|
|
13
13
|
});
|
|
14
|
-
import
|
|
14
|
+
import Zl, { useRef as ws, useEffect as Js, forwardRef as Ql, useMemo as No, useImperativeHandle as tc } from "react";
|
|
15
15
|
var Ai = { exports: {} }, Vs = {};
|
|
16
16
|
var jo;
|
|
17
|
-
function
|
|
17
|
+
function ec() {
|
|
18
18
|
if (jo) return Vs;
|
|
19
19
|
jo = 1;
|
|
20
20
|
var a = Symbol.for("react.transitional.element"), t = Symbol.for("react.fragment");
|
|
@@ -37,7 +37,7 @@ function tc() {
|
|
|
37
37
|
}
|
|
38
38
|
var Ws = {};
|
|
39
39
|
var Bo;
|
|
40
|
-
function
|
|
40
|
+
function sc() {
|
|
41
41
|
return Bo || (Bo = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
42
42
|
function a(E) {
|
|
43
43
|
if (E == null) return null;
|
|
@@ -232,7 +232,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
232
232
|
function d(E) {
|
|
233
233
|
return typeof E == "object" && E !== null && E.$$typeof === g;
|
|
234
234
|
}
|
|
235
|
-
var f =
|
|
235
|
+
var f = Zl, g = Symbol.for("react.transitional.element"), p = Symbol.for("react.portal"), b = Symbol.for("react.fragment"), m = Symbol.for("react.strict_mode"), v = Symbol.for("react.profiler"), y = Symbol.for("react.consumer"), _ = Symbol.for("react.context"), S = Symbol.for("react.forward_ref"), A = Symbol.for("react.suspense"), T = Symbol.for("react.suspense_list"), k = Symbol.for("react.memo"), P = Symbol.for("react.lazy"), j = Symbol.for("react.activity"), F = Symbol.for("react.client.reference"), I = f.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, O = Object.prototype.hasOwnProperty, D = Array.isArray, z = console.createTask ? console.createTask : function() {
|
|
236
236
|
return null;
|
|
237
237
|
};
|
|
238
238
|
f = {
|
|
@@ -268,11 +268,11 @@ React keys must be passed directly to JSX without using spread:
|
|
|
268
268
|
})()), Ws;
|
|
269
269
|
}
|
|
270
270
|
var Ho;
|
|
271
|
-
function
|
|
272
|
-
return Ho || (Ho = 1, process.env.NODE_ENV === "production" ? Ai.exports =
|
|
271
|
+
function ic() {
|
|
272
|
+
return Ho || (Ho = 1, process.env.NODE_ENV === "production" ? Ai.exports = ec() : Ai.exports = sc()), Ai.exports;
|
|
273
273
|
}
|
|
274
|
-
var zo =
|
|
275
|
-
const
|
|
274
|
+
var zo = ic();
|
|
275
|
+
const nc = "data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2040%2040'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='20'%20cy='20'%20r='10.75'%20stroke='currentColor'%20stroke-width='2.5'/%3e%3cpath%20d='M16%2024L23.7782%2016.2218'%20stroke='currentColor'%20stroke-width='2.5'%20stroke-linecap='round'/%3e%3cpath%20d='M24%2024L16.2218%2016.2218'%20stroke='currentColor'%20stroke-width='2.5'%20stroke-linecap='round'/%3e%3c/svg%3e", rc = {
|
|
276
276
|
top: 100,
|
|
277
277
|
left: 50,
|
|
278
278
|
scaleX: 0.5,
|
|
@@ -281,7 +281,7 @@ const ic = "data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%20
|
|
|
281
281
|
cornerStrokeColor: "black",
|
|
282
282
|
cornerSize: 6,
|
|
283
283
|
selectionBackgroundColor: "rgba(245, 245, 245, 0.8)"
|
|
284
|
-
},
|
|
284
|
+
}, oc = {
|
|
285
285
|
top: 100,
|
|
286
286
|
left: 50,
|
|
287
287
|
fontFamily: "helvetica",
|
|
@@ -291,16 +291,16 @@ const ic = "data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%20
|
|
|
291
291
|
scaleY: 0.7,
|
|
292
292
|
cornerSize: 6,
|
|
293
293
|
selectionBackgroundColor: "rgba(245, 245, 245, 0.8)"
|
|
294
|
-
},
|
|
294
|
+
}, ac = {
|
|
295
295
|
borderColor: "black",
|
|
296
296
|
cornerStrokeColor: "black",
|
|
297
297
|
cornerSize: 8,
|
|
298
298
|
selectionBackgroundColor: "rgba(245, 245, 245, 0.8)"
|
|
299
|
-
},
|
|
299
|
+
}, hc = {
|
|
300
300
|
stroke: "#000",
|
|
301
301
|
hoverStroke: "#B7EC5D",
|
|
302
|
-
src:
|
|
303
|
-
},
|
|
302
|
+
src: nc
|
|
303
|
+
}, lc = [
|
|
304
304
|
"borderColor",
|
|
305
305
|
"cornerStrokeColor",
|
|
306
306
|
"cornerSize",
|
|
@@ -406,9 +406,9 @@ class Gr extends xe {
|
|
|
406
406
|
super("".concat(t, " 'options.signal' is in 'aborted' state"));
|
|
407
407
|
}
|
|
408
408
|
}
|
|
409
|
-
class
|
|
409
|
+
class cc {
|
|
410
410
|
}
|
|
411
|
-
class
|
|
411
|
+
class uc extends cc {
|
|
412
412
|
testPrecision(t, e) {
|
|
413
413
|
const s = "precision ".concat(e, ` float;
|
|
414
414
|
void main(){}`), i = t.createShader(t.FRAGMENT_SHADER);
|
|
@@ -422,10 +422,10 @@ void main(){}`), i = t.createShader(t.FRAGMENT_SHADER);
|
|
|
422
422
|
return !!this.maxTextureSize && this.maxTextureSize >= t;
|
|
423
423
|
}
|
|
424
424
|
}
|
|
425
|
-
const
|
|
425
|
+
const dc = {};
|
|
426
426
|
let Wo;
|
|
427
|
-
const Ce = () => Wo || (Wo = { document, window, isTouchSupported: "ontouchstart" in window || "ontouchstart" in document || window && window.navigator && window.navigator.maxTouchPoints > 0, WebGLProbe: new
|
|
428
|
-
}, copyPasteData:
|
|
427
|
+
const Ce = () => Wo || (Wo = { document, window, isTouchSupported: "ontouchstart" in window || "ontouchstart" in document || window && window.navigator && window.navigator.maxTouchPoints > 0, WebGLProbe: new uc(), dispose() {
|
|
428
|
+
}, copyPasteData: dc }), Is = () => Ce().document, mi = () => Ce().window, Qa = () => {
|
|
429
429
|
var a;
|
|
430
430
|
return Math.max((a = tt.devicePixelRatio) !== null && a !== void 0 ? a : mi().devicePixelRatio, 1);
|
|
431
431
|
}, si = new class {
|
|
@@ -450,7 +450,7 @@ const Ce = () => Wo || (Wo = { document, window, isTouchSupported: "ontouchstart
|
|
|
450
450
|
}(), yr = "6.9.0";
|
|
451
451
|
function os() {
|
|
452
452
|
}
|
|
453
|
-
const We = Math.PI / 2, Ne = 2 * Math.PI, Vr = Math.PI / 180, Gt = Object.freeze([1, 0, 0, 1, 0, 0]), Wr = 16, He = 0.4477152502, $ = "center", et = "left", qt = "top", _r = "bottom", pt = "right", Bt = "none", Xr = /\r?\n/, th = "moving", Tn = "scaling", eh = "rotating", Ur = "rotate", sh = "skewing", ci = "resizing",
|
|
453
|
+
const We = Math.PI / 2, Ne = 2 * Math.PI, Vr = Math.PI / 180, Gt = Object.freeze([1, 0, 0, 1, 0, 0]), Wr = 16, He = 0.4477152502, $ = "center", et = "left", qt = "top", _r = "bottom", pt = "right", Bt = "none", Xr = /\r?\n/, th = "moving", Tn = "scaling", eh = "rotating", Ur = "rotate", sh = "skewing", ci = "resizing", fc = "modifyPoly", gc = "modifyPath", an = "changed", En = "scale", Vt = "scaleX", te = "scaleY", Ns = "skewX", js = "skewY", wt = "fill", Ht = "stroke", hn = "modified", vs = "json", Kn = "svg", L = new class {
|
|
454
454
|
constructor() {
|
|
455
455
|
this[vs] = /* @__PURE__ */ new Map(), this[Kn] = /* @__PURE__ */ new Map();
|
|
456
456
|
}
|
|
@@ -494,7 +494,7 @@ const We = Math.PI / 2, Ne = 2 * Math.PI, Vr = Math.PI / 180, Gt = Object.freeze
|
|
|
494
494
|
return t.forEach(((e) => e.abort())), t;
|
|
495
495
|
}
|
|
496
496
|
}();
|
|
497
|
-
class
|
|
497
|
+
class pc {
|
|
498
498
|
constructor() {
|
|
499
499
|
x(this, "__eventListeners", {});
|
|
500
500
|
}
|
|
@@ -795,7 +795,7 @@ function ih(a) {
|
|
|
795
795
|
}
|
|
796
796
|
return t;
|
|
797
797
|
}
|
|
798
|
-
class nh extends
|
|
798
|
+
class nh extends pc {
|
|
799
799
|
_setOptions() {
|
|
800
800
|
let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
801
801
|
for (const e in t) this.set(e, t[e]);
|
|
@@ -823,8 +823,8 @@ function ii(a) {
|
|
|
823
823
|
function rh(a) {
|
|
824
824
|
return mi().cancelAnimationFrame(a);
|
|
825
825
|
}
|
|
826
|
-
let
|
|
827
|
-
const Xe = () =>
|
|
826
|
+
let mc = 0;
|
|
827
|
+
const Xe = () => mc++, Ae = () => {
|
|
828
828
|
const a = Is().createElement("canvas");
|
|
829
829
|
if (!a || a.getContext === void 0) throw new xe("Failed to create `canvas` element");
|
|
830
830
|
return a;
|
|
@@ -973,7 +973,7 @@ class gh {
|
|
|
973
973
|
Ce().dispose(this.lower.el), delete this.lower;
|
|
974
974
|
}
|
|
975
975
|
}
|
|
976
|
-
const
|
|
976
|
+
const bc = { backgroundVpt: !0, backgroundColor: "", overlayVpt: !0, overlayColor: "", includeDefaultValues: !0, svgViewportTransformation: !0, renderOnAddRemove: !0, skipOffscreen: !0, enableRetinaScaling: !0, imageSmoothingEnabled: !0, controlsAboveOverlay: !1, allowTouchScrolling: !1, viewportTransform: [...Gt] }, vc = ["objects"];
|
|
977
977
|
class yi extends ih(nh) {
|
|
978
978
|
get lowerCanvasEl() {
|
|
979
979
|
var t;
|
|
@@ -1279,7 +1279,7 @@ Resulting to default behavior: removing object from previous canvas and adding t
|
|
|
1279
1279
|
loadFromJSON(t, e) {
|
|
1280
1280
|
let { signal: s } = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
1281
1281
|
if (!t) return Promise.reject(new xe("`json` is undefined"));
|
|
1282
|
-
const i = typeof t == "string" ? JSON.parse(t) : t, { objects: n = [] } = i, r = ht(i,
|
|
1282
|
+
const i = typeof t == "string" ? JSON.parse(t) : t, { objects: n = [] } = i, r = ht(i, vc), { backgroundImage: o, background: h, overlayImage: l, overlay: c, clipPath: u } = r, d = this.renderOnAddRemove;
|
|
1283
1283
|
return this.renderOnAddRemove = !1, Promise.all([Ds(n, { reviver: e, signal: s }), vi({ backgroundImage: o, backgroundColor: h, overlayImage: l, overlayColor: c, clipPath: u }, { signal: s })]).then(((f) => {
|
|
1284
1284
|
let [g, p] = f;
|
|
1285
1285
|
return this.clear(), this.add(...g), this.set(r), this.set(p), this.renderOnAddRemove = d, this;
|
|
@@ -1323,14 +1323,14 @@ Resulting to default behavior: removing object from previous canvas and adding t
|
|
|
1323
1323
|
return "#<Canvas (".concat(this.complexity(), "): { objects: ").concat(this._objects.length, " }>");
|
|
1324
1324
|
}
|
|
1325
1325
|
}
|
|
1326
|
-
x(yi, "ownDefaults",
|
|
1327
|
-
const
|
|
1326
|
+
x(yi, "ownDefaults", bc);
|
|
1327
|
+
const yc = ["touchstart", "touchmove", "touchend"], ph = (a) => {
|
|
1328
1328
|
const t = uh(a.target), e = (function(s) {
|
|
1329
1329
|
const i = s.changedTouches;
|
|
1330
1330
|
return i && i[0] ? i[0] : s;
|
|
1331
1331
|
})(a);
|
|
1332
1332
|
return new C(e.clientX + t.left, e.clientY + t.top);
|
|
1333
|
-
}, cn = (a) =>
|
|
1333
|
+
}, cn = (a) => yc.includes(a.type) || a.pointerType === "touch", $o = (a) => {
|
|
1334
1334
|
a.preventDefault(), a.stopPropagation();
|
|
1335
1335
|
}, Se = (a) => {
|
|
1336
1336
|
let t = 0, e = 0, s = 0, i = 0;
|
|
@@ -1339,8 +1339,8 @@ const vc = ["touchstart", "touchmove", "touchend"], ph = (a) => {
|
|
|
1339
1339
|
(o > s || !n) && (s = o), (o < t || !n) && (t = o), (h > i || !n) && (i = h), (h < e || !n) && (e = h);
|
|
1340
1340
|
}
|
|
1341
1341
|
return { left: t, top: e, width: s - t, height: i - e };
|
|
1342
|
-
},
|
|
1343
|
-
const e = hs(t), { translateX: s, translateY: i, scaleX: n, scaleY: r } = e, o = ht(e,
|
|
1342
|
+
}, _c = ["translateX", "translateY", "scaleX", "scaleY"], mh = (a, t) => Ls(a, mt(t, a.calcOwnMatrix())), Ls = (a, t) => {
|
|
1343
|
+
const e = hs(t), { translateX: s, translateY: i, scaleX: n, scaleY: r } = e, o = ht(e, _c), h = new C(s, i);
|
|
1344
1344
|
a.flipX = !1, a.flipY = !1, Object.assign(a, o), a.set({ scaleX: n, scaleY: r }), a.setPositionByOrigin(h, $, $);
|
|
1345
1345
|
}, bh = (a) => {
|
|
1346
1346
|
a.scaleX = 1, a.scaleY = 1, a.skewX = 0, a.skewY = 0, a.flipX = !1, a.flipY = !1, a.rotate(0);
|
|
@@ -1363,7 +1363,7 @@ const vc = ["touchstart", "touchmove", "touchend"], ph = (a) => {
|
|
|
1363
1363
|
var e;
|
|
1364
1364
|
const { transform: { target: s } } = t;
|
|
1365
1365
|
(e = s.canvas) === null || e === void 0 || e.fire("object:".concat(a), w(w({}, t), {}, { target: s })), s.fire(a, t);
|
|
1366
|
-
},
|
|
1366
|
+
}, wc = { left: -0.5, top: -0.5, center: 0, bottom: 0.5, right: 0.5 }, yt = (a) => typeof a == "string" ? wc[a] : a - 0.5, un = "not-allowed";
|
|
1367
1367
|
function _h(a) {
|
|
1368
1368
|
return yt(a.originX) === yt($) && yt(a.originY) === yt($);
|
|
1369
1369
|
}
|
|
@@ -1384,7 +1384,7 @@ function to(a, t, e, s, i) {
|
|
|
1384
1384
|
})(r, new C(s, i), t, e);
|
|
1385
1385
|
return u.x >= c && (u.x -= c), u.x <= -c && (u.x += c), u.y >= c && (u.y -= c), u.y <= c && (u.y += c), u.x -= h.offsetX, u.y -= h.offsetY, u;
|
|
1386
1386
|
}
|
|
1387
|
-
const
|
|
1387
|
+
const xc = (a, t, e, s) => {
|
|
1388
1388
|
const { target: i, offsetX: n, offsetY: r } = t, o = e - n, h = s - r, l = !fe(i, "lockMovementX") && i.left !== o, c = !fe(i, "lockMovementY") && i.top !== h;
|
|
1389
1389
|
return l && i.set(et, o), c && i.set(qt, h), (l || c) && yh(th, wh(a, t, e, s)), l || c;
|
|
1390
1390
|
}, dn = (a) => a.replace(/\s+/g, " "), Ko = { aliceblue: "#F0F8FF", antiquewhite: "#FAEBD7", aqua: "#0FF", aquamarine: "#7FFFD4", azure: "#F0FFFF", beige: "#F5F5DC", bisque: "#FFE4C4", black: "#000", blanchedalmond: "#FFEBCD", blue: "#00F", blueviolet: "#8A2BE2", brown: "#A52A2A", burlywood: "#DEB887", cadetblue: "#5F9EA0", chartreuse: "#7FFF00", chocolate: "#D2691E", coral: "#FF7F50", cornflowerblue: "#6495ED", cornsilk: "#FFF8DC", crimson: "#DC143C", cyan: "#0FF", darkblue: "#00008B", darkcyan: "#008B8B", darkgoldenrod: "#B8860B", darkgray: "#A9A9A9", darkgrey: "#A9A9A9", darkgreen: "#006400", darkkhaki: "#BDB76B", darkmagenta: "#8B008B", darkolivegreen: "#556B2F", darkorange: "#FF8C00", darkorchid: "#9932CC", darkred: "#8B0000", darksalmon: "#E9967A", darkseagreen: "#8FBC8F", darkslateblue: "#483D8B", darkslategray: "#2F4F4F", darkslategrey: "#2F4F4F", darkturquoise: "#00CED1", darkviolet: "#9400D3", deeppink: "#FF1493", deepskyblue: "#00BFFF", dimgray: "#696969", dimgrey: "#696969", dodgerblue: "#1E90FF", firebrick: "#B22222", floralwhite: "#FFFAF0", forestgreen: "#228B22", fuchsia: "#F0F", gainsboro: "#DCDCDC", ghostwhite: "#F8F8FF", gold: "#FFD700", goldenrod: "#DAA520", gray: "#808080", grey: "#808080", green: "#008000", greenyellow: "#ADFF2F", honeydew: "#F0FFF0", hotpink: "#FF69B4", indianred: "#CD5C5C", indigo: "#4B0082", ivory: "#FFFFF0", khaki: "#F0E68C", lavender: "#E6E6FA", lavenderblush: "#FFF0F5", lawngreen: "#7CFC00", lemonchiffon: "#FFFACD", lightblue: "#ADD8E6", lightcoral: "#F08080", lightcyan: "#E0FFFF", lightgoldenrodyellow: "#FAFAD2", lightgray: "#D3D3D3", lightgrey: "#D3D3D3", lightgreen: "#90EE90", lightpink: "#FFB6C1", lightsalmon: "#FFA07A", lightseagreen: "#20B2AA", lightskyblue: "#87CEFA", lightslategray: "#789", lightslategrey: "#789", lightsteelblue: "#B0C4DE", lightyellow: "#FFFFE0", lime: "#0F0", limegreen: "#32CD32", linen: "#FAF0E6", magenta: "#F0F", maroon: "#800000", mediumaquamarine: "#66CDAA", mediumblue: "#0000CD", mediumorchid: "#BA55D3", mediumpurple: "#9370DB", mediumseagreen: "#3CB371", mediumslateblue: "#7B68EE", mediumspringgreen: "#00FA9A", mediumturquoise: "#48D1CC", mediumvioletred: "#C71585", midnightblue: "#191970", mintcream: "#F5FFFA", mistyrose: "#FFE4E1", moccasin: "#FFE4B5", navajowhite: "#FFDEAD", navy: "#000080", oldlace: "#FDF5E6", olive: "#808000", olivedrab: "#6B8E23", orange: "#FFA500", orangered: "#FF4500", orchid: "#DA70D6", palegoldenrod: "#EEE8AA", palegreen: "#98FB98", paleturquoise: "#AFEEEE", palevioletred: "#DB7093", papayawhip: "#FFEFD5", peachpuff: "#FFDAB9", peru: "#CD853F", pink: "#FFC0CB", plum: "#DDA0DD", powderblue: "#B0E0E6", purple: "#800080", rebeccapurple: "#639", red: "#F00", rosybrown: "#BC8F8F", royalblue: "#4169E1", saddlebrown: "#8B4513", salmon: "#FA8072", sandybrown: "#F4A460", seagreen: "#2E8B57", seashell: "#FFF5EE", sienna: "#A0522D", silver: "#C0C0C0", skyblue: "#87CEEB", slateblue: "#6A5ACD", slategray: "#708090", slategrey: "#708090", snow: "#FFFAFA", springgreen: "#00FF7F", steelblue: "#4682B4", tan: "#D2B48C", teal: "#008080", thistle: "#D8BFD8", tomato: "#FF6347", turquoise: "#40E0D0", violet: "#EE82EE", wheat: "#F5DEB3", white: "#FFF", whitesmoke: "#F5F5F5", yellow: "#FF0", yellowgreen: "#9ACD32" }, Jn = (a, t, e) => (e < 0 && (e += 1), e > 1 && (e -= 1), e < 1 / 6 ? a + 6 * (t - a) * e : e < 0.5 ? t : e < 2 / 3 ? a + (t - a) * (2 / 3 - e) * 6 : a), Jo = (a, t, e, s) => {
|
|
@@ -1609,9 +1609,9 @@ class Sh {
|
|
|
1609
1609
|
function On(a) {
|
|
1610
1610
|
return new RegExp("^(" + a.join("|") + ")\\b", "i");
|
|
1611
1611
|
}
|
|
1612
|
-
const ls = "textDecorationThickness", Ch = ["fontSize", "fontWeight", "fontFamily", "fontStyle"], Ah = ["underline", "overline", "linethrough"], Th = [...Ch, "lineHeight", "text", "charSpacing", "textAlign", "styles", "path", "pathStartOffset", "pathSide", "pathAlign"], Eh = [...Th, ...Ah, "textBackgroundColor", "direction", ls],
|
|
1612
|
+
const ls = "textDecorationThickness", Ch = ["fontSize", "fontWeight", "fontFamily", "fontStyle"], Ah = ["underline", "overline", "linethrough"], Th = [...Ch, "lineHeight", "text", "charSpacing", "textAlign", "styles", "path", "pathStartOffset", "pathSide", "pathAlign"], Eh = [...Th, ...Ah, "textBackgroundColor", "direction", ls], Sc = [...Ch, ...Ah, Ht, "strokeWidth", wt, "deltaY", "textBackgroundColor", ls], Cc = { _reNewline: Xr, _reSpacesAndTabs: /[ \t\r]/g, _reSpaceAndTab: /[ \t\r]/, _reWords: /\S+/g, fontSize: 40, fontWeight: "normal", fontFamily: "Times New Roman", underline: !1, overline: !1, linethrough: !1, textAlign: et, fontStyle: "normal", lineHeight: 1.16, textBackgroundColor: "", stroke: null, shadow: null, path: void 0, pathStartOffset: 0, pathSide: et, pathAlign: "baseline", charSpacing: 0, deltaY: 0, direction: "ltr", CACHE_FONT_SIZE: 400, MIN_TEXT_WIDTH: 2, superscript: { size: 0.6, baseline: -0.35 }, subscript: { size: 0.6, baseline: 0.11 }, _fontSizeFraction: 0.222, offsets: { underline: 0.1, linethrough: -0.28167, overline: -0.81333 }, _fontSizeMult: 1.13, [ls]: 66.667 }, we = "justify", fn = "justify-left", ri = "justify-right", oi = "justify-center";
|
|
1613
1613
|
var ta, ea, sa;
|
|
1614
|
-
const de = String.raw(ta || (ta = Ee(["[-+]?(?:d*.d+|d+.?)(?:[eE][-+]?d+)?"], ["[-+]?(?:\\d*\\.\\d+|\\d+\\.?)(?:[eE][-+]?\\d+)?"]))), Zn = String.raw(ea || (ea = Ee(["(?:s*,?s+|s*,s*)"], ["(?:\\s*,?\\s+|\\s*,\\s*)"]))), Sr = "http://www.w3.org/2000/svg",
|
|
1614
|
+
const de = String.raw(ta || (ta = Ee(["[-+]?(?:d*.d+|d+.?)(?:[eE][-+]?d+)?"], ["[-+]?(?:\\d*\\.\\d+|\\d+\\.?)(?:[eE][-+]?\\d+)?"]))), Zn = String.raw(ea || (ea = Ee(["(?:s*,?s+|s*,s*)"], ["(?:\\s*,?\\s+|\\s*,\\s*)"]))), Sr = "http://www.w3.org/2000/svg", Ac = new RegExp("(normal|italic)?\\s*(normal|small-caps)?\\s*(normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900)?\\s*(" + de + "(?:px|cm|mm|em|pt|pc|in)*)(?:\\/(normal|" + de + "))?\\s+(.*)"), Tc = { cx: et, x: et, r: "radius", cy: qt, y: qt, display: "visible", visibility: "visible", transform: "transformMatrix", "fill-opacity": "fillOpacity", "fill-rule": "fillRule", "font-family": "fontFamily", "font-size": "fontSize", "font-style": "fontStyle", "font-weight": "fontWeight", "letter-spacing": "charSpacing", "paint-order": "paintFirst", "stroke-dasharray": "strokeDashArray", "stroke-dashoffset": "strokeDashOffset", "stroke-linecap": "strokeLineCap", "stroke-linejoin": "strokeLineJoin", "stroke-miterlimit": "strokeMiterLimit", "stroke-opacity": "strokeOpacity", "stroke-width": "strokeWidth", "text-decoration": "textDecoration", "text-anchor": "textAnchor", opacity: "opacity", "clip-path": "clipPath", "clip-rule": "clipRule", "vector-effect": "strokeUniform", "image-rendering": "imageSmoothing", "text-decoration-thickness": ls }, Qn = "font-size", tr = "clip-path", Ec = On(["path", "circle", "polygon", "polyline", "ellipse", "rect", "line", "image", "text"]), kc = On(["symbol", "image", "marker", "pattern", "view", "svg"]), ia = On(["symbol", "g", "a", "svg", "clipPath", "defs"]), na = new RegExp(String.raw(sa || (sa = Ee(["^s*(", ")", "(", ")", "(", ")", "(", ")s*$"], ["^\\s*(", ")", "(", ")", "(", ")", "(", ")\\s*$"])), de, Zn, de, Zn, de, Zn, de)), Mc = new C(1, 0), kh = new C(), so = (a, t) => a.rotate(t), gn = (a, t) => new C(t).subtract(a), pn = (a) => a.distanceFrom(kh), mn = (a, t) => Math.atan2(Ts(a, t), Ph(a, t)), Mh = (a) => mn(Mc, a), Dn = (a) => a.eq(kh) ? a : a.scalarDivide(pn(a)), io = function(a) {
|
|
1615
1615
|
let t = !(arguments.length > 1 && arguments[1] !== void 0) || arguments[1];
|
|
1616
1616
|
return Dn(new C(-a.y, a.x).scalarMultiply(t ? 1 : -1));
|
|
1617
1617
|
}, Ts = (a, t) => a.x * t.y - a.y * t.x, Ph = (a, t) => a.x * t.x + a.y * t.y, Cr = (a, t, e) => {
|
|
@@ -1655,8 +1655,8 @@ class Fe {
|
|
|
1655
1655
|
}
|
|
1656
1656
|
}
|
|
1657
1657
|
x(Fe, "ownDefaults", { color: "rgb(0,0,0)", blur: 0, offsetX: 0, offsetY: 0, affectStroke: !1, includeDefaultValues: !0, nonScaling: !1 }), x(Fe, "type", "shadow"), L.setClass(Fe, "shadow");
|
|
1658
|
-
const cs = (a, t, e) => Math.max(a, Math.min(t, e)),
|
|
1659
|
-
var
|
|
1658
|
+
const cs = (a, t, e) => Math.max(a, Math.min(t, e)), Pc = [qt, et, Vt, te, "flipX", "flipY", "originX", "originY", "angle", "opacity", "globalCompositeOperation", "shadow", "visible", Ns, js], je = [wt, Ht, "strokeWidth", "strokeDashArray", "width", "height", "paintFirst", "strokeUniform", "strokeLineCap", "strokeDashOffset", "strokeLineJoin", "strokeMiterLimit", "backgroundColor", "clipPath"], Oc = { top: 0, left: 0, width: 0, height: 0, angle: 0, flipX: !1, flipY: !1, scaleX: 1, scaleY: 1, minScaleLimit: 0, skewX: 0, skewY: 0, originX: et, originY: qt, strokeWidth: 1, strokeUniform: !1, padding: 0, opacity: 1, paintFirst: wt, fill: "rgb(0,0,0)", fillRule: "nonzero", stroke: null, strokeDashArray: null, strokeDashOffset: 0, strokeLineCap: "butt", strokeLineJoin: "miter", strokeMiterLimit: 4, globalCompositeOperation: "source-over", backgroundColor: "", shadow: null, visible: !0, includeDefaultValues: !0, excludeFromExport: !1, objectCaching: !0, clipPath: void 0, inverted: !1, absolutePositioned: !1, centeredRotation: !0, centeredScaling: !1, dirty: !0 }, er = (a, t, e, s) => (a < Math.abs(t) ? (a = t, s = e / 4) : s = t === 0 && a === 0 ? e / Ne * Math.asin(1) : e / Ne * Math.asin(t / a), { a, c: t, p: e, s }), aa = (a, t, e, s, i) => a * Math.pow(2, 10 * (s -= 1)) * Math.sin((s * i - t) * Ne / e), Oh = (a, t, e, s) => -e * Math.cos(a / s * We) + e + t, Ar = (a, t, e, s) => (a /= s) < 1 / 2.75 ? e * (7.5625 * a * a) + t : a < 2 / 2.75 ? e * (7.5625 * (a -= 1.5 / 2.75) * a + 0.75) + t : a < 2.5 / 2.75 ? e * (7.5625 * (a -= 2.25 / 2.75) * a + 0.9375) + t : e * (7.5625 * (a -= 2.625 / 2.75) * a + 0.984375) + t, ha = (a, t, e, s) => e - Ar(s - a, 0, e, s) + t;
|
|
1659
|
+
var Dc = Object.freeze({ __proto__: null, defaultEasing: Oh, easeInBack: function(a, t, e, s) {
|
|
1660
1660
|
let i = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : 1.70158;
|
|
1661
1661
|
return e * (a /= s) * a * ((i + 1) * a - i) + t;
|
|
1662
1662
|
}, easeInBounce: ha, easeInCirc: (a, t, e, s) => -e * (Math.sqrt(1 - (a /= s) * a) - 1) + t, easeInCubic: (a, t, e, s) => e * (a / s) ** 3 + t, easeInElastic: (a, t, e, s) => {
|
|
@@ -1690,10 +1690,10 @@ var Oc = Object.freeze({ __proto__: null, defaultEasing: Oh, easeInBack: functio
|
|
|
1690
1690
|
const { a: r, s: o, p: h, c: l } = er(i, e, n, 1.70158);
|
|
1691
1691
|
return r * 2 ** (-10 * a) * Math.sin((a * s - o) * Ne / h) + l + t;
|
|
1692
1692
|
}, easeOutExpo: (a, t, e, s) => a === s ? t + e : e * -(2 ** (-10 * a / s) + 1) + t, easeOutQuad: (a, t, e, s) => -e * (a /= s) * (a - 2) + t, easeOutQuart: (a, t, e, s) => -e * ((a = a / s - 1) * a ** 3 - 1) + t, easeOutQuint: (a, t, e, s) => e * ((a / s - 1) ** 5 + 1) + t, easeOutSine: (a, t, e, s) => e * Math.sin(a / s * We) + t });
|
|
1693
|
-
const
|
|
1693
|
+
const Rc = () => !1;
|
|
1694
1694
|
class no {
|
|
1695
1695
|
constructor(t) {
|
|
1696
|
-
let { startValue: e, byValue: s, duration: i = 500, delay: n = 0, easing: r = Oh, onStart: o = os, onChange: h = os, onComplete: l = os, abort: c =
|
|
1696
|
+
let { startValue: e, byValue: s, duration: i = 500, delay: n = 0, easing: r = Oh, onStart: o = os, onChange: h = os, onComplete: l = os, abort: c = Rc, target: u } = t;
|
|
1697
1697
|
x(this, "_state", "pending"), x(this, "durationProgress", 0), x(this, "valueProgress", 0), this.tick = this.tick.bind(this), this.duration = i, this.delay = n, this.easing = r, this._onStart = o, this._onChange = h, this._onComplete = l, this._abort = c, this.target = u, this.startValue = e, this.byValue = s, this.value = this.startValue, this.endValue = Object.freeze(this.calculate(this.duration).value);
|
|
1698
1698
|
}
|
|
1699
1699
|
get state() {
|
|
@@ -1724,32 +1724,32 @@ class no {
|
|
|
1724
1724
|
this._state = "aborted", this.unregister();
|
|
1725
1725
|
}
|
|
1726
1726
|
}
|
|
1727
|
-
const
|
|
1728
|
-
class
|
|
1727
|
+
const Lc = ["startValue", "endValue"];
|
|
1728
|
+
class Fc extends no {
|
|
1729
1729
|
constructor(t) {
|
|
1730
1730
|
let { startValue: e = 0, endValue: s = 100 } = t;
|
|
1731
|
-
super(w(w({}, ht(t,
|
|
1731
|
+
super(w(w({}, ht(t, Lc)), {}, { startValue: e, byValue: s - e }));
|
|
1732
1732
|
}
|
|
1733
1733
|
calculate(t) {
|
|
1734
1734
|
const e = this.easing(t, this.startValue, this.byValue, this.duration);
|
|
1735
1735
|
return { value: e, valueProgress: Math.abs((e - this.startValue) / this.byValue) };
|
|
1736
1736
|
}
|
|
1737
1737
|
}
|
|
1738
|
-
const
|
|
1739
|
-
class
|
|
1738
|
+
const Ic = ["startValue", "endValue"];
|
|
1739
|
+
class Nc extends no {
|
|
1740
1740
|
constructor(t) {
|
|
1741
1741
|
let { startValue: e = [0], endValue: s = [100] } = t;
|
|
1742
|
-
super(w(w({}, ht(t,
|
|
1742
|
+
super(w(w({}, ht(t, Ic)), {}, { startValue: e, byValue: s.map(((i, n) => i - e[n])) }));
|
|
1743
1743
|
}
|
|
1744
1744
|
calculate(t) {
|
|
1745
1745
|
const e = this.startValue.map(((s, i) => this.easing(t, s, this.byValue[i], this.duration, i)));
|
|
1746
1746
|
return { value: e, valueProgress: Math.abs((e[0] - this.startValue[0]) / this.byValue[0]) };
|
|
1747
1747
|
}
|
|
1748
1748
|
}
|
|
1749
|
-
const
|
|
1750
|
-
class
|
|
1749
|
+
const jc = ["startValue", "endValue", "easing", "onChange", "onComplete", "abort"], Bc = (a, t, e, s) => t + e * (1 - Math.cos(a / s * We)), sr = (a) => a && ((t, e, s) => a(new it(t).toRgba(), e, s));
|
|
1750
|
+
class Hc extends no {
|
|
1751
1751
|
constructor(t) {
|
|
1752
|
-
let { startValue: e, endValue: s, easing: i =
|
|
1752
|
+
let { startValue: e, endValue: s, easing: i = Bc, onChange: n, onComplete: r, abort: o } = t, h = ht(t, jc);
|
|
1753
1753
|
const l = new it(e).getSource(), c = new it(s).getSource();
|
|
1754
1754
|
super(w(w({}, h), {}, { startValue: l, byValue: c.map(((u, d) => u - l[d])), easing: i, onChange: sr(n), onComplete: sr(r), abort: sr(o) }));
|
|
1755
1755
|
}
|
|
@@ -1759,11 +1759,11 @@ class Bc extends no {
|
|
|
1759
1759
|
}
|
|
1760
1760
|
}
|
|
1761
1761
|
function ro(a) {
|
|
1762
|
-
const t = ((e) => Array.isArray(e.startValue) || Array.isArray(e.endValue))(a) ? new
|
|
1762
|
+
const t = ((e) => Array.isArray(e.startValue) || Array.isArray(e.endValue))(a) ? new Nc(a) : new Fc(a);
|
|
1763
1763
|
return t.start(), t;
|
|
1764
1764
|
}
|
|
1765
1765
|
function Dh(a) {
|
|
1766
|
-
const t = new
|
|
1766
|
+
const t = new Hc(a);
|
|
1767
1767
|
return t.start(), t;
|
|
1768
1768
|
}
|
|
1769
1769
|
class dt {
|
|
@@ -1841,7 +1841,7 @@ class dt {
|
|
|
1841
1841
|
return dt.intersectPolygonPolygon(t, [i, r, n, o]);
|
|
1842
1842
|
}
|
|
1843
1843
|
}
|
|
1844
|
-
class
|
|
1844
|
+
class zc extends nh {
|
|
1845
1845
|
getX() {
|
|
1846
1846
|
return this.getXY().x;
|
|
1847
1847
|
}
|
|
@@ -2026,8 +2026,8 @@ class Hc extends nh {
|
|
|
2026
2026
|
return this.translateToOriginPoint(this.getRelativeCenterPoint(), et, qt);
|
|
2027
2027
|
}
|
|
2028
2028
|
}
|
|
2029
|
-
const
|
|
2030
|
-
let ke = class en extends
|
|
2029
|
+
const Gc = ["type"], Vc = ["extraParam"];
|
|
2030
|
+
let ke = class en extends zc {
|
|
2031
2031
|
static getDefaults() {
|
|
2032
2032
|
return en.ownDefaults;
|
|
2033
2033
|
}
|
|
@@ -2361,14 +2361,14 @@ let ke = class en extends Hc {
|
|
|
2361
2361
|
return "#<".concat(this.constructor.type, ">");
|
|
2362
2362
|
}
|
|
2363
2363
|
static _fromObject(t) {
|
|
2364
|
-
let e = ht(t,
|
|
2364
|
+
let e = ht(t, Gc), s = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, { extraParam: i } = s, n = ht(s, Vc);
|
|
2365
2365
|
return vi(e, n).then(((r) => i ? (delete r[i], new this(e[i], r)) : new this(r)));
|
|
2366
2366
|
}
|
|
2367
2367
|
static fromObject(t, e) {
|
|
2368
2368
|
return this._fromObject(t, e);
|
|
2369
2369
|
}
|
|
2370
2370
|
};
|
|
2371
|
-
x(ke, "stateProperties",
|
|
2371
|
+
x(ke, "stateProperties", Pc), x(ke, "cacheProperties", je), x(ke, "ownDefaults", Oc), x(ke, "type", "FabricObject"), x(ke, "colorProperties", [wt, Ht, "backgroundColor"]), x(ke, "customProperties", []), L.setClass(ke), L.setClass(ke, "object");
|
|
2372
2372
|
const Hs = (a, t, e) => (s, i, n, r) => {
|
|
2373
2373
|
const o = t(s, i, n, r);
|
|
2374
2374
|
return o && yh(a, w(w({}, wh(s, i, n, r)), e)), o;
|
|
@@ -2387,13 +2387,13 @@ const la = Hs(ci, zs(((a, t, e, s) => {
|
|
|
2387
2387
|
}
|
|
2388
2388
|
return !1;
|
|
2389
2389
|
})));
|
|
2390
|
-
function
|
|
2390
|
+
function Wc(a, t, e, s, i) {
|
|
2391
2391
|
s = s || {};
|
|
2392
2392
|
const n = this.sizeX || s.cornerSize || i.cornerSize, r = this.sizeY || s.cornerSize || i.cornerSize, o = s.transparentCorners !== void 0 ? s.transparentCorners : i.transparentCorners, h = o ? Ht : wt, l = !o && (s.cornerStrokeColor || i.cornerStrokeColor);
|
|
2393
2393
|
let c, u = t, d = e;
|
|
2394
2394
|
a.save(), a.fillStyle = s.cornerColor || i.cornerColor || "", a.strokeStyle = s.cornerStrokeColor || i.cornerStrokeColor || "", n > r ? (c = n, a.scale(1, r / n), d = e * n / r) : r > n ? (c = r, a.scale(n / r, 1), u = t * r / n) : c = n, a.beginPath(), a.arc(u, d, c / 2, 0, Ne, !1), a[h](), l && a.stroke(), a.restore();
|
|
2395
2395
|
}
|
|
2396
|
-
function
|
|
2396
|
+
function Xc(a, t, e, s, i) {
|
|
2397
2397
|
s = s || {};
|
|
2398
2398
|
const n = this.sizeX || s.cornerSize || i.cornerSize, r = this.sizeY || s.cornerSize || i.cornerSize, o = s.transparentCorners !== void 0 ? s.transparentCorners : i.transparentCorners, h = o ? Ht : wt, l = !o && (s.cornerStrokeColor || i.cornerStrokeColor), c = n / 2, u = r / 2;
|
|
2399
2399
|
a.save(), a.fillStyle = s.cornerColor || i.cornerColor || "", a.strokeStyle = s.cornerStrokeColor || i.cornerStrokeColor || "", a.translate(t, e);
|
|
@@ -2439,10 +2439,10 @@ class he {
|
|
|
2439
2439
|
return { tl: new C(-0.5, -0.5).transform(o), tr: new C(0.5, -0.5).transform(o), br: new C(0.5, 0.5).transform(o), bl: new C(-0.5, 0.5).transform(o) };
|
|
2440
2440
|
}
|
|
2441
2441
|
render(t, e, s, i, n) {
|
|
2442
|
-
((i = i || {}).cornerStyle || n.cornerStyle) === "circle" ?
|
|
2442
|
+
((i = i || {}).cornerStyle || n.cornerStyle) === "circle" ? Wc.call(this, t, e, s, i, n) : Xc.call(this, t, e, s, i, n);
|
|
2443
2443
|
}
|
|
2444
2444
|
}
|
|
2445
|
-
const
|
|
2445
|
+
const Uc = (a, t, e) => e.lockRotation ? un : t.cursorStyle, Yc = Hs(eh, zs(((a, t, e, s) => {
|
|
2446
2446
|
let { target: i, ex: n, ey: r, theta: o, originX: h, originY: l } = t;
|
|
2447
2447
|
const c = i.translateToOriginPoint(i.getRelativeCenterPoint(), h, l);
|
|
2448
2448
|
if (fe(i, "lockRotation")) return !1;
|
|
@@ -2466,11 +2466,11 @@ function Lh(a, t, e) {
|
|
|
2466
2466
|
const { width: n, height: r, strokeWidth: o } = a;
|
|
2467
2467
|
return n === 0 && o === 0 && t !== "y" || r === 0 && o === 0 && t !== "x";
|
|
2468
2468
|
}
|
|
2469
|
-
const
|
|
2469
|
+
const $c = ["e", "se", "s", "sw", "w", "nw", "n", "ne", "e"], Zs = (a, t, e) => {
|
|
2470
2470
|
const s = Rh(a, e);
|
|
2471
2471
|
if (Lh(e, t.x !== 0 && t.y === 0 ? "x" : t.x === 0 && t.y !== 0 ? "y" : "", s)) return un;
|
|
2472
2472
|
const i = xh(e, t);
|
|
2473
|
-
return "".concat(
|
|
2473
|
+
return "".concat($c[i], "-resize");
|
|
2474
2474
|
};
|
|
2475
2475
|
function oo(a, t, e, s) {
|
|
2476
2476
|
let i = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : {};
|
|
@@ -2489,17 +2489,17 @@ function oo(a, t, e, s) {
|
|
|
2489
2489
|
const g = n.scaleX, p = n.scaleY;
|
|
2490
2490
|
return r ? (r === "x" && n.set(Vt, l), r === "y" && n.set(te, c)) : (!fe(n, "lockScalingX") && n.set(Vt, l), !fe(n, "lockScalingY") && n.set(te, c)), g !== n.scaleX || p !== n.scaleY;
|
|
2491
2491
|
}
|
|
2492
|
-
const Ei = Hs(Tn, zs(((a, t, e, s) => oo(a, t, e, s)))),
|
|
2492
|
+
const Ei = Hs(Tn, zs(((a, t, e, s) => oo(a, t, e, s)))), qc = Hs(Tn, zs(((a, t, e, s) => oo(a, t, e, s, { by: "x" })))), Kc = Hs(Tn, zs(((a, t, e, s) => oo(a, t, e, s, { by: "y" })))), Jc = ["target", "ex", "ey", "skewingSide"], ir = { x: { counterAxis: "y", scale: Vt, skew: Ns, lockSkewing: "lockSkewingX", origin: "originX", flip: "flipX" }, y: { counterAxis: "x", scale: te, skew: js, lockSkewing: "lockSkewingY", origin: "originY", flip: "flipY" } }, Zc = ["ns", "nesw", "ew", "nwse"], Qc = (a, t, e) => {
|
|
2493
2493
|
if (t.x !== 0 && fe(e, "lockSkewingY") || t.y !== 0 && fe(e, "lockSkewingX")) return un;
|
|
2494
2494
|
const s = xh(e, t) % 4;
|
|
2495
|
-
return "".concat(
|
|
2495
|
+
return "".concat(Zc[s], "-resize");
|
|
2496
2496
|
};
|
|
2497
2497
|
function Fh(a, t, e, s, i) {
|
|
2498
2498
|
const { target: n } = e, { counterAxis: r, origin: o, lockSkewing: h, skew: l, flip: c } = ir[a];
|
|
2499
2499
|
if (fe(n, h)) return !1;
|
|
2500
2500
|
const { origin: u, flip: d } = ir[r], f = yt(e[u]) * (n[d] ? -1 : 1), g = -Math.sign(f) * (n[c] ? -1 : 1), p = 0.5 * -((n[l] === 0 && to(e, $, $, s, i)[a] > 0 || n[l] > 0 ? 1 : -1) * g) + 0.5;
|
|
2501
2501
|
return Hs(sh, zs(((m, v, y, _) => (function(S, A, T) {
|
|
2502
|
-
let { target: k, ex: P, ey: j, skewingSide: F } = A, I = ht(A,
|
|
2502
|
+
let { target: k, ex: P, ey: j, skewingSide: F } = A, I = ht(A, Jc);
|
|
2503
2503
|
const { skew: O } = ir[S], D = T.subtract(new C(P, j)).divide(new C(k.scaleX, k.scaleY))[S], z = k[O], M = I[O], R = Math.tan(ft(M)), W = S === "y" ? k._getTransformedDimensions({ scaleX: 1, scaleY: 1, skewX: 0 }).x : k._getTransformedDimensions({ scaleX: 1, scaleY: 1 }).y, ot = 2 * D * F / Math.max(W, 1) + R, lt = Te(Math.atan(ot));
|
|
2504
2504
|
k.set(O, lt);
|
|
2505
2505
|
const E = z !== k[O];
|
|
@@ -2510,14 +2510,14 @@ function Fh(a, t, e, s, i) {
|
|
|
2510
2510
|
return E;
|
|
2511
2511
|
})(a, v, new C(y, _)))))(t, w(w({}, e), {}, { [o]: p, skewingSide: g }), s, i);
|
|
2512
2512
|
}
|
|
2513
|
-
const
|
|
2513
|
+
const tu = (a, t, e, s) => Fh("x", a, t, e, s), eu = (a, t, e, s) => Fh("y", a, t, e, s);
|
|
2514
2514
|
function Rn(a, t) {
|
|
2515
2515
|
return a[t.canvas.altActionKey];
|
|
2516
2516
|
}
|
|
2517
2517
|
const ki = (a, t, e) => {
|
|
2518
2518
|
const s = Rn(a, e);
|
|
2519
2519
|
return t.x === 0 ? s ? Ns : te : t.y === 0 ? s ? js : Vt : "";
|
|
2520
|
-
}, xs = (a, t, e) => Rn(a, e) ?
|
|
2520
|
+
}, xs = (a, t, e) => Rn(a, e) ? Qc(0, t, e) : Zs(a, t, e), ca = (a, t, e, s) => Rn(a, t.target) ? eu(a, t, e, s) : qc(a, t, e, s), ua = (a, t, e, s) => Rn(a, t.target) ? tu(a, t, e, s) : Kc(a, t, e, s), Ih = () => ({ ml: new he({ x: -0.5, y: 0, cursorStyleHandler: xs, actionHandler: ca, getActionName: ki }), mr: new he({ x: 0.5, y: 0, cursorStyleHandler: xs, actionHandler: ca, getActionName: ki }), mb: new he({ x: 0, y: 0.5, cursorStyleHandler: xs, actionHandler: ua, getActionName: ki }), mt: new he({ x: 0, y: -0.5, cursorStyleHandler: xs, actionHandler: ua, getActionName: ki }), tl: new he({ x: -0.5, y: -0.5, cursorStyleHandler: Zs, actionHandler: Ei }), tr: new he({ x: 0.5, y: -0.5, cursorStyleHandler: Zs, actionHandler: Ei }), bl: new he({ x: -0.5, y: 0.5, cursorStyleHandler: Zs, actionHandler: Ei }), br: new he({ x: 0.5, y: 0.5, cursorStyleHandler: Zs, actionHandler: Ei }), mtr: new he({ x: 0, y: -0.5, actionHandler: Yc, cursorStyleHandler: Uc, offsetY: -40, withConnection: !0, actionName: Ur }) }), su = () => ({ mr: new he({ x: 0.5, y: 0, actionHandler: la, cursorStyleHandler: xs, actionName: ci }), ml: new he({ x: -0.5, y: 0, actionHandler: la, cursorStyleHandler: xs, actionName: ci }) }), iu = () => w(w({}, Ih()), su());
|
|
2521
2521
|
class di extends ke {
|
|
2522
2522
|
static getDefaults() {
|
|
2523
2523
|
return w(w({}, super.getDefaults()), di.ownDefaults);
|
|
@@ -2694,14 +2694,14 @@ class Bh {
|
|
|
2694
2694
|
return t.multiply(this.strokeUniformScalar).scalarMultiply(e);
|
|
2695
2695
|
}
|
|
2696
2696
|
}
|
|
2697
|
-
const
|
|
2697
|
+
const nu = new C();
|
|
2698
2698
|
class Es extends Bh {
|
|
2699
2699
|
static getOrthogonalRotationFactor(t, e) {
|
|
2700
2700
|
const s = e ? mn(t, e) : Mh(t);
|
|
2701
2701
|
return Math.abs(s) < We ? -1 : 1;
|
|
2702
2702
|
}
|
|
2703
2703
|
constructor(t, e, s, i) {
|
|
2704
|
-
super(i), x(this, "AB", void 0), x(this, "AC", void 0), x(this, "alpha", void 0), x(this, "bisector", void 0), this.A = new C(t), this.B = new C(e), this.C = new C(s), this.AB = this.createSideVector(this.A, this.B), this.AC = this.createSideVector(this.A, this.C), this.alpha = mn(this.AB, this.AC), this.bisector = Dn(so(this.AB.eq(
|
|
2704
|
+
super(i), x(this, "AB", void 0), x(this, "AC", void 0), x(this, "alpha", void 0), x(this, "bisector", void 0), this.A = new C(t), this.B = new C(e), this.C = new C(s), this.AB = this.createSideVector(this.A, this.B), this.AC = this.createSideVector(this.A, this.C), this.alpha = mn(this.AB, this.AC), this.bisector = Dn(so(this.AB.eq(nu) ? this.AC : this.AB, this.alpha / 2));
|
|
2705
2705
|
}
|
|
2706
2706
|
calcOrthogonalProjection(t, e) {
|
|
2707
2707
|
let s = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : this.strokeProjectionMagnitude;
|
|
@@ -2829,12 +2829,12 @@ const Ln = (a) => {
|
|
|
2829
2829
|
return s;
|
|
2830
2830
|
}));
|
|
2831
2831
|
}
|
|
2832
|
-
return
|
|
2833
|
-
},
|
|
2832
|
+
return ru(a);
|
|
2833
|
+
}, ru = (a) => {
|
|
2834
2834
|
const t = [];
|
|
2835
|
-
for (let e, s = 0; s < a.length; s++) (e =
|
|
2835
|
+
for (let e, s = 0; s < a.length; s++) (e = ou(a, s)) !== !1 && t.push(e);
|
|
2836
2836
|
return t;
|
|
2837
|
-
},
|
|
2837
|
+
}, ou = (a, t) => {
|
|
2838
2838
|
const e = a.charCodeAt(t);
|
|
2839
2839
|
if (isNaN(e)) return "";
|
|
2840
2840
|
if (e < 55296 || e > 57343) return a.charAt(t);
|
|
@@ -2849,7 +2849,7 @@ const Ln = (a) => {
|
|
|
2849
2849
|
if (55296 > s || s > 56319) throw "Low surrogate without preceding high surrogate";
|
|
2850
2850
|
return !1;
|
|
2851
2851
|
};
|
|
2852
|
-
var
|
|
2852
|
+
var au = Object.freeze({ __proto__: null, capitalize: function(a) {
|
|
2853
2853
|
let t = arguments.length > 1 && arguments[1] !== void 0 && arguments[1];
|
|
2854
2854
|
return "".concat(a.charAt(0).toUpperCase()).concat(t ? a.slice(1) : a.slice(1).toLowerCase());
|
|
2855
2855
|
}, escapeXml: zh, graphemeSplit: Ln });
|
|
@@ -2890,7 +2890,7 @@ function fa(a, t) {
|
|
|
2890
2890
|
}
|
|
2891
2891
|
return t.length === 0;
|
|
2892
2892
|
}
|
|
2893
|
-
function
|
|
2893
|
+
function hu(a, t) {
|
|
2894
2894
|
let e = !0;
|
|
2895
2895
|
const s = fa(a, t.pop());
|
|
2896
2896
|
return s && t.length && (e = (function(i, n) {
|
|
@@ -2899,17 +2899,17 @@ function au(a, t) {
|
|
|
2899
2899
|
return n.length === 0;
|
|
2900
2900
|
})(a, t)), s && e && t.length === 0;
|
|
2901
2901
|
}
|
|
2902
|
-
const
|
|
2902
|
+
const lu = (a) => {
|
|
2903
2903
|
var t;
|
|
2904
|
-
return (t =
|
|
2905
|
-
},
|
|
2904
|
+
return (t = Tc[a]) !== null && t !== void 0 ? t : a;
|
|
2905
|
+
}, cu = new RegExp("(".concat(de, ")"), "gi"), uu = (a) => dn(a.replace(cu, " $1 ").replace(/,/gi, " "));
|
|
2906
2906
|
var ga, pa, ma, ba, va, ya, _a;
|
|
2907
|
-
const Nt = "(".concat(de, ")"),
|
|
2907
|
+
const Nt = "(".concat(de, ")"), du = String.raw(ga || (ga = Ee(["(skewX)(", ")"], ["(skewX)\\(", "\\)"])), Nt), fu = String.raw(pa || (pa = Ee(["(skewY)(", ")"], ["(skewY)\\(", "\\)"])), Nt), gu = String.raw(ma || (ma = Ee(["(rotate)(", "(?: ", " ", ")?)"], ["(rotate)\\(", "(?: ", " ", ")?\\)"])), Nt, Nt, Nt), pu = String.raw(ba || (ba = Ee(["(scale)(", "(?: ", ")?)"], ["(scale)\\(", "(?: ", ")?\\)"])), Nt, Nt), mu = String.raw(va || (va = Ee(["(translate)(", "(?: ", ")?)"], ["(translate)\\(", "(?: ", ")?\\)"])), Nt, Nt), bu = String.raw(ya || (ya = Ee(["(matrix)(", " ", " ", " ", " ", " ", ")"], ["(matrix)\\(", " ", " ", " ", " ", " ", "\\)"])), Nt, Nt, Nt, Nt, Nt, Nt), ho = "(?:".concat(bu, "|").concat(mu, "|").concat(gu, "|").concat(pu, "|").concat(du, "|").concat(fu, ")"), vu = "(?:".concat(ho, "*)"), yu = String.raw(_a || (_a = Ee(["^s*(?:", "?)s*$"], ["^\\s*(?:", "?)\\s*$"])), vu), _u = new RegExp(yu), wu = new RegExp(ho), xu = new RegExp(ho, "g");
|
|
2908
2908
|
function bn(a) {
|
|
2909
2909
|
const t = [];
|
|
2910
|
-
if (!(a =
|
|
2911
|
-
for (const e of a.matchAll(
|
|
2912
|
-
const s =
|
|
2910
|
+
if (!(a = uu(a).replace(/\s*([()])\s*/gi, "$1")) || a && !_u.test(a)) return [...Gt];
|
|
2911
|
+
for (const e of a.matchAll(xu)) {
|
|
2912
|
+
const s = wu.exec(e[0]);
|
|
2913
2913
|
if (!s) continue;
|
|
2914
2914
|
let i = Gt;
|
|
2915
2915
|
const n = s.filter(((g) => !!g)), [, r, ...o] = n, [h, l, c, u, d, f] = o.map(((g) => parseFloat(g)));
|
|
@@ -2936,7 +2936,7 @@ function bn(a) {
|
|
|
2936
2936
|
}
|
|
2937
2937
|
return kn(t);
|
|
2938
2938
|
}
|
|
2939
|
-
function
|
|
2939
|
+
function Su(a, t, e, s) {
|
|
2940
2940
|
const i = Array.isArray(t);
|
|
2941
2941
|
let n, r = t;
|
|
2942
2942
|
if (a !== wt && a !== Ht || t !== Bt) {
|
|
@@ -2958,8 +2958,8 @@ function xu(a, t, e, s) {
|
|
|
2958
2958
|
} else r = "";
|
|
2959
2959
|
return !i && isNaN(n) ? r : n;
|
|
2960
2960
|
}
|
|
2961
|
-
function
|
|
2962
|
-
const e = a.match(
|
|
2961
|
+
function Cu(a, t) {
|
|
2962
|
+
const e = a.match(Ac);
|
|
2963
2963
|
if (!e) return;
|
|
2964
2964
|
const s = e[1], i = e[3], n = e[4], r = e[5], o = e[6];
|
|
2965
2965
|
s && (t.fontStyle = s), i && (t.fontWeight = isNaN(parseFloat(i)) ? i : parseFloat(i)), n && (t.fontSize = It(n)), o && (t.fontFamily = o), r && (t.lineHeight = r === "normal" ? 1 : r);
|
|
@@ -2971,7 +2971,7 @@ function Tr(a, t) {
|
|
|
2971
2971
|
t[s.trim().toLowerCase()] = i.trim();
|
|
2972
2972
|
}));
|
|
2973
2973
|
}
|
|
2974
|
-
function
|
|
2974
|
+
function Au(a) {
|
|
2975
2975
|
const t = {}, e = a.getAttribute("style");
|
|
2976
2976
|
return e && (typeof e == "string" ? Tr(e, t) : (function(s, i) {
|
|
2977
2977
|
Object.entries(s).forEach(((n) => {
|
|
@@ -2980,7 +2980,7 @@ function Cu(a) {
|
|
|
2980
2980
|
}));
|
|
2981
2981
|
})(e, t)), t;
|
|
2982
2982
|
}
|
|
2983
|
-
const
|
|
2983
|
+
const Tu = { stroke: "strokeOpacity", fill: "fillOpacity" };
|
|
2984
2984
|
function Be(a, t, e) {
|
|
2985
2985
|
if (!a) return {};
|
|
2986
2986
|
let s, i = {}, n = Wr;
|
|
@@ -2990,20 +2990,20 @@ function Be(a, t, e) {
|
|
|
2990
2990
|
return u && (l[c] = u), l;
|
|
2991
2991
|
}), {})), (function(l) {
|
|
2992
2992
|
let c = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, u = {};
|
|
2993
|
-
for (const d in c)
|
|
2993
|
+
for (const d in c) hu(l, d.split(" ")) && (u = w(w({}, u), c[d]));
|
|
2994
2994
|
return u;
|
|
2995
|
-
})(a, e)),
|
|
2995
|
+
})(a, e)), Au(a));
|
|
2996
2996
|
r[tr] && a.setAttribute(tr, r[tr]), r[Qn] && (s = It(r[Qn], n), r[Qn] = "".concat(s));
|
|
2997
2997
|
const o = {};
|
|
2998
2998
|
for (const l in r) {
|
|
2999
|
-
const c =
|
|
2999
|
+
const c = lu(l), u = Su(c, r[l], i, s);
|
|
3000
3000
|
o[c] = u;
|
|
3001
3001
|
}
|
|
3002
|
-
o && o.font &&
|
|
3002
|
+
o && o.font && Cu(o.font, o);
|
|
3003
3003
|
const h = w(w({}, i), o);
|
|
3004
3004
|
return ia.test(a.nodeName) ? h : (function(l) {
|
|
3005
3005
|
const c = Rt.getDefaults();
|
|
3006
|
-
return Object.entries(
|
|
3006
|
+
return Object.entries(Tu).forEach(((u) => {
|
|
3007
3007
|
let [d, f] = u;
|
|
3008
3008
|
if (l[f] === void 0 || l[d] === "") return;
|
|
3009
3009
|
if (l[d] === void 0) {
|
|
@@ -3016,7 +3016,7 @@ function Be(a, t, e) {
|
|
|
3016
3016
|
})), l;
|
|
3017
3017
|
})(h);
|
|
3018
3018
|
}
|
|
3019
|
-
const
|
|
3019
|
+
const Eu = ["left", "top", "width", "height", "visible"], Wh = ["rx", "ry"];
|
|
3020
3020
|
class _e extends Rt {
|
|
3021
3021
|
static getDefaults() {
|
|
3022
3022
|
return w(w({}, super.getDefaults()), _e.ownDefaults);
|
|
@@ -3042,7 +3042,7 @@ class _e extends Rt {
|
|
|
3042
3042
|
`)];
|
|
3043
3043
|
}
|
|
3044
3044
|
static async fromElement(t, e, s) {
|
|
3045
|
-
const i = Be(t, this.ATTRIBUTE_NAMES, s), { left: n = 0, top: r = 0, width: o = 0, height: h = 0, visible: l = !0 } = i, c = ht(i,
|
|
3045
|
+
const i = Be(t, this.ATTRIBUTE_NAMES, s), { left: n = 0, top: r = 0, width: o = 0, height: h = 0, visible: l = !0 } = i, c = ht(i, Eu);
|
|
3046
3046
|
return new this(w(w(w({}, e), c), {}, { left: n, top: r, width: o, height: h, visible: !!(l && o && h) }));
|
|
3047
3047
|
}
|
|
3048
3048
|
}
|
|
@@ -3085,7 +3085,7 @@ class Er extends In {
|
|
|
3085
3085
|
}
|
|
3086
3086
|
}
|
|
3087
3087
|
x(Er, "type", "fit-content"), L.setClass(Er);
|
|
3088
|
-
const
|
|
3088
|
+
const ku = ["strategy"], Mu = ["target", "strategy", "bubbles", "prevStrategy"], Uh = "layoutManager";
|
|
3089
3089
|
class fi {
|
|
3090
3090
|
constructor() {
|
|
3091
3091
|
let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : new Er();
|
|
@@ -3101,7 +3101,7 @@ class fi {
|
|
|
3101
3101
|
}
|
|
3102
3102
|
attachHandlers(t, e) {
|
|
3103
3103
|
const { target: s } = e;
|
|
3104
|
-
return [hn, th, ci, eh, Tn, sh, an,
|
|
3104
|
+
return [hn, th, ci, eh, Tn, sh, an, fc, gc].map(((i) => t.on(i, ((n) => this.performLayout(i === hn ? { type: "object_modified", trigger: i, e: n, target: s } : { type: "object_modifying", trigger: i, e: n, target: s })))));
|
|
3105
3105
|
}
|
|
3106
3106
|
subscribe(t, e) {
|
|
3107
3107
|
this.unsubscribe(t, e);
|
|
@@ -3120,7 +3120,7 @@ class fi {
|
|
|
3120
3120
|
onBeforeLayout(t) {
|
|
3121
3121
|
const { target: e, type: s } = t, { canvas: i } = e;
|
|
3122
3122
|
if (s === Re || s === vn ? this.subscribeTargets(t) : s === lo && this.unsubscribeTargets(t), e.fire("layout:before", { context: t }), i && i.fire("object:layout:before", { target: e, context: t }), s === yn && t.deep) {
|
|
3123
|
-
const n = ht(t,
|
|
3123
|
+
const n = ht(t, ku);
|
|
3124
3124
|
e.forEachObject(((r) => r.layoutManager && r.layoutManager.performLayout(w(w({}, n), {}, { bubbles: !1, target: r }))));
|
|
3125
3125
|
}
|
|
3126
3126
|
}
|
|
@@ -3146,7 +3146,7 @@ class fi {
|
|
|
3146
3146
|
s.set({ left: s.left + i.x, top: s.top + i.y });
|
|
3147
3147
|
}
|
|
3148
3148
|
onAfterLayout(t, e) {
|
|
3149
|
-
const { target: s, strategy: i, bubbles: n, prevStrategy: r } = t, o = ht(t,
|
|
3149
|
+
const { target: s, strategy: i, bubbles: n, prevStrategy: r } = t, o = ht(t, Mu), { canvas: h } = s;
|
|
3150
3150
|
s.fire("layout:after", { context: t, result: e }), h && h.fire("object:layout:after", { context: t, result: e, target: s });
|
|
3151
3151
|
const l = s.parent;
|
|
3152
3152
|
n && l != null && l.layoutManager && ((o.path || (o.path = [])).push(s), l.layoutManager.performLayout(w(w({}, o), {}, { target: l }))), s.set("dirty", !0);
|
|
@@ -3163,8 +3163,8 @@ class fi {
|
|
|
3163
3163
|
}
|
|
3164
3164
|
}
|
|
3165
3165
|
L.setClass(fi, Uh);
|
|
3166
|
-
const
|
|
3167
|
-
class
|
|
3166
|
+
const Pu = ["type", "objects", "layoutManager"];
|
|
3167
|
+
class Ou extends fi {
|
|
3168
3168
|
performLayout() {
|
|
3169
3169
|
}
|
|
3170
3170
|
}
|
|
@@ -3338,10 +3338,10 @@ class Qt extends ih(Rt) {
|
|
|
3338
3338
|
return this._createBaseClipPathSVGMarkup(e, { reviver: t });
|
|
3339
3339
|
}
|
|
3340
3340
|
static fromObject(t, e) {
|
|
3341
|
-
let { type: s, objects: i = [], layoutManager: n } = t, r = ht(t,
|
|
3341
|
+
let { type: s, objects: i = [], layoutManager: n } = t, r = ht(t, Pu);
|
|
3342
3342
|
return Promise.all([Ds(i, e), vi(r, e)]).then(((o) => {
|
|
3343
3343
|
let [h, l] = o;
|
|
3344
|
-
const c = new this(h, w(w(w({}, r), l), {}, { layoutManager: new
|
|
3344
|
+
const c = new this(h, w(w(w({}, r), l), {}, { layoutManager: new Ou() }));
|
|
3345
3345
|
if (n) {
|
|
3346
3346
|
const u = L.getClass(n.type), d = L.getClass(n.strategy);
|
|
3347
3347
|
c.layoutManager = new u(new d());
|
|
@@ -3351,7 +3351,7 @@ class Qt extends ih(Rt) {
|
|
|
3351
3351
|
}
|
|
3352
3352
|
}
|
|
3353
3353
|
x(Qt, "type", "Group"), x(Qt, "ownDefaults", { strokeWidth: 0, subTargetCheck: !1, interactive: !1 }), L.setClass(Qt);
|
|
3354
|
-
const Yh = (a, t) => Math.min(t.width / a.width, t.height / a.height), $h = (a, t) => Math.max(t.width / a.width, t.height / a.height), kr = "\\s*,?\\s*", Us = "".concat(kr, "(").concat(de, ")"),
|
|
3354
|
+
const Yh = (a, t) => Math.min(t.width / a.width, t.height / a.height), $h = (a, t) => Math.max(t.width / a.width, t.height / a.height), kr = "\\s*,?\\s*", Us = "".concat(kr, "(").concat(de, ")"), Du = "".concat(Us).concat(Us).concat(Us).concat(kr, "([01])").concat(kr, "([01])").concat(Us).concat(Us), Ru = { m: "l", M: "L" }, Lu = (a, t, e, s, i, n, r, o, h, l, c) => {
|
|
3355
3355
|
const u = ge(a), d = pe(a), f = ge(t), g = pe(t), p = e * i * f - s * n * g + r, b = s * i * f + e * n * g + o;
|
|
3356
3356
|
return ["C", l + h * (-e * i * d - s * n * u), c + h * (-s * i * d + e * n * u), p + h * (e * i * g + s * n * f), b + h * (s * i * g - e * n * f), p, b];
|
|
3357
3357
|
}, wa = (a, t, e, s) => {
|
|
@@ -3387,7 +3387,7 @@ function Mr(a, t, e, s, i, n, r, o) {
|
|
|
3387
3387
|
const y = [new C(Math.min(...d[0]), Math.min(...d[1])), new C(Math.max(...d[0]), Math.max(...d[1]))];
|
|
3388
3388
|
return tt.cachesBoundsOfCurve && (si.boundsOfCurveCache[h] = y), y;
|
|
3389
3389
|
}
|
|
3390
|
-
const
|
|
3390
|
+
const Fu = (a, t, e) => {
|
|
3391
3391
|
let [s, i, n, r, o, h, l, c] = e;
|
|
3392
3392
|
const u = ((d, f, g, p, b, m, v) => {
|
|
3393
3393
|
if (g === 0 || p === 0) return [];
|
|
@@ -3403,7 +3403,7 @@ const Lu = (a, t, e) => {
|
|
|
3403
3403
|
m === 0 && J > 0 ? J -= 2 * A : m === 1 && J < 0 && (J += 2 * A);
|
|
3404
3404
|
const At = Math.ceil(Math.abs(J / A * 2)), st = [], N = J / At, at = 8 / 3 * Math.sin(N / 4) * Math.sin(N / 4) / Math.sin(N / 2);
|
|
3405
3405
|
let Tt = V + N;
|
|
3406
|
-
for (let Wt = 0; Wt < At; Wt++) st[Wt] =
|
|
3406
|
+
for (let Wt = 0; Wt < At; Wt++) st[Wt] = Lu(V, Tt, P, k, R, W, E, H, at, y, _), y = st[Wt][5], _ = st[Wt][6], V = Tt, Tt += N;
|
|
3407
3407
|
return st;
|
|
3408
3408
|
})(l - a, c - t, i, n, o, h, r);
|
|
3409
3409
|
for (let d = 0, f = u.length; d < f; d++) u[d][1] += a, u[d][2] += t, u[d][3] += a, u[d][4] += t, u[d][5] += a, u[d][6] += t;
|
|
@@ -3459,7 +3459,7 @@ const Lu = (a, t, e) => {
|
|
|
3459
3459
|
case "a":
|
|
3460
3460
|
c[6] += t, c[7] += e;
|
|
3461
3461
|
case "A":
|
|
3462
|
-
|
|
3462
|
+
Fu(t, e, c).forEach(((d) => n.push(d))), t = c[6], e = c[7];
|
|
3463
3463
|
break;
|
|
3464
3464
|
case "z":
|
|
3465
3465
|
case "Z":
|
|
@@ -3471,13 +3471,13 @@ const Lu = (a, t, e) => {
|
|
|
3471
3471
|
}, _n = (a, t, e, s) => Math.sqrt((e - a) ** 2 + (s - t) ** 2), Kh = (a, t, e, s, i, n, r, o) => (h) => {
|
|
3472
3472
|
const l = h ** 3, c = ((f) => 3 * f ** 2 * (1 - f))(h), u = ((f) => 3 * f * (1 - f) ** 2)(h), d = ((f) => (1 - f) ** 3)(h);
|
|
3473
3473
|
return new C(r * l + i * c + e * u + a * d, o * l + n * c + s * u + t * d);
|
|
3474
|
-
}, Jh = (a) => a ** 2, Zh = (a) => 2 * a * (1 - a), Qh = (a) => (1 - a) ** 2,
|
|
3474
|
+
}, Jh = (a) => a ** 2, Zh = (a) => 2 * a * (1 - a), Qh = (a) => (1 - a) ** 2, Iu = (a, t, e, s, i, n, r, o) => (h) => {
|
|
3475
3475
|
const l = Jh(h), c = Zh(h), u = Qh(h), d = 3 * (u * (e - a) + c * (i - e) + l * (r - i)), f = 3 * (u * (s - t) + c * (n - s) + l * (o - n));
|
|
3476
3476
|
return Math.atan2(f, d);
|
|
3477
|
-
},
|
|
3477
|
+
}, Nu = (a, t, e, s, i, n) => (r) => {
|
|
3478
3478
|
const o = Jh(r), h = Zh(r), l = Qh(r);
|
|
3479
3479
|
return new C(i * o + e * h + a * l, n * o + s * h + t * l);
|
|
3480
|
-
},
|
|
3480
|
+
}, ju = (a, t, e, s, i, n) => (r) => {
|
|
3481
3481
|
const o = 1 - r, h = 2 * (o * (e - a) + r * (i - e)), l = 2 * (o * (s - t) + r * (n - s));
|
|
3482
3482
|
return Math.atan2(l, h);
|
|
3483
3483
|
}, xa = (a, t, e) => {
|
|
@@ -3487,7 +3487,7 @@ const Lu = (a, t, e) => {
|
|
|
3487
3487
|
i += _n(s.x, s.y, r.x, r.y), s = r;
|
|
3488
3488
|
}
|
|
3489
3489
|
return i;
|
|
3490
|
-
},
|
|
3490
|
+
}, Bu = (a, t) => {
|
|
3491
3491
|
let e, s = 0, i = 0, n = { x: a.x, y: a.y }, r = w({}, n), o = 0.01, h = 0;
|
|
3492
3492
|
const l = a.iterator, c = a.angleFinder;
|
|
3493
3493
|
for (; i < t && o > 1e-4; ) r = l(s), h = s, e = _n(n.x, n.y, r.x, r.y), e + i > t ? (s -= o, o /= 2) : (n = r, s += o, i += e);
|
|
@@ -3505,10 +3505,10 @@ const Lu = (a, t, e) => {
|
|
|
3505
3505
|
e = c, e.length = _n(i, n, l[1], l[2]), i = l[1], n = l[2];
|
|
3506
3506
|
break;
|
|
3507
3507
|
case "C":
|
|
3508
|
-
t = Kh(i, n, l[1], l[2], l[3], l[4], l[5], l[6]), e = c, e.iterator = t, e.angleFinder =
|
|
3508
|
+
t = Kh(i, n, l[1], l[2], l[3], l[4], l[5], l[6]), e = c, e.iterator = t, e.angleFinder = Iu(i, n, l[1], l[2], l[3], l[4], l[5], l[6]), e.length = xa(t, i, n), i = l[5], n = l[6];
|
|
3509
3509
|
break;
|
|
3510
3510
|
case "Q":
|
|
3511
|
-
t =
|
|
3511
|
+
t = Nu(i, n, l[1], l[2], l[3], l[4]), e = c, e.iterator = t, e.angleFinder = ju(i, n, l[1], l[2], l[3], l[4]), e.length = xa(t, i, n), i = l[3], n = l[4];
|
|
3512
3512
|
break;
|
|
3513
3513
|
case "Z":
|
|
3514
3514
|
e = c, e.destX = r, e.destY = o, e.length = _n(i, n, r, o), i = r, n = o;
|
|
@@ -3529,32 +3529,32 @@ const Lu = (a, t, e) => {
|
|
|
3529
3529
|
return w(w({}, new C(i.x, i.y).lerp(new C(r[1], r[2]), n)), {}, { angle: Math.atan2(r[2] - i.y, r[1] - i.x) });
|
|
3530
3530
|
case "C":
|
|
3531
3531
|
case "Q":
|
|
3532
|
-
return
|
|
3532
|
+
return Bu(i, t);
|
|
3533
3533
|
}
|
|
3534
|
-
},
|
|
3534
|
+
}, Hu = new RegExp("[mzlhvcsqta][^mzlhvcsqta]*", "gi"), Sa = new RegExp(Du, "g"), zu = new RegExp(de, "gi"), Gu = { m: 2, l: 2, h: 1, v: 1, c: 6, s: 4, q: 4, t: 2, a: 7 }, el = (a) => {
|
|
3535
3535
|
var t;
|
|
3536
|
-
const e = [], s = (t = a.match(
|
|
3536
|
+
const e = [], s = (t = a.match(Hu)) !== null && t !== void 0 ? t : [];
|
|
3537
3537
|
for (const i of s) {
|
|
3538
3538
|
const n = i[0];
|
|
3539
3539
|
if (n === "z" || n === "Z") {
|
|
3540
3540
|
e.push([n]);
|
|
3541
3541
|
continue;
|
|
3542
3542
|
}
|
|
3543
|
-
const r =
|
|
3543
|
+
const r = Gu[n.toLowerCase()];
|
|
3544
3544
|
let o = [];
|
|
3545
3545
|
if (n === "a" || n === "A") {
|
|
3546
3546
|
Sa.lastIndex = 0;
|
|
3547
3547
|
for (let h = null; h = Sa.exec(i); ) o.push(...h.slice(1));
|
|
3548
|
-
} else o = i.match(
|
|
3548
|
+
} else o = i.match(zu) || [];
|
|
3549
3549
|
for (let h = 0; h < o.length; h += r) {
|
|
3550
|
-
const l = new Array(r), c =
|
|
3550
|
+
const l = new Array(r), c = Ru[n];
|
|
3551
3551
|
l[0] = h > 0 && c ? c : n;
|
|
3552
3552
|
for (let u = 0; u < r; u++) l[u + 1] = parseFloat(o[h + u]);
|
|
3553
3553
|
e.push(l);
|
|
3554
3554
|
}
|
|
3555
3555
|
}
|
|
3556
3556
|
return e;
|
|
3557
|
-
},
|
|
3557
|
+
}, Vu = function(a) {
|
|
3558
3558
|
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, e = new C(a[0]), s = new C(a[1]), i = 1, n = 0;
|
|
3559
3559
|
const r = [], o = a.length, h = o > 2;
|
|
3560
3560
|
let l;
|
|
@@ -3574,7 +3574,7 @@ function wn(a, t) {
|
|
|
3574
3574
|
return e.setProperty(i, n);
|
|
3575
3575
|
})));
|
|
3576
3576
|
}
|
|
3577
|
-
const
|
|
3577
|
+
const Wu = (a, t) => Math.floor(Math.random() * (t - a + 1)) + a;
|
|
3578
3578
|
function il(a) {
|
|
3579
3579
|
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
3580
3580
|
const e = t.onComplete || os, s = new (mi()).XMLHttpRequest(), i = t.signal, n = function() {
|
|
@@ -3596,11 +3596,11 @@ const sn = (a, t) => {
|
|
|
3596
3596
|
}
|
|
3597
3597
|
})(a), e = e.transform(a.transformMatrix)), delete a.transformMatrix, t && (a.scaleX *= t.scaleX, a.scaleY *= t.scaleY, a.cropX = t.cropX, a.cropY = t.cropY, e.x += t.offsetLeft, e.y += t.offsetTop, a.width = t.width, a.height = t.height), a.setPositionByOrigin(e, $, $);
|
|
3598
3598
|
};
|
|
3599
|
-
var
|
|
3599
|
+
var Xu = Object.freeze({ __proto__: null, addTransformToObject: mh, animate: ro, animateColor: Dh, applyTransformToObject: Ls, calcAngleBetweenVectors: mn, calcDimensionsMatrix: bi, calcPlaneChangeMatrix: _i, calcVectorRotation: Mh, cancelAnimFrame: rh, capValue: cs, composeMatrix: ch, copyCanvasElement: (a) => {
|
|
3600
3600
|
var t;
|
|
3601
3601
|
const e = ee(a);
|
|
3602
3602
|
return (t = e.getContext("2d")) === null || t === void 0 || t.drawImage(a, 0, 0), e;
|
|
3603
|
-
}, cos: ge, createCanvasElement: Ae, createImage: oh, createRotateMatrix: fs, createScaleMatrix: Mn, createSkewXMatrix: Kr, createSkewYMatrix: Jr, createTranslateMatrix: Bs, createVector: gn, crossProduct: Ts, degreesToRadians: ft, dotProduct: Ph, ease:
|
|
3603
|
+
}, cos: ge, createCanvasElement: Ae, createImage: oh, createRotateMatrix: fs, createScaleMatrix: Mn, createSkewXMatrix: Kr, createSkewYMatrix: Jr, createTranslateMatrix: Bs, createVector: gn, crossProduct: Ts, degreesToRadians: ft, dotProduct: Ph, ease: Dc, enlivenObjectEnlivables: vi, enlivenObjects: Ds, findScaleToCover: $h, findScaleToFit: Yh, getBoundsOfCurve: Mr, getOrthonormalVector: io, getPathSegmentsInfo: co, getPointOnPath: tl, getPointer: ph, getRandomInt: Wu, getRegularPolygonPath: (a, t) => {
|
|
3604
3604
|
const e = 2 * Math.PI / a;
|
|
3605
3605
|
let s = -We;
|
|
3606
3606
|
a % 2 == 0 && (s += e / 2);
|
|
@@ -3610,7 +3610,7 @@ var Wu = Object.freeze({ __proto__: null, addTransformToObject: mh, animate: ro,
|
|
|
3610
3610
|
i[n] = [n === 0 ? "M" : "L", o, h];
|
|
3611
3611
|
}
|
|
3612
3612
|
return i[a] = ["Z"], i;
|
|
3613
|
-
}, getSmoothPathFromPoints:
|
|
3613
|
+
}, getSmoothPathFromPoints: Vu, getSvgAttributes: (a) => {
|
|
3614
3614
|
const t = ["instantiated_by_use", "style", "id", "class"];
|
|
3615
3615
|
switch (a) {
|
|
3616
3616
|
case "linearGradient":
|
|
@@ -3630,7 +3630,7 @@ var Wu = Object.freeze({ __proto__: null, addTransformToObject: mh, animate: ro,
|
|
|
3630
3630
|
}, multiplyTransformMatrices: mt, multiplyTransformMatrixArray: kn, parsePath: el, parsePreserveAspectRatioAttribute: eo, parseUnit: It, pick: gs, projectStrokeOnPoints: Hh, qrDecompose: hs, radiansToDegrees: Te, removeFromArray: Ke, removeTransformFromObject: (a, t) => {
|
|
3631
3631
|
const e = $t(t), s = mt(e, a.calcOwnMatrix());
|
|
3632
3632
|
Ls(a, s);
|
|
3633
|
-
}, removeTransformMatrixForSvgParsing: sn, request: il, requestAnimFrame: ii, resetObjectTransform: bh, rotatePoint: (a, t, e) => a.rotate(e, t), rotateVector: so, saveObjectTransform: Qr, sendObjectToPlane: xr, sendPointToPlane: as, sendVectorToPlane: vh, setStyle: wn, sin: pe, sizeAfterTransform: Pn, string:
|
|
3633
|
+
}, removeTransformMatrixForSvgParsing: sn, request: il, requestAnimFrame: ii, resetObjectTransform: bh, rotatePoint: (a, t, e) => a.rotate(e, t), rotateVector: so, saveObjectTransform: Qr, sendObjectToPlane: xr, sendPointToPlane: as, sendVectorToPlane: vh, setStyle: wn, sin: pe, sizeAfterTransform: Pn, string: au, stylesFromArray: Vh, stylesToArray: Gh, toBlob: qr, toDataURL: $r, toFixed: nt, transformPath: (a, t, e) => (e && (t = mt(t, [1, 0, 0, 1, -e.x, -e.y])), a.map(((s) => {
|
|
3634
3634
|
const i = [...s];
|
|
3635
3635
|
for (let n = 1; n < s.length - 1; n += 2) {
|
|
3636
3636
|
const { x: r, y: o } = Mt({ x: s[n], y: s[n + 1] }, t);
|
|
@@ -3638,7 +3638,7 @@ var Wu = Object.freeze({ __proto__: null, addTransformToObject: mh, animate: ro,
|
|
|
3638
3638
|
}
|
|
3639
3639
|
return i;
|
|
3640
3640
|
}))), transformPoint: Mt });
|
|
3641
|
-
class
|
|
3641
|
+
class Uu extends gh {
|
|
3642
3642
|
constructor(t) {
|
|
3643
3643
|
let { allowTouchScrolling: e = !1, containerClass: s = "" } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
3644
3644
|
super(t), x(this, "upper", void 0), x(this, "container", void 0);
|
|
@@ -3694,7 +3694,7 @@ class Nn extends yi {
|
|
|
3694
3694
|
return this.elements.container;
|
|
3695
3695
|
}
|
|
3696
3696
|
initElements(t) {
|
|
3697
|
-
this.elements = new
|
|
3697
|
+
this.elements = new Uu(t, { allowTouchScrolling: this.allowTouchScrolling, containerClass: this.containerClass }), this._createCacheCanvas();
|
|
3698
3698
|
}
|
|
3699
3699
|
_onObjectAdded(t) {
|
|
3700
3700
|
this._objectsToRender = void 0, super._onObjectAdded(t);
|
|
@@ -3751,7 +3751,7 @@ class Nn extends yi {
|
|
|
3751
3751
|
}
|
|
3752
3752
|
_setupCurrentTransform(t, e, s) {
|
|
3753
3753
|
var i;
|
|
3754
|
-
const n = e.group ? as(this.getScenePoint(t), void 0, e.group.calcTransformMatrix()) : this.getScenePoint(t), { key: r = "", control: o } = e.getActiveControl() || {}, h = s && o ? (i = o.getActionHandler(t, e, o)) === null || i === void 0 ? void 0 : i.bind(o) :
|
|
3754
|
+
const n = e.group ? as(this.getScenePoint(t), void 0, e.group.calcTransformMatrix()) : this.getScenePoint(t), { key: r = "", control: o } = e.getActiveControl() || {}, h = s && o ? (i = o.getActionHandler(t, e, o)) === null || i === void 0 ? void 0 : i.bind(o) : xc, l = ((f, g, p, b) => {
|
|
3755
3755
|
if (!g || !f) return "drag";
|
|
3756
3756
|
const m = b.controls[g];
|
|
3757
3757
|
return m.getActionName(p, m, b);
|
|
@@ -3927,7 +3927,7 @@ class Nn extends yi {
|
|
|
3927
3927
|
}
|
|
3928
3928
|
}
|
|
3929
3929
|
x(Nn, "ownDefaults", { uniformScaling: !0, uniScaleKey: "shiftKey", centeredScaling: !1, centeredRotation: !1, centeredKey: "altKey", altActionKey: "shiftKey", selection: !0, selectionKey: "shiftKey", selectionColor: "rgba(100, 100, 255, 0.3)", selectionDashArray: [], selectionBorderColor: "rgba(255, 255, 255, 0.3)", selectionLineWidth: 1, selectionFullyContained: !1, hoverCursor: "move", moveCursor: "move", defaultCursor: "default", freeDrawingCursor: "crosshair", notAllowedCursor: "not-allowed", perPixelTargetFind: !1, targetFindTolerance: 0, skipTargetFind: !1, stopContextMenu: !1, fireRightClick: !1, fireMiddleClick: !1, enablePointerEvents: !1, containerClass: "canvas-container", preserveObjectStacking: !1 });
|
|
3930
|
-
class
|
|
3930
|
+
class Yu {
|
|
3931
3931
|
constructor(t) {
|
|
3932
3932
|
x(this, "targets", []), x(this, "__disposer", void 0);
|
|
3933
3933
|
const e = () => {
|
|
@@ -3964,7 +3964,7 @@ class Uu {
|
|
|
3964
3964
|
this.clear(), this.__disposer(), delete this.__disposer;
|
|
3965
3965
|
}
|
|
3966
3966
|
}
|
|
3967
|
-
const
|
|
3967
|
+
const $u = ["target", "oldTarget", "fireCanvas", "e"], Kt = { passive: !1 }, ys = (a, t) => {
|
|
3968
3968
|
const e = a.getViewportPoint(t), s = a.getScenePoint(t);
|
|
3969
3969
|
return { viewportPoint: e, scenePoint: s, pointer: e, absolutePointer: s };
|
|
3970
3970
|
}, ze = function(a) {
|
|
@@ -3973,10 +3973,10 @@ const Yu = ["target", "oldTarget", "fireCanvas", "e"], Kt = { passive: !1 }, ys
|
|
|
3973
3973
|
}, se = function(a) {
|
|
3974
3974
|
for (var t = arguments.length, e = new Array(t > 1 ? t - 1 : 0), s = 1; s < t; s++) e[s - 1] = arguments[s];
|
|
3975
3975
|
return a.removeEventListener(...e);
|
|
3976
|
-
},
|
|
3976
|
+
}, qu = { mouse: { in: "over", out: "out", targetIn: "mouseover", targetOut: "mouseout", canvasIn: "mouse:over", canvasOut: "mouse:out" }, drag: { in: "enter", out: "leave", targetIn: "dragenter", targetOut: "dragleave", canvasIn: "drag:enter", canvasOut: "drag:leave" } };
|
|
3977
3977
|
class Pr extends Nn {
|
|
3978
3978
|
constructor(t) {
|
|
3979
|
-
super(t, arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}), x(this, "_isClick", void 0), x(this, "textEditingManager", new
|
|
3979
|
+
super(t, arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}), x(this, "_isClick", void 0), x(this, "textEditingManager", new Yu(this)), ["_onMouseDown", "_onTouchStart", "_onMouseMove", "_onMouseUp", "_onTouchEnd", "_onResize", "_onMouseWheel", "_onMouseOut", "_onMouseEnter", "_onContextMenu", "_onClick", "_onDragStart", "_onDragEnd", "_onDragProgress", "_onDragOver", "_onDragEnter", "_onDragLeave", "_onDrop"].forEach(((e) => {
|
|
3980
3980
|
this[e] = this[e].bind(this);
|
|
3981
3981
|
})), this.addOrRemove(ze, "add");
|
|
3982
3982
|
}
|
|
@@ -4220,8 +4220,8 @@ class Pr extends Nn {
|
|
|
4220
4220
|
this._draggedoverTarget = t;
|
|
4221
4221
|
}
|
|
4222
4222
|
fireSyntheticInOutEvents(t, e) {
|
|
4223
|
-
let { target: s, oldTarget: i, fireCanvas: n, e: r } = e, o = ht(e,
|
|
4224
|
-
const { targetIn: h, targetOut: l, canvasIn: c, canvasOut: u } =
|
|
4223
|
+
let { target: s, oldTarget: i, fireCanvas: n, e: r } = e, o = ht(e, $u);
|
|
4224
|
+
const { targetIn: h, targetOut: l, canvasIn: c, canvasOut: u } = qu[t], d = i !== s;
|
|
4225
4225
|
if (i && d) {
|
|
4226
4226
|
const f = w(w({}, o), {}, { e: r, target: i, nextTarget: s }, ys(this, r));
|
|
4227
4227
|
n && this.fire(u, f), i.fire(l, f);
|
|
@@ -4289,7 +4289,7 @@ class Pr extends Nn {
|
|
|
4289
4289
|
this.removeListeners(), this.textEditingManager.dispose(), super.destroy();
|
|
4290
4290
|
}
|
|
4291
4291
|
}
|
|
4292
|
-
const nl = { x1: 0, y1: 0, x2: 0, y2: 0 },
|
|
4292
|
+
const nl = { x1: 0, y1: 0, x2: 0, y2: 0 }, Ku = w(w({}, nl), {}, { r1: 0, r2: 0 }), Ss = (a, t) => isNaN(a) && typeof t == "number" ? t : a;
|
|
4293
4293
|
function rl(a) {
|
|
4294
4294
|
return a && /%$/.test(a) && Number.isFinite(parseFloat(a));
|
|
4295
4295
|
}
|
|
@@ -4297,24 +4297,24 @@ function ol(a, t) {
|
|
|
4297
4297
|
const e = typeof a == "number" ? a : typeof a == "string" ? parseFloat(a) / (rl(a) ? 100 : 1) : NaN;
|
|
4298
4298
|
return cs(0, Ss(e, t), 1);
|
|
4299
4299
|
}
|
|
4300
|
-
const
|
|
4301
|
-
function
|
|
4300
|
+
const Ju = /\s*;\s*/, Zu = /\s*:\s*/;
|
|
4301
|
+
function Qu(a, t) {
|
|
4302
4302
|
let e, s;
|
|
4303
4303
|
const i = a.getAttribute("style");
|
|
4304
4304
|
if (i) {
|
|
4305
|
-
const r = i.split(
|
|
4305
|
+
const r = i.split(Ju);
|
|
4306
4306
|
r[r.length - 1] === "" && r.pop();
|
|
4307
4307
|
for (let o = r.length; o--; ) {
|
|
4308
|
-
const [h, l] = r[o].split(
|
|
4308
|
+
const [h, l] = r[o].split(Zu).map(((c) => c.trim()));
|
|
4309
4309
|
h === "stop-color" ? e = l : h === "stop-opacity" && (s = l);
|
|
4310
4310
|
}
|
|
4311
4311
|
}
|
|
4312
4312
|
const n = new it(e || a.getAttribute("stop-color") || "rgb(0,0,0)");
|
|
4313
4313
|
return { offset: ol(a.getAttribute("offset"), 0), color: n.toRgb(), opacity: Ss(parseFloat(s || a.getAttribute("stop-opacity") || ""), 1) * n.getAlpha() * t };
|
|
4314
4314
|
}
|
|
4315
|
-
function
|
|
4315
|
+
function td(a, t) {
|
|
4316
4316
|
const e = [], s = a.getElementsByTagName("stop"), i = ol(t, 1);
|
|
4317
|
-
for (let n = s.length; n--; ) e.push(
|
|
4317
|
+
for (let n = s.length; n--; ) e.push(Qu(s[n], i));
|
|
4318
4318
|
return e;
|
|
4319
4319
|
}
|
|
4320
4320
|
function al(a) {
|
|
@@ -4326,7 +4326,7 @@ function hl(a) {
|
|
|
4326
4326
|
function ae(a, t) {
|
|
4327
4327
|
return a.getAttribute(t);
|
|
4328
4328
|
}
|
|
4329
|
-
function
|
|
4329
|
+
function ed(a, t) {
|
|
4330
4330
|
return (function(e, s) {
|
|
4331
4331
|
let i, { width: n, height: r, gradientUnits: o } = s;
|
|
4332
4332
|
return Object.entries(e).reduce(((h, l) => {
|
|
@@ -4348,7 +4348,7 @@ function td(a, t) {
|
|
|
4348
4348
|
class Qs {
|
|
4349
4349
|
constructor(t) {
|
|
4350
4350
|
const { type: e = "linear", gradientUnits: s = "pixels", coords: i = {}, colorStops: n = [], offsetX: r = 0, offsetY: o = 0, gradientTransform: h, id: l } = t || {};
|
|
4351
|
-
Object.assign(this, { type: e, gradientUnits: s, coords: w(w({}, e === "radial" ?
|
|
4351
|
+
Object.assign(this, { type: e, gradientUnits: s, coords: w(w({}, e === "radial" ? Ku : nl), i), colorStops: n, offsetX: r, offsetY: o, gradientTransform: h, id: l ? "".concat(l, "_").concat(Xe()) : Xe() });
|
|
4352
4352
|
}
|
|
4353
4353
|
addColorStop(t) {
|
|
4354
4354
|
for (const e in t) {
|
|
@@ -4405,11 +4405,11 @@ class Qs {
|
|
|
4405
4405
|
}
|
|
4406
4406
|
static fromElement(t, e, s) {
|
|
4407
4407
|
const i = hl(t), n = e._findCenterFromElement();
|
|
4408
|
-
return new this(w({ id: t.getAttribute("id") || void 0, type: al(t), coords:
|
|
4408
|
+
return new this(w({ id: t.getAttribute("id") || void 0, type: al(t), coords: ed(t, { width: s.viewBoxWidth || s.width, height: s.viewBoxHeight || s.height }), colorStops: td(t, s.opacity), gradientUnits: i, gradientTransform: bn(t.getAttribute("gradientTransform") || "") }, i === "pixels" ? { offsetX: e.width / 2 - n.x, offsetY: e.height / 2 - n.y } : { offsetX: 0, offsetY: 0 }));
|
|
4409
4409
|
}
|
|
4410
4410
|
}
|
|
4411
4411
|
x(Qs, "type", "Gradient"), L.setClass(Qs, "gradient"), L.setClass(Qs, "linear"), L.setClass(Qs, "radial");
|
|
4412
|
-
const
|
|
4412
|
+
const sd = ["type", "source", "patternTransform"];
|
|
4413
4413
|
class nr {
|
|
4414
4414
|
get type() {
|
|
4415
4415
|
return "pattern";
|
|
@@ -4444,16 +4444,16 @@ class nr {
|
|
|
4444
4444
|
`);
|
|
4445
4445
|
}
|
|
4446
4446
|
static async fromObject(t, e) {
|
|
4447
|
-
let { type: s, source: i, patternTransform: n } = t, r = ht(t,
|
|
4447
|
+
let { type: s, source: i, patternTransform: n } = t, r = ht(t, sd);
|
|
4448
4448
|
const o = await ni(i, w(w({}, e), {}, { crossOrigin: r.crossOrigin }));
|
|
4449
4449
|
return new this(w(w({}, r), {}, { patternTransform: n && n.slice(0), source: o }));
|
|
4450
4450
|
}
|
|
4451
4451
|
}
|
|
4452
4452
|
x(nr, "type", "Pattern"), L.setClass(nr), L.setClass(nr, "pattern");
|
|
4453
|
-
const
|
|
4453
|
+
const id = ["path", "left", "top"], nd = ["d"];
|
|
4454
4454
|
class Ze extends Rt {
|
|
4455
4455
|
constructor(t) {
|
|
4456
|
-
let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, { path: s, left: i, top: n } = e, r = ht(e,
|
|
4456
|
+
let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, { path: s, left: i, top: n } = e, r = ht(e, id);
|
|
4457
4457
|
super(), Object.assign(this, Ze.ownDefaults), this.setOptions(r), this._setPath(t || [], !0), typeof i == "number" && this.set(et, i), typeof n == "number" && this.set(qt, n);
|
|
4458
4458
|
}
|
|
4459
4459
|
_setPath(t, e) {
|
|
@@ -4555,11 +4555,11 @@ class Ze extends Rt {
|
|
|
4555
4555
|
}
|
|
4556
4556
|
static async fromElement(t, e, s) {
|
|
4557
4557
|
const i = Be(t, this.ATTRIBUTE_NAMES, s), { d: n } = i;
|
|
4558
|
-
return new this(n, w(w(w({}, ht(i,
|
|
4558
|
+
return new this(n, w(w(w({}, ht(i, nd)), e), {}, { left: void 0, top: void 0 }));
|
|
4559
4559
|
}
|
|
4560
4560
|
}
|
|
4561
4561
|
x(Ze, "type", "Path"), x(Ze, "cacheProperties", [...je, "path", "fillRule"]), x(Ze, "ATTRIBUTE_NAMES", [...$e, "d"]), L.setClass(Ze), L.setSVGClass(Ze);
|
|
4562
|
-
const
|
|
4562
|
+
const rd = ["left", "top", "radius"], ll = ["radius", "startAngle", "endAngle", "counterClockwise"];
|
|
4563
4563
|
class Oe extends Rt {
|
|
4564
4564
|
static getDefaults() {
|
|
4565
4565
|
return w(w({}, super.getDefaults()), Oe.ownDefaults);
|
|
@@ -4598,14 +4598,14 @@ class Oe extends Rt {
|
|
|
4598
4598
|
}
|
|
4599
4599
|
static async fromElement(t, e, s) {
|
|
4600
4600
|
const i = Be(t, this.ATTRIBUTE_NAMES, s), { left: n = 0, top: r = 0, radius: o = 0 } = i;
|
|
4601
|
-
return new this(w(w({}, ht(i,
|
|
4601
|
+
return new this(w(w({}, ht(i, rd)), {}, { radius: o, left: n - o, top: r - o }));
|
|
4602
4602
|
}
|
|
4603
4603
|
static fromObject(t) {
|
|
4604
4604
|
return super._fromObject(t);
|
|
4605
4605
|
}
|
|
4606
4606
|
}
|
|
4607
4607
|
x(Oe, "type", "Circle"), x(Oe, "cacheProperties", [...je, ...ll]), x(Oe, "ownDefaults", { radius: 0, startAngle: 0, endAngle: 360, counterClockwise: !1 }), x(Oe, "ATTRIBUTE_NAMES", ["cx", "cy", "r", ...$e]), L.setClass(Oe), L.setSVGClass(Oe);
|
|
4608
|
-
const
|
|
4608
|
+
const od = ["x1", "y1", "x2", "y2"], ad = ["x1", "y1", "x2", "y2"], Or = ["x1", "x2", "y1", "y2"];
|
|
4609
4609
|
class Qe extends Rt {
|
|
4610
4610
|
constructor() {
|
|
4611
4611
|
let [t, e, s, i] = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [0, 0, 0, 0], n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
@@ -4652,10 +4652,10 @@ class Qe extends Rt {
|
|
|
4652
4652
|
}
|
|
4653
4653
|
static async fromElement(t, e, s) {
|
|
4654
4654
|
const i = Be(t, this.ATTRIBUTE_NAMES, s), { x1: n = 0, y1: r = 0, x2: o = 0, y2: h = 0 } = i;
|
|
4655
|
-
return new this([n, r, o, h], ht(i,
|
|
4655
|
+
return new this([n, r, o, h], ht(i, od));
|
|
4656
4656
|
}
|
|
4657
4657
|
static fromObject(t) {
|
|
4658
|
-
let { x1: e, y1: s, x2: i, y2: n } = t, r = ht(t,
|
|
4658
|
+
let { x1: e, y1: s, x2: i, y2: n } = t, r = ht(t, ad);
|
|
4659
4659
|
return this._fromObject(w(w({}, r), {}, { points: [e, s, i, n] }), { extraParam: "points" });
|
|
4660
4660
|
}
|
|
4661
4661
|
}
|
|
@@ -4717,14 +4717,14 @@ class De extends Rt {
|
|
|
4717
4717
|
return i.left = (i.left || 0) - i.rx, i.top = (i.top || 0) - i.ry, new this(i);
|
|
4718
4718
|
}
|
|
4719
4719
|
}
|
|
4720
|
-
function
|
|
4720
|
+
function hd(a) {
|
|
4721
4721
|
if (!a) return [];
|
|
4722
4722
|
const t = a.replace(/,/g, " ").trim().split(/\s+/), e = [];
|
|
4723
4723
|
for (let s = 0; s < t.length; s += 2) e.push({ x: parseFloat(t[s]), y: parseFloat(t[s + 1]) });
|
|
4724
4724
|
return e;
|
|
4725
4725
|
}
|
|
4726
4726
|
x(De, "type", "Ellipse"), x(De, "cacheProperties", [...je, ...cl]), x(De, "ownDefaults", { rx: 0, ry: 0 }), x(De, "ATTRIBUTE_NAMES", [...$e, "cx", "cy", "rx", "ry"]), L.setClass(De), L.setSVGClass(De);
|
|
4727
|
-
const
|
|
4727
|
+
const ld = ["left", "top"], ul = { exactBoundingBox: !1 };
|
|
4728
4728
|
class ce extends Rt {
|
|
4729
4729
|
static getDefaults() {
|
|
4730
4730
|
return w(w({}, super.getDefaults()), ce.ownDefaults);
|
|
@@ -4814,7 +4814,7 @@ class ce extends Rt {
|
|
|
4814
4814
|
return this.points.length;
|
|
4815
4815
|
}
|
|
4816
4816
|
static async fromElement(t, e, s) {
|
|
4817
|
-
return new this(
|
|
4817
|
+
return new this(hd(t.getAttribute("points")), w(w({}, ht(Be(t, this.ATTRIBUTE_NAMES, s), ld)), e));
|
|
4818
4818
|
}
|
|
4819
4819
|
static fromObject(t) {
|
|
4820
4820
|
return this._fromObject(t, { extraParam: "points" });
|
|
@@ -4907,8 +4907,8 @@ class dl extends Rt {
|
|
|
4907
4907
|
delete this.styles[t];
|
|
4908
4908
|
}
|
|
4909
4909
|
}
|
|
4910
|
-
x(dl, "_styleProperties",
|
|
4911
|
-
const
|
|
4910
|
+
x(dl, "_styleProperties", Sc);
|
|
4911
|
+
const cd = / +/g, ud = /"/g;
|
|
4912
4912
|
function rr(a, t, e, s, i) {
|
|
4913
4913
|
return " ".concat((function(n, r) {
|
|
4914
4914
|
let { left: o, top: h, width: l, height: c } = r, u = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : tt.NUM_FRACTION_DIGITS;
|
|
@@ -4917,7 +4917,7 @@ function rr(a, t, e, s, i) {
|
|
|
4917
4917
|
})(a, { left: t, top: e, width: s, height: i }), `
|
|
4918
4918
|
`);
|
|
4919
4919
|
}
|
|
4920
|
-
const
|
|
4920
|
+
const dd = ["textAnchor", "textDecoration", "dx", "dy", "top", "left", "fontSize", "strokeWidth"];
|
|
4921
4921
|
let or;
|
|
4922
4922
|
class kt extends dl {
|
|
4923
4923
|
static getDefaults() {
|
|
@@ -5246,7 +5246,7 @@ class kt extends dl {
|
|
|
5246
5246
|
return 1;
|
|
5247
5247
|
}
|
|
5248
5248
|
static async fromElement(t, e, s) {
|
|
5249
|
-
const i = Be(t, kt.ATTRIBUTE_NAMES, s), n = w(w({}, e), i), { textAnchor: r = et, textDecoration: o = "", dx: h = 0, dy: l = 0, top: c = 0, left: u = 0, fontSize: d = Wr, strokeWidth: f = 1 } = n, g = ht(n,
|
|
5249
|
+
const i = Be(t, kt.ATTRIBUTE_NAMES, s), n = w(w({}, e), i), { textAnchor: r = et, textDecoration: o = "", dx: h = 0, dy: l = 0, top: c = 0, left: u = 0, fontSize: d = Wr, strokeWidth: f = 1 } = n, g = ht(n, dd), p = new this(dn(t.textContent || "").trim(), w({ left: u + h, top: c + l, underline: o.includes("underline"), overline: o.includes("overline"), linethrough: o.includes("line-through"), strokeWidth: 0, fontSize: d }, g)), b = p.getScaledHeight() / p.height, m = ((p.height + p.strokeWidth) * p.lineHeight - p.height) * b, v = p.getScaledHeight() + m;
|
|
5250
5250
|
let y = 0;
|
|
5251
5251
|
return r === $ && (y = p.getScaledWidth() / 2), r === pt && (y = p.getScaledWidth()), p.set({ left: p.left - y, top: p.top - (v - p.fontSize * (0.07 + p._fontSizeFraction)) / p.lineHeight, strokeWidth: f }), p;
|
|
5252
5252
|
}
|
|
@@ -5254,7 +5254,7 @@ class kt extends dl {
|
|
|
5254
5254
|
return this._fromObject(w(w({}, t), {}, { styles: Vh(t.styles || {}, t.text) }), { extraParam: "text" });
|
|
5255
5255
|
}
|
|
5256
5256
|
}
|
|
5257
|
-
x(kt, "textLayoutProperties", Th), x(kt, "cacheProperties", [...je, ...Eh]), x(kt, "ownDefaults",
|
|
5257
|
+
x(kt, "textLayoutProperties", Th), x(kt, "cacheProperties", [...je, ...Eh]), x(kt, "ownDefaults", Cc), x(kt, "type", "Text"), x(kt, "genericFonts", ["serif", "sans-serif", "monospace", "cursive", "fantasy", "system-ui", "ui-serif", "ui-sans-serif", "ui-monospace", "ui-rounded", "math", "emoji", "fangsong"]), x(kt, "ATTRIBUTE_NAMES", $e.concat("x", "y", "dx", "dy", "font-family", "font-style", "font-weight", "font-size", "letter-spacing", "text-decoration", "text-anchor")), Nh(kt, [class extends Sh {
|
|
5258
5258
|
_toSVG() {
|
|
5259
5259
|
const a = this._getSVGLeftTopOffsets(), t = this._getSVGTextAndBg(a.textTop, a.textLeft);
|
|
5260
5260
|
return this._wrapSVGTextAndBg(t);
|
|
@@ -5269,7 +5269,7 @@ x(kt, "textLayoutProperties", Th), x(kt, "cacheProperties", [...je, ...Eh]), x(k
|
|
|
5269
5269
|
_wrapSVGTextAndBg(a) {
|
|
5270
5270
|
let { textBgRects: t, textSpans: e } = a;
|
|
5271
5271
|
const s = this.getSvgTextDecoration(this);
|
|
5272
|
-
return [t.join(""), ' <text xml:space="preserve" ', 'font-family="'.concat(this.fontFamily.replace(
|
|
5272
|
+
return [t.join(""), ' <text xml:space="preserve" ', 'font-family="'.concat(this.fontFamily.replace(ud, "'"), '" '), 'font-size="'.concat(this.fontSize, '" '), this.fontStyle ? 'font-style="'.concat(this.fontStyle, '" ') : "", this.fontWeight ? 'font-weight="'.concat(this.fontWeight, '" ') : "", s ? 'text-decoration="'.concat(s, '" ') : "", this.direction === "rtl" ? 'direction="'.concat(this.direction, '" ') : "", 'style="', this.getSvgStyles(!0), '"', this.addPaintOrder(), " >", e.join(""), `</text>
|
|
5273
5273
|
`];
|
|
5274
5274
|
}
|
|
5275
5275
|
_getSVGTextAndBg(a, t) {
|
|
@@ -5280,7 +5280,7 @@ x(kt, "textLayoutProperties", Th), x(kt, "cacheProperties", [...je, ...Eh]), x(k
|
|
|
5280
5280
|
return { textSpans: e, textBgRects: s };
|
|
5281
5281
|
}
|
|
5282
5282
|
_createTextCharSpan(a, t, e, s, i) {
|
|
5283
|
-
const n = tt.NUM_FRACTION_DIGITS, r = this.getSvgSpanStyles(t, a !== a.trim() || !!a.match(
|
|
5283
|
+
const n = tt.NUM_FRACTION_DIGITS, r = this.getSvgSpanStyles(t, a !== a.trim() || !!a.match(cd)), o = r ? 'style="'.concat(r, '"') : "", h = t.deltaY, l = h ? ' dy="'.concat(nt(h, n), '" ') : "", { angle: c, renderLeft: u, renderTop: d, width: f } = i;
|
|
5284
5284
|
let g = "";
|
|
5285
5285
|
if (u !== void 0) {
|
|
5286
5286
|
const p = f / 2;
|
|
@@ -5324,7 +5324,7 @@ x(kt, "textLayoutProperties", Th), x(kt, "cacheProperties", [...je, ...Eh]), x(k
|
|
|
5324
5324
|
return ["overline", "underline", "line-through"].filter(((t) => a[t.replace("-", "")])).join(" ");
|
|
5325
5325
|
}
|
|
5326
5326
|
}]), L.setClass(kt), L.setSVGClass(kt);
|
|
5327
|
-
class
|
|
5327
|
+
class fd {
|
|
5328
5328
|
constructor(t) {
|
|
5329
5329
|
x(this, "target", void 0), x(this, "__mouseDownInPlace", !1), x(this, "__dragStartFired", !1), x(this, "__isDraggingOver", !1), x(this, "__dragStartSelection", void 0), x(this, "__dragImageDisposer", void 0), x(this, "_dispose", void 0), this.target = t;
|
|
5330
5330
|
const e = [this.target.on("dragenter", this.dragEnterHandler.bind(this)), this.target.on("dragover", this.dragOverHandler.bind(this)), this.target.on("dragleave", this.dragLeaveHandler.bind(this)), this.target.on("dragend", this.dragEndHandler.bind(this)), this.target.on("drop", this.dropHandler.bind(this))];
|
|
@@ -5425,7 +5425,7 @@ class dd {
|
|
|
5425
5425
|
}
|
|
5426
5426
|
}
|
|
5427
5427
|
const Ca = /[ \n\.,;!\?\-]/;
|
|
5428
|
-
class
|
|
5428
|
+
class gd extends kt {
|
|
5429
5429
|
constructor() {
|
|
5430
5430
|
super(...arguments), x(this, "_currentCursorOpacity", 1);
|
|
5431
5431
|
}
|
|
@@ -5660,7 +5660,7 @@ class fd extends kt {
|
|
|
5660
5660
|
s <= t ? (e === t ? this._selectionDirection = et : this._selectionDirection === pt && (this._selectionDirection = et, this.selectionEnd = t), this.selectionStart = s) : s > t && s < e ? this._selectionDirection === pt ? this.selectionEnd = s : this.selectionStart = s : (e === t ? this._selectionDirection = pt : this._selectionDirection === et && (this._selectionDirection = pt, this.selectionStart = e), this.selectionEnd = s);
|
|
5661
5661
|
}
|
|
5662
5662
|
}
|
|
5663
|
-
class
|
|
5663
|
+
class pd extends gd {
|
|
5664
5664
|
initHiddenTextarea() {
|
|
5665
5665
|
const t = this.canvas && ue(this.canvas.getElement()) || Is(), e = t.createElement("textarea");
|
|
5666
5666
|
Object.entries({ autocapitalize: "off", autocorrect: "off", autocomplete: "off", spellcheck: "false", "data-fabric": "textarea", wrap: "off", name: "fabricTextarea" }).map(((r) => {
|
|
@@ -5817,12 +5817,12 @@ class gd extends fd {
|
|
|
5817
5817
|
}
|
|
5818
5818
|
}
|
|
5819
5819
|
const Aa = (a) => !!a.button;
|
|
5820
|
-
class
|
|
5820
|
+
class md extends pd {
|
|
5821
5821
|
constructor() {
|
|
5822
5822
|
super(...arguments), x(this, "draggableTextDelegate", void 0);
|
|
5823
5823
|
}
|
|
5824
5824
|
initBehavior() {
|
|
5825
|
-
this.on("mousedown", this._mouseDownHandler), this.on("mouseup", this.mouseUpHandler), this.on("mousedblclick", this.doubleClickHandler), this.on("mousetripleclick", this.tripleClickHandler), this.draggableTextDelegate = new
|
|
5825
|
+
this.on("mousedown", this._mouseDownHandler), this.on("mouseup", this.mouseUpHandler), this.on("mousedblclick", this.doubleClickHandler), this.on("mousetripleclick", this.tripleClickHandler), this.draggableTextDelegate = new fd(this), super.initBehavior();
|
|
5826
5826
|
}
|
|
5827
5827
|
shouldStartDragging() {
|
|
5828
5828
|
return this.draggableTextDelegate.isActive();
|
|
@@ -5879,8 +5879,8 @@ const Pi = "moveCursorUp", Oi = "moveCursorDown", Di = "moveCursorLeft", Ri = "m
|
|
|
5879
5879
|
a.setTransform(e, 0, 0, e, 0, 0);
|
|
5880
5880
|
const s = t.viewportTransform;
|
|
5881
5881
|
a.transform(s[0], s[1], s[2], s[3], s[4], s[5]);
|
|
5882
|
-
},
|
|
5883
|
-
class Le extends
|
|
5882
|
+
}, bd = w({ selectionStart: 0, selectionEnd: 0, selectionColor: "rgba(17,119,255,0.3)", isEditing: !1, editable: !0, editingBorderColor: "rgba(102,153,255,0.25)", cursorWidth: 2, cursorColor: "", cursorDelay: 1e3, cursorDuration: 600, caching: !0, hiddenTextareaContainer: null, keysMap: { 9: Li, 27: Li, 33: Pi, 34: Oi, 35: Ri, 36: Di, 37: Di, 38: Pi, 39: Ri, 40: Oi }, keysMapRtl: { 9: Li, 27: Li, 33: Pi, 34: Oi, 35: Di, 36: Ri, 37: Ri, 38: Pi, 39: Di, 40: Oi }, ctrlKeysMapDown: { 65: "cmdAll" }, ctrlKeysMapUp: { 67: "copy", 88: "cut" } }, { _selectionDirection: null, _reSpace: /\s|\r?\n/, inCompositionMode: !1 });
|
|
5883
|
+
class Le extends md {
|
|
5884
5884
|
static getDefaults() {
|
|
5885
5885
|
return w(w({}, super.getDefaults()), Le.ownDefaults);
|
|
5886
5886
|
}
|
|
@@ -6034,7 +6034,7 @@ class Le extends pd {
|
|
|
6034
6034
|
this.exitEditingImpl(), this.draggableTextDelegate.dispose(), super.dispose();
|
|
6035
6035
|
}
|
|
6036
6036
|
}
|
|
6037
|
-
x(Le, "ownDefaults",
|
|
6037
|
+
x(Le, "ownDefaults", bd), x(Le, "type", "IText"), L.setClass(Le), L.setClass(Le, "i-text");
|
|
6038
6038
|
class es extends Le {
|
|
6039
6039
|
static getDefaults() {
|
|
6040
6040
|
return w(w({}, super.getDefaults()), es.ownDefaults);
|
|
@@ -6043,7 +6043,7 @@ class es extends Le {
|
|
|
6043
6043
|
super(t, w(w({}, es.ownDefaults), e));
|
|
6044
6044
|
}
|
|
6045
6045
|
static createControls() {
|
|
6046
|
-
return { controls:
|
|
6046
|
+
return { controls: iu() };
|
|
6047
6047
|
}
|
|
6048
6048
|
initDimensions() {
|
|
6049
6049
|
this.initialized && (this.isEditing && this.initDelayedCursor(), this._clearCache(), this.dynamicMinWidth = 0, this._styleMap = this._generateStyleMap(this._splitText()), this.dynamicMinWidth > this.width && this._set("width", this.dynamicMinWidth), this.textAlign.includes(we) && this.enlargeSpaces(), this.height = this.calcTextHeight());
|
|
@@ -6200,7 +6200,7 @@ class ka extends In {
|
|
|
6200
6200
|
}
|
|
6201
6201
|
}
|
|
6202
6202
|
x(ka, "type", "fixed"), L.setClass(ka);
|
|
6203
|
-
class
|
|
6203
|
+
class vd extends fi {
|
|
6204
6204
|
subscribeTargets(t) {
|
|
6205
6205
|
const e = t.target;
|
|
6206
6206
|
t.targets.reduce(((s, i) => (i.parent && s.add(i.parent), s)), /* @__PURE__ */ new Set()).forEach(((s) => {
|
|
@@ -6222,7 +6222,7 @@ class ss extends Qt {
|
|
|
6222
6222
|
let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
6223
6223
|
super(), Object.assign(this, ss.ownDefaults), this.setOptions(e);
|
|
6224
6224
|
const { left: s, top: i, layoutManager: n } = e;
|
|
6225
|
-
this.groupInit(t, { left: s, top: i, layoutManager: n ?? new
|
|
6225
|
+
this.groupInit(t, { left: s, top: i, layoutManager: n ?? new vd() });
|
|
6226
6226
|
}
|
|
6227
6227
|
_shouldSetNestedCoords() {
|
|
6228
6228
|
return !0;
|
|
@@ -6277,7 +6277,7 @@ class ss extends Qt {
|
|
|
6277
6277
|
}
|
|
6278
6278
|
}
|
|
6279
6279
|
x(ss, "type", "ActiveSelection"), x(ss, "ownDefaults", { multiSelectionStacking: "canvas-stacking" }), L.setClass(ss), L.setClass(ss, "activeSelection");
|
|
6280
|
-
class
|
|
6280
|
+
class yd {
|
|
6281
6281
|
constructor() {
|
|
6282
6282
|
x(this, "resources", {});
|
|
6283
6283
|
}
|
|
@@ -6367,14 +6367,14 @@ class fl {
|
|
|
6367
6367
|
}
|
|
6368
6368
|
}
|
|
6369
6369
|
let ar;
|
|
6370
|
-
function
|
|
6370
|
+
function _d() {
|
|
6371
6371
|
const { WebGLProbe: a } = Ce();
|
|
6372
|
-
return a.queryWebGL(Ae()), tt.enableGLFiltering && a.isSupported(tt.textureSize) ? new fl({ tileSize: tt.textureSize }) : new
|
|
6372
|
+
return a.queryWebGL(Ae()), tt.enableGLFiltering && a.isSupported(tt.textureSize) ? new fl({ tileSize: tt.textureSize }) : new yd();
|
|
6373
6373
|
}
|
|
6374
6374
|
function hr() {
|
|
6375
|
-
return !ar && (!(arguments.length > 0 && arguments[0] !== void 0) || arguments[0]) && (ar =
|
|
6375
|
+
return !ar && (!(arguments.length > 0 && arguments[0] !== void 0) || arguments[0]) && (ar = _d()), ar;
|
|
6376
6376
|
}
|
|
6377
|
-
const
|
|
6377
|
+
const wd = ["filters", "resizeFilter", "src", "crossOrigin", "type"], gl = ["cropX", "cropY"];
|
|
6378
6378
|
class Pt extends Rt {
|
|
6379
6379
|
static getDefaults() {
|
|
6380
6380
|
return w(w({}, super.getDefaults()), Pt.ownDefaults);
|
|
@@ -6506,7 +6506,7 @@ class Pt extends Rt {
|
|
|
6506
6506
|
return !t || t.alignX === Bt && t.alignY === Bt ? (h = e / r, l = s / o) : (t.meetOrSlice === "meet" && (h = l = Yh(this._element, i), n = (e - r * h) / 2, t.alignX === "Min" && (c = -n), t.alignX === "Max" && (c = n), n = (s - o * l) / 2, t.alignY === "Min" && (u = -n), t.alignY === "Max" && (u = n)), t.meetOrSlice === "slice" && (h = l = $h(this._element, i), n = r - e / h, t.alignX === "Mid" && (d = n / 2), t.alignX === "Max" && (d = n), n = o - s / l, t.alignY === "Mid" && (f = n / 2), t.alignY === "Max" && (f = n), r = e / h, o = s / l)), { width: r, height: o, scaleX: h, scaleY: l, offsetLeft: c, offsetTop: u, cropX: d, cropY: f };
|
|
6507
6507
|
}
|
|
6508
6508
|
static fromObject(t, e) {
|
|
6509
|
-
let { filters: s, resizeFilter: i, src: n, crossOrigin: r, type: o } = t, h = ht(t,
|
|
6509
|
+
let { filters: s, resizeFilter: i, src: n, crossOrigin: r, type: o } = t, h = ht(t, wd);
|
|
6510
6510
|
return Promise.all([ni(n, w(w({}, e), {}, { crossOrigin: r })), s && Ds(s, e), i && Ds([i], e), vi(h, e)]).then(((l) => {
|
|
6511
6511
|
let [c, u = [], [d] = [], f = {}] = l;
|
|
6512
6512
|
return new this(c, w(w({}, h), {}, { src: n, filters: u, resizeFilter: d }, f));
|
|
@@ -6523,7 +6523,7 @@ class Pt extends Rt {
|
|
|
6523
6523
|
}
|
|
6524
6524
|
}
|
|
6525
6525
|
function lr(a) {
|
|
6526
|
-
if (!
|
|
6526
|
+
if (!kc.test(a.nodeName)) return {};
|
|
6527
6527
|
const t = a.getAttribute("viewBox");
|
|
6528
6528
|
let e, s, i = 1, n = 1, r = 0, o = 0;
|
|
6529
6529
|
const h = a.getAttribute("width"), l = a.getAttribute("height"), c = a.getAttribute("x") || 0, u = a.getAttribute("y") || 0, d = !(t && na.test(t)), f = !h || !l || h === "100%" || l === "100%";
|
|
@@ -6544,17 +6544,17 @@ function lr(a) {
|
|
|
6544
6544
|
return s.setAttribute("transform", e), m;
|
|
6545
6545
|
}
|
|
6546
6546
|
x(Pt, "type", "Image"), x(Pt, "cacheProperties", [...je, ...gl]), x(Pt, "ownDefaults", { strokeWidth: 0, srcFromAttribute: !1, minimumScaleTrigger: 0.5, cropX: 0, cropY: 0, imageSmoothing: !0 }), x(Pt, "CSS_CANVAS", "canvas-img"), x(Pt, "ATTRIBUTE_NAMES", [...$e, "x", "y", "width", "height", "preserveAspectRatio", "xlink:href", "href", "crossOrigin", "image-rendering"]), L.setClass(Pt), L.setSVGClass(Pt);
|
|
6547
|
-
const xn = (a) => a.tagName.replace("svg:", ""),
|
|
6547
|
+
const xn = (a) => a.tagName.replace("svg:", ""), xd = On(["pattern", "defs", "symbol", "metadata", "clipPath", "mask", "desc"]);
|
|
6548
6548
|
function pl(a, t) {
|
|
6549
6549
|
let e, s, i, n, r = [];
|
|
6550
6550
|
for (i = 0, n = t.length; i < n; i++) e = t[i], s = a.getElementsByTagNameNS("http://www.w3.org/2000/svg", e), r = r.concat(Array.from(s));
|
|
6551
6551
|
return r;
|
|
6552
6552
|
}
|
|
6553
|
-
const
|
|
6553
|
+
const Sd = ["gradientTransform", "x1", "x2", "y1", "y2", "gradientUnits", "cx", "cy", "r", "fx", "fy"], cr = "xlink:href";
|
|
6554
6554
|
function ml(a, t) {
|
|
6555
6555
|
var e;
|
|
6556
6556
|
const s = ((e = t.getAttribute(cr)) === null || e === void 0 ? void 0 : e.slice(1)) || "", i = a.getElementById(s);
|
|
6557
|
-
if (i && i.getAttribute(cr) && ml(a, i), i && (
|
|
6557
|
+
if (i && i.getAttribute(cr) && ml(a, i), i && (Sd.forEach(((n) => {
|
|
6558
6558
|
const r = i.getAttribute(n);
|
|
6559
6559
|
!t.hasAttribute(n) && r && t.setAttribute(n, r);
|
|
6560
6560
|
})), !t.children.length)) {
|
|
@@ -6563,8 +6563,8 @@ function ml(a, t) {
|
|
|
6563
6563
|
}
|
|
6564
6564
|
t.removeAttribute(cr);
|
|
6565
6565
|
}
|
|
6566
|
-
const
|
|
6567
|
-
function
|
|
6566
|
+
const Cd = ["linearGradient", "radialGradient", "svg:linearGradient", "svg:radialGradient"];
|
|
6567
|
+
function Ad(a) {
|
|
6568
6568
|
const t = a.getElementsByTagName("style"), e = {};
|
|
6569
6569
|
for (let s = 0; s < t.length; s++) {
|
|
6570
6570
|
const i = (t[s].textContent || "").replace(/\/\*[\s\S]*?\*\//g, "");
|
|
@@ -6585,10 +6585,10 @@ function Cd(a) {
|
|
|
6585
6585
|
return e;
|
|
6586
6586
|
}
|
|
6587
6587
|
const Ma = (a) => L.getSVGClass(xn(a).toLowerCase());
|
|
6588
|
-
class
|
|
6588
|
+
class Td {
|
|
6589
6589
|
constructor(t, e, s, i, n) {
|
|
6590
6590
|
this.elements = t, this.options = e, this.reviver = s, this.regexUrl = /^url\(['"]?#([^'"]+)['"]?\)/g, this.doc = i, this.clipPaths = n, this.gradientDefs = (function(r) {
|
|
6591
|
-
const o = pl(r,
|
|
6591
|
+
const o = pl(r, Cd), h = {};
|
|
6592
6592
|
let l = o.length;
|
|
6593
6593
|
for (; l--; ) {
|
|
6594
6594
|
const c = o[l];
|
|
@@ -6597,7 +6597,7 @@ class Ad {
|
|
|
6597
6597
|
u && (h[u] = c);
|
|
6598
6598
|
}
|
|
6599
6599
|
return h;
|
|
6600
|
-
})(i), this.cssRules =
|
|
6600
|
+
})(i), this.cssRules = Ad(i);
|
|
6601
6601
|
}
|
|
6602
6602
|
parse() {
|
|
6603
6603
|
return Promise.all(this.elements.map(((t) => this.createObject(t))));
|
|
@@ -6640,8 +6640,8 @@ class Ad {
|
|
|
6640
6640
|
} else delete t.clipPath;
|
|
6641
6641
|
}
|
|
6642
6642
|
}
|
|
6643
|
-
const Pa = (a) =>
|
|
6644
|
-
async function
|
|
6643
|
+
const Pa = (a) => Ec.test(xn(a)), Dr = () => ({ objects: [], elements: [], options: {}, allElements: [] });
|
|
6644
|
+
async function Ed(a, t) {
|
|
6645
6645
|
let { crossOrigin: e, signal: s } = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
6646
6646
|
if (s && s.aborted) return Ie("log", new Gr("parseSVGDocument")), Dr();
|
|
6647
6647
|
const i = a.documentElement;
|
|
@@ -6683,7 +6683,7 @@ async function Td(a, t) {
|
|
|
6683
6683
|
})(a);
|
|
6684
6684
|
const n = Array.from(i.getElementsByTagName("*")), r = w(w({}, lr(i)), {}, { crossOrigin: e, signal: s }), o = n.filter(((c) => (lr(c), Pa(c) && !(function(u) {
|
|
6685
6685
|
let d = u;
|
|
6686
|
-
for (; d && (d = d.parentElement); ) if (d && d.nodeName &&
|
|
6686
|
+
for (; d && (d = d.parentElement); ) if (d && d.nodeName && xd.test(xn(d)) && !d.getAttribute("instantiated_by_use")) return !0;
|
|
6687
6687
|
return !1;
|
|
6688
6688
|
})(c))));
|
|
6689
6689
|
if (!o || o && !o.length) return w(w({}, Dr()), {}, { options: r, allElements: n });
|
|
@@ -6692,34 +6692,34 @@ async function Td(a, t) {
|
|
|
6692
6692
|
c.setAttribute("originalTransform", c.getAttribute("transform") || "");
|
|
6693
6693
|
const u = c.getAttribute("id");
|
|
6694
6694
|
h[u] = Array.from(c.getElementsByTagName("*")).filter(((d) => Pa(d)));
|
|
6695
|
-
})), { objects: await new
|
|
6695
|
+
})), { objects: await new Td(o, r, t, a, h).parse(), elements: o, options: r, allElements: n };
|
|
6696
6696
|
}
|
|
6697
|
-
function
|
|
6697
|
+
function kd(a, t) {
|
|
6698
6698
|
let e = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
6699
6699
|
return new Promise(((s, i) => {
|
|
6700
6700
|
il(a.replace(/^\n\s*/, "").trim(), { onComplete: (n) => {
|
|
6701
6701
|
const r = n.responseXML;
|
|
6702
6702
|
r && s(r), i();
|
|
6703
6703
|
}, signal: e.signal });
|
|
6704
|
-
})).then(((s) =>
|
|
6704
|
+
})).then(((s) => Ed(s, t, e))).catch((() => Dr()));
|
|
6705
6705
|
}
|
|
6706
|
-
const jn = (a) => a.webgl !== void 0, uo = "precision highp float",
|
|
6706
|
+
const jn = (a) => a.webgl !== void 0, uo = "precision highp float", Md = `
|
|
6707
6707
|
`.concat(uo, `;
|
|
6708
6708
|
varying vec2 vTexCoord;
|
|
6709
6709
|
uniform sampler2D uTexture;
|
|
6710
6710
|
void main() {
|
|
6711
6711
|
gl_FragColor = texture2D(uTexture, vTexCoord);
|
|
6712
|
-
}`),
|
|
6712
|
+
}`), Pd = ["type"], Od = ["type"], Dd = new RegExp(uo, "g");
|
|
6713
6713
|
class Ct {
|
|
6714
6714
|
get type() {
|
|
6715
6715
|
return this.constructor.type;
|
|
6716
6716
|
}
|
|
6717
6717
|
constructor() {
|
|
6718
|
-
let t = ht(arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {},
|
|
6718
|
+
let t = ht(arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, Pd);
|
|
6719
6719
|
Object.assign(this, this.constructor.defaults, t);
|
|
6720
6720
|
}
|
|
6721
6721
|
getFragmentSource() {
|
|
6722
|
-
return
|
|
6722
|
+
return Md;
|
|
6723
6723
|
}
|
|
6724
6724
|
getVertexSource() {
|
|
6725
6725
|
return `
|
|
@@ -6733,7 +6733,7 @@ class Ct {
|
|
|
6733
6733
|
createProgram(t) {
|
|
6734
6734
|
let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this.getFragmentSource(), s = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : this.getVertexSource();
|
|
6735
6735
|
const { WebGLProbe: { GLPrecision: i = "highp" } } = Ce();
|
|
6736
|
-
i !== "highp" && (e = e.replace(
|
|
6736
|
+
i !== "highp" && (e = e.replace(Dd, uo.replace("highp", i)));
|
|
6737
6737
|
const n = t.createShader(t.VERTEX_SHADER), r = t.createShader(t.FRAGMENT_SHADER), o = t.createProgram();
|
|
6738
6738
|
if (!n || !r || !o) throw new xe("Vertex, fragment shader or program creation error");
|
|
6739
6739
|
if (t.shaderSource(n, s), t.compileShader(n), !t.getShaderParameter(n, t.COMPILE_STATUS)) throw new xe("Vertex shader compile error for ".concat(this.type, ": ").concat(t.getShaderInfoLog(n)));
|
|
@@ -6807,11 +6807,11 @@ class Ct {
|
|
|
6807
6807
|
return this.toObject();
|
|
6808
6808
|
}
|
|
6809
6809
|
static async fromObject(t, e) {
|
|
6810
|
-
return new this(ht(t,
|
|
6810
|
+
return new this(ht(t, Od));
|
|
6811
6811
|
}
|
|
6812
6812
|
}
|
|
6813
6813
|
x(Ct, "type", "BaseFilter"), x(Ct, "uniformLocations", []);
|
|
6814
|
-
const
|
|
6814
|
+
const Rd = { multiply: `gl_FragColor.rgb *= uColor.rgb;
|
|
6815
6815
|
`, screen: `gl_FragColor.rgb = 1.0 - (1.0 - gl_FragColor.rgb) * (1.0 - uColor.rgb);
|
|
6816
6816
|
`, add: `gl_FragColor.rgb += uColor.rgb;
|
|
6817
6817
|
`, difference: `gl_FragColor.rgb = abs(gl_FragColor.rgb - uColor.rgb);
|
|
@@ -6853,7 +6853,7 @@ class Fi extends Ct {
|
|
|
6853
6853
|
vec4 color = texture2D(uTexture, vTexCoord);
|
|
6854
6854
|
gl_FragColor = color;
|
|
6855
6855
|
if (color.a > 0.0) {
|
|
6856
|
-
`.concat(
|
|
6856
|
+
`.concat(Rd[this.mode], `
|
|
6857
6857
|
}
|
|
6858
6858
|
}
|
|
6859
6859
|
`);
|
|
@@ -6904,7 +6904,7 @@ class Fi extends Ct {
|
|
|
6904
6904
|
}
|
|
6905
6905
|
}
|
|
6906
6906
|
x(Fi, "defaults", { color: "#F95C63", mode: "multiply", alpha: 1 }), x(Fi, "type", "BlendColor"), x(Fi, "uniformLocations", ["uColor"]), L.setClass(Fi);
|
|
6907
|
-
const
|
|
6907
|
+
const Ld = { multiply: `
|
|
6908
6908
|
precision highp float;
|
|
6909
6909
|
uniform sampler2D uTexture;
|
|
6910
6910
|
uniform sampler2D uImage;
|
|
@@ -6930,13 +6930,13 @@ const Rd = { multiply: `
|
|
|
6930
6930
|
color.a = color2.a;
|
|
6931
6931
|
gl_FragColor = color;
|
|
6932
6932
|
}
|
|
6933
|
-
` },
|
|
6933
|
+
` }, Fd = ["type", "image"];
|
|
6934
6934
|
class Ii extends Ct {
|
|
6935
6935
|
getCacheKey() {
|
|
6936
6936
|
return "".concat(this.type, "_").concat(this.mode);
|
|
6937
6937
|
}
|
|
6938
6938
|
getFragmentSource() {
|
|
6939
|
-
return
|
|
6939
|
+
return Ld[this.mode];
|
|
6940
6940
|
}
|
|
6941
6941
|
getVertexSource() {
|
|
6942
6942
|
return `
|
|
@@ -6988,7 +6988,7 @@ class Ii extends Ct {
|
|
|
6988
6988
|
return w(w({}, super.toObject()), {}, { image: this.image && this.image.toObject() });
|
|
6989
6989
|
}
|
|
6990
6990
|
static async fromObject(t, e) {
|
|
6991
|
-
let { type: s, image: i } = t, n = ht(t,
|
|
6991
|
+
let { type: s, image: i } = t, n = ht(t, Fd);
|
|
6992
6992
|
return Pt.fromObject(i, e).then(((r) => new this(w(w({}, n), {}, { image: r }))));
|
|
6993
6993
|
}
|
|
6994
6994
|
}
|
|
@@ -7204,7 +7204,7 @@ class Bi extends Ct {
|
|
|
7204
7204
|
}
|
|
7205
7205
|
}
|
|
7206
7206
|
x(Bi, "type", "Contrast"), x(Bi, "defaults", { contrast: 0 }), x(Bi, "uniformLocations", ["uContrast"]), L.setClass(Bi);
|
|
7207
|
-
const
|
|
7207
|
+
const Id = { Convolute_3_1: `
|
|
7208
7208
|
precision highp float;
|
|
7209
7209
|
uniform sampler2D uTexture;
|
|
7210
7210
|
uniform float uMatrix[9];
|
|
@@ -7354,7 +7354,7 @@ class Hi extends Ct {
|
|
|
7354
7354
|
return "".concat(this.type, "_").concat(Math.sqrt(this.matrix.length), "_").concat(this.opaque ? 1 : 0);
|
|
7355
7355
|
}
|
|
7356
7356
|
getFragmentSource() {
|
|
7357
|
-
return
|
|
7357
|
+
return Id[this.getCacheKey()];
|
|
7358
7358
|
}
|
|
7359
7359
|
applyTo2d(t) {
|
|
7360
7360
|
const e = t.imageData, s = e.data, i = this.matrix, n = Math.round(Math.sqrt(i.length)), r = Math.floor(n / 2), o = e.width, h = e.height, l = t.ctx.createImageData(o, h), c = l.data, u = this.opaque ? 1 : 0;
|
|
@@ -7416,7 +7416,7 @@ class zi extends Ct {
|
|
|
7416
7416
|
}
|
|
7417
7417
|
}
|
|
7418
7418
|
x(zi, "type", vl), x(zi, "defaults", { gamma: [1, 1, 1] }), x(zi, "uniformLocations", ["uGamma"]), L.setClass(zi);
|
|
7419
|
-
const
|
|
7419
|
+
const Nd = { average: `
|
|
7420
7420
|
precision highp float;
|
|
7421
7421
|
uniform sampler2D uTexture;
|
|
7422
7422
|
varying vec2 vTexCoord;
|
|
@@ -7468,7 +7468,7 @@ class Gi extends Ct {
|
|
|
7468
7468
|
return "".concat(this.type, "_").concat(this.mode);
|
|
7469
7469
|
}
|
|
7470
7470
|
getFragmentSource() {
|
|
7471
|
-
return
|
|
7471
|
+
return Nd[this.mode];
|
|
7472
7472
|
}
|
|
7473
7473
|
sendUniformData(t, e) {
|
|
7474
7474
|
t.uniform1i(e.uMode, 1);
|
|
@@ -7478,7 +7478,7 @@ class Gi extends Ct {
|
|
|
7478
7478
|
}
|
|
7479
7479
|
}
|
|
7480
7480
|
x(Gi, "type", "Grayscale"), x(Gi, "defaults", { mode: "average" }), x(Gi, "uniformLocations", ["uMode"]), L.setClass(Gi);
|
|
7481
|
-
const
|
|
7481
|
+
const jd = w(w({}, bl), {}, { rotation: 0 });
|
|
7482
7482
|
class ur extends Cs {
|
|
7483
7483
|
calculateMatrix() {
|
|
7484
7484
|
const t = this.rotation * Math.PI, e = ge(t), s = pe(t), i = 1 / 3, n = Math.sqrt(i) * s, r = 1 - e;
|
|
@@ -7494,7 +7494,7 @@ class ur extends Cs {
|
|
|
7494
7494
|
return { type: this.type, rotation: this.rotation };
|
|
7495
7495
|
}
|
|
7496
7496
|
}
|
|
7497
|
-
x(ur, "type", "HueRotation"), x(ur, "defaults",
|
|
7497
|
+
x(ur, "type", "HueRotation"), x(ur, "defaults", jd), L.setClass(ur);
|
|
7498
7498
|
class Vi extends Ct {
|
|
7499
7499
|
applyTo2d(t) {
|
|
7500
7500
|
let { imageData: { data: e } } = t;
|
|
@@ -7823,37 +7823,17 @@ class qi extends Ct {
|
|
|
7823
7823
|
}
|
|
7824
7824
|
}
|
|
7825
7825
|
x(qi, "type", "Vibrance"), x(qi, "defaults", { vibrance: 0 }), x(qi, "uniformLocations", ["uVibrance"]), L.setClass(qi);
|
|
7826
|
-
|
|
7827
|
-
function jd() {
|
|
7828
|
-
const a = document.createElement("div");
|
|
7829
|
-
a.style.width = "1in", document.body.append(a);
|
|
7830
|
-
const t = a.offsetWidth;
|
|
7831
|
-
return a.remove(), t;
|
|
7832
|
-
}
|
|
7833
|
-
function Bd() {
|
|
7834
|
-
const a = Da ?? jd();
|
|
7835
|
-
return Da = a, a / 72;
|
|
7836
|
-
}
|
|
7837
|
-
function Hd(a, t = 500) {
|
|
7838
|
-
if (typeof a != "function") throw new TypeError("The first argument is not a function.");
|
|
7839
|
-
let e = null;
|
|
7840
|
-
return function(...s) {
|
|
7841
|
-
e && clearTimeout(e), e = setTimeout(() => {
|
|
7842
|
-
e = null, a.apply(this, s);
|
|
7843
|
-
}, t);
|
|
7844
|
-
};
|
|
7845
|
-
}
|
|
7846
|
-
function zd(a) {
|
|
7826
|
+
function Bd(a) {
|
|
7847
7827
|
return new Promise((t, e) => {
|
|
7848
7828
|
const s = globalThis.URL.createObjectURL(a), i = new Image();
|
|
7849
7829
|
i.src = s, i.addEventListener("load", async () => {
|
|
7850
|
-
globalThis.URL.revokeObjectURL(s), t(await
|
|
7830
|
+
globalThis.URL.revokeObjectURL(s), t(await Hd(i));
|
|
7851
7831
|
}), i.addEventListener("error", (n) => {
|
|
7852
7832
|
globalThis.URL.revokeObjectURL(s), e(n);
|
|
7853
7833
|
});
|
|
7854
7834
|
});
|
|
7855
7835
|
}
|
|
7856
|
-
function
|
|
7836
|
+
function Hd(a) {
|
|
7857
7837
|
return new Promise((t) => {
|
|
7858
7838
|
const e = document.createElement("canvas"), s = e.getContext("2d"), { naturalWidth: i, naturalHeight: n } = a;
|
|
7859
7839
|
e.width = i, e.height = n, s?.drawImage(a, 0, 0, i, n), t(e.toDataURL("image/jpeg", 0.8));
|
|
@@ -7889,7 +7869,7 @@ ai.d(Y, {
|
|
|
7889
7869
|
),
|
|
7890
7870
|
AnnotationLayer: () => (
|
|
7891
7871
|
/* reexport */
|
|
7892
|
-
|
|
7872
|
+
Ig
|
|
7893
7873
|
),
|
|
7894
7874
|
AnnotationMode: () => (
|
|
7895
7875
|
/* reexport */
|
|
@@ -7949,11 +7929,11 @@ ai.d(Y, {
|
|
|
7949
7929
|
),
|
|
7950
7930
|
PasswordResponses: () => (
|
|
7951
7931
|
/* reexport */
|
|
7952
|
-
|
|
7932
|
+
Wd
|
|
7953
7933
|
),
|
|
7954
7934
|
PermissionFlag: () => (
|
|
7955
7935
|
/* reexport */
|
|
7956
|
-
|
|
7936
|
+
Vd
|
|
7957
7937
|
),
|
|
7958
7938
|
PixelsPerInch: () => (
|
|
7959
7939
|
/* reexport */
|
|
@@ -7989,11 +7969,11 @@ ai.d(Y, {
|
|
|
7989
7969
|
),
|
|
7990
7970
|
build: () => (
|
|
7991
7971
|
/* reexport */
|
|
7992
|
-
|
|
7972
|
+
mg
|
|
7993
7973
|
),
|
|
7994
7974
|
createValidAbsoluteUrl: () => (
|
|
7995
7975
|
/* reexport */
|
|
7996
|
-
|
|
7976
|
+
$d
|
|
7997
7977
|
),
|
|
7998
7978
|
fetchData: () => (
|
|
7999
7979
|
/* reexport */
|
|
@@ -8001,19 +7981,19 @@ ai.d(Y, {
|
|
|
8001
7981
|
),
|
|
8002
7982
|
getDocument: () => (
|
|
8003
7983
|
/* reexport */
|
|
8004
|
-
|
|
7984
|
+
ag
|
|
8005
7985
|
),
|
|
8006
7986
|
getFilenameFromUrl: () => (
|
|
8007
7987
|
/* reexport */
|
|
8008
|
-
|
|
7988
|
+
nf
|
|
8009
7989
|
),
|
|
8010
7990
|
getPdfFilenameFromUrl: () => (
|
|
8011
7991
|
/* reexport */
|
|
8012
|
-
|
|
7992
|
+
rf
|
|
8013
7993
|
),
|
|
8014
7994
|
getXfaPageViewport: () => (
|
|
8015
7995
|
/* reexport */
|
|
8016
|
-
|
|
7996
|
+
of
|
|
8017
7997
|
),
|
|
8018
7998
|
isDataScheme: () => (
|
|
8019
7999
|
/* reexport */
|
|
@@ -8029,7 +8009,7 @@ ai.d(Y, {
|
|
|
8029
8009
|
),
|
|
8030
8010
|
normalizeUnicode: () => (
|
|
8031
8011
|
/* reexport */
|
|
8032
|
-
|
|
8012
|
+
tf
|
|
8033
8013
|
),
|
|
8034
8014
|
setLayerDimensions: () => (
|
|
8035
8015
|
/* reexport */
|
|
@@ -8045,10 +8025,10 @@ ai.d(Y, {
|
|
|
8045
8025
|
),
|
|
8046
8026
|
version: () => (
|
|
8047
8027
|
/* reexport */
|
|
8048
|
-
|
|
8028
|
+
pg
|
|
8049
8029
|
)
|
|
8050
8030
|
});
|
|
8051
|
-
const Dt = typeof process == "object" && process + "" == "[object process]" && !process.versions.nw && !(process.versions.electron && process.type && process.type !== "browser"), yl = [1, 0, 0, 1, 0, 0], Rr = [1e-3, 0, 0, 1e-3, 0, 0],
|
|
8031
|
+
const Dt = typeof process == "object" && process + "" == "[object process]" && !process.versions.nw && !(process.versions.electron && process.type && process.type !== "browser"), yl = [1, 0, 0, 1, 0, 0], Rr = [1e-3, 0, 0, 1e-3, 0, 0], zd = 1e7, dr = 1.35, Jt = {
|
|
8052
8032
|
ANY: 1,
|
|
8053
8033
|
DISPLAY: 2,
|
|
8054
8034
|
PRINT: 4,
|
|
@@ -8062,7 +8042,7 @@ const Dt = typeof process == "object" && process + "" == "[object process]" && !
|
|
|
8062
8042
|
ENABLE: 1,
|
|
8063
8043
|
ENABLE_FORMS: 2,
|
|
8064
8044
|
ENABLE_STORAGE: 3
|
|
8065
|
-
},
|
|
8045
|
+
}, Gd = "pdfjs_internal_editor_", q = {
|
|
8066
8046
|
DISABLE: -1,
|
|
8067
8047
|
NONE: 0,
|
|
8068
8048
|
FREETEXT: 3,
|
|
@@ -8084,7 +8064,7 @@ const Dt = typeof process == "object" && process + "" == "[object process]" && !
|
|
|
8084
8064
|
HIGHLIGHT_FREE: 34,
|
|
8085
8065
|
HIGHLIGHT_SHOW_ALL: 35,
|
|
8086
8066
|
DRAW_STEP: 41
|
|
8087
|
-
},
|
|
8067
|
+
}, Vd = {
|
|
8088
8068
|
PRINT: 4,
|
|
8089
8069
|
MODIFY_CONTENTS: 8,
|
|
8090
8070
|
COPY: 16,
|
|
@@ -8224,15 +8204,15 @@ const Dt = typeof process == "object" && process + "" == "[object process]" && !
|
|
|
8224
8204
|
constructPath: 91,
|
|
8225
8205
|
setStrokeTransparent: 92,
|
|
8226
8206
|
setFillTransparent: 93
|
|
8227
|
-
},
|
|
8207
|
+
}, Wd = {
|
|
8228
8208
|
NEED_PASSWORD: 1,
|
|
8229
8209
|
INCORRECT_PASSWORD: 2
|
|
8230
8210
|
};
|
|
8231
8211
|
let Hn = Bn.WARNINGS;
|
|
8232
|
-
function
|
|
8212
|
+
function Xd(a) {
|
|
8233
8213
|
Number.isInteger(a) && (Hn = a);
|
|
8234
8214
|
}
|
|
8235
|
-
function
|
|
8215
|
+
function Ud() {
|
|
8236
8216
|
return Hn;
|
|
8237
8217
|
}
|
|
8238
8218
|
function zn(a) {
|
|
@@ -8247,7 +8227,7 @@ function rt(a) {
|
|
|
8247
8227
|
function _t(a, t) {
|
|
8248
8228
|
a || rt(t);
|
|
8249
8229
|
}
|
|
8250
|
-
function
|
|
8230
|
+
function Yd(a) {
|
|
8251
8231
|
switch (a?.protocol) {
|
|
8252
8232
|
case "http:":
|
|
8253
8233
|
case "https:":
|
|
@@ -8259,17 +8239,17 @@ function qd(a) {
|
|
|
8259
8239
|
return !1;
|
|
8260
8240
|
}
|
|
8261
8241
|
}
|
|
8262
|
-
function
|
|
8242
|
+
function $d(a, t = null, e = null) {
|
|
8263
8243
|
if (!a)
|
|
8264
8244
|
return null;
|
|
8265
8245
|
try {
|
|
8266
8246
|
if (e && typeof a == "string" && (e.addDefaultProtocol && a.startsWith("www.") && a.match(/\./g)?.length >= 2 && (a = `http://${a}`), e.tryConvertEncoding))
|
|
8267
8247
|
try {
|
|
8268
|
-
a =
|
|
8248
|
+
a = Qd(a);
|
|
8269
8249
|
} catch {
|
|
8270
8250
|
}
|
|
8271
8251
|
const s = t ? new URL(a, t) : new URL(a);
|
|
8272
|
-
if (
|
|
8252
|
+
if (Yd(s))
|
|
8273
8253
|
return s;
|
|
8274
8254
|
} catch {
|
|
8275
8255
|
}
|
|
@@ -8289,7 +8269,7 @@ const qe = (function() {
|
|
|
8289
8269
|
}
|
|
8290
8270
|
return t.prototype = new Error(), t.constructor = t, t;
|
|
8291
8271
|
})();
|
|
8292
|
-
class
|
|
8272
|
+
class Da extends qe {
|
|
8293
8273
|
constructor(t, e) {
|
|
8294
8274
|
super(t, "PasswordException"), this.code = e;
|
|
8295
8275
|
}
|
|
@@ -8314,7 +8294,7 @@ class Sn extends qe {
|
|
|
8314
8294
|
super(t, "UnexpectedResponseException"), this.status = e;
|
|
8315
8295
|
}
|
|
8316
8296
|
}
|
|
8317
|
-
class
|
|
8297
|
+
class qd extends qe {
|
|
8318
8298
|
constructor(t) {
|
|
8319
8299
|
super(t, "FormatError");
|
|
8320
8300
|
}
|
|
@@ -8343,7 +8323,7 @@ function Gn(a) {
|
|
|
8343
8323
|
e[s] = a.charCodeAt(s) & 255;
|
|
8344
8324
|
return e;
|
|
8345
8325
|
}
|
|
8346
|
-
function
|
|
8326
|
+
function Kd(a) {
|
|
8347
8327
|
return String.fromCharCode(a >> 24 & 255, a >> 16 & 255, a >> 8 & 255, a & 255);
|
|
8348
8328
|
}
|
|
8349
8329
|
function fo(a) {
|
|
@@ -8352,11 +8332,11 @@ function fo(a) {
|
|
|
8352
8332
|
t[e] = s;
|
|
8353
8333
|
return t;
|
|
8354
8334
|
}
|
|
8355
|
-
function
|
|
8335
|
+
function Jd() {
|
|
8356
8336
|
const a = new Uint8Array(4);
|
|
8357
8337
|
return a[0] = 1, new Uint32Array(a.buffer, 0, 1)[0] === 1;
|
|
8358
8338
|
}
|
|
8359
|
-
function
|
|
8339
|
+
function Zd() {
|
|
8360
8340
|
try {
|
|
8361
8341
|
return new Function(""), !0;
|
|
8362
8342
|
} catch {
|
|
@@ -8365,10 +8345,10 @@ function tf() {
|
|
|
8365
8345
|
}
|
|
8366
8346
|
class zt {
|
|
8367
8347
|
static get isLittleEndian() {
|
|
8368
|
-
return Z(this, "isLittleEndian",
|
|
8348
|
+
return Z(this, "isLittleEndian", Jd());
|
|
8369
8349
|
}
|
|
8370
8350
|
static get isEvalSupported() {
|
|
8371
|
-
return Z(this, "isEvalSupported",
|
|
8351
|
+
return Z(this, "isEvalSupported", Zd());
|
|
8372
8352
|
}
|
|
8373
8353
|
static get isOffscreenCanvasSupported() {
|
|
8374
8354
|
return Z(this, "isOffscreenCanvasSupported", typeof OffscreenCanvas < "u");
|
|
@@ -8455,21 +8435,21 @@ class G {
|
|
|
8455
8435
|
return l ? (l[0] = Math.min(l[0], t, o), l[1] = Math.min(l[1], e, h), l[2] = Math.max(l[2], t, o), l[3] = Math.max(l[3], e, h)) : l = [Math.min(t, o), Math.min(e, h), Math.max(t, o), Math.max(e, h)], this.#e(t, s, n, o, e, i, r, h, 3 * (-t + 3 * (s - n) + o), 6 * (t - 2 * s + n), 3 * (s - t), l), this.#e(t, s, n, o, e, i, r, h, 3 * (-e + 3 * (i - r) + h), 6 * (e - 2 * i + r), 3 * (i - e), l), l;
|
|
8456
8436
|
}
|
|
8457
8437
|
}
|
|
8458
|
-
function
|
|
8438
|
+
function Qd(a) {
|
|
8459
8439
|
return decodeURIComponent(escape(a));
|
|
8460
8440
|
}
|
|
8461
|
-
let pr = null,
|
|
8462
|
-
function
|
|
8463
|
-
return pr || (pr = /([\u00a0\u00b5\u037e\u0eb3\u2000-\u200a\u202f\u2126\ufb00-\ufb04\ufb06\ufb20-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufba1\ufba4-\ufba9\ufbae-\ufbb1\ufbd3-\ufbdc\ufbde-\ufbe7\ufbea-\ufbf8\ufbfc-\ufbfd\ufc00-\ufc5d\ufc64-\ufcf1\ufcf5-\ufd3d\ufd88\ufdf4\ufdfa-\ufdfb\ufe71\ufe77\ufe79\ufe7b\ufe7d]+)|(\ufb05+)/gu,
|
|
8441
|
+
let pr = null, Ra = null;
|
|
8442
|
+
function tf(a) {
|
|
8443
|
+
return pr || (pr = /([\u00a0\u00b5\u037e\u0eb3\u2000-\u200a\u202f\u2126\ufb00-\ufb04\ufb06\ufb20-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufba1\ufba4-\ufba9\ufbae-\ufbb1\ufbd3-\ufbdc\ufbde-\ufbe7\ufbea-\ufbf8\ufbfc-\ufbfd\ufc00-\ufc5d\ufc64-\ufcf1\ufcf5-\ufd3d\ufd88\ufdf4\ufdfa-\ufdfb\ufe71\ufe77\ufe79\ufe7b\ufe7d]+)|(\ufb05+)/gu, Ra = /* @__PURE__ */ new Map([["ſt", "ſt"]])), a.replaceAll(pr, (t, e, s) => e ? e.normalize("NFKC") : Ra.get(s));
|
|
8464
8444
|
}
|
|
8465
|
-
function
|
|
8445
|
+
function ef() {
|
|
8466
8446
|
if (typeof crypto.randomUUID == "function")
|
|
8467
8447
|
return crypto.randomUUID();
|
|
8468
8448
|
const a = new Uint8Array(32);
|
|
8469
8449
|
return crypto.getRandomValues(a), _l(a);
|
|
8470
8450
|
}
|
|
8471
8451
|
const go = "pdfjs_internal_id_";
|
|
8472
|
-
function
|
|
8452
|
+
function sf(a) {
|
|
8473
8453
|
return Uint8Array.prototype.toBase64 ? a.toBase64() : btoa(_l(a));
|
|
8474
8454
|
}
|
|
8475
8455
|
typeof Promise.try != "function" && (Promise.try = function(a, ...t) {
|
|
@@ -8606,10 +8586,10 @@ function Wn(a) {
|
|
|
8606
8586
|
function mo(a) {
|
|
8607
8587
|
return typeof a == "string" && /\.pdf$/i.test(a);
|
|
8608
8588
|
}
|
|
8609
|
-
function
|
|
8589
|
+
function nf(a) {
|
|
8610
8590
|
return [a] = a.split(/[#?]/, 1), a.substring(a.lastIndexOf("/") + 1);
|
|
8611
8591
|
}
|
|
8612
|
-
function
|
|
8592
|
+
function rf(a, t = "document.pdf") {
|
|
8613
8593
|
if (typeof a != "string")
|
|
8614
8594
|
return t;
|
|
8615
8595
|
if (Wn(a))
|
|
@@ -8623,7 +8603,7 @@ function af(a, t = "document.pdf") {
|
|
|
8623
8603
|
}
|
|
8624
8604
|
return n || t;
|
|
8625
8605
|
}
|
|
8626
|
-
class
|
|
8606
|
+
class La {
|
|
8627
8607
|
started = /* @__PURE__ */ Object.create(null);
|
|
8628
8608
|
times = [];
|
|
8629
8609
|
time(t) {
|
|
@@ -8696,7 +8676,7 @@ class wl {
|
|
|
8696
8676
|
return u = u >= 0 && u <= 59 ? u : 0, l === "-" ? (r += c, o += u) : l === "+" && (r -= c, o -= u), new Date(Date.UTC(s, i, n, r, o, h));
|
|
8697
8677
|
}
|
|
8698
8678
|
}
|
|
8699
|
-
function
|
|
8679
|
+
function of(a, {
|
|
8700
8680
|
scale: t = 1,
|
|
8701
8681
|
rotation: e = 0
|
|
8702
8682
|
}) {
|
|
@@ -8718,7 +8698,7 @@ function bo(a) {
|
|
|
8718
8698
|
}
|
|
8719
8699
|
return a.startsWith("rgb(") ? a.slice(4, -1).split(",").map((t) => parseInt(t)) : a.startsWith("rgba(") ? a.slice(5, -1).split(",").map((t) => parseInt(t)).slice(0, 3) : (K(`Not a valid color format: "${a}"`), [0, 0, 0]);
|
|
8720
8700
|
}
|
|
8721
|
-
function
|
|
8701
|
+
function af(a) {
|
|
8722
8702
|
const t = document.createElement("span");
|
|
8723
8703
|
t.style.visibility = "hidden", document.body.append(t);
|
|
8724
8704
|
for (const e of a.keys()) {
|
|
@@ -8867,7 +8847,7 @@ class hi {
|
|
|
8867
8847
|
this.#t.remove(), this.#e?.destroy(), this.#e = null;
|
|
8868
8848
|
}
|
|
8869
8849
|
}
|
|
8870
|
-
class
|
|
8850
|
+
class hf {
|
|
8871
8851
|
#t = null;
|
|
8872
8852
|
#e = null;
|
|
8873
8853
|
#s;
|
|
@@ -8925,14 +8905,14 @@ function Cn(a, t, e) {
|
|
|
8925
8905
|
for (const s of e)
|
|
8926
8906
|
t.addEventListener(s, a[s].bind(a));
|
|
8927
8907
|
}
|
|
8928
|
-
class
|
|
8908
|
+
class lf {
|
|
8929
8909
|
#t = 0;
|
|
8930
8910
|
get id() {
|
|
8931
|
-
return `${
|
|
8911
|
+
return `${Gd}${this.#t++}`;
|
|
8932
8912
|
}
|
|
8933
8913
|
}
|
|
8934
8914
|
class vo {
|
|
8935
|
-
#t =
|
|
8915
|
+
#t = ef();
|
|
8936
8916
|
#e = 0;
|
|
8937
8917
|
#s = null;
|
|
8938
8918
|
static get _isSVGFittingCanvas() {
|
|
@@ -9044,7 +9024,7 @@ class vo {
|
|
|
9044
9024
|
return t.startsWith(`image_${this.#t}_`);
|
|
9045
9025
|
}
|
|
9046
9026
|
}
|
|
9047
|
-
class
|
|
9027
|
+
class cf {
|
|
9048
9028
|
#t = [];
|
|
9049
9029
|
#e = !1;
|
|
9050
9030
|
#s;
|
|
@@ -9164,7 +9144,7 @@ class yo {
|
|
|
9164
9144
|
static _colorsMapping = /* @__PURE__ */ new Map([["CanvasText", [0, 0, 0]], ["Canvas", [255, 255, 255]]]);
|
|
9165
9145
|
get _colors() {
|
|
9166
9146
|
const t = /* @__PURE__ */ new Map([["CanvasText", null], ["Canvas", null]]);
|
|
9167
|
-
return
|
|
9147
|
+
return af(t), Z(this, "_colors", t);
|
|
9168
9148
|
}
|
|
9169
9149
|
convert(t) {
|
|
9170
9150
|
const e = bo(t);
|
|
@@ -9188,7 +9168,7 @@ class Ye {
|
|
|
9188
9168
|
#r = null;
|
|
9189
9169
|
#n = null;
|
|
9190
9170
|
#h = null;
|
|
9191
|
-
#a = new
|
|
9171
|
+
#a = new cf();
|
|
9192
9172
|
#c = null;
|
|
9193
9173
|
#l = null;
|
|
9194
9174
|
#d = 0;
|
|
@@ -9206,7 +9186,7 @@ class Ye {
|
|
|
9206
9186
|
#S = null;
|
|
9207
9187
|
#A = !1;
|
|
9208
9188
|
#E = null;
|
|
9209
|
-
#M = new
|
|
9189
|
+
#M = new lf();
|
|
9210
9190
|
#x = !1;
|
|
9211
9191
|
#k = !1;
|
|
9212
9192
|
#T = null;
|
|
@@ -9468,7 +9448,7 @@ class Ye {
|
|
|
9468
9448
|
if (!t || t.isCollapsed)
|
|
9469
9449
|
return;
|
|
9470
9450
|
const s = this.#B(t).closest(".textLayer"), i = this.getSelectionBoxes(s);
|
|
9471
|
-
i && (this.#E ||= new
|
|
9451
|
+
i && (this.#E ||= new hf(this), this.#E.show(s, i, this.direction === "ltr"));
|
|
9472
9452
|
}
|
|
9473
9453
|
addToAnnotationStorage(t) {
|
|
9474
9454
|
!t.isEmpty() && this.#n && !this.#n.has(t.id) && this.#n.setValue(t.id, t);
|
|
@@ -10514,7 +10494,7 @@ class U {
|
|
|
10514
10494
|
return Z(this, "_defaultLineColor", this._colorManager.getHexCode("CanvasText"));
|
|
10515
10495
|
}
|
|
10516
10496
|
static deleteAnnotationElement(t) {
|
|
10517
|
-
const e = new
|
|
10497
|
+
const e = new uf({
|
|
10518
10498
|
id: t.parent.getNextId(),
|
|
10519
10499
|
parent: t.parent,
|
|
10520
10500
|
uiManager: t._uiManager
|
|
@@ -11364,7 +11344,7 @@ class U {
|
|
|
11364
11344
|
e?.nodeName === "DIV" && e.classList.contains("annotationContent") && e.remove();
|
|
11365
11345
|
}
|
|
11366
11346
|
}
|
|
11367
|
-
class
|
|
11347
|
+
class uf extends U {
|
|
11368
11348
|
constructor(t) {
|
|
11369
11349
|
super(t), this.annotationElementId = t.annotationElementId, this.deleted = !0;
|
|
11370
11350
|
}
|
|
@@ -11372,10 +11352,10 @@ class ff extends U {
|
|
|
11372
11352
|
return this.serializeDeleted();
|
|
11373
11353
|
}
|
|
11374
11354
|
}
|
|
11375
|
-
const
|
|
11355
|
+
const Fa = 3285377520, ie = 4294901760, ve = 65535;
|
|
11376
11356
|
class xl {
|
|
11377
11357
|
constructor(t) {
|
|
11378
|
-
this.h1 = t ? t & 4294967295 :
|
|
11358
|
+
this.h1 = t ? t & 4294967295 : Fa, this.h2 = t ? t & 4294967295 : Fa;
|
|
11379
11359
|
}
|
|
11380
11360
|
update(t) {
|
|
11381
11361
|
let e, s;
|
|
@@ -11558,7 +11538,7 @@ class Sl extends _o {
|
|
|
11558
11538
|
});
|
|
11559
11539
|
}
|
|
11560
11540
|
}
|
|
11561
|
-
class
|
|
11541
|
+
class df {
|
|
11562
11542
|
#t = /* @__PURE__ */ new Set();
|
|
11563
11543
|
constructor({
|
|
11564
11544
|
ownerDocument: t = globalThis.document,
|
|
@@ -11692,7 +11672,7 @@ class gf {
|
|
|
11692
11672
|
let b = s(d, g);
|
|
11693
11673
|
for (n = 0, r = u.length - 3; n < r; n += 4)
|
|
11694
11674
|
b = b - p + s(u, n) | 0;
|
|
11695
|
-
n < u.length && (b = b - p + s(u + "XXX", n) | 0), d = i(d, g, 4,
|
|
11675
|
+
n < u.length && (b = b - p + s(u + "XXX", n) | 0), d = i(d, g, 4, Kd(b));
|
|
11696
11676
|
const m = `url(data:font/opentype;base64,${btoa(d)});`, v = `@font-face {font-family:"${u}";src:${m}}`;
|
|
11697
11677
|
this.insertRule(v);
|
|
11698
11678
|
const y = this._document.createElement("div");
|
|
@@ -11706,7 +11686,7 @@ class gf {
|
|
|
11706
11686
|
});
|
|
11707
11687
|
}
|
|
11708
11688
|
}
|
|
11709
|
-
class
|
|
11689
|
+
class ff {
|
|
11710
11690
|
constructor(t, {
|
|
11711
11691
|
disableFontFace: e = !1,
|
|
11712
11692
|
fontExtraProperties: s = !1,
|
|
@@ -11734,7 +11714,7 @@ class pf {
|
|
|
11734
11714
|
createFontFaceRule() {
|
|
11735
11715
|
if (!this.data || this.disableFontFace)
|
|
11736
11716
|
return null;
|
|
11737
|
-
const t = `url(data:${this.mimetype};base64,${
|
|
11717
|
+
const t = `url(data:${this.mimetype};base64,${sf(this.data)});`;
|
|
11738
11718
|
let e;
|
|
11739
11719
|
if (!this.cssFontInfo)
|
|
11740
11720
|
e = `@font-face {font-family:"${this.loadedName}";src:${t}}`;
|
|
@@ -11771,10 +11751,10 @@ const Ki = {
|
|
|
11771
11751
|
PULL_COMPLETE: 7,
|
|
11772
11752
|
START_COMPLETE: 8
|
|
11773
11753
|
};
|
|
11774
|
-
function
|
|
11754
|
+
function Ia() {
|
|
11775
11755
|
}
|
|
11776
11756
|
function Ut(a) {
|
|
11777
|
-
if (a instanceof Ue || a instanceof Lr || a instanceof gi || a instanceof
|
|
11757
|
+
if (a instanceof Ue || a instanceof Lr || a instanceof gi || a instanceof Da || a instanceof Sn || a instanceof fr)
|
|
11778
11758
|
return a;
|
|
11779
11759
|
switch (a instanceof Error || typeof a == "object" && a !== null || rt('wrapReason: Expected "reason" to be a (possibly cloned) Error.'), a.name) {
|
|
11780
11760
|
case "AbortException":
|
|
@@ -11784,7 +11764,7 @@ function Ut(a) {
|
|
|
11784
11764
|
case "MissingPDFException":
|
|
11785
11765
|
return new gi(a.message);
|
|
11786
11766
|
case "PasswordException":
|
|
11787
|
-
return new
|
|
11767
|
+
return new Da(a.message, a.code);
|
|
11788
11768
|
case "UnexpectedResponseException":
|
|
11789
11769
|
return new Sn(a.message, a.status);
|
|
11790
11770
|
case "UnknownErrorException":
|
|
@@ -11999,7 +11979,7 @@ class ei {
|
|
|
11999
11979
|
});
|
|
12000
11980
|
break;
|
|
12001
11981
|
}
|
|
12002
|
-
o.desiredSize <= 0 && t.desiredSize > 0 && o.sinkCapability.resolve(), o.desiredSize = t.desiredSize, Promise.try(o.onPull ||
|
|
11982
|
+
o.desiredSize <= 0 && t.desiredSize > 0 && o.sinkCapability.resolve(), o.desiredSize = t.desiredSize, Promise.try(o.onPull || Ia).then(function() {
|
|
12003
11983
|
n.postMessage({
|
|
12004
11984
|
sourceName: s,
|
|
12005
11985
|
targetName: i,
|
|
@@ -12037,7 +12017,7 @@ class ei {
|
|
|
12037
12017
|
if (!o)
|
|
12038
12018
|
break;
|
|
12039
12019
|
const h = Ut(t.reason);
|
|
12040
|
-
Promise.try(o.onCancel ||
|
|
12020
|
+
Promise.try(o.onCancel || Ia, h).then(function() {
|
|
12041
12021
|
n.postMessage({
|
|
12042
12022
|
sourceName: s,
|
|
12043
12023
|
targetName: i,
|
|
@@ -12100,7 +12080,7 @@ class Cl {
|
|
|
12100
12080
|
rt("Abstract method `_createCanvas` called.");
|
|
12101
12081
|
}
|
|
12102
12082
|
}
|
|
12103
|
-
class
|
|
12083
|
+
class gf extends Cl {
|
|
12104
12084
|
constructor({
|
|
12105
12085
|
ownerDocument: t = globalThis.document,
|
|
12106
12086
|
enableHWA: e = !1
|
|
@@ -12165,7 +12145,7 @@ class El {
|
|
|
12165
12145
|
destroy(t = !1) {
|
|
12166
12146
|
}
|
|
12167
12147
|
}
|
|
12168
|
-
class
|
|
12148
|
+
class pf extends El {
|
|
12169
12149
|
#t;
|
|
12170
12150
|
#e;
|
|
12171
12151
|
#s;
|
|
@@ -12375,19 +12355,19 @@ async function Pl(a) {
|
|
|
12375
12355
|
const e = await process.getBuiltinModule("fs").promises.readFile(a);
|
|
12376
12356
|
return new Uint8Array(e);
|
|
12377
12357
|
}
|
|
12378
|
-
class
|
|
12358
|
+
class mf extends El {
|
|
12379
12359
|
}
|
|
12380
|
-
class
|
|
12360
|
+
class bf extends Cl {
|
|
12381
12361
|
_createCanvas(t, e) {
|
|
12382
12362
|
return process.getBuiltinModule("module").createRequire(import.meta.url)("@napi-rs/canvas").createCanvas(t, e);
|
|
12383
12363
|
}
|
|
12384
12364
|
}
|
|
12385
|
-
class
|
|
12365
|
+
class vf extends Al {
|
|
12386
12366
|
async _fetch(t) {
|
|
12387
12367
|
return Pl(t);
|
|
12388
12368
|
}
|
|
12389
12369
|
}
|
|
12390
|
-
class
|
|
12370
|
+
class yf extends kl {
|
|
12391
12371
|
async _fetch(t) {
|
|
12392
12372
|
return Pl(t);
|
|
12393
12373
|
}
|
|
@@ -12408,7 +12388,7 @@ class wo {
|
|
|
12408
12388
|
rt("Abstract method `getPattern` called.");
|
|
12409
12389
|
}
|
|
12410
12390
|
}
|
|
12411
|
-
class
|
|
12391
|
+
class _f extends wo {
|
|
12412
12392
|
constructor(t) {
|
|
12413
12393
|
super(), this._type = t[1], this._bbox = t[2], this._colorStops = t[3], this._p0 = t[4], this._p1 = t[5], this._r0 = t[6], this._r1 = t[7], this.matrix = null;
|
|
12414
12394
|
}
|
|
@@ -12456,7 +12436,7 @@ function mr(a, t, e, s, i, n, r, o) {
|
|
|
12456
12436
|
V = (D - N) / (D - W), V < 0 ? V = 0 : V > 1 && (V = 1), c[st++] = z - (z - ot) * V | 0, c[st++] = M - (M - lt) * V | 0, c[st++] = R - (R - E) * V | 0, c[st++] = 255;
|
|
12457
12437
|
}
|
|
12458
12438
|
}
|
|
12459
|
-
function
|
|
12439
|
+
function wf(a, t, e) {
|
|
12460
12440
|
const s = t.coords, i = t.colors;
|
|
12461
12441
|
let n, r;
|
|
12462
12442
|
switch (t.type) {
|
|
@@ -12476,7 +12456,7 @@ function Sf(a, t, e) {
|
|
|
12476
12456
|
throw new Error("illegal figure");
|
|
12477
12457
|
}
|
|
12478
12458
|
}
|
|
12479
|
-
class
|
|
12459
|
+
class xf extends wo {
|
|
12480
12460
|
constructor(t) {
|
|
12481
12461
|
super(), this._coords = t[2], this._colors = t[3], this._figures = t[4], this._bounds = t[5], this._bbox = t[7], this._background = t[8], this.matrix = null;
|
|
12482
12462
|
}
|
|
@@ -12495,7 +12475,7 @@ class Cf extends wo {
|
|
|
12495
12475
|
A[T] = e[0], A[T + 1] = e[1], A[T + 2] = e[2], A[T + 3] = 255;
|
|
12496
12476
|
}
|
|
12497
12477
|
for (const A of this._figures)
|
|
12498
|
-
|
|
12478
|
+
wf(_, A, p);
|
|
12499
12479
|
return y.putImageData(_, 2, 2), {
|
|
12500
12480
|
canvas: v.canvas,
|
|
12501
12481
|
offsetX: o - 2 * f,
|
|
@@ -12517,23 +12497,23 @@ class Cf extends wo {
|
|
|
12517
12497
|
return i !== Ot.SHADING && (t.setTransform(...e.baseTransform), this.matrix && t.transform(...this.matrix)), t.translate(r.offsetX, r.offsetY), t.scale(r.scaleX, r.scaleY), t.createPattern(r.canvas, "no-repeat");
|
|
12518
12498
|
}
|
|
12519
12499
|
}
|
|
12520
|
-
class
|
|
12500
|
+
class Sf extends wo {
|
|
12521
12501
|
getPattern() {
|
|
12522
12502
|
return "hotpink";
|
|
12523
12503
|
}
|
|
12524
12504
|
}
|
|
12525
|
-
function
|
|
12505
|
+
function Cf(a) {
|
|
12526
12506
|
switch (a[0]) {
|
|
12527
12507
|
case "RadialAxial":
|
|
12528
|
-
return new
|
|
12508
|
+
return new _f(a);
|
|
12529
12509
|
case "Mesh":
|
|
12530
|
-
return new
|
|
12510
|
+
return new xf(a);
|
|
12531
12511
|
case "Dummy":
|
|
12532
|
-
return new
|
|
12512
|
+
return new Sf();
|
|
12533
12513
|
}
|
|
12534
12514
|
throw new Error(`Unknown IR type: ${a[0]}`);
|
|
12535
12515
|
}
|
|
12536
|
-
const
|
|
12516
|
+
const Na = {
|
|
12537
12517
|
COLORED: 1,
|
|
12538
12518
|
UNCOLORED: 2
|
|
12539
12519
|
};
|
|
@@ -12599,16 +12579,16 @@ class xo {
|
|
|
12599
12579
|
setFillAndStrokeStyleToContext(t, e, s) {
|
|
12600
12580
|
const i = t.ctx, n = t.current;
|
|
12601
12581
|
switch (e) {
|
|
12602
|
-
case
|
|
12582
|
+
case Na.COLORED:
|
|
12603
12583
|
const r = this.ctx;
|
|
12604
12584
|
i.fillStyle = r.fillStyle, i.strokeStyle = r.strokeStyle, n.fillColor = r.fillStyle, n.strokeColor = r.strokeStyle;
|
|
12605
12585
|
break;
|
|
12606
|
-
case
|
|
12586
|
+
case Na.UNCOLORED:
|
|
12607
12587
|
const o = G.makeHexColor(s[0], s[1], s[2]);
|
|
12608
12588
|
i.fillStyle = o, i.strokeStyle = o, n.fillColor = o, n.strokeColor = o;
|
|
12609
12589
|
break;
|
|
12610
12590
|
default:
|
|
12611
|
-
throw new
|
|
12591
|
+
throw new qd(`Unsupported paint type: ${e}`);
|
|
12612
12592
|
}
|
|
12613
12593
|
}
|
|
12614
12594
|
getPattern(t, e, s, i) {
|
|
@@ -12621,7 +12601,7 @@ class xo {
|
|
|
12621
12601
|
return h.setTransform(o), h;
|
|
12622
12602
|
}
|
|
12623
12603
|
}
|
|
12624
|
-
function
|
|
12604
|
+
function Af({
|
|
12625
12605
|
src: a,
|
|
12626
12606
|
srcPos: t = 0,
|
|
12627
12607
|
dest: e,
|
|
@@ -12649,8 +12629,8 @@ function Ef({
|
|
|
12649
12629
|
destPos: f
|
|
12650
12630
|
};
|
|
12651
12631
|
}
|
|
12652
|
-
const
|
|
12653
|
-
function
|
|
12632
|
+
const ja = 16, Ba = 100, Tf = 15, Ha = 10, za = 1e3, Yt = 16;
|
|
12633
|
+
function Ef(a, t) {
|
|
12654
12634
|
if (a._removeMirroring)
|
|
12655
12635
|
throw new Error("Context is already forwarding operations.");
|
|
12656
12636
|
a.__originalSave = a.save, a.__originalRestore = a.restore, a.__originalRotate = a.rotate, a.__originalScale = a.scale, a.__originalTranslate = a.translate, a.__originalTransform = a.transform, a.__originalSetTransform = a.setTransform, a.__originalResetTransform = a.resetTransform, a.__originalClip = a.clip, a.__originalMoveTo = a.moveTo, a.__originalLineTo = a.lineTo, a.__originalBezierCurveTo = a.bezierCurveTo, a.__originalRect = a.rect, a.__originalClosePath = a.closePath, a.__originalBeginPath = a.beginPath, a._removeMirroring = () => {
|
|
@@ -12687,7 +12667,7 @@ function Mf(a, t) {
|
|
|
12687
12667
|
t.beginPath(), this.__originalBeginPath();
|
|
12688
12668
|
};
|
|
12689
12669
|
}
|
|
12690
|
-
class
|
|
12670
|
+
class kf {
|
|
12691
12671
|
constructor(t) {
|
|
12692
12672
|
this.canvasFactory = t, this.cache = /* @__PURE__ */ Object.create(null);
|
|
12693
12673
|
}
|
|
@@ -12719,12 +12699,12 @@ function Ji(a, t, e, s, i, n, r, o, h, l) {
|
|
|
12719
12699
|
const b = Math.hypot(c, u), m = Math.hypot(d, f);
|
|
12720
12700
|
return [b * h, m * l];
|
|
12721
12701
|
}
|
|
12722
|
-
function
|
|
12702
|
+
function Mf(a) {
|
|
12723
12703
|
const {
|
|
12724
12704
|
width: t,
|
|
12725
12705
|
height: e
|
|
12726
12706
|
} = a;
|
|
12727
|
-
if (t >
|
|
12707
|
+
if (t > za || e > za)
|
|
12728
12708
|
return null;
|
|
12729
12709
|
const s = 1e3, i = new Uint8Array([0, 2, 4, 0, 1, 0, 5, 4, 8, 10, 0, 8, 0, 2, 1, 0]), n = t + 1;
|
|
12730
12710
|
let r = new Uint8Array(n * (e + 1)), o, h, l;
|
|
@@ -12775,7 +12755,7 @@ function Of(a) {
|
|
|
12775
12755
|
m.save(), m.scale(1 / t, -1 / e), m.translate(0, -e), m.fill(p), m.beginPath(), m.restore();
|
|
12776
12756
|
};
|
|
12777
12757
|
}
|
|
12778
|
-
class
|
|
12758
|
+
class Ga {
|
|
12779
12759
|
constructor(t, e) {
|
|
12780
12760
|
this.alphaIsShape = !1, this.fontSize = 0, this.fontSizeScale = 1, this.textMatrix = yl, this.textMatrixScale = 1, this.fontMatrix = Rr, this.leading = 0, this.x = 0, this.y = 0, this.lineX = 0, this.lineY = 0, this.charSpacing = 0, this.wordSpacing = 0, this.textHScale = 1, this.textRenderingMode = Et.FILL, this.textRise = 0, this.fillColor = "#000000", this.strokeColor = "#000000", this.patternFill = !1, this.patternStroke = !1, this.fillAlpha = 1, this.strokeAlpha = 1, this.lineWidth = 1, this.activeSMask = null, this.transferMaps = "none", this.startNewPathAndClipBox([0, 0, t, e]);
|
|
12781
12761
|
}
|
|
@@ -12823,7 +12803,7 @@ class Va {
|
|
|
12823
12803
|
return G.intersect(this.clipBox, this.getPathBoundingBox(t, e));
|
|
12824
12804
|
}
|
|
12825
12805
|
}
|
|
12826
|
-
function
|
|
12806
|
+
function Va(a, t) {
|
|
12827
12807
|
if (t instanceof ImageData) {
|
|
12828
12808
|
a.putImageData(t, 0, 0);
|
|
12829
12809
|
return;
|
|
@@ -12862,7 +12842,7 @@ function Wa(a, t) {
|
|
|
12862
12842
|
else
|
|
12863
12843
|
throw new Error(`bad image kind: ${t.kind}`);
|
|
12864
12844
|
}
|
|
12865
|
-
function
|
|
12845
|
+
function Wa(a, t) {
|
|
12866
12846
|
if (t.bitmap) {
|
|
12867
12847
|
a.drawImage(t.bitmap, 0, 0);
|
|
12868
12848
|
return;
|
|
@@ -12874,7 +12854,7 @@ function Xa(a, t) {
|
|
|
12874
12854
|
const d = u < n ? Yt : i;
|
|
12875
12855
|
({
|
|
12876
12856
|
srcPos: h
|
|
12877
|
-
} =
|
|
12857
|
+
} = Af({
|
|
12878
12858
|
src: l,
|
|
12879
12859
|
srcPos: h,
|
|
12880
12860
|
dest: c,
|
|
@@ -12898,7 +12878,7 @@ function Zi(a) {
|
|
|
12898
12878
|
t !== "none" && t !== "" && (a.filter = "none");
|
|
12899
12879
|
}
|
|
12900
12880
|
}
|
|
12901
|
-
function
|
|
12881
|
+
function Xa(a, t) {
|
|
12902
12882
|
if (t)
|
|
12903
12883
|
return !0;
|
|
12904
12884
|
const e = G.singularValueDecompose2dScale(a);
|
|
@@ -12906,13 +12886,13 @@ function Ua(a, t) {
|
|
|
12906
12886
|
const s = Math.fround((globalThis.devicePixelRatio || 1) * Fs.PDF_TO_CSS_UNITS);
|
|
12907
12887
|
return e[0] <= s && e[1] <= s;
|
|
12908
12888
|
}
|
|
12909
|
-
const
|
|
12889
|
+
const Pf = ["butt", "round", "square"], Of = ["miter", "round", "bevel"], Df = {}, Ua = {};
|
|
12910
12890
|
class ks {
|
|
12911
12891
|
constructor(t, e, s, i, n, {
|
|
12912
12892
|
optionalContentConfig: r,
|
|
12913
12893
|
markedContentStack: o = null
|
|
12914
12894
|
}, h, l) {
|
|
12915
|
-
this.ctx = t, this.current = new
|
|
12895
|
+
this.ctx = t, this.current = new Ga(this.ctx.canvas.width, this.ctx.canvas.height), this.stateStack = [], this.pendingClip = null, this.pendingEOFill = !1, this.res = null, this.xobjs = null, this.commonObjs = e, this.objs = s, this.canvasFactory = i, this.filterFactory = n, this.groupStack = [], this.processingType3 = null, this.baseTransform = null, this.baseTransformStack = [], this.groupLevel = 0, this.smaskStack = [], this.smaskCounter = 0, this.tempSMask = null, this.suspendedCtx = null, this.contentVisible = !0, this.markedContentStack = o || [], this.optionalContentConfig = r, this.cachedCanvases = new kf(this.canvasFactory), this.cachedPatterns = /* @__PURE__ */ new Map(), this.annotationCanvasMap = h, this.viewportScale = 1, this.outputScaleX = 1, this.outputScaleY = 1, this.pageColors = l, this._cachedScaleForStroking = [-1, 0], this._cachedGetSinglePixelWidth = null, this._cachedBitmapsMap = /* @__PURE__ */ new Map();
|
|
12916
12896
|
}
|
|
12917
12897
|
getObject(t, e = null) {
|
|
12918
12898
|
return typeof t == "string" ? t.startsWith("g_") ? this.commonObjs.get(t) : this.objs.get(t) : e;
|
|
@@ -12936,7 +12916,7 @@ class ks {
|
|
|
12936
12916
|
const h = n.length;
|
|
12937
12917
|
if (h === o)
|
|
12938
12918
|
return o;
|
|
12939
|
-
const l = h - o >
|
|
12919
|
+
const l = h - o > Ha && typeof s == "function", c = l ? Date.now() + Tf : 0;
|
|
12940
12920
|
let u = 0;
|
|
12941
12921
|
const d = this.commonObjs, f = this.objs;
|
|
12942
12922
|
let g;
|
|
@@ -12953,7 +12933,7 @@ class ks {
|
|
|
12953
12933
|
}
|
|
12954
12934
|
if (o++, o === h)
|
|
12955
12935
|
return o;
|
|
12956
|
-
if (l && ++u >
|
|
12936
|
+
if (l && ++u > Ha) {
|
|
12957
12937
|
if (Date.now() > c)
|
|
12958
12938
|
return s(), o;
|
|
12959
12939
|
u = 0;
|
|
@@ -13016,11 +12996,11 @@ class ks {
|
|
|
13016
12996
|
}
|
|
13017
12997
|
c = P;
|
|
13018
12998
|
}
|
|
13019
|
-
c || (u = this.cachedCanvases.getCanvas("maskCanvas", s, i),
|
|
12999
|
+
c || (u = this.cachedCanvases.getCanvas("maskCanvas", s, i), Wa(u.context, t));
|
|
13020
13000
|
let d = G.transform(o, [1 / s, 0, 0, -1 / i, 0, 0]);
|
|
13021
13001
|
d = G.transform(d, [1, 0, 0, 1, 0, -i]);
|
|
13022
13002
|
const [f, g, p, b] = G.getAxialAlignedBoundingBox([0, 0, s, i], d), m = Math.round(p - f) || 1, v = Math.round(b - g) || 1, y = this.cachedCanvases.getCanvas("fillCanvas", m, v), _ = y.context, S = f, A = g;
|
|
13023
|
-
_.translate(-S, -A), _.transform(...d), c || (c = this._scaleImage(u.canvas, be(_)), c = c.img, h && r && h.set(l, c)), _.imageSmoothingEnabled =
|
|
13003
|
+
_.translate(-S, -A), _.transform(...d), c || (c = this._scaleImage(u.canvas, be(_)), c = c.img, h && r && h.set(l, c)), _.imageSmoothingEnabled = Xa(ut(_), t.interpolate), Ji(_, c, 0, 0, c.width, c.height, 0, 0, s, i), _.globalCompositeOperation = "source-in";
|
|
13024
13004
|
const T = G.transform(be(_), [1, 0, 0, 1, -S, -A]);
|
|
13025
13005
|
return _.fillStyle = r ? n.getPattern(e, this, T, Ot.FILL) : n, _.fillRect(0, 0, s, i), h && !r && (this.cachedCanvases.delete("fillCanvas"), h.set(l, y.canvas)), {
|
|
13026
13006
|
canvas: y.canvas,
|
|
@@ -13032,10 +13012,10 @@ class ks {
|
|
|
13032
13012
|
t !== this.current.lineWidth && (this._cachedScaleForStroking[0] = -1), this.current.lineWidth = t, this.ctx.lineWidth = t;
|
|
13033
13013
|
}
|
|
13034
13014
|
setLineCap(t) {
|
|
13035
|
-
this.ctx.lineCap =
|
|
13015
|
+
this.ctx.lineCap = Pf[t];
|
|
13036
13016
|
}
|
|
13037
13017
|
setLineJoin(t) {
|
|
13038
|
-
this.ctx.lineJoin =
|
|
13018
|
+
this.ctx.lineJoin = Of[t];
|
|
13039
13019
|
}
|
|
13040
13020
|
setMiterLimit(t) {
|
|
13041
13021
|
this.ctx.miterLimit = t;
|
|
@@ -13105,7 +13085,7 @@ class ks {
|
|
|
13105
13085
|
const t = this.ctx.canvas.width, e = this.ctx.canvas.height, s = "smaskGroupAt" + this.groupLevel, i = this.cachedCanvases.getCanvas(s, t, e);
|
|
13106
13086
|
this.suspendedCtx = this.ctx, this.ctx = i.context;
|
|
13107
13087
|
const n = this.ctx;
|
|
13108
|
-
n.setTransform(...ut(this.suspendedCtx)), $s(this.suspendedCtx, n),
|
|
13088
|
+
n.setTransform(...ut(this.suspendedCtx)), $s(this.suspendedCtx, n), Ef(n, this.suspendedCtx), this.setGState([["BM", "source-over"], ["ca", 1], ["CA", 1]]);
|
|
13109
13089
|
}
|
|
13110
13090
|
endSMaskMode() {
|
|
13111
13091
|
if (!this.inSMaskMode)
|
|
@@ -13219,10 +13199,10 @@ class ks {
|
|
|
13219
13199
|
this.consumePath();
|
|
13220
13200
|
}
|
|
13221
13201
|
clip() {
|
|
13222
|
-
this.pendingClip =
|
|
13202
|
+
this.pendingClip = Df;
|
|
13223
13203
|
}
|
|
13224
13204
|
eoClip() {
|
|
13225
|
-
this.pendingClip =
|
|
13205
|
+
this.pendingClip = Ua;
|
|
13226
13206
|
}
|
|
13227
13207
|
beginText() {
|
|
13228
13208
|
this.current.textMatrix = yl, this.current.textMatrixScale = 1, this.current.x = this.current.lineX = 0, this.current.y = this.current.lineY = 0;
|
|
@@ -13267,7 +13247,7 @@ class ks {
|
|
|
13267
13247
|
s.black ? o = "900" : s.bold && (o = "bold");
|
|
13268
13248
|
const h = s.italic ? "italic" : "normal";
|
|
13269
13249
|
let l = e;
|
|
13270
|
-
e <
|
|
13250
|
+
e < ja ? l = ja : e > Ba && (l = Ba), this.current.fontSizeScale = e / l, this.ctx.font = `${h} ${o} ${l}px ${r}`;
|
|
13271
13251
|
}
|
|
13272
13252
|
setTextRenderingMode(t) {
|
|
13273
13253
|
this.current.textRenderingMode = t;
|
|
@@ -13460,7 +13440,7 @@ class ks {
|
|
|
13460
13440
|
}
|
|
13461
13441
|
_getPattern(t, e = null) {
|
|
13462
13442
|
let s;
|
|
13463
|
-
return this.cachedPatterns.has(t) ? s = this.cachedPatterns.get(t) : (s =
|
|
13443
|
+
return this.cachedPatterns.has(t) ? s = this.cachedPatterns.get(t) : (s = Cf(this.getObject(t)), this.cachedPatterns.set(t, s)), e && (s.matrix = e), s;
|
|
13464
13444
|
}
|
|
13465
13445
|
shadingFill(t) {
|
|
13466
13446
|
if (!this.contentVisible)
|
|
@@ -13555,7 +13535,7 @@ class ks {
|
|
|
13555
13535
|
} else
|
|
13556
13536
|
Zi(this.ctx), this.endPath(), this.ctx.rect(e[0], e[1], r, o), this.ctx.clip(), this.ctx.beginPath();
|
|
13557
13537
|
}
|
|
13558
|
-
this.current = new
|
|
13538
|
+
this.current = new Ga(this.ctx.canvas.width, this.ctx.canvas.height), this.transform(...s), this.transform(...i);
|
|
13559
13539
|
}
|
|
13560
13540
|
endAnnotation() {
|
|
13561
13541
|
this.annotationCanvas && (this.ctx.restore(), this.#e(), this.ctx = this.annotationCanvas.savedCtx, delete this.annotationCanvas.savedCtx, delete this.annotationCanvas);
|
|
@@ -13566,7 +13546,7 @@ class ks {
|
|
|
13566
13546
|
const e = t.count;
|
|
13567
13547
|
t = this.getObject(t.data, t), t.count = e;
|
|
13568
13548
|
const s = this.ctx, i = this.processingType3;
|
|
13569
|
-
if (i && (i.compiled === void 0 && (i.compiled =
|
|
13549
|
+
if (i && (i.compiled === void 0 && (i.compiled = Mf(t)), i.compiled)) {
|
|
13570
13550
|
i.compiled(s);
|
|
13571
13551
|
return;
|
|
13572
13552
|
}
|
|
@@ -13602,7 +13582,7 @@ class ks {
|
|
|
13602
13582
|
} = n, c = this.cachedCanvases.getCanvas("maskCanvas", o, h), u = c.context;
|
|
13603
13583
|
u.save();
|
|
13604
13584
|
const d = this.getObject(r, n);
|
|
13605
|
-
|
|
13585
|
+
Wa(u, d), u.globalCompositeOperation = "source-in", u.fillStyle = i ? s.getPattern(u, this, be(e), Ot.FILL) : s, u.fillRect(0, 0, o, h), u.restore(), e.save(), e.transform(...l), e.scale(1, -1), Ji(e, c.canvas, 0, 0, o, h, 0, -1, 1, 1), e.restore();
|
|
13606
13586
|
}
|
|
13607
13587
|
this.compose();
|
|
13608
13588
|
}
|
|
@@ -13666,10 +13646,10 @@ class ks {
|
|
|
13666
13646
|
n = t;
|
|
13667
13647
|
else {
|
|
13668
13648
|
const h = this.cachedCanvases.getCanvas("inlineImage", e, s).context;
|
|
13669
|
-
|
|
13649
|
+
Va(h, t), n = this.applyTransferMapsToCanvas(h);
|
|
13670
13650
|
}
|
|
13671
13651
|
const r = this._scaleImage(n, be(i));
|
|
13672
|
-
i.imageSmoothingEnabled =
|
|
13652
|
+
i.imageSmoothingEnabled = Xa(ut(i), t.interpolate), Ji(i, r.img, 0, 0, r.paintWidth, r.paintHeight, 0, -s, e, s), this.compose(), this.restore();
|
|
13673
13653
|
}
|
|
13674
13654
|
paintInlineImageXObjectGroup(t, e) {
|
|
13675
13655
|
if (!this.contentVisible)
|
|
@@ -13680,7 +13660,7 @@ class ks {
|
|
|
13680
13660
|
i = t.bitmap;
|
|
13681
13661
|
else {
|
|
13682
13662
|
const n = t.width, r = t.height, h = this.cachedCanvases.getCanvas("inlineImage", n, r).context;
|
|
13683
|
-
|
|
13663
|
+
Va(h, t), i = this.applyTransferMapsToCanvas(h);
|
|
13684
13664
|
}
|
|
13685
13665
|
for (const n of e)
|
|
13686
13666
|
s.save(), s.transform(...n.transform), s.scale(1, -1), Ji(s, i, n.x, n.y, n.w, n.h, 0, -1, 1, 1), s.restore();
|
|
@@ -13716,7 +13696,7 @@ class ks {
|
|
|
13716
13696
|
const e = this.current.isEmptyClip();
|
|
13717
13697
|
this.pendingClip && this.current.updateClipFromPath(), this.pendingClip || this.compose(t);
|
|
13718
13698
|
const s = this.ctx;
|
|
13719
|
-
this.pendingClip && (e || (this.pendingClip ===
|
|
13699
|
+
this.pendingClip && (e || (this.pendingClip === Ua ? s.clip("evenodd") : s.clip()), this.pendingClip = null), this.current.startNewPathAndClipBox(this.current.clipBox), s.beginPath();
|
|
13720
13700
|
}
|
|
13721
13701
|
getSinglePixelWidth() {
|
|
13722
13702
|
if (!this._cachedGetSinglePixelWidth) {
|
|
@@ -13815,7 +13795,7 @@ class li {
|
|
|
13815
13795
|
this.#e = t;
|
|
13816
13796
|
}
|
|
13817
13797
|
}
|
|
13818
|
-
class
|
|
13798
|
+
class Rf {
|
|
13819
13799
|
#t;
|
|
13820
13800
|
#e;
|
|
13821
13801
|
constructor({
|
|
@@ -13838,7 +13818,7 @@ class Ff {
|
|
|
13838
13818
|
}
|
|
13839
13819
|
}
|
|
13840
13820
|
const _s = Symbol("INTERNAL");
|
|
13841
|
-
class
|
|
13821
|
+
class Lf {
|
|
13842
13822
|
#t = !1;
|
|
13843
13823
|
#e = !1;
|
|
13844
13824
|
#s = !1;
|
|
@@ -13866,7 +13846,7 @@ class If {
|
|
|
13866
13846
|
t !== _s && rt("Internal method `_setVisible` called."), this.#s = s, this.#i = e;
|
|
13867
13847
|
}
|
|
13868
13848
|
}
|
|
13869
|
-
class
|
|
13849
|
+
class Ff {
|
|
13870
13850
|
#t = null;
|
|
13871
13851
|
#e = /* @__PURE__ */ new Map();
|
|
13872
13852
|
#s = null;
|
|
@@ -13875,7 +13855,7 @@ class Nf {
|
|
|
13875
13855
|
if (this.renderingIntent = e, this.name = null, this.creator = null, t !== null) {
|
|
13876
13856
|
this.name = t.name, this.creator = t.creator, this.#i = t.order;
|
|
13877
13857
|
for (const s of t.groups)
|
|
13878
|
-
this.#e.set(s.id, new
|
|
13858
|
+
this.#e.set(s.id, new Lf(e, s));
|
|
13879
13859
|
if (t.baseState === "OFF")
|
|
13880
13860
|
for (const s of this.#e.values())
|
|
13881
13861
|
s._setVisible(_s, !1);
|
|
@@ -14026,7 +14006,7 @@ class Nf {
|
|
|
14026
14006
|
return this.#t = t.hexdigest();
|
|
14027
14007
|
}
|
|
14028
14008
|
}
|
|
14029
|
-
class
|
|
14009
|
+
class If {
|
|
14030
14010
|
constructor(t, {
|
|
14031
14011
|
disableRange: e = !1,
|
|
14032
14012
|
disableStream: s = !1
|
|
@@ -14095,12 +14075,12 @@ class jf {
|
|
|
14095
14075
|
getFullReader() {
|
|
14096
14076
|
_t(!this._fullRequestReader, "PDFDataTransportStream.getFullReader can only be called once.");
|
|
14097
14077
|
const t = this._queuedChunks;
|
|
14098
|
-
return this._queuedChunks = null, new
|
|
14078
|
+
return this._queuedChunks = null, new Nf(this, t, this._progressiveDone, this._contentDispositionFilename);
|
|
14099
14079
|
}
|
|
14100
14080
|
getRangeReader(t, e) {
|
|
14101
14081
|
if (e <= this._progressiveDataLength)
|
|
14102
14082
|
return null;
|
|
14103
|
-
const s = new
|
|
14083
|
+
const s = new jf(this, t, e);
|
|
14104
14084
|
return this._pdfDataRangeTransport.requestDataRange(t, e), this._rangeReaders.push(s), s;
|
|
14105
14085
|
}
|
|
14106
14086
|
cancelAllRequests(t) {
|
|
@@ -14110,7 +14090,7 @@ class jf {
|
|
|
14110
14090
|
this._pdfDataRangeTransport.abort();
|
|
14111
14091
|
}
|
|
14112
14092
|
}
|
|
14113
|
-
class
|
|
14093
|
+
class Nf {
|
|
14114
14094
|
constructor(t, e, s = !1, i = null) {
|
|
14115
14095
|
this._stream = t, this._done = s || !1, this._filename = mo(i) ? i : null, this._queuedChunks = e || [], this._loaded = 0;
|
|
14116
14096
|
for (const n of this._queuedChunks)
|
|
@@ -14165,7 +14145,7 @@ class Bf {
|
|
|
14165
14145
|
this._done || (this._done = !0);
|
|
14166
14146
|
}
|
|
14167
14147
|
}
|
|
14168
|
-
class
|
|
14148
|
+
class jf {
|
|
14169
14149
|
constructor(t, e, s) {
|
|
14170
14150
|
this._stream = t, this._begin = e, this._end = s, this._queuedChunk = null, this._requests = [], this._done = !1, this.onProgress = null;
|
|
14171
14151
|
}
|
|
@@ -14217,7 +14197,7 @@ class Hf {
|
|
|
14217
14197
|
this._requests.length = 0, this._stream._removeRangeReader(this);
|
|
14218
14198
|
}
|
|
14219
14199
|
}
|
|
14220
|
-
function
|
|
14200
|
+
function Bf(a) {
|
|
14221
14201
|
let t = !0, e = s("filename\\*", "i").exec(a);
|
|
14222
14202
|
if (e) {
|
|
14223
14203
|
e = e[1];
|
|
@@ -14338,7 +14318,7 @@ function Dl({
|
|
|
14338
14318
|
function Rl(a) {
|
|
14339
14319
|
const t = a.get("Content-Disposition");
|
|
14340
14320
|
if (t) {
|
|
14341
|
-
let e =
|
|
14321
|
+
let e = Bf(t);
|
|
14342
14322
|
if (e.includes("%"))
|
|
14343
14323
|
try {
|
|
14344
14324
|
e = decodeURIComponent(e);
|
|
@@ -14368,7 +14348,7 @@ function Fl(a, t, e) {
|
|
|
14368
14348
|
function Il(a) {
|
|
14369
14349
|
return a instanceof Uint8Array ? a.buffer : a instanceof ArrayBuffer ? a : (K(`getArrayBuffer - unexpected data format: ${a}`), new Uint8Array(a).buffer);
|
|
14370
14350
|
}
|
|
14371
|
-
class
|
|
14351
|
+
class Ya {
|
|
14372
14352
|
_responseOrigin = null;
|
|
14373
14353
|
constructor(t) {
|
|
14374
14354
|
this.source = t, this.isHttp = /^https?:/i.test(t.url), this.headers = Ol(this.isHttp, t.httpHeaders), this._fullRequestReader = null, this._rangeRequestReaders = [];
|
|
@@ -14377,12 +14357,12 @@ class $a {
|
|
|
14377
14357
|
return this._fullRequestReader?._loaded ?? 0;
|
|
14378
14358
|
}
|
|
14379
14359
|
getFullReader() {
|
|
14380
|
-
return _t(!this._fullRequestReader, "PDFFetchStream.getFullReader can only be called once."), this._fullRequestReader = new
|
|
14360
|
+
return _t(!this._fullRequestReader, "PDFFetchStream.getFullReader can only be called once."), this._fullRequestReader = new Hf(this), this._fullRequestReader;
|
|
14381
14361
|
}
|
|
14382
14362
|
getRangeReader(t, e) {
|
|
14383
14363
|
if (e <= this._progressiveDataLength)
|
|
14384
14364
|
return null;
|
|
14385
|
-
const s = new
|
|
14365
|
+
const s = new zf(this, t, e);
|
|
14386
14366
|
return this._rangeRequestReaders.push(s), s;
|
|
14387
14367
|
}
|
|
14388
14368
|
cancelAllRequests(t) {
|
|
@@ -14391,7 +14371,7 @@ class $a {
|
|
|
14391
14371
|
e.cancel(t);
|
|
14392
14372
|
}
|
|
14393
14373
|
}
|
|
14394
|
-
class
|
|
14374
|
+
class Hf {
|
|
14395
14375
|
constructor(t) {
|
|
14396
14376
|
this._stream = t, this._reader = null, this._loaded = 0, this._filename = null;
|
|
14397
14377
|
const e = t.source;
|
|
@@ -14449,7 +14429,7 @@ class Gf {
|
|
|
14449
14429
|
this._reader?.cancel(t), this._abortController.abort();
|
|
14450
14430
|
}
|
|
14451
14431
|
}
|
|
14452
|
-
class
|
|
14432
|
+
class zf {
|
|
14453
14433
|
constructor(t, e, s) {
|
|
14454
14434
|
this._stream = t, this._reader = null, this._loaded = 0;
|
|
14455
14435
|
const i = t.source;
|
|
@@ -14490,11 +14470,11 @@ class Vf {
|
|
|
14490
14470
|
}
|
|
14491
14471
|
}
|
|
14492
14472
|
const br = 200, vr = 206;
|
|
14493
|
-
function
|
|
14473
|
+
function Gf(a) {
|
|
14494
14474
|
const t = a.response;
|
|
14495
14475
|
return typeof t != "string" ? t : Gn(t).buffer;
|
|
14496
14476
|
}
|
|
14497
|
-
class
|
|
14477
|
+
class Vf {
|
|
14498
14478
|
_responseOrigin = null;
|
|
14499
14479
|
constructor({
|
|
14500
14480
|
url: t,
|
|
@@ -14534,7 +14514,7 @@ class Xf {
|
|
|
14534
14514
|
s.onError(i.status);
|
|
14535
14515
|
return;
|
|
14536
14516
|
}
|
|
14537
|
-
const o =
|
|
14517
|
+
const o = Gf(i);
|
|
14538
14518
|
if (n === vr) {
|
|
14539
14519
|
const h = i.getResponseHeader("Content-Range"), l = /bytes (\d+)-(\d+)\/(\d+)/.exec(h);
|
|
14540
14520
|
l ? s.onDone({
|
|
@@ -14557,19 +14537,19 @@ class Xf {
|
|
|
14557
14537
|
delete this.pendingRequests[t], e.abort();
|
|
14558
14538
|
}
|
|
14559
14539
|
}
|
|
14560
|
-
class
|
|
14540
|
+
class Wf {
|
|
14561
14541
|
constructor(t) {
|
|
14562
|
-
this._source = t, this._manager = new
|
|
14542
|
+
this._source = t, this._manager = new Vf(t), this._rangeChunkSize = t.rangeChunkSize, this._fullRequestReader = null, this._rangeRequestReaders = [];
|
|
14563
14543
|
}
|
|
14564
14544
|
_onRangeRequestReaderClosed(t) {
|
|
14565
14545
|
const e = this._rangeRequestReaders.indexOf(t);
|
|
14566
14546
|
e >= 0 && this._rangeRequestReaders.splice(e, 1);
|
|
14567
14547
|
}
|
|
14568
14548
|
getFullReader() {
|
|
14569
|
-
return _t(!this._fullRequestReader, "PDFNetworkStream.getFullReader can only be called once."), this._fullRequestReader = new
|
|
14549
|
+
return _t(!this._fullRequestReader, "PDFNetworkStream.getFullReader can only be called once."), this._fullRequestReader = new Xf(this._manager, this._source), this._fullRequestReader;
|
|
14570
14550
|
}
|
|
14571
14551
|
getRangeReader(t, e) {
|
|
14572
|
-
const s = new
|
|
14552
|
+
const s = new Uf(this._manager, t, e);
|
|
14573
14553
|
return s.onClosed = this._onRangeRequestReaderClosed.bind(this), this._rangeRequestReaders.push(s), s;
|
|
14574
14554
|
}
|
|
14575
14555
|
cancelAllRequests(t) {
|
|
@@ -14578,7 +14558,7 @@ class Uf {
|
|
|
14578
14558
|
e.cancel(t);
|
|
14579
14559
|
}
|
|
14580
14560
|
}
|
|
14581
|
-
class
|
|
14561
|
+
class Xf {
|
|
14582
14562
|
constructor(t, e) {
|
|
14583
14563
|
this._manager = t, this._url = e.url, this._fullRequestId = t.request({
|
|
14584
14564
|
onHeadersReceived: this._onHeadersReceived.bind(this),
|
|
@@ -14670,7 +14650,7 @@ class Yf {
|
|
|
14670
14650
|
this._requests.length = 0, this._manager.isPendingRequest(this._fullRequestId) && this._manager.abortRequest(this._fullRequestId), this._fullRequestReader = null;
|
|
14671
14651
|
}
|
|
14672
14652
|
}
|
|
14673
|
-
class
|
|
14653
|
+
class Uf {
|
|
14674
14654
|
constructor(t, e, s) {
|
|
14675
14655
|
this._manager = t, this._url = t.url, this._requestId = t.request({
|
|
14676
14656
|
begin: e,
|
|
@@ -14743,27 +14723,27 @@ class $f {
|
|
|
14743
14723
|
this._requests.length = 0, this._manager.isPendingRequest(this._requestId) && this._manager.abortRequest(this._requestId), this._close();
|
|
14744
14724
|
}
|
|
14745
14725
|
}
|
|
14746
|
-
const
|
|
14747
|
-
function
|
|
14748
|
-
if (
|
|
14726
|
+
const Yf = /^[a-z][a-z0-9\-+.]+:/i;
|
|
14727
|
+
function $f(a) {
|
|
14728
|
+
if (Yf.test(a))
|
|
14749
14729
|
return new URL(a);
|
|
14750
14730
|
const t = process.getBuiltinModule("url");
|
|
14751
14731
|
return new URL(t.pathToFileURL(a));
|
|
14752
14732
|
}
|
|
14753
|
-
class
|
|
14733
|
+
class qf {
|
|
14754
14734
|
constructor(t) {
|
|
14755
|
-
this.source = t, this.url =
|
|
14735
|
+
this.source = t, this.url = $f(t.url), _t(this.url.protocol === "file:", "PDFNodeStream only supports file:// URLs."), this._fullRequestReader = null, this._rangeRequestReaders = [];
|
|
14756
14736
|
}
|
|
14757
14737
|
get _progressiveDataLength() {
|
|
14758
14738
|
return this._fullRequestReader?._loaded ?? 0;
|
|
14759
14739
|
}
|
|
14760
14740
|
getFullReader() {
|
|
14761
|
-
return _t(!this._fullRequestReader, "PDFNodeStream.getFullReader can only be called once."), this._fullRequestReader = new
|
|
14741
|
+
return _t(!this._fullRequestReader, "PDFNodeStream.getFullReader can only be called once."), this._fullRequestReader = new Kf(this), this._fullRequestReader;
|
|
14762
14742
|
}
|
|
14763
14743
|
getRangeReader(t, e) {
|
|
14764
14744
|
if (e <= this._progressiveDataLength)
|
|
14765
14745
|
return null;
|
|
14766
|
-
const s = new
|
|
14746
|
+
const s = new Jf(this, t, e);
|
|
14767
14747
|
return this._rangeRequestReaders.push(s), s;
|
|
14768
14748
|
}
|
|
14769
14749
|
cancelAllRequests(t) {
|
|
@@ -14772,7 +14752,7 @@ class Jf {
|
|
|
14772
14752
|
e.cancel(t);
|
|
14773
14753
|
}
|
|
14774
14754
|
}
|
|
14775
|
-
class
|
|
14755
|
+
class Kf {
|
|
14776
14756
|
constructor(t) {
|
|
14777
14757
|
this._url = t.url, this._done = !1, this._storedError = null, this.onProgress = null;
|
|
14778
14758
|
const e = t.source;
|
|
@@ -14836,7 +14816,7 @@ class Zf {
|
|
|
14836
14816
|
}), !this._isStreamingSupported && this._isRangeSupported && this._error(new Ue("streaming is disabled")), this._storedError && this._readableStream.destroy(this._storedError);
|
|
14837
14817
|
}
|
|
14838
14818
|
}
|
|
14839
|
-
class
|
|
14819
|
+
class Jf {
|
|
14840
14820
|
constructor(t, e, s) {
|
|
14841
14821
|
this._url = t.url, this._done = !1, this._storedError = null, this.onProgress = null, this._loaded = 0, this._readableStream = null, this._readCapability = Promise.withResolvers();
|
|
14842
14822
|
const i = t.source;
|
|
@@ -14886,7 +14866,7 @@ class Qf {
|
|
|
14886
14866
|
}), this._storedError && this._readableStream.destroy(this._storedError);
|
|
14887
14867
|
}
|
|
14888
14868
|
}
|
|
14889
|
-
const
|
|
14869
|
+
const Zf = 1e5, Xt = 30, Qf = 0.8;
|
|
14890
14870
|
class Ft {
|
|
14891
14871
|
#t = Promise.withResolvers();
|
|
14892
14872
|
#e = null;
|
|
@@ -14999,7 +14979,7 @@ class Ft {
|
|
|
14999
14979
|
this.#n.ctx ??= Ft.#k(this.#r);
|
|
15000
14980
|
const e = this.#m, s = this.#o;
|
|
15001
14981
|
for (const i of t) {
|
|
15002
|
-
if (e.length >
|
|
14982
|
+
if (e.length > Zf) {
|
|
15003
14983
|
K("Ignoring additional textDivs for performance reasons."), this.#s = !0;
|
|
15004
14984
|
return;
|
|
15005
14985
|
}
|
|
@@ -15130,7 +15110,7 @@ class Ft {
|
|
|
15130
15110
|
break;
|
|
15131
15111
|
}
|
|
15132
15112
|
i.canvas.width = i.canvas.height = 0;
|
|
15133
|
-
const l = r ? r / (r + o) :
|
|
15113
|
+
const l = r ? r / (r + o) : Qf;
|
|
15134
15114
|
return this.#_.set(t, l), l;
|
|
15135
15115
|
}
|
|
15136
15116
|
}
|
|
@@ -15162,8 +15142,8 @@ class pi {
|
|
|
15162
15142
|
return !(t === "textarea" || t === "input" || t === "option" || t === "select");
|
|
15163
15143
|
}
|
|
15164
15144
|
}
|
|
15165
|
-
const
|
|
15166
|
-
function
|
|
15145
|
+
const tg = 65536, eg = 100, sg = 5e3, ig = Dt ? bf : gf, ng = Dt ? vf : Tl, rg = Dt ? mf : pf, og = Dt ? yf : Ml;
|
|
15146
|
+
function ag(a = {}) {
|
|
15167
15147
|
typeof a == "string" || a instanceof URL ? a = {
|
|
15168
15148
|
url: a
|
|
15169
15149
|
} : (a instanceof ArrayBuffer || ArrayBuffer.isView(a)) && (a = {
|
|
@@ -15171,10 +15151,10 @@ function lg(a = {}) {
|
|
|
15171
15151
|
});
|
|
15172
15152
|
const t = new So(), {
|
|
15173
15153
|
docId: e
|
|
15174
|
-
} = t, s = a.url ?
|
|
15154
|
+
} = t, s = a.url ? hg(a.url) : null, i = a.data ? lg(a.data) : null, n = a.httpHeaders || null, r = a.withCredentials === !0, o = a.password ?? null, h = a.range instanceof Nl ? a.range : null, l = Number.isInteger(a.rangeChunkSize) && a.rangeChunkSize > 0 ? a.rangeChunkSize : tg;
|
|
15175
15155
|
let c = a.worker instanceof Ms ? a.worker : null;
|
|
15176
|
-
const u = a.verbosity, d = typeof a.docBaseUrl == "string" && !Wn(a.docBaseUrl) ? a.docBaseUrl : null, f = typeof a.cMapUrl == "string" ? a.cMapUrl : null, g = a.cMapPacked !== !1, p = a.CMapReaderFactory ||
|
|
15177
|
-
|
|
15156
|
+
const u = a.verbosity, d = typeof a.docBaseUrl == "string" && !Wn(a.docBaseUrl) ? a.docBaseUrl : null, f = typeof a.cMapUrl == "string" ? a.cMapUrl : null, g = a.cMapPacked !== !1, p = a.CMapReaderFactory || ng, b = typeof a.standardFontDataUrl == "string" ? a.standardFontDataUrl : null, m = a.StandardFontDataFactory || og, v = a.stopAtErrors !== !0, y = Number.isInteger(a.maxImageSize) && a.maxImageSize > -1 ? a.maxImageSize : -1, _ = a.isEvalSupported !== !1, S = typeof a.isOffscreenCanvasSupported == "boolean" ? a.isOffscreenCanvasSupported : !Dt, A = typeof a.isImageDecoderSupported == "boolean" ? a.isImageDecoderSupported : !Dt && (zt.platform.isFirefox || !globalThis.chrome), T = Number.isInteger(a.canvasMaxAreaInBytes) ? a.canvasMaxAreaInBytes : -1, k = typeof a.disableFontFace == "boolean" ? a.disableFontFace : Dt, P = a.fontExtraProperties === !0, j = a.enableXfa === !0, F = a.ownerDocument || globalThis.document, I = a.disableRange === !0, O = a.disableStream === !0, D = a.disableAutoFetch === !0, z = a.pdfBug === !0, M = a.CanvasFactory || ig, R = a.FilterFactory || rg, W = a.enableHWA === !0, ot = h ? h.length : a.length ?? NaN, lt = typeof a.useSystemFonts == "boolean" ? a.useSystemFonts : !Dt && !k, E = typeof a.useWorkerFetch == "boolean" ? a.useWorkerFetch : p === Tl && m === Ml && f && b && ti(f, document.baseURI) && ti(b, document.baseURI), H = null;
|
|
15157
|
+
Xd(u);
|
|
15178
15158
|
const V = {
|
|
15179
15159
|
canvasFactory: new M({
|
|
15180
15160
|
ownerDocument: F,
|
|
@@ -15241,7 +15221,7 @@ function lg(a = {}) {
|
|
|
15241
15221
|
const st = c.messageHandler.sendWithPromise("GetDocRequest", J, i ? [i.buffer] : null);
|
|
15242
15222
|
let N;
|
|
15243
15223
|
if (h)
|
|
15244
|
-
N = new
|
|
15224
|
+
N = new If(h, {
|
|
15245
15225
|
disableRange: I,
|
|
15246
15226
|
disableStream: O
|
|
15247
15227
|
});
|
|
@@ -15253,11 +15233,11 @@ function lg(a = {}) {
|
|
|
15253
15233
|
if (ti(s)) {
|
|
15254
15234
|
if (typeof fetch > "u" || typeof Response > "u" || !("body" in Response.prototype))
|
|
15255
15235
|
throw new Error("getDocument - the Fetch API was disabled in Node.js, see `--no-experimental-fetch`.");
|
|
15256
|
-
at =
|
|
15236
|
+
at = Ya;
|
|
15257
15237
|
} else
|
|
15258
|
-
at =
|
|
15238
|
+
at = qf;
|
|
15259
15239
|
else
|
|
15260
|
-
at = ti(s) ?
|
|
15240
|
+
at = ti(s) ? Ya : Wf;
|
|
15261
15241
|
N = new at({
|
|
15262
15242
|
url: s,
|
|
15263
15243
|
length: ot,
|
|
@@ -15273,12 +15253,12 @@ function lg(a = {}) {
|
|
|
15273
15253
|
throw new Error("Loading aborted");
|
|
15274
15254
|
if (c.destroyed)
|
|
15275
15255
|
throw new Error("Worker was destroyed");
|
|
15276
|
-
const Tt = new ei(e, at, c.port), Wt = new
|
|
15256
|
+
const Tt = new ei(e, at, c.port), Wt = new fg(Tt, t, N, At, V);
|
|
15277
15257
|
t._transport = Wt, Tt.send("Ready", null);
|
|
15278
15258
|
});
|
|
15279
15259
|
}).catch(t._capability.reject), t;
|
|
15280
15260
|
}
|
|
15281
|
-
function
|
|
15261
|
+
function hg(a) {
|
|
15282
15262
|
if (a instanceof URL)
|
|
15283
15263
|
return a.href;
|
|
15284
15264
|
try {
|
|
@@ -15289,7 +15269,7 @@ function cg(a) {
|
|
|
15289
15269
|
}
|
|
15290
15270
|
throw new Error("Invalid PDF url data: either string or URL-object is expected in the url property.");
|
|
15291
15271
|
}
|
|
15292
|
-
function
|
|
15272
|
+
function lg(a) {
|
|
15293
15273
|
if (Dt && typeof Buffer < "u" && a instanceof Buffer)
|
|
15294
15274
|
throw new Error("Please provide binary data as `Uint8Array`, rather than `Buffer`.");
|
|
15295
15275
|
if (a instanceof Uint8Array && a.byteLength === a.buffer.byteLength)
|
|
@@ -15300,7 +15280,7 @@ function ug(a) {
|
|
|
15300
15280
|
return new Uint8Array(a);
|
|
15301
15281
|
throw new Error("Invalid PDF binary data: either TypedArray, string, or array-like object is expected in the data property.");
|
|
15302
15282
|
}
|
|
15303
|
-
function
|
|
15283
|
+
function $a(a) {
|
|
15304
15284
|
return typeof a == "object" && Number.isInteger(a?.num) && a.num >= 0 && Number.isInteger(a?.gen) && a.gen >= 0;
|
|
15305
15285
|
}
|
|
15306
15286
|
class So {
|
|
@@ -15368,7 +15348,7 @@ class Nl {
|
|
|
15368
15348
|
abort() {
|
|
15369
15349
|
}
|
|
15370
15350
|
}
|
|
15371
|
-
class
|
|
15351
|
+
class cg {
|
|
15372
15352
|
constructor(t, e) {
|
|
15373
15353
|
this._pdfInfo = t, this._transport = e;
|
|
15374
15354
|
}
|
|
@@ -15480,11 +15460,11 @@ class dg {
|
|
|
15480
15460
|
return this._transport.getCalculationOrderIds();
|
|
15481
15461
|
}
|
|
15482
15462
|
}
|
|
15483
|
-
class
|
|
15463
|
+
class ug {
|
|
15484
15464
|
#t = null;
|
|
15485
15465
|
#e = !1;
|
|
15486
15466
|
constructor(t, e, s, i = !1) {
|
|
15487
|
-
this._pageIndex = t, this._pageInfo = e, this._transport = s, this._stats = i ? new
|
|
15467
|
+
this._pageIndex = t, this._pageInfo = e, this._transport = s, this._stats = i ? new La() : null, this._pdfBug = i, this.commonObjs = s.commonObjs, this.objs = new jl(), this._maybeCleanupAfterRender = !1, this._intentStates = /* @__PURE__ */ new Map(), this.destroyed = !1;
|
|
15488
15468
|
}
|
|
15489
15469
|
get pageNumber() {
|
|
15490
15470
|
return this._pageIndex + 1;
|
|
@@ -15684,7 +15664,7 @@ class fg {
|
|
|
15684
15664
|
cleanup(t = !1) {
|
|
15685
15665
|
this.#e = !0;
|
|
15686
15666
|
const e = this.#s(!1);
|
|
15687
|
-
return t && e && (this._stats &&= new
|
|
15667
|
+
return t && e && (this._stats &&= new La()), e;
|
|
15688
15668
|
}
|
|
15689
15669
|
#s(t = !1) {
|
|
15690
15670
|
if (this.#i(), !this.#e || this.destroyed)
|
|
@@ -15692,7 +15672,7 @@ class fg {
|
|
|
15692
15672
|
if (t)
|
|
15693
15673
|
return this.#t = setTimeout(() => {
|
|
15694
15674
|
this.#t = null, this.#s(!1);
|
|
15695
|
-
},
|
|
15675
|
+
}, sg), !1;
|
|
15696
15676
|
for (const {
|
|
15697
15677
|
renderTasks: e,
|
|
15698
15678
|
operatorList: s
|
|
@@ -15772,7 +15752,7 @@ class fg {
|
|
|
15772
15752
|
if (t.renderTasks.size > 0)
|
|
15773
15753
|
return;
|
|
15774
15754
|
if (e instanceof po) {
|
|
15775
|
-
let i =
|
|
15755
|
+
let i = eg;
|
|
15776
15756
|
e.extraDelay > 0 && e.extraDelay < 1e3 && (i += e.extraDelay), t.streamReaderCancelTimeout = setTimeout(() => {
|
|
15777
15757
|
t.streamReaderCancelTimeout = null, this._abortOperatorList({
|
|
15778
15758
|
intentState: t,
|
|
@@ -15798,7 +15778,7 @@ class fg {
|
|
|
15798
15778
|
return this._stats;
|
|
15799
15779
|
}
|
|
15800
15780
|
}
|
|
15801
|
-
class
|
|
15781
|
+
class dg {
|
|
15802
15782
|
#t = /* @__PURE__ */ new Map();
|
|
15803
15783
|
#e = Promise.resolve();
|
|
15804
15784
|
postMessage(t, e) {
|
|
@@ -15841,7 +15821,7 @@ const ct = class ct {
|
|
|
15841
15821
|
constructor({
|
|
15842
15822
|
name: t = null,
|
|
15843
15823
|
port: e = null,
|
|
15844
|
-
verbosity: s =
|
|
15824
|
+
verbosity: s = Ud()
|
|
15845
15825
|
} = {}) {
|
|
15846
15826
|
bs(this, Ps);
|
|
15847
15827
|
if (this.name = t, this.destroyed = !1, this.verbosity = s, this._readyCapability = Promise.withResolvers(), this._port = null, this._webWorker = null, this._messageHandler = null, e) {
|
|
@@ -15918,7 +15898,7 @@ const ct = class ct {
|
|
|
15918
15898
|
this._readyCapability.reject(new Error("Worker was destroyed"));
|
|
15919
15899
|
return;
|
|
15920
15900
|
}
|
|
15921
|
-
const e = new
|
|
15901
|
+
const e = new dg();
|
|
15922
15902
|
this._port = e;
|
|
15923
15903
|
const s = `fake${Io(ct, An)._++}`, i = new ei(s + "_worker", s, e);
|
|
15924
15904
|
t.setup(i, e), this._messageHandler = new ei(s, s + "_worker", e), Ci(this, Ps, rn).call(this);
|
|
@@ -15979,14 +15959,14 @@ An = new WeakMap(), ns = new WeakMap(), rs = new WeakMap(), Ps = new WeakSet(),
|
|
|
15979
15959
|
}));
|
|
15980
15960
|
};
|
|
15981
15961
|
let Ms = ct;
|
|
15982
|
-
class
|
|
15962
|
+
class fg {
|
|
15983
15963
|
#t = /* @__PURE__ */ new Map();
|
|
15984
15964
|
#e = /* @__PURE__ */ new Map();
|
|
15985
15965
|
#s = /* @__PURE__ */ new Map();
|
|
15986
15966
|
#i = /* @__PURE__ */ new Map();
|
|
15987
15967
|
#r = null;
|
|
15988
15968
|
constructor(t, e, s, i, n) {
|
|
15989
|
-
this.messageHandler = t, this.loadingTask = e, this.commonObjs = new jl(), this.fontLoader = new
|
|
15969
|
+
this.messageHandler = t, this.loadingTask = e, this.commonObjs = new jl(), this.fontLoader = new df({
|
|
15990
15970
|
ownerDocument: i.ownerDocument,
|
|
15991
15971
|
styleElement: i.styleElement
|
|
15992
15972
|
}), this.loadingParams = i.loadingParams, this._params = i, this.canvasFactory = n.canvasFactory, this.filterFactory = n.filterFactory, this.cMapReaderFactory = n.cMapReaderFactory, this.standardFontDataFactory = n.standardFontDataFactory, this.destroyed = !1, this.destroyCapability = null, this._networkStream = s, this._fullReader = null, this._lastProgress = null, this.downloadInfoCapability = Promise.withResolvers(), this.setupMessageHandler();
|
|
@@ -16132,7 +16112,7 @@ class pg {
|
|
|
16132
16112
|
}), t.on("GetDoc", ({
|
|
16133
16113
|
pdfInfo: s
|
|
16134
16114
|
}) => {
|
|
16135
|
-
this._numPages = s.numPages, this._htmlForXfa = s.htmlForXfa, delete s.htmlForXfa, e._capability.resolve(new
|
|
16115
|
+
this._numPages = s.numPages, this._htmlForXfa = s.htmlForXfa, delete s.htmlForXfa, e._capability.resolve(new cg(s, this));
|
|
16136
16116
|
}), t.on("DocException", (s) => {
|
|
16137
16117
|
e._capability.reject(Ut(s));
|
|
16138
16118
|
}), t.on("PasswordRequest", (s) => {
|
|
@@ -16174,7 +16154,7 @@ class pg {
|
|
|
16174
16154
|
K(`Error during font loading: ${d}`), this.commonObjs.resolve(s, d);
|
|
16175
16155
|
break;
|
|
16176
16156
|
}
|
|
16177
|
-
const l = h && globalThis.FontInspector?.enabled ? (d, f) => globalThis.FontInspector.fontAdded(d, f) : null, c = new
|
|
16157
|
+
const l = h && globalThis.FontInspector?.enabled ? (d, f) => globalThis.FontInspector.fontAdded(d, f) : null, c = new ff(n, {
|
|
16178
16158
|
disableFontFace: r,
|
|
16179
16159
|
fontExtraProperties: o,
|
|
16180
16160
|
inspectFont: l
|
|
@@ -16215,7 +16195,7 @@ class pg {
|
|
|
16215
16195
|
}
|
|
16216
16196
|
switch (n) {
|
|
16217
16197
|
case "Image":
|
|
16218
|
-
o.objs.resolve(s, r), r?.dataLen >
|
|
16198
|
+
o.objs.resolve(s, r), r?.dataLen > zd && (o._maybeCleanupAfterRender = !0);
|
|
16219
16199
|
break;
|
|
16220
16200
|
case "Pattern":
|
|
16221
16201
|
o.objs.resolve(s, r);
|
|
@@ -16273,13 +16253,13 @@ class pg {
|
|
|
16273
16253
|
if (this.destroyed)
|
|
16274
16254
|
throw new Error("Transport destroyed");
|
|
16275
16255
|
n.refStr && this.#i.set(n.refStr, t);
|
|
16276
|
-
const r = new
|
|
16256
|
+
const r = new ug(e, n, this, this._params.pdfBug);
|
|
16277
16257
|
return this.#e.set(e, r), r;
|
|
16278
16258
|
});
|
|
16279
16259
|
return this.#s.set(e, i), i;
|
|
16280
16260
|
}
|
|
16281
16261
|
getPageIndex(t) {
|
|
16282
|
-
return
|
|
16262
|
+
return $a(t) ? this.messageHandler.sendWithPromise("GetPageIndex", {
|
|
16283
16263
|
num: t.num,
|
|
16284
16264
|
gen: t.gen
|
|
16285
16265
|
}) : Promise.reject(new Error("Invalid pageIndex request."));
|
|
@@ -16342,7 +16322,7 @@ class pg {
|
|
|
16342
16322
|
return this.messageHandler.sendWithPromise("GetOutline", null);
|
|
16343
16323
|
}
|
|
16344
16324
|
getOptionalContentConfig(t) {
|
|
16345
|
-
return this.#n("GetOptionalContentConfig").then((e) => new
|
|
16325
|
+
return this.#n("GetOptionalContentConfig").then((e) => new Ff(e, t));
|
|
16346
16326
|
}
|
|
16347
16327
|
getPermissions() {
|
|
16348
16328
|
return this.messageHandler.sendWithPromise("GetPermissions", null);
|
|
@@ -16353,7 +16333,7 @@ class pg {
|
|
|
16353
16333
|
return e;
|
|
16354
16334
|
const s = this.messageHandler.sendWithPromise(t, null).then((i) => ({
|
|
16355
16335
|
info: i[0],
|
|
16356
|
-
metadata: i[1] ? new
|
|
16336
|
+
metadata: i[1] ? new Rf(i[1]) : null,
|
|
16357
16337
|
contentDispositionFilename: this._fullReader?.filename ?? null,
|
|
16358
16338
|
contentLength: this._fullReader?.contentLength ?? null
|
|
16359
16339
|
}));
|
|
@@ -16372,7 +16352,7 @@ class pg {
|
|
|
16372
16352
|
}
|
|
16373
16353
|
}
|
|
16374
16354
|
cachedPageNumber(t) {
|
|
16375
|
-
if (
|
|
16355
|
+
if (!$a(t))
|
|
16376
16356
|
return null;
|
|
16377
16357
|
const e = t.gen === 0 ? `${t.num}R` : `${t.num}R${t.gen}`;
|
|
16378
16358
|
return this.#i.get(e) ?? null;
|
|
@@ -16427,7 +16407,7 @@ class jl {
|
|
|
16427
16407
|
}
|
|
16428
16408
|
}
|
|
16429
16409
|
}
|
|
16430
|
-
class
|
|
16410
|
+
class gg {
|
|
16431
16411
|
#t = null;
|
|
16432
16412
|
constructor(t) {
|
|
16433
16413
|
this.#t = t, this.onContinue = null;
|
|
@@ -16467,7 +16447,7 @@ class As {
|
|
|
16467
16447
|
pdfBug: u = !1,
|
|
16468
16448
|
pageColors: d = null
|
|
16469
16449
|
}) {
|
|
16470
|
-
this.callback = t, this.params = e, this.objs = s, this.commonObjs = i, this.annotationCanvasMap = n, this.operatorListIdx = null, this.operatorList = r, this._pageIndex = o, this.canvasFactory = h, this.filterFactory = l, this._pdfBug = u, this.pageColors = d, this.running = !1, this.graphicsReadyCallback = null, this.graphicsReady = !1, this._useRequestAnimationFrame = c === !0 && typeof window < "u", this.cancelled = !1, this.capability = Promise.withResolvers(), this.task = new
|
|
16450
|
+
this.callback = t, this.params = e, this.objs = s, this.commonObjs = i, this.annotationCanvasMap = n, this.operatorListIdx = null, this.operatorList = r, this._pageIndex = o, this.canvasFactory = h, this.filterFactory = l, this._pdfBug = u, this.pageColors = d, this.running = !1, this.graphicsReadyCallback = null, this.graphicsReady = !1, this._useRequestAnimationFrame = c === !0 && typeof window < "u", this.cancelled = !1, this.capability = Promise.withResolvers(), this.task = new gg(this), this._cancelBound = this.cancel.bind(this), this._continueBound = this._continue.bind(this), this._scheduleNextBound = this._scheduleNext.bind(this), this._nextBound = this._next.bind(this), this._canvas = e.canvasContext.canvas;
|
|
16471
16451
|
}
|
|
16472
16452
|
get completed() {
|
|
16473
16453
|
return this.capability.promise.catch(function() {
|
|
@@ -16522,14 +16502,14 @@ class As {
|
|
|
16522
16502
|
this.cancelled || (this.operatorListIdx = this.gfx.executeOperatorList(this.operatorList, this.operatorListIdx, this._continueBound, this.stepper), this.operatorListIdx === this.operatorList.argsArray.length && (this.running = !1, this.operatorList.lastChunk && (this.gfx.endDrawing(), As.#e.delete(this._canvas), this.callback())));
|
|
16523
16503
|
}
|
|
16524
16504
|
}
|
|
16525
|
-
const
|
|
16526
|
-
function
|
|
16505
|
+
const pg = "4.10.38", mg = "f9bea397f";
|
|
16506
|
+
function qa(a) {
|
|
16527
16507
|
return Math.floor(Math.max(0, Math.min(1, a)) * 255).toString(16).padStart(2, "0");
|
|
16528
16508
|
}
|
|
16529
16509
|
function Ks(a) {
|
|
16530
16510
|
return Math.max(0, Math.min(255, 255 * a));
|
|
16531
16511
|
}
|
|
16532
|
-
class
|
|
16512
|
+
class Ka {
|
|
16533
16513
|
static CMYK_G([t, e, s, i]) {
|
|
16534
16514
|
return ["G", 1 - Math.min(1, 0.3 * t + 0.59 * s + 0.11 * e + i)];
|
|
16535
16515
|
}
|
|
@@ -16543,7 +16523,7 @@ class Ja {
|
|
|
16543
16523
|
return t = Ks(t), [t, t, t];
|
|
16544
16524
|
}
|
|
16545
16525
|
static G_HTML([t]) {
|
|
16546
|
-
const e =
|
|
16526
|
+
const e = qa(t);
|
|
16547
16527
|
return `#${e}${e}${e}`;
|
|
16548
16528
|
}
|
|
16549
16529
|
static RGB_G([t, e, s]) {
|
|
@@ -16553,7 +16533,7 @@ class Ja {
|
|
|
16553
16533
|
return t.map(Ks);
|
|
16554
16534
|
}
|
|
16555
16535
|
static RGB_HTML(t) {
|
|
16556
|
-
return `#${t.map(
|
|
16536
|
+
return `#${t.map(qa).join("")}`;
|
|
16557
16537
|
}
|
|
16558
16538
|
static T_HTML() {
|
|
16559
16539
|
return "#00000000";
|
|
@@ -16576,7 +16556,7 @@ class Ja {
|
|
|
16576
16556
|
return ["CMYK", i, n, r, o];
|
|
16577
16557
|
}
|
|
16578
16558
|
}
|
|
16579
|
-
class
|
|
16559
|
+
class bg {
|
|
16580
16560
|
create(t, e, s = !1) {
|
|
16581
16561
|
if (t <= 0 || e <= 0)
|
|
16582
16562
|
throw new Error("Invalid SVG dimensions");
|
|
@@ -16592,7 +16572,7 @@ class yg {
|
|
|
16592
16572
|
rt("Abstract method `_createSVG` called.");
|
|
16593
16573
|
}
|
|
16594
16574
|
}
|
|
16595
|
-
class Co extends
|
|
16575
|
+
class Co extends bg {
|
|
16596
16576
|
_createSVG(t) {
|
|
16597
16577
|
return document.createElementNS(Me, t);
|
|
16598
16578
|
}
|
|
@@ -16746,30 +16726,30 @@ class Bl {
|
|
|
16746
16726
|
t.div.style.transform = e, t.div.hidden = !1;
|
|
16747
16727
|
}
|
|
16748
16728
|
}
|
|
16749
|
-
const Si = 1e3,
|
|
16729
|
+
const Si = 1e3, vg = 9, ds = /* @__PURE__ */ new WeakSet();
|
|
16750
16730
|
function Ve(a) {
|
|
16751
16731
|
return {
|
|
16752
16732
|
width: a[2] - a[0],
|
|
16753
16733
|
height: a[3] - a[1]
|
|
16754
16734
|
};
|
|
16755
16735
|
}
|
|
16756
|
-
class
|
|
16736
|
+
class yg {
|
|
16757
16737
|
static create(t) {
|
|
16758
16738
|
switch (t.data.annotationType) {
|
|
16759
16739
|
case xt.LINK:
|
|
16760
16740
|
return new Hl(t);
|
|
16761
16741
|
case xt.TEXT:
|
|
16762
|
-
return new
|
|
16742
|
+
return new _g(t);
|
|
16763
16743
|
case xt.WIDGET:
|
|
16764
16744
|
switch (t.data.fieldType) {
|
|
16765
16745
|
case "Tx":
|
|
16766
|
-
return new
|
|
16746
|
+
return new wg(t);
|
|
16767
16747
|
case "Btn":
|
|
16768
|
-
return t.data.radioButton ? new zl(t) : t.data.checkBox ? new
|
|
16748
|
+
return t.data.radioButton ? new zl(t) : t.data.checkBox ? new Sg(t) : new Cg(t);
|
|
16769
16749
|
case "Ch":
|
|
16770
|
-
return new
|
|
16750
|
+
return new Ag(t);
|
|
16771
16751
|
case "Sig":
|
|
16772
|
-
return new
|
|
16752
|
+
return new xg(t);
|
|
16773
16753
|
}
|
|
16774
16754
|
return new ms(t);
|
|
16775
16755
|
case xt.POPUP:
|
|
@@ -16777,31 +16757,31 @@ class wg {
|
|
|
16777
16757
|
case xt.FREETEXT:
|
|
16778
16758
|
return new Gl(t);
|
|
16779
16759
|
case xt.LINE:
|
|
16780
|
-
return new
|
|
16760
|
+
return new Eg(t);
|
|
16781
16761
|
case xt.SQUARE:
|
|
16782
|
-
return new
|
|
16762
|
+
return new kg(t);
|
|
16783
16763
|
case xt.CIRCLE:
|
|
16784
|
-
return new
|
|
16764
|
+
return new Mg(t);
|
|
16785
16765
|
case xt.POLYLINE:
|
|
16786
16766
|
return new Vl(t);
|
|
16787
16767
|
case xt.CARET:
|
|
16788
|
-
return new
|
|
16768
|
+
return new Og(t);
|
|
16789
16769
|
case xt.INK:
|
|
16790
16770
|
return new Ao(t);
|
|
16791
16771
|
case xt.POLYGON:
|
|
16792
|
-
return new
|
|
16772
|
+
return new Pg(t);
|
|
16793
16773
|
case xt.HIGHLIGHT:
|
|
16794
16774
|
return new Wl(t);
|
|
16795
16775
|
case xt.UNDERLINE:
|
|
16796
|
-
return new
|
|
16776
|
+
return new Dg(t);
|
|
16797
16777
|
case xt.SQUIGGLY:
|
|
16798
|
-
return new
|
|
16778
|
+
return new Rg(t);
|
|
16799
16779
|
case xt.STRIKEOUT:
|
|
16800
|
-
return new
|
|
16780
|
+
return new Lg(t);
|
|
16801
16781
|
case xt.STAMP:
|
|
16802
16782
|
return new Xl(t);
|
|
16803
16783
|
case xt.FILEATTACHMENT:
|
|
16804
|
-
return new
|
|
16784
|
+
return new Fg(t);
|
|
16805
16785
|
default:
|
|
16806
16786
|
return new bt(t);
|
|
16807
16787
|
}
|
|
@@ -16952,8 +16932,8 @@ class bt {
|
|
|
16952
16932
|
get _commonActions() {
|
|
16953
16933
|
const t = (e, s, i) => {
|
|
16954
16934
|
const n = i.detail[e], r = n[0], o = n.slice(1);
|
|
16955
|
-
i.target.style[s] =
|
|
16956
|
-
[s]:
|
|
16935
|
+
i.target.style[s] = Ka[`${r}_HTML`](o), this.annotationStorage.setValue(this.data.id, {
|
|
16936
|
+
[s]: Ka[`${r}_rgb`](o)
|
|
16957
16937
|
});
|
|
16958
16938
|
};
|
|
16959
16939
|
return Z(this, "_commonActions", {
|
|
@@ -17306,7 +17286,7 @@ class Hl extends bt {
|
|
|
17306
17286
|
};
|
|
17307
17287
|
}
|
|
17308
17288
|
}
|
|
17309
|
-
class
|
|
17289
|
+
class _g extends bt {
|
|
17310
17290
|
constructor(t) {
|
|
17311
17291
|
super(t, {
|
|
17312
17292
|
isRenderable: !0
|
|
@@ -17375,7 +17355,7 @@ class ms extends bt {
|
|
|
17375
17355
|
_setTextStyle(t) {
|
|
17376
17356
|
const e = ["left", "center", "right"], {
|
|
17377
17357
|
fontColor: s
|
|
17378
|
-
} = this.data.defaultAppearanceData, i = this.data.defaultAppearanceData.fontSize ||
|
|
17358
|
+
} = this.data.defaultAppearanceData, i = this.data.defaultAppearanceData.fontSize || vg, n = t.style;
|
|
17379
17359
|
let r;
|
|
17380
17360
|
const o = 2, h = (l) => Math.round(10 * l) / 10;
|
|
17381
17361
|
if (this.data.multiLine) {
|
|
@@ -17391,7 +17371,7 @@ class ms extends bt {
|
|
|
17391
17371
|
e ? t.setAttribute("required", !0) : t.removeAttribute("required"), t.setAttribute("aria-required", e);
|
|
17392
17372
|
}
|
|
17393
17373
|
}
|
|
17394
|
-
class
|
|
17374
|
+
class wg extends ms {
|
|
17395
17375
|
constructor(t) {
|
|
17396
17376
|
const e = t.renderForms || t.data.hasOwnCanvas || !t.data.hasAppearance && !!t.data.fieldValue;
|
|
17397
17377
|
super(t, {
|
|
@@ -17591,14 +17571,14 @@ class Sg extends ms {
|
|
|
17591
17571
|
return this._setTextStyle(s), this._setBackgroundColor(s), this._setDefaultPropertiesFromJS(s), this.container.append(s), this.container;
|
|
17592
17572
|
}
|
|
17593
17573
|
}
|
|
17594
|
-
class
|
|
17574
|
+
class xg extends ms {
|
|
17595
17575
|
constructor(t) {
|
|
17596
17576
|
super(t, {
|
|
17597
17577
|
isRenderable: !!t.data.hasOwnCanvas
|
|
17598
17578
|
});
|
|
17599
17579
|
}
|
|
17600
17580
|
}
|
|
17601
|
-
class
|
|
17581
|
+
class Sg extends ms {
|
|
17602
17582
|
constructor(t) {
|
|
17603
17583
|
super(t, {
|
|
17604
17584
|
isRenderable: t.renderForms
|
|
@@ -17697,7 +17677,7 @@ class zl extends ms {
|
|
|
17697
17677
|
return this._setBackgroundColor(n), this._setDefaultPropertiesFromJS(n), this.container.append(n), this.container;
|
|
17698
17678
|
}
|
|
17699
17679
|
}
|
|
17700
|
-
class
|
|
17680
|
+
class Cg extends Hl {
|
|
17701
17681
|
constructor(t) {
|
|
17702
17682
|
super(t, {
|
|
17703
17683
|
ignoreBorder: t.data.hasAppearance
|
|
@@ -17712,7 +17692,7 @@ class Tg extends Hl {
|
|
|
17712
17692
|
})), t;
|
|
17713
17693
|
}
|
|
17714
17694
|
}
|
|
17715
|
-
class
|
|
17695
|
+
class Ag extends ms {
|
|
17716
17696
|
constructor(t) {
|
|
17717
17697
|
super(t, {
|
|
17718
17698
|
isRenderable: t.renderForms
|
|
@@ -17863,7 +17843,7 @@ class jr extends bt {
|
|
|
17863
17843
|
}
|
|
17864
17844
|
render() {
|
|
17865
17845
|
this.container.classList.add("popupAnnotation");
|
|
17866
|
-
const t = this.popup = new
|
|
17846
|
+
const t = this.popup = new Tg({
|
|
17867
17847
|
container: this.container,
|
|
17868
17848
|
color: this.data.color,
|
|
17869
17849
|
titleObj: this.data.titleObj,
|
|
@@ -17881,7 +17861,7 @@ class jr extends bt {
|
|
|
17881
17861
|
return this.container.setAttribute("aria-controls", e.map((s) => `${go}${s}`).join(",")), this.container;
|
|
17882
17862
|
}
|
|
17883
17863
|
}
|
|
17884
|
-
class
|
|
17864
|
+
class Tg {
|
|
17885
17865
|
#t = this.#E.bind(this);
|
|
17886
17866
|
#e = this.#T.bind(this);
|
|
17887
17867
|
#s = this.#k.bind(this);
|
|
@@ -18091,7 +18071,7 @@ class Gl extends bt {
|
|
|
18091
18071
|
return !this.data.popupRef && this.hasPopupData && this._createPopup(), this._editOnDoubleClick(), this.container;
|
|
18092
18072
|
}
|
|
18093
18073
|
}
|
|
18094
|
-
class
|
|
18074
|
+
class Eg extends bt {
|
|
18095
18075
|
#t = null;
|
|
18096
18076
|
constructor(t) {
|
|
18097
18077
|
super(t, {
|
|
@@ -18114,7 +18094,7 @@ class Mg extends bt {
|
|
|
18114
18094
|
this.container.classList.add("highlightArea");
|
|
18115
18095
|
}
|
|
18116
18096
|
}
|
|
18117
|
-
class
|
|
18097
|
+
class kg extends bt {
|
|
18118
18098
|
#t = null;
|
|
18119
18099
|
constructor(t) {
|
|
18120
18100
|
super(t, {
|
|
@@ -18137,7 +18117,7 @@ class Pg extends bt {
|
|
|
18137
18117
|
this.container.classList.add("highlightArea");
|
|
18138
18118
|
}
|
|
18139
18119
|
}
|
|
18140
|
-
class
|
|
18120
|
+
class Mg extends bt {
|
|
18141
18121
|
#t = null;
|
|
18142
18122
|
constructor(t) {
|
|
18143
18123
|
super(t, {
|
|
@@ -18200,12 +18180,12 @@ class Vl extends bt {
|
|
|
18200
18180
|
this.container.classList.add("highlightArea");
|
|
18201
18181
|
}
|
|
18202
18182
|
}
|
|
18203
|
-
class
|
|
18183
|
+
class Pg extends Vl {
|
|
18204
18184
|
constructor(t) {
|
|
18205
18185
|
super(t), this.containerClassName = "polygonAnnotation", this.svgElementName = "svg:polygon";
|
|
18206
18186
|
}
|
|
18207
18187
|
}
|
|
18208
|
-
class
|
|
18188
|
+
class Og extends bt {
|
|
18209
18189
|
constructor(t) {
|
|
18210
18190
|
super(t, {
|
|
18211
18191
|
isRenderable: !0,
|
|
@@ -18313,7 +18293,7 @@ class Wl extends bt {
|
|
|
18313
18293
|
return !this.data.popupRef && this.hasPopupData && this._createPopup(), this.container.classList.add("highlightAnnotation"), this._editOnDoubleClick(), this.container;
|
|
18314
18294
|
}
|
|
18315
18295
|
}
|
|
18316
|
-
class
|
|
18296
|
+
class Dg extends bt {
|
|
18317
18297
|
constructor(t) {
|
|
18318
18298
|
super(t, {
|
|
18319
18299
|
isRenderable: !0,
|
|
@@ -18325,7 +18305,7 @@ class Lg extends bt {
|
|
|
18325
18305
|
return !this.data.popupRef && this.hasPopupData && this._createPopup(), this.container.classList.add("underlineAnnotation"), this.container;
|
|
18326
18306
|
}
|
|
18327
18307
|
}
|
|
18328
|
-
class
|
|
18308
|
+
class Rg extends bt {
|
|
18329
18309
|
constructor(t) {
|
|
18330
18310
|
super(t, {
|
|
18331
18311
|
isRenderable: !0,
|
|
@@ -18337,7 +18317,7 @@ class Fg extends bt {
|
|
|
18337
18317
|
return !this.data.popupRef && this.hasPopupData && this._createPopup(), this.container.classList.add("squigglyAnnotation"), this.container;
|
|
18338
18318
|
}
|
|
18339
18319
|
}
|
|
18340
|
-
class
|
|
18320
|
+
class Lg extends bt {
|
|
18341
18321
|
constructor(t) {
|
|
18342
18322
|
super(t, {
|
|
18343
18323
|
isRenderable: !0,
|
|
@@ -18360,7 +18340,7 @@ class Xl extends bt {
|
|
|
18360
18340
|
return this.container.classList.add("stampAnnotation"), this.container.setAttribute("role", "img"), !this.data.popupRef && this.hasPopupData && this._createPopup(), this._editOnDoubleClick(), this.container;
|
|
18361
18341
|
}
|
|
18362
18342
|
}
|
|
18363
|
-
class
|
|
18343
|
+
class Fg extends bt {
|
|
18364
18344
|
#t = null;
|
|
18365
18345
|
constructor(t) {
|
|
18366
18346
|
super(t, {
|
|
@@ -18399,7 +18379,7 @@ class Ng extends bt {
|
|
|
18399
18379
|
this.downloadManager?.openOrDownloadData(this.content, this.filename);
|
|
18400
18380
|
}
|
|
18401
18381
|
}
|
|
18402
|
-
class
|
|
18382
|
+
class Ig {
|
|
18403
18383
|
#t = null;
|
|
18404
18384
|
#e = null;
|
|
18405
18385
|
#s = /* @__PURE__ */ new Map();
|
|
@@ -18463,7 +18443,7 @@ class jg {
|
|
|
18463
18443
|
continue;
|
|
18464
18444
|
}
|
|
18465
18445
|
n.data = r;
|
|
18466
|
-
const h =
|
|
18446
|
+
const h = yg.create(n);
|
|
18467
18447
|
if (!h.isRenderable)
|
|
18468
18448
|
continue;
|
|
18469
18449
|
if (!o && r.popupRef) {
|
|
@@ -19267,7 +19247,7 @@ class Br {
|
|
|
19267
19247
|
}
|
|
19268
19248
|
n.push(d, f);
|
|
19269
19249
|
}
|
|
19270
|
-
return new
|
|
19250
|
+
return new Ng(i, this.#t, this.#e);
|
|
19271
19251
|
}
|
|
19272
19252
|
#n(t) {
|
|
19273
19253
|
const e = this.#i;
|
|
@@ -19329,7 +19309,7 @@ class Br {
|
|
|
19329
19309
|
return n;
|
|
19330
19310
|
}
|
|
19331
19311
|
}
|
|
19332
|
-
class
|
|
19312
|
+
class Ng extends B {
|
|
19333
19313
|
#t;
|
|
19334
19314
|
#e;
|
|
19335
19315
|
constructor(t, e, s) {
|
|
@@ -19367,10 +19347,10 @@ class Bg extends B {
|
|
|
19367
19347
|
}
|
|
19368
19348
|
class Hr extends is {
|
|
19369
19349
|
newFreeDrawOutline(t, e, s, i, n, r) {
|
|
19370
|
-
return new
|
|
19350
|
+
return new jg(t, e, s, i, n, r);
|
|
19371
19351
|
}
|
|
19372
19352
|
}
|
|
19373
|
-
class
|
|
19353
|
+
class jg extends Ul {
|
|
19374
19354
|
newOutliner(t, e, s, i, n, r = 0) {
|
|
19375
19355
|
return new Hr(t, e, s, i, n, r);
|
|
19376
19356
|
}
|
|
@@ -20157,7 +20137,7 @@ class gt extends U {
|
|
|
20157
20137
|
return !1;
|
|
20158
20138
|
}
|
|
20159
20139
|
}
|
|
20160
|
-
class
|
|
20140
|
+
class Bg {
|
|
20161
20141
|
#t = /* @__PURE__ */ Object.create(null);
|
|
20162
20142
|
updateProperty(t, e) {
|
|
20163
20143
|
this[t] = e, this.updateSVGProperty(t, e);
|
|
@@ -20597,7 +20577,7 @@ class X extends U {
|
|
|
20597
20577
|
return !1;
|
|
20598
20578
|
}
|
|
20599
20579
|
}
|
|
20600
|
-
class
|
|
20580
|
+
class Hg {
|
|
20601
20581
|
#t = new Float64Array(6);
|
|
20602
20582
|
#e;
|
|
20603
20583
|
#s;
|
|
@@ -21041,7 +21021,7 @@ class $n extends B {
|
|
|
21041
21021
|
};
|
|
21042
21022
|
}
|
|
21043
21023
|
}
|
|
21044
|
-
class To extends
|
|
21024
|
+
class To extends Bg {
|
|
21045
21025
|
#t;
|
|
21046
21026
|
constructor(t) {
|
|
21047
21027
|
super(), this.#t = t, super.updateProperties({
|
|
@@ -21086,7 +21066,7 @@ class Eo extends X {
|
|
|
21086
21066
|
return Z(this, "typesMap", /* @__PURE__ */ new Map([[Q.INK_THICKNESS, "stroke-width"], [Q.INK_COLOR, "stroke"], [Q.INK_OPACITY, "stroke-opacity"]]));
|
|
21087
21067
|
}
|
|
21088
21068
|
static createDrawerInstance(t, e, s, i, n) {
|
|
21089
|
-
return new
|
|
21069
|
+
return new Hg(t, e, s, i, n, this._defaultDrawingOptions["stroke-width"]);
|
|
21090
21070
|
}
|
|
21091
21071
|
static deserializeDraw(t, e, s, i, n, r) {
|
|
21092
21072
|
return $n.deserialize(t, e, s, i, n, r);
|
|
@@ -22216,7 +22196,7 @@ Y.ColorPicker;
|
|
|
22216
22196
|
Y.DOMSVGFactory;
|
|
22217
22197
|
Y.DrawLayer;
|
|
22218
22198
|
Y.FeatureTest;
|
|
22219
|
-
var
|
|
22199
|
+
var zg = Y.GlobalWorkerOptions;
|
|
22220
22200
|
Y.ImageKind;
|
|
22221
22201
|
Y.InvalidPDFException;
|
|
22222
22202
|
Y.MissingPDFException;
|
|
@@ -22238,7 +22218,7 @@ Y.XfaLayer;
|
|
|
22238
22218
|
Y.build;
|
|
22239
22219
|
Y.createValidAbsoluteUrl;
|
|
22240
22220
|
Y.fetchData;
|
|
22241
|
-
var
|
|
22221
|
+
var Gg = Y.getDocument;
|
|
22242
22222
|
Y.getFilenameFromUrl;
|
|
22243
22223
|
Y.getPdfFilenameFromUrl;
|
|
22244
22224
|
Y.getXfaPageViewport;
|
|
@@ -22249,30 +22229,87 @@ Y.normalizeUnicode;
|
|
|
22249
22229
|
Y.setLayerDimensions;
|
|
22250
22230
|
Y.shadow;
|
|
22251
22231
|
Y.stopEvent;
|
|
22252
|
-
Y.version;
|
|
22253
|
-
|
|
22254
|
-
|
|
22232
|
+
var Vg = Y.version;
|
|
22233
|
+
function Wg(a) {
|
|
22234
|
+
return new Worker(
|
|
22235
|
+
"" + new URL("assets/pdfjs.worker-DawqtvLM.js", import.meta.url).href,
|
|
22236
|
+
{
|
|
22237
|
+
name: a?.name
|
|
22238
|
+
}
|
|
22239
|
+
);
|
|
22240
|
+
}
|
|
22241
|
+
let Ja = null;
|
|
22242
|
+
function Xg() {
|
|
22243
|
+
const a = document.createElement("div");
|
|
22244
|
+
a.style.width = "1in", document.body.append(a);
|
|
22245
|
+
const t = a.offsetWidth;
|
|
22246
|
+
return a.remove(), t;
|
|
22247
|
+
}
|
|
22248
|
+
function Ug() {
|
|
22249
|
+
const a = Ja ?? Xg();
|
|
22250
|
+
return Ja = a, a / 72;
|
|
22251
|
+
}
|
|
22252
|
+
function Yg(a, t = 500) {
|
|
22253
|
+
if (typeof a != "function") throw new TypeError("The first argument is not a function.");
|
|
22254
|
+
let e = null;
|
|
22255
|
+
return function(...s) {
|
|
22256
|
+
e && clearTimeout(e), e = setTimeout(() => {
|
|
22257
|
+
e = null, a.apply(this, s);
|
|
22258
|
+
}, t);
|
|
22259
|
+
};
|
|
22260
|
+
}
|
|
22261
|
+
function $g(a) {
|
|
22255
22262
|
return new Promise((t, e) => {
|
|
22256
22263
|
const s = new FileReader();
|
|
22257
22264
|
s.addEventListener("load", () => t(s.result)), s.addEventListener("error", e), s.readAsDataURL(a);
|
|
22258
22265
|
});
|
|
22259
22266
|
}
|
|
22260
|
-
|
|
22261
|
-
|
|
22262
|
-
|
|
22263
|
-
const t = "data:application/pdf;base64,", e = await Ug(a);
|
|
22267
|
+
Yl() || (zg.workerSrc = `https://cdnjs.cloudflare.com/ajax/libs/pdf.js/${Vg}/pdf.worker.min.mjs`);
|
|
22268
|
+
async function qg(a) {
|
|
22269
|
+
const t = "data:application/pdf;base64,", e = await $g(a);
|
|
22264
22270
|
if (typeof e == "string")
|
|
22265
22271
|
return globalThis.atob(e.slice(t.length));
|
|
22266
22272
|
}
|
|
22267
|
-
function
|
|
22268
|
-
|
|
22273
|
+
function Yl() {
|
|
22274
|
+
try {
|
|
22275
|
+
return typeof OffscreenCanvas < "u" && typeof HTMLCanvasElement < "u" && typeof HTMLCanvasElement.prototype.transferControlToOffscreen == "function";
|
|
22276
|
+
} catch {
|
|
22277
|
+
return !1;
|
|
22278
|
+
}
|
|
22279
|
+
}
|
|
22280
|
+
async function Kg({ page: a, PDFBase64: t, scale: e, password: s }, i) {
|
|
22281
|
+
const n = Ug() / window.devicePixelRatio;
|
|
22282
|
+
if (Yl()) {
|
|
22283
|
+
const r = new Wg();
|
|
22284
|
+
return r.postMessage({ data: t, password: s, id: i, page: a, units: n, scale: e }), await new Promise((h) => {
|
|
22285
|
+
r.addEventListener("message", ({ data: l }) => {
|
|
22286
|
+
if (l.status === "success") {
|
|
22287
|
+
if (l.bitmap) {
|
|
22288
|
+
const c = document.createElement("canvas"), u = c.getContext("bitmaprenderer");
|
|
22289
|
+
c.width = l.width, c.height = l.height, u?.transferFromImageBitmap(l.bitmap), h({ pages: l.pages, canvas: c });
|
|
22290
|
+
} else
|
|
22291
|
+
h({ pages: l.pages, canvas: null });
|
|
22292
|
+
r.terminate();
|
|
22293
|
+
}
|
|
22294
|
+
});
|
|
22295
|
+
});
|
|
22296
|
+
} else {
|
|
22297
|
+
const r = await Gg({ data: t, password: s }).promise, o = r.numPages;
|
|
22298
|
+
if (!i) return { canvas: null, pages: o };
|
|
22299
|
+
const h = await r.getPage(a), l = h.getViewport({ scale: e }), c = document.createElement("canvas"), d = {
|
|
22300
|
+
canvasContext: c.getContext("2d"),
|
|
22301
|
+
viewport: l,
|
|
22302
|
+
transform: [n, 0, 0, n, 0, 0]
|
|
22303
|
+
};
|
|
22304
|
+
return c.width = Math.floor(l.width * n), c.height = Math.floor(l.height * n), h.render(d).promise.then(() => ({ canvas: c, pages: o }));
|
|
22305
|
+
}
|
|
22269
22306
|
}
|
|
22270
22307
|
const jt = /* @__PURE__ */ new Map();
|
|
22271
|
-
function
|
|
22308
|
+
function Jg(a) {
|
|
22272
22309
|
const t = new Pr(a);
|
|
22273
22310
|
return jt.set(a, t), t;
|
|
22274
22311
|
}
|
|
22275
|
-
function
|
|
22312
|
+
function Zg(a, t) {
|
|
22276
22313
|
const e = Date.now();
|
|
22277
22314
|
return {
|
|
22278
22315
|
PDFId: `${a.name}-${e}`,
|
|
@@ -22281,19 +22318,9 @@ function Jg(a, t) {
|
|
|
22281
22318
|
PDFBase64: t
|
|
22282
22319
|
};
|
|
22283
22320
|
}
|
|
22284
|
-
function Zg(a, t) {
|
|
22285
|
-
const e = a.getViewport({ scale: t }), s = document.createElement("canvas"), i = s.getContext("2d"), n = Bd() / window.devicePixelRatio;
|
|
22286
|
-
s.width = Math.floor(e.width * n), s.height = Math.floor(e.height * n);
|
|
22287
|
-
const r = {
|
|
22288
|
-
canvasContext: i,
|
|
22289
|
-
viewport: e,
|
|
22290
|
-
transform: [n, 0, 0, n, 0, 0]
|
|
22291
|
-
}, o = a.render(r);
|
|
22292
|
-
return { canvas: s, renderTask: o };
|
|
22293
|
-
}
|
|
22294
22321
|
async function Qg({ src: a }, t, e) {
|
|
22295
22322
|
if (!a || !e) return null;
|
|
22296
|
-
const { objects: s, options: i } = await
|
|
22323
|
+
const { objects: s, options: i } = await kd(a), n = s.filter((o) => o !== null), r = Xu.groupSVGElements(n, i);
|
|
22297
22324
|
return n.forEach((o) => {
|
|
22298
22325
|
o.stroke = e;
|
|
22299
22326
|
}), r.hoverCursor = "pointer", r.stroke = `${e}-${t}`, r;
|
|
@@ -22301,23 +22328,23 @@ async function Qg({ src: a }, t, e) {
|
|
|
22301
22328
|
function tp(a, t) {
|
|
22302
22329
|
if (!jt.get(a)) return;
|
|
22303
22330
|
const s = 1 / 3, i = ap(t, s);
|
|
22304
|
-
|
|
22331
|
+
ql(a, i, s);
|
|
22305
22332
|
}
|
|
22306
22333
|
async function ep(a, t) {
|
|
22307
|
-
const e = await
|
|
22308
|
-
PDFId: `${
|
|
22309
|
-
name:
|
|
22334
|
+
const e = await Bd(a), s = Date.now(), n = {
|
|
22335
|
+
PDFId: `${a.name}${s}`,
|
|
22336
|
+
name: a.name.replace(/.png|.jpg|.jpeg/, ""),
|
|
22310
22337
|
updateDate: s,
|
|
22311
22338
|
PDFBase64: e
|
|
22312
22339
|
};
|
|
22313
|
-
return
|
|
22340
|
+
return t && $l(t, { url: e }), { ...n, pages: 1 };
|
|
22314
22341
|
}
|
|
22315
|
-
async function
|
|
22342
|
+
async function $l(a, { url: t, scale: e = 0.5 }) {
|
|
22316
22343
|
if (!jt.get(a)) return;
|
|
22317
22344
|
const i = await Pt.fromURL(t);
|
|
22318
|
-
i.scale(e),
|
|
22345
|
+
i.scale(e), ql(a, i, e);
|
|
22319
22346
|
}
|
|
22320
|
-
function
|
|
22347
|
+
function ql(a, t, e) {
|
|
22321
22348
|
const s = jt.get(a);
|
|
22322
22349
|
s && (s.setWidth(t.width * e), s.setHeight(t.height * e), s.backgroundImage = t, s.renderAll());
|
|
22323
22350
|
}
|
|
@@ -22361,18 +22388,16 @@ function hp(a, t, e) {
|
|
|
22361
22388
|
}[s]?.(a, t, e) ?? Promise.reject(new Error(`Unsupported ${s} file type.`));
|
|
22362
22389
|
}
|
|
22363
22390
|
async function lp(a, t, e) {
|
|
22364
|
-
const s = await
|
|
22391
|
+
const s = await qg(a);
|
|
22365
22392
|
if (!s) return;
|
|
22366
|
-
const i =
|
|
22393
|
+
const i = Zg(a, s), n = await Kl({ page: 1, PDFBase64: s, scale: 0.8, password: t }, e);
|
|
22367
22394
|
return { ...i, pages: n };
|
|
22368
22395
|
}
|
|
22369
|
-
|
|
22370
|
-
|
|
22371
|
-
return o.promise.then(() => (i && tp(i, h), n.numPages));
|
|
22396
|
+
function Kl(a, t) {
|
|
22397
|
+
return Kg(a, t).then(({ canvas: e, pages: s }) => (e && t && tp(t, e), s));
|
|
22372
22398
|
}
|
|
22373
22399
|
async function Za(a, t, e) {
|
|
22374
|
-
|
|
22375
|
-
return await ep(e, a);
|
|
22400
|
+
return await ep(a, e);
|
|
22376
22401
|
}
|
|
22377
22402
|
function cp(a, t) {
|
|
22378
22403
|
const e = jt.get(a);
|
|
@@ -22387,7 +22412,7 @@ async function up(a, t) {
|
|
|
22387
22412
|
if (!e) return;
|
|
22388
22413
|
const s = e?.getActiveObject();
|
|
22389
22414
|
if (!s) return;
|
|
22390
|
-
const i = await s.clone(
|
|
22415
|
+
const i = await s.clone(lc);
|
|
22391
22416
|
i instanceof Qt ? i.forEachObject((n) => {
|
|
22392
22417
|
e.add(n), t(e, n);
|
|
22393
22418
|
}) : (e.add(i), t(e, i)), zr(i, { x: -0.1, y: -0.1 }), e.setActiveObject(i);
|
|
@@ -22409,10 +22434,10 @@ function fp(a) {
|
|
|
22409
22434
|
pointerUp: n,
|
|
22410
22435
|
selectionCreated: r,
|
|
22411
22436
|
selectionCleared: o
|
|
22412
|
-
} = a || {}, h = ws(null), l = ws(null), c = ws(1), u = ws({ ...
|
|
22437
|
+
} = a || {}, h = ws(null), l = ws(null), c = ws(1), u = ws({ ...hc });
|
|
22413
22438
|
function d() {
|
|
22414
22439
|
if (!t || jt.has(t)) return;
|
|
22415
|
-
const O =
|
|
22440
|
+
const O = Jg(t);
|
|
22416
22441
|
return O.on("selection:created", (D) => {
|
|
22417
22442
|
if (r?.(D), D.selected.length <= 1) return;
|
|
22418
22443
|
const z = O.getActiveObject();
|
|
@@ -22425,22 +22450,22 @@ function fp(a) {
|
|
|
22425
22450
|
return hp(O, D, t);
|
|
22426
22451
|
}
|
|
22427
22452
|
function g(O) {
|
|
22428
|
-
return
|
|
22453
|
+
return Kl(O, t);
|
|
22429
22454
|
}
|
|
22430
22455
|
function p({ url: O, scale: D = 0.5 }) {
|
|
22431
|
-
return
|
|
22456
|
+
return $l(t, { url: O, scale: D });
|
|
22432
22457
|
}
|
|
22433
22458
|
async function b(O, D, z) {
|
|
22434
22459
|
const M = jt.get(t);
|
|
22435
22460
|
if (!M) return;
|
|
22436
|
-
const R = await Pt.fromURL(O, {}, { ...
|
|
22461
|
+
const R = await Pt.fromURL(O, {}, { ...rc, ...D });
|
|
22437
22462
|
zr(R, z), M.add(R), v(M, R), M.setActiveObject(R);
|
|
22438
22463
|
}
|
|
22439
22464
|
function m(O, D, z) {
|
|
22440
22465
|
const M = jt.get(t);
|
|
22441
22466
|
if (!M) return;
|
|
22442
22467
|
const R = new kt(O, {
|
|
22443
|
-
...
|
|
22468
|
+
...oc,
|
|
22444
22469
|
...D
|
|
22445
22470
|
});
|
|
22446
22471
|
zr(R, z), M.add(R), v(M, R), M.setActiveObject(R);
|
|
@@ -22517,12 +22542,12 @@ function fp(a) {
|
|
|
22517
22542
|
};
|
|
22518
22543
|
}
|
|
22519
22544
|
function gp(a) {
|
|
22520
|
-
const t = ws(0), e =
|
|
22545
|
+
const t = ws(0), e = Yg(() => {
|
|
22521
22546
|
t.current !== window.innerWidth && (t.current = window.innerWidth, a());
|
|
22522
22547
|
});
|
|
22523
22548
|
Js(() => (window.addEventListener("resize", e), () => window.removeEventListener("resize", e)), []);
|
|
22524
22549
|
}
|
|
22525
|
-
const vp =
|
|
22550
|
+
const vp = Ql(pp);
|
|
22526
22551
|
function pp({
|
|
22527
22552
|
file: a,
|
|
22528
22553
|
page: t = 1,
|
|
@@ -22546,7 +22571,7 @@ function pp({
|
|
|
22546
22571
|
onSelectionCreated: y,
|
|
22547
22572
|
onSelectionCleared: _
|
|
22548
22573
|
}, S) {
|
|
22549
|
-
const A = ws(null), T = `${e}-${t - 1}`, k = No(() => s * n, [s, n]), P = No(() => ({ ...
|
|
22574
|
+
const A = ws(null), T = `${e}-${t - 1}`, k = No(() => s * n, [s, n]), P = No(() => ({ ...ac, ...d }), [d]), {
|
|
22550
22575
|
createCanvas: j,
|
|
22551
22576
|
specifyPage: F,
|
|
22552
22577
|
addFabric: I,
|
|
@@ -22586,7 +22611,7 @@ function pp({
|
|
|
22586
22611
|
}
|
|
22587
22612
|
function V(N) {
|
|
22588
22613
|
if (N.preventDefault(), N.stopPropagation(), !o || !N.dataTransfer) return;
|
|
22589
|
-
const { dataTransfer: at, nativeEvent: Tt } = N, { offsetX: Wt, offsetY:
|
|
22614
|
+
const { dataTransfer: at, nativeEvent: Tt } = N, { offsetX: Wt, offsetY: Jl } = Tt, Mo = at.getData("text/plain"), Po = at.getData("text/uri-list"), Oo = at.getData("custom/offset"), Do = Oo ? JSON.parse(Oo) : null, Ro = { top: Jl, left: Wt }, Lo = { x: Do?.offsetX ?? 0, y: Do?.offsetY ?? 0 };
|
|
22590
22615
|
Po ? J(Po, Ro, Lo) : Mo && At(Mo, Ro, Lo);
|
|
22591
22616
|
}
|
|
22592
22617
|
function J(N, at, Tt) {
|
|
@@ -22598,7 +22623,7 @@ function pp({
|
|
|
22598
22623
|
function st() {
|
|
22599
22624
|
f || H(), p?.();
|
|
22600
22625
|
}
|
|
22601
|
-
return
|
|
22626
|
+
return tc(S, () => ({
|
|
22602
22627
|
reload: H,
|
|
22603
22628
|
addImage: J,
|
|
22604
22629
|
addText: At,
|