@lateralus-ai/shipping-ui 1.4.5 → 1.4.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -13,7 +13,7 @@ var vn = (i, e, t, r) => ({
13
13
  return u(i, e, r);
14
14
  }
15
15
  });
16
- import q2, { useState as On, createContext as Mb, useContext as wo, useCallback as gr, useReducer as BE, forwardRef as zE, useRef as xs, useImperativeHandle as jE, useEffect as Kt, useMemo as Yi, useLayoutEffect as UE } from "react";
16
+ import q2, { useState as Tn, createContext as Mb, useContext as wo, useCallback as gr, useEffect as Vt, useReducer as BE, forwardRef as zE, useRef as xs, useImperativeHandle as jE, useMemo as Yi, useLayoutEffect as UE } from "react";
17
17
  import { Tooltip as Lb, IconButton as nn, ButtonGroup as Au, Tabs as HE, TabsHeader as $E, Tab as Zv, TabsBody as VE, TabPanel as Kv } from "@material-tailwind/react";
18
18
  import GE from "react-textarea-autosize";
19
19
  import { Icon as wi } from "@iconify/react";
@@ -968,18 +968,18 @@ function WE() {
968
968
  if (Xr && Qe && typeof Xr.stack == "string") {
969
969
  for (var vt = Xr.stack.split(`
970
970
  `), Br = Qe.stack.split(`
971
- `), Wt = vt.length - 1, zt = Br.length - 1; Wt >= 1 && zt >= 0 && vt[Wt] !== Br[zt]; )
971
+ `), Xt = vt.length - 1, zt = Br.length - 1; Xt >= 1 && zt >= 0 && vt[Xt] !== Br[zt]; )
972
972
  zt--;
973
- for (; Wt >= 1 && zt >= 0; Wt--, zt--)
974
- if (vt[Wt] !== Br[zt]) {
975
- if (Wt !== 1 || zt !== 1)
973
+ for (; Xt >= 1 && zt >= 0; Xt--, zt--)
974
+ if (vt[Xt] !== Br[zt]) {
975
+ if (Xt !== 1 || zt !== 1)
976
976
  do
977
- if (Wt--, zt--, zt < 0 || vt[Wt] !== Br[zt]) {
977
+ if (Xt--, zt--, zt < 0 || vt[Xt] !== Br[zt]) {
978
978
  var on = `
979
- ` + vt[Wt].replace(" at new ", " at ");
979
+ ` + vt[Xt].replace(" at new ", " at ");
980
980
  return Q.displayName && on.includes("<anonymous>") && (on = on.replace("<anonymous>", Q.displayName)), typeof Q == "function" && Ae.set(Q, on), on;
981
981
  }
982
- while (Wt >= 1 && zt >= 0);
982
+ while (Xt >= 1 && zt >= 0);
983
983
  break;
984
984
  }
985
985
  }
@@ -1045,8 +1045,8 @@ function WE() {
1045
1045
  throw Br.name = "Invariant Violation", Br;
1046
1046
  }
1047
1047
  vt = Q[xt](Pe, xt, Qe, Ue, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
1048
- } catch (Wt) {
1049
- vt = Wt;
1048
+ } catch (Xt) {
1049
+ vt = Xt;
1050
1050
  }
1051
1051
  vt && !(vt instanceof Error) && (q(Dt), A("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", Qe || "React class", Ue, xt, typeof vt), q(null)), vt instanceof Error && !(vt.message in F) && (F[vt.message] = !0, q(Dt), A("Failed %s type: %s", Ue, vt.message), q(null));
1052
1052
  }
