@component-hook/pdf-canvas 1.2.2-alpha.0 → 1.2.2-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11,10 +11,10 @@ var Io = (a, t, e, s) => ({
11
11
  return oe(a, t, s);
12
12
  }
13
13
  });
14
- import Jl, { useRef as ws, useEffect as Js, forwardRef as Zl, useMemo as No, useImperativeHandle as Ql } from "react";
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 tc() {
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 ec() {
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 = Jl, 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() {
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 sc() {
272
- return Ho || (Ho = 1, process.env.NODE_ENV === "production" ? Ai.exports = tc() : Ai.exports = ec()), 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 = sc();
275
- const ic = "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", nc = {
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
- }, rc = {
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
- }, oc = {
294
+ }, ac = {
295
295
  borderColor: "black",
296
296
  cornerStrokeColor: "black",
297
297
  cornerSize: 8,
298
298
  selectionBackgroundColor: "rgba(245, 245, 245, 0.8)"
299
- }, ac = {
299
+ }, hc = {
300
300
  stroke: "#000",
301
301
  hoverStroke: "#B7EC5D",
302
- src: ic
303
- }, hc = [
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 lc {
409
+ class cc {
410
410
  }
411
- class cc extends lc {
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 uc = {};
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 cc(), dispose() {
428
- }, copyPasteData: uc }), Is = () => Ce().document, mi = () => Ce().window, Qa = () => {
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", dc = "modifyPoly", fc = "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 {
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 gc {
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 gc {
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 pc = 0;
827
- const Xe = () => pc++, Ae = () => {
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 mc = { backgroundVpt: !0, backgroundColor: "", overlayVpt: !0, overlayColor: "", includeDefaultValues: !0, svgViewportTransformation: !0, renderOnAddRemove: !0, skipOffscreen: !0, enableRetinaScaling: !0, imageSmoothingEnabled: !0, controlsAboveOverlay: !1, allowTouchScrolling: !1, viewportTransform: [...Gt] }, bc = ["objects"];
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, bc), { backgroundImage: o, background: h, overlayImage: l, overlay: c, clipPath: u } = r, d = this.renderOnAddRemove;
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", mc);
1327
- const vc = ["touchstart", "touchmove", "touchend"], ph = (a) => {
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) => vc.includes(a.type) || a.pointerType === "touch", $o = (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
- }, yc = ["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, yc), h = new C(s, i);
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
- }, _c = { left: -0.5, top: -0.5, center: 0, bottom: 0.5, right: 0.5 }, yt = (a) => typeof a == "string" ? _c[a] : a - 0.5, un = "not-allowed";
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 wc = (a, t, e, s) => {
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], xc = [...Ch, ...Ah, Ht, "strokeWidth", wt, "deltaY", "textBackgroundColor", ls], Sc = { _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";
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", Cc = 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+(.*)"), Ac = { 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", Tc = On(["path", "circle", "polygon", "polyline", "ellipse", "rect", "line", "image", "text"]), Ec = 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)), kc = 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(kc, a), Dn = (a) => a.eq(kh) ? a : a.scalarDivide(pn(a)), io = function(a) {
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)), Mc = [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"], Pc = { 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 Oc = Object.freeze({ __proto__: null, defaultEasing: Oh, easeInBack: function(a, t, e, s) {
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 Dc = () => !1;
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 = Dc, target: u } = 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 = 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 Rc = ["startValue", "endValue"];
1728
- class Lc extends no {
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, Rc)), {}, { startValue: e, byValue: s - e }));
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 Fc = ["startValue", "endValue"];
1739
- class Ic extends no {
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, Fc)), {}, { startValue: e, byValue: s.map(((i, n) => i - e[n])) }));
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 Nc = ["startValue", "endValue", "easing", "onChange", "onComplete", "abort"], jc = (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 Bc extends no {
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 = jc, onChange: n, onComplete: r, abort: o } = t, h = ht(t, Nc);
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 Ic(a) : new Lc(a);
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 Bc(a);
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 Hc extends nh {
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 zc = ["type"], Gc = ["extraParam"];
2030
- let ke = class en extends Hc {
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, zc), s = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, { extraParam: i } = s, n = ht(s, Gc);
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", Mc), x(ke, "cacheProperties", je), x(ke, "ownDefaults", Pc), x(ke, "type", "FabricObject"), x(ke, "colorProperties", [wt, Ht, "backgroundColor"]), x(ke, "customProperties", []), L.setClass(ke), L.setClass(ke, "object");
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 Vc(a, t, e, s, i) {
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 Wc(a, t, e, s, i) {
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" ? Vc.call(this, t, e, s, i, n) : Wc.call(this, t, e, s, i, n);
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 Xc = (a, t, e) => e.lockRotation ? un : t.cursorStyle, Uc = Hs(eh, zs(((a, t, e, s) => {
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 Yc = ["e", "se", "s", "sw", "w", "nw", "n", "ne", "e"], Zs = (a, t, e) => {
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(Yc[i], "-resize");
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)))), $c = Hs(Tn, zs(((a, t, e, s) => oo(a, t, e, s, { by: "x" })))), qc = Hs(Tn, zs(((a, t, e, s) => oo(a, t, e, s, { by: "y" })))), Kc = ["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" } }, Jc = ["ns", "nesw", "ew", "nwse"], Zc = (a, t, e) => {
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(Jc[s], "-resize");
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, Kc);
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 Qc = (a, t, e, s) => Fh("x", a, t, e, s), tu = (a, t, e, s) => Fh("y", a, t, e, s);
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) ? Zc(0, t, e) : Zs(a, t, e), ca = (a, t, e, s) => Rn(a, t.target) ? tu(a, t, e, s) : $c(a, t, e, s), ua = (a, t, e, s) => Rn(a, t.target) ? Qc(a, t, e, s) : qc(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: Uc, cursorStyleHandler: Xc, offsetY: -40, withConnection: !0, actionName: Ur }) }), eu = () => ({ 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 }) }), su = () => w(w({}, Ih()), eu());
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 iu = new C();
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(iu) ? this.AC : this.AB, this.alpha / 2));
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 nu(a);
2833
- }, nu = (a) => {
2832
+ return ru(a);
2833
+ }, ru = (a) => {
2834
2834
  const t = [];
2835
- for (let e, s = 0; s < a.length; s++) (e = ru(a, s)) !== !1 && t.push(e);
2835
+ for (let e, s = 0; s < a.length; s++) (e = ou(a, s)) !== !1 && t.push(e);
2836
2836
  return t;
2837
- }, ru = (a, t) => {
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 ou = Object.freeze({ __proto__: null, capitalize: function(a) {
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 au(a, t) {
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 hu = (a) => {
2902
+ const lu = (a) => {
2903
2903
  var t;
2904
- return (t = Ac[a]) !== null && t !== void 0 ? t : a;
2905
- }, lu = new RegExp("(".concat(de, ")"), "gi"), cu = (a) => dn(a.replace(lu, " $1 ").replace(/,/gi, " "));
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, ")"), uu = String.raw(ga || (ga = Ee(["(skewX)(", ")"], ["(skewX)\\(", "\\)"])), Nt), du = String.raw(pa || (pa = Ee(["(skewY)(", ")"], ["(skewY)\\(", "\\)"])), Nt), fu = String.raw(ma || (ma = Ee(["(rotate)(", "(?: ", " ", ")?)"], ["(rotate)\\(", "(?: ", " ", ")?\\)"])), Nt, Nt, Nt), gu = String.raw(ba || (ba = Ee(["(scale)(", "(?: ", ")?)"], ["(scale)\\(", "(?: ", ")?\\)"])), Nt, Nt), pu = String.raw(va || (va = Ee(["(translate)(", "(?: ", ")?)"], ["(translate)\\(", "(?: ", ")?\\)"])), Nt, Nt), mu = String.raw(ya || (ya = Ee(["(matrix)(", " ", " ", " ", " ", " ", ")"], ["(matrix)\\(", " ", " ", " ", " ", " ", "\\)"])), Nt, Nt, Nt, Nt, Nt, Nt), ho = "(?:".concat(mu, "|").concat(pu, "|").concat(fu, "|").concat(gu, "|").concat(uu, "|").concat(du, ")"), bu = "(?:".concat(ho, "*)"), vu = String.raw(_a || (_a = Ee(["^s*(?:", "?)s*$"], ["^\\s*(?:", "?)\\s*$"])), bu), yu = new RegExp(vu), _u = new RegExp(ho), wu = new RegExp(ho, "g");
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 = cu(a).replace(/\s*([()])\s*/gi, "$1")) || a && !yu.test(a)) return [...Gt];
2911
- for (const e of a.matchAll(wu)) {
2912
- const s = _u.exec(e[0]);
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 xu(a, t, e, s) {
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 Su(a, t) {
2962
- const e = a.match(Cc);
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 Cu(a) {
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 Au = { stroke: "strokeOpacity", fill: "fillOpacity" };
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) au(l, d.split(" ")) && (u = w(w({}, u), c[d]));
2993
+ for (const d in c) hu(l, d.split(" ")) && (u = w(w({}, u), c[d]));
2994
2994
  return u;
2995
- })(a, e)), Cu(a));
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 = hu(l), u = xu(c, r[l], i, s);
2999
+ const c = lu(l), u = Su(c, r[l], i, s);
3000
3000
  o[c] = u;
3001
3001
  }
3002
- o && o.font && Su(o.font, o);
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(Au).forEach(((u) => {
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 Tu = ["left", "top", "width", "height", "visible"], Wh = ["rx", "ry"];
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, Tu);
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 Eu = ["strategy"], ku = ["target", "strategy", "bubbles", "prevStrategy"], Uh = "layoutManager";
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, dc, fc].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 })))));
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, Eu);
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, ku), { canvas: h } = s;
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 Mu = ["type", "objects", "layoutManager"];
3167
- class Pu extends fi {
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, Mu);
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 Pu() }));
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, ")"), Ou = "".concat(Us).concat(Us).concat(Us).concat(kr, "([01])").concat(kr, "([01])").concat(Us).concat(Us), Du = { m: "l", M: "L" }, Ru = (a, t, e, s, i, n, r, o, h, l, c) => {
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 Lu = (a, t, e) => {
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] = Ru(V, Tt, P, k, R, W, E, H, at, y, _), y = st[Wt][5], _ = st[Wt][6], V = Tt, Tt += N;
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
- Lu(t, e, c).forEach(((d) => n.push(d))), t = c[6], e = c[7];
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, Fu = (a, t, e, s, i, n, r, o) => (h) => {
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
- }, Iu = (a, t, e, s, i, n) => (r) => {
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
- }, Nu = (a, t, e, s, i, n) => (r) => {
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
- }, ju = (a, t) => {
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 = Fu(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];
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 = Iu(i, n, l[1], l[2], l[3], l[4]), e = c, e.iterator = t, e.angleFinder = Nu(i, n, l[1], l[2], l[3], l[4]), e.length = xa(t, i, n), i = l[3], n = l[4];
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 ju(i, t);
3532
+ return Bu(i, t);
3533
3533
  }
3534
- }, Bu = new RegExp("[mzlhvcsqta][^mzlhvcsqta]*", "gi"), Sa = new RegExp(Ou, "g"), Hu = new RegExp(de, "gi"), zu = { m: 2, l: 2, h: 1, v: 1, c: 6, s: 4, q: 4, t: 2, a: 7 }, el = (a) => {
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(Bu)) !== null && t !== void 0 ? t : [];
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 = zu[n.toLowerCase()];
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(Hu) || [];
3548
+ } else o = i.match(zu) || [];
3549
3549
  for (let h = 0; h < o.length; h += r) {
3550
- const l = new Array(r), c = Du[n];
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
- }, Gu = function(a) {
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 Vu = (a, t) => Math.floor(Math.random() * (t - a + 1)) + a;
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 Wu = 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) => {
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: Oc, enlivenObjectEnlivables: vi, enlivenObjects: Ds, findScaleToCover: $h, findScaleToFit: Yh, getBoundsOfCurve: Mr, getOrthonormalVector: io, getPathSegmentsInfo: co, getPointOnPath: tl, getPointer: ph, getRandomInt: Vu, getRegularPolygonPath: (a, t) => {
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: Gu, getSvgAttributes: (a) => {
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: ou, 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) => {
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 Xu extends gh {
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 Xu(t, { allowTouchScrolling: this.allowTouchScrolling, containerClass: this.containerClass }), this._createCacheCanvas();
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) : wc, l = ((f, g, p, b) => {
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 Uu {
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 Yu = ["target", "oldTarget", "fireCanvas", "e"], Kt = { passive: !1 }, ys = (a, t) => {
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
- }, $u = { 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" } };
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 Uu(this)), ["_onMouseDown", "_onTouchStart", "_onMouseMove", "_onMouseUp", "_onTouchEnd", "_onResize", "_onMouseWheel", "_onMouseOut", "_onMouseEnter", "_onContextMenu", "_onClick", "_onDragStart", "_onDragEnd", "_onDragProgress", "_onDragOver", "_onDragEnter", "_onDragLeave", "_onDrop"].forEach(((e) => {
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, Yu);
4224
- const { targetIn: h, targetOut: l, canvasIn: c, canvasOut: u } = $u[t], d = i !== s;
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 }, qu = w(w({}, nl), {}, { r1: 0, r2: 0 }), Ss = (a, t) => isNaN(a) && typeof t == "number" ? t : a;
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 Ku = /\s*;\s*/, Ju = /\s*:\s*/;
4301
- function Zu(a, t) {
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(Ku);
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(Ju).map(((c) => c.trim()));
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 Qu(a, t) {
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(Zu(s[n], i));
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 td(a, t) {
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" ? qu : nl), i), colorStops: n, offsetX: r, offsetY: o, gradientTransform: h, id: l ? "".concat(l, "_").concat(Xe()) : Xe() });
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: td(t, { width: s.viewBoxWidth || s.width, height: s.viewBoxHeight || s.height }), colorStops: Qu(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 }));
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 ed = ["type", "source", "patternTransform"];
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, ed);
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 sd = ["path", "left", "top"], id = ["d"];
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, sd);
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, id)), e), {}, { left: void 0, top: void 0 }));
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 nd = ["left", "top", "radius"], ll = ["radius", "startAngle", "endAngle", "counterClockwise"];
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, nd)), {}, { radius: o, left: n - o, top: r - o }));
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 rd = ["x1", "y1", "x2", "y2"], od = ["x1", "y1", "x2", "y2"], Or = ["x1", "x2", "y1", "y2"];
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, rd));
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, od);
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 ad(a) {
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 hd = ["left", "top"], ul = { exactBoundingBox: !1 };
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(ad(t.getAttribute("points")), w(w({}, ht(Be(t, this.ATTRIBUTE_NAMES, s), hd)), e));
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", xc);
4911
- const ld = / +/g, cd = /"/g;
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 ud = ["textAnchor", "textDecoration", "dx", "dy", "top", "left", "fontSize", "strokeWidth"];
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, ud), 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;
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", Sc), 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 {
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(cd, "'"), '" '), '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>
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(ld)), o = r ? 'style="'.concat(r, '"') : "", h = t.deltaY, l = h ? ' dy="'.concat(nt(h, n), '" ') : "", { angle: c, renderLeft: u, renderTop: d, width: f } = i;
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 dd {
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 fd extends kt {
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 gd extends fd {
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 pd extends gd {
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 dd(this), super.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 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
- }, md = 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 pd {
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", md), x(Le, "type", "IText"), L.setClass(Le), L.setClass(Le, "i-text");
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: su() };
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 bd extends fi {
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 bd() });
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 vd {
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 yd() {
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 vd();
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 = yd()), ar;
6375
+ return !ar && (!(arguments.length > 0 && arguments[0] !== void 0) || arguments[0]) && (ar = _d()), ar;
6376
6376
  }
6377
- const _d = ["filters", "resizeFilter", "src", "crossOrigin", "type"], gl = ["cropX", "cropY"];
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, _d);
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 (!Ec.test(a.nodeName)) return {};
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:", ""), wd = On(["pattern", "defs", "symbol", "metadata", "clipPath", "mask", "desc"]);
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 xd = ["gradientTransform", "x1", "x2", "y1", "y2", "gradientUnits", "cx", "cy", "r", "fx", "fy"], cr = "xlink:href";
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 && (xd.forEach(((n) => {
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 Sd = ["linearGradient", "radialGradient", "svg:linearGradient", "svg:radialGradient"];
6567
- function Cd(a) {
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 Ad {
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, Sd), h = {};
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 = Cd(i);
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) => Tc.test(xn(a)), Dr = () => ({ objects: [], elements: [], options: {}, allElements: [] });
6644
- async function Td(a, t) {
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 && wd.test(xn(d)) && !d.getAttribute("instantiated_by_use")) return !0;
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 Ad(o, r, t, a, h).parse(), elements: o, options: r, allElements: n };
6695
+ })), { objects: await new Td(o, r, t, a, h).parse(), elements: o, options: r, allElements: n };
6696
6696
  }
