@component-hook/pdf-canvas 1.3.0-alpha.1 → 1.3.0-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 Ql, { useRef as ws, useEffect as Js, forwardRef as tc, useMemo as No, useImperativeHandle as ec } 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 sc() {
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 sc() {
37
37
  }
38
38
  var Ws = {};
39
39
  var Bo;
40
- function ic() {
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;
@@ -69,14 +69,14 @@ function ic() {
69
69
  case y:
70
70
  return (E._context.displayName || "Context") + ".Consumer";
71
71
  case S:
72
- var z = E.render;
73
- return E = E.displayName, E || (E = z.displayName || z.name || "", E = E !== "" ? "ForwardRef(" + E + ")" : "ForwardRef"), E;
72
+ var H = E.render;
73
+ return E = E.displayName, E || (E = H.displayName || H.name || "", E = E !== "" ? "ForwardRef(" + E + ")" : "ForwardRef"), E;
74
74
  case k:
75
- return z = E.displayName || null, z !== null ? z : a(E.type) || "Memo";
75
+ return H = E.displayName || null, H !== null ? H : a(E.type) || "Memo";
76
76
  case P:
77
- z = E._payload, E = E._init;
77
+ H = E._payload, E = E._init;
78
78
  try {
79
- return a(E(z));
79
+ return a(E(H));
80
80
  } catch {
81
81
  }
82
82
  }
@@ -88,15 +88,15 @@ function ic() {
88
88
  function e(E) {
89
89
  try {
90
90
  t(E);
91
- var z = !1;
91
+ var H = !1;
92
92
  } catch {
93
- z = !0;
93
+ H = !0;
94
94
  }
95
- if (z) {
96
- z = console;
97
- var V = z.error, J = typeof Symbol == "function" && Symbol.toStringTag && E[Symbol.toStringTag] || E.constructor.name || "Object";
95
+ if (H) {
96
+ H = console;
97
+ var V = H.error, J = typeof Symbol == "function" && Symbol.toStringTag && E[Symbol.toStringTag] || E.constructor.name || "Object";
98
98
  return V.call(
99
- z,
99
+ H,
100
100
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
101
101
  J
102
102
  ), t(E);
@@ -107,8 +107,8 @@ function ic() {
107
107
  if (typeof E == "object" && E !== null && E.$$typeof === P)
108
108
  return "<...>";
109
109
  try {
110
- var z = a(E);
111
- return z ? "<" + z + ">" : "<...>";
110
+ var H = a(E);
111
+ return H ? "<" + H + ">" : "<...>";
112
112
  } catch {
113
113
  return "<...>";
114
114
  }
@@ -122,16 +122,16 @@ function ic() {
122
122
  }
123
123
  function r(E) {
124
124
  if (O.call(E, "key")) {
125
- var z = Object.getOwnPropertyDescriptor(E, "key").get;
126
- if (z && z.isReactWarning) return !1;
125
+ var H = Object.getOwnPropertyDescriptor(E, "key").get;
126
+ if (H && H.isReactWarning) return !1;
127
127
  }
128
128
  return E.key !== void 0;
129
129
  }
130
- function o(E, z) {
130
+ function o(E, H) {
131
131
  function V() {
132
132
  M || (M = !0, console.error(
133
133
  "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
134
- z
134
+ H
135
135
  ));
136
136
  }
137
137
  V.isReactWarning = !0, Object.defineProperty(E, "key", {
@@ -145,12 +145,12 @@ function ic() {
145
145
  "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
146
146
  )), E = this.props.ref, E !== void 0 ? E : null;
147
147
  }
148
- function l(E, z, V, J, At, st) {
148
+ function l(E, H, V, J, At, st) {
149
149
  var B = V.ref;
150
150
  return E = {
151
151
  $$typeof: g,
152
152
  type: E,
153
- key: z,
153
+ key: H,
154
154
  props: V,
155
155
  _owner: J
156
156
  }, (B !== void 0 ? B : null) !== null ? Object.defineProperty(E, "ref", {
@@ -178,8 +178,8 @@ function ic() {
178
178
  value: st
179
179
  }), Object.freeze && (Object.freeze(E.props), Object.freeze(E)), E;
180
180
  }
181
- function c(E, z, V, J, At, st) {
182
- var B = z.children;
181
+ function c(E, H, V, J, At, st) {
182
+ var B = H.children;
183
183
  if (B !== void 0)
184
184
  if (J)
185
185
  if (D(B)) {
@@ -191,9 +191,9 @@ function ic() {
191
191
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
192
192
  );
193
193
  else u(B);
194
- if (O.call(z, "key")) {
194
+ if (O.call(H, "key")) {
195
195
  B = a(E);
196
- var ut = Object.keys(z).filter(function(Wt) {
196
+ var ut = Object.keys(H).filter(function(Wt) {
197
197
  return Wt !== "key";
198
198
  });
199
199
  J = 0 < ut.length ? "{key: someKey, " + ut.join(": ..., ") + ": ...}" : "{key: someKey}", ht[B + J] || (ut = 0 < ut.length ? "{" + ut.join(": ..., ") + ": ...}" : "{}", console.error(
@@ -209,11 +209,11 @@ React keys must be passed directly to JSX without using spread:
209
209
  B
210
210
  ), ht[B + J] = !0);
211
211
  }
212
- if (B = null, V !== void 0 && (e(V), B = "" + V), r(z) && (e(z.key), B = "" + z.key), "key" in z) {
212
+ if (B = null, V !== void 0 && (e(V), B = "" + V), r(H) && (e(H.key), B = "" + H.key), "key" in H) {
213
213
  V = {};
214
- for (var Tt in z)
215
- Tt !== "key" && (V[Tt] = z[Tt]);
216
- } else V = z;
214
+ for (var Tt in H)
215
+ Tt !== "key" && (V[Tt] = H[Tt]);
216
+ } else V = H;
217
217
  return B && o(
218
218
  V,
219
219
  typeof E == "function" ? E.displayName || E.name || "Unknown" : E
@@ -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 = Ql, 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"), N = 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, H = 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"), N = 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 = {
@@ -243,36 +243,36 @@ React keys must be passed directly to JSX without using spread:
243
243
  var M, R = {}, W = f.react_stack_bottom_frame.bind(
244
244
  f,
245
245
  n
246
- )(), ot = H(s(n)), ht = {};
247
- Ws.Fragment = b, Ws.jsx = function(E, z, V) {
246
+ )(), ot = z(s(n)), ht = {};
247
+ Ws.Fragment = b, Ws.jsx = function(E, H, V) {
248
248
  var J = 1e4 > I.recentlyCreatedOwnerStacks++;
249
249
  return c(
250
250
  E,
251
- z,
251
+ H,
252
252
  V,
253
253
  !1,
254
254
  J ? Error("react-stack-top-frame") : W,
255
- J ? H(s(E)) : ot
255
+ J ? z(s(E)) : ot
256
256
  );
257
- }, Ws.jsxs = function(E, z, V) {
257
+ }, Ws.jsxs = function(E, H, V) {
258
258
  var J = 1e4 > I.recentlyCreatedOwnerStacks++;
259
259
  return c(
260
260
  E,
261
- z,
261
+ H,
262
262
  V,
263
263
  !0,
264
264
  J ? Error("react-stack-top-frame") : W,
265
- J ? H(s(E)) : ot
265
+ J ? z(s(E)) : ot
266
266
  );
267
267
  };
268
268
  })()), Ws;
269
269
  }
270
270
  var Ho;
271
- function nc() {
272
- return Ho || (Ho = 1, process.env.NODE_ENV === "production" ? Ai.exports = sc() : Ai.exports = ic()), 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 = nc();
275
- const rc = "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", oc = {
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 rc = "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
- }, ac = {
284
+ }, oc = {
285
285
  top: 100,
286
286
  left: 50,
287
287
  fontFamily: "helvetica",
@@ -291,16 +291,16 @@ const rc = "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
- }, hc = {
294
+ }, ac = {
295
295
  borderColor: "black",
296
296
  cornerStrokeColor: "black",
297
297
  cornerSize: 8,
298
298
  selectionBackgroundColor: "rgba(245, 245, 245, 0.8)"
299
- }, lc = {
299
+ }, hc = {
300
300
  stroke: "#000",
301
301
  hoverStroke: "#B7EC5D",
302
- src: rc
303
- }, cc = [
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 uc {
409
+ class cc {
410
410
  }
411
- class dc extends uc {
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 fc = {};
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 dc(), dispose() {
428
- }, copyPasteData: fc }), 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", gc = "modifyPoly", pc = "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 mc {
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 mc {
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 bc = 0;
827
- const Xe = () => bc++, 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 vc = { backgroundVpt: !0, backgroundColor: "", overlayVpt: !0, overlayColor: "", includeDefaultValues: !0, svgViewportTransformation: !0, renderOnAddRemove: !0, skipOffscreen: !0, enableRetinaScaling: !0, imageSmoothingEnabled: !0, controlsAboveOverlay: !1, allowTouchScrolling: !1, viewportTransform: [...Gt] }, yc = ["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 = at(i, yc), { 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 = at(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", vc);
1327
- const _c = ["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) => _c.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 _c = ["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
- }, wc = ["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 = at(e, wc), 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 = at(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 _c = ["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
- }, xc = { left: -0.5, top: -0.5, center: 0, bottom: 0.5, right: 0.5 }, yt = (a) => typeof a == "string" ? xc[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 Sc = (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], Cc = [...Ch, ...Ah, Ht, "strokeWidth", wt, "deltaY", "textBackgroundColor", ls], Ac = { _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", Tc = 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+(.*)"), Ec = { 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", kc = On(["path", "circle", "polygon", "polyline", "ellipse", "rect", "line", "image", "text"]), Mc = 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)), Pc = 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(Pc, 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)), Oc = [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"], Dc = { 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 Rc = 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 Rc = 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 Lc = () => !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 = Lc, 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 Fc = ["startValue", "endValue"];
1728
- class Ic 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({}, at(t, Fc)), {}, { startValue: e, byValue: s - e }));
1731
+ super(w(w({}, at(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 Nc = ["startValue", "endValue"];
1739
- class jc 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({}, at(t, Nc)), {}, { startValue: e, byValue: s.map(((i, n) => i - e[n])) }));
1742
+ super(w(w({}, at(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 Bc = ["startValue", "endValue", "easing", "onChange", "onComplete", "abort"], Hc = (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 zc 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 = Hc, onChange: n, onComplete: r, abort: o } = t, h = at(t, Bc);
1752
+ let { startValue: e, endValue: s, easing: i = Bc, onChange: n, onComplete: r, abort: o } = t, h = at(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 zc 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 jc(a) : new Ic(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 zc(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 Gc extends nh {
1844
+ class zc extends nh {
1845
1845
  getX() {
1846
1846
  return this.getXY().x;
1847
1847
  }
@@ -2026,8 +2026,8 @@ class Gc extends nh {
2026
2026
  return this.translateToOriginPoint(this.getRelativeCenterPoint(), et, qt);
2027
2027
  }
2028
2028
  }
2029
- const Vc = ["type"], Wc = ["extraParam"];
2030
- let ke = class en extends Gc {
2029
+ const Gc = ["type"], Vc = ["extraParam"];
2030
+ let ke = class en extends zc {
2031
2031
  static getDefaults() {
2032
2032
  return en.ownDefaults;
2033
2033
  }
@@ -2341,9 +2341,9 @@ let ke = class en extends Gc {
2341
2341
  toObject() {
2342
2342
  const t = (arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : []).concat(en.customProperties, this.constructor.customProperties || []);
2343
2343
  let e;
2344
- const s = tt.NUM_FRACTION_DIGITS, { clipPath: i, fill: n, stroke: r, shadow: o, strokeDashArray: h, left: l, top: c, originX: u, originY: d, width: f, height: g, strokeWidth: p, strokeLineCap: b, strokeDashOffset: m, strokeLineJoin: v, strokeUniform: y, strokeMiterLimit: _, scaleX: S, scaleY: A, angle: T, flipX: k, flipY: P, opacity: N, visible: F, backgroundColor: I, fillRule: O, paintFirst: D, globalCompositeOperation: H, skewX: M, skewY: R } = this;
2344
+ const s = tt.NUM_FRACTION_DIGITS, { clipPath: i, fill: n, stroke: r, shadow: o, strokeDashArray: h, left: l, top: c, originX: u, originY: d, width: f, height: g, strokeWidth: p, strokeLineCap: b, strokeDashOffset: m, strokeLineJoin: v, strokeUniform: y, strokeMiterLimit: _, scaleX: S, scaleY: A, angle: T, flipX: k, flipY: P, opacity: N, visible: F, backgroundColor: I, fillRule: O, paintFirst: D, globalCompositeOperation: z, skewX: M, skewY: R } = this;
2345
2345
  i && !i.excludeFromExport && (e = i.toObject(t.concat("inverted", "absolutePositioned")));
2346
- const W = (ht) => nt(ht, s), ot = w(w({}, gs(this, t)), {}, { type: this.constructor.type, version: yr, originX: u, originY: d, left: W(l), top: W(c), width: W(f), height: W(g), fill: Xo(n) ? n.toObject() : n, stroke: Xo(r) ? r.toObject() : r, strokeWidth: W(p), strokeDashArray: h && h.concat(), strokeLineCap: b, strokeDashOffset: m, strokeLineJoin: v, strokeUniform: y, strokeMiterLimit: W(_), scaleX: W(S), scaleY: W(A), angle: W(T), flipX: k, flipY: P, opacity: W(N), shadow: o && o.toObject(), visible: F, backgroundColor: I, fillRule: O, paintFirst: D, globalCompositeOperation: H, skewX: W(M), skewY: W(R) }, e ? { clipPath: e } : null);
2346
+ const W = (ht) => nt(ht, s), ot = w(w({}, gs(this, t)), {}, { type: this.constructor.type, version: yr, originX: u, originY: d, left: W(l), top: W(c), width: W(f), height: W(g), fill: Xo(n) ? n.toObject() : n, stroke: Xo(r) ? r.toObject() : r, strokeWidth: W(p), strokeDashArray: h && h.concat(), strokeLineCap: b, strokeDashOffset: m, strokeLineJoin: v, strokeUniform: y, strokeMiterLimit: W(_), scaleX: W(S), scaleY: W(A), angle: W(T), flipX: k, flipY: P, opacity: W(N), shadow: o && o.toObject(), visible: F, backgroundColor: I, fillRule: O, paintFirst: D, globalCompositeOperation: z, skewX: W(M), skewY: W(R) }, e ? { clipPath: e } : null);
2347
2347
  return this.includeDefaultValues ? ot : this._removeDefaultValues(ot);
2348
2348
  }
2349
2349
  toDatalessObject(t) {
@@ -2361,14 +2361,14 @@ let ke = class en extends Gc {
2361
2361
  return "#<".concat(this.constructor.type, ">");
2362
2362
  }
2363
2363
  static _fromObject(t) {
2364
- let e = at(t, Vc), s = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, { extraParam: i } = s, n = at(s, Wc);
2364
+ let e = at(t, Gc), s = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, { extraParam: i } = s, n = at(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", Oc), x(ke, "cacheProperties", je), x(ke, "ownDefaults", Dc), 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 Xc(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 Uc(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" ? Xc.call(this, t, e, s, i, n) : Uc.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 Yc = (a, t, e) => e.lockRotation ? un : t.cursorStyle, $c = 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 qc = ["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(qc[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,35 +2489,35 @@ 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)))), Kc = Hs(Tn, zs(((a, t, e, s) => oo(a, t, e, s, { by: "x" })))), Jc = Hs(Tn, zs(((a, t, e, s) => oo(a, t, e, s, { by: "y" })))), Zc = ["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" } }, Qc = ["ns", "nesw", "ew", "nwse"], tu = (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(Qc[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: N, skewingSide: F } = A, I = at(A, Zc);
2503
- const { skew: O } = ir[S], D = T.subtract(new C(P, N)).divide(new C(k.scaleX, k.scaleY))[S], H = 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, ht = Te(Math.atan(ot));
2502
+ let { target: k, ex: P, ey: N, skewingSide: F } = A, I = at(A, Jc);
2503
+ const { skew: O } = ir[S], D = T.subtract(new C(P, N)).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, ht = Te(Math.atan(ot));
2504
2504
  k.set(O, ht);
2505
- const E = H !== k[O];
2505
+ const E = z !== k[O];
2506
2506
  if (E && S === "y") {
2507
- const { skewX: z, scaleX: V } = k, J = k._getTransformedDimensions({ skewY: H }), At = k._getTransformedDimensions(), st = z !== 0 ? J.x / At.x : 1;
2507
+ const { skewX: H, scaleX: V } = k, J = k._getTransformedDimensions({ skewY: z }), At = k._getTransformedDimensions(), st = H !== 0 ? J.x / At.x : 1;
2508
2508
  st !== 1 && k.set(Vt, st * V);
2509
2509
  }
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 eu = (a, t, e, s) => Fh("x", a, t, e, s), su = (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) ? tu(0, t, e) : Zs(a, t, e), ca = (a, t, e, s) => Rn(a, t.target) ? su(a, t, e, s) : Kc(a, t, e, s), ua = (a, t, e, s) => Rn(a, t.target) ? eu(a, t, e, s) : Jc(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: $c, cursorStyleHandler: Yc, offsetY: -40, withConnection: !0, actionName: Ur }) }), iu = () => ({ 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 }) }), nu = () => w(w({}, Ih()), iu());
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 ru = 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(ru) ? 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 ou(a);
2833
- }, ou = (a) => {
2832
+ return ru(a);
2833
+ }, ru = (a) => {
2834
2834
  const t = [];
2835
- for (let e, s = 0; s < a.length; s++) (e = au(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
- }, au = (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 hu = 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 lu(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 lu(a, t) {
2899
2899
  return n.length === 0;
2900
2900
  })(a, t)), s && e && t.length === 0;
2901
2901
  }
2902
- const cu = (a) => {
2902
+ const lu = (a) => {
2903
2903
  var t;
2904
- return (t = Ec[a]) !== null && t !== void 0 ? t : a;
2905
- }, uu = new RegExp("(".concat(de, ")"), "gi"), du = (a) => dn(a.replace(uu, " $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, ")"), fu = String.raw(ga || (ga = Ee(["(skewX)(", ")"], ["(skewX)\\(", "\\)"])), Nt), gu = String.raw(pa || (pa = Ee(["(skewY)(", ")"], ["(skewY)\\(", "\\)"])), Nt), pu = String.raw(ma || (ma = Ee(["(rotate)(", "(?: ", " ", ")?)"], ["(rotate)\\(", "(?: ", " ", ")?\\)"])), Nt, Nt, Nt), mu = String.raw(ba || (ba = Ee(["(scale)(", "(?: ", ")?)"], ["(scale)\\(", "(?: ", ")?\\)"])), Nt, Nt), bu = String.raw(va || (va = Ee(["(translate)(", "(?: ", ")?)"], ["(translate)\\(", "(?: ", ")?\\)"])), Nt, Nt), vu = String.raw(ya || (ya = Ee(["(matrix)(", " ", " ", " ", " ", " ", ")"], ["(matrix)\\(", " ", " ", " ", " ", " ", "\\)"])), Nt, Nt, Nt, Nt, Nt, Nt), ho = "(?:".concat(vu, "|").concat(bu, "|").concat(pu, "|").concat(mu, "|").concat(fu, "|").concat(gu, ")"), yu = "(?:".concat(ho, "*)"), _u = String.raw(_a || (_a = Ee(["^s*(?:", "?)s*$"], ["^\\s*(?:", "?)\\s*$"])), yu), wu = new RegExp(_u), xu = new RegExp(ho), Su = 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 = du(a).replace(/\s*([()])\s*/gi, "$1")) || a && !wu.test(a)) return [...Gt];
2911
- for (const e of a.matchAll(Su)) {
2912
- const s = xu.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 Cu(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 Cu(a, t, e, s) {
2958
2958
  } else r = "";
2959
2959
  return !i && isNaN(n) ? r : n;
2960
2960
  }
2961
- function Au(a, t) {
2962
- const e = a.match(Tc);
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 Tu(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 Tu(a) {
2980
2980
  }));
2981
2981
  })(e, t)), t;
2982
2982
  }
2983
- const Eu = { 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) lu(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)), Tu(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 = cu(l), u = Cu(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 && Au(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(Eu).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 ku = ["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 = at(i, ku);
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 = at(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 Mu = ["strategy"], Pu = ["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, gc, pc].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 = at(t, Mu);
3123
+ const n = at(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 = at(t, Pu), { canvas: h } = s;
3149
+ const { target: s, strategy: i, bubbles: n, prevStrategy: r } = t, o = at(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 Ou = ["type", "objects", "layoutManager"];
3167
- class Du 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 = at(t, Ou);
3341
+ let { type: s, objects: i = [], layoutManager: n } = t, r = at(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 Du() }));
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, ")"), Ru = "".concat(Us).concat(Us).concat(Us).concat(kr, "([01])").concat(kr, "([01])").concat(Us).concat(Us), Lu = { m: "l", M: "L" }, Fu = (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,23 +3387,23 @@ 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 Iu = (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 [];
3394
3394
  let y = 0, _ = 0, S = 0;
3395
- const A = Math.PI, T = v * Vr, k = pe(T), P = ge(T), N = 0.5 * (-P * d - k * f), F = 0.5 * (-P * f + k * d), I = g ** 2, O = p ** 2, D = F ** 2, H = N ** 2, M = I * O - I * D - O * H;
3395
+ const A = Math.PI, T = v * Vr, k = pe(T), P = ge(T), N = 0.5 * (-P * d - k * f), F = 0.5 * (-P * f + k * d), I = g ** 2, O = p ** 2, D = F ** 2, z = N ** 2, M = I * O - I * D - O * z;
3396
3396
  let R = Math.abs(g), W = Math.abs(p);
3397
3397
  if (M < 0) {
3398
3398
  const Wt = Math.sqrt(1 - M / (I * O));
3399
3399
  R *= Wt, W *= Wt;
3400
- } else S = (b === m ? -1 : 1) * Math.sqrt(M / (I * D + O * H));
3401
- const ot = S * R * F / W, ht = -S * W * N / R, E = P * ot - k * ht + 0.5 * d, z = k * ot + P * ht + 0.5 * f;
3400
+ } else S = (b === m ? -1 : 1) * Math.sqrt(M / (I * D + O * z));
3401
+ const ot = S * R * F / W, ht = -S * W * N / R, E = P * ot - k * ht + 0.5 * d, H = k * ot + P * ht + 0.5 * f;
3402
3402
  let V = wa(1, 0, (N - ot) / R, (F - ht) / W), J = wa((N - ot) / R, (F - ht) / W, (-N - ot) / R, (-F - ht) / W);
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 = [], B = J / At, ut = 8 / 3 * Math.sin(B / 4) * Math.sin(B / 4) / Math.sin(B / 2);
3405
3405
  let Tt = V + B;
3406
- for (let Wt = 0; Wt < At; Wt++) st[Wt] = Fu(V, Tt, P, k, R, W, E, z, ut, y, _), y = st[Wt][5], _ = st[Wt][6], V = Tt, Tt += B;
3406
+ for (let Wt = 0; Wt < At; Wt++) st[Wt] = Lu(V, Tt, P, k, R, W, E, H, ut, y, _), y = st[Wt][5], _ = st[Wt][6], V = Tt, Tt += B;
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 Iu = (a, t, e) => {
3459
3459
  case "a":
3460
3460
  c[6] += t, c[7] += e;
3461
3461
  case "A":
3462
- Iu(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 Iu = (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, Nu = (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
- }, ju = (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
- }, Bu = (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 Iu = (a, t, e) => {
3487
3487
  i += _n(s.x, s.y, r.x, r.y), s = r;
3488
3488
  }
3489
3489
  return i;
3490
- }, Hu = (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 Iu = (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 = Nu(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 = ju(i, n, l[1], l[2], l[3], l[4]), e = c, e.iterator = t, e.angleFinder = Bu(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 Iu = (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 Hu(i, t);
3532
+ return Bu(i, t);
3533
3533
  }
3534
- }, zu = new RegExp("[mzlhvcsqta][^mzlhvcsqta]*", "gi"), Sa = new RegExp(Ru, "g"), Gu = new RegExp(de, "gi"), Vu = { 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(zu)) !== 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 = Vu[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(Gu) || [];
3548
+ } else o = i.match(zu) || [];
3549
3549
  for (let h = 0; h < o.length; h += r) {
3550
- const l = new Array(r), c = Lu[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
- }, Wu = 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 Xu = (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 Uu = 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: Rc, enlivenObjectEnlivables: vi, enlivenObjects: Ds, findScaleToCover: $h, findScaleToFit: Yh, getBoundsOfCurve: Mr, getOrthonormalVector: io, getPathSegmentsInfo: co, getPointOnPath: tl, getPointer: ph, getRandomInt: Xu, 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 Uu = 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: Wu, 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 Uu = 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: hu, 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 Uu = Object.freeze({ __proto__: null, addTransformToObject: mh, animate: ro,
3638
3638
  }
3639
3639
  return i;
3640
3640
  }))), transformPoint: Mt });
3641
- class Yu 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 Yu(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) : Sc, 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 $u {
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 $u {
3964
3964
  this.clear(), this.__disposer(), delete this.__disposer;
3965
3965
  }
3966
3966
  }
3967
- const qu = ["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 qu = ["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
- }, Ku = { 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 $u(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 = at(e, qu);
4224
- const { targetIn: h, targetOut: l, canvasIn: c, canvasOut: u } = Ku[t], d = i !== s;
4223
+ let { target: s, oldTarget: i, fireCanvas: n, e: r } = e, o = at(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 }, Ju = 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 Zu = /\s*;\s*/, Qu = /\s*:\s*/;
4301
- function td(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(Zu);
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(Qu).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 ed(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(td(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 sd(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 sd(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" ? Ju : 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: sd(t, { width: s.viewBoxWidth || s.width, height: s.viewBoxHeight || s.height }), colorStops: ed(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 id = ["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 = at(t, id);
4447
+ let { type: s, source: i, patternTransform: n } = t, r = at(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 nd = ["path", "left", "top"], rd = ["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 = at(e, nd);
4456
+ let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, { path: s, left: i, top: n } = e, r = at(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({}, at(i, rd)), e), {}, { left: void 0, top: void 0 }));
4558
+ return new this(n, w(w(w({}, at(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 od = ["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({}, at(i, od)), {}, { radius: o, left: n - o, top: r - o }));
4601
+ return new this(w(w({}, at(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 ad = ["x1", "y1", "x2", "y2"], hd = ["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], at(i, ad));
4655
+ return new this([n, r, o, h], at(i, od));
4656
4656
  }
4657
4657
  static fromObject(t) {
4658
- let { x1: e, y1: s, x2: i, y2: n } = t, r = at(t, hd);
4658
+ let { x1: e, y1: s, x2: i, y2: n } = t, r = at(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 ld(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 cd = ["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(ld(t.getAttribute("points")), w(w({}, at(Be(t, this.ATTRIBUTE_NAMES, s), cd)), e));
4817
+ return new this(hd(t.getAttribute("points")), w(w({}, at(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", Cc);
4911
- const ud = / +/g, dd = /"/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 fd = ["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() {
@@ -5195,14 +5195,14 @@ class kt extends dl {
5195
5195
  for (let I = 0, O = d.length; I < O; I++) {
5196
5196
  const D = this.__charBounds[l][I];
5197
5197
  _ = this.getValueOfPropertyAt(l, I, e), S = this.getValueOfPropertyAt(l, I, wt), A = this.getValueOfPropertyAt(l, I, ls);
5198
- const H = this.getHeightOfChar(l, I), M = this.getValueOfPropertyAt(l, I, "deltaY");
5198
+ const z = this.getHeightOfChar(l, I), M = this.getValueOfPropertyAt(l, I, "deltaY");
5199
5199
  if (n && _ && S) {
5200
5200
  const R = this.fontSize * A / 1e3;
5201
- t.save(), t.fillStyle = v, t.translate(D.renderLeft, D.renderTop), t.rotate(D.angle), t.fillRect(-D.kernedWidth / 2, h * H + M - o * R, D.kernedWidth, R), t.restore();
5202
- } else if ((_ !== m || S !== v || H !== k || A !== y || M !== P) && b > 0) {
5201
+ t.save(), t.fillStyle = v, t.translate(D.renderLeft, D.renderTop), t.rotate(D.angle), t.fillRect(-D.kernedWidth / 2, h * z + M - o * R, D.kernedWidth, R), t.restore();
5202
+ } else if ((_ !== m || S !== v || z !== k || A !== y || M !== P) && b > 0) {
5203
5203
  const R = this.fontSize * y / 1e3;
5204
5204
  let W = i + g + p;
5205
- this.direction === "rtl" && (W = this.width - W - b), m && v && y && (t.fillStyle = v, t.fillRect(W, T + h * k + P - o * R, b, R)), p = D.left, b = D.width, m = _, y = A, v = S, k = H, P = M;
5205
+ this.direction === "rtl" && (W = this.width - W - b), m && v && y && (t.fillStyle = v, t.fillRect(W, T + h * k + P - o * R, b, R)), p = D.left, b = D.width, m = _, y = A, v = S, k = z, P = M;
5206
5206
  } else b += D.kernedWidth;
5207
5207
  }
5208
5208
  let N = i + g + p;
@@ -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 = at(n, fd), 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 = at(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", Ac), 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(dd, "'"), '" '), '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(ud)), 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 gd {
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 gd {
5425
5425
  }
5426
5426
  }
5427
5427
  const Ca = /[ \n\.,;!\?\-]/;
5428
- class pd 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 pd 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 md extends pd {
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 md extends pd {
5817
5817
  }
5818
5818
  }
5819
5819
  const Aa = (a) => !!a.button;
5820
- class bd extends md {
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 gd(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
- }, vd = 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 bd {
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 bd {
6034
6034
  this.exitEditingImpl(), this.draggableTextDelegate.dispose(), super.dispose();
6035
6035
  }
6036
6036
  }
6037
- x(Le, "ownDefaults", vd), 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: nu() };
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 yd 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 yd() });
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 _d {
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 wd() {
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 _d();
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 = wd()), ar;
6375
+ return !ar && (!(arguments.length > 0 && arguments[0] !== void 0) || arguments[0]) && (ar = _d()), ar;
6376
6376
  }
6377
- const xd = ["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 = at(t, xd);
6509
+ let { filters: s, resizeFilter: i, src: n, crossOrigin: r, type: o } = t, h = at(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 (!Mc.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:", ""), Sd = 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 Cd = ["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 && (Cd.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 Ad = ["linearGradient", "radialGradient", "svg:linearGradient", "svg:radialGradient"];
6567
- function Td(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 Td(a) {
6585
6585
  return e;
6586
6586
  }
6587
6587
  const Ma = (a) => L.getSVGClass(xn(a).toLowerCase());
6588
- class Ed {
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, Ad), 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 Ed {
6597
6597
  u && (h[u] = c);
6598
6598
  }
6599
6599
  return h;
6600
- })(i), this.cssRules = Td(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 Ed {
6640
6640
  } else delete t.clipPath;
6641
6641
  }
6642
6642
  }
6643
- const Pa = (a) => kc.test(xn(a)), Dr = () => ({ objects: [], elements: [], options: {}, allElements: [] });
6644
- async function kd(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;
@@ -6671,8 +6671,8 @@ async function kd(a, t) {
6671
6671
  if (!d.includes(N)) if (N === "style") {
6672
6672
  const I = {};
6673
6673
  Tr(F, I), Object.entries(_).forEach(((D) => {
6674
- let [H, M] = D;
6675
- I[H] = M;
6674
+ let [z, M] = D;
6675
+ I[z] = M;
6676
6676
  })), Tr(_.style || "", I);
6677
6677
  const O = Object.entries(I).map(((D) => D.join(":"))).join(";");
6678
6678
  v.setAttribute(N, O);
@@ -6683,7 +6683,7 @@ async function kd(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 && Sd.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 kd(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 Ed(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 Md(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) => kd(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", Pd = `
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
- }`), Od = ["type"], Dd = ["type"], Rd = 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 = at(arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, Od);
6718
+ let t = at(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 Pd;
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(Rd, 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(at(t, Dd));
6810
+ return new this(at(t, Od));
6811
6811
  }
6812
6812
  }
6813
6813
  x(Ct, "type", "BaseFilter"), x(Ct, "uniformLocations", []);
6814
- const Ld = { 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(Ld[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 Fd = { 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 Fd = { multiply: `
6930
6930
  color.a = color2.a;
6931
6931
  gl_FragColor = color;
6932
6932
  }
6933
- ` }, Id = ["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 Fd[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 = at(t, Id);
6991
+ let { type: s, image: i } = t, n = at(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 Nd = { 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 Nd[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 jd = { 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 jd[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 Bd = 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", Bd), 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;
@@ -7717,11 +7717,11 @@ class Yi extends Ct {
7717
7717
  lanczosResize(t, e, s, i, n) {
7718
7718
  const r = t.imageData.data, o = t.ctx.createImageData(i, n), h = o.data, l = this.lanczosCreate(this.lanczosLobes), c = this.rcpScaleX, u = this.rcpScaleY, d = 2 / this.rcpScaleX, f = 2 / this.rcpScaleY, g = Math.ceil(c * this.lanczosLobes / 2), p = Math.ceil(u * this.lanczosLobes / 2), b = {}, m = { x: 0, y: 0 }, v = { x: 0, y: 0 };
7719
7719
  return (function y(_) {
7720
- let S, A, T, k, P, N, F, I, O, D, H;
7720
+ let S, A, T, k, P, N, F, I, O, D, z;
7721
7721
  for (m.x = (_ + 0.5) * c, v.x = Math.floor(m.x), S = 0; S < n; S++) {
7722
7722
  for (m.y = (S + 0.5) * u, v.y = Math.floor(m.y), P = 0, N = 0, F = 0, I = 0, O = 0, A = v.x - g; A <= v.x + g; A++) if (!(A < 0 || A >= e)) {
7723
7723
  D = Math.floor(1e3 * Math.abs(A - m.x)), b[D] || (b[D] = {});
7724
- for (let M = v.y - p; M <= v.y + p; M++) M < 0 || M >= s || (H = Math.floor(1e3 * Math.abs(M - m.y)), b[D][H] || (b[D][H] = l(Math.sqrt(Math.pow(D * d, 2) + Math.pow(H * f, 2)) / 1e3)), T = b[D][H], T > 0 && (k = 4 * (M * e + A), P += T, N += T * r[k], F += T * r[k + 1], I += T * r[k + 2], O += T * r[k + 3]));
7724
+ for (let M = v.y - p; M <= v.y + p; M++) M < 0 || M >= s || (z = Math.floor(1e3 * Math.abs(M - m.y)), b[D][z] || (b[D][z] = l(Math.sqrt(Math.pow(D * d, 2) + Math.pow(z * f, 2)) / 1e3)), T = b[D][z], T > 0 && (k = 4 * (M * e + A), P += T, N += T * r[k], F += T * r[k + 1], I += T * r[k + 2], O += T * r[k + 3]));
7725
7725
  }
7726
7726
  k = 4 * (S * i + _), h[k] = N / P, h[k + 1] = F / P, h[k + 2] = I / P, h[k + 3] = O / P;
7727
7727
  }
@@ -7853,7 +7853,7 @@ ai.d(Y, {
7853
7853
  ),
7854
7854
  AnnotationLayer: () => (
7855
7855
  /* reexport */
7856
- Fg
7856
+ Lg
7857
7857
  ),
7858
7858
  AnnotationMode: () => (
7859
7859
  /* reexport */
@@ -7913,11 +7913,11 @@ ai.d(Y, {
7913
7913
  ),
7914
7914
  PasswordResponses: () => (
7915
7915
  /* reexport */
7916
- Vd
7916
+ Gd
7917
7917
  ),
7918
7918
  PermissionFlag: () => (
7919
7919
  /* reexport */
7920
- Gd
7920
+ zd
7921
7921
  ),
7922
7922
  PixelsPerInch: () => (
7923
7923
  /* reexport */
@@ -7953,11 +7953,11 @@ ai.d(Y, {
7953
7953
  ),
7954
7954
  build: () => (
7955
7955
  /* reexport */
7956
- pg
7956
+ gg
7957
7957
  ),
7958
7958
  createValidAbsoluteUrl: () => (
7959
7959
  /* reexport */
7960
- Yd
7960
+ Ud
7961
7961
  ),
7962
7962
  fetchData: () => (
7963
7963
  /* reexport */
@@ -7965,19 +7965,19 @@ ai.d(Y, {
7965
7965
  ),
7966
7966
  getDocument: () => (
7967
7967
  /* reexport */
7968
- og
7968
+ rg
7969
7969
  ),
7970
7970
  getFilenameFromUrl: () => (
7971
7971
  /* reexport */
7972
- sf
7972
+ ef
7973
7973
  ),
7974
7974
  getPdfFilenameFromUrl: () => (
7975
7975
  /* reexport */
7976
- nf
7976
+ sf
7977
7977
  ),
7978
7978
  getXfaPageViewport: () => (
7979
7979
  /* reexport */
7980
- rf
7980
+ nf
7981
7981
  ),
7982
7982
  isDataScheme: () => (
7983
7983
  /* reexport */
@@ -7993,7 +7993,7 @@ ai.d(Y, {
7993
7993
  ),
7994
7994
  normalizeUnicode: () => (
7995
7995
  /* reexport */
7996
- Qd
7996
+ Zd
7997
7997
  ),
7998
7998
  setLayerDimensions: () => (
7999
7999
  /* reexport */
@@ -8009,10 +8009,10 @@ ai.d(Y, {
8009
8009
  ),
8010
8010
  version: () => (
8011
8011
  /* reexport */
8012
- gg
8012
+ fg
8013
8013
  )
8014
8014
  });
8015
- 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], Hd = 1e7, dr = 1.35, Jt = {
8015
+ 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], Bd = 1e7, dr = 1.35, Jt = {
8016
8016
  ANY: 1,
8017
8017
  DISPLAY: 2,
8018
8018
  PRINT: 4,
@@ -8026,7 +8026,7 @@ const Dt = typeof process == "object" && process + "" == "[object process]" && !
8026
8026
  ENABLE: 1,
8027
8027
  ENABLE_FORMS: 2,
8028
8028
  ENABLE_STORAGE: 3
8029
- }, zd = "pdfjs_internal_editor_", q = {
8029
+ }, Hd = "pdfjs_internal_editor_", q = {
8030
8030
  DISABLE: -1,
8031
8031
  NONE: 0,
8032
8032
  FREETEXT: 3,
@@ -8048,7 +8048,7 @@ const Dt = typeof process == "object" && process + "" == "[object process]" && !
8048
8048
  HIGHLIGHT_FREE: 34,
8049
8049
  HIGHLIGHT_SHOW_ALL: 35,
8050
8050
  DRAW_STEP: 41
8051
- }, Gd = {
8051
+ }, zd = {
8052
8052
  PRINT: 4,
8053
8053
  MODIFY_CONTENTS: 8,
8054
8054
  COPY: 16,
@@ -8188,15 +8188,15 @@ const Dt = typeof process == "object" && process + "" == "[object process]" && !
8188
8188
  constructPath: 91,
8189
8189
  setStrokeTransparent: 92,
8190
8190
  setFillTransparent: 93
8191
- }, Vd = {
8191
+ }, Gd = {
8192
8192
  NEED_PASSWORD: 1,
8193
8193
  INCORRECT_PASSWORD: 2
8194
8194
  };
8195
8195
  let Hn = Bn.WARNINGS;
8196
- function Wd(a) {
8196
+ function Vd(a) {
8197
8197
  Number.isInteger(a) && (Hn = a);
8198
8198
  }
8199
- function Xd() {
8199
+ function Wd() {
8200
8200
  return Hn;
8201
8201
  }
8202
8202
  function zn(a) {
@@ -8211,7 +8211,7 @@ function rt(a) {
8211
8211
  function _t(a, t) {
8212
8212
  a || rt(t);
8213
8213
  }
8214
- function Ud(a) {
8214
+ function Xd(a) {
8215
8215
  switch (a?.protocol) {
8216
8216
  case "http:":
8217
8217
  case "https:":
@@ -8223,17 +8223,17 @@ function Ud(a) {
8223
8223
  return !1;
8224
8224
  }
8225
8225
  }
8226
- function Yd(a, t = null, e = null) {
8226
+ function Ud(a, t = null, e = null) {
8227
8227
  if (!a)
8228
8228
  return null;
8229
8229
  try {
8230
8230
  if (e && typeof a == "string" && (e.addDefaultProtocol && a.startsWith("www.") && a.match(/\./g)?.length >= 2 && (a = `http://${a}`), e.tryConvertEncoding))
8231
8231
  try {
8232
- a = Zd(a);
8232
+ a = Jd(a);
8233
8233
  } catch {
8234
8234
  }
8235
8235
  const s = t ? new URL(a, t) : new URL(a);
8236
- if (Ud(s))
8236
+ if (Xd(s))
8237
8237
  return s;
8238
8238
  } catch {
8239
8239
  }
@@ -8278,7 +8278,7 @@ class Sn extends qe {
8278
8278
  super(t, "UnexpectedResponseException"), this.status = e;
8279
8279
  }
8280
8280
  }
8281
- class $d extends qe {
8281
+ class Yd extends qe {
8282
8282
  constructor(t) {
8283
8283
  super(t, "FormatError");
8284
8284
  }
@@ -8307,7 +8307,7 @@ function Gn(a) {
8307
8307
  e[s] = a.charCodeAt(s) & 255;
8308
8308
  return e;
8309
8309
  }
8310
- function qd(a) {
8310
+ function $d(a) {
8311
8311
  return String.fromCharCode(a >> 24 & 255, a >> 16 & 255, a >> 8 & 255, a & 255);
8312
8312
  }
8313
8313
  function fo(a) {
@@ -8316,11 +8316,11 @@ function fo(a) {
8316
8316
  t[e] = s;
8317
8317
  return t;
8318
8318
  }
8319
- function Kd() {
8319
+ function qd() {
8320
8320
  const a = new Uint8Array(4);
8321
8321
  return a[0] = 1, new Uint32Array(a.buffer, 0, 1)[0] === 1;
8322
8322
  }
8323
- function Jd() {
8323
+ function Kd() {
8324
8324
  try {
8325
8325
  return new Function(""), !0;
8326
8326
  } catch {
@@ -8329,10 +8329,10 @@ function Jd() {
8329
8329
  }
8330
8330
  class zt {
8331
8331
  static get isLittleEndian() {
8332
- return Z(this, "isLittleEndian", Kd());
8332
+ return Z(this, "isLittleEndian", qd());
8333
8333
  }
8334
8334
  static get isEvalSupported() {
8335
- return Z(this, "isEvalSupported", Jd());
8335
+ return Z(this, "isEvalSupported", Kd());
8336
8336
  }
8337
8337
  static get isOffscreenCanvasSupported() {
8338
8338
  return Z(this, "isOffscreenCanvasSupported", typeof OffscreenCanvas < "u");
@@ -8419,21 +8419,21 @@ class G {
8419
8419
  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;
8420
8420
  }
8421
8421
  }
8422
- function Zd(a) {
8422
+ function Jd(a) {
8423
8423
  return decodeURIComponent(escape(a));
8424
8424
  }
8425
8425
  let pr = null, Ra = null;
8426
- function Qd(a) {
8426
+ function Zd(a) {
8427
8427
  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));
8428
8428
  }
8429
- function tf() {
8429
+ function Qd() {
8430
8430
  if (typeof crypto.randomUUID == "function")
8431
8431
  return crypto.randomUUID();
8432
8432
  const a = new Uint8Array(32);
8433
8433
  return crypto.getRandomValues(a), _l(a);
8434
8434
  }
8435
8435
  const go = "pdfjs_internal_id_";
8436
- function ef(a) {
8436
+ function tf(a) {
8437
8437
  return Uint8Array.prototype.toBase64 ? a.toBase64() : btoa(_l(a));
8438
8438
  }
8439
8439
  typeof Promise.try != "function" && (Promise.try = function(a, ...t) {
@@ -8570,10 +8570,10 @@ function Wn(a) {
8570
8570
  function mo(a) {
8571
8571
  return typeof a == "string" && /\.pdf$/i.test(a);
8572
8572
  }
8573
- function sf(a) {
8573
+ function ef(a) {
8574
8574
  return [a] = a.split(/[#?]/, 1), a.substring(a.lastIndexOf("/") + 1);
8575
8575
  }
8576
- function nf(a, t = "document.pdf") {
8576
+ function sf(a, t = "document.pdf") {
8577
8577
  if (typeof a != "string")
8578
8578
  return t;
8579
8579
  if (Wn(a))
@@ -8660,7 +8660,7 @@ class wl {
8660
8660
  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));
8661
8661
  }
8662
8662
  }
8663
- function rf(a, {
8663
+ function nf(a, {
8664
8664
  scale: t = 1,
8665
8665
  rotation: e = 0
8666
8666
  }) {
@@ -8682,7 +8682,7 @@ function bo(a) {
8682
8682
  }
8683
8683
  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]);
8684
8684
  }
8685
- function of(a) {
8685
+ function rf(a) {
8686
8686
  const t = document.createElement("span");
8687
8687
  t.style.visibility = "hidden", document.body.append(t);
8688
8688
  for (const e of a.keys()) {
@@ -8831,7 +8831,7 @@ class hi {
8831
8831
  this.#t.remove(), this.#e?.destroy(), this.#e = null;
8832
8832
  }
8833
8833
  }
8834
- class af {
8834
+ class of {
8835
8835
  #t = null;
8836
8836
  #e = null;
8837
8837
  #s;
@@ -8889,14 +8889,14 @@ function Cn(a, t, e) {
8889
8889
  for (const s of e)
8890
8890
  t.addEventListener(s, a[s].bind(a));
8891
8891
  }
8892
- class hf {
8892
+ class af {
8893
8893
  #t = 0;
8894
8894
  get id() {
8895
- return `${zd}${this.#t++}`;
8895
+ return `${Hd}${this.#t++}`;
8896
8896
  }
8897
8897
  }
8898
8898
  class vo {
8899
- #t = tf();
8899
+ #t = Qd();
8900
8900
  #e = 0;
8901
8901
  #s = null;
8902
8902
  static get _isSVGFittingCanvas() {
@@ -9008,7 +9008,7 @@ class vo {
9008
9008
  return t.startsWith(`image_${this.#t}_`);
9009
9009
  }
9010
9010
  }
9011
- class lf {
9011
+ class hf {
9012
9012
  #t = [];
9013
9013
  #e = !1;
9014
9014
  #s;
@@ -9128,7 +9128,7 @@ class yo {
9128
9128
  static _colorsMapping = /* @__PURE__ */ new Map([["CanvasText", [0, 0, 0]], ["Canvas", [255, 255, 255]]]);
9129
9129
  get _colors() {
9130
9130
  const t = /* @__PURE__ */ new Map([["CanvasText", null], ["Canvas", null]]);
9131
- return of(t), Z(this, "_colors", t);
9131
+ return rf(t), Z(this, "_colors", t);
9132
9132
  }
9133
9133
  convert(t) {
9134
9134
  const e = bo(t);
@@ -9152,7 +9152,7 @@ class Ye {
9152
9152
  #r = null;
9153
9153
  #n = null;
9154
9154
  #h = null;
9155
- #a = new lf();
9155
+ #a = new hf();
9156
9156
  #c = null;
9157
9157
  #l = null;
9158
9158
  #d = 0;
@@ -9170,7 +9170,7 @@ class Ye {
9170
9170
  #S = null;
9171
9171
  #A = !1;
9172
9172
  #E = null;
9173
- #M = new hf();
9173
+ #M = new af();
9174
9174
  #x = !1;
9175
9175
  #k = !1;
9176
9176
  #T = null;
@@ -9432,7 +9432,7 @@ class Ye {
9432
9432
  if (!t || t.isCollapsed)
9433
9433
  return;
9434
9434
  const s = this.#B(t).closest(".textLayer"), i = this.getSelectionBoxes(s);
9435
- i && (this.#E ||= new af(this), this.#E.show(s, i, this.direction === "ltr"));
9435
+ i && (this.#E ||= new of(this), this.#E.show(s, i, this.direction === "ltr"));
9436
9436
  }
9437
9437
  addToAnnotationStorage(t) {
9438
9438
  !t.isEmpty() && this.#n && !this.#n.has(t.id) && this.#n.setValue(t.id, t);
@@ -10478,7 +10478,7 @@ class U {
10478
10478
  return Z(this, "_defaultLineColor", this._colorManager.getHexCode("CanvasText"));
10479
10479
  }
10480
10480
  static deleteAnnotationElement(t) {
10481
- const e = new cf({
10481
+ const e = new lf({
10482
10482
  id: t.parent.getNextId(),
10483
10483
  parent: t.parent,
10484
10484
  uiManager: t._uiManager
@@ -10870,8 +10870,8 @@ class U {
10870
10870
  } else v ? k = Math.max(l, Math.min(1, Math.abs(_[0] - y[0] - N))) / o : P = Math.max(c, Math.min(1, Math.abs(_[1] - y[1] - F))) / h;
10871
10871
  const I = U._round(o * k), O = U._round(h * P);
10872
10872
  S = d(...b(I, O));
10873
- const D = A - S[0], H = T - S[1];
10874
- this.#o ||= [this.x, this.y, this.width, this.height], this.width = I, this.height = O, this.x = D, this.y = H, this.setDims(s * I, i * O), this.fixAndSetPosition(), this._onResizing();
10873
+ const D = A - S[0], z = T - S[1];
10874
+ this.#o ||= [this.x, this.y, this.width, this.height], this.width = I, this.height = O, this.x = D, this.y = z, this.setDims(s * I, i * O), this.fixAndSetPosition(), this._onResizing();
10875
10875
  }
10876
10876
  _onResizing() {
10877
10877
  }
@@ -11328,7 +11328,7 @@ class U {
11328
11328
  e?.nodeName === "DIV" && e.classList.contains("annotationContent") && e.remove();
11329
11329
  }
11330
11330
  }
11331
- class cf extends U {
11331
+ class lf extends U {
11332
11332
  constructor(t) {
11333
11333
  super(t), this.annotationElementId = t.annotationElementId, this.deleted = !0;
11334
11334
  }
@@ -11522,7 +11522,7 @@ class Sl extends _o {
11522
11522
  });
11523
11523
  }
11524
11524
  }
11525
- class uf {
11525
+ class cf {
11526
11526
  #t = /* @__PURE__ */ new Set();
11527
11527
  constructor({
11528
11528
  ownerDocument: t = globalThis.document,
@@ -11656,7 +11656,7 @@ class uf {
11656
11656
  let b = s(d, g);
11657
11657
  for (n = 0, r = u.length - 3; n < r; n += 4)
11658
11658
  b = b - p + s(u, n) | 0;
11659
- n < u.length && (b = b - p + s(u + "XXX", n) | 0), d = i(d, g, 4, qd(b));
11659
+ n < u.length && (b = b - p + s(u + "XXX", n) | 0), d = i(d, g, 4, $d(b));
11660
11660
  const m = `url(data:font/opentype;base64,${btoa(d)});`, v = `@font-face {font-family:"${u}";src:${m}}`;
11661
11661
  this.insertRule(v);
11662
11662
  const y = this._document.createElement("div");
@@ -11670,7 +11670,7 @@ class uf {
11670
11670
  });
11671
11671
  }
11672
11672
  }
11673
- class df {
11673
+ class uf {
11674
11674
  constructor(t, {
11675
11675
  disableFontFace: e = !1,
11676
11676
  fontExtraProperties: s = !1,
@@ -11698,7 +11698,7 @@ class df {
11698
11698
  createFontFaceRule() {
11699
11699
  if (!this.data || this.disableFontFace)
11700
11700
  return null;
11701
- const t = `url(data:${this.mimetype};base64,${ef(this.data)});`;
11701
+ const t = `url(data:${this.mimetype};base64,${tf(this.data)});`;
11702
11702
  let e;
11703
11703
  if (!this.cssFontInfo)
11704
11704
  e = `@font-face {font-family:"${this.loadedName}";src:${t}}`;
@@ -12064,7 +12064,7 @@ class Cl {
12064
12064
  rt("Abstract method `_createCanvas` called.");
12065
12065
  }
12066
12066
  }
12067
- class ff extends Cl {
12067
+ class df extends Cl {
12068
12068
  constructor({
12069
12069
  ownerDocument: t = globalThis.document,
12070
12070
  enableHWA: e = !1
@@ -12129,7 +12129,7 @@ class El {
12129
12129
  destroy(t = !1) {
12130
12130
  }
12131
12131
  }
12132
- class gf extends El {
12132
+ class ff extends El {
12133
12133
  #t;
12134
12134
  #e;
12135
12135
  #s;
@@ -12339,19 +12339,19 @@ async function Pl(a) {
12339
12339
  const e = await process.getBuiltinModule("fs").promises.readFile(a);
12340
12340
  return new Uint8Array(e);
12341
12341
  }
12342
- class pf extends El {
12342
+ class gf extends El {
12343
12343
  }
12344
- class mf extends Cl {
12344
+ class pf extends Cl {
12345
12345
  _createCanvas(t, e) {
12346
12346
  return process.getBuiltinModule("module").createRequire(import.meta.url)("@napi-rs/canvas").createCanvas(t, e);
12347
12347
  }
12348
12348
  }
12349
- class bf extends Al {
12349
+ class mf extends Al {
12350
12350
  async _fetch(t) {
12351
12351
  return Pl(t);
12352
12352
  }
12353
12353
  }
12354
- class vf extends kl {
12354
+ class bf extends kl {
12355
12355
  async _fetch(t) {
12356
12356
  return Pl(t);
12357
12357
  }
@@ -12372,7 +12372,7 @@ class wo {
12372
12372
  rt("Abstract method `getPattern` called.");
12373
12373
  }
12374
12374
  }
12375
- class yf extends wo {
12375
+ class vf extends wo {
12376
12376
  constructor(t) {
12377
12377
  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;
12378
12378
  }
@@ -12403,24 +12403,24 @@ function mr(a, t, e, s, i, n, r, o) {
12403
12403
  if (g >= v)
12404
12404
  return;
12405
12405
  const y = l[n], _ = l[n + 1], S = l[n + 2], A = l[r], T = l[r + 1], k = l[r + 2], P = l[o], N = l[o + 1], F = l[o + 2], I = Math.round(g), O = Math.round(v);
12406
- let D, H, M, R, W, ot, ht, E;
12407
- for (let z = I; z <= O; z++) {
12408
- if (z < b) {
12409
- const B = z < g ? 0 : (g - z) / (g - b);
12410
- D = f - (f - p) * B, H = y - (y - A) * B, M = _ - (_ - T) * B, R = S - (S - k) * B;
12406
+ let D, z, M, R, W, ot, ht, E;
12407
+ for (let H = I; H <= O; H++) {
12408
+ if (H < b) {
12409
+ const B = H < g ? 0 : (g - H) / (g - b);
12410
+ D = f - (f - p) * B, z = y - (y - A) * B, M = _ - (_ - T) * B, R = S - (S - k) * B;
12411
12411
  } else {
12412
12412
  let B;
12413
- z > v ? B = 1 : b === v ? B = 0 : B = (b - z) / (b - v), D = p - (p - m) * B, H = A - (A - P) * B, M = T - (T - N) * B, R = k - (k - F) * B;
12413
+ H > v ? B = 1 : b === v ? B = 0 : B = (b - H) / (b - v), D = p - (p - m) * B, z = A - (A - P) * B, M = T - (T - N) * B, R = k - (k - F) * B;
12414
12414
  }
12415
12415
  let V;
12416
- z < g ? V = 0 : z > v ? V = 1 : V = (g - z) / (g - v), W = f - (f - m) * V, ot = y - (y - P) * V, ht = _ - (_ - N) * V, E = S - (S - F) * V;
12416
+ H < g ? V = 0 : H > v ? V = 1 : V = (g - H) / (g - v), W = f - (f - m) * V, ot = y - (y - P) * V, ht = _ - (_ - N) * V, E = S - (S - F) * V;
12417
12417
  const J = Math.round(Math.min(D, W)), At = Math.round(Math.max(D, W));
12418
- let st = u * z + J * 4;
12418
+ let st = u * H + J * 4;
12419
12419
  for (let B = J; B <= At; B++)
12420
- V = (D - B) / (D - W), V < 0 ? V = 0 : V > 1 && (V = 1), c[st++] = H - (H - ot) * V | 0, c[st++] = M - (M - ht) * V | 0, c[st++] = R - (R - E) * V | 0, c[st++] = 255;
12420
+ V = (D - B) / (D - W), V < 0 ? V = 0 : V > 1 && (V = 1), c[st++] = z - (z - ot) * V | 0, c[st++] = M - (M - ht) * V | 0, c[st++] = R - (R - E) * V | 0, c[st++] = 255;
12421
12421
  }
12422
12422
  }
12423
- function _f(a, t, e) {
12423
+ function yf(a, t, e) {
12424
12424
  const s = t.coords, i = t.colors;
12425
12425
  let n, r;
12426
12426
  switch (t.type) {
@@ -12440,7 +12440,7 @@ function _f(a, t, e) {
12440
12440
  throw new Error("illegal figure");
12441
12441
  }
12442
12442
  }
12443
- class wf extends wo {
12443
+ class _f extends wo {
12444
12444
  constructor(t) {
12445
12445
  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;
12446
12446
  }
@@ -12459,7 +12459,7 @@ class wf extends wo {
12459
12459
  A[T] = e[0], A[T + 1] = e[1], A[T + 2] = e[2], A[T + 3] = 255;
12460
12460
  }
12461
12461
  for (const A of this._figures)
12462
- _f(_, A, p);
12462
+ yf(_, A, p);
12463
12463
  return y.putImageData(_, 2, 2), {
12464
12464
  canvas: v.canvas,
12465
12465
  offsetX: o - 2 * f,
@@ -12481,19 +12481,19 @@ class wf extends wo {
12481
12481
  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");
12482
12482
  }
12483
12483
  }
12484
- class xf extends wo {
12484
+ class wf extends wo {
12485
12485
  getPattern() {
12486
12486
  return "hotpink";
12487
12487
  }
12488
12488
  }
12489
- function Sf(a) {
12489
+ function xf(a) {
12490
12490
  switch (a[0]) {
12491
12491
  case "RadialAxial":
12492
- return new yf(a);
12492
+ return new vf(a);
12493
12493
  case "Mesh":
12494
- return new wf(a);
12494
+ return new _f(a);
12495
12495
  case "Dummy":
12496
- return new xf();
12496
+ return new wf();
12497
12497
  }
12498
12498
  throw new Error(`Unknown IR type: ${a[0]}`);
12499
12499
  }
@@ -12524,16 +12524,16 @@ class xo {
12524
12524
  let _ = g, S = p, A = !1, T = !1;
12525
12525
  const k = Math.ceil(h * v), P = Math.ceil(l * y), N = Math.ceil(g * v), F = Math.ceil(p * y);
12526
12526
  k >= N ? _ = h : A = !0, P >= F ? S = l : T = !0;
12527
- const I = this.getSizeAndScale(_, this.ctx.canvas.width, v), O = this.getSizeAndScale(S, this.ctx.canvas.height, y), D = t.cachedCanvases.getCanvas("pattern", I.size, O.size), H = D.context, M = o.createCanvasGraphics(H);
12528
- if (M.groupLevel = t.groupLevel, this.setFillAndStrokeStyleToContext(M, i, r), H.translate(-I.scale * c, -O.scale * u), M.transform(I.scale, 0, 0, O.scale, 0, 0), H.save(), this.clipBbox(M, c, u, d, f), M.baseTransform = ct(M.ctx), M.executeOperatorList(s), M.endDrawing(), H.restore(), A || T) {
12527
+ const I = this.getSizeAndScale(_, this.ctx.canvas.width, v), O = this.getSizeAndScale(S, this.ctx.canvas.height, y), D = t.cachedCanvases.getCanvas("pattern", I.size, O.size), z = D.context, M = o.createCanvasGraphics(z);
12528
+ if (M.groupLevel = t.groupLevel, this.setFillAndStrokeStyleToContext(M, i, r), z.translate(-I.scale * c, -O.scale * u), M.transform(I.scale, 0, 0, O.scale, 0, 0), z.save(), this.clipBbox(M, c, u, d, f), M.baseTransform = ct(M.ctx), M.executeOperatorList(s), M.endDrawing(), z.restore(), A || T) {
12529
12529
  const R = D.canvas;
12530
12530
  A && (_ = h), T && (S = l);
12531
- const W = this.getSizeAndScale(_, this.ctx.canvas.width, v), ot = this.getSizeAndScale(S, this.ctx.canvas.height, y), ht = W.size, E = ot.size, z = t.cachedCanvases.getCanvas("pattern-workaround", ht, E), V = z.context, J = A ? Math.floor(g / h) : 0, At = T ? Math.floor(p / l) : 0;
12531
+ const W = this.getSizeAndScale(_, this.ctx.canvas.width, v), ot = this.getSizeAndScale(S, this.ctx.canvas.height, y), ht = W.size, E = ot.size, H = t.cachedCanvases.getCanvas("pattern-workaround", ht, E), V = H.context, J = A ? Math.floor(g / h) : 0, At = T ? Math.floor(p / l) : 0;
12532
12532
  for (let st = 0; st <= J; st++)
12533
12533
  for (let B = 0; B <= At; B++)
12534
12534
  V.drawImage(R, ht * st, E * B, ht, E, 0, 0, ht, E);
12535
12535
  return {
12536
- canvas: z.canvas,
12536
+ canvas: H.canvas,
12537
12537
  scaleX: W.scale,
12538
12538
  scaleY: ot.scale,
12539
12539
  offsetX: c,
@@ -12572,7 +12572,7 @@ class xo {
12572
12572
  i.fillStyle = o, i.strokeStyle = o, n.fillColor = o, n.strokeColor = o;
12573
12573
  break;
12574
12574
  default:
12575
- throw new $d(`Unsupported paint type: ${e}`);
12575
+ throw new Yd(`Unsupported paint type: ${e}`);
12576
12576
  }
12577
12577
  }
12578
12578
  getPattern(t, e, s, i) {
@@ -12585,7 +12585,7 @@ class xo {
12585
12585
  return h.setTransform(o), h;
12586
12586
  }
12587
12587
  }
12588
- function Cf({
12588
+ function Sf({
12589
12589
  src: a,
12590
12590
  srcPos: t = 0,
12591
12591
  dest: e,
@@ -12613,8 +12613,8 @@ function Cf({
12613
12613
  destPos: f
12614
12614
  };
12615
12615
  }
12616
- const ja = 16, Ba = 100, Af = 15, Ha = 10, za = 1e3, Yt = 16;
12617
- function Tf(a, t) {
12616
+ const ja = 16, Ba = 100, Cf = 15, Ha = 10, za = 1e3, Yt = 16;
12617
+ function Af(a, t) {
12618
12618
  if (a._removeMirroring)
12619
12619
  throw new Error("Context is already forwarding operations.");
12620
12620
  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 = () => {
@@ -12651,7 +12651,7 @@ function Tf(a, t) {
12651
12651
  t.beginPath(), this.__originalBeginPath();
12652
12652
  };
12653
12653
  }
12654
- class Ef {
12654
+ class Tf {
12655
12655
  constructor(t) {
12656
12656
  this.canvasFactory = t, this.cache = /* @__PURE__ */ Object.create(null);
12657
12657
  }
@@ -12683,7 +12683,7 @@ function Ji(a, t, e, s, i, n, r, o, h, l) {
12683
12683
  const b = Math.hypot(c, u), m = Math.hypot(d, f);
12684
12684
  return [b * h, m * l];
12685
12685
  }
12686
- function kf(a) {
12686
+ function Ef(a) {
12687
12687
  const {
12688
12688
  width: t,
12689
12689
  height: e
@@ -12838,7 +12838,7 @@ function Wa(a, t) {
12838
12838
  const d = u < n ? Yt : i;
12839
12839
  ({
12840
12840
  srcPos: h
12841
- } = Cf({
12841
+ } = Sf({
12842
12842
  src: l,
12843
12843
  srcPos: h,
12844
12844
  dest: c,
@@ -12870,13 +12870,13 @@ function Xa(a, t) {
12870
12870
  const s = Math.fround((globalThis.devicePixelRatio || 1) * Fs.PDF_TO_CSS_UNITS);
12871
12871
  return e[0] <= s && e[1] <= s;
12872
12872
  }
12873
- const Mf = ["butt", "round", "square"], Pf = ["miter", "round", "bevel"], Of = {}, Ua = {};
12873
+ const kf = ["butt", "round", "square"], Mf = ["miter", "round", "bevel"], Pf = {}, Ua = {};
12874
12874
  class ks {
12875
12875
  constructor(t, e, s, i, n, {
12876
12876
  optionalContentConfig: r,
12877
12877
  markedContentStack: o = null
12878
12878
  }, h, l) {
12879
- 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 Ef(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();
12879
+ 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 Tf(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();
12880
12880
  }
12881
12881
  getObject(t, e = null) {
12882
12882
  return typeof t == "string" ? t.startsWith("g_") ? this.commonObjs.get(t) : this.objs.get(t) : e;
@@ -12900,7 +12900,7 @@ class ks {
12900
12900
  const h = n.length;
12901
12901
  if (h === o)
12902
12902
  return o;
12903
- const l = h - o > Ha && typeof s == "function", c = l ? Date.now() + Af : 0;
12903
+ const l = h - o > Ha && typeof s == "function", c = l ? Date.now() + Cf : 0;
12904
12904
  let u = 0;
12905
12905
  const d = this.commonObjs, f = this.objs;
12906
12906
  let g;
@@ -12996,10 +12996,10 @@ class ks {
12996
12996
  t !== this.current.lineWidth && (this._cachedScaleForStroking[0] = -1), this.current.lineWidth = t, this.ctx.lineWidth = t;
12997
12997
  }
12998
12998
  setLineCap(t) {
12999
- this.ctx.lineCap = Mf[t];
12999
+ this.ctx.lineCap = kf[t];
13000
13000
  }
13001
13001
  setLineJoin(t) {
13002
- this.ctx.lineJoin = Pf[t];
13002
+ this.ctx.lineJoin = Mf[t];
13003
13003
  }
13004
13004
  setMiterLimit(t) {
13005
13005
  this.ctx.miterLimit = t;
@@ -13069,7 +13069,7 @@ class ks {
13069
13069
  const t = this.ctx.canvas.width, e = this.ctx.canvas.height, s = "smaskGroupAt" + this.groupLevel, i = this.cachedCanvases.getCanvas(s, t, e);
13070
13070
  this.suspendedCtx = this.ctx, this.ctx = i.context;
13071
13071
  const n = this.ctx;
13072
- n.setTransform(...ct(this.suspendedCtx)), $s(this.suspendedCtx, n), Tf(n, this.suspendedCtx), this.setGState([["BM", "source-over"], ["ca", 1], ["CA", 1]]);
13072
+ n.setTransform(...ct(this.suspendedCtx)), $s(this.suspendedCtx, n), Af(n, this.suspendedCtx), this.setGState([["BM", "source-over"], ["ca", 1], ["CA", 1]]);
13073
13073
  }
13074
13074
  endSMaskMode() {
13075
13075
  if (!this.inSMaskMode)
@@ -13183,7 +13183,7 @@ class ks {
13183
13183
  this.consumePath();
13184
13184
  }
13185
13185
  clip() {
13186
- this.pendingClip = Of;
13186
+ this.pendingClip = Pf;
13187
13187
  }
13188
13188
  eoClip() {
13189
13189
  this.pendingClip = Ua;
@@ -13361,8 +13361,8 @@ class ks {
13361
13361
  this.paintChar(F.fontChar, M, R, m, v);
13362
13362
  }
13363
13363
  }
13364
- const H = d ? D * p - P * l : D * p + P * l;
13365
- S += H, k && n.restore();
13364
+ const z = d ? D * p - P * l : D * p + P * l;
13365
+ S += z, k && n.restore();
13366
13366
  }
13367
13367
  d ? e.y -= S : e.x += S * c, n.restore(), this.compose();
13368
13368
  }
@@ -13424,7 +13424,7 @@ class ks {
13424
13424
  }
13425
13425
  _getPattern(t, e = null) {
13426
13426
  let s;
13427
- return this.cachedPatterns.has(t) ? s = this.cachedPatterns.get(t) : (s = Sf(this.getObject(t)), this.cachedPatterns.set(t, s)), e && (s.matrix = e), s;
13427
+ return this.cachedPatterns.has(t) ? s = this.cachedPatterns.get(t) : (s = xf(this.getObject(t)), this.cachedPatterns.set(t, s)), e && (s.matrix = e), s;
13428
13428
  }
13429
13429
  shadingFill(t) {
13430
13430
  if (!this.contentVisible)
@@ -13530,7 +13530,7 @@ class ks {
13530
13530
  const e = t.count;
13531
13531
  t = this.getObject(t.data, t), t.count = e;
13532
13532
  const s = this.ctx, i = this.processingType3;
13533
- if (i && (i.compiled === void 0 && (i.compiled = kf(t)), i.compiled)) {
13533
+ if (i && (i.compiled === void 0 && (i.compiled = Ef(t)), i.compiled)) {
13534
13534
  i.compiled(s);
13535
13535
  return;
13536
13536
  }
@@ -13779,7 +13779,7 @@ class li {
13779
13779
  this.#e = t;
13780
13780
  }
13781
13781
  }
13782
- class Df {
13782
+ class Of {
13783
13783
  #t;
13784
13784
  #e;
13785
13785
  constructor({
@@ -13802,7 +13802,7 @@ class Df {
13802
13802
  }
13803
13803
  }
13804
13804
  const _s = Symbol("INTERNAL");
13805
- class Rf {
13805
+ class Df {
13806
13806
  #t = !1;
13807
13807
  #e = !1;
13808
13808
  #s = !1;
@@ -13830,7 +13830,7 @@ class Rf {
13830
13830
  t !== _s && rt("Internal method `_setVisible` called."), this.#s = s, this.#i = e;
13831
13831
  }
13832
13832
  }
13833
- class Lf {
13833
+ class Rf {
13834
13834
  #t = null;
13835
13835
  #e = /* @__PURE__ */ new Map();
13836
13836
  #s = null;
@@ -13839,7 +13839,7 @@ class Lf {
13839
13839
  if (this.renderingIntent = e, this.name = null, this.creator = null, t !== null) {
13840
13840
  this.name = t.name, this.creator = t.creator, this.#i = t.order;
13841
13841
  for (const s of t.groups)
13842
- this.#e.set(s.id, new Rf(e, s));
13842
+ this.#e.set(s.id, new Df(e, s));
13843
13843
  if (t.baseState === "OFF")
13844
13844
  for (const s of this.#e.values())
13845
13845
  s._setVisible(_s, !1);
@@ -13990,7 +13990,7 @@ class Lf {
13990
13990
  return this.#t = t.hexdigest();
13991
13991
  }
13992
13992
  }
13993
- class Ff {
13993
+ class Lf {
13994
13994
  constructor(t, {
13995
13995
  disableRange: e = !1,
13996
13996
  disableStream: s = !1
@@ -14059,12 +14059,12 @@ class Ff {
14059
14059
  getFullReader() {
14060
14060
  _t(!this._fullRequestReader, "PDFDataTransportStream.getFullReader can only be called once.");
14061
14061
  const t = this._queuedChunks;
14062
- return this._queuedChunks = null, new If(this, t, this._progressiveDone, this._contentDispositionFilename);
14062
+ return this._queuedChunks = null, new Ff(this, t, this._progressiveDone, this._contentDispositionFilename);
14063
14063
  }
14064
14064
  getRangeReader(t, e) {
14065
14065
  if (e <= this._progressiveDataLength)
14066
14066
  return null;
14067
- const s = new Nf(this, t, e);
14067
+ const s = new If(this, t, e);
14068
14068
  return this._pdfDataRangeTransport.requestDataRange(t, e), this._rangeReaders.push(s), s;
14069
14069
  }
14070
14070
  cancelAllRequests(t) {
@@ -14074,7 +14074,7 @@ class Ff {
14074
14074
  this._pdfDataRangeTransport.abort();
14075
14075
  }
14076
14076
  }
14077
- class If {
14077
+ class Ff {
14078
14078
  constructor(t, e, s = !1, i = null) {
14079
14079
  this._stream = t, this._done = s || !1, this._filename = mo(i) ? i : null, this._queuedChunks = e || [], this._loaded = 0;
14080
14080
  for (const n of this._queuedChunks)
@@ -14129,7 +14129,7 @@ class If {
14129
14129
  this._done || (this._done = !0);
14130
14130
  }
14131
14131
  }
14132
- class Nf {
14132
+ class If {
14133
14133
  constructor(t, e, s) {
14134
14134
  this._stream = t, this._begin = e, this._end = s, this._queuedChunk = null, this._requests = [], this._done = !1, this.onProgress = null;
14135
14135
  }
@@ -14181,7 +14181,7 @@ class Nf {
14181
14181
  this._requests.length = 0, this._stream._removeRangeReader(this);
14182
14182
  }
14183
14183
  }
14184
- function jf(a) {
14184
+ function Nf(a) {
14185
14185
  let t = !0, e = s("filename\\*", "i").exec(a);
14186
14186
  if (e) {
14187
14187
  e = e[1];
@@ -14302,7 +14302,7 @@ function Dl({
14302
14302
  function Rl(a) {
14303
14303
  const t = a.get("Content-Disposition");
14304
14304
  if (t) {
14305
- let e = jf(t);
14305
+ let e = Nf(t);
14306
14306
  if (e.includes("%"))
14307
14307
  try {
14308
14308
  e = decodeURIComponent(e);
@@ -14341,12 +14341,12 @@ class Ya {
14341
14341
  return this._fullRequestReader?._loaded ?? 0;
14342
14342
  }
14343
14343
  getFullReader() {
14344
- return _t(!this._fullRequestReader, "PDFFetchStream.getFullReader can only be called once."), this._fullRequestReader = new Bf(this), this._fullRequestReader;
14344
+ return _t(!this._fullRequestReader, "PDFFetchStream.getFullReader can only be called once."), this._fullRequestReader = new jf(this), this._fullRequestReader;
14345
14345
  }
14346
14346
  getRangeReader(t, e) {
14347
14347
  if (e <= this._progressiveDataLength)
14348
14348
  return null;
14349
- const s = new Hf(this, t, e);
14349
+ const s = new Bf(this, t, e);
14350
14350
  return this._rangeRequestReaders.push(s), s;
14351
14351
  }
14352
14352
  cancelAllRequests(t) {
@@ -14355,7 +14355,7 @@ class Ya {
14355
14355
  e.cancel(t);
14356
14356
  }
14357
14357
  }
14358
- class Bf {
14358
+ class jf {
14359
14359
  constructor(t) {
14360
14360
  this._stream = t, this._reader = null, this._loaded = 0, this._filename = null;
14361
14361
  const e = t.source;
@@ -14413,7 +14413,7 @@ class Bf {
14413
14413
  this._reader?.cancel(t), this._abortController.abort();
14414
14414
  }
14415
14415
  }
14416
- class Hf {
14416
+ class Bf {
14417
14417
  constructor(t, e, s) {
14418
14418
  this._stream = t, this._reader = null, this._loaded = 0;
14419
14419
  const i = t.source;
@@ -14454,11 +14454,11 @@ class Hf {
14454
14454
  }
14455
14455
  }
14456
14456
  const br = 200, vr = 206;
14457
- function zf(a) {
14457
+ function Hf(a) {
14458
14458
  const t = a.response;
14459
14459
  return typeof t != "string" ? t : Gn(t).buffer;
14460
14460
  }
14461
- class Gf {
14461
+ class zf {
14462
14462
  _responseOrigin = null;
14463
14463
  constructor({
14464
14464
  url: t,
@@ -14498,7 +14498,7 @@ class Gf {
14498
14498
  s.onError(i.status);
14499
14499
  return;
14500
14500
  }
14501
- const o = zf(i);
14501
+ const o = Hf(i);
14502
14502
  if (n === vr) {
14503
14503
  const h = i.getResponseHeader("Content-Range"), l = /bytes (\d+)-(\d+)\/(\d+)/.exec(h);
14504
14504
  l ? s.onDone({
@@ -14521,19 +14521,19 @@ class Gf {
14521
14521
  delete this.pendingRequests[t], e.abort();
14522
14522
  }
14523
14523
  }
14524
- class Vf {
14524
+ class Gf {
14525
14525
  constructor(t) {
14526
- this._source = t, this._manager = new Gf(t), this._rangeChunkSize = t.rangeChunkSize, this._fullRequestReader = null, this._rangeRequestReaders = [];
14526
+ this._source = t, this._manager = new zf(t), this._rangeChunkSize = t.rangeChunkSize, this._fullRequestReader = null, this._rangeRequestReaders = [];
14527
14527
  }
14528
14528
  _onRangeRequestReaderClosed(t) {
14529
14529
  const e = this._rangeRequestReaders.indexOf(t);
14530
14530
  e >= 0 && this._rangeRequestReaders.splice(e, 1);
14531
14531
  }
14532
14532
  getFullReader() {
14533
- return _t(!this._fullRequestReader, "PDFNetworkStream.getFullReader can only be called once."), this._fullRequestReader = new Wf(this._manager, this._source), this._fullRequestReader;
14533
+ return _t(!this._fullRequestReader, "PDFNetworkStream.getFullReader can only be called once."), this._fullRequestReader = new Vf(this._manager, this._source), this._fullRequestReader;
14534
14534
  }
14535
14535
  getRangeReader(t, e) {
14536
- const s = new Xf(this._manager, t, e);
14536
+ const s = new Wf(this._manager, t, e);
14537
14537
  return s.onClosed = this._onRangeRequestReaderClosed.bind(this), this._rangeRequestReaders.push(s), s;
14538
14538
  }
14539
14539
  cancelAllRequests(t) {
@@ -14542,7 +14542,7 @@ class Vf {
14542
14542
  e.cancel(t);
14543
14543
  }
14544
14544
  }
14545
- class Wf {
14545
+ class Vf {
14546
14546
  constructor(t, e) {
14547
14547
  this._manager = t, this._url = e.url, this._fullRequestId = t.request({
14548
14548
  onHeadersReceived: this._onHeadersReceived.bind(this),
@@ -14634,7 +14634,7 @@ class Wf {
14634
14634
  this._requests.length = 0, this._manager.isPendingRequest(this._fullRequestId) && this._manager.abortRequest(this._fullRequestId), this._fullRequestReader = null;
14635
14635
  }
14636
14636
  }
14637
- class Xf {
14637
+ class Wf {
14638
14638
  constructor(t, e, s) {
14639
14639
  this._manager = t, this._url = t.url, this._requestId = t.request({
14640
14640
  begin: e,
@@ -14707,27 +14707,27 @@ class Xf {
14707
14707
  this._requests.length = 0, this._manager.isPendingRequest(this._requestId) && this._manager.abortRequest(this._requestId), this._close();
14708
14708
  }
14709
14709
  }
14710
- const Uf = /^[a-z][a-z0-9\-+.]+:/i;
14711
- function Yf(a) {
14712
- if (Uf.test(a))
14710
+ const Xf = /^[a-z][a-z0-9\-+.]+:/i;
14711
+ function Uf(a) {
14712
+ if (Xf.test(a))
14713
14713
  return new URL(a);
14714
14714
  const t = process.getBuiltinModule("url");
14715
14715
  return new URL(t.pathToFileURL(a));
14716
14716
  }
14717
- class $f {
14717
+ class Yf {
14718
14718
  constructor(t) {
14719
- this.source = t, this.url = Yf(t.url), _t(this.url.protocol === "file:", "PDFNodeStream only supports file:// URLs."), this._fullRequestReader = null, this._rangeRequestReaders = [];
14719
+ this.source = t, this.url = Uf(t.url), _t(this.url.protocol === "file:", "PDFNodeStream only supports file:// URLs."), this._fullRequestReader = null, this._rangeRequestReaders = [];
14720
14720
  }
14721
14721
  get _progressiveDataLength() {
14722
14722
  return this._fullRequestReader?._loaded ?? 0;
14723
14723
  }
14724
14724
  getFullReader() {
14725
- return _t(!this._fullRequestReader, "PDFNodeStream.getFullReader can only be called once."), this._fullRequestReader = new qf(this), this._fullRequestReader;
14725
+ return _t(!this._fullRequestReader, "PDFNodeStream.getFullReader can only be called once."), this._fullRequestReader = new $f(this), this._fullRequestReader;
14726
14726
  }
14727
14727
  getRangeReader(t, e) {
14728
14728
  if (e <= this._progressiveDataLength)
14729
14729
  return null;
14730
- const s = new Kf(this, t, e);
14730
+ const s = new qf(this, t, e);
14731
14731
  return this._rangeRequestReaders.push(s), s;
14732
14732
  }
14733
14733
  cancelAllRequests(t) {
@@ -14736,7 +14736,7 @@ class $f {
14736
14736
  e.cancel(t);
14737
14737
  }
14738
14738
  }
14739
- class qf {
14739
+ class $f {
14740
14740
  constructor(t) {
14741
14741
  this._url = t.url, this._done = !1, this._storedError = null, this.onProgress = null;
14742
14742
  const e = t.source;
@@ -14800,7 +14800,7 @@ class qf {
14800
14800
  }), !this._isStreamingSupported && this._isRangeSupported && this._error(new Ue("streaming is disabled")), this._storedError && this._readableStream.destroy(this._storedError);
14801
14801
  }
14802
14802
  }
14803
- class Kf {
14803
+ class qf {
14804
14804
  constructor(t, e, s) {
14805
14805
  this._url = t.url, this._done = !1, this._storedError = null, this.onProgress = null, this._loaded = 0, this._readableStream = null, this._readCapability = Promise.withResolvers();
14806
14806
  const i = t.source;
@@ -14850,7 +14850,7 @@ class Kf {
14850
14850
  }), this._storedError && this._readableStream.destroy(this._storedError);
14851
14851
  }
14852
14852
  }
14853
- const Jf = 1e5, Xt = 30, Zf = 0.8;
14853
+ const Kf = 1e5, Xt = 30, Jf = 0.8;
14854
14854
  class Ft {
14855
14855
  #t = Promise.withResolvers();
14856
14856
  #e = null;
@@ -14963,7 +14963,7 @@ class Ft {
14963
14963
  this.#n.ctx ??= Ft.#k(this.#r);
14964
14964
  const e = this.#m, s = this.#o;
14965
14965
  for (const i of t) {
14966
- if (e.length > Jf) {
14966
+ if (e.length > Kf) {
14967
14967
  K("Ignoring additional textDivs for performance reasons."), this.#s = !0;
14968
14968
  return;
14969
14969
  }
@@ -15094,7 +15094,7 @@ class Ft {
15094
15094
  break;
15095
15095
  }
15096
15096
  i.canvas.width = i.canvas.height = 0;
15097
- const l = r ? r / (r + o) : Zf;
15097
+ const l = r ? r / (r + o) : Jf;
15098
15098
  return this.#_.set(t, l), l;
15099
15099
  }
15100
15100
  }
@@ -15126,8 +15126,8 @@ class pi {
15126
15126
  return !(t === "textarea" || t === "input" || t === "option" || t === "select");
15127
15127
  }
15128
15128
  }
15129
- const Qf = 65536, tg = 100, eg = 5e3, sg = Dt ? mf : ff, ig = Dt ? bf : Tl, ng = Dt ? pf : gf, rg = Dt ? vf : Ml;
15130
- function og(a = {}) {
15129
+ const Zf = 65536, Qf = 100, tg = 5e3, eg = Dt ? pf : df, sg = Dt ? mf : Tl, ig = Dt ? gf : ff, ng = Dt ? bf : Ml;
15130
+ function rg(a = {}) {
15131
15131
  typeof a == "string" || a instanceof URL ? a = {
15132
15132
  url: a
15133
15133
  } : (a instanceof ArrayBuffer || ArrayBuffer.isView(a)) && (a = {
@@ -15135,10 +15135,10 @@ function og(a = {}) {
15135
15135
  });
15136
15136
  const t = new So(), {
15137
15137
  docId: e
15138
- } = t, s = a.url ? ag(a.url) : null, i = a.data ? hg(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 : Qf;
15138
+ } = t, s = a.url ? og(a.url) : null, i = a.data ? ag(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 : Zf;
15139
15139
  let c = a.worker instanceof Ms ? a.worker : null;
15140
- 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 || ig, b = typeof a.standardFontDataUrl == "string" ? a.standardFontDataUrl : null, m = a.StandardFontDataFactory || rg, 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, N = a.enableXfa === !0, F = a.ownerDocument || globalThis.document, I = a.disableRange === !0, O = a.disableStream === !0, D = a.disableAutoFetch === !0, H = a.pdfBug === !0, M = a.CanvasFactory || sg, R = a.FilterFactory || ng, W = a.enableHWA === !0, ot = h ? h.length : a.length ?? NaN, ht = 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), z = null;
15141
- Wd(u);
15140
+ 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 || sg, b = typeof a.standardFontDataUrl == "string" ? a.standardFontDataUrl : null, m = a.StandardFontDataFactory || ng, 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, N = 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 || eg, R = a.FilterFactory || ig, W = a.enableHWA === !0, ot = h ? h.length : a.length ?? NaN, ht = 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;
15141
+ Vd(u);
15142
15142
  const V = {
15143
15143
  canvasFactory: new M({
15144
15144
  ownerDocument: F,
@@ -15190,8 +15190,8 @@ function og(a = {}) {
15190
15190
  disableFontFace: k,
15191
15191
  fontExtraProperties: P,
15192
15192
  ownerDocument: F,
15193
- pdfBug: H,
15194
- styleElement: z,
15193
+ pdfBug: z,
15194
+ styleElement: H,
15195
15195
  loadingParams: {
15196
15196
  disableAutoFetch: D,
15197
15197
  enableXfa: N
@@ -15205,7 +15205,7 @@ function og(a = {}) {
15205
15205
  const st = c.messageHandler.sendWithPromise("GetDocRequest", J, i ? [i.buffer] : null);
15206
15206
  let B;
15207
15207
  if (h)
15208
- B = new Ff(h, {
15208
+ B = new Lf(h, {
15209
15209
  disableRange: I,
15210
15210
  disableStream: O
15211
15211
  });
@@ -15219,9 +15219,9 @@ function og(a = {}) {
15219
15219
  throw new Error("getDocument - the Fetch API was disabled in Node.js, see `--no-experimental-fetch`.");
15220
15220
  ut = Ya;
15221
15221
  } else
15222
- ut = $f;
15222
+ ut = Yf;
15223
15223
  else
15224
- ut = ti(s) ? Ya : Vf;
15224
+ ut = ti(s) ? Ya : Gf;
15225
15225
  B = new ut({
15226
15226
  url: s,
15227
15227
  length: ot,
@@ -15237,12 +15237,12 @@ function og(a = {}) {
15237
15237
  throw new Error("Loading aborted");
15238
15238
  if (c.destroyed)
15239
15239
  throw new Error("Worker was destroyed");
15240
- const Tt = new ei(e, ut, c.port), Wt = new dg(Tt, t, B, At, V);
15240
+ const Tt = new ei(e, ut, c.port), Wt = new ug(Tt, t, B, At, V);
15241
15241
  t._transport = Wt, Tt.send("Ready", null);
15242
15242
  });
15243
15243
  }).catch(t._capability.reject), t;
15244
15244
  }
15245
- function ag(a) {
15245
+ function og(a) {
15246
15246
  if (a instanceof URL)
15247
15247
  return a.href;
15248
15248
  try {
@@ -15253,7 +15253,7 @@ function ag(a) {
15253
15253
  }
15254
15254
  throw new Error("Invalid PDF url data: either string or URL-object is expected in the url property.");
15255
15255
  }
15256
- function hg(a) {
15256
+ function ag(a) {
15257
15257
  if (Dt && typeof Buffer < "u" && a instanceof Buffer)
15258
15258
  throw new Error("Please provide binary data as `Uint8Array`, rather than `Buffer`.");
15259
15259
  if (a instanceof Uint8Array && a.byteLength === a.buffer.byteLength)
@@ -15332,7 +15332,7 @@ class Nl {
15332
15332
  abort() {
15333
15333
  }
15334
15334
  }
15335
- class lg {
15335
+ class hg {
15336
15336
  constructor(t, e) {
15337
15337
  this._pdfInfo = t, this._transport = e;
15338
15338
  }
@@ -15444,7 +15444,7 @@ class lg {
15444
15444
  return this._transport.getCalculationOrderIds();
15445
15445
  }
15446
15446
  }
15447
- class cg {
15447
+ class lg {
15448
15448
  #t = null;
15449
15449
  #e = !1;
15450
15450
  constructor(t, e, s, i = !1) {
@@ -15656,7 +15656,7 @@ class cg {
15656
15656
  if (t)
15657
15657
  return this.#t = setTimeout(() => {
15658
15658
  this.#t = null, this.#s(!1);
15659
- }, eg), !1;
15659
+ }, tg), !1;
15660
15660
  for (const {
15661
15661
  renderTasks: e,
15662
15662
  operatorList: s
@@ -15736,7 +15736,7 @@ class cg {
15736
15736
  if (t.renderTasks.size > 0)
15737
15737
  return;
15738
15738
  if (e instanceof po) {
15739
- let i = tg;
15739
+ let i = Qf;
15740
15740
  e.extraDelay > 0 && e.extraDelay < 1e3 && (i += e.extraDelay), t.streamReaderCancelTimeout = setTimeout(() => {
15741
15741
  t.streamReaderCancelTimeout = null, this._abortOperatorList({
15742
15742
  intentState: t,
@@ -15762,7 +15762,7 @@ class cg {
15762
15762
  return this._stats;
15763
15763
  }
15764
15764
  }
15765
- class ug {
15765
+ class cg {
15766
15766
  #t = /* @__PURE__ */ new Map();
15767
15767
  #e = Promise.resolve();
15768
15768
  postMessage(t, e) {
@@ -15805,7 +15805,7 @@ const lt = class lt {
15805
15805
  constructor({
15806
15806
  name: t = null,
15807
15807
  port: e = null,
15808
- verbosity: s = Xd()
15808
+ verbosity: s = Wd()
15809
15809
  } = {}) {
15810
15810
  bs(this, Ps);
15811
15811
  if (this.name = t, this.destroyed = !1, this.verbosity = s, this._readyCapability = Promise.withResolvers(), this._port = null, this._webWorker = null, this._messageHandler = null, e) {
@@ -15882,7 +15882,7 @@ const lt = class lt {
15882
15882
  this._readyCapability.reject(new Error("Worker was destroyed"));
15883
15883
  return;
15884
15884
  }
15885
- const e = new ug();
15885
+ const e = new cg();
15886
15886
  this._port = e;
15887
15887
  const s = `fake${Io(lt, An)._++}`, i = new ei(s + "_worker", s, e);
15888
15888
  t.setup(i, e), this._messageHandler = new ei(s, s + "_worker", e), Ci(this, Ps, rn).call(this);
@@ -15943,14 +15943,14 @@ An = new WeakMap(), ns = new WeakMap(), rs = new WeakMap(), Ps = new WeakSet(),
15943
15943
  }));
15944
15944
  };
15945
15945
  let Ms = lt;
15946
- class dg {
15946
+ class ug {
15947
15947
  #t = /* @__PURE__ */ new Map();
15948
15948
  #e = /* @__PURE__ */ new Map();
15949
15949
  #s = /* @__PURE__ */ new Map();
15950
15950
  #i = /* @__PURE__ */ new Map();
15951
15951
  #r = null;
15952
15952
  constructor(t, e, s, i, n) {
15953
- this.messageHandler = t, this.loadingTask = e, this.commonObjs = new jl(), this.fontLoader = new uf({
15953
+ this.messageHandler = t, this.loadingTask = e, this.commonObjs = new jl(), this.fontLoader = new cf({
15954
15954
  ownerDocument: i.ownerDocument,
15955
15955
  styleElement: i.styleElement
15956
15956
  }), 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();
@@ -16096,7 +16096,7 @@ class dg {
16096
16096
  }), t.on("GetDoc", ({
16097
16097
  pdfInfo: s
16098
16098
  }) => {
16099
- this._numPages = s.numPages, this._htmlForXfa = s.htmlForXfa, delete s.htmlForXfa, e._capability.resolve(new lg(s, this));
16099
+ this._numPages = s.numPages, this._htmlForXfa = s.htmlForXfa, delete s.htmlForXfa, e._capability.resolve(new hg(s, this));
16100
16100
  }), t.on("DocException", (s) => {
16101
16101
  e._capability.reject(Ut(s));
16102
16102
  }), t.on("PasswordRequest", (s) => {
@@ -16138,7 +16138,7 @@ class dg {
16138
16138
  K(`Error during font loading: ${d}`), this.commonObjs.resolve(s, d);
16139
16139
  break;
16140
16140
  }
16141
- const l = h && globalThis.FontInspector?.enabled ? (d, f) => globalThis.FontInspector.fontAdded(d, f) : null, c = new df(n, {
16141
+ const l = h && globalThis.FontInspector?.enabled ? (d, f) => globalThis.FontInspector.fontAdded(d, f) : null, c = new uf(n, {
16142
16142
  disableFontFace: r,
16143
16143
  fontExtraProperties: o,
16144
16144
  inspectFont: l
@@ -16179,7 +16179,7 @@ class dg {
16179
16179
  }
16180
16180
  switch (n) {
16181
16181
  case "Image":
16182
- o.objs.resolve(s, r), r?.dataLen > Hd && (o._maybeCleanupAfterRender = !0);
16182
+ o.objs.resolve(s, r), r?.dataLen > Bd && (o._maybeCleanupAfterRender = !0);
16183
16183
  break;
16184
16184
  case "Pattern":
16185
16185
  o.objs.resolve(s, r);
@@ -16237,7 +16237,7 @@ class dg {
16237
16237
  if (this.destroyed)
16238
16238
  throw new Error("Transport destroyed");
16239
16239
  n.refStr && this.#i.set(n.refStr, t);
16240
- const r = new cg(e, n, this, this._params.pdfBug);
16240
+ const r = new lg(e, n, this, this._params.pdfBug);
16241
16241
  return this.#e.set(e, r), r;
16242
16242
  });
16243
16243
  return this.#s.set(e, i), i;
@@ -16306,7 +16306,7 @@ class dg {
16306
16306
  return this.messageHandler.sendWithPromise("GetOutline", null);
16307
16307
  }
16308
16308
  getOptionalContentConfig(t) {
16309
- return this.#n("GetOptionalContentConfig").then((e) => new Lf(e, t));
16309
+ return this.#n("GetOptionalContentConfig").then((e) => new Rf(e, t));
16310
16310
  }
16311
16311
  getPermissions() {
16312
16312
  return this.messageHandler.sendWithPromise("GetPermissions", null);
@@ -16317,7 +16317,7 @@ class dg {
16317
16317
  return e;
16318
16318
  const s = this.messageHandler.sendWithPromise(t, null).then((i) => ({
16319
16319
  info: i[0],
16320
- metadata: i[1] ? new Df(i[1]) : null,
16320
+ metadata: i[1] ? new Of(i[1]) : null,
16321
16321
  contentDispositionFilename: this._fullReader?.filename ?? null,
16322
16322
  contentLength: this._fullReader?.contentLength ?? null
16323
16323
  }));
@@ -16391,7 +16391,7 @@ class jl {
16391
16391
  }
16392
16392
  }
16393
16393
  }
16394
- class fg {
16394
+ class dg {
16395
16395
  #t = null;
16396
16396
  constructor(t) {
16397
16397
  this.#t = t, this.onContinue = null;
@@ -16431,7 +16431,7 @@ class As {
16431
16431
  pdfBug: u = !1,
16432
16432
  pageColors: d = null
16433
16433
  }) {
16434
- 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 fg(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;
16434
+ 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 dg(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;
16435
16435
  }
16436
16436
  get completed() {
16437
16437
  return this.capability.promise.catch(function() {
@@ -16486,7 +16486,7 @@ class As {
16486
16486
  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())));
16487
16487
  }
16488
16488
  }
16489
- const gg = "4.10.38", pg = "f9bea397f";
16489
+ const fg = "4.10.38", gg = "f9bea397f";
16490
16490
  function qa(a) {
16491
16491
  return Math.floor(Math.max(0, Math.min(1, a)) * 255).toString(16).padStart(2, "0");
16492
16492
  }
@@ -16540,7 +16540,7 @@ class Ka {
16540
16540
  return ["CMYK", i, n, r, o];
16541
16541
  }
16542
16542
  }
16543
- class mg {
16543
+ class pg {
16544
16544
  create(t, e, s = !1) {
16545
16545
  if (t <= 0 || e <= 0)
16546
16546
  throw new Error("Invalid SVG dimensions");
@@ -16556,7 +16556,7 @@ class mg {
16556
16556
  rt("Abstract method `_createSVG` called.");
16557
16557
  }
16558
16558
  }
16559
- class Co extends mg {
16559
+ class Co extends pg {
16560
16560
  _createSVG(t) {
16561
16561
  return document.createElementNS(Me, t);
16562
16562
  }
@@ -16710,30 +16710,30 @@ class Bl {
16710
16710
  t.div.style.transform = e, t.div.hidden = !1;
16711
16711
  }
16712
16712
  }
16713
- const Si = 1e3, bg = 9, ds = /* @__PURE__ */ new WeakSet();
16713
+ const Si = 1e3, mg = 9, ds = /* @__PURE__ */ new WeakSet();
16714
16714
  function Ve(a) {
16715
16715
  return {
16716
16716
  width: a[2] - a[0],
16717
16717
  height: a[3] - a[1]
16718
16718
  };
16719
16719
  }
16720
- class vg {
16720
+ class bg {
16721
16721
  static create(t) {
16722
16722
  switch (t.data.annotationType) {
16723
16723
  case xt.LINK:
16724
16724
  return new Hl(t);
16725
16725
  case xt.TEXT:
16726
- return new yg(t);
16726
+ return new vg(t);
16727
16727
  case xt.WIDGET:
16728
16728
  switch (t.data.fieldType) {
16729
16729
  case "Tx":
16730
- return new _g(t);
16730
+ return new yg(t);
16731
16731
  case "Btn":
16732
- return t.data.radioButton ? new zl(t) : t.data.checkBox ? new xg(t) : new Sg(t);
16732
+ return t.data.radioButton ? new zl(t) : t.data.checkBox ? new wg(t) : new xg(t);
16733
16733
  case "Ch":
16734
- return new Cg(t);
16734
+ return new Sg(t);
16735
16735
  case "Sig":
16736
- return new wg(t);
16736
+ return new _g(t);
16737
16737
  }
16738
16738
  return new ms(t);
16739
16739
  case xt.POPUP:
@@ -16741,31 +16741,31 @@ class vg {
16741
16741
  case xt.FREETEXT:
16742
16742
  return new Gl(t);
16743
16743
  case xt.LINE:
16744
- return new Tg(t);
16744
+ return new Ag(t);
16745
16745
  case xt.SQUARE:
16746
- return new Eg(t);
16746
+ return new Tg(t);
16747
16747
  case xt.CIRCLE:
16748
- return new kg(t);
16748
+ return new Eg(t);
16749
16749
  case xt.POLYLINE:
16750
16750
  return new Vl(t);
16751
16751
  case xt.CARET:
16752
- return new Pg(t);
16752
+ return new Mg(t);
16753
16753
  case xt.INK:
16754
16754
  return new Ao(t);
16755
16755
  case xt.POLYGON:
16756
- return new Mg(t);
16756
+ return new kg(t);
16757
16757
  case xt.HIGHLIGHT:
16758
16758
  return new Wl(t);
16759
16759
  case xt.UNDERLINE:
16760
- return new Og(t);
16760
+ return new Pg(t);
16761
16761
  case xt.SQUIGGLY:
16762
- return new Dg(t);
16762
+ return new Og(t);
16763
16763
  case xt.STRIKEOUT:
16764
- return new Rg(t);
16764
+ return new Dg(t);
16765
16765
  case xt.STAMP:
16766
16766
  return new Xl(t);
16767
16767
  case xt.FILEATTACHMENT:
16768
- return new Lg(t);
16768
+ return new Rg(t);
16769
16769
  default:
16770
16770
  return new bt(t);
16771
16771
  }
@@ -17270,7 +17270,7 @@ class Hl extends bt {
17270
17270
  };
17271
17271
  }
17272
17272
  }
17273
- class yg extends bt {
17273
+ class vg extends bt {
17274
17274
  constructor(t) {
17275
17275
  super(t, {
17276
17276
  isRenderable: !0
@@ -17339,7 +17339,7 @@ class ms extends bt {
17339
17339
  _setTextStyle(t) {
17340
17340
  const e = ["left", "center", "right"], {
17341
17341
  fontColor: s
17342
- } = this.data.defaultAppearanceData, i = this.data.defaultAppearanceData.fontSize || bg, n = t.style;
17342
+ } = this.data.defaultAppearanceData, i = this.data.defaultAppearanceData.fontSize || mg, n = t.style;
17343
17343
  let r;
17344
17344
  const o = 2, h = (l) => Math.round(10 * l) / 10;
17345
17345
  if (this.data.multiLine) {
@@ -17355,7 +17355,7 @@ class ms extends bt {
17355
17355
  e ? t.setAttribute("required", !0) : t.removeAttribute("required"), t.setAttribute("aria-required", e);
17356
17356
  }
17357
17357
  }
17358
- class _g extends ms {
17358
+ class yg extends ms {
17359
17359
  constructor(t) {
17360
17360
  const e = t.renderForms || t.data.hasOwnCanvas || !t.data.hasAppearance && !!t.data.fieldValue;
17361
17361
  super(t, {
@@ -17555,14 +17555,14 @@ class _g extends ms {
17555
17555
  return this._setTextStyle(s), this._setBackgroundColor(s), this._setDefaultPropertiesFromJS(s), this.container.append(s), this.container;
17556
17556
  }
17557
17557
  }
17558
- class wg extends ms {
17558
+ class _g extends ms {
17559
17559
  constructor(t) {
17560
17560
  super(t, {
17561
17561
  isRenderable: !!t.data.hasOwnCanvas
17562
17562
  });
17563
17563
  }
17564
17564
  }
17565
- class xg extends ms {
17565
+ class wg extends ms {
17566
17566
  constructor(t) {
17567
17567
  super(t, {
17568
17568
  isRenderable: t.renderForms
@@ -17661,7 +17661,7 @@ class zl extends ms {
17661
17661
  return this._setBackgroundColor(n), this._setDefaultPropertiesFromJS(n), this.container.append(n), this.container;
17662
17662
  }
17663
17663
  }
17664
- class Sg extends Hl {
17664
+ class xg extends Hl {
17665
17665
  constructor(t) {
17666
17666
  super(t, {
17667
17667
  ignoreBorder: t.data.hasAppearance
@@ -17676,7 +17676,7 @@ class Sg extends Hl {
17676
17676
  })), t;
17677
17677
  }
17678
17678
  }
17679
- class Cg extends ms {
17679
+ class Sg extends ms {
17680
17680
  constructor(t) {
17681
17681
  super(t, {
17682
17682
  isRenderable: t.renderForms
@@ -17827,7 +17827,7 @@ class jr extends bt {
17827
17827
  }
17828
17828
  render() {
17829
17829
  this.container.classList.add("popupAnnotation");
17830
- const t = this.popup = new Ag({
17830
+ const t = this.popup = new Cg({
17831
17831
  container: this.container,
17832
17832
  color: this.data.color,
17833
17833
  titleObj: this.data.titleObj,
@@ -17845,7 +17845,7 @@ class jr extends bt {
17845
17845
  return this.container.setAttribute("aria-controls", e.map((s) => `${go}${s}`).join(",")), this.container;
17846
17846
  }
17847
17847
  }
17848
- class Ag {
17848
+ class Cg {
17849
17849
  #t = this.#E.bind(this);
17850
17850
  #e = this.#T.bind(this);
17851
17851
  #s = this.#k.bind(this);
@@ -18055,7 +18055,7 @@ class Gl extends bt {
18055
18055
  return !this.data.popupRef && this.hasPopupData && this._createPopup(), this._editOnDoubleClick(), this.container;
18056
18056
  }
18057
18057
  }
18058
- class Tg extends bt {
18058
+ class Ag extends bt {
18059
18059
  #t = null;
18060
18060
  constructor(t) {
18061
18061
  super(t, {
@@ -18078,7 +18078,7 @@ class Tg extends bt {
18078
18078
  this.container.classList.add("highlightArea");
18079
18079
  }
18080
18080
  }
18081
- class Eg extends bt {
18081
+ class Tg extends bt {
18082
18082
  #t = null;
18083
18083
  constructor(t) {
18084
18084
  super(t, {
@@ -18101,7 +18101,7 @@ class Eg extends bt {
18101
18101
  this.container.classList.add("highlightArea");
18102
18102
  }
18103
18103
  }
18104
- class kg extends bt {
18104
+ class Eg extends bt {
18105
18105
  #t = null;
18106
18106
  constructor(t) {
18107
18107
  super(t, {
@@ -18164,12 +18164,12 @@ class Vl extends bt {
18164
18164
  this.container.classList.add("highlightArea");
18165
18165
  }
18166
18166
  }
18167
- class Mg extends Vl {
18167
+ class kg extends Vl {
18168
18168
  constructor(t) {
18169
18169
  super(t), this.containerClassName = "polygonAnnotation", this.svgElementName = "svg:polygon";
18170
18170
  }
18171
18171
  }
18172
- class Pg extends bt {
18172
+ class Mg extends bt {
18173
18173
  constructor(t) {
18174
18174
  super(t, {
18175
18175
  isRenderable: !0,
@@ -18277,7 +18277,7 @@ class Wl extends bt {
18277
18277
  return !this.data.popupRef && this.hasPopupData && this._createPopup(), this.container.classList.add("highlightAnnotation"), this._editOnDoubleClick(), this.container;
18278
18278
  }
18279
18279
  }
18280
- class Og extends bt {
18280
+ class Pg extends bt {
18281
18281
  constructor(t) {
18282
18282
  super(t, {
18283
18283
  isRenderable: !0,
@@ -18289,7 +18289,7 @@ class Og extends bt {
18289
18289
  return !this.data.popupRef && this.hasPopupData && this._createPopup(), this.container.classList.add("underlineAnnotation"), this.container;
18290
18290
  }
18291
18291
  }
18292
- class Dg extends bt {
18292
+ class Og extends bt {
18293
18293
  constructor(t) {
18294
18294
  super(t, {
18295
18295
  isRenderable: !0,
@@ -18301,7 +18301,7 @@ class Dg extends bt {
18301
18301
  return !this.data.popupRef && this.hasPopupData && this._createPopup(), this.container.classList.add("squigglyAnnotation"), this.container;
18302
18302
  }
18303
18303
  }
18304
- class Rg extends bt {
18304
+ class Dg extends bt {
18305
18305
  constructor(t) {
18306
18306
  super(t, {
18307
18307
  isRenderable: !0,
@@ -18324,7 +18324,7 @@ class Xl extends bt {
18324
18324
  return this.container.classList.add("stampAnnotation"), this.container.setAttribute("role", "img"), !this.data.popupRef && this.hasPopupData && this._createPopup(), this._editOnDoubleClick(), this.container;
18325
18325
  }
18326
18326
  }
18327
- class Lg extends bt {
18327
+ class Rg extends bt {
18328
18328
  #t = null;
18329
18329
  constructor(t) {
18330
18330
  super(t, {
@@ -18363,7 +18363,7 @@ class Lg extends bt {
18363
18363
  this.downloadManager?.openOrDownloadData(this.content, this.filename);
18364
18364
  }
18365
18365
  }
18366
- class Fg {
18366
+ class Lg {
18367
18367
  #t = null;
18368
18368
  #e = null;
18369
18369
  #s = /* @__PURE__ */ new Map();
@@ -18427,7 +18427,7 @@ class Fg {
18427
18427
  continue;
18428
18428
  }
18429
18429
  n.data = r;
18430
- const h = vg.create(n);
18430
+ const h = bg.create(n);
18431
18431
  if (!h.isRenderable)
18432
18432
  continue;
18433
18433
  if (!o && r.popupRef) {
@@ -19231,7 +19231,7 @@ class Br {
19231
19231
  }
19232
19232
  n.push(d, f);
19233
19233
  }
19234
- return new Ig(i, this.#t, this.#e);
19234
+ return new Fg(i, this.#t, this.#e);
19235
19235
  }
19236
19236
  #n(t) {
19237
19237
  const e = this.#i;
@@ -19293,7 +19293,7 @@ class Br {
19293
19293
  return n;
19294
19294
  }
19295
19295
  }
19296
- class Ig extends j {
19296
+ class Fg extends j {
19297
19297
  #t;
19298
19298
  #e;
19299
19299
  constructor(t, e, s) {
@@ -19331,10 +19331,10 @@ class Ig extends j {
19331
19331
  }
19332
19332
  class Hr extends is {
19333
19333
  newFreeDrawOutline(t, e, s, i, n, r) {
19334
- return new Ng(t, e, s, i, n, r);
19334
+ return new Ig(t, e, s, i, n, r);
19335
19335
  }
19336
19336
  }
19337
- class Ng extends Ul {
19337
+ class Ig extends Ul {
19338
19338
  newOutliner(t, e, s, i, n, r = 0) {
19339
19339
  return new Hr(t, e, s, i, n, r);
19340
19340
  }
@@ -20121,7 +20121,7 @@ class gt extends U {
20121
20121
  return !1;
20122
20122
  }
20123
20123
  }
20124
- class jg {
20124
+ class Ng {
20125
20125
  #t = /* @__PURE__ */ Object.create(null);
20126
20126
  updateProperty(t, e) {
20127
20127
  this[t] = e, this.updateSVGProperty(t, e);
@@ -20561,7 +20561,7 @@ class X extends U {
20561
20561
  return !1;
20562
20562
  }
20563
20563
  }
20564
- class Bg {
20564
+ class jg {
20565
20565
  #t = new Float64Array(6);
20566
20566
  #e;
20567
20567
  #s;
@@ -21005,7 +21005,7 @@ class $n extends j {
21005
21005
  };
21006
21006
  }
21007
21007
  }
21008
- class To extends jg {
21008
+ class To extends Ng {
21009
21009
  #t;
21010
21010
  constructor(t) {
21011
21011
  super(), this.#t = t, super.updateProperties({
@@ -21050,7 +21050,7 @@ class Eo extends X {
21050
21050
  return Z(this, "typesMap", /* @__PURE__ */ new Map([[Q.INK_THICKNESS, "stroke-width"], [Q.INK_COLOR, "stroke"], [Q.INK_OPACITY, "stroke-opacity"]]));
21051
21051
  }
21052
21052
  static createDrawerInstance(t, e, s, i, n) {
21053
- return new Bg(t, e, s, i, n, this._defaultDrawingOptions["stroke-width"]);
21053
+ return new jg(t, e, s, i, n, this._defaultDrawingOptions["stroke-width"]);
21054
21054
  }
21055
21055
  static deserializeDraw(t, e, s, i, n, r) {
21056
21056
  return $n.deserialize(t, e, s, i, n, r);
@@ -22180,7 +22180,7 @@ Y.ColorPicker;
22180
22180
  Y.DOMSVGFactory;
22181
22181
  Y.DrawLayer;
22182
22182
  Y.FeatureTest;
22183
- var Hg = Y.GlobalWorkerOptions;
22183
+ var Bg = Y.GlobalWorkerOptions;
22184
22184
  Y.ImageKind;
22185
22185
  Y.InvalidPDFException;
22186
22186
  Y.MissingPDFException;
@@ -22202,7 +22202,7 @@ Y.XfaLayer;
22202
22202
  Y.build;
22203
22203
  Y.createValidAbsoluteUrl;
22204
22204
  Y.fetchData;
22205
- var zg = Y.getDocument;
22205
+ var Hg = Y.getDocument;
22206
22206
  Y.getFilenameFromUrl;
22207
22207
  Y.getPdfFilenameFromUrl;
22208
22208
  Y.getXfaPageViewport;
@@ -22213,19 +22213,19 @@ Y.normalizeUnicode;
22213
22213
  Y.setLayerDimensions;
22214
22214
  Y.shadow;
22215
22215
  Y.stopEvent;
22216
- var Gg = Y.version;
22216
+ var zg = Y.version;
22217
22217
  let Ja = null;
22218
- function Vg() {
22218
+ function Gg() {
22219
22219
  const a = document.createElement("div");
22220
22220
  a.style.width = "1in", document.body.append(a);
22221
22221
  const t = a.offsetWidth;
22222
22222
  return a.remove(), t;
22223
22223
  }
22224
- function Wg() {
22225
- const a = Ja ?? Vg();
22224
+ function Vg() {
22225
+ const a = Ja ?? Gg();
22226
22226
  return Ja = a, a / 72;
22227
22227
  }
22228
- function Xg(a, t = 500) {
22228
+ function Wg(a, t = 500) {
22229
22229
  if (typeof a != "function") throw new TypeError("The first argument is not a function.");
22230
22230
  let e = null;
22231
22231
  return function(...s) {
@@ -22234,126 +22234,124 @@ function Xg(a, t = 500) {
22234
22234
  }, t);
22235
22235
  };
22236
22236
  }
22237
- function Ug(a) {
22238
- return new Promise((t, e) => {
22237
+ function Xg(a) {
22238
+ return a.arrayBuffer ? a.arrayBuffer() : new Promise((t, e) => {
22239
22239
  const s = new FileReader();
22240
- s.addEventListener("load", () => t(s.result)), s.addEventListener("error", e), s.readAsArrayBuffer(a);
22240
+ s.addEventListener("load", () => {
22241
+ const i = s.result;
22242
+ if (!(i instanceof ArrayBuffer)) {
22243
+ e(new Error("Failed to read file as ArrayBuffer."));
22244
+ return;
22245
+ }
22246
+ t(i);
22247
+ }), s.addEventListener("error", e), s.readAsArrayBuffer(a);
22241
22248
  });
22242
22249
  }
22243
- $l() || (Hg.workerSrc = `https://cdnjs.cloudflare.com/ajax/libs/pdf.js/${Gg}/pdf.worker.min.mjs`);
22244
- async function Yl(a) {
22245
- const t = await Ug(a);
22246
- if (t instanceof ArrayBuffer)
22247
- return t;
22248
- }
22249
- function $l() {
22250
+ Yl() || (Bg.workerSrc = `https://cdnjs.cloudflare.com/ajax/libs/pdf.js/${zg}/pdf.worker.min.mjs`);
22251
+ function Yl() {
22250
22252
  try {
22251
22253
  return typeof OffscreenCanvas < "u" && typeof HTMLCanvasElement < "u" && typeof HTMLCanvasElement.prototype.transferControlToOffscreen == "function";
22252
22254
  } catch {
22253
22255
  return !1;
22254
22256
  }
22255
22257
  }
22256
- async function Yg({ page: a, data: t, scale: e, password: s }, i) {
22257
- const n = Wg() / window.devicePixelRatio;
22258
- if ($l()) {
22259
- const r = new Worker(new URL(
22258
+ async function Ug({ page: a, data: t, scale: e, password: s }, i) {
22259
+ const n = Vg() / window.devicePixelRatio, r = await Xg(t);
22260
+ if (Yl()) {
22261
+ const o = new Worker(new URL(
22260
22262
  /* @vite-ignore */
22261
22263
  "" + new URL("assets/pdfjs.worker-DawqtvLM.js", import.meta.url).href,
22262
22264
  import.meta.url
22263
22265
  ), { type: "module" });
22264
- return r.postMessage({ data: t, password: s, id: i, page: a, units: n, scale: e }), await new Promise((h) => {
22265
- r.addEventListener("message", ({ data: l }) => {
22266
- if (l.status === "success")
22267
- if (l.bitmap) {
22268
- const c = document.createElement("canvas"), u = c.getContext("bitmaprenderer");
22269
- c.width = l.width, c.height = l.height, u?.transferFromImageBitmap(l.bitmap), h({ pages: l.pages, canvas: c });
22266
+ return o.postMessage({ data: r, password: s, id: i, page: a, units: n, scale: e }), await new Promise((l) => {
22267
+ o.addEventListener("message", ({ data: c }) => {
22268
+ if (c.status === "success")
22269
+ if (c.bitmap) {
22270
+ const u = document.createElement("canvas"), d = u.getContext("bitmaprenderer");
22271
+ u.width = c.width, u.height = c.height, d?.transferFromImageBitmap(c.bitmap), l({ pages: c.pages, canvas: u });
22270
22272
  } else
22271
- h({ pages: l.pages, canvas: null });
22273
+ l({ pages: c.pages, canvas: null });
22272
22274
  });
22273
22275
  });
22274
22276
  } else {
22275
- const r = await zg({ data: t, password: s }).promise, o = r.numPages;
22276
- if (!i) return { canvas: null, pages: o };
22277
- const h = await r.getPage(a), l = h.getViewport({ scale: e }), c = document.createElement("canvas"), d = {
22278
- canvasContext: c.getContext("2d"),
22279
- viewport: l,
22277
+ const o = await Hg({ data: r, password: s }).promise, h = o.numPages;
22278
+ if (!i) return { canvas: null, pages: h };
22279
+ const l = await o.getPage(a), c = l.getViewport({ scale: e }), u = document.createElement("canvas"), f = {
22280
+ canvasContext: u.getContext("2d"),
22281
+ viewport: c,
22280
22282
  transform: [n, 0, 0, n, 0, 0]
22281
22283
  };
22282
- return c.width = Math.floor(l.width * n), c.height = Math.floor(l.height * n), h.render(d).promise.then(() => ({ canvas: c, pages: o }));
22284
+ return u.width = Math.floor(c.width * n), u.height = Math.floor(c.height * n), l.render(f).promise.then(() => ({ canvas: u, pages: h }));
22283
22285
  }
22284
22286
  }
22285
22287
  const jt = /* @__PURE__ */ new Map();
22286
- function $g(a) {
22288
+ function Yg(a) {
22287
22289
  const t = new Pr(a);
22288
22290
  return jt.set(a, t), t;
22289
22291
  }
22290
- function qg(a, t) {
22291
- const e = Date.now();
22292
+ function $g(a) {
22293
+ const t = Date.now();
22292
22294
  return {
22293
- PDFId: `${a.name}-${e}`,
22295
+ PDFId: `${a.name}-${t}`,
22294
22296
  name: a.name.replace(/.pdf/, ""),
22295
- updateDate: e,
22296
- data: t,
22297
- type: a.type
22297
+ updateDate: t,
22298
+ data: a
22298
22299
  };
22299
22300
  }
22300
- async function Kg({ src: a }, t, e) {
22301
+ async function qg({ src: a }, t, e) {
22301
22302
  if (!a || !e) return null;
22302
- const { objects: s, options: i } = await Md(a), n = s.filter((o) => o !== null), r = Uu.groupSVGElements(n, i);
22303
+ const { objects: s, options: i } = await kd(a), n = s.filter((o) => o !== null), r = Xu.groupSVGElements(n, i);
22303
22304
  return n.forEach((o) => {
22304
22305
  o.stroke = e;
22305
22306
  }), r.hoverCursor = "pointer", r.stroke = `${e}-${t}`, r;
22306
22307
  }
22307
- function Jg(a, t) {
22308
+ function Kg(a, t) {
22308
22309
  if (!jt.get(a)) return;
22309
- const s = 1 / 3, i = np(t, s);
22310
- Kl(a, i, s);
22310
+ const s = 1 / 3, i = ip(t, s);
22311
+ ql(a, i, s);
22311
22312
  }
22312
- async function Zg(a, t) {
22313
- const e = await Yl(a);
22314
- if (!e) return;
22315
- const s = Date.now(), n = {
22316
- PDFId: `${a.name}-${s}`,
22313
+ async function Jg(a, t) {
22314
+ const e = Date.now(), i = {
22315
+ PDFId: `${a.name}-${e}`,
22317
22316
  name: a.name.replace(/.png|.jpg|.jpeg/, ""),
22318
- updateDate: s,
22319
- data: e,
22320
- type: a.type
22317
+ updateDate: e,
22318
+ data: a
22321
22319
  };
22322
- return t && ql(t, { data: e, type: a.type }), { ...n, pages: 1 };
22320
+ return t && $l(t, { data: a }), { ...i, pages: 1 };
22323
22321
  }
22324
- async function ql(a, { data: t, type: e, scale: s = 0.5 }) {
22322
+ async function $l(a, { data: t, scale: e = 0.5 }) {
22325
22323
  if (!jt.get(a)) return;
22326
- const n = new Blob([t], { type: e }), r = URL.createObjectURL(n), o = await Pt.fromURL(r);
22327
- o.scale(s), Kl(a, o, s), URL.revokeObjectURL(r);
22324
+ const i = URL.createObjectURL(t), n = await Pt.fromURL(i);
22325
+ n.scale(e), ql(a, n, e), URL.revokeObjectURL(i);
22328
22326
  }
22329
- function Kl(a, t, e) {
22327
+ function ql(a, t, e) {
22330
22328
  const s = jt.get(a);
22331
22329
  s && (s.setWidth(t.width * e), s.setHeight(t.height * e), s.backgroundImage = t, s.renderAll());
22332
22330
  }
22333
- function Qg(a, t) {
22331
+ function Zg(a, t) {
22334
22332
  if (!t) return;
22335
22333
  const { oCoords: e } = a;
22336
22334
  if (!e) return;
22337
22335
  const { x: s, y: i } = e.tl.touchCorner.tl, { height: n, width: r, scaleY: o, scaleX: h } = t;
22338
22336
  t.top = i - n * o / 2, t.left = s - r * h / 2, t.setCoords();
22339
22337
  }
22340
- function tp(a, t, e) {
22341
- !e || !a || (e.scale(1 / t), Qg(a, e));
22338
+ function Qg(a, t, e) {
22339
+ !e || !a || (e.scale(1 / t), Zg(a, e));
22342
22340
  }
22343
- function ep(a, t) {
22341
+ function tp(a, t) {
22344
22342
  if (!a) return;
22345
22343
  const e = a._cornerSize || 6;
22346
22344
  a.borderScaleFactor = 1 / t, a.cornerSize = e * (1 / t), a.touchCornerSize = e * 4 * (1 / t), a.setCoords();
22347
22345
  }
22348
- function sp(a) {
22346
+ function ep(a) {
22349
22347
  const t = jt.get(a);
22350
22348
  t && (t.discardActiveObject(), t.renderAll());
22351
22349
  }
22352
- function ip(a) {
22350
+ function sp(a) {
22353
22351
  const t = jt.get(a);
22354
22352
  t && (t.clear(), jt.delete(a));
22355
22353
  }
22356
- function np(a, t) {
22354
+ function ip(a, t) {
22357
22355
  return new Pt(a, { scaleX: t, scaleY: t });
22358
22356
  }
22359
22357
  function zr(a, t) {
@@ -22361,27 +22359,25 @@ function zr(a, t) {
22361
22359
  const { left: e, top: s, scaleX: i, scaleY: n, width: r, height: o } = a, h = t.x * r * i, l = t.y * o * n;
22362
22360
  a.set({ left: e - h, top: s - l });
22363
22361
  }
22364
- function rp(a, t, e) {
22362
+ function np(a, t, e) {
22365
22363
  const s = a.type;
22366
22364
  return {
22367
- "application/pdf": op,
22365
+ "application/pdf": rp,
22368
22366
  "image/png": Za,
22369
22367
  "image/jpeg": Za
22370
22368
  }[s]?.(a, t, e) ?? Promise.reject(new Error(`Unsupported ${s} file type.`));
22371
22369
  }
22372
- async function op(a, t, e) {
22373
- const s = await Yl(a);
22374
- if (!s) return;
22375
- const i = qg(a, s), n = await Jl({ page: 1, data: s, scale: 0.8, password: t }, e);
22376
- return { ...i, pages: n };
22370
+ async function rp(a, t, e) {
22371
+ const s = $g(a), i = await Kl({ page: 1, data: a, scale: 0.8, password: t }, e);
22372
+ return { ...s, pages: i };
22377
22373
  }
22378
- function Jl(a, t) {
22379
- return Yg(a, t).then(({ canvas: e, pages: s }) => (e && t && Jg(t, e), s));
22374
+ function Kl(a, t) {
22375
+ return Ug(a, t).then(({ canvas: e, pages: s }) => (e && t && Kg(t, e), s));
22380
22376
  }
22381
22377
  async function Za(a, t, e) {
22382
- return await Zg(a, e);
22378
+ return await Jg(a, e);
22383
22379
  }
22384
- function ap(a, t) {
22380
+ function op(a, t) {
22385
22381
  const e = jt.get(a);
22386
22382
  if (!e) return;
22387
22383
  const s = e.getActiveObject();
@@ -22389,17 +22385,17 @@ function ap(a, t) {
22389
22385
  i.set(t);
22390
22386
  }) : s.set(t), e.renderAll());
22391
22387
  }
22392
- async function hp(a, t) {
22388
+ async function ap(a, t) {
22393
22389
  const e = jt.get(a);
22394
22390
  if (!e) return;
22395
22391
  const s = e?.getActiveObject();
22396
22392
  if (!s) return;
22397
- const i = await s.clone(cc);
22393
+ const i = await s.clone(lc);
22398
22394
  i instanceof Qt ? i.forEachObject((n) => {
22399
22395
  e.add(n), t(e, n);
22400
22396
  }) : (e.add(i), t(e, i)), zr(i, { x: -0.1, y: -0.1 }), e.setActiveObject(i);
22401
22397
  }
22402
- function lp(a) {
22398
+ function hp(a) {
22403
22399
  const t = jt.get(a);
22404
22400
  if (!t) return;
22405
22401
  const e = t.getActiveObject();
@@ -22407,7 +22403,7 @@ function lp(a) {
22407
22403
  t.remove(s);
22408
22404
  }), t.discardActiveObject()) : t.remove(e));
22409
22405
  }
22410
- function cp(a) {
22406
+ function lp(a) {
22411
22407
  const {
22412
22408
  id: t = "",
22413
22409
  selectionOptions: e,
@@ -22416,56 +22412,56 @@ function cp(a) {
22416
22412
  pointerUp: n,
22417
22413
  selectionCreated: r,
22418
22414
  selectionCleared: o
22419
- } = a || {}, h = ws(null), l = ws(null), c = ws(1), u = ws({ ...lc });
22415
+ } = a || {}, h = ws(null), l = ws(null), c = ws(1), u = ws({ ...hc });
22420
22416
  function d() {
22421
22417
  if (!t || jt.has(t)) return;
22422
- const O = $g(t);
22418
+ const O = Yg(t);
22423
22419
  return O.on("selection:created", (D) => {
22424
22420
  if (r?.(D), D.selected.length <= 1) return;
22425
- const H = O.getActiveObject();
22426
- H && (l.current = H, e?.value && l.current.set(e.value), l.current._cornerSize = l.current.cornerSize, S(c.current));
22421
+ const z = O.getActiveObject();
22422
+ z && (l.current = z, e?.value && l.current.set(e.value), l.current._cornerSize = l.current.cornerSize, S(c.current));
22427
22423
  }), O.on("selection:cleared", (D) => {
22428
22424
  o?.(D), T(O);
22429
22425
  }), s && O.on("mouse:down", s), i && O.on("mouse:move", i), n && O.on("mouse:up", n), O;
22430
22426
  }
22431
22427
  function f(O, D) {
22432
- return rp(O, D, t);
22428
+ return np(O, D, t);
22433
22429
  }
22434
22430
  function g(O) {
22435
- return Jl(O, t);
22431
+ return Kl(O, t);
22436
22432
  }
22437
- function p({ data: O, type: D, scale: H = 0.5 }) {
22438
- return ql(t, { data: O, type: D, scale: H });
22433
+ function p({ data: O, scale: D = 0.5 }) {
22434
+ return $l(t, { data: O, scale: D });
22439
22435
  }
22440
- async function b(O, D, H) {
22436
+ async function b(O, D, z) {
22441
22437
  const M = jt.get(t);
22442
22438
  if (!M) return;
22443
- const R = await Pt.fromURL(O, {}, { ...oc, ...D });
22444
- zr(R, H), M.add(R), v(M, R), M.setActiveObject(R);
22439
+ const R = await Pt.fromURL(O, {}, { ...rc, ...D });
22440
+ zr(R, z), M.add(R), v(M, R), M.setActiveObject(R);
22445
22441
  }
22446
- function m(O, D, H) {
22442
+ function m(O, D, z) {
22447
22443
  const M = jt.get(t);
22448
22444
  if (!M) return;
22449
22445
  const R = new kt(O, {
22450
- ...ac,
22446
+ ...oc,
22451
22447
  ...D
22452
22448
  });
22453
- zr(R, H), M.add(R), v(M, R), M.setActiveObject(R);
22449
+ zr(R, z), M.add(R), v(M, R), M.setActiveObject(R);
22454
22450
  }
22455
22451
  function v(O, D) {
22456
- D.on("selected", (H) => y({ canvas: O, target: H.target })), D.on("modified", (H) => y({ canvas: O, target: H.target })), D.on("scaling", () => T(O)), D.on("moving", () => T(O)), D.on("rotating", () => T(O)), D._cornerSize = D._cornerSize ?? D.cornerSize;
22452
+ D.on("selected", (z) => y({ canvas: O, target: z.target })), D.on("modified", (z) => y({ canvas: O, target: z.target })), D.on("scaling", () => T(O)), D.on("moving", () => T(O)), D.on("rotating", () => T(O)), D._cornerSize = D._cornerSize ?? D.cornerSize;
22457
22453
  }
22458
22454
  async function y({
22459
22455
  canvas: O,
22460
22456
  target: D,
22461
- stroke: H = u.current.stroke,
22457
+ stroke: z = u.current.stroke,
22462
22458
  uuid: M = Date.now()
22463
22459
  }) {
22464
- if (O.getActiveObjects().length > 1 || h.current?.stroke === `${H}-${M}`) return;
22465
- const W = await Kg(u.current, M, H);
22460
+ if (O.getActiveObjects().length > 1 || h.current?.stroke === `${z}-${M}`) return;
22461
+ const W = await qg(u.current, M, z);
22466
22462
  T(O), h.current = W, l.current = D, _(O, D, M), S(c.current, !0), W && O.add(W);
22467
22463
  }
22468
- function _(O, D, H) {
22464
+ function _(O, D, z) {
22469
22465
  h.current && (h.current.on("selected", () => {
22470
22466
  O.remove(D), T(O);
22471
22467
  }), h.current.on("mouseover", () => {
@@ -22473,15 +22469,15 @@ function cp(a) {
22473
22469
  canvas: O,
22474
22470
  target: D,
22475
22471
  stroke: u.current.hoverStroke,
22476
- uuid: H
22472
+ uuid: z
22477
22473
  });
22478
22474
  }), h.current.on("mouseout", () => {
22479
- y({ canvas: O, target: D, stroke: u.current.stroke, uuid: H });
22475
+ y({ canvas: O, target: D, stroke: u.current.stroke, uuid: z });
22480
22476
  }));
22481
22477
  }
22482
22478
  function S(O, D = !1) {
22483
- const H = jt.get(t);
22484
- c.current = O, H && (ep(l.current, O), tp(l.current, O, h.current), !D && H.renderAll());
22479
+ const z = jt.get(t);
22480
+ c.current = O, z && (tp(l.current, O), Qg(l.current, O, h.current), !D && z.renderAll());
22485
22481
  }
22486
22482
  function A(O) {
22487
22483
  if (!O) return;
@@ -22493,19 +22489,19 @@ function cp(a) {
22493
22489
  l.current = null, h.current && (O.remove(h.current), h.current = null);
22494
22490
  }
22495
22491
  function k() {
22496
- sp(t);
22492
+ ep(t);
22497
22493
  }
22498
22494
  function P() {
22499
- ip(t);
22495
+ sp(t);
22500
22496
  }
22501
22497
  function N(O) {
22502
- ap(t, O);
22498
+ op(t, O);
22503
22499
  }
22504
22500
  function F() {
22505
- return hp(t, v);
22501
+ return ap(t, v);
22506
22502
  }
22507
22503
  function I() {
22508
- lp(t);
22504
+ hp(t);
22509
22505
  }
22510
22506
  return {
22511
22507
  createCanvas: d,
@@ -22523,14 +22519,14 @@ function cp(a) {
22523
22519
  deleteActiveFabric: I
22524
22520
  };
22525
22521
  }
22526
- function up(a) {
22527
- const t = ws(0), e = Xg(() => {
22522
+ function cp(a) {
22523
+ const t = ws(0), e = Wg(() => {
22528
22524
  t.current !== window.innerWidth && (t.current = window.innerWidth, a());
22529
22525
  });
22530
22526
  Js(() => (window.addEventListener("resize", e), () => window.removeEventListener("resize", e)), []);
22531
22527
  }
22532
- const pp = tc(dp);
22533
- function dp({
22528
+ const gp = Ql(up);
22529
+ function up({
22534
22530
  file: a,
22535
22531
  page: t = 1,
22536
22532
  canvasId: e = "PDF-canvas",
@@ -22553,20 +22549,20 @@ function dp({
22553
22549
  onSelectionCreated: y,
22554
22550
  onSelectionCleared: _
22555
22551
  }, S) {
22556
- const A = ws(null), T = `${e}-${t - 1}`, k = No(() => s * n, [s, n]), P = No(() => ({ ...hc, ...d }), [d]), {
22552
+ const A = ws(null), T = `${e}-${t - 1}`, k = No(() => s * n, [s, n]), P = No(() => ({ ...ac, ...d }), [d]), {
22557
22553
  createCanvas: N,
22558
22554
  specifyPage: F,
22559
22555
  addFabric: I,
22560
22556
  addTextFabric: O,
22561
22557
  renderImage: D,
22562
- clearActive: H,
22558
+ clearActive: z,
22563
22559
  deleteCanvas: M,
22564
22560
  scaleFabric: R,
22565
22561
  setActiveFabric: W,
22566
22562
  setCloseSvgOptions: ot,
22567
22563
  copyActiveFabric: ht,
22568
22564
  deleteActiveFabric: E
22569
- } = cp({
22565
+ } = lp({
22570
22566
  id: T,
22571
22567
  selectionOptions: P,
22572
22568
  pointerDown: b,
@@ -22575,11 +22571,11 @@ function dp({
22575
22571
  selectionCreated: y,
22576
22572
  selectionCleared: _
22577
22573
  });
22578
- up(st);
22579
- async function z() {
22574
+ cp(st);
22575
+ async function H() {
22580
22576
  globalThis.requestAnimationFrame(async () => {
22581
- if (N(), a.type.startsWith("image/")) {
22582
- D({ data: a.data, scale: i / 3, type: a.type }), g?.();
22577
+ if (N(), a.data.type.startsWith("image/")) {
22578
+ D({ data: a.data, scale: i / 3 }), g?.();
22583
22579
  return;
22584
22580
  }
22585
22581
  await F({
@@ -22592,7 +22588,7 @@ function dp({
22592
22588
  }
22593
22589
  function V(B) {
22594
22590
  if (B.preventDefault(), B.stopPropagation(), !o || !B.dataTransfer) return;
22595
- const { dataTransfer: ut, nativeEvent: Tt } = B, { offsetX: Wt, offsetY: Zl } = Tt, Mo = ut.getData("text/plain"), Po = ut.getData("text/uri-list"), Oo = ut.getData("custom/offset"), Do = Oo ? JSON.parse(Oo) : null, Ro = { top: Zl, left: Wt }, Lo = { x: Do?.offsetX ?? 0, y: Do?.offsetY ?? 0 };
22591
+ const { dataTransfer: ut, nativeEvent: Tt } = B, { offsetX: Wt, offsetY: Jl } = Tt, Mo = ut.getData("text/plain"), Po = ut.getData("text/uri-list"), Oo = ut.getData("custom/offset"), Do = Oo ? JSON.parse(Oo) : null, Ro = { top: Jl, left: Wt }, Lo = { x: Do?.offsetX ?? 0, y: Do?.offsetY ?? 0 };
22596
22592
  Po ? J(Po, Ro, Lo) : Mo && At(Mo, Ro, Lo);
22597
22593
  }
22598
22594
  function J(B, ut, Tt) {
@@ -22602,13 +22598,13 @@ function dp({
22602
22598
  O(B, { ...l, ...ut }, Tt);
22603
22599
  }
22604
22600
  function st() {
22605
- f || z(), p?.();
22601
+ f || H(), p?.();
22606
22602
  }
22607
- return ec(S, () => ({
22608
- reload: z,
22603
+ return tc(S, () => ({
22604
+ reload: H,
22609
22605
  addImage: J,
22610
22606
  addText: At,
22611
- clearActive: H,
22607
+ clearActive: z,
22612
22608
  deleteCanvas: M,
22613
22609
  setActiveFabric: W,
22614
22610
  copyActiveFabric: ht,
@@ -22639,7 +22635,7 @@ function dp({
22639
22635
  );
22640
22636
  }
22641
22637
  export {
22642
- pp as default,
22643
- rp as loadFile,
22644
- cp as useFabric
22638
+ gp as default,
22639
+ np as loadFile,
22640
+ lp as useFabric
22645
22641
  };