@@ -1159,9 +1159,9 @@ function WE() {
1159
1159
  for (Bt in Pe)
1160
1160
  B.call(Pe, Bt) && !We.hasOwnProperty(Bt) && (xt[Bt] = Pe[Bt]);
1161
1161
  if (Q && Q.defaultProps) {
1162
- var Wt = Q.defaultProps;
1163
- for (Bt in Wt)
1164
- xt[Bt] === void 0 && (xt[Bt] = Wt[Bt]);
1162
+ var Xt = Q.defaultProps;
1163
+ for (Bt in Xt)
1164
+ xt[Bt] === void 0 && (xt[Bt] = Xt[Bt]);
1165
1165
  }
1166
1166
  if (vt || Br) {
1167
1167
  var zt = typeof Q == "function" ? Q.displayName || Q.name || "Unknown" : Q;
@@ -1289,8 +1289,8 @@ Check the top-level render call using <` + Ue + ">.");
1289
1289
  (Q === void 0 || typeof Q == "object" && Q !== null && Object.keys(Q).length === 0) && (vt += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
1290
1290
  var Br = Lt();
1291
1291
  Br ? vt += Br : vt += gt();
1292
- var Wt;
1293
- Q === null ? Wt = "null" : ee(Q) ? Wt = "array" : Q !== void 0 && Q.$$typeof === e ? (Wt = "<" + (X(Q.type) || "Unknown") + " />", vt = " Did you accidentally export a JSX literal instead of a component?") : Wt = typeof Q, A("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", Wt, vt);
1292
+ var Xt;
1293
+ Q === null ? Xt = "null" : ee(Q) ? Xt = "array" : Q !== void 0 && Q.$$typeof === e ? (Xt = "<" + (X(Q.type) || "Unknown") + " />", vt = " Did you accidentally export a JSX literal instead of a component?") : Xt = typeof Q, A("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", Xt, vt);
1294
1294
  }
1295
1295
  var zt = Oe(Q, Pe, Ue, Dt, Bt);
1296
1296
  if (zt == null)
@@ -3498,7 +3498,7 @@ const __ = ({
3498
3498
  className: e,
3499
3499
  ...t
3500
3500
  }) => {
3501
- const [r, n] = On(!1);
3501
+ const [r, n] = Tn(!1);
3502
3502
  return /* @__PURE__ */ ve.jsx(Lb, { content: i, children: /* @__PURE__ */ ve.jsx(
3503
3503
  nn,
3504
3504
  {
@@ -3559,7 +3559,7 @@ const __ = ({
3559
3559
  isCollapsed: e,
3560
3560
  onSwitchLayout: t
3561
3561
  }) => {
3562
- const [r, n] = On(!1), [s, a] = On(!1), o = e !== void 0 ? e : r, l = (c) => {
3562
+ const [r, n] = Tn(!1), [s, a] = Tn(!1), o = e !== void 0 ? e : r, l = (c) => {
3563
3563
  const h = c ?? !o;
3564
3564
  e === void 0 && n(h), t == null || t(h);
3565
3565
  };
@@ -3802,7 +3802,7 @@ const P_ = () => {
3802
3802
  )
3803
3803
  }
3804
3804
  ), s1 = (i = 100, e = 50, t = 990, r = 10) => {
3805
- const [n, s] = On(i);
3805
+ const [n, s] = Tn(i);
3806
3806
  return [n, { ...{
3807
3807
  zoomIn: () => s((l) => Math.min(l + r, t)),
3808
3808
  zoomOut: () => s((l) => Math.max(l - r, e)),
@@ -3814,13 +3814,13 @@ const P_ = () => {
3814
3814
  s((h) => Math.max(e, Math.min(h + c, t)));
3815
3815
  } }];
3816
3816
  }, a1 = () => {
3817
- const [i, e] = On(0);
3817
+ const [i, e] = Tn(0);
3818
3818
  return [i, {
3819
3819
  rotateClockwise: () => e((r) => (r + 90) % 360),
3820
3820
  rotateCounterClockwise: () => e((r) => (r - 90 + 360) % 360)
3821
3821
  }];
3822
3822
  }, o1 = () => {
3823
- const [i, e] = On({ x: 0, y: 0 }), [t, r] = On(!1), [n, s] = On({ x: 0, y: 0 });
3823
+ const [i, e] = Tn({ x: 0, y: 0 }), [t, r] = Tn(!1), [n, s] = Tn({ x: 0, y: 0 });
3824
3824
  return [{ pan: i, isDragging: t }, {
3825
3825
  handleMouseDown: (h) => {
3826
3826
  r(!0), s({
@@ -3840,7 +3840,7 @@ const P_ = () => {
3840
3840
  reset: () => e({ x: 0, y: 0 })
3841
3841
  }];
3842
3842
  }, l1 = (i = 0) => {
3843
- const [e, t] = On(1), [r, n] = On(i), s = {
3843
+ const [e, t] = Tn(1), [r, n] = Tn(i), s = {
3844
3844
  nextPage: gr(() => {
3845
3845
  t((a) => a < r ? a + 1 : a);
3846
3846
  }, [r]),
@@ -3866,9 +3866,22 @@ const P_ = () => {
3866
3866
  documentUrl: n,
3867
3867
  title: s = "PDF Viewer"
3868
3868
  }) => {
3869
- const [a, o] = s1(), [l, c] = a1(), [{ pan: h, isDragging: d }, p] = o1(), [{ currentPage: g }, y] = l1(t), b = /* @__PURE__ */ ve.jsx(nn, { variant: "text", color: "gray", children: /* @__PURE__ */ ve.jsx("a", { href: n, target: "_blank", rel: "noopener noreferrer", children: /* @__PURE__ */ ve.jsx(i1, { className: "size-4" }) }) });
3869
+ const [a, o] = s1(), [l, c] = a1(), [{ pan: h, isDragging: d }, p] = o1(), [{ currentPage: g }, y] = l1(t), [b, w] = Tn(() => {
3870
+ const A = r(g);
3871
+ return typeof A == "string" ? A : "";
3872
+ });
3873
+ Vt(() => {
3874
+ let A = !0;
3875
+ return (async () => {
3876
+ const _ = r(g), C = await Promise.resolve(_);
3877
+ A && w(C);
3878
+ })(), () => {
3879
+ A = !1;
3880
+ };
3881
+ }, [g, r]);
3882
+ const v = /* @__PURE__ */ ve.jsx(nn, { variant: "text", color: "gray", children: /* @__PURE__ */ ve.jsx("a", { href: n, target: "_blank", rel: "noopener noreferrer", children: /* @__PURE__ */ ve.jsx(i1, { className: "size-4" }) }) });
3870
3883
  return /* @__PURE__ */ ve.jsxs("div", { className: uo("shadow rounded-t-lg flex flex-col h-full", i), children: [
3871
- /* @__PURE__ */ ve.jsx(n1.Header, { onClose: e, right: b, children: s }),
3884
+ /* @__PURE__ */ ve.jsx(n1.Header, { onClose: e, right: v, children: s }),
3872
3885
  /* @__PURE__ */ ve.jsx("div", { className: "flex-1 grid", children: /* @__PURE__ */ ve.jsxs("div", { className: "grid relative", children: [
3873
3886
  /* @__PURE__ */ ve.jsx(
3874
3887
  "div",
@@ -3899,13 +3912,13 @@ const P_ = () => {
3899
3912
  transformOrigin: "center",
3900
3913
  transition: d ? "none" : "transform 0.3s ease"
3901
3914
  },
3902
- children: /* @__PURE__ */ ve.jsx(
3915
+ children: b ? /* @__PURE__ */ ve.jsx(
3903
3916
  "img",
3904
3917
  {
3905
- src: r(g),
3918
+ src: b,
3906
3919
  style: { userSelect: "none", pointerEvents: "none" }
3907
3920
  }
3908
- )
3921
+ ) : null
3909
3922
  }
3910
3923
  )
3911
3924
  }
@@ -3987,9 +4000,9 @@ const P_ = () => {
3987
4000
  {
3988
4001
  className: "bg-white pl-4 flex items-center w-[50px] text-center focus:outline-none w-[60px]",
3989
4002
  value: g,
3990
- onChange: (w) => {
3991
- const v = parseInt(w.target.value);
3992
- isNaN(v) || y.goToPage(v);
4003
+ onChange: (A) => {
4004
+ const E = parseInt(A.target.value);
4005
+ isNaN(E) || y.goToPage(E);
3993
4006
  },
3994
4007
  type: "number",
3995
4008
  min: "1",
@@ -4223,11 +4236,11 @@ function Ig(i) {
4223
4236
  function lt(i) {
4224
4237
  Rg >= Rf.WARNINGS && console.log(`Warning: ${i}`);
4225
4238
  }
4226
- function Gt(i) {
4239
+ function qt(i) {
4227
4240
  throw new Error(i);
4228
4241
  }
4229
4242
  function Dr(i, e) {
4230
- i || Gt(e);
4243
+ i || qt(e);
4231
4244
  }
4232
4245
  function F_(i) {
4233
4246
  switch (i == null ? void 0 : i.protocol) {
@@ -4307,7 +4320,7 @@ class ga extends Ql {
4307
4320
  }
4308
4321
  }
4309
4322
  function d1(i) {
4310
- (typeof i != "object" || (i == null ? void 0 : i.length) === void 0) && Gt("Invalid argument for bytesToString");
4323
+ (typeof i != "object" || (i == null ? void 0 : i.length) === void 0) && qt("Invalid argument for bytesToString");
4311
4324
  const e = i.length, t = 8192;
4312
4325
  if (e < t)
4313
4326
  return String.fromCharCode.apply(null, i);
@@ -4319,7 +4332,7 @@ function d1(i) {
4319
4332
  return r.join("");
4320
4333
  }
4321
4334
  function If(i) {
4322
- typeof i != "string" && Gt("Invalid argument for stringToBytes");
4335
+ typeof i != "string" && qt("Invalid argument for stringToBytes");
4323
4336
  const e = i.length, t = new Uint8Array(e);
4324
4337
  for (let r = 0; r < e; ++r)
4325
4338
  t[r] = i.charCodeAt(r) & 255;
@@ -4873,10 +4886,10 @@ class Zi {
4873
4886
  }
4874
4887
  }
4875
4888
  const eg = ["image/apng", "image/avif", "image/bmp", "image/gif", "image/jpeg", "image/png", "image/svg+xml", "image/webp", "image/x-icon"];
4876
- var Ca, Oo, fi, Sa, nd, Tu, id, hg, v1, Tn, y1, w1, fh, xp;
4889
+ var Ca, Oo, fi, Sa, nd, Tu, id, hg, v1, kn, y1, w1, fh, xp;
4877
4890
  const Ms = class Ms {
4878
4891
  constructor(e) {
4879
- N(this, Tn);
4892
+ N(this, kn);
4880
4893
  N(this, Ca, null);
4881
4894
  N(this, Oo, null);
4882
4895
  N(this, fi);
@@ -4927,7 +4940,7 @@ const Ms = class Ms {
4927
4940
  editorType: e,
4928
4941
  _uiManager: t
4929
4942
  } = u(this, fi), r = document.createElement("button");
4930
- r.className = "delete", r.tabIndex = 0, r.setAttribute("data-l10n-id", u(Ms, id)[e]), L(this, Tn, fh).call(this, r), r.addEventListener("click", (n) => {
4943
+ r.className = "delete", r.tabIndex = 0, r.setAttribute("data-l10n-id", u(Ms, id)[e]), L(this, kn, fh).call(this, r), r.addEventListener("click", (n) => {
4931
4944
  t.delete();
4932
4945
  }, {
4933
4946
  signal: t._signal
@@ -4935,16 +4948,16 @@ const Ms = class Ms {
4935
4948
  }
4936
4949
  async addAltText(e) {
4937
4950
  const t = await e.render();
4938
- L(this, Tn, fh).call(this, t), u(this, Sa).append(t, u(this, Tn, xp)), T(this, nd, e);
4951
+ L(this, kn, fh).call(this, t), u(this, Sa).append(t, u(this, kn, xp)), T(this, nd, e);
4939
4952
  }
4940
4953
  addColorPicker(e) {
4941
4954
  T(this, Oo, e);
4942
4955
  const t = e.renderButton();
4943
- L(this, Tn, fh).call(this, t), u(this, Sa).append(t, u(this, Tn, xp));
4956
+ L(this, kn, fh).call(this, t), u(this, Sa).append(t, u(this, kn, xp));
4944
4957
  }
4945
4958
  async addEditSignatureButton(e) {
4946
4959
  const t = T(this, Tu, await e.renderEditButton(u(this, fi)));
4947
- L(this, Tn, fh).call(this, t), u(this, Sa).append(t, u(this, Tn, xp));
4960
+ L(this, kn, fh).call(this, t), u(this, Sa).append(t, u(this, kn, xp));
4948
4961
  }
4949
4962
  async addButton(e, t) {
4950
4963
  switch (e) {
@@ -4972,16 +4985,16 @@ const Ms = class Ms {
4972
4985
  };
4973
4986
  Ca = new WeakMap(), Oo = new WeakMap(), fi = new WeakMap(), Sa = new WeakMap(), nd = new WeakMap(), Tu = new WeakMap(), id = new WeakMap(), hg = new WeakSet(), v1 = function(e) {
4974
4987
  e.stopPropagation();
4975
- }, Tn = new WeakSet(), y1 = function(e) {
4988
+ }, kn = new WeakSet(), y1 = function(e) {
4976
4989
  u(this, fi)._focusEventsAllowed = !1, _r(e);
4977
4990
  }, w1 = function(e) {
4978
4991
  u(this, fi)._focusEventsAllowed = !0, _r(e);
4979
4992
  }, fh = function(e) {
4980
4993
  const t = u(this, fi)._uiManager._signal;
4981
- e.addEventListener("focusin", L(this, Tn, y1).bind(this), {
4994
+ e.addEventListener("focusin", L(this, kn, y1).bind(this), {
4982
4995
  capture: !0,
4983
4996
  signal: t
4984
- }), e.addEventListener("focusout", L(this, Tn, w1).bind(this), {
4997
+ }), e.addEventListener("focusout", L(this, kn, w1).bind(this), {
4985
4998
  capture: !0,
4986
4999
  signal: t
4987
5000
  }), e.addEventListener("contextmenu", Ci, {
@@ -6349,7 +6362,7 @@ Pu = new WeakMap(), qn = new WeakMap(), Ir = new WeakMap(), Yr = new WeakMap(),
6349
6362
  });
6350
6363
  }, Re(wu, "TRANSLATE_SMALL", 1), Re(wu, "TRANSLATE_BIG", 10);
6351
6364
  let ho = wu;
6352
- var jr, ls, Oi, Ou, us, Wn, Fu, cs, In, zs, Vo, hs, Fa, Xi, gh, Cp;
6365
+ var jr, ls, Oi, Ou, us, Wn, Fu, cs, Nn, zs, Vo, hs, Fa, Xi, gh, Cp;
6353
6366
  const xn = class xn {
6354
6367
  constructor(e) {
6355
6368
  N(this, Xi);
@@ -6361,11 +6374,11 @@ const xn = class xn {
6361
6374
  N(this, Wn, null);
6362
6375
  N(this, Fu, !1);
6363
6376
  N(this, cs, null);
6364
- N(this, In, null);
6377
+ N(this, Nn, null);
6365
6378
  N(this, zs, null);
6366
6379
  N(this, Vo, null);
6367
6380
  N(this, hs, !1);
6368
- T(this, In, e), T(this, hs, e._uiManager.useNewAltTextFlow), u(xn, Fa) || T(xn, Fa, Object.freeze({
6381
+ T(this, Nn, e), T(this, hs, e._uiManager.useNewAltTextFlow), u(xn, Fa) || T(xn, Fa, Object.freeze({
6369
6382
  added: "pdfjs-editor-new-alt-text-added-button",
6370
6383
  "added-label": "pdfjs-editor-new-alt-text-added-button-label",
6371
6384
  missing: "pdfjs-editor-new-alt-text-missing-button",
@@ -6382,14 +6395,14 @@ const xn = class xn {
6382
6395
  e.className = "altText", e.tabIndex = "0";
6383
6396
  const t = T(this, Ou, document.createElement("span"));
6384
6397
  e.append(t), u(this, hs) ? (e.classList.add("new"), e.setAttribute("data-l10n-id", u(xn, Fa).missing), t.setAttribute("data-l10n-id", u(xn, Fa)["missing-label"])) : (e.setAttribute("data-l10n-id", "pdfjs-editor-alt-text-button"), t.setAttribute("data-l10n-id", "pdfjs-editor-alt-text-button-label"));
6385
- const r = u(this, In)._uiManager._signal;
6398
+ const r = u(this, Nn)._uiManager._signal;
6386
6399
  e.addEventListener("contextmenu", Ci, {
6387
6400
  signal: r
6388
6401
  }), e.addEventListener("pointerdown", (s) => s.stopPropagation(), {
6389
6402
  signal: r
6390
6403
  });
6391
6404
  const n = (s) => {
6392
- s.preventDefault(), u(this, In)._uiManager.editAltText(u(this, In)), u(this, hs) && u(this, In)._reportTelemetry({
6405
+ s.preventDefault(), u(this, Nn)._uiManager.editAltText(u(this, Nn)), u(this, hs) && u(this, Nn)._reportTelemetry({
6393
6406
  action: "pdfjs.image.alt_text.image_status_label_clicked",
6394
6407
  data: {
6395
6408
  label: u(this, Xi, gh)
@@ -6432,7 +6445,7 @@ const xn = class xn {
6432
6445
  }
6433
6446
  if (!u(this, cs)) {
6434
6447
  const r = T(this, cs, document.createElement("div"));
6435
- r.className = "noAltTextBadge", u(this, In).div.append(r);
6448
+ r.className = "noAltTextBadge", u(this, Nn).div.append(r);
6436
6449
  }
6437
6450
  u(this, cs).classList.toggle("hidden", !e);
6438
6451
  }
@@ -6464,7 +6477,7 @@ const xn = class xn {
6464
6477
  u(this, Oi) && (!e && u(this, Wn) && (clearTimeout(u(this, Wn)), T(this, Wn, null)), u(this, Oi).disabled = !e);
6465
6478
  }
6466
6479
  shown() {
6467
- u(this, In)._reportTelemetry({
6480
+ u(this, Nn)._reportTelemetry({
6468
6481
  action: "pdfjs.image.alt_text.image_status_label_displayed",
6469
6482
  data: {
6470
6483
  label: u(this, Xi, gh)
@@ -6476,7 +6489,7 @@ const xn = class xn {
6476
6489
  (e = u(this, Oi)) == null || e.remove(), T(this, Oi, null), T(this, Ou, null), T(this, us, null), (t = u(this, cs)) == null || t.remove(), T(this, cs, null);
6477
6490
  }
6478
6491
  };
6479
- jr = new WeakMap(), ls = new WeakMap(), Oi = new WeakMap(), Ou = new WeakMap(), us = new WeakMap(), Wn = new WeakMap(), Fu = new WeakMap(), cs = new WeakMap(), In = new WeakMap(), zs = new WeakMap(), Vo = new WeakMap(), hs = new WeakMap(), Fa = new WeakMap(), Xi = new WeakSet(), gh = function() {
6492
+ jr = new WeakMap(), ls = new WeakMap(), Oi = new WeakMap(), Ou = new WeakMap(), us = new WeakMap(), Wn = new WeakMap(), Fu = new WeakMap(), cs = new WeakMap(), Nn = new WeakMap(), zs = new WeakMap(), Vo = new WeakMap(), hs = new WeakMap(), Fa = new WeakMap(), Xi = new WeakSet(), gh = function() {
6480
6493
  return u(this, jr) && "added" || u(this, jr) === null && this.guessedText && "review" || "missing";
6481
6494
  }, Cp = async function() {
6482
6495
  var n, s, a;
@@ -6497,15 +6510,15 @@ jr = new WeakMap(), ls = new WeakMap(), Oi = new WeakMap(), Ou = new WeakMap(),
6497
6510
  }
6498
6511
  let t = u(this, us);
6499
6512
  if (!t) {
6500
- T(this, us, t = document.createElement("span")), t.className = "tooltip", t.setAttribute("role", "tooltip"), t.id = `alt-text-tooltip-${u(this, In).id}`;
6501
- const o = 100, l = u(this, In)._uiManager._signal;
6513
+ T(this, us, t = document.createElement("span")), t.className = "tooltip", t.setAttribute("role", "tooltip"), t.id = `alt-text-tooltip-${u(this, Nn).id}`;
6514
+ const o = 100, l = u(this, Nn)._uiManager._signal;
6502
6515
  l.addEventListener("abort", () => {
6503
6516
  clearTimeout(u(this, Wn)), T(this, Wn, null);
6504
6517
  }, {
6505
6518
  once: !0
6506
6519
  }), e.addEventListener("mouseenter", () => {
6507
6520
  T(this, Wn, setTimeout(() => {
6508
- T(this, Wn, null), u(this, us).classList.add("show"), u(this, In)._reportTelemetry({
6521
+ T(this, Wn, null), u(this, us).classList.add("show"), u(this, Nn)._reportTelemetry({
6509
6522
  action: "alt_text_tooltip"
6510
6523
  });
6511
6524
  }, o));
@@ -6519,7 +6532,7 @@ jr = new WeakMap(), ls = new WeakMap(), Oi = new WeakMap(), Ou = new WeakMap(),
6519
6532
  });
6520
6533
  }
6521
6534
  u(this, ls) ? t.setAttribute("data-l10n-id", "pdfjs-editor-alt-text-decorative-tooltip") : (t.removeAttribute("data-l10n-id"), t.textContent = u(this, jr)), t.parentNode || e.append(t);
6522
- const r = u(this, In).getElementForAltText();
6535
+ const r = u(this, Nn).getElementForAltText();
6523
6536
  r == null || r.setAttribute("aria-describedby", t.id);
6524
6537
  }, N(xn, Fa, null), Re(xn, "_l10n", null);
6525
6538
  let tg = xn;
@@ -6748,7 +6761,7 @@ const bt = class bt {
6748
6761
  return !1;
6749
6762
  }
6750
6763
  static paste(e, t) {
6751
- Gt("Not implemented");
6764
+ qt("Not implemented");
6752
6765
  }
6753
6766
  get propertiesToUpdate() {
6754
6767
  return [];
@@ -7151,7 +7164,7 @@ const bt = class bt {
7151
7164
  };
7152
7165
  }
7153
7166
  serialize(e = !1, t = null) {
7154
- Gt("An editor must be serializable");
7167
+ qt("An editor must be serializable");
7155
7168
  }
7156
7169
  static async deserialize(e, t, r) {
7157
7170
  const n = new this.prototype.constructor({
@@ -7788,7 +7801,7 @@ class Z1 extends Hb {
7788
7801
  });
7789
7802
  }
7790
7803
  get print() {
7791
- Gt("Should not call PrintAnnotationStorage.print");
7804
+ qt("Should not call PrintAnnotationStorage.print");
7792
7805
  }
7793
7806
  get serializable() {
7794
7807
  return u(this, Td);
@@ -7846,7 +7859,7 @@ class K_ {
7846
7859
  }
7847
7860
  return;
7848
7861
  }
7849
- Gt("Not implemented: loadSystemFont without the Font Loading API.");
7862
+ qt("Not implemented: loadSystemFont without the Font Loading API.");
7850
7863
  }
7851
7864
  }
7852
7865
  async bind(e) {
@@ -8091,10 +8104,10 @@ const lp = {
8091
8104
  };
8092
8105
  function oy() {
8093
8106
  }
8094
- function Pn(i) {
8107
+ function Rn(i) {
8095
8108
  if (i instanceof ga || i instanceof Jp || i instanceof ny || i instanceof Fh || i instanceof bm)
8096
8109
  return i;
8097
- switch (i instanceof Error || typeof i == "object" && i !== null || Gt('wrapReason: Expected "reason" to be a (possibly cloned) Error.'), i.name) {
8110
+ switch (i instanceof Error || typeof i == "object" && i !== null || qt('wrapReason: Expected "reason" to be a (possibly cloned) Error.'), i.name) {
8098
8111
  case "AbortException":
8099
8112
  return new ga(i.message);
8100
8113
  case "InvalidPDFException":
@@ -8185,7 +8198,7 @@ class bh {
8185
8198
  targetName: o,
8186
8199
  stream: Tr.CANCEL,
8187
8200
  streamId: s,
8188
- reason: Pn(c)
8201
+ reason: Rn(c)
8189
8202
  }), h.promise;
8190
8203
  }
8191
8204
  }, r);
@@ -8211,7 +8224,7 @@ $u = new WeakMap(), _i = new WeakSet(), Q1 = function({
8211
8224
  if (delete this.callbackCapabilities[r], e.callback === lp.DATA)
8212
8225
  n.resolve(e.data);
8213
8226
  else if (e.callback === lp.ERROR)
8214
- n.reject(Pn(e.reason));
8227
+ n.reject(Rn(e.reason));
8215
8228
  else
8216
8229
  throw new Error("Unexpected callback case");
8217
8230
  return;
@@ -8235,7 +8248,7 @@ $u = new WeakMap(), _i = new WeakSet(), Q1 = function({
8235
8248
  targetName: n,
8236
8249
  callback: lp.ERROR,
8237
8250
  callbackId: e.callbackId,
8238
- reason: Pn(a)
8251
+ reason: Rn(a)
8239
8252
  });
8240
8253
  });
8241
8254
  return;
@@ -8273,7 +8286,7 @@ $u = new WeakMap(), _i = new WeakSet(), Q1 = function({
8273
8286
  targetName: n,
8274
8287
  stream: Tr.ERROR,
8275
8288
  streamId: t,
8276
- reason: Pn(c)
8289
+ reason: Rn(c)
8277
8290
  }));
8278
8291
  },
8279
8292
  sinkCapability: Promise.withResolvers(),
@@ -8297,17 +8310,17 @@ $u = new WeakMap(), _i = new WeakSet(), Q1 = function({
8297
8310
  targetName: n,
8298
8311
  stream: Tr.START_COMPLETE,
8299
8312
  streamId: t,
8300
- reason: Pn(c)
8313
+ reason: Rn(c)
8301
8314
  });
8302
8315
  });
8303
8316
  }, ew = function(e) {
8304
8317
  const t = e.streamId, r = this.sourceName, n = e.sourceName, s = this.comObj, a = this.streamControllers[t], o = this.streamSinks[t];
8305
8318
  switch (e.stream) {
8306
8319
  case Tr.START_COMPLETE:
8307
- e.success ? a.startCall.resolve() : a.startCall.reject(Pn(e.reason));
8320
+ e.success ? a.startCall.resolve() : a.startCall.reject(Rn(e.reason));
8308
8321
  break;
8309
8322
  case Tr.PULL_COMPLETE:
8310
- e.success ? a.pullCall.resolve() : a.pullCall.reject(Pn(e.reason));
8323
+ e.success ? a.pullCall.resolve() : a.pullCall.reject(Rn(e.reason));
8311
8324
  break;
8312
8325
  case Tr.PULL:
8313
8326
  if (!o) {
@@ -8334,7 +8347,7 @@ $u = new WeakMap(), _i = new WeakSet(), Q1 = function({
8334
8347
  targetName: n,
8335
8348
  stream: Tr.PULL_COMPLETE,
8336
8349
  streamId: t,
8337
- reason: Pn(c)
8350
+ reason: Rn(c)
8338
8351
  });
8339
8352
  });
8340
8353
  break;
@@ -8349,15 +8362,15 @@ $u = new WeakMap(), _i = new WeakSet(), Q1 = function({
8349
8362
  a.isClosed = !0, a.controller.close(), L(this, _i, kp).call(this, a, t);
8350
8363
  break;
8351
8364
  case Tr.ERROR:
8352
- Dr(a, "error should have stream controller"), a.controller.error(Pn(e.reason)), L(this, _i, kp).call(this, a, t);
8365
+ Dr(a, "error should have stream controller"), a.controller.error(Rn(e.reason)), L(this, _i, kp).call(this, a, t);
8353
8366
  break;
8354
8367
  case Tr.CANCEL_COMPLETE:
8355
- e.success ? a.cancelCall.resolve() : a.cancelCall.reject(Pn(e.reason)), L(this, _i, kp).call(this, a, t);
8368
+ e.success ? a.cancelCall.resolve() : a.cancelCall.reject(Rn(e.reason)), L(this, _i, kp).call(this, a, t);
8356
8369
  break;
8357
8370
  case Tr.CANCEL:
8358
8371
  if (!o)
8359
8372
  break;
8360
- const l = Pn(e.reason);
8373
+ const l = Rn(e.reason);
8361
8374
  Promise.try(o.onCancel || oy, l).then(function() {
8362
8375
  s.postMessage({
8363
8376
  sourceName: r,
@@ -8372,7 +8385,7 @@ $u = new WeakMap(), _i = new WeakSet(), Q1 = function({
8372
8385
  targetName: n,
8373
8386
  stream: Tr.CANCEL_COMPLETE,
8374
8387
  streamId: t,
8375
- reason: Pn(c)
8388
+ reason: Rn(c)
8376
8389
  });
8377
8390
  }), o.sinkCapability.reject(l), o.isCancelled = !0, delete this.streamSinks[t];
8378
8391
  break;
@@ -8415,7 +8428,7 @@ class tw {
8415
8428
  e.canvas.width = 0, e.canvas.height = 0, e.canvas = null, e.context = null;
8416
8429
  }
8417
8430
  _createCanvas(e, t) {
8418
- Gt("Abstract method `_createCanvas` called.");
8431
+ qt("Abstract method `_createCanvas` called.");
8419
8432
  }
8420
8433
  }
8421
8434
  kd = new WeakMap();
@@ -8456,7 +8469,7 @@ class rw {
8456
8469
  });
8457
8470
  }
8458
8471
  async _fetch(e) {
8459
- Gt("Abstract method `_fetch` called.");
8472
+ qt("Abstract method `_fetch` called.");
8460
8473
  }
8461
8474
  }
8462
8475
  class ly extends rw {
@@ -8675,7 +8688,7 @@ class sw {
8675
8688
  });
8676
8689
  }
8677
8690
  async _fetch(e) {
8678
- Gt("Abstract method `_fetch` called.");
8691
+ qt("Abstract method `_fetch` called.");
8679
8692
  }
8680
8693
  }
8681
8694
  class uy extends sw {
@@ -8703,7 +8716,7 @@ class aw {
8703
8716
  });
8704
8717
  }
8705
8718
  async _fetch(e) {
8706
- Gt("Abstract method `_fetch` called.");
8719
+ qt("Abstract method `_fetch` called.");
8707
8720
  }
8708
8721
  }
8709
8722
  class cy extends aw {
@@ -8755,7 +8768,7 @@ class Vb {
8755
8768
  return !1;
8756
8769
  }
8757
8770
  getPattern() {
8758
- Gt("Abstract method `getPattern` called.");
8771
+ qt("Abstract method `getPattern` called.");
8759
8772
  }
8760
8773
  }
8761
8774
  class cC extends Vb {
@@ -9013,7 +9026,7 @@ function gC({
9013
9026
  destPos: g
9014
9027
  };
9015
9028
  }
9016
- const dy = 16, fy = 100, mC = 15, py = 10, Ln = 16, xm = new DOMMatrix(), oi = new Float32Array(2), vu = new Float32Array([1 / 0, 1 / 0, -1 / 0, -1 / 0]);
9029
+ const dy = 16, fy = 100, mC = 15, py = 10, On = 16, xm = new DOMMatrix(), oi = new Float32Array(2), vu = new Float32Array([1 / 0, 1 / 0, -1 / 0, -1 / 0]);
9017
9030
  function bC(i, e) {
9018
9031
  if (i._removeMirroring)
9019
9032
  throw new Error("Context is already forwarding operations.");
@@ -9119,7 +9132,7 @@ class gy {
9119
9132
  getPathBoundingBox(e = tn.FILL, t = null) {
9120
9133
  const r = this.minMax.slice();
9121
9134
  if (e === tn.STROKE) {
9122
- t || Gt("Stroke bounding box must include transform."), Ke.singularValueDecompose2dScale(t, oi);
9135
+ t || qt("Stroke bounding box must include transform."), Ke.singularValueDecompose2dScale(t, oi);
9123
9136
  const n = oi[0] * this.lineWidth / 2, s = oi[1] * this.lineWidth / 2;
9124
9137
  r[0] -= n, r[1] -= s, r[2] += n, r[3] += s;
9125
9138
  }
@@ -9144,14 +9157,14 @@ function my(i, e) {
9144
9157
  i.putImageData(e, 0, 0);
9145
9158
  return;
9146
9159
  }
9147
- const t = e.height, r = e.width, n = t % Ln, s = (t - n) / Ln, a = n === 0 ? s : s + 1, o = i.createImageData(r, Ln);
9160
+ const t = e.height, r = e.width, n = t % On, s = (t - n) / On, a = n === 0 ? s : s + 1, o = i.createImageData(r, On);
9148
9161
  let l = 0, c;
9149
9162
  const h = e.data, d = o.data;
9150
9163
  let p, g, y, b;
9151
9164
  if (e.kind === Nh.GRAYSCALE_1BPP) {
9152
9165
  const w = h.byteLength, v = new Uint32Array(d.buffer, 0, d.byteLength >> 2), A = v.length, E = r + 7 >> 3, _ = 4294967295, C = qr.isLittleEndian ? 4278190080 : 255;
9153
9166
  for (p = 0; p < a; p++) {
9154
- for (y = p < s ? Ln : n, c = 0, g = 0; g < y; g++) {
9167
+ for (y = p < s ? On : n, c = 0, g = 0; g < y; g++) {
9155
9168
  const I = w - l;
9156
9169
  let k = 0;
9157
9170
  const D = I > E ? r : I * 8 - 7, R = D & -8;
@@ -9163,17 +9176,17 @@ function my(i, e) {
9163
9176
  }
9164
9177
  for (; c < A; )
9165
9178
  v[c++] = 0;
9166
- i.putImageData(o, 0, p * Ln);
9179
+ i.putImageData(o, 0, p * On);
9167
9180
  }
9168
9181
  } else if (e.kind === Nh.RGBA_32BPP) {
9169
- for (g = 0, b = r * Ln * 4, p = 0; p < s; p++)
9170
- d.set(h.subarray(l, l + b)), l += b, i.putImageData(o, 0, g), g += Ln;
9182
+ for (g = 0, b = r * On * 4, p = 0; p < s; p++)
9183
+ d.set(h.subarray(l, l + b)), l += b, i.putImageData(o, 0, g), g += On;
9171
9184
  p < a && (b = r * n * 4, d.set(h.subarray(l, l + b)), i.putImageData(o, 0, g));
9172
9185
  } else if (e.kind === Nh.RGB_24BPP)
9173
- for (y = Ln, b = r * y, p = 0; p < a; p++) {
9186
+ for (y = On, b = r * y, p = 0; p < a; p++) {
9174
9187
  for (p >= s && (y = n, b = r * y), c = 0, g = b; g--; )
9175
9188
  d[c++] = h[l++], d[c++] = h[l++], d[c++] = h[l++], d[c++] = 255;
9176
- i.putImageData(o, 0, p * Ln);
9189
+ i.putImageData(o, 0, p * On);
9177
9190
  }
9178
9191
  else
9179
9192
  throw new Error(`bad image kind: ${e.kind}`);
@@ -9183,11 +9196,11 @@ function by(i, e) {
9183
9196
  i.drawImage(e.bitmap, 0, 0);
9184
9197
  return;
9185
9198
  }
9186
- const t = e.height, r = e.width, n = t % Ln, s = (t - n) / Ln, a = n === 0 ? s : s + 1, o = i.createImageData(r, Ln);
9199
+ const t = e.height, r = e.width, n = t % On, s = (t - n) / On, a = n === 0 ? s : s + 1, o = i.createImageData(r, On);
9187
9200
  let l = 0;
9188
9201
  const c = e.data, h = o.data;
9189
9202
  for (let d = 0; d < a; d++) {
9190
- const p = d < s ? Ln : n;
9203
+ const p = d < s ? On : n;
9191
9204
  ({
9192
9205
  srcPos: l
9193
9206
  } = gC({
@@ -9197,7 +9210,7 @@ function by(i, e) {
9197
9210
  width: r,
9198
9211
  height: p,
9199
9212
  nonBlackColor: 0
9200
- })), i.putImageData(o, 0, d * Ln);
9213
+ })), i.putImageData(o, 0, d * On);
9201
9214
  }
9202
9215
  }
9203
9216
  function rh(i, e) {
@@ -9806,10 +9819,10 @@ const Cv = class Cv {
9806
9819
  this.compose(this.current.getClippedPathBoundingBox()), this.restore();
9807
9820
  }
9808
9821
  beginInlineImage() {
9809
- Gt("Should not call beginInlineImage");
9822
+ qt("Should not call beginInlineImage");
9810
9823
  }
9811
9824
  beginImageData() {
9812
- Gt("Should not call beginImageData");
9825
+ qt("Should not call beginImageData");
9813
9826
  }
9814
9827
  paintFormXObjectBegin(e, t) {
9815
9828
  if (this.contentVisible && (this.save(), this.baseTransformStack.push(this.baseTransform), e && this.transform(...e), this.baseTransform = cr(this.ctx), t)) {
@@ -10213,7 +10226,7 @@ class EC {
10213
10226
  return u(this, Id) ? (t == null ? void 0 : t.viewState) !== "OFF" : u(this, Nd) ? (e == null ? void 0 : e.printState) !== "OFF" : !0;
10214
10227
  }
10215
10228
  _setVisible(e, t, r = !1) {
10216
- e !== pu && Gt("Internal method `_setVisible` called."), T(this, Md, r), T(this, qu, t);
10229
+ e !== pu && qt("Internal method `_setVisible` called."), T(this, Md, r), T(this, qu, t);
10217
10230
  }
10218
10231
  }
10219
10232
  Id = new WeakMap(), Nd = new WeakMap(), Md = new WeakMap(), qu = new WeakMap();
@@ -11313,7 +11326,7 @@ Yn = new WeakMap(), Od = new WeakSet(), O0 = function(e) {
11313
11326
  });
11314
11327
  };
11315
11328
  const HC = 1e5, wy = 30;
11316
- var V2, Ua, Nn, Fd, Bd, sl, Xs, zd, jd, al, Yu, Zu, Ha, Ku, Ud, Qu, ol, Hd, $d, mr, Ju, ll, Vd, $a, ec, ba, pw, gw, F0, ui, Pp, B0, mw, bw;
11329
+ var V2, Ua, Mn, Fd, Bd, sl, Xs, zd, jd, al, Yu, Zu, Ha, Ku, Ud, Qu, ol, Hd, $d, mr, Ju, ll, Vd, $a, ec, ba, pw, gw, F0, ui, Pp, B0, mw, bw;
11317
11330
  let zh = (mr = class {
11318
11331
  constructor({
11319
11332
  textContentSource: e,
@@ -11322,7 +11335,7 @@ let zh = (mr = class {
11322
11335
  }) {
11323
11336
  N(this, ba);
11324
11337
  N(this, Ua, Promise.withResolvers());
11325
- N(this, Nn, null);
11338
+ N(this, Mn, null);
11326
11339
  N(this, Fd, !1);
11327
11340
  N(this, Bd, !!((V2 = globalThis.FontInspector) != null && V2.enabled));
11328
11341
  N(this, sl, null);
@@ -11350,7 +11363,7 @@ let zh = (mr = class {
11350
11363
  }));
11351
11364
  else
11352
11365
  throw new Error('No "textContentSource" parameter specified.');
11353
- T(this, Nn, T(this, Yu, t)), T(this, Ha, r.scale * Zi.pixelRatio), T(this, Zu, r.rotation), T(this, Xs, {
11366
+ T(this, Mn, T(this, Yu, t)), T(this, Ha, r.scale * Zi.pixelRatio), T(this, Zu, r.rotation), T(this, Xs, {
11354
11367
  div: null,
11355
11368
  properties: null,
11356
11369
  ctx: null
@@ -11429,7 +11442,7 @@ let zh = (mr = class {
11429
11442
  u(this, ll).clear();
11430
11443
  }
11431
11444
  }
11432
- }, Ua = new WeakMap(), Nn = new WeakMap(), Fd = new WeakMap(), Bd = new WeakMap(), sl = new WeakMap(), Xs = new WeakMap(), zd = new WeakMap(), jd = new WeakMap(), al = new WeakMap(), Yu = new WeakMap(), Zu = new WeakMap(), Ha = new WeakMap(), Ku = new WeakMap(), Ud = new WeakMap(), Qu = new WeakMap(), ol = new WeakMap(), Hd = new WeakMap(), $d = new WeakMap(), Ju = new WeakMap(), ll = new WeakMap(), Vd = new WeakMap(), $a = new WeakMap(), ec = new WeakMap(), ba = new WeakSet(), pw = function(e) {
11445
+ }, Ua = new WeakMap(), Mn = new WeakMap(), Fd = new WeakMap(), Bd = new WeakMap(), sl = new WeakMap(), Xs = new WeakMap(), zd = new WeakMap(), jd = new WeakMap(), al = new WeakMap(), Yu = new WeakMap(), Zu = new WeakMap(), Ha = new WeakMap(), Ku = new WeakMap(), Ud = new WeakMap(), Qu = new WeakMap(), ol = new WeakMap(), Hd = new WeakMap(), $d = new WeakMap(), Ju = new WeakMap(), ll = new WeakMap(), Vd = new WeakMap(), $a = new WeakMap(), ec = new WeakMap(), ba = new WeakSet(), pw = function(e) {
11433
11446
  var n, s;
11434
11447
  if (u(this, Fd))
11435
11448
  return;
@@ -11442,9 +11455,9 @@ let zh = (mr = class {
11442
11455
  }
11443
11456
  if (a.str === void 0) {
11444
11457
  if (a.type === "beginMarkedContentProps" || a.type === "beginMarkedContent") {
11445
- const o = u(this, Nn);
11446
- T(this, Nn, document.createElement("span")), u(this, Nn).classList.add("markedContent"), a.id !== null && u(this, Nn).setAttribute("id", `${a.id}`), o.append(u(this, Nn));
11447
- } else a.type === "endMarkedContent" && T(this, Nn, u(this, Nn).parentNode);
11458
+ const o = u(this, Mn);
11459
+ T(this, Mn, document.createElement("span")), u(this, Mn).classList.add("markedContent"), a.id !== null && u(this, Mn).setAttribute("id", `${a.id}`), o.append(u(this, Mn));
11460
+ } else a.type === "endMarkedContent" && T(this, Mn, u(this, Mn).parentNode);
11448
11461
  continue;
11449
11462
  }
11450
11463
  r.push(a.str), L(this, ba, gw).call(this, a);
@@ -11469,7 +11482,7 @@ let zh = (mr = class {
11469
11482
  let h, d;
11470
11483
  s === 0 ? (h = n[4], d = n[5] - c) : (h = n[4] + c * Math.sin(s), d = n[5] - c * Math.cos(s));
11471
11484
  const p = "calc(var(--total-scale-factor) *", g = t.style;
11472
- u(this, Nn) === u(this, Yu) ? (g.left = `${(100 * h / u(this, jd)).toFixed(2)}%`, g.top = `${(100 * d / u(this, zd)).toFixed(2)}%`) : (g.left = `${p}${h.toFixed(2)}px)`, g.top = `${p}${d.toFixed(2)}px)`), g.fontSize = `${p}${(u(mr, $a) * l).toFixed(2)}px)`, g.fontFamily = o, r.fontSize = l, t.setAttribute("role", "presentation"), t.textContent = e.str, t.dir = e.dir, u(this, Bd) && (t.dataset.fontName = a.fontSubstitutionLoadedName || e.fontName), s !== 0 && (r.angle = s * (180 / Math.PI));
11485
+ u(this, Mn) === u(this, Yu) ? (g.left = `${(100 * h / u(this, jd)).toFixed(2)}%`, g.top = `${(100 * d / u(this, zd)).toFixed(2)}%`) : (g.left = `${p}${h.toFixed(2)}px)`, g.top = `${p}${d.toFixed(2)}px)`), g.fontSize = `${p}${(u(mr, $a) * l).toFixed(2)}px)`, g.fontFamily = o, r.fontSize = l, t.setAttribute("role", "presentation"), t.textContent = e.str, t.dir = e.dir, u(this, Bd) && (t.dataset.fontName = a.fontSubstitutionLoadedName || e.fontName), s !== 0 && (r.angle = s * (180 / Math.PI));
11473
11486
  let y = !1;
11474
11487
  if (e.str.length > 1)
11475
11488
  y = !0;
@@ -11477,9 +11490,9 @@ let zh = (mr = class {
11477
11490
  const w = Math.abs(e.transform[0]), v = Math.abs(e.transform[3]);
11478
11491
  w !== v && Math.max(w, v) / Math.min(w, v) > 1.5 && (y = !0);
11479
11492
  }
11480
- if (y && (r.canvasWidth = a.vertical ? e.height : e.width), u(this, Hd).set(t, r), u(this, Xs).div = t, u(this, Xs).properties = r, L(this, ba, F0).call(this, u(this, Xs)), r.hasText && u(this, Nn).append(t), r.hasEOL) {
11493
+ if (y && (r.canvasWidth = a.vertical ? e.height : e.width), u(this, Hd).set(t, r), u(this, Xs).div = t, u(this, Xs).properties = r, L(this, ba, F0).call(this, u(this, Xs)), r.hasText && u(this, Mn).append(t), r.hasEOL) {
11481
11494
  const w = document.createElement("br");
11482
- w.setAttribute("role", "presentation"), u(this, Nn).append(w);
11495
+ w.setAttribute("role", "presentation"), u(this, Mn).append(w);
11483
11496
  }
11484
11497
  }, F0 = function(e) {
11485
11498
  var o;
@@ -11753,7 +11766,7 @@ let qb = (G2 = class {
11753
11766
  u(this, ul).resolve();
11754
11767
  }
11755
11768
  requestDataRange(e, t) {
11756
- Gt("Abstract method PDFDataRangeTransport.requestDataRange");
11769
+ qt("Abstract method PDFDataRangeTransport.requestDataRange");
11757
11770
  }
11758
11771
  abort() {
11759
11772
  }
@@ -12188,14 +12201,14 @@ Ys = new WeakMap(), cl = new WeakSet(), Ah = function() {
12188
12201
  return !1;
12189
12202
  return this._intentStates.clear(), this.objs.clear(), T(this, Ys, !1), !0;
12190
12203
  };
12191
- var Va, Bi, Zs, hl, Ag, dl, fl, kn, Rp, vw, yw, Eh, tc, Ip;
12204
+ var Va, Bi, Zs, hl, Ag, dl, fl, Dn, Rp, vw, yw, Eh, tc, Ip;
12192
12205
  const sr = class sr {
12193
12206
  constructor({
12194
12207
  name: e = null,
12195
12208
  port: t = null,
12196
12209
  verbosity: r = O_()
12197
12210
  } = {}) {
12198
- N(this, kn);
12211
+ N(this, Dn);
12199
12212
  N(this, Va, Promise.withResolvers());
12200
12213
  N(this, Bi, null);
12201
12214
  N(this, Zs, null);
@@ -12203,9 +12216,9 @@ const sr = class sr {
12203
12216
  if (this.name = e, this.destroyed = !1, this.verbosity = r, t) {
12204
12217
  if (u(sr, fl).has(t))
12205
12218
  throw new Error("Cannot use more than one PDFWorker per port.");
12206
- u(sr, fl).set(t, this), L(this, kn, vw).call(this, t);
12219
+ u(sr, fl).set(t, this), L(this, Dn, vw).call(this, t);
12207
12220
  } else
12208
- L(this, kn, yw).call(this);
12221
+ L(this, Dn, yw).call(this);
12209
12222
  }
12210
12223
  get promise() {
12211
12224
  return u(this, Va).promise;
@@ -12242,16 +12255,16 @@ const sr = class sr {
12242
12255
  )).WorkerMessageHandler)());
12243
12256
  }
12244
12257
  };
12245
- Va = new WeakMap(), Bi = new WeakMap(), Zs = new WeakMap(), hl = new WeakMap(), Ag = new WeakMap(), dl = new WeakMap(), fl = new WeakMap(), kn = new WeakSet(), Rp = function() {
12258
+ Va = new WeakMap(), Bi = new WeakMap(), Zs = new WeakMap(), hl = new WeakMap(), Ag = new WeakMap(), dl = new WeakMap(), fl = new WeakMap(), Dn = new WeakSet(), Rp = function() {
12246
12259
  u(this, Va).resolve(), u(this, Bi).send("configure", {
12247
12260
  verbosity: this.verbosity
12248
12261
  });
12249
12262
  }, vw = function(e) {
12250
12263
  T(this, Zs, e), T(this, Bi, new bh("main", "worker", e)), u(this, Bi).on("ready", () => {
12251
- }), L(this, kn, Rp).call(this);
12264
+ }), L(this, Dn, Rp).call(this);
12252
12265
  }, yw = function() {
12253
12266
  if (u(sr, dl) || u(sr, tc, Ip)) {
12254
- L(this, kn, Eh).call(this);
12267
+ L(this, Dn, Eh).call(this);
12255
12268
  return;
12256
12269
  }
12257
12270
  let {
@@ -12262,7 +12275,7 @@ Va = new WeakMap(), Bi = new WeakMap(), Zs = new WeakMap(), hl = new WeakMap(),
12262
12275
  const t = new Worker(e, {
12263
12276
  type: "module"
12264
12277
  }), r = new bh("main", "worker", t), n = () => {
12265
- s.abort(), r.destroy(), t.terminate(), this.destroyed ? u(this, Va).reject(new Error("Worker was destroyed")) : L(this, kn, Eh).call(this);
12278
+ s.abort(), r.destroy(), t.terminate(), this.destroyed ? u(this, Va).reject(new Error("Worker was destroyed")) : L(this, Dn, Eh).call(this);
12266
12279
  }, s = new AbortController();
12267
12280
  t.addEventListener("error", () => {
12268
12281
  u(this, hl) || n();
@@ -12273,7 +12286,7 @@ Va = new WeakMap(), Bi = new WeakMap(), Zs = new WeakMap(), hl = new WeakMap(),
12273
12286
  n();
12274
12287
  return;
12275
12288
  }
12276
- T(this, Bi, r), T(this, Zs, t), T(this, hl, t), L(this, kn, Rp).call(this);
12289
+ T(this, Bi, r), T(this, Zs, t), T(this, hl, t), L(this, Dn, Rp).call(this);
12277
12290
  }), r.on("ready", (o) => {
12278
12291
  if (s.abort(), this.destroyed) {
12279
12292
  n();
@@ -12282,7 +12295,7 @@ Va = new WeakMap(), Bi = new WeakMap(), Zs = new WeakMap(), hl = new WeakMap(),
12282
12295
  try {
12283
12296
  a();
12284
12297
  } catch {
12285
- L(this, kn, Eh).call(this);
12298
+ L(this, Dn, Eh).call(this);
12286
12299
  }
12287
12300
  });
12288
12301
  const a = () => {
@@ -12294,7 +12307,7 @@ Va = new WeakMap(), Bi = new WeakMap(), Zs = new WeakMap(), hl = new WeakMap(),
12294
12307
  } catch {
12295
12308
  Ig("The worker has been disabled.");
12296
12309
  }
12297
- L(this, kn, Eh).call(this);
12310
+ L(this, Dn, Eh).call(this);
12298
12311
  }, Eh = function() {
12299
12312
  u(sr, dl) || (lt("Setting up fake worker."), T(sr, dl, !0)), sr._setupFakeWorkerGlobal.then((e) => {
12300
12313
  if (this.destroyed) {
@@ -12304,7 +12317,7 @@ Va = new WeakMap(), Bi = new WeakMap(), Zs = new WeakMap(), hl = new WeakMap(),
12304
12317
  const t = new rC();
12305
12318
  T(this, Zs, t);
12306
12319
  const r = `fake${vn(sr, Ag)._++}`, n = new bh(r + "_worker", r, t);
12307
- e.setup(n, t), T(this, Bi, new bh(r, r + "_worker", t)), L(this, kn, Rp).call(this);
12320
+ e.setup(n, t), T(this, Bi, new bh(r, r + "_worker", t)), L(this, Dn, Rp).call(this);
12308
12321
  }).catch((e) => {
12309
12322
  u(this, Va).reject(new Error(`Setting up fake worker failed: "${e.message}".`));
12310
12323
  });
@@ -12486,12 +12499,12 @@ class qC {
12486
12499
  }) => {
12487
12500
  this._numPages = r.numPages, this._htmlForXfa = r.htmlForXfa, delete r.htmlForXfa, t._capability.resolve(new VC(r, this));
12488
12501
  }), e.on("DocException", (r) => {
12489
- t._capability.reject(Pn(r));
12502
+ t._capability.reject(Rn(r));
12490
12503
  }), e.on("PasswordRequest", (r) => {
12491
12504
  T(this, Qs, Promise.withResolvers());
12492
12505
  try {
12493
12506
  if (!t.onPassword)
12494
- throw Pn(r);
12507
+ throw Rn(r);
12495
12508
  const n = (s) => {
12496
12509
  s instanceof Error ? u(this, Qs).reject(s) : u(this, Qs).resolve({
12497
12510
  password: s
@@ -12900,7 +12913,7 @@ class XC {
12900
12913
  return this._createSVG(e);
12901
12914
  }
12902
12915
  _createSVG(e) {
12903
- Gt("Abstract method `_createSVG` called.");
12916
+ qt("Abstract method `_createSVG` called.");
12904
12917
  }
12905
12918
  }
12906
12919
  class Uh extends XC {
@@ -13390,7 +13403,7 @@ const Sv = class Sv {
13390
13403
  this.parent.div.append(t.render());
13391
13404
  }
13392
13405
  render() {
13393
- Gt("Abstract method `AnnotationElement.render` called");
13406
+ qt("Abstract method `AnnotationElement.render` called");
13394
13407
  }
13395
13408
  _getElementsByName(e, t = null) {
13396
13409
  const r = [];
@@ -14223,7 +14236,7 @@ class H0 extends Cr {
14223
14236
  return this.container.setAttribute("aria-controls", r.map((n) => `${jb}${n}`).join(",")), this.container;
14224
14237
  }
14225
14238
  }
14226
- var ac, Eg, _g, oc, lc, fr, Js, bl, Zd, Kd, uc, ea, zi, ta, Qd, ra, Jd, vl, yl, qt, Np, $0, Cw, Sw, Tw, kw, Mp, Lp, V0;
14239
+ var ac, Eg, _g, oc, lc, fr, Js, bl, Zd, Kd, uc, ea, zi, ta, Qd, ra, Jd, vl, yl, Wt, Np, $0, Cw, Sw, Tw, kw, Mp, Lp, V0;
14227
14240
  class rS {
14228
14241
  constructor({
14229
14242
  container: e,
@@ -14238,11 +14251,11 @@ class rS {
14238
14251
  parentRect: h,
14239
14252
  open: d
14240
14253
  }) {
14241
- N(this, qt);
14242
- N(this, ac, L(this, qt, Tw).bind(this));
14243
- N(this, Eg, L(this, qt, V0).bind(this));
14244
- N(this, _g, L(this, qt, Lp).bind(this));
14245
- N(this, oc, L(this, qt, Mp).bind(this));
14254
+ N(this, Wt);
14255
+ N(this, ac, L(this, Wt, Tw).bind(this));
14256
+ N(this, Eg, L(this, Wt, V0).bind(this));
14257
+ N(this, _g, L(this, Wt, Lp).bind(this));
14258
+ N(this, oc, L(this, Wt, Mp).bind(this));
14246
14259
  N(this, lc, null);
14247
14260
  N(this, fr, null);
14248
14261
  N(this, Js, null);
@@ -14264,7 +14277,7 @@ class rS {
14264
14277
  g.addEventListener("click", u(this, oc)), g.addEventListener("mouseenter", u(this, _g)), g.addEventListener("mouseleave", u(this, Eg)), g.classList.add("popupTriggerArea");
14265
14278
  for (const g of r)
14266
14279
  (p = g.container) == null || p.addEventListener("keydown", u(this, ac));
14267
- u(this, fr).hidden = !0, d && L(this, qt, Mp).call(this);
14280
+ u(this, fr).hidden = !0, d && L(this, Wt, Mp).call(this);
14268
14281
  }
14269
14282
  render() {
14270
14283
  if (u(this, zi))
@@ -14286,7 +14299,7 @@ class rS {
14286
14299
  dateObj: u(this, bl).valueOf()
14287
14300
  })), s.dateTime = u(this, bl).toISOString(), t.append(s);
14288
14301
  }
14289
- const n = u(this, qt, Np);
14302
+ const n = u(this, Wt, Np);
14290
14303
  if (n)
14291
14304
  Xb.render({
14292
14305
  xfaHtml: n,
@@ -14320,7 +14333,7 @@ class rS {
14320
14333
  u(this, vl) || T(this, vl, {
14321
14334
  contentsObj: u(this, Js),
14322
14335
  richText: u(this, ra)
14323
- }), e && T(this, ta, null), t && (T(this, ra, L(this, qt, Sw).call(this, t)), T(this, Js, null)), (r = u(this, zi)) == null || r.remove(), T(this, zi, null);
14336
+ }), e && T(this, ta, null), t && (T(this, ra, L(this, Wt, Sw).call(this, t)), T(this, Js, null)), (r = u(this, zi)) == null || r.remove(), T(this, zi, null);
14324
14337
  }
14325
14338
  resetEdited() {
14326
14339
  var e;
@@ -14333,21 +14346,21 @@ class rS {
14333
14346
  T(this, yl, this.isVisible), u(this, yl) && (u(this, fr).hidden = !0);
14334
14347
  }
14335
14348
  maybeShow() {
14336
- u(this, yl) && (u(this, zi) || L(this, qt, Lp).call(this), T(this, yl, !1), u(this, fr).hidden = !1);
14349
+ u(this, yl) && (u(this, zi) || L(this, Wt, Lp).call(this), T(this, yl, !1), u(this, fr).hidden = !1);
14337
14350
  }
14338
14351
  get isVisible() {
14339
14352
  return u(this, fr).hidden === !1;
14340
14353
  }
14341
14354
  }
14342
- ac = new WeakMap(), Eg = new WeakMap(), _g = new WeakMap(), oc = new WeakMap(), lc = new WeakMap(), fr = new WeakMap(), Js = new WeakMap(), bl = new WeakMap(), Zd = new WeakMap(), Kd = new WeakMap(), uc = new WeakMap(), ea = new WeakMap(), zi = new WeakMap(), ta = new WeakMap(), Qd = new WeakMap(), ra = new WeakMap(), Jd = new WeakMap(), vl = new WeakMap(), yl = new WeakMap(), qt = new WeakSet(), Np = function() {
14355
+ ac = new WeakMap(), Eg = new WeakMap(), _g = new WeakMap(), oc = new WeakMap(), lc = new WeakMap(), fr = new WeakMap(), Js = new WeakMap(), bl = new WeakMap(), Zd = new WeakMap(), Kd = new WeakMap(), uc = new WeakMap(), ea = new WeakMap(), zi = new WeakMap(), ta = new WeakMap(), Qd = new WeakMap(), ra = new WeakMap(), Jd = new WeakMap(), vl = new WeakMap(), yl = new WeakMap(), Wt = new WeakSet(), Np = function() {
14343
14356
  const e = u(this, ra), t = u(this, Js);
14344
14357
  return e != null && e.str && (!(t != null && t.str) || t.str === e.str) && u(this, ra).html || null;
14345
14358
  }, $0 = function() {
14346
14359
  var e, t, r;
14347
- return ((r = (t = (e = u(this, qt, Np)) == null ? void 0 : e.attributes) == null ? void 0 : t.style) == null ? void 0 : r.fontSize) || 0;
14360
+ return ((r = (t = (e = u(this, Wt, Np)) == null ? void 0 : e.attributes) == null ? void 0 : t.style) == null ? void 0 : r.fontSize) || 0;
14348
14361
  }, Cw = function() {
14349
14362
  var e, t, r;
14350
- return ((r = (t = (e = u(this, qt, Np)) == null ? void 0 : e.attributes) == null ? void 0 : t.style) == null ? void 0 : r.color) || null;
14363
+ return ((r = (t = (e = u(this, Wt, Np)) == null ? void 0 : e.attributes) == null ? void 0 : t.style) == null ? void 0 : r.color) || null;
14351
14364
  }, Sw = function(e) {
14352
14365
  const t = [], r = {
14353
14366
  str: e,
@@ -14363,8 +14376,8 @@ ac = new WeakMap(), Eg = new WeakMap(), _g = new WeakMap(), oc = new WeakMap(),
14363
14376
  }
14364
14377
  }, n = {
14365
14378
  style: {
14366
- color: u(this, qt, Cw),
14367
- fontSize: u(this, qt, $0) ? `calc(${u(this, qt, $0)}px * var(--total-scale-factor))` : ""
14379
+ color: u(this, Wt, Cw),
14380
+ fontSize: u(this, Wt, $0) ? `calc(${u(this, Wt, $0)}px * var(--total-scale-factor))` : ""
14368
14381
  }
14369
14382
  };
14370
14383
  for (const s of e.split(`