6697
- function Ed(a, t) {
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) => Td(s, t, e))).catch((() => Dr()));
6704
+ })).then(((s) => Ed(s, t, e))).catch((() => Dr()));
6705
6705
  }
6706
- const jn = (a) => a.webgl !== void 0, uo = "precision highp float", kd = `
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
- }`), Md = ["type"], Pd = ["type"], Od = new RegExp(uo, "g");
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] : {}, Md);
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 kd;
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(Od, uo.replace("highp", i)));
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, Pd));
6810
+ return new this(ht(t, Od));
6811
6811
  }
6812
6812
  }
6813
6813
  x(Ct, "type", "BaseFilter"), x(Ct, "uniformLocations", []);
6814
- const Dd = { multiply: `gl_FragColor.rgb *= uColor.rgb;
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(Dd[this.mode], `
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 Rd = { multiply: `
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
- ` }, Ld = ["type", "image"];
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 Rd[this.mode];
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, Ld);
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 Fd = { Convolute_3_1: `
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 Fd[this.getCacheKey()];
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 Id = { average: `
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 Id[this.mode];
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 Nd = w(w({}, bl), {}, { rotation: 0 });
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", Nd), L.setClass(ur);
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
- let Da = null;
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 Gd(i));
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 Gd(a) {
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
- jg
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
- Ud
7932
+ Wd
7953
7933
  ),
7954
7934
  PermissionFlag: () => (
7955
7935
  /* reexport */
7956
- Xd
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
- vg
7972
+ mg
7993
7973
  ),
7994
7974
  createValidAbsoluteUrl: () => (
7995
7975
  /* reexport */
7996
- Kd
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
- lg
7984
+ ag
8005
7985
  ),
8006
7986
  getFilenameFromUrl: () => (
8007
7987
  /* reexport */
8008
- of
7988
+ nf
8009
7989
  ),
8010
7990
  getPdfFilenameFromUrl: () => (
8011
7991
  /* reexport */
8012
- af
7992
+ rf
8013
7993
  ),
8014
7994
  getXfaPageViewport: () => (
8015
7995
  /* reexport */
8016
- hf
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
- sf
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
- bg
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], Vd = 1e7, dr = 1.35, Jt = {
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
- }, Wd = "pdfjs_internal_editor_", q = {
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
- }, Xd = {
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
- }, Ud = {
8207
+ }, Wd = {
8228
8208
  NEED_PASSWORD: 1,
8229
8209
  INCORRECT_PASSWORD: 2
8230
8210
  };
8231
8211
  let Hn = Bn.WARNINGS;
8232
- function Yd(a) {
8212
+ function Xd(a) {
8233
8213
  Number.isInteger(a) && (Hn = a);
8234
8214
  }
8235
- function $d() {
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 qd(a) {
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 Kd(a, t = null, e = null) {
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 = ef(a);
8248
+ a = Qd(a);
8269
8249
  } catch {
8270
8250
  }
8271
8251
  const s = t ? new URL(a, t) : new URL(a);
8272
- if (qd(s))
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 Ra extends qe {
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 Jd extends qe {
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 Zd(a) {
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 Qd() {
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 tf() {
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", Qd());
8348
+ return Z(this, "isLittleEndian", Jd());
8369
8349
  }
8370
8350
  static get isEvalSupported() {
8371
- return Z(this, "isEvalSupported", tf());
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 ef(a) {
8438
+ function Qd(a) {
8459
8439
  return decodeURIComponent(escape(a));
8460
8440
  }
8461
- let pr = null, La = null;
8462
- function sf(a) {
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, La = /* @__PURE__ */ new Map([["ſt", "ſt"]])), a.replaceAll(pr, (t, e, s) => e ? e.normalize("NFKC") : La.get(s));
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 nf() {
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 rf(a) {
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 of(a) {
8589
+ function nf(a) {
8610
8590
  return [a] = a.split(/[#?]/, 1), a.substring(a.lastIndexOf("/") + 1);
8611
8591
  }
8612
- function af(a, t = "document.pdf") {
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 Fa {
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 hf(a, {
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 lf(a) {
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 cf {
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 uf {
8908
+ class lf {
8929
8909
  #t = 0;
8930
8910
  get id() {
8931
- return `${Wd}${this.#t++}`;
8911
+ return `${Gd}${this.#t++}`;
8932
8912
  }
8933
8913
  }
8934
8914
  class vo {
8935
- #t = nf();
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 df {
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 lf(t), Z(this, "_colors", t);
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 df();
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 uf();
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 cf(this), this.#E.show(s, i, this.direction === "ltr"));
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 ff({
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 ff extends U {
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 Ia = 3285377520, ie = 4294901760, ve = 65535;
11355
+ const Fa = 3285377520, ie = 4294901760, ve = 65535;
11376
11356
  class xl {
11377
11357
  constructor(t) {
11378
- this.h1 = t ? t & 4294967295 : Ia, this.h2 = t ? t & 4294967295 : Ia;
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 gf {
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, Zd(b));
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 pf {
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,${rf(this.data)});`;
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 Na() {
11754
+ function Ia() {
11775
11755
  }
11776
11756
  function Ut(a) {
11777
- if (a instanceof Ue || a instanceof Lr || a instanceof gi || a instanceof Ra || a instanceof Sn || a instanceof fr)
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 Ra(a.message, a.code);
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 || Na).then(function() {
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 || Na, h).then(function() {
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 mf extends Cl {
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 bf extends El {
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 vf extends El {
12358
+ class mf extends El {
12379
12359
  }
12380
- class yf extends Cl {
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 _f extends Al {
12365
+ class vf extends Al {
12386
12366
  async _fetch(t) {
12387
12367
  return Pl(t);
12388
12368
  }
12389
12369
  }
12390
- class wf extends kl {
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 xf extends wo {
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 Sf(a, t, e) {
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 Cf extends wo {
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
- Sf(_, A, p);
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 Af extends wo {
12500
+ class Sf extends wo {
12521
12501
  getPattern() {
12522
12502
  return "hotpink";
12523
12503
  }
12524
12504
  }
12525
- function Tf(a) {
12505
+ function Cf(a) {
12526
12506
  switch (a[0]) {
12527
12507
  case "RadialAxial":
12528
- return new xf(a);
12508
+ return new _f(a);
12529
12509
  case "Mesh":
12530
- return new Cf(a);
12510
+ return new xf(a);
12531
12511
  case "Dummy":
12532
- return new Af();
12512
+ return new Sf();
12533
12513
  }
12534
12514
  throw new Error(`Unknown IR type: ${a[0]}`);
12535
12515
  }
12536
- const ja = {
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 ja.COLORED:
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 ja.UNCOLORED:
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 Jd(`Unsupported paint type: ${e}`);
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 Ef({
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 Ba = 16, Ha = 100, kf = 15, za = 10, Ga = 1e3, Yt = 16;
12653
- function Mf(a, t) {
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 Pf {
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 Of(a) {
12702
+ function Mf(a) {
12723
12703
  const {
12724
12704
  width: t,
12725
12705
  height: e
12726
12706
  } = a;
12727
- if (t > Ga || e > Ga)
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 Va {
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 Wa(a, t) {
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 Xa(a, t) {
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
- } = Ef({
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 Ua(a, t) {
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 Df = ["butt", "round", "square"], Rf = ["miter", "round", "bevel"], Lf = {}, Ya = {};
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 Va(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 Pf(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();
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 > za && typeof s == "function", c = l ? Date.now() + kf : 0;
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 > za) {
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), Xa(u.context, t));
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 = Ua(ut(_), t.interpolate), Ji(_, c, 0, 0, c.width, c.height, 0, 0, s, i), _.globalCompositeOperation = "source-in";
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 = Df[t];
13015
+ this.ctx.lineCap = Pf[t];
13036
13016
  }
13037
13017
  setLineJoin(t) {
13038
- this.ctx.lineJoin = Rf[t];
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), Mf(n, this.suspendedCtx), this.setGState([["BM", "source-over"], ["ca", 1], ["CA", 1]]);
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 = Lf;
13202
+ this.pendingClip = Df;
13223
13203
  }
13224
13204
  eoClip() {
13225
- this.pendingClip = Ya;
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 < Ba ? l = Ba : e > Ha && (l = Ha), this.current.fontSizeScale = e / l, this.ctx.font = `${h} ${o} ${l}px ${r}`;
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 = Tf(this.getObject(t)), this.cachedPatterns.set(t, s)), e && (s.matrix = e), 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 Va(this.ctx.canvas.width, this.ctx.canvas.height), this.transform(...s), this.transform(...i);
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 = Of(t)), 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
- Xa(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();
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
- Wa(h, t), n = this.applyTransferMapsToCanvas(h);
13649
+ Va(h, t), n = this.applyTransferMapsToCanvas(h);
13670
13650
  }
13671
13651
  const r = this._scaleImage(n, be(i));
13672
- i.imageSmoothingEnabled = Ua(ut(i), t.interpolate), Ji(i, r.img, 0, 0, r.paintWidth, r.paintHeight, 0, -s, e, s), this.compose(), this.restore();
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
- Wa(h, t), i = this.applyTransferMapsToCanvas(h);
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 === Ya ? s.clip("evenodd") : s.clip()), this.pendingClip = null), this.current.startNewPathAndClipBox(this.current.clipBox), s.beginPath();
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 Ff {
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 If {
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 Nf {
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 If(e, s));
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 jf {
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 Bf(this, t, this._progressiveDone, this._contentDispositionFilename);
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 Hf(this, t, e);
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 Bf {
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 Hf {
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 zf(a) {
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 = zf(t);
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 $a {
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 Gf(this), this._fullRequestReader;
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 Vf(this, t, e);
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 Gf {
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 Vf {
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 Wf(a) {
14473
+ function Gf(a) {
14494
14474
  const t = a.response;
14495
14475
  return typeof t != "string" ? t : Gn(t).buffer;
14496
14476
  }
14497
- class Xf {
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 = Wf(i);
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 Uf {
14540
+ class Wf {
14561
14541
  constructor(t) {
14562
- this._source = t, this._manager = new Xf(t), this._rangeChunkSize = t.rangeChunkSize, this._fullRequestReader = null, this._rangeRequestReaders = [];
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 Yf(this._manager, this._source), this._fullRequestReader;
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 $f(this._manager, t, e);
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 Yf {
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 $f {
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 qf = /^[a-z][a-z0-9\-+.]+:/i;
14747
- function Kf(a) {
14748
- if (qf.test(a))
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 Jf {
14733
+ class qf {
14754
14734
  constructor(t) {
14755
- this.source = t, this.url = Kf(t.url), _t(this.url.protocol === "file:", "PDFNodeStream only supports file:// URLs."), this._fullRequestReader = null, this._rangeRequestReaders = [];
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 Zf(this), this._fullRequestReader;
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 Qf(this, t, e);
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 Zf {
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 Qf {
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 tg = 1e5, Xt = 30, eg = 0.8;
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 > tg) {
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) : eg;
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 sg = 65536, ig = 100, ng = 5e3, rg = Dt ? yf : mf, og = Dt ? _f : Tl, ag = Dt ? vf : bf, hg = Dt ? wf : Ml;
15166
- function lg(a = {}) {
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 ? cg(a.url) : null, i = a.data ? ug(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 : sg;
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 || og, b = typeof a.standardFontDataUrl == "string" ? a.standardFontDataUrl : null, m = a.StandardFontDataFactory || hg, 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 || rg, R = a.FilterFactory || ag, 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;
15177
- Yd(u);
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 jf(h, {
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 = $a;
15236
+ at = Ya;
15257
15237
  } else
15258
- at = Jf;
15238
+ at = qf;
15259
15239
  else
15260
- at = ti(s) ? $a : Uf;
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 pg(Tt, t, N, At, V);
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 cg(a) {
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 ug(a) {
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 qa(a) {
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 dg {
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 fg {
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 Fa() : null, this._pdfBug = i, this.commonObjs = s.commonObjs, this.objs = new jl(), this._maybeCleanupAfterRender = !1, this._intentStates = /* @__PURE__ */ new Map(), this.destroyed = !1;
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 Fa()), e;
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
- }, ng), !1;
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 = ig;
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 gg {
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 = $d()
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 gg();
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 pg {
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 gf({
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 dg(s, this));
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 pf(n, {
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 > Vd && (o._maybeCleanupAfterRender = !0);
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 fg(e, n, this, this._params.pdfBug);
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 qa(t) ? this.messageHandler.sendWithPromise("GetPageIndex", {
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 Nf(e, t));
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 Ff(i[1]) : null,
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 (!qa(t))
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 mg {
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 mg(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;
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 bg = "4.10.38", vg = "f9bea397f";
16526
- function Ka(a) {
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 Ja {
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 = Ka(t);
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(Ka).join("")}`;
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 yg {
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 yg {
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, _g = 9, ds = /* @__PURE__ */ new WeakSet();
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 wg {
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 xg(t);
16742
+ return new _g(t);
16763
16743
  case xt.WIDGET:
16764
16744
  switch (t.data.fieldType) {
16765
16745
  case "Tx":
16766
- return new Sg(t);
16746
+ return new wg(t);
16767
16747
  case "Btn":
16768
- return t.data.radioButton ? new zl(t) : t.data.checkBox ? new Ag(t) : new Tg(t);
16748
+ return t.data.radioButton ? new zl(t) : t.data.checkBox ? new Sg(t) : new Cg(t);
16769
16749
  case "Ch":
16770
- return new Eg(t);
16750
+ return new Ag(t);
16771
16751
  case "Sig":
16772
- return new Cg(t);
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 Mg(t);
16760
+ return new Eg(t);
16781
16761
  case xt.SQUARE:
16782
- return new Pg(t);
16762
+ return new kg(t);
16783
16763
  case xt.CIRCLE:
16784
- return new Og(t);
16764
+ return new Mg(t);
16785
16765
  case xt.POLYLINE:
16786
16766
  return new Vl(t);
16787
16767
  case xt.CARET:
16788
- return new Rg(t);
16768
+ return new Og(t);
16789
16769
  case xt.INK:
16790
16770
  return new Ao(t);
16791
16771
  case xt.POLYGON:
16792
- return new Dg(t);
16772
+ return new Pg(t);
16793
16773
  case xt.HIGHLIGHT:
16794
16774
  return new Wl(t);
16795
16775
  case xt.UNDERLINE:
16796
- return new Lg(t);
16776
+ return new Dg(t);
16797
16777
  case xt.SQUIGGLY:
16798
- return new Fg(t);
16778
+ return new Rg(t);
16799
16779
  case xt.STRIKEOUT:
16800
- return new Ig(t);
16780
+ return new Lg(t);
16801
16781
  case xt.STAMP:
16802
16782
  return new Xl(t);
16803
16783
  case xt.FILEATTACHMENT:
16804
- return new Ng(t);
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] = Ja[`${r}_HTML`](o), this.annotationStorage.setValue(this.data.id, {
16956
- [s]: Ja[`${r}_rgb`](o)
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 xg extends bt {
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 || _g, n = t.style;
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 Sg extends ms {
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 Cg extends ms {
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 Ag extends ms {
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 Tg extends Hl {
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 Eg extends ms {
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 kg({
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 kg {
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 Mg extends bt {
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 Pg extends bt {
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 Og extends bt {
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 Dg extends Vl {
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 Rg extends bt {
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 Lg extends bt {
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 Fg extends bt {
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 Ig extends bt {
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 Ng extends bt {
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 jg {
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 = wg.create(n);
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 Bg(i, this.#t, this.#e);
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 Bg extends B {
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 Hg(t, e, s, i, n, r);
19350
+ return new jg(t, e, s, i, n, r);
19371
19351
  }
19372
19352
  }
19373
- class Hg extends Ul {
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 zg {
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 Gg {
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 zg {
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 Gg(t, e, s, i, n, this._defaultDrawingOptions["stroke-width"]);
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 Vg = Y.GlobalWorkerOptions;
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 Wg = Y.getDocument;
22221
+ var Gg = Y.getDocument;
22242
22222
  Y.getFilenameFromUrl;
22243
22223
  Y.getPdfFilenameFromUrl;
22244
22224
  Y.getXfaPageViewport;
@@ -22249,23 +22229,76 @@ Y.normalizeUnicode;
22249
22229
  Y.setLayerDimensions;
22250
22230
  Y.shadow;
22251
22231
  Y.stopEvent;
22252
- Y.version;
22253
- const Xg = { "pdfjs-dist": "4.10.38" };
22254
- function Ug(a) {
22232
+ var Vg = Y.version;
22233
+ let Ja = null;
22234
+ function Wg() {
22235
+ const a = document.createElement("div");
22236
+ a.style.width = "1in", document.body.append(a);
22237
+ const t = a.offsetWidth;
22238
+ return a.remove(), t;
22239
+ }
22240
+ function Xg() {
22241
+ const a = Ja ?? Wg();
22242
+ return Ja = a, a / 72;
22243
+ }
22244
+ function Ug(a, t = 500) {
22245
+ if (typeof a != "function") throw new TypeError("The first argument is not a function.");
22246
+ let e = null;
22247
+ return function(...s) {
22248
+ e && clearTimeout(e), e = setTimeout(() => {
22249
+ e = null, a.apply(this, s);
22250
+ }, t);
22251
+ };
22252
+ }
22253
+ function Yg(a) {
22255
22254
  return new Promise((t, e) => {
22256
22255
  const s = new FileReader();
22257
22256
  s.addEventListener("load", () => t(s.result)), s.addEventListener("error", e), s.readAsDataURL(a);
22258
22257
  });
22259
22258
  }
22260
- const Yg = Xg["pdfjs-dist"].replace("^", "");
22261
- Vg.workerSrc = `https://cdnjs.cloudflare.com/ajax/libs/pdf.js/${Yg}/pdf.worker.min.mjs`;
22259
+ Yl() || (zg.workerSrc = `https://cdnjs.cloudflare.com/ajax/libs/pdf.js/${Vg}/pdf.worker.min.mjs`);
22262
22260
  async function $g(a) {
22263
- const t = "data:application/pdf;base64,", e = await Ug(a);
22261
+ const t = "data:application/pdf;base64,", e = await Yg(a);
22264
22262
  if (typeof e == "string")
22265
22263
  return globalThis.atob(e.slice(t.length));
22266
22264
  }
22267
- function qg(a, t) {
22268
- return Wg({ data: a, password: t }).promise;
22265
+ function Yl() {
22266
+ try {
22267
+ return typeof OffscreenCanvas < "u" && typeof HTMLCanvasElement < "u" && typeof HTMLCanvasElement.prototype.transferControlToOffscreen == "function";
22268
+ } catch {
22269
+ return !1;
22270
+ }
22271
+ }
22272
+ async function qg({ page: a, PDFBase64: t, scale: e, password: s }, i) {
22273
+ const n = Xg() / window.devicePixelRatio;
22274
+ if (Yl()) {
22275
+ const r = new Worker(new URL(
22276
+ /* @vite-ignore */
22277
+ "" + new URL("assets/pdfjs.worker-DawqtvLM.js", import.meta.url).href,
22278
+ import.meta.url
22279
+ ), { type: "module" });
22280
+ return r.postMessage({ data: t, password: s, id: i, page: a, units: n, scale: e }), await new Promise((h) => {
22281
+ r.addEventListener("message", ({ data: l }) => {
22282
+ if (l.status === "success") {
22283
+ if (l.bitmap) {
22284
+ const c = document.createElement("canvas"), u = c.getContext("bitmaprenderer");
22285
+ c.width = l.width, c.height = l.height, u?.transferFromImageBitmap(l.bitmap), h({ pages: l.pages, canvas: c });
22286
+ } else
22287
+ h({ pages: l.pages, canvas: null });
22288
+ r.terminate();
22289
+ }
22290
+ });
22291
+ });
22292
+ } else {
22293
+ const r = await Gg({ data: t, password: s }).promise, o = r.numPages;
22294
+ if (!i) return { canvas: null, pages: o };
22295
+ const h = await r.getPage(a), l = h.getViewport({ scale: e }), c = document.createElement("canvas"), d = {
22296
+ canvasContext: c.getContext("2d"),
22297
+ viewport: l,
22298
+ transform: [n, 0, 0, n, 0, 0]
22299
+ };
22300
+ return c.width = Math.floor(l.width * n), c.height = Math.floor(l.height * n), h.render(d).promise.then(() => ({ canvas: c, pages: o }));
22301
+ }
22269
22302
  }
22270
22303
  const jt = /* @__PURE__ */ new Map();
22271
22304
  function Kg(a) {
@@ -22281,70 +22314,60 @@ function Jg(a, t) {
22281
22314
  PDFBase64: t
22282
22315
  };
22283
22316
  }
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
- async function Qg({ src: a }, t, e) {
22317
+ async function Zg({ src: a }, t, e) {
22295
22318
  if (!a || !e) return null;
22296
- const { objects: s, options: i } = await Ed(a), n = s.filter((o) => o !== null), r = Wu.groupSVGElements(n, i);
22319
+ const { objects: s, options: i } = await kd(a), n = s.filter((o) => o !== null), r = Xu.groupSVGElements(n, i);
22297
22320
  return n.forEach((o) => {
22298
22321
  o.stroke = e;
22299
22322
  }), r.hoverCursor = "pointer", r.stroke = `${e}-${t}`, r;
22300
22323
  }
22301
- function tp(a, t) {
22324
+ function Qg(a, t) {
22302
22325
  if (!jt.get(a)) return;
22303
- const s = 1 / 3, i = ap(t, s);
22304
- $l(a, i, s);
22326
+ const s = 1 / 3, i = op(t, s);
22327
+ ql(a, i, s);
22305
22328
  }
22306
- async function ep(a, t) {
22307
- const e = await zd(t), s = Date.now(), n = {
22308
- PDFId: `${t.name}${s}`,
22309
- name: t.name.replace(/.png|.jpg|.jpeg/, ""),
22329
+ async function tp(a, t) {
22330
+ const e = await Bd(a), s = Date.now(), n = {
22331
+ PDFId: `${a.name}${s}`,
22332
+ name: a.name.replace(/.png|.jpg|.jpeg/, ""),
22310
22333
  updateDate: s,
22311
22334
  PDFBase64: e
22312
22335
  };
22313
- return Yl(a, { url: e }), { ...n, pages: 1 };
22336
+ return t && $l(t, { url: e }), { ...n, pages: 1 };
22314
22337
  }
22315
- async function Yl(a, { url: t, scale: e = 0.5 }) {
22338
+ async function $l(a, { url: t, scale: e = 0.5 }) {
22316
22339
  if (!jt.get(a)) return;
22317
22340
  const i = await Pt.fromURL(t);
22318
- i.scale(e), $l(a, i, e);
22341
+ i.scale(e), ql(a, i, e);
22319
22342
  }
22320
- function $l(a, t, e) {
22343
+ function ql(a, t, e) {
22321
22344
  const s = jt.get(a);
22322
22345
  s && (s.setWidth(t.width * e), s.setHeight(t.height * e), s.backgroundImage = t, s.renderAll());
22323
22346
  }
22324
- function sp(a, t) {
22347
+ function ep(a, t) {
22325
22348
  if (!t) return;
22326
22349
  const { oCoords: e } = a;
22327
22350
  if (!e) return;
22328
22351
  const { x: s, y: i } = e.tl.touchCorner.tl, { height: n, width: r, scaleY: o, scaleX: h } = t;
22329
22352
  t.top = i - n * o / 2, t.left = s - r * h / 2, t.setCoords();
22330
22353
  }
22331
- function ip(a, t, e) {
22332
- !e || !a || (e.scale(1 / t), sp(a, e));
22354
+ function sp(a, t, e) {
22355
+ !e || !a || (e.scale(1 / t), ep(a, e));
22333
22356
  }
22334
- function np(a, t) {
22357
+ function ip(a, t) {
22335
22358
  if (!a) return;
22336
22359
  const e = a._cornerSize || 6;
22337
22360
  a.borderScaleFactor = 1 / t, a.cornerSize = e * (1 / t), a.touchCornerSize = e * 4 * (1 / t), a.setCoords();
22338
22361
  }
22339
- function rp(a) {
22362
+ function np(a) {
22340
22363
  const t = jt.get(a);
22341
22364
  t && (t.discardActiveObject(), t.renderAll());
22342
22365
  }
22343
- function op(a) {
22366
+ function rp(a) {
22344
22367
  const t = jt.get(a);
22345
22368
  t && (t.clear(), jt.delete(a));
22346
22369
  }
22347
- function ap(a, t) {
22370
+ function op(a, t) {
22348
22371
  return new Pt(a, { scaleX: t, scaleY: t });
22349
22372
  }
22350
22373
  function zr(a, t) {
@@ -22352,29 +22375,27 @@ function zr(a, t) {
22352
22375
  const { left: e, top: s, scaleX: i, scaleY: n, width: r, height: o } = a, h = t.x * r * i, l = t.y * o * n;
22353
22376
  a.set({ left: e - h, top: s - l });
22354
22377
  }
22355
- function hp(a, t, e) {
22378
+ function ap(a, t, e) {
22356
22379
  const s = a.type;
22357
22380
  return {
22358
- "application/pdf": lp,
22381
+ "application/pdf": hp,
22359
22382
  "image/png": Za,
22360
22383
  "image/jpeg": Za
22361
22384
  }[s]?.(a, t, e) ?? Promise.reject(new Error(`Unsupported ${s} file type.`));
22362
22385
  }
22363
- async function lp(a, t, e) {
22386
+ async function hp(a, t, e) {
22364
22387
  const s = await $g(a);
22365
22388
  if (!s) return;
22366
- const i = Jg(a, s), n = await ql({ page: 1, PDFBase64: s, scale: 0.8, password: t }, e);
22389
+ const i = Jg(a, s), n = await Kl({ page: 1, PDFBase64: s, scale: 0.8, password: t }, e);
22367
22390
  return { ...i, pages: n };
22368
22391
  }
22369
- async function ql({ page: a, PDFBase64: t, scale: e, password: s }, i) {
22370
- const n = await qg(t, s), r = await n.getPage(a), { renderTask: o, canvas: h } = Zg(r, e);
22371
- return o.promise.then(() => (i && tp(i, h), n.numPages));
22392
+ function Kl(a, t) {
22393
+ return qg(a, t).then(({ canvas: e, pages: s }) => (e && t && Qg(t, e), s));
22372
22394
  }
22373
22395
  async function Za(a, t, e) {
22374
- if (e)
22375
- return await ep(e, a);
22396
+ return await tp(a, e);
22376
22397
  }
22377
- function cp(a, t) {
22398
+ function lp(a, t) {
22378
22399
  const e = jt.get(a);
22379
22400
  if (!e) return;
22380
22401
  const s = e.getActiveObject();
@@ -22382,17 +22403,17 @@ function cp(a, t) {
22382
22403
  i.set(t);
22383
22404
  }) : s.set(t), e.renderAll());
22384
22405
  }
22385
- async function up(a, t) {
22406
+ async function cp(a, t) {
22386
22407
  const e = jt.get(a);
22387
22408
  if (!e) return;
22388
22409
  const s = e?.getActiveObject();
22389
22410
  if (!s) return;
22390
- const i = await s.clone(hc);
22411
+ const i = await s.clone(lc);
22391
22412
  i instanceof Qt ? i.forEachObject((n) => {
22392
22413
  e.add(n), t(e, n);
22393
22414
  }) : (e.add(i), t(e, i)), zr(i, { x: -0.1, y: -0.1 }), e.setActiveObject(i);
22394
22415
  }
22395
- function dp(a) {
22416
+ function up(a) {
22396
22417
  const t = jt.get(a);
22397
22418
  if (!t) return;
22398
22419
  const e = t.getActiveObject();
@@ -22400,7 +22421,7 @@ function dp(a) {
22400
22421
  t.remove(s);
22401
22422
  }), t.discardActiveObject()) : t.remove(e));
22402
22423
  }
22403
- function fp(a) {
22424
+ function dp(a) {
22404
22425
  const {
22405
22426
  id: t = "",
22406
22427
  selectionOptions: e,
@@ -22409,7 +22430,7 @@ function fp(a) {
22409
22430
  pointerUp: n,
22410
22431
  selectionCreated: r,
22411
22432
  selectionCleared: o
22412
- } = a || {}, h = ws(null), l = ws(null), c = ws(1), u = ws({ ...ac });
22433
+ } = a || {}, h = ws(null), l = ws(null), c = ws(1), u = ws({ ...hc });
22413
22434
  function d() {
22414
22435
  if (!t || jt.has(t)) return;
22415
22436
  const O = Kg(t);
@@ -22422,25 +22443,25 @@ function fp(a) {
22422
22443
  }), s && O.on("mouse:down", s), i && O.on("mouse:move", i), n && O.on("mouse:up", n), O;
22423
22444
  }
22424
22445
  function f(O, D) {
22425
- return hp(O, D, t);
22446
+ return ap(O, D, t);
22426
22447
  }
22427
22448
  function g(O) {
22428
- return ql(O, t);
22449
+ return Kl(O, t);
22429
22450
  }
22430
22451
  function p({ url: O, scale: D = 0.5 }) {
22431
- return Yl(t, { url: O, scale: D });
22452
+ return $l(t, { url: O, scale: D });
22432
22453
  }
22433
22454
  async function b(O, D, z) {
22434
22455
  const M = jt.get(t);
22435
22456
  if (!M) return;
22436
- const R = await Pt.fromURL(O, {}, { ...nc, ...D });
22457
+ const R = await Pt.fromURL(O, {}, { ...rc, ...D });
22437
22458
  zr(R, z), M.add(R), v(M, R), M.setActiveObject(R);
22438
22459
  }
22439
22460
  function m(O, D, z) {
22440
22461
  const M = jt.get(t);
22441
22462
  if (!M) return;
22442
22463
  const R = new kt(O, {
22443
- ...rc,
22464
+ ...oc,
22444
22465
  ...D
22445
22466
  });
22446
22467
  zr(R, z), M.add(R), v(M, R), M.setActiveObject(R);
@@ -22455,7 +22476,7 @@ function fp(a) {
22455
22476
  uuid: M = Date.now()
22456
22477
  }) {
22457
22478
  if (O.getActiveObjects().length > 1 || h.current?.stroke === `${z}-${M}`) return;
22458
- const W = await Qg(u.current, M, z);
22479
+ const W = await Zg(u.current, M, z);
22459
22480
  T(O), h.current = W, l.current = D, _(O, D, M), S(c.current, !0), W && O.add(W);
22460
22481
  }
22461
22482
  function _(O, D, z) {
@@ -22474,7 +22495,7 @@ function fp(a) {
22474
22495
  }
22475
22496
  function S(O, D = !1) {
22476
22497
  const z = jt.get(t);
22477
- c.current = O, z && (np(l.current, O), ip(l.current, O, h.current), !D && z.renderAll());
22498
+ c.current = O, z && (ip(l.current, O), sp(l.current, O, h.current), !D && z.renderAll());
22478
22499
  }
22479
22500
  function A(O) {
22480
22501
  if (!O) return;
@@ -22486,19 +22507,19 @@ function fp(a) {
22486
22507
  l.current = null, h.current && (O.remove(h.current), h.current = null);
22487
22508
  }
22488
22509
  function k() {
22489
- rp(t);
22510
+ np(t);
22490
22511
  }
22491
22512
  function P() {
22492
- op(t);
22513
+ rp(t);
22493
22514
  }
22494
22515
  function j(O) {
22495
- cp(t, O);
22516
+ lp(t, O);
22496
22517
  }
22497
22518
  function F() {
22498
- return up(t, v);
22519
+ return cp(t, v);
22499
22520
  }
22500
22521
  function I() {
22501
- dp(t);
22522
+ up(t);
22502
22523
  }
22503
22524
  return {
22504
22525
  createCanvas: d,
@@ -22516,14 +22537,14 @@ function fp(a) {
22516
22537
  deleteActiveFabric: I
22517
22538
  };
22518
22539
  }
22519
- function gp(a) {
22520
- const t = ws(0), e = Hd(() => {
22540
+ function fp(a) {
22541
+ const t = ws(0), e = Ug(() => {
22521
22542
  t.current !== window.innerWidth && (t.current = window.innerWidth, a());
22522
22543
  });
22523
22544
  Js(() => (window.addEventListener("resize", e), () => window.removeEventListener("resize", e)), []);
22524
22545
  }
22525
- const vp = Zl(pp);
22526
- function pp({
22546
+ const bp = Ql(gp);
22547
+ function gp({
22527
22548
  file: a,
22528
22549
  page: t = 1,
22529
22550
  canvasId: e = "PDF-canvas",
@@ -22546,7 +22567,7 @@ function pp({
22546
22567
  onSelectionCreated: y,
22547
22568
  onSelectionCleared: _
22548
22569
  }, S) {
22549
- const A = ws(null), T = `${e}-${t - 1}`, k = No(() => s * n, [s, n]), P = No(() => ({ ...oc, ...d }), [d]), {
22570
+ const A = ws(null), T = `${e}-${t - 1}`, k = No(() => s * n, [s, n]), P = No(() => ({ ...ac, ...d }), [d]), {
22550
22571
  createCanvas: j,
22551
22572
  specifyPage: F,
22552
22573
  addFabric: I,
@@ -22559,7 +22580,7 @@ function pp({
22559
22580
  setCloseSvgOptions: ot,
22560
22581
  copyActiveFabric: lt,
22561
22582
  deleteActiveFabric: E
22562
- } = fp({
22583
+ } = dp({
22563
22584
  id: T,
22564
22585
  selectionOptions: P,
22565
22586
  pointerDown: b,
@@ -22568,7 +22589,7 @@ function pp({
22568
22589
  selectionCreated: y,
22569
22590
  selectionCleared: _
22570
22591
  });
22571
- gp(st);
22592
+ fp(st);
22572
22593
  async function H() {
22573
22594
  globalThis.requestAnimationFrame(async () => {
22574
22595
  if (j(), a.PDFBase64.startsWith("data:image") || a.canvas) {
@@ -22586,7 +22607,7 @@ function pp({
22586
22607
  }
22587
22608
  function V(N) {
22588
22609
  if (N.preventDefault(), N.stopPropagation(), !o || !N.dataTransfer) return;
22589
- const { dataTransfer: at, nativeEvent: Tt } = N, { offsetX: Wt, offsetY: Kl } = 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: Kl, left: Wt }, Lo = { x: Do?.offsetX ?? 0, y: Do?.offsetY ?? 0 };
22610
+ 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
22611
  Po ? J(Po, Ro, Lo) : Mo && At(Mo, Ro, Lo);
22591
22612
  }
22592
22613
  function J(N, at, Tt) {
@@ -22598,7 +22619,7 @@ function pp({
22598
22619
  function st() {
22599
22620
  f || H(), p?.();
22600
22621
  }
22601
- return Ql(S, () => ({
22622
+ return tc(S, () => ({
22602
22623
  reload: H,
22603
22624
  addImage: J,
22604
22625
  addText: At,
@@ -22633,7 +22654,7 @@ function pp({
22633
22654
  );
22634
22655
  }
22635
22656
  export {
22636
- vp as default,
22637
- hp as loadFile,
22638
- fp as useFabric
22657
+ bp as default,
22658
+ ap as loadFile,
22659
+ dp as useFabric
22639
22660
  };