@@ -14376,7 +14389,7 @@ ac = new WeakMap(), Eg = new WeakMap(), _g = new WeakMap(), oc = new WeakMap(),
14376
14389
  });
14377
14390
  return r;
14378
14391
  }, Tw = function(e) {
14379
- e.altKey || e.shiftKey || e.ctrlKey || e.metaKey || (e.key === "Enter" || e.key === "Escape" && u(this, ea)) && L(this, qt, Mp).call(this);
14392
+ e.altKey || e.shiftKey || e.ctrlKey || e.metaKey || (e.key === "Enter" || e.key === "Escape" && u(this, ea)) && L(this, Wt, Mp).call(this);
14380
14393
  }, kw = function() {
14381
14394
  if (u(this, ta) !== null)
14382
14395
  return;
@@ -14406,9 +14419,9 @@ ac = new WeakMap(), Eg = new WeakMap(), _g = new WeakMap(), oc = new WeakMap(),
14406
14419
  } = u(this, fr);
14407
14420
  g.left = `${u(this, ta)[0]}%`, g.top = `${u(this, ta)[1]}%`;
14408
14421
  }, Mp = function() {
14409
- T(this, ea, !u(this, ea)), u(this, ea) ? (L(this, qt, Lp).call(this), u(this, fr).addEventListener("click", u(this, oc)), u(this, fr).addEventListener("keydown", u(this, ac))) : (L(this, qt, V0).call(this), u(this, fr).removeEventListener("click", u(this, oc)), u(this, fr).removeEventListener("keydown", u(this, ac)));
14422
+ T(this, ea, !u(this, ea)), u(this, ea) ? (L(this, Wt, Lp).call(this), u(this, fr).addEventListener("click", u(this, oc)), u(this, fr).addEventListener("keydown", u(this, ac))) : (L(this, Wt, V0).call(this), u(this, fr).removeEventListener("click", u(this, oc)), u(this, fr).removeEventListener("keydown", u(this, ac)));
14410
14423
  }, Lp = function() {
14411
- u(this, zi) || this.render(), this.isVisible ? u(this, ea) && u(this, fr).classList.add("focused") : (L(this, qt, kw).call(this), u(this, fr).hidden = !1, u(this, fr).style.zIndex = parseInt(u(this, fr).style.zIndex) + 1e3);
14424
+ u(this, zi) || this.render(), this.isVisible ? u(this, ea) && u(this, fr).classList.add("focused") : (L(this, Wt, kw).call(this), u(this, fr).hidden = !1, u(this, fr).style.zIndex = parseInt(u(this, fr).style.zIndex) + 1e3);
14412
14425
  }, V0 = function() {
14413
14426
  u(this, fr).classList.remove("focused"), !(u(this, ea) || !this.isVisible) && (u(this, fr).hidden = !0, u(this, fr).style.zIndex = parseInt(u(this, fr).style.zIndex) - 1e3);
14414
14427
  };
@@ -15370,13 +15383,13 @@ ji = new WeakMap(), Zn = new WeakMap(), hf = new WeakMap(), Al = new WeakMap(),
15370
15383
  let Y0 = Qt;
15371
15384
  class Ge {
15372
15385
  toSVGPath() {
15373
- Gt("Abstract method `toSVGPath` must be implemented.");
15386
+ qt("Abstract method `toSVGPath` must be implemented.");
15374
15387
  }
15375
15388
  get box() {
15376
- Gt("Abstract getter `box` must be implemented.");
15389
+ qt("Abstract getter `box` must be implemented.");
15377
15390
  }
15378
15391
  serialize(e, t) {
15379
- Gt("Abstract method `serialize` must be implemented.");
15392
+ qt("Abstract method `serialize` must be implemented.");
15380
15393
  }
15381
15394
  static _rescale(e, t, r, n, s, a) {
15382
15395
  a || (a = new Float32Array(e.length));
@@ -15629,10 +15642,10 @@ gc = new WeakMap(), Cl = new WeakMap(), na = new WeakMap(), gf = new WeakMap(),
15629
15642
  const h = u(this, Cl);
15630
15643
  h[0] = a[0] - u(this, na), h[1] = a[1] - u(this, na), h[2] = a[2] - a[0] + 2 * u(this, na), h[3] = a[3] - a[1] + 2 * u(this, na), this.lastPoint = [o, l];
15631
15644
  };
15632
- var bf, vf, Ya, Hi, Dn, qw, zp, Ww, Xw, Q0;
15645
+ var bf, vf, Ya, Hi, Pn, qw, zp, Ww, Xw, Q0;
15633
15646
  class K0 {
15634
15647
  constructor(e, t = 0, r = 0, n = !0) {
15635
- N(this, Dn);
15648
+ N(this, Pn);
15636
15649
  N(this, bf);
15637
15650
  N(this, vf);
15638
15651
  N(this, Ya, []);
@@ -15658,11 +15671,11 @@ class K0 {
15658
15671
  u(this, Ya).sort((t, r) => t[0] - r[0] || t[1] - r[1] || t[2] - r[2]);
15659
15672
  const e = [];
15660
15673
  for (const t of u(this, Ya))
15661
- t[3] ? (e.push(...L(this, Dn, Q0).call(this, t)), L(this, Dn, Ww).call(this, t)) : (L(this, Dn, Xw).call(this, t), e.push(...L(this, Dn, Q0).call(this, t)));
15662
- return L(this, Dn, qw).call(this, e);
15674
+ t[3] ? (e.push(...L(this, Pn, Q0).call(this, t)), L(this, Pn, Ww).call(this, t)) : (L(this, Pn, Xw).call(this, t), e.push(...L(this, Pn, Q0).call(this, t)));
15675
+ return L(this, Pn, qw).call(this, e);
15663
15676
  }
15664
15677
  }
15665
- bf = new WeakMap(), vf = new WeakMap(), Ya = new WeakMap(), Hi = new WeakMap(), Dn = new WeakSet(), qw = function(e) {
15678
+ bf = new WeakMap(), vf = new WeakMap(), Ya = new WeakMap(), Hi = new WeakMap(), Pn = new WeakSet(), qw = function(e) {
15666
15679
  const t = [], r = /* @__PURE__ */ new Set();
15667
15680
  for (const a of e) {
15668
15681
  const [o, l, c] = a;
@@ -15704,10 +15717,10 @@ bf = new WeakMap(), vf = new WeakMap(), Ya = new WeakMap(), Hi = new WeakMap(),
15704
15717
  }
15705
15718
  return n + 1;
15706
15719
  }, Ww = function([, e, t]) {
15707
- const r = L(this, Dn, zp).call(this, e);
15720
+ const r = L(this, Pn, zp).call(this, e);
15708
15721
  u(this, Hi).splice(r, 0, [e, t]);
15709
15722
  }, Xw = function([, e, t]) {
15710
- const r = L(this, Dn, zp).call(this, e);
15723
+ const r = L(this, Pn, zp).call(this, e);
15711
15724
  for (let n = r; n < u(this, Hi).length; n++) {
15712
15725
  const [s, a] = u(this, Hi)[n];
15713
15726
  if (s !== e)
@@ -15727,7 +15740,7 @@ bf = new WeakMap(), vf = new WeakMap(), Ya = new WeakMap(), Hi = new WeakMap(),
15727
15740
  }
15728
15741
  }
15729
15742
  }, Q0 = function(e) {
15730
- const [t, r, n] = e, s = [[t, r, n]], a = L(this, Dn, zp).call(this, n);
15743
+ const [t, r, n] = e, s = [[t, r, n]], a = L(this, Pn, zp).call(this, n);
15731
15744
  for (let o = 0; o < a; o++) {
15732
15745
  const [l, c] = u(this, Hi)[o];
15733
15746
  for (let h = 0, d = s.length; h < d; h++) {
@@ -15798,13 +15811,13 @@ class fS extends Vw {
15798
15811
  return new J0(e, t, r, n, s, a);
15799
15812
  }
15800
15813
  }
15801
- var ei, Sl, bc, Nr, wf, vc, ia, xf, Za, $i, yc, Af, Vt, eb, tb, rb, Ro, Yw, Ea;
15802
- const Rn = class Rn {
15814
+ var ei, Sl, bc, Nr, wf, vc, ia, xf, Za, $i, yc, Af, Gt, eb, tb, rb, Ro, Yw, Ea;
15815
+ const In = class In {
15803
15816
  constructor({
15804
15817
  editor: e = null,
15805
15818
  uiManager: t = null
15806
15819
  }) {
15807
- N(this, Vt);
15820
+ N(this, Gt);
15808
15821
  N(this, ei, null);
15809
15822
  N(this, Sl, null);
15810
15823
  N(this, bc);
@@ -15817,7 +15830,7 @@ const Rn = class Rn {
15817
15830
  N(this, $i, null);
15818
15831
  N(this, yc);
15819
15832
  var r, n;
15820
- e ? (T(this, vc, !1), T(this, yc, Tt.HIGHLIGHT_COLOR), T(this, ia, e)) : (T(this, vc, !0), T(this, yc, Tt.HIGHLIGHT_DEFAULT_COLOR)), T(this, $i, (e == null ? void 0 : e._uiManager) || t), T(this, xf, u(this, $i)._eventBus), T(this, bc, ((r = e == null ? void 0 : e.color) == null ? void 0 : r.toUpperCase()) || ((n = u(this, $i)) == null ? void 0 : n.highlightColors.values().next().value) || "#FFFF98"), u(Rn, Af) || T(Rn, Af, Object.freeze({
15833
+ e ? (T(this, vc, !1), T(this, yc, Tt.HIGHLIGHT_COLOR), T(this, ia, e)) : (T(this, vc, !0), T(this, yc, Tt.HIGHLIGHT_DEFAULT_COLOR)), T(this, $i, (e == null ? void 0 : e._uiManager) || t), T(this, xf, u(this, $i)._eventBus), T(this, bc, ((r = e == null ? void 0 : e.color) == null ? void 0 : r.toUpperCase()) || ((n = u(this, $i)) == null ? void 0 : n.highlightColors.values().next().value) || "#FFFF98"), u(In, Af) || T(In, Af, Object.freeze({
15821
15834
  blue: "pdfjs-editor-colorpicker-blue",
15822
15835
  green: "pdfjs-editor-colorpicker-green",
15823
15836
  pink: "pdfjs-editor-colorpicker-pink",
@@ -15826,36 +15839,36 @@ const Rn = class Rn {
15826
15839
  }));
15827
15840
  }
15828
15841
  static get _keyboardManager() {
15829
- return _t(this, "_keyboardManager", new Lf([[["Escape", "mac+Escape"], Rn.prototype._hideDropdownFromKeyboard], [[" ", "mac+ "], Rn.prototype._colorSelectFromKeyboard], [["ArrowDown", "ArrowRight", "mac+ArrowDown", "mac+ArrowRight"], Rn.prototype._moveToNext], [["ArrowUp", "ArrowLeft", "mac+ArrowUp", "mac+ArrowLeft"], Rn.prototype._moveToPrevious], [["Home", "mac+Home"], Rn.prototype._moveToBeginning], [["End", "mac+End"], Rn.prototype._moveToEnd]]));
15842
+ return _t(this, "_keyboardManager", new Lf([[["Escape", "mac+Escape"], In.prototype._hideDropdownFromKeyboard], [[" ", "mac+ "], In.prototype._colorSelectFromKeyboard], [["ArrowDown", "ArrowRight", "mac+ArrowDown", "mac+ArrowRight"], In.prototype._moveToNext], [["ArrowUp", "ArrowLeft", "mac+ArrowUp", "mac+ArrowLeft"], In.prototype._moveToPrevious], [["Home", "mac+Home"], In.prototype._moveToBeginning], [["End", "mac+End"], In.prototype._moveToEnd]]));
15830
15843
  }
15831
15844
  renderButton() {
15832
15845
  const e = T(this, ei, document.createElement("button"));
15833
15846
  e.className = "colorPicker", e.tabIndex = "0", e.setAttribute("data-l10n-id", "pdfjs-editor-colorpicker-button"), e.ariaHasPopup = "true", u(this, ia) && (e.ariaControls = `${u(this, ia).id}_colorpicker_dropdown`);
15834
15847
  const t = u(this, $i)._signal;
15835
- e.addEventListener("click", L(this, Vt, Ro).bind(this), {
15848
+ e.addEventListener("click", L(this, Gt, Ro).bind(this), {
15836
15849
  signal: t
15837
- }), e.addEventListener("keydown", L(this, Vt, rb).bind(this), {
15850
+ }), e.addEventListener("keydown", L(this, Gt, rb).bind(this), {
15838
15851
  signal: t
15839
15852
  });
15840
15853
  const r = T(this, Sl, document.createElement("span"));
15841
15854
  return r.className = "swatch", r.ariaHidden = "true", r.style.backgroundColor = u(this, bc), e.append(r), e;
15842
15855
  }
15843
15856
  renderMainDropdown() {
15844
- const e = T(this, Nr, L(this, Vt, eb).call(this));
15857
+ const e = T(this, Nr, L(this, Gt, eb).call(this));
15845
15858
  return e.ariaOrientation = "horizontal", e.ariaLabelledBy = "highlightColorPickerLabel", e;
15846
15859
  }
15847
15860
  _colorSelectFromKeyboard(e) {
15848
15861
  if (e.target === u(this, ei)) {
15849
- L(this, Vt, Ro).call(this, e);
15862
+ L(this, Gt, Ro).call(this, e);
15850
15863
  return;
15851
15864
  }
15852
15865
  const t = e.target.getAttribute("data-color");
15853
- t && L(this, Vt, tb).call(this, t, e);
15866
+ t && L(this, Gt, tb).call(this, t, e);
15854
15867
  }
15855
15868
  _moveToNext(e) {
15856
15869
  var t, r;
15857
- if (!u(this, Vt, Ea)) {
15858
- L(this, Vt, Ro).call(this, e);
15870
+ if (!u(this, Gt, Ea)) {
15871
+ L(this, Gt, Ro).call(this, e);
15859
15872
  return;
15860
15873
  }
15861
15874
  if (e.target === u(this, ei)) {
@@ -15867,23 +15880,23 @@ const Rn = class Rn {
15867
15880
  _moveToPrevious(e) {
15868
15881
  var t, r;
15869
15882
  if (e.target === ((t = u(this, Nr)) == null ? void 0 : t.firstChild) || e.target === u(this, ei)) {
15870
- u(this, Vt, Ea) && this._hideDropdownFromKeyboard();
15883
+ u(this, Gt, Ea) && this._hideDropdownFromKeyboard();
15871
15884
  return;
15872
15885
  }
15873
- u(this, Vt, Ea) || L(this, Vt, Ro).call(this, e), (r = e.target.previousSibling) == null || r.focus();
15886
+ u(this, Gt, Ea) || L(this, Gt, Ro).call(this, e), (r = e.target.previousSibling) == null || r.focus();
15874
15887
  }
15875
15888
  _moveToBeginning(e) {
15876
15889
  var t;
15877
- if (!u(this, Vt, Ea)) {
15878
- L(this, Vt, Ro).call(this, e);
15890
+ if (!u(this, Gt, Ea)) {
15891
+ L(this, Gt, Ro).call(this, e);
15879
15892
  return;
15880
15893
  }
15881
15894
  (t = u(this, Nr).firstChild) == null || t.focus();
15882
15895
  }
15883
15896
  _moveToEnd(e) {
15884
15897
  var t;
15885
- if (!u(this, Vt, Ea)) {
15886
- L(this, Vt, Ro).call(this, e);
15898
+ if (!u(this, Gt, Ea)) {
15899
+ L(this, Gt, Ro).call(this, e);
15887
15900
  return;
15888
15901
  }
15889
15902
  (t = u(this, Nr).lastChild) == null || t.focus();
@@ -15895,7 +15908,7 @@ const Rn = class Rn {
15895
15908
  _hideDropdownFromKeyboard() {
15896
15909
  var e;
15897
15910
  if (!u(this, vc)) {
15898
- if (!u(this, Vt, Ea)) {
15911
+ if (!u(this, Gt, Ea)) {
15899
15912
  (e = u(this, ia)) == null || e.unselect();
15900
15913
  return;
15901
15914
  }
@@ -15917,20 +15930,20 @@ const Rn = class Rn {
15917
15930
  (e = u(this, ei)) == null || e.remove(), T(this, ei, null), T(this, Sl, null), (t = u(this, Nr)) == null || t.remove(), T(this, Nr, null);
15918
15931
  }
15919
15932
  };
15920
- ei = new WeakMap(), Sl = new WeakMap(), bc = new WeakMap(), Nr = new WeakMap(), wf = new WeakMap(), vc = new WeakMap(), ia = new WeakMap(), xf = new WeakMap(), Za = new WeakMap(), $i = new WeakMap(), yc = new WeakMap(), Af = new WeakMap(), Vt = new WeakSet(), eb = function() {
15933
+ ei = new WeakMap(), Sl = new WeakMap(), bc = new WeakMap(), Nr = new WeakMap(), wf = new WeakMap(), vc = new WeakMap(), ia = new WeakMap(), xf = new WeakMap(), Za = new WeakMap(), $i = new WeakMap(), yc = new WeakMap(), Af = new WeakMap(), Gt = new WeakSet(), eb = function() {
15921
15934
  const e = document.createElement("div"), t = u(this, $i)._signal;
15922
15935
  e.addEventListener("contextmenu", Ci, {
15923
15936
  signal: t
15924
15937
  }), e.className = "dropdown", e.role = "listbox", e.ariaMultiSelectable = "false", e.ariaOrientation = "vertical", e.setAttribute("data-l10n-id", "pdfjs-editor-colorpicker-dropdown"), u(this, ia) && (e.id = `${u(this, ia).id}_colorpicker_dropdown`);
15925
15938
  for (const [r, n] of u(this, $i).highlightColors) {
15926
15939
  const s = document.createElement("button");
15927
- s.tabIndex = "0", s.role = "option", s.setAttribute("data-color", n), s.title = r, s.setAttribute("data-l10n-id", u(Rn, Af)[r]);
15940
+ s.tabIndex = "0", s.role = "option", s.setAttribute("data-color", n), s.title = r, s.setAttribute("data-l10n-id", u(In, Af)[r]);
15928
15941
  const a = document.createElement("span");
15929
- s.append(a), a.className = "swatch", a.style.backgroundColor = n, s.ariaSelected = n === u(this, bc), s.addEventListener("click", L(this, Vt, tb).bind(this, n), {
15942
+ s.append(a), a.className = "swatch", a.style.backgroundColor = n, s.ariaSelected = n === u(this, bc), s.addEventListener("click", L(this, Gt, tb).bind(this, n), {
15930
15943
  signal: t
15931
15944
  }), e.append(s);
15932
15945
  }
15933
- return e.addEventListener("keydown", L(this, Vt, rb).bind(this), {
15946
+ return e.addEventListener("keydown", L(this, Gt, rb).bind(this), {
15934
15947
  signal: t
15935
15948
  }), e;
15936
15949
  }, tb = function(e, t) {
@@ -15940,28 +15953,28 @@ ei = new WeakMap(), Sl = new WeakMap(), bc = new WeakMap(), Nr = new WeakMap(),
15940
15953
  value: e
15941
15954
  });
15942
15955
  }, rb = function(e) {
15943
- Rn._keyboardManager.exec(this, e);
15956
+ In._keyboardManager.exec(this, e);
15944
15957
  }, Ro = function(e) {
15945
- if (u(this, Vt, Ea)) {
15958
+ if (u(this, Gt, Ea)) {
15946
15959
  this.hideDropdown();
15947
15960
  return;
15948
15961
  }
15949
- if (T(this, wf, e.detail === 0), u(this, Za) || (T(this, Za, new AbortController()), window.addEventListener("pointerdown", L(this, Vt, Yw).bind(this), {
15962
+ if (T(this, wf, e.detail === 0), u(this, Za) || (T(this, Za, new AbortController()), window.addEventListener("pointerdown", L(this, Gt, Yw).bind(this), {
15950
15963
  signal: u(this, $i).combinedSignal(u(this, Za))
15951
15964
  })), u(this, ei).ariaExpanded = "true", u(this, Nr)) {
15952
15965
  u(this, Nr).classList.remove("hidden");
15953
15966
  return;
15954
15967
  }
15955
- const t = T(this, Nr, L(this, Vt, eb).call(this));
15968
+ const t = T(this, Nr, L(this, Gt, eb).call(this));
15956
15969
  u(this, ei).append(t);
15957
15970
  }, Yw = function(e) {
15958
15971
  var t;
15959
15972
  (t = u(this, Nr)) != null && t.contains(e.target) || this.hideDropdown();
15960
15973
  }, Ea = function() {
15961
15974
  return u(this, Nr) && !u(this, Nr).classList.contains("hidden");
15962
- }, N(Rn, Af, null);
15963
- let Hh = Rn;
15964
- var wc, Ef, sa, Tl, _f, Mn, Cf, Sf, kl, bi, ti, Qr, xc, aa, dn, Ac, vi, Tf, dt, nb, jp, Zw, Kw, Qw, ib, Io, Ai, gu, Jw, Up, Sh, ex, tx, rx, nx, ix;
15975
+ }, N(In, Af, null);
15976
+ let Hh = In;
15977
+ var wc, Ef, sa, Tl, _f, Ln, Cf, Sf, kl, bi, ti, Qr, xc, aa, dn, Ac, vi, Tf, dt, nb, jp, Zw, Kw, Qw, ib, Io, Ai, gu, Jw, Up, Sh, ex, tx, rx, nx, ix;
15965
15978
  const Ot = class Ot extends er {
15966
15979
  constructor(t) {
15967
15980
  super({
@@ -15974,7 +15987,7 @@ const Ot = class Ot extends er {
15974
15987
  N(this, sa);
15975
15988
  N(this, Tl, null);
15976
15989
  N(this, _f, null);
15977
- N(this, Mn, null);
15990
+ N(this, Ln, null);
15978
15991
  N(this, Cf, null);
15979
15992
  N(this, Sf, 0);
15980
15993
  N(this, kl, null);
@@ -16104,7 +16117,7 @@ const Ot = class Ot extends er {
16104
16117
  "data-main-rotation": t
16105
16118
  }
16106
16119
  }), r.updateProperties(u(this, dn), {
16107
- bbox: L(o = Ot, Ai, gu).call(o, u(this, Mn).box, t),
16120
+ bbox: L(o = Ot, Ai, gu).call(o, u(this, Ln).box, t),
16108
16121
  root: {
16109
16122
  "data-main-rotation": t
16110
16123
  }
@@ -16376,14 +16389,14 @@ const Ot = class Ot extends er {
16376
16389
  return !1;
16377
16390
  }
16378
16391
  };
16379
- wc = new WeakMap(), Ef = new WeakMap(), sa = new WeakMap(), Tl = new WeakMap(), _f = new WeakMap(), Mn = new WeakMap(), Cf = new WeakMap(), Sf = new WeakMap(), kl = new WeakMap(), bi = new WeakMap(), ti = new WeakMap(), Qr = new WeakMap(), xc = new WeakMap(), aa = new WeakMap(), dn = new WeakMap(), Ac = new WeakMap(), vi = new WeakMap(), Tf = new WeakMap(), dt = new WeakSet(), nb = function() {
16392
+ wc = new WeakMap(), Ef = new WeakMap(), sa = new WeakMap(), Tl = new WeakMap(), _f = new WeakMap(), Ln = new WeakMap(), Cf = new WeakMap(), Sf = new WeakMap(), kl = new WeakMap(), bi = new WeakMap(), ti = new WeakMap(), Qr = new WeakMap(), xc = new WeakMap(), aa = new WeakMap(), dn = new WeakMap(), Ac = new WeakMap(), vi = new WeakMap(), Tf = new WeakMap(), dt = new WeakSet(), nb = function() {
16380
16393
  const t = new K0(u(this, sa), 1e-3);
16381
16394
  T(this, bi, t.getOutlines()), [this.x, this.y, this.width, this.height] = u(this, bi).box;
16382
16395
  const r = new K0(u(this, sa), 25e-4, 1e-3, this._uiManager.direction === "ltr");
16383
- T(this, Mn, r.getOutlines());
16396
+ T(this, Ln, r.getOutlines());
16384
16397
  const {
16385
16398
  lastPoint: n
16386
- } = u(this, Mn);
16399
+ } = u(this, Ln);
16387
16400
  T(this, xc, [(n[0] - this.x) / this.width, (n[1] - this.y) / this.height]);
16388
16401
  }, jp = function({
16389
16402
  highlightOutlines: t,
@@ -16391,7 +16404,7 @@ wc = new WeakMap(), Ef = new WeakMap(), sa = new WeakMap(), Tl = new WeakMap(),
16391
16404
  clipPathId: n
16392
16405
  }) {
16393
16406
  var d, p;
16394
- if (T(this, bi, t), T(this, Mn, t.getNewOutline(u(this, vi) / 2 + 1.5, 25e-4)), r >= 0)
16407
+ if (T(this, bi, t), T(this, Ln, t.getNewOutline(u(this, vi) / 2 + 1.5, 25e-4)), r >= 0)
16395
16408
  T(this, ti, r), T(this, Tl, n), this.parent.drawLayer.finalizeDraw(r, {
16396
16409
  bbox: t.box,
16397
16410
  path: {
@@ -16402,9 +16415,9 @@ wc = new WeakMap(), Ef = new WeakMap(), sa = new WeakMap(), Tl = new WeakMap(),
16402
16415
  highlightOutline: !0,
16403
16416
  free: !0
16404
16417
  },
16405
- bbox: u(this, Mn).box,
16418
+ bbox: u(this, Ln).box,
16406
16419
  path: {
16407
- d: u(this, Mn).toSVGPath()
16420
+ d: u(this, Ln).toSVGPath()
16408
16421
  }
16409
16422
  }, !0));
16410
16423
  else if (this.parent) {
@@ -16415,9 +16428,9 @@ wc = new WeakMap(), Ef = new WeakMap(), sa = new WeakMap(), Tl = new WeakMap(),
16415
16428
  d: t.toSVGPath()
16416
16429
  }
16417
16430
  }), this.parent.drawLayer.updateProperties(u(this, dn), {
16418
- bbox: L(p = Ot, Ai, gu).call(p, u(this, Mn).box, g),
16431
+ bbox: L(p = Ot, Ai, gu).call(p, u(this, Ln).box, g),
16419
16432
  path: {
16420
- d: u(this, Mn).toSVGPath()
16433
+ d: u(this, Ln).toSVGPath()
16421
16434
  }
16422
16435
  });
16423
16436
  }
@@ -16442,7 +16455,7 @@ wc = new WeakMap(), Ef = new WeakMap(), sa = new WeakMap(), Tl = new WeakMap(),
16442
16455
  }
16443
16456
  const {
16444
16457
  lastPoint: h
16445
- } = u(this, Mn);
16458
+ } = u(this, Ln);
16446
16459
  T(this, xc, [(h[0] - a) / l, (h[1] - o) / c]);
16447
16460
  }, Zw = function(t) {
16448
16461
  const r = (a, o) => {
@@ -16515,9 +16528,9 @@ wc = new WeakMap(), Ef = new WeakMap(), sa = new WeakMap(), Tl = new WeakMap(),
16515
16528
  highlightOutline: !0,
16516
16529
  free: u(this, Qr)
16517
16530
  },
16518
- bbox: u(this, Mn).box,
16531
+ bbox: u(this, Ln).box,
16519
16532
  path: {
16520
- d: u(this, Mn).toSVGPath()
16533
+ d: u(this, Ln).toSVGPath()
16521
16534
  }
16522
16535
  }, u(this, Qr))), u(this, kl) && (u(this, kl).style.clipPath = u(this, Tl)));
16523
16536
  }, Ai = new WeakSet(), gu = function([t, r, n, s], a) {
@@ -16605,7 +16618,7 @@ class sx {
16605
16618
  this.updateProperties(e);
16606
16619
  }
16607
16620
  clone() {
16608
- Gt("Not implemented");
16621
+ qt("Not implemented");
16609
16622
  }
16610
16623
  }
16611
16624
  Dl = new WeakMap();
@@ -16629,10 +16642,10 @@ const qe = class qe extends er {
16629
16642
  return t;
16630
16643
  }
16631
16644
  static getDefaultDrawingOptions(t) {
16632
- Gt("Not implemented");
16645
+ qt("Not implemented");
16633
16646
  }
16634
16647
  static get typesMap() {
16635
- Gt("Not implemented");
16648
+ qt("Not implemented");
16636
16649
  }
16637
16650
  static get isDrawer() {
16638
16651
  return !0;
@@ -16771,7 +16784,7 @@ const qe = class qe extends er {
16771
16784
  return this.setDims(this.width * a, this.height * o), this._uiManager.addShouldRescale(this), this.disableEditing(), this._isCopy && this._moveAfterPaste(t, r), n;
16772
16785
  }
16773
16786
  static createDrawerInstance(t, r, n, s, a) {
16774
- Gt("Not implemented");
16787
+ qt("Not implemented");
16775
16788
  }
16776
16789
  static startDrawing(t, r, n, s) {
16777
16790
  var w;
@@ -16888,7 +16901,7 @@ const qe = class qe extends er {
16888
16901
  createDrawingOptions(t) {
16889
16902
  }
16890
16903
  static deserializeDraw(t, r, n, s, a, o) {
16891
- Gt("Not implemented");
16904
+ qt("Not implemented");
16892
16905
  }
16893
16906
  static async deserialize(t, r, n) {
16894
16907
  var d, p;
@@ -19630,7 +19643,7 @@ function Ax(i, e) {
19630
19643
  return t;
19631
19644
  }
19632
19645
  var LS = process.env.NODE_ENV === "production", _m = "Invariant failed";
19633
- function Zt(i, e) {
19646
+ function Kt(i, e) {
19634
19647
  if (!i) {
19635
19648
  if (LS)
19636
19649
  throw new Error(_m);
@@ -19691,10 +19704,10 @@ class jS {
19691
19704
  return this.pdfDocument ? this.pdfDocument.numPages : 0;
19692
19705
  }
19693
19706
  get page() {
19694
- return Zt(this.pdfViewer, "PDF viewer is not initialized."), this.pdfViewer.currentPageNumber || 0;
19707
+ return Kt(this.pdfViewer, "PDF viewer is not initialized."), this.pdfViewer.currentPageNumber || 0;
19695
19708
  }
19696
19709
  set page(e) {
19697
- Zt(this.pdfViewer, "PDF viewer is not initialized."), this.pdfViewer.currentPageNumber = e;
19710
+ Kt(this.pdfViewer, "PDF viewer is not initialized."), this.pdfViewer.currentPageNumber = e;
19698
19711
  }
19699
19712
  get rotation() {
19700
19713
  return 0;
@@ -19703,19 +19716,19 @@ class jS {
19703
19716
  }
19704
19717
  goToDestination(e) {
19705
19718
  return new Promise((t) => {
19706
- Zt(this.pdfDocument, "PDF document not loaded."), Zt(e, "Destination is not specified."), typeof e == "string" ? this.pdfDocument.getDestination(e).then(t) : Array.isArray(e) ? t(e) : e.then(t);
19719
+ Kt(this.pdfDocument, "PDF document not loaded."), Kt(e, "Destination is not specified."), typeof e == "string" ? this.pdfDocument.getDestination(e).then(t) : Array.isArray(e) ? t(e) : e.then(t);
19707
19720
  }).then((t) => {
19708
- Zt(Array.isArray(t), `"${t}" is not a valid destination array.`);
19721
+ Kt(Array.isArray(t), `"${t}" is not a valid destination array.`);
19709
19722
  const r = t[0];
19710
19723
  new Promise((n) => {
19711
- Zt(this.pdfDocument, "PDF document not loaded."), r instanceof Object ? this.pdfDocument.getPageIndex(r).then((s) => {
19724
+ Kt(this.pdfDocument, "PDF document not loaded."), r instanceof Object ? this.pdfDocument.getPageIndex(r).then((s) => {
19712
19725
  n(s);
19713
19726
  }).catch(() => {
19714
- Zt(!1, `"${r}" is not a valid page reference.`);
19715
- }) : typeof r == "number" ? n(r) : Zt(!1, `"${r}" is not a valid destination reference.`);
19727
+ Kt(!1, `"${r}" is not a valid page reference.`);
19728
+ }) : typeof r == "number" ? n(r) : Kt(!1, `"${r}" is not a valid destination reference.`);
19716
19729
  }).then((n) => {
19717
19730
  const s = n + 1;
19718
- Zt(this.pdfViewer, "PDF viewer is not initialized."), Zt(s >= 1 && s <= this.pagesCount, `"${s}" is not a valid page number.`), this.pdfViewer.scrollPageIntoView({
19731
+ Kt(this.pdfViewer, "PDF viewer is not initialized."), Kt(s >= 1 && s <= this.pagesCount, `"${s}" is not a valid page number.`), this.pdfViewer.scrollPageIntoView({
19719
19732
  dest: t,
19720
19733
  pageIndex: n,
19721
19734
  pageNumber: s
@@ -19728,7 +19741,7 @@ class jS {
19728
19741
  }
19729
19742
  goToPage(e) {
19730
19743
  const t = e - 1;
19731
- Zt(this.pdfViewer, "PDF viewer is not initialized."), Zt(e >= 1 && e <= this.pagesCount, `"${e}" is not a valid page number.`), this.pdfViewer.scrollPageIntoView({
19744
+ Kt(this.pdfViewer, "PDF viewer is not initialized."), Kt(e >= 1 && e <= this.pagesCount, `"${e}" is not a valid page number.`), this.pdfViewer.scrollPageIntoView({
19732
19745
  pageIndex: t,
19733
19746
  pageNumber: e
19734
19747
  });
@@ -19793,13 +19806,13 @@ function VS(i) {
19793
19806
  return i instanceof ArrayBuffer;
19794
19807
  }
19795
19808
  function GS(i) {
19796
- return Zt(zg, "isBlob can only be used in a browser environment"), i instanceof Blob;
19809
+ return Kt(zg, "isBlob can only be used in a browser environment"), i instanceof Blob;
19797
19810
  }
19798
19811
  function xb(i) {
19799
19812
  return $S(i) && /^data:/.test(i);
19800
19813
  }
19801
19814
  function Ty(i) {
19802
- Zt(xb(i), "Invalid data URI.");
19815
+ Kt(xb(i), "Invalid data URI.");
19803
19816
  const [e = "", t = ""] = i.split(",");
19804
19817
  return e.split(";").indexOf("base64") !== -1 ? atob(t) : unescape(t);
19805
19818
  }
@@ -19918,7 +19931,7 @@ const QS = zE(function({ children: e, className: t, error: r = "Failed to load P
19918
19931
  function ie() {
19919
19932
  R({ type: "RESET" });
19920
19933
  }
19921
- Kt(ie, [a, R]);
19934
+ Vt(ie, [a, R]);
19922
19935
  const ae = gr(async () => {
19923
19936
  if (!a)
19924
19937
  return null;
@@ -19930,7 +19943,7 @@ const QS = zE(function({ children: e, className: t, error: r = "Failed to load P
19930
19943
  return { data: a };
19931
19944
  if (zg && GS(a))
19932
19945
  return { data: await YS(a) };
19933
- if (Zt(typeof a == "object", "Invalid parameter in file, need either Uint8Array, string or a parameter object"), Zt(Dy(a), "Invalid parameter object: need either .data, .range or .url"), "url" in a && typeof a.url == "string") {
19946
+ if (Kt(typeof a == "object", "Invalid parameter in file, need either Uint8Array, string or a parameter object"), Kt(Dy(a), "Invalid parameter object: need either .data, .range or .url"), "url" in a && typeof a.url == "string") {
19934
19947
  if (xb(a.url)) {
19935
19948
  const { url: Te, ...x } = a;
19936
19949
  return { data: Ty(Te), ...x };
@@ -19939,7 +19952,7 @@ const QS = zE(function({ children: e, className: t, error: r = "Failed to load P
19939
19952
  }
19940
19953
  return a;
19941
19954
  }, [a]);
19942
- Kt(() => {
19955
+ Vt(() => {
19943
19956
  const Te = Bf(ae());
19944
19957
  return Te.promise.then((x) => {
19945
19958
  R({ type: "RESOLVE", value: x });
@@ -19948,7 +19961,7 @@ const QS = zE(function({ children: e, className: t, error: r = "Failed to load P
19948
19961
  }), () => {
19949
19962
  ql(Te);
19950
19963
  };
19951
- }, [ae, R]), Kt(() => {
19964
+ }, [ae, R]), Vt(() => {
19952
19965
  if (!(typeof z > "u")) {
19953
19966
  if (z === !1) {
19954
19967
  j();
@@ -19963,9 +19976,9 @@ const QS = zE(function({ children: e, className: t, error: r = "Failed to load P
19963
19976
  function se() {
19964
19977
  J && (pn(!1, J.toString()), p && p(J));
19965
19978
  }
19966
- Kt(function() {
19979
+ Vt(function() {
19967
19980
  X({ type: "RESET" });
19968
- }, [X, z]), Kt(function() {
19981
+ }, [X, z]), Vt(function() {
19969
19982
  if (!z)
19970
19983
  return;
19971
19984
  const x = A ? { ...z, ...A } : z, U = Gb(x);
@@ -19978,7 +19991,7 @@ const QS = zE(function({ children: e, className: t, error: r = "Failed to load P
19978
19991
  return () => {
19979
19992
  F.finally(() => B.destroy());
19980
19993
  };
19981
- }, [A, X, z]), Kt(() => {
19994
+ }, [A, X, z]), Vt(() => {
19982
19995
  if (!(typeof S > "u")) {
19983
19996
  if (S === !1) {
19984
19997
  se();
@@ -19986,7 +19999,7 @@ const QS = zE(function({ children: e, className: t, error: r = "Failed to load P
19986
19999
  }
19987
20000
  H();
19988
20001
  }
19989
- }, [S]), Kt(function() {
20002
+ }, [S]), Vt(function() {
19990
20003
  Y.current.setViewer(be.current), Y.current.setExternalLinkRel(n), Y.current.setExternalLinkTarget(s);
19991
20004
  }, [n, s]);
19992
20005
  const le = gr((Te, x) => {
@@ -20052,9 +20065,9 @@ function jg() {
20052
20065
  }
20053
20066
  function JS() {
20054
20067
  const i = Tx(), e = jg();
20055
- Zt(e, "Unable to find Page context.");
20068
+ Kt(e, "Unable to find Page context.");
20056
20069
  const t = { ...i, ...e }, { imageResourcesPath: r, linkService: n, onGetAnnotationsError: s, onGetAnnotationsSuccess: a, onRenderAnnotationLayerError: o, onRenderAnnotationLayerSuccess: l, page: c, pdf: h, renderForms: d, rotate: p, scale: g = 1 } = t;
20057
- Zt(h, "Attempted to load page annotations, but no document was specified. Wrap <Page /> in a <Document /> or pass explicit `pdf` prop."), Zt(c, "Attempted to load page annotations, but no page was specified."), Zt(n, "Attempted to load page annotations, but no linkService was specified.");
20070
+ Kt(h, "Attempted to load page annotations, but no document was specified. Wrap <Page /> in a <Document /> or pass explicit `pdf` prop."), Kt(c, "Attempted to load page annotations, but no page was specified."), Kt(n, "Attempted to load page annotations, but no linkService was specified.");
20058
20071
  const [y, b] = Mc(), { value: w, error: v } = y, A = xs(null);
20059
20072
  pn(Number.parseInt(window.getComputedStyle(document.body).getPropertyValue("--react-pdf-annotation-layer"), 10) === 1, "AnnotationLayer styles not found. Read more: https://github.com/wojtekmaj/react-pdf#support-for-annotations");
20060
20073
  function E() {
@@ -20063,9 +20076,9 @@ function JS() {
20063
20076
  function _() {
20064
20077
  v && (pn(!1, v.toString()), s && s(v));
20065
20078
  }
20066
- Kt(function() {
20079
+ Vt(function() {
20067
20080
  b({ type: "RESET" });
20068
- }, [b, c]), Kt(function() {
20081
+ }, [b, c]), Vt(function() {
20069
20082
  if (!c)
20070
20083
  return;
20071
20084
  const R = Bf(c.getAnnotations()), z = R;
@@ -20076,7 +20089,7 @@ function JS() {
20076
20089
  }), () => {
20077
20090
  ql(z);
20078
20091
  };
20079
- }, [b, c]), Kt(() => {
20092
+ }, [b, c]), Vt(() => {
20080
20093
  if (w !== void 0) {
20081
20094
  if (w === !1) {
20082
20095
  _();
@@ -20092,7 +20105,7 @@ function JS() {
20092
20105
  pn(!1, `${D}`), o && o(D);
20093
20106
  }
20094
20107
  const k = Yi(() => c.getViewport({ scale: g, rotation: p }), [c, p, g]);
20095
- return Kt(function() {
20108
+ return Vt(function() {
20096
20109
  if (!h || !c || !n || !w)
20097
20110
  return;
20098
20111
  const { current: R } = A;
@@ -20243,7 +20256,7 @@ function Nx({ className: i, node: e }) {
20243
20256
  }
20244
20257
  function iT() {
20245
20258
  const i = jg();
20246
- Zt(i, "Unable to find Page context.");
20259
+ Kt(i, "Unable to find Page context.");
20247
20260
  const { onGetStructTreeError: e, onGetStructTreeSuccess: t } = i, [r, n] = Mc(), { value: s, error: a } = r, { customTextRenderer: o, page: l } = i;
20248
20261
  function c() {
20249
20262
  s && t && t(s);
@@ -20251,9 +20264,9 @@ function iT() {
20251
20264
  function h() {
20252
20265
  a && (pn(!1, a.toString()), e && e(a));
20253
20266
  }
20254
- return Kt(function() {
20267
+ return Vt(function() {
20255
20268
  n({ type: "RESET" });
20256
- }, [n, l]), Kt(function() {
20269
+ }, [n, l]), Vt(function() {
20257
20270
  if (o || !l)
20258
20271
  return;
20259
20272
  const p = Bf(l.getStructTree()), g = p;
@@ -20262,7 +20275,7 @@ function iT() {
20262
20275
  }).catch((y) => {
20263
20276
  n({ type: "REJECT", error: y });
20264
20277
  }), () => ql(g);
20265
- }, [o, l, n]), Kt(() => {
20278
+ }, [o, l, n]), Vt(() => {
20266
20279
  if (s !== void 0) {
20267
20280
  if (s === !1) {
20268
20281
  h();
@@ -20275,9 +20288,9 @@ function iT() {
20275
20288
  const Py = As;
20276
20289
  function sT(i) {
20277
20290
  const e = jg();
20278
- Zt(e, "Unable to find Page context.");
20291
+ Kt(e, "Unable to find Page context.");
20279
20292
  const t = { ...e, ...i }, { _className: r, canvasBackground: n, devicePixelRatio: s = qS(), onRenderError: a, onRenderSuccess: o, page: l, renderForms: c, renderTextLayer: h, rotate: d, scale: p } = t, { canvasRef: g } = i;
20280
- Zt(l, "Attempted to render page canvas, but no page was specified.");
20293
+ Kt(l, "Attempted to render page canvas, but no page was specified.");
20281
20294
  const y = xs(null);
20282
20295
  function b() {
20283
20296
  l && o && o(Ab(l, p));
@@ -20286,7 +20299,7 @@ function sT(i) {
20286
20299
  XS(_) || (pn(!1, _.toString()), a && a(_));
20287
20300
  }
20288
20301
  const v = Yi(() => l.getViewport({ scale: p * s, rotation: d }), [s, l, d, p]), A = Yi(() => l.getViewport({ scale: p, rotation: d }), [l, d, p]);
20289
- Kt(function() {
20302
+ Vt(function() {
20290
20303
  if (!l)
20291
20304
  return;
20292
20305
  l.cleanup();
@@ -20309,7 +20322,7 @@ function sT(i) {
20309
20322
  const { current: _ } = y;
20310
20323
  _ && (_.width = 0, _.height = 0);
20311
20324
  }, []);
20312
- return Kt(() => E, [E]), ve.jsx("canvas", { className: `${r}__canvas`, dir: "ltr", ref: kx(g, y), style: {
20325
+ return Vt(() => E, [E]), ve.jsx("canvas", { className: `${r}__canvas`, dir: "ltr", ref: kx(g, y), style: {
20313
20326
  display: "block",
20314
20327
  userSelect: "none"
20315
20328
  }, children: h ? ve.jsx(iT, {}) : null });
@@ -20319,9 +20332,9 @@ function aT(i) {
20319
20332
  }
20320
20333
  function oT() {
20321
20334
  const i = jg();
20322
- Zt(i, "Unable to find Page context.");
20335
+ Kt(i, "Unable to find Page context.");
20323
20336
  const { customTextRenderer: e, onGetTextError: t, onGetTextSuccess: r, onRenderTextLayerError: n, onRenderTextLayerSuccess: s, page: a, pageIndex: o, pageNumber: l, rotate: c, scale: h } = i;
20324
- Zt(a, "Attempted to load page text content, but no page was specified.");
20337
+ Kt(a, "Attempted to load page text content, but no page was specified.");
20325
20338
  const [d, p] = Mc(), { value: g, error: y } = d, b = xs(null);
20326
20339
  pn(Number.parseInt(window.getComputedStyle(document.body).getPropertyValue("--react-pdf-text-layer"), 10) === 1, "TextLayer styles not found. Read more: https://github.com/wojtekmaj/react-pdf#support-for-text-layer");
20327
20340
  function w() {
@@ -20330,9 +20343,9 @@ function oT() {
20330
20343
  function v() {
20331
20344
  y && (pn(!1, y.toString()), t && t(y));
20332
20345
  }
20333
- Kt(function() {
20346
+ Vt(function() {
20334
20347
  p({ type: "RESET" });
20335
- }, [a, p]), Kt(function() {
20348
+ }, [a, p]), Vt(function() {
20336
20349
  if (!a)
20337
20350
  return;
20338
20351
  const D = Bf(a.getTextContent()), R = D;
@@ -20341,7 +20354,7 @@ function oT() {
20341
20354
  }).catch((z) => {
20342
20355
  p({ type: "REJECT", error: z });
20343
20356
  }), () => ql(R);
20344
- }, [a, p]), Kt(() => {
20357
+ }, [a, p]), Vt(() => {
20345
20358
  if (g !== void 0) {
20346
20359
  if (g === !1) {
20347
20360
  v();
@@ -20414,7 +20427,7 @@ function oT() {
20414
20427
  const Ry = 1;
20415
20428
  function lT(i) {
20416
20429
  const t = { ...Tx(), ...i }, { _className: r = "react-pdf__Page", _enableRegisterUnregisterPage: n = !0, canvasBackground: s, canvasRef: a, children: o, className: l, customRenderer: c, customTextRenderer: h, devicePixelRatio: d, error: p = "Failed to load the page.", height: g, inputRef: y, loading: b = "Loading page…", noData: w = "No page specified.", onGetAnnotationsError: v, onGetAnnotationsSuccess: A, onGetStructTreeError: E, onGetStructTreeSuccess: _, onGetTextError: C, onGetTextSuccess: I, onLoadError: k, onLoadSuccess: D, onRenderAnnotationLayerError: R, onRenderAnnotationLayerSuccess: z, onRenderError: G, onRenderSuccess: O, onRenderTextLayerError: X, onRenderTextLayerSuccess: S, pageIndex: J, pageNumber: Y, pdf: W, registerPage: fe, renderAnnotationLayer: K = !0, renderForms: be = !1, renderMode: te = "canvas", renderTextLayer: j = !0, rotate: ie, scale: ae = Ry, unregisterPage: H, width: se, ...le } = t, [oe, ce] = Mc(), { value: Ae, error: Se } = oe, Ie = xs(null);
20417
- Zt(W, "Attempted to load a page, but no document was specified. Wrap <Page /> in a <Document /> or pass explicit `pdf` prop.");
20430
+ Kt(W, "Attempted to load a page, but no document was specified. Wrap <Page /> in a <Document /> or pass explicit `pdf` prop.");
20418
20431
  const Te = To(Y) ? Y - 1 : J ?? null, x = Y ?? (To(J) ? J + 1 : null), U = ie ?? (Ae ? Ae.rotate : null), B = Yi(() => {
20419
20432
  if (!Ae)
20420
20433
  return null;
@@ -20426,7 +20439,7 @@ function lT(i) {
20426
20439
  }
20427
20440
  return We * He;
20428
20441
  }, [g, Ae, U, ae, se]);
20429
- Kt(function() {
20442
+ Vt(function() {
20430
20443
  return () => {
20431
20444
  To(Te) && n && H && H(Te);
20432
20445
  };
@@ -20446,9 +20459,9 @@ function lT(i) {
20446
20459
  function M() {
20447
20460
  Se && (pn(!1, Se.toString()), k && k(Se));
20448
20461
  }
20449
- Kt(function() {
20462
+ Vt(function() {
20450
20463
  ce({ type: "RESET" });
20451
- }, [ce, W, Te]), Kt(function() {
20464
+ }, [ce, W, Te]), Vt(function() {
20452
20465
  if (!W || !x)
20453
20466
  return;
20454
20467
  const We = Bf(W.getPage(x)), St = We;
@@ -20457,7 +20470,7 @@ function lT(i) {
20457
20470
  }).catch((rr) => {
20458
20471
  ce({ type: "REJECT", error: rr });
20459
20472
  }), () => ql(St);
20460
- }, [ce, W, x]), Kt(() => {
20473
+ }, [ce, W, x]), Vt(() => {
20461
20474
  if (Ae !== void 0) {
20462
20475
  if (Ae === !1) {
20463
20476
  M();
@@ -20525,7 +20538,7 @@ function lT(i) {
20525
20538
  function ee() {
20526
20539
  switch (te) {
20527
20540
  case "custom":
20528
- return Zt(c, 'renderMode was set to "custom", but no customRenderer was passed.'), ve.jsx(c, {}, `${we}_custom`);
20541
+ return Kt(c, 'renderMode was set to "custom", but no customRenderer was passed.'), ve.jsx(c, {}, `${we}_custom`);
20529
20542
  case "none":
20530
20543
  return null;
20531
20544
  case "canvas":
@@ -30466,9 +30479,9 @@ var Ti = {}, Gf = {}, qc = {}, Tb = { exports: {} };
30466
30479
  m = f.heap[1], f.heap[1] = f.heap[f.heap_len--], Y(f, Z, 1), $ = f.heap[1], f.heap[--f.heap_max] = m, f.heap[--f.heap_max] = $, Z[2 * V] = Z[2 * m] + Z[2 * $], f.depth[V] = (f.depth[m] >= f.depth[$] ? f.depth[m] : f.depth[$]) + 1, Z[2 * m + 1] = Z[2 * $ + 1] = V, f.heap[1] = V++, Y(f, Z, 1);
30467
30480
  while (f.heap_len >= 2);
30468
30481
  f.heap[--f.heap_max] = f.heap[1], function(pe, yt) {
30469
- var $e, ke, ze, mt, ot, At, Fe = yt.dyn_tree, Le = yt.max_code, tt = yt.stat_desc.static_tree, Xt = yt.stat_desc.has_stree, Ze = yt.stat_desc.extra_bits, Pt = yt.stat_desc.extra_base, kt = yt.stat_desc.max_length, rt = 0;
30482
+ var $e, ke, ze, mt, ot, At, Fe = yt.dyn_tree, Le = yt.max_code, tt = yt.stat_desc.static_tree, Yt = yt.stat_desc.has_stree, Ze = yt.stat_desc.extra_bits, Pt = yt.stat_desc.extra_base, kt = yt.stat_desc.max_length, rt = 0;
30470
30483
  for (mt = 0; mt <= o; mt++) pe.bl_count[mt] = 0;
30471
- for (Fe[2 * pe.heap[pe.heap_max] + 1] = 0, $e = pe.heap_max + 1; $e < 573; $e++) (mt = Fe[2 * Fe[2 * (ke = pe.heap[$e]) + 1] + 1] + 1) > kt && (mt = kt, rt++), Fe[2 * ke + 1] = mt, ke > Le || (pe.bl_count[mt]++, ot = 0, ke >= Pt && (ot = Ze[ke - Pt]), At = Fe[2 * ke], pe.opt_len += At * (mt + ot), Xt && (pe.static_len += At * (tt[2 * ke + 1] + ot)));
30484
+ for (Fe[2 * pe.heap[pe.heap_max] + 1] = 0, $e = pe.heap_max + 1; $e < 573; $e++) (mt = Fe[2 * Fe[2 * (ke = pe.heap[$e]) + 1] + 1] + 1) > kt && (mt = kt, rt++), Fe[2 * ke + 1] = mt, ke > Le || (pe.bl_count[mt]++, ot = 0, ke >= Pt && (ot = Ze[ke - Pt]), At = Fe[2 * ke], pe.opt_len += At * (mt + ot), Yt && (pe.static_len += At * (tt[2 * ke + 1] + ot)));
30472
30485
  if (rt !== 0) {
30473
30486
  do {
30474
30487
  for (mt = kt - 1; pe.bl_count[mt] === 0; ) mt--;
@@ -30823,8 +30836,8 @@ var Ti = {}, Gf = {}, qc = {}, Tb = { exports: {} };
30823
30836
  } catch {
30824
30837
  Br = !1;
30825
30838
  }
30826
- for (var Wt = new Uint8Array(256), zt = 0; zt < 256; zt++) Wt[zt] = zt >= 252 ? 6 : zt >= 248 ? 5 : zt >= 240 ? 4 : zt >= 224 ? 3 : zt >= 192 ? 2 : 1;
30827
- Wt[254] = Wt[254] = 1;
30839
+ for (var Xt = new Uint8Array(256), zt = 0; zt < 256; zt++) Xt[zt] = zt >= 252 ? 6 : zt >= 248 ? 5 : zt >= 240 ? 4 : zt >= 224 ? 3 : zt >= 192 ? 2 : 1;
30840
+ Xt[254] = Xt[254] = 1;
30828
30841
  var on = function(f) {
30829
30842
  if (typeof TextEncoder == "function" && TextEncoder.prototype.encode) return new TextEncoder().encode(f);
30830
30843
  var P, m, $, V, Z, _e = f.length, re = 0;
@@ -30839,7 +30852,7 @@ var Ti = {}, Gf = {}, qc = {}, Tb = { exports: {} };
30839
30852
  var _e = f[m++];
30840
30853
  if (_e < 128) Z[$++] = _e;
30841
30854
  else {
30842
- var re = Wt[_e];
30855
+ var re = Xt[_e];
30843
30856
  if (re > 4) Z[$++] = 65533, m += re - 1;
30844
30857
  else {
30845
30858
  for (_e &= re === 2 ? 31 : re === 3 ? 15 : 7; re > 1 && m < V; ) _e = _e << 6 | 63 & f[m++], re--;
@@ -30855,7 +30868,7 @@ var Ti = {}, Gf = {}, qc = {}, Tb = { exports: {} };
30855
30868
  }, ks = function(f, P) {
30856
30869
  (P = P || f.length) > f.length && (P = f.length);
30857
30870
  for (var m = P - 1; m >= 0 && (192 & f[m]) == 128; ) m--;
30858
- return m < 0 || m === 0 ? P : m + Wt[f[m]] > P ? m : P;
30871
+ return m < 0 || m === 0 ? P : m + Xt[f[m]] > P ? m : P;
30859
30872
  }, Xr = function() {
30860
30873
  this.input = null, this.next_in = 0, this.avail_in = 0, this.total_in = 0, this.output = null, this.next_out = 0, this.avail_out = 0, this.total_out = 0, this.msg = "", this.state = null, this.data_type = 2, this.adler = 0;
30861
30874
  }, su = Object.prototype.toString, nm = ce.Z_NO_FLUSH, im = ce.Z_SYNC_FLUSH, fE = ce.Z_FULL_FLUSH, pE = ce.Z_FINISH, Xf = ce.Z_OK, gE = ce.Z_STREAM_END, mE = ce.Z_DEFAULT_COMPRESSION, bE = ce.Z_DEFAULT_STRATEGY, vE = ce.Z_DEFLATED;
@@ -30898,7 +30911,7 @@ var Ti = {}, Gf = {}, qc = {}, Tb = { exports: {} };
30898
30911
  }, gzip: function(f, P) {
30899
30912
  return (P = P || {}).gzip = !0, sm(f, P);
30900
30913
  } }, Zf = 16209, yE = function(f, P) {
30901
- var m, $, V, Z, _e, re, Me, ue, pe, yt, $e, ke, ze, mt, ot, At, Fe, Le, tt, Xt, Ze, Pt, kt, rt, ct = f.state;
30914
+ var m, $, V, Z, _e, re, Me, ue, pe, yt, $e, ke, ze, mt, ot, At, Fe, Le, tt, Yt, Ze, Pt, kt, rt, ct = f.state;
30902
30915
  m = f.next_in, kt = f.input, $ = m + (f.avail_in - 5), V = f.next_out, rt = f.output, Z = V - (P - f.avail_out), _e = V + (f.avail_out - 257), re = ct.dmax, Me = ct.wsize, ue = ct.whave, pe = ct.wnext, yt = ct.window, $e = ct.hold, ke = ct.bits, ze = ct.lencode, mt = ct.distcode, ot = (1 << ct.lenbits) - 1, At = (1 << ct.distbits) - 1;
30903
30916
  e: do {
30904
30917
  ke < 15 && ($e += kt[m++] << ke, ke += 8, $e += kt[m++] << ke, ke += 8), Fe = ze[$e & ot];
@@ -30927,12 +30940,12 @@ var Ti = {}, Gf = {}, qc = {}, Tb = { exports: {} };
30927
30940
  f.msg = "invalid distance code", ct.mode = Zf;
30928
30941
  break e;
30929
30942
  }
30930
- if (Xt = 65535 & Fe, ke < (Le &= 15) && ($e += kt[m++] << ke, (ke += 8) < Le && ($e += kt[m++] << ke, ke += 8)), (Xt += $e & (1 << Le) - 1) > re) {
30943
+ if (Yt = 65535 & Fe, ke < (Le &= 15) && ($e += kt[m++] << ke, (ke += 8) < Le && ($e += kt[m++] << ke, ke += 8)), (Yt += $e & (1 << Le) - 1) > re) {
30931
30944
  f.msg = "invalid distance too far back", ct.mode = Zf;
30932
30945
  break e;
30933
30946
  }
30934
- if ($e >>>= Le, ke -= Le, Xt > (Le = V - Z)) {
30935
- if ((Le = Xt - Le) > ue && ct.sane) {
30947
+ if ($e >>>= Le, ke -= Le, Yt > (Le = V - Z)) {
30948
+ if ((Le = Yt - Le) > ue && ct.sane) {
30936
30949
  f.msg = "invalid distance too far back", ct.mode = Zf;
30937
30950
  break e;
30938
30951
  }
@@ -30942,7 +30955,7 @@ var Ti = {}, Gf = {}, qc = {}, Tb = { exports: {} };
30942
30955
  do
30943
30956
  rt[V++] = yt[Ze++];
30944
30957
  while (--Le);
30945
- Ze = V - Xt, Pt = rt;
30958
+ Ze = V - Yt, Pt = rt;
30946
30959
  }
30947
30960
  } else if (pe < Le) {
30948
30961
  if (Ze += Me + pe - Le, (Le -= pe) < tt) {
@@ -30955,7 +30968,7 @@ var Ti = {}, Gf = {}, qc = {}, Tb = { exports: {} };
30955
30968
  do
30956
30969
  rt[V++] = yt[Ze++];
30957
30970
  while (--Le);
30958
- Ze = V - Xt, Pt = rt;
30971
+ Ze = V - Yt, Pt = rt;
30959
30972
  }
30960
30973
  }
30961
30974
  } else if (Ze += pe - Le, Le < tt) {
@@ -30963,12 +30976,12 @@ var Ti = {}, Gf = {}, qc = {}, Tb = { exports: {} };
30963
30976
  do
30964
30977
  rt[V++] = yt[Ze++];
30965
30978
  while (--Le);
30966
- Ze = V - Xt, Pt = rt;
30979
+ Ze = V - Yt, Pt = rt;
30967
30980
  }
30968
30981
  for (; tt > 2; ) rt[V++] = Pt[Ze++], rt[V++] = Pt[Ze++], rt[V++] = Pt[Ze++], tt -= 3;
30969
30982
  tt && (rt[V++] = Pt[Ze++], tt > 1 && (rt[V++] = Pt[Ze++]));
30970
30983
  } else {
30971
- Ze = V - Xt;
30984
+ Ze = V - Yt;
30972
30985
  do
30973
30986
  rt[V++] = rt[Ze++], rt[V++] = rt[Ze++], rt[V++] = rt[Ze++], tt -= 3;
30974
30987
  while (tt > 2);
@@ -30982,14 +30995,14 @@ var Ti = {}, Gf = {}, qc = {}, Tb = { exports: {} };
30982
30995
  } while (m < $ && V < _e);
30983
30996
  m -= tt = ke >> 3, $e &= (1 << (ke -= tt << 3)) - 1, f.next_in = m, f.next_out = V, f.avail_in = m < $ ? $ - m + 5 : 5 - (m - $), f.avail_out = V < _e ? _e - V + 257 : 257 - (V - _e), ct.hold = $e, ct.bits = ke;
30984
30997
  }, Kf = 15, wE = new Uint16Array([3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0]), xE = new Uint8Array([16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78]), AE = new Uint16Array([1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577, 0, 0]), EE = new Uint8Array([16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 64, 64]), Yc = function(f, P, m, $, V, Z, _e, re) {
30985
- var Me, ue, pe, yt, $e, ke, ze, mt, ot, At = re.bits, Fe = 0, Le = 0, tt = 0, Xt = 0, Ze = 0, Pt = 0, kt = 0, rt = 0, ct = 0, Ht = 0, So = null, ya = new Uint16Array(16), ip = new Uint16Array(16), sp = null;
30998
+ var Me, ue, pe, yt, $e, ke, ze, mt, ot, At = re.bits, Fe = 0, Le = 0, tt = 0, Yt = 0, Ze = 0, Pt = 0, kt = 0, rt = 0, ct = 0, Ht = 0, So = null, ya = new Uint16Array(16), ip = new Uint16Array(16), sp = null;
30986
30999
  for (Fe = 0; Fe <= Kf; Fe++) ya[Fe] = 0;
30987
31000
  for (Le = 0; Le < $; Le++) ya[P[m + Le]]++;
30988
- for (Ze = At, Xt = Kf; Xt >= 1 && ya[Xt] === 0; Xt--) ;
30989
- if (Ze > Xt && (Ze = Xt), Xt === 0) return V[Z++] = 20971520, V[Z++] = 20971520, re.bits = 1, 0;
30990
- for (tt = 1; tt < Xt && ya[tt] === 0; tt++) ;
31001
+ for (Ze = At, Yt = Kf; Yt >= 1 && ya[Yt] === 0; Yt--) ;
31002
+ if (Ze > Yt && (Ze = Yt), Yt === 0) return V[Z++] = 20971520, V[Z++] = 20971520, re.bits = 1, 0;
31003
+ for (tt = 1; tt < Yt && ya[tt] === 0; tt++) ;
30991
31004
  for (Ze < tt && (Ze = tt), rt = 1, Fe = 1; Fe <= Kf; Fe++) if (rt <<= 1, (rt -= ya[Fe]) < 0) return -1;
30992
- if (rt > 0 && (f === 0 || Xt !== 1)) return -1;
31005
+ if (rt > 0 && (f === 0 || Yt !== 1)) return -1;
30993
31006
  for (ip[1] = 0, Fe = 1; Fe < Kf; Fe++) ip[Fe + 1] = ip[Fe] + ya[Fe];
30994
31007
  for (Le = 0; Le < $; Le++) P[m + Le] !== 0 && (_e[ip[P[m + Le]]++] = Le);
30995
31008
  if (f === 0 ? (So = sp = _e, ke = 20) : f === 1 ? (So = wE, sp = xE, ke = 257) : (So = AE, sp = EE, ke = 0), Ht = 0, Le = 0, Fe = tt, $e = Z, Pt = Ze, kt = 0, pe = -1, yt = (ct = 1 << Ze) - 1, f === 1 && ct > 852 || f === 2 && ct > 592) return 1;
@@ -31000,11 +31013,11 @@ var Ti = {}, Gf = {}, qc = {}, Tb = { exports: {} };
31000
31013
  while (ue !== 0);
31001
31014
  for (Me = 1 << Fe - 1; Ht & Me; ) Me >>= 1;
31002
31015
  if (Me !== 0 ? (Ht &= Me - 1, Ht += Me) : Ht = 0, Le++, --ya[Fe] == 0) {
31003
- if (Fe === Xt) break;
31016
+ if (Fe === Yt) break;
31004
31017
  Fe = P[m + _e[Le]];
31005
31018
  }
31006
31019
  if (Fe > Ze && (Ht & yt) !== pe) {
31007
- for (kt === 0 && (kt = Ze), $e += tt, rt = 1 << (Pt = Fe - kt); Pt + kt < Xt && !((rt -= ya[Pt + kt]) <= 0); ) Pt++, rt <<= 1;
31020
+ for (kt === 0 && (kt = Ze), $e += tt, rt = 1 << (Pt = Fe - kt); Pt + kt < Yt && !((rt -= ya[Pt + kt]) <= 0); ) Pt++, rt <<= 1;
31008
31021
  if (ct += 1 << Pt, f === 1 && ct > 852 || f === 2 && ct > 592) return 1;
31009
31022
  V[pe = Ht & yt] = Ze << 24 | Pt << 16 | $e - Z | 0;
31010
31023
  }
@@ -31056,7 +31069,7 @@ var Ti = {}, Gf = {}, qc = {}, Tb = { exports: {} };
31056
31069
  }, Ps = { inflateReset: Nv, inflateReset2: Mv, inflateResetKeep: Iv, inflateInit: function(f) {
31057
31070
  return Lv(f, 15);
31058
31071
  }, inflateInit2: Lv, inflate: function(f, P) {
31059
- var m, $, V, Z, _e, re, Me, ue, pe, yt, $e, ke, ze, mt, ot, At, Fe, Le, tt, Xt, Ze, Pt, kt, rt, ct = 0, Ht = new Uint8Array(4), So = new Uint8Array([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]);
31072
+ var m, $, V, Z, _e, re, Me, ue, pe, yt, $e, ke, ze, mt, ot, At, Fe, Le, tt, Yt, Ze, Pt, kt, rt, ct = 0, Ht = new Uint8Array(4), So = new Uint8Array([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]);
31060
31073
  if (Co(f) || !f.output || !f.input && f.avail_in !== 0) return Pi;
31061
31074
  (m = f.state).mode === Ds && (m.mode = am), _e = f.next_out, V = f.output, Me = f.avail_out, Z = f.next_in, $ = f.input, re = f.avail_in, ue = m.hold, pe = m.bits, yt = re, $e = Me, Pt = _o;
31062
31075
  e: for (; ; ) switch (m.mode) {
@@ -31305,7 +31318,7 @@ var Ti = {}, Gf = {}, qc = {}, Tb = { exports: {} };
31305
31318
  re--, ue += $[Z++] << pe, pe += 8;
31306
31319
  }
31307
31320
  if (At && !(240 & At)) {
31308
- for (Le = ot, tt = At, Xt = Fe; At = (ct = m.lencode[Xt + ((ue & (1 << Le + tt) - 1) >> Le)]) >>> 16 & 255, Fe = 65535 & ct, !(Le + (ot = ct >>> 24) <= pe); ) {
31321
+ for (Le = ot, tt = At, Yt = Fe; At = (ct = m.lencode[Yt + ((ue & (1 << Le + tt) - 1) >> Le)]) >>> 16 & 255, Fe = 65535 & ct, !(Le + (ot = ct >>> 24) <= pe); ) {
31309
31322
  if (re === 0) break e;
31310
31323
  re--, ue += $[Z++] << pe, pe += 8;
31311
31324
  }
@@ -31339,7 +31352,7 @@ var Ti = {}, Gf = {}, qc = {}, Tb = { exports: {} };
31339
31352
  re--, ue += $[Z++] << pe, pe += 8;
31340
31353
  }
31341
31354
  if (!(240 & At)) {
31342
- for (Le = ot, tt = At, Xt = Fe; At = (ct = m.distcode[Xt + ((ue & (1 << Le + tt) - 1) >> Le)]) >>> 16 & 255, Fe = 65535 & ct, !(Le + (ot = ct >>> 24) <= pe); ) {
31355
+ for (Le = ot, tt = At, Yt = Fe; At = (ct = m.distcode[Yt + ((ue & (1 << Le + tt) - 1) >> Le)]) >>> 16 & 255, Fe = 65535 & ct, !(Le + (ot = ct >>> 24) <= pe); ) {
31343
31356
  if (re === 0) break e;
31344
31357
  re--, ue += $[Z++] << pe, pe += 8;
31345
31358
  }
@@ -36604,7 +36617,7 @@ class o5 {
36604
36617
  t.styleName = ne.attr(r, "val");
36605
36618
  break;
36606
36619
  case "cnfStyle":
36607
- t.className = Yt.classNameOfCnfStyle(r);
36620
+ t.className = Zt.classNameOfCnfStyle(r);
36608
36621
  break;
36609
36622
  case "framePr":
36610
36623
  this.parseFrame(r, t);
@@ -36777,7 +36790,7 @@ class o5 {
36777
36790
  t.styleName = ne.attr(r, "val");
36778
36791
  break;
36779
36792
  case "vertAlign":
36780
- t.verticalAlign = Yt.valueOfVertAlign(r, !0);
36793
+ t.verticalAlign = Zt.valueOfVertAlign(r, !0);
36781
36794
  break;
36782
36795
  default:
36783
36796
  return !1;
@@ -36912,7 +36925,7 @@ class o5 {
36912
36925
  t.styleName = ne.attr(r, "val");
36913
36926
  break;
36914
36927
  case "tblLook":
36915
- t.className = Yt.classNameOftblLook(r);
36928
+ t.className = Zt.classNameOftblLook(r);
36916
36929
  break;
36917
36930
  case "tblpPr":
36918
36931
  this.parseTablePosition(r, t);
@@ -36941,7 +36954,7 @@ class o5 {
36941
36954
  }
36942
36955
  parseTablePosition(e, t) {
36943
36956
  var r = ne.lengthAttr(e, "topFromText"), n = ne.lengthAttr(e, "bottomFromText"), s = ne.lengthAttr(e, "rightFromText"), a = ne.lengthAttr(e, "leftFromText");
36944
- t.cssStyle.float = "left", t.cssStyle["margin-bottom"] = Yt.addSize(t.cssStyle["margin-bottom"], n), t.cssStyle["margin-left"] = Yt.addSize(t.cssStyle["margin-left"], a), t.cssStyle["margin-right"] = Yt.addSize(t.cssStyle["margin-right"], s), t.cssStyle["margin-top"] = Yt.addSize(t.cssStyle["margin-top"], r);
36957
+ t.cssStyle.float = "left", t.cssStyle["margin-bottom"] = Zt.addSize(t.cssStyle["margin-bottom"], n), t.cssStyle["margin-left"] = Zt.addSize(t.cssStyle["margin-left"], a), t.cssStyle["margin-right"] = Zt.addSize(t.cssStyle["margin-right"], s), t.cssStyle["margin-top"] = Zt.addSize(t.cssStyle["margin-top"], r);
36945
36958
  }
36946
36959
  parseTableRow(e) {
36947
36960
  var t = { type: xe.Row, children: [] };
@@ -36961,7 +36974,7 @@ class o5 {
36961
36974
  t.cssStyle = this.parseDefaultProperties(e, {}, null, (r) => {
36962
36975
  switch (r.localName) {
36963
36976
  case "cnfStyle":
36964
- t.className = Yt.classNameOfCnfStyle(r);
36977
+ t.className = Zt.classNameOfCnfStyle(r);
36965
36978
  break;
36966
36979
  case "tblHeader":
36967
36980
  t.isHeader = ne.boolAttr(r, "val");
@@ -37004,7 +37017,7 @@ class o5 {
37004
37017
  t.verticalMerge = ne.attr(r, "val") ?? "continue";
37005
37018
  break;
37006
37019
  case "cnfStyle":
37007
- t.className = Yt.classNameOfCnfStyle(r);
37020
+ t.className = Zt.classNameOfCnfStyle(r);
37008
37021
  break;
37009
37022
  default:
37010
37023
  return !1;
@@ -37039,10 +37052,10 @@ class o5 {
37039
37052
  if (!(n != null && n(s)))
37040
37053
  switch (s.localName) {
37041
37054
  case "jc":
37042
- t["text-align"] = Yt.valueOfJc(s);
37055
+ t["text-align"] = Zt.valueOfJc(s);
37043
37056
  break;
37044
37057
  case "textAlignment":
37045
- t["vertical-align"] = Yt.valueOfTextAlignment(s);
37058
+ t["vertical-align"] = Zt.valueOfTextAlignment(s);
37046
37059
  break;
37047
37060
  case "color":
37048
37061
  t.color = bu.colorAttr(s, "val", null, Qp.color);
@@ -37065,7 +37078,7 @@ class o5 {
37065
37078
  if (this.options.ignoreWidth)
37066
37079
  break;
37067
37080
  case "tblW":
37068
- t.width = Yt.valueOfSize(s, "w");
37081
+ t.width = Zt.valueOfSize(s, "w");
37069
37082
  break;
37070
37083
  case "trHeight":
37071
37084
  this.parseTrHeight(s, t);
@@ -37099,13 +37112,13 @@ class o5 {
37099
37112
  this.parseBorderProperties(s, r || t);
37100
37113
  break;
37101
37114
  case "tblCellSpacing":
37102
- t["border-spacing"] = Yt.valueOfMargin(s), t["border-collapse"] = "separate";
37115
+ t["border-spacing"] = Zt.valueOfMargin(s), t["border-collapse"] = "separate";
37103
37116
  break;
37104
37117
  case "pBdr":
37105
37118
  this.parseBorderProperties(s, t);
37106
37119
  break;
37107
37120
  case "bdr":
37108
- t.border = Yt.valueOfBorder(s);
37121
+ t.border = Zt.valueOfBorder(s);
37109
37122
  break;
37110
37123
  case "tcBorders":
37111
37124
  this.parseBorderProperties(s, t);
@@ -37122,10 +37135,10 @@ class o5 {
37122
37135
  this.parseMarginProperties(s, r || t);
37123
37136
  break;
37124
37137
  case "tblLayout":
37125
- t["table-layout"] = Yt.valueOfTblLayout(s);
37138
+ t["table-layout"] = Zt.valueOfTblLayout(s);
37126
37139
  break;
37127
37140
  case "vAlign":
37128
- t["vertical-align"] = Yt.valueOfTextAlignment(s);
37141
+ t["vertical-align"] = Zt.valueOfTextAlignment(s);
37129
37142
  break;
37130
37143
  case "spacing":
37131
37144
  e.localName == "pPr" && this.parseSpacing(s, t);
@@ -37209,7 +37222,7 @@ class o5 {
37209
37222
  }
37210
37223
  }
37211
37224
  parseFont(e, t) {
37212
- var r = ne.attr(e, "ascii"), n = Yt.themeValue(e, "asciiTheme"), s = ne.attr(e, "eastAsia"), a = [r, n, s].filter((o) => o).map((o) => Nb(o));
37225
+ var r = ne.attr(e, "ascii"), n = Zt.themeValue(e, "asciiTheme"), s = ne.attr(e, "eastAsia"), a = [r, n, s].filter((o) => o).map((o) => Nb(o));
37213
37226
  a.length > 0 && (t["font-family"] = [...new Set(a)].join(", "));
37214
37227
  }
37215
37228
  parseIndentation(e, t) {
@@ -37235,16 +37248,16 @@ class o5 {
37235
37248
  for (const r of ne.elements(e))
37236
37249
  switch (r.localName) {
37237
37250
  case "left":
37238
- t["padding-left"] = Yt.valueOfMargin(r);
37251
+ t["padding-left"] = Zt.valueOfMargin(r);
37239
37252
  break;
37240
37253
  case "right":
37241
- t["padding-right"] = Yt.valueOfMargin(r);
37254
+ t["padding-right"] = Zt.valueOfMargin(r);
37242
37255
  break;
37243
37256
  case "top":
37244
- t["padding-top"] = Yt.valueOfMargin(r);
37257
+ t["padding-top"] = Zt.valueOfMargin(r);
37245
37258
  break;
37246
37259
  case "bottom":
37247
- t["padding-bottom"] = Yt.valueOfMargin(r);
37260
+ t["padding-bottom"] = Zt.valueOfMargin(r);
37248
37261
  break;
37249
37262
  }
37250
37263
  }
@@ -37264,17 +37277,17 @@ class o5 {
37264
37277
  switch (r.localName) {
37265
37278
  case "start":
37266
37279
  case "left":
37267
- t["border-left"] = Yt.valueOfBorder(r);
37280
+ t["border-left"] = Zt.valueOfBorder(r);
37268
37281
  break;
37269
37282
  case "end":
37270
37283
  case "right":
37271
- t["border-right"] = Yt.valueOfBorder(r);
37284
+ t["border-right"] = Zt.valueOfBorder(r);
37272
37285
  break;
37273
37286
  case "top":
37274
- t["border-top"] = Yt.valueOfBorder(r);
37287
+ t["border-top"] = Zt.valueOfBorder(r);
37275
37288
  break;
37276
37289
  case "bottom":
37277
- t["border-bottom"] = Yt.valueOfBorder(r);
37290
+ t["border-bottom"] = Zt.valueOfBorder(r);
37278
37291
  break;
37279
37292
  }
37280
37293
  }
@@ -37289,7 +37302,7 @@ class bu {
37289
37302
  return a ? `var(--docx-${a}-color)` : r;
37290
37303
  }
37291
37304
  }
37292
- class Yt {
37305
+ class Zt {
37293
37306
  static themeValue(e, t) {
37294
37307
  var r = ne.attr(e, t);
37295
37308
  return r ? `var(--docx-${r}-font)` : null;
@@ -37311,7 +37324,7 @@ class Yt {
37311
37324
  return ne.lengthAttr(e, "w");
37312
37325
  }
37313
37326
  static valueOfBorder(e) {
37314
- var t = Yt.parseBorderType(ne.attr(e, "val"));
37327
+ var t = Zt.parseBorderType(ne.attr(e, "val"));
37315
37328
  if (t == "none")
37316
37329
  return "none";
37317
37330
  var r = bu.colorAttr(e, "color"), n = ne.lengthAttr(e, "sz", kr.Border);
@@ -38355,7 +38368,7 @@ const I5 = ({
38355
38368
  onSaveRef: n,
38356
38369
  readonly: s = !1
38357
38370
  }) => {
38358
- const [a, o] = On([]), [l, c] = On(!0), [h, d] = On(null), [p, g] = On(0), y = xs(null), b = gr((fe) => {
38371
+ const [a, o] = Tn([]), [l, c] = Tn(!0), [h, d] = Tn(null), [p, g] = Tn(0), y = xs(null), b = gr((fe) => {
38359
38372
  const K = /\{([^}]+)\}/g, be = [];
38360
38373
  let te;
38361
38374
  for (; (te = K.exec(fe)) !== null; )
@@ -38402,7 +38415,7 @@ const I5 = ({
38402
38415
  }, [E]), C = gr(async () => {
38403
38416
  t == null || t(yn), g((fe) => fe + 1);
38404
38417
  }, [t]);
38405
- Kt(() => {
38418
+ Vt(() => {
38406
38419
  n && (n.current = C);
38407
38420
  }, [C, n]);
38408
38421
  const I = gr(
@@ -38623,11 +38636,11 @@ const I5 = ({
38623
38636
  c(!1);
38624
38637
  }
38625
38638
  }, [i, e, b, r]);
38626
- Kt(() => {
38639
+ Vt(() => {
38627
38640
  z();
38628
- }, [z]), Kt(() => {
38641
+ }, [z]), Vt(() => {
38629
38642
  !l && Object.keys(yn).length > 0 && !!y.current && R(yn);
38630
- }, [l, R]), Kt(() => {
38643
+ }, [l, R]), Vt(() => {
38631
38644
  p > 0 && !!y.current && R(yn);
38632
38645
  }, [p, R]);
38633
38646
  const G = () => /* @__PURE__ */ ve.jsx("div", { className: "flex items-center justify-center p-8", children: /* @__PURE__ */ ve.jsx("div", { className: "text-body", children: "Loading document..." }) }), O = () => /* @__PURE__ */ ve.jsxs("div", { className: "bg-red-50 border border-red-200 rounded-md p-4", children: [