@harbour-enterprises/superdoc 0.10.7 → 0.10.8

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.
@@ -1,14 +1,14 @@
1
- import { X as md, h as yd, d as bd, j as jo, R as Wo, b as wd, v as Sd, g as Dd, c as vd } from "./chunks/super-editor.es-ByxULFVB.es.js";
2
- import { a as cb, q as lb, A as gb } from "./chunks/super-editor.es-ByxULFVB.es.js";
3
- import { Y as Vl, r as V, Z as Ai, p as Ne, _ as _n, a as Ae, $ as qn, a0 as la, C as ht, i as lt, q as Ji, l as bt, x as Oe, a1 as Fd, L as ti, R as _t, a2 as kd, a3 as xd, a4 as Xo, g as Ti, N as Gs, M as Kr, j as li, k as Qi, h as ga, U as Rd, s as Nd, z as _r, F as qt, Q as GA, m as dt, D as fi, G as fs, B as re, V as Md, S as Ld, W as Gd, K as Oi, O as ds, E as sr, P as Td, J as Ud, T as Hd, b as ye, o as pe, t as Bi, v as Si, y as zl, f as Xe, A as ci, e as tt, u as Ci, w as wi, n as js, a5 as Zl, d as An, c as $l, X as Pd, a6 as Od } from "./chunks/vue-BDbTsTMu.es.js";
4
- import { B as Pn } from "./chunks/jszip-DSGi1sNe.es.js";
1
+ import { X as md, h as yd, d as bd, j as jo, R as Wo, b as wd, v as Sd, g as Dd, c as vd } from "./chunks/super-editor.es-CSQC6uyC.es.js";
2
+ import { a as cb, q as lb, A as gb } from "./chunks/super-editor.es-CSQC6uyC.es.js";
3
+ import { Y as Vl, r as V, Z as Ai, p as Ne, _ as _n, a as Ae, $ as qn, a0 as la, C as ht, i as lt, q as Ji, l as bt, x as Oe, a1 as Fd, L as ti, R as _t, a2 as kd, a3 as xd, a4 as Xo, g as Ti, N as Gs, M as Kr, j as li, k as Qi, h as ga, U as Rd, s as Nd, z as _r, F as qt, Q as GA, m as dt, D as fi, G as fs, B as re, V as Md, S as Ld, W as Gd, K as Oi, O as ds, E as sr, P as Td, J as Ud, T as Hd, b as ye, o as pe, t as Bi, v as Si, y as zl, f as Xe, A as ci, e as tt, u as Ci, w as wi, n as js, a5 as Zl, d as on, c as $l, X as Pd, a6 as Od } from "./chunks/vue-BDbTsTMu.es.js";
4
+ import { B as On } from "./chunks/jszip-DSGi1sNe.es.js";
5
5
  import { B as Jd } from "./chunks/blank-docx-BRvkcuiv.es.js";
6
6
  import { E as eg } from "./chunks/eventemitter3-C2H8juPb.es.js";
7
7
  import { HocuspocusProvider as Yd, HocuspocusProviderWebsocket as Kd } from "@hocuspocus/provider";
8
8
  import { Doc as _d, Map as tg } from "yjs";
9
9
  import { v as ig } from "./chunks/uuid-BMep7PEs.es.js";
10
- const On = "application/vnd.openxmlformats-officedocument.wordprocessingml.document", ha = "application/pdf", TA = "text/html", Vo = {
11
- docx: On,
10
+ const rn = "application/vnd.openxmlformats-officedocument.wordprocessingml.document", ha = "application/pdf", TA = "text/html", Vo = {
11
+ docx: rn,
12
12
  pdf: ha,
13
13
  html: TA
14
14
  }, Ts = Object.freeze({
@@ -310,12 +310,12 @@ const jd = new Int32Array([
310
310
  755167117
311
311
  ]);
312
312
  function sg(n) {
313
- if (Pn.isBuffer(n))
313
+ if (On.isBuffer(n))
314
314
  return n;
315
315
  if (typeof n == "number")
316
- return Pn.alloc(n);
316
+ return On.alloc(n);
317
317
  if (typeof n == "string")
318
- return Pn.from(n);
318
+ return On.from(n);
319
319
  throw new Error("input must be buffer, number, or string, received " + typeof n);
320
320
  }
321
321
  function Wd(n) {
@@ -323,7 +323,7 @@ function Wd(n) {
323
323
  return t.writeInt32BE(n, 0), t;
324
324
  }
325
325
  function UA(n, t) {
326
- n = sg(n), Pn.isBuffer(t) && (t = t.readUInt32BE(0));
326
+ n = sg(n), On.isBuffer(t) && (t = t.readUInt32BE(0));
327
327
  let i = ~~t ^ -1;
328
328
  for (var r = 0; r < n.length; r++)
329
329
  i = jd[(i ^ n[r]) & 255] ^ i >>> 8;
@@ -513,7 +513,7 @@ class qr {
513
513
  * @private
514
514
  */
515
515
  async generateCrc32Hash(t) {
516
- const i = await t.arrayBuffer(), r = Pn.from(i);
516
+ const i = await t.arrayBuffer(), r = On.from(i);
517
517
  return Vd(r).toString("hex");
518
518
  }
519
519
  isTelemetryDataChanged() {
@@ -705,7 +705,7 @@ var Ui;
705
705
  (function(n) {
706
706
  n.direct = "direct", n.patchObject = "patch object", n.patchFunction = "patch function";
707
707
  })(Ui || (Ui = {}));
708
- const En = typeof window < "u", Zo = typeof window == "object" && window.window === window ? window : typeof self == "object" && self.self === self ? self : typeof Ti == "object" && Ti.global === Ti ? Ti : typeof globalThis == "object" ? globalThis : { HTMLElement: null };
708
+ const pn = typeof window < "u", Zo = typeof window == "object" && window.window === window ? window : typeof self == "object" && self.self === self ? self : typeof Ti == "object" && Ti.global === Ti ? Ti : typeof globalThis == "object" ? globalThis : { HTMLElement: null };
709
709
  function rI(n, { autoBom: t = !1 } = {}) {
710
710
  return t && /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(n.type) ? new Blob(["\uFEFF", n], { type: n.type }) : n;
711
711
  }
@@ -734,7 +734,7 @@ function Lr(n) {
734
734
  i.initMouseEvent("click", !0, !0, window, 0, 0, 0, 80, 20, !1, !1, !1, !1, 0, null), n.dispatchEvent(i);
735
735
  }
736
736
  }
737
- const Gr = typeof navigator == "object" ? navigator : { userAgent: "" }, cg = /Macintosh/.test(Gr.userAgent) && /AppleWebKit/.test(Gr.userAgent) && !/Safari/.test(Gr.userAgent), lg = En ? (
737
+ const Gr = typeof navigator == "object" ? navigator : { userAgent: "" }, cg = /Macintosh/.test(Gr.userAgent) && /AppleWebKit/.test(Gr.userAgent) && !/Safari/.test(Gr.userAgent), lg = pn ? (
738
738
  // Use download attribute first if possible (#193 Lumia mobile) unless this is a macOS WebView or mini program
739
739
  typeof HTMLAnchorElement < "u" && "download" in HTMLAnchorElement.prototype && !cg ? aI : (
740
740
  // Use msSaveOrOpenBlob as a second approach
@@ -940,7 +940,7 @@ function fI(n) {
940
940
  }
941
941
  }
942
942
  let cs = !0;
943
- const Ur = [], Nn = "pinia:mutations", Yt = "pinia", { assign: BI } = Object, jr = (n) => "🍍 " + n;
943
+ const Ur = [], Mn = "pinia:mutations", Yt = "pinia", { assign: BI } = Object, jr = (n) => "🍍 " + n;
944
944
  function EI(n, t) {
945
945
  ag({
946
946
  id: "dev.esm.pinia",
@@ -952,7 +952,7 @@ function EI(n, t) {
952
952
  app: n
953
953
  }, (i) => {
954
954
  typeof i.now != "function" && Rt("You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."), i.addTimelineLayer({
955
- id: Nn,
955
+ id: Mn,
956
956
  label: "Pinia 🍍",
957
957
  color: 15064968
958
958
  }), i.addInspector({
@@ -1100,7 +1100,7 @@ function pI(n, t) {
1100
1100
  t.$onAction(({ after: g, onError: u, name: I, args: f }) => {
1101
1101
  const Q = Ig++;
1102
1102
  i.addTimelineEvent({
1103
- layerId: Nn,
1103
+ layerId: Mn,
1104
1104
  event: {
1105
1105
  time: r(),
1106
1106
  title: "🛫 " + I,
@@ -1113,8 +1113,8 @@ function pI(n, t) {
1113
1113
  groupId: Q
1114
1114
  }
1115
1115
  }), g((y) => {
1116
- pn = void 0, i.addTimelineEvent({
1117
- layerId: Nn,
1116
+ Qn = void 0, i.addTimelineEvent({
1117
+ layerId: Mn,
1118
1118
  event: {
1119
1119
  time: r(),
1120
1120
  title: "🛬 " + I,
@@ -1129,8 +1129,8 @@ function pI(n, t) {
1129
1129
  }
1130
1130
  });
1131
1131
  }), u((y) => {
1132
- pn = void 0, i.addTimelineEvent({
1133
- layerId: Nn,
1132
+ Qn = void 0, i.addTimelineEvent({
1133
+ layerId: Mn,
1134
1134
  event: {
1135
1135
  time: r(),
1136
1136
  logType: "error",
@@ -1149,7 +1149,7 @@ function pI(n, t) {
1149
1149
  }, !0), t._customProperties.forEach((g) => {
1150
1150
  bt(() => Oe(t[g]), (u, I) => {
1151
1151
  i.notifyComponentUpdate(), i.sendInspectorState(Yt), cs && i.addTimelineEvent({
1152
- layerId: Nn,
1152
+ layerId: Mn,
1153
1153
  event: {
1154
1154
  time: r(),
1155
1155
  title: "Change",
@@ -1158,7 +1158,7 @@ function pI(n, t) {
1158
1158
  newValue: u,
1159
1159
  oldValue: I
1160
1160
  },
1161
- groupId: pn
1161
+ groupId: Qn
1162
1162
  }
1163
1163
  });
1164
1164
  }, { deep: !0 });
@@ -1169,7 +1169,7 @@ function pI(n, t) {
1169
1169
  time: r(),
1170
1170
  title: fI(u),
1171
1171
  data: BI({ store: bi(t.$id) }, CI(g)),
1172
- groupId: pn
1172
+ groupId: Qn
1173
1173
  };
1174
1174
  u === Ui.patchFunction ? f.subtitle = "⤵️" : u === Ui.patchObject ? f.subtitle = "🧩" : g && !Array.isArray(g) && (f.subtitle = g.type), g && (f.data["rawEvent(s)"] = {
1175
1175
  _custom: {
@@ -1179,14 +1179,14 @@ function pI(n, t) {
1179
1179
  value: g
1180
1180
  }
1181
1181
  }), i.addTimelineEvent({
1182
- layerId: Nn,
1182
+ layerId: Mn,
1183
1183
  event: f
1184
1184
  });
1185
1185
  }, { detached: !0, flush: "sync" });
1186
1186
  const A = t._hotUpdate;
1187
1187
  t._hotUpdate = Ai((g) => {
1188
1188
  A(g), i.addTimelineEvent({
1189
- layerId: Nn,
1189
+ layerId: Mn,
1190
1190
  event: {
1191
1191
  time: r(),
1192
1192
  title: "🔥 " + t.$id,
@@ -1204,22 +1204,22 @@ function pI(n, t) {
1204
1204
  }, i.notifyComponentUpdate(), i.sendInspectorTree(Yt), i.sendInspectorState(Yt), i.getSettings().logStoreChanges && Rt(`"${t.$id}" store installed 🆕`);
1205
1205
  });
1206
1206
  }
1207
- let Ig = 0, pn;
1207
+ let Ig = 0, Qn;
1208
1208
  function $o(n, t, i) {
1209
1209
  const r = t.reduce((A, c) => (A[c] = _n(n)[c], A), {});
1210
1210
  for (const A in r)
1211
1211
  n[A] = function() {
1212
1212
  const c = Ig, g = i ? new Proxy(n, {
1213
1213
  get(...I) {
1214
- return pn = c, Reflect.get(...I);
1214
+ return Qn = c, Reflect.get(...I);
1215
1215
  },
1216
1216
  set(...I) {
1217
- return pn = c, Reflect.set(...I);
1217
+ return Qn = c, Reflect.set(...I);
1218
1218
  }
1219
1219
  }) : n;
1220
- pn = c;
1220
+ Qn = c;
1221
1221
  const u = r[A].apply(g, arguments);
1222
- return pn = void 0, u;
1222
+ return Qn = void 0, u;
1223
1223
  };
1224
1224
  }
1225
1225
  function QI({ app: n, store: t, options: i }) {
@@ -1243,7 +1243,7 @@ function mI() {
1243
1243
  let i = [], r = [];
1244
1244
  const A = Ai({
1245
1245
  install(c) {
1246
- Ws(A), A._a = c, c.provide(Ag, A), c.config.globalProperties.$pinia = A, Ne.env.NODE_ENV !== "production" && Ne.env.NODE_ENV !== "test" && En && EI(c, A), r.forEach((g) => i.push(g)), r = [];
1246
+ Ws(A), A._a = c, c.provide(Ag, A), c.config.globalProperties.$pinia = A, Ne.env.NODE_ENV !== "production" && Ne.env.NODE_ENV !== "test" && pn && EI(c, A), r.forEach((g) => i.push(g)), r = [];
1247
1247
  },
1248
1248
  use(c) {
1249
1249
  return this._a ? i.push(c) : r.push(c), this;
@@ -1256,7 +1256,7 @@ function mI() {
1256
1256
  _s: /* @__PURE__ */ new Map(),
1257
1257
  state: t
1258
1258
  });
1259
- return Ne.env.NODE_ENV !== "production" && Ne.env.NODE_ENV !== "test" && En && typeof Proxy < "u" && A.use(QI), A;
1259
+ return Ne.env.NODE_ENV !== "production" && Ne.env.NODE_ENV !== "test" && pn && typeof Proxy < "u" && A.use(QI), A;
1260
1260
  }
1261
1261
  function Cg(n, t) {
1262
1262
  for (const i in t) {
@@ -1418,7 +1418,7 @@ function CA(n, t, i = {}, r, A, c) {
1418
1418
  return K;
1419
1419
  },
1420
1420
  $dispose: J
1421
- }, S = ti(Ne.env.NODE_ENV !== "production" || Ne.env.NODE_ENV !== "production" && Ne.env.NODE_ENV !== "test" && En ? Ii(
1421
+ }, S = ti(Ne.env.NODE_ENV !== "production" || Ne.env.NODE_ENV !== "production" && Ne.env.NODE_ENV !== "test" && pn ? Ii(
1422
1422
  {
1423
1423
  _hmrPayload: H,
1424
1424
  _customProperties: Ai(/* @__PURE__ */ new Set())
@@ -1440,7 +1440,7 @@ function CA(n, t, i = {}, r, A, c) {
1440
1440
  } else Ne.env.NODE_ENV !== "production" && ic(P) && (H.getters[L] = c ? (
1441
1441
  // @ts-expect-error
1442
1442
  i.getters[L]
1443
- ) : P, En && (R._getters || // @ts-expect-error: same
1443
+ ) : P, pn && (R._getters || // @ts-expect-error: same
1444
1444
  (R._getters = Ai([]))).push(L));
1445
1445
  }
1446
1446
  if (Ii(S, R), Ii(_n(S), R), Object.defineProperty(S, "$state", {
@@ -1480,7 +1480,7 @@ function CA(n, t, i = {}, r, A, c) {
1480
1480
  }), Object.keys(S._hmrPayload.actions).forEach((P) => {
1481
1481
  P in L._hmrPayload.actions || Ja(S, P);
1482
1482
  }), S._hmrPayload = L._hmrPayload, S._getters = L._getters, S._hotUpdating = !1;
1483
- })), Ne.env.NODE_ENV !== "production" && Ne.env.NODE_ENV !== "test" && En) {
1483
+ })), Ne.env.NODE_ENV !== "production" && Ne.env.NODE_ENV !== "test" && pn) {
1484
1484
  const L = {
1485
1485
  writable: !0,
1486
1486
  configurable: !0,
@@ -1492,7 +1492,7 @@ function CA(n, t, i = {}, r, A, c) {
1492
1492
  });
1493
1493
  }
1494
1494
  return r._p.forEach((L) => {
1495
- if (Ne.env.NODE_ENV !== "production" && Ne.env.NODE_ENV !== "test" && En) {
1495
+ if (Ne.env.NODE_ENV !== "production" && Ne.env.NODE_ENV !== "test" && pn) {
1496
1496
  const P = g.run(() => L({
1497
1497
  store: S,
1498
1498
  app: r._a,
@@ -1534,7 +1534,7 @@ This will fail in production.`);
1534
1534
  const y = "__hot:" + r, b = c ? CA(y, t, A, u, !0) : nc(y, Ii({}, A), u, !0);
1535
1535
  I._hotUpdate(b), delete u.state.value[y], u._s.delete(y);
1536
1536
  }
1537
- if (Ne.env.NODE_ENV !== "production" && En) {
1537
+ if (Ne.env.NODE_ENV !== "production" && pn) {
1538
1538
  const y = Ji();
1539
1539
  if (y && y.proxy && // avoid adding stores that are just built for hot module replacement
1540
1540
  !I) {
@@ -1706,7 +1706,7 @@ const LI = (n, t) => {
1706
1706
  const c = t.toJSON(), g = /* @__PURE__ */ new Set(), u = [];
1707
1707
  c.forEach((I) => {
1708
1708
  g.has(I.commentId) || (g.add(I.commentId), u.push(I));
1709
- }), n.commentsStore.commentsList = u.map((I) => Tn(I));
1709
+ }), n.commentsStore.commentsList = u.map((I) => Un(I));
1710
1710
  });
1711
1711
  }, JI = (n) => {
1712
1712
  const { isInternal: t } = n.config, i = `${n.config.superdocId}-superdoc`;
@@ -1787,7 +1787,7 @@ function Xs(n) {
1787
1787
  }
1788
1788
  };
1789
1789
  }
1790
- function Tn(n) {
1790
+ function Un(n) {
1791
1791
  const t = V(n.uid), i = n.commentId || ig(), r = n.importedId, A = n.parentCommentId, c = n.fileId, g = n.fileType, u = n.createdAtVersionNumber, I = V(n.isInternal !== void 0 ? n.isInternal : !0), f = V([]), Q = V(null), y = V(n.isFocused || !1), b = n.creatorEmail, D = n.creatorName, w = n.createdTime || Date.now(), k = V(n.importedAuthor || null), M = V(n.commentText || ""), F = n.selection ? Xs(n.selection) : Xs({
1792
1792
  documentId: c,
1793
1793
  page: 1,
@@ -1918,7 +1918,7 @@ function KI(n, t) {
1918
1918
  L.value = P.value, console.debug("[superdoc] Restored comments:", L.value);
1919
1919
  }, S = V(n.fields || []), G = V(n.fields?.map((q) => DI(q)) || []), R = V(n.annotations || []), L = V(K()), P = V(L.value);
1920
1920
  function K() {
1921
- return c.modules.comments ? n.conversations?.map((q) => Tn(q)) || [] : [];
1921
+ return c.modules.comments ? n.conversations?.map((q) => Un(q)) || [] : [];
1922
1922
  }
1923
1923
  const z = V(null);
1924
1924
  return {
@@ -1956,7 +1956,7 @@ function KI(n, t) {
1956
1956
  };
1957
1957
  }
1958
1958
  const Yi = /* @__PURE__ */ JA("superdoc", () => {
1959
- const n = V(null), t = on(), i = V([]), r = V([]), A = ti({}), c = V([]), g = V(100), u = V(!1), I = V(!1), f = V([]), Q = ti({ name: null, email: null }), y = ti({}), b = V(null), D = V({
1959
+ const n = V(null), t = cn(), i = V([]), r = V([]), A = ti({}), c = V([]), g = V(100), u = V(!1), I = V(!1), f = V([]), Q = ti({ name: null, email: null }), y = ti({}), b = V(null), D = V({
1960
1960
  left: 0,
1961
1961
  top: 0,
1962
1962
  width: 0,
@@ -1971,8 +1971,8 @@ const Yi = /* @__PURE__ */ JA("superdoc", () => {
1971
1971
  w(), n.value = S;
1972
1972
  const { documents: G, modules: R, user: L, users: P } = S;
1973
1973
  if (c.value = P || [], Object.assign(Q, L), Object.assign(y, R), !G?.length && !S.modules.collaboration) {
1974
- const K = await zo(Jd, "blank.docx", On), z = {
1975
- type: On,
1974
+ const K = await zo(Jd, "blank.docx", rn), z = {
1975
+ type: rn,
1976
1976
  data: K,
1977
1977
  name: "blank.docx",
1978
1978
  isNewFile: !0
@@ -1991,13 +1991,11 @@ const Yi = /* @__PURE__ */ JA("superdoc", () => {
1991
1991
  console.warn("[superdoc] Error initializing document:", G, "with error:", R, "Skipping document.");
1992
1992
  }
1993
1993
  }, O = async (S) => {
1994
- if (n.value?.modules.collaboration && !S.isNewFile)
1994
+ if (n.value?.html && (S.html = n.value.html), !S.data && S.url && !S.type && (S.type = rn), n.value?.modules.collaboration && !S.isNewFile)
1995
1995
  return { ...S, data: null, url: null };
1996
1996
  if (S.data) return S;
1997
- if (!S.data && S.url && !S.type)
1998
- throw new Error("Document mime type must be specified when loading from URL");
1999
1997
  if (S.url && S.type) {
2000
- S.type.toLowerCase() === "docx" ? S.type = On : S.type.toLowerCase() === "pdf" && (S.type = ha);
1998
+ S.type.toLowerCase() === "docx" ? S.type = rn : S.type.toLowerCase() === "pdf" && (S.type = ha);
2001
1999
  const G = await zo(S.url, S.name || "document", S.type);
2002
2000
  return { ...S, data: G };
2003
2001
  }
@@ -2047,7 +2045,7 @@ const Yi = /* @__PURE__ */ JA("superdoc", () => {
2047
2045
  };
2048
2046
  }
2049
2047
  };
2050
- }), on = /* @__PURE__ */ JA("comments", () => {
2048
+ }), cn = /* @__PURE__ */ JA("comments", () => {
2051
2049
  const n = Yi(), t = ti({
2052
2050
  name: "comments",
2053
2051
  readOnly: !1,
@@ -2055,7 +2053,7 @@ const Yi = /* @__PURE__ */ JA("superdoc", () => {
2055
2053
  showResolved: !1
2056
2054
  }), i = !1, r = {}, A = Ts, c = V(!1), g = V(!1), u = V(null), I = V(!1), f = V(null), Q = V(null), y = V([]), b = V([]), D = /* @__PURE__ */ new Set([]), w = V(!0), k = V(""), M = V([]), F = V(!1), O = V([]), J = V({}), T = V(0), H = V([]), U = V([]), S = V(!1), G = V(!1), R = V([]), L = V(null), P = (ge = {}) => {
2057
2055
  const ce = { ...t, ...ge };
2058
- Object.assign(t, ce), w.value = t.suppressInternalExternal || !1, ge.comments && ge.comments.length && (M.value = ge.comments?.map((we) => Tn(we)) || []);
2056
+ Object.assign(t, ce), w.value = t.suppressInternalExternal || !1, ge.comments && ge.comments.length && (M.value = ge.comments?.map((we) => Un(we)) || []);
2059
2057
  }, K = (ge) => ge == null ? null : M.value.find((ce) => ce.commentId == ge || ce.importedId == ge), z = (ge) => {
2060
2058
  if (ge == null)
2061
2059
  return f.value = null;
@@ -2152,7 +2150,7 @@ const Yi = /* @__PURE__ */ JA("superdoc", () => {
2152
2150
  }
2153
2151
  }, je = ({ selection: ge, documentId: ce, parentCommentId: we, ...Ge }) => st({ selection: ge, documentId: ce, parentCommentId: we, ...Ge }), st = ({ selection: ge, documentId: ce, parentCommentId: we, ...Ge }) => {
2154
2152
  let Me;
2155
- return ce ? Me = n.getDocument(ce) : ge && (Me = n.getDocument(ge.documentId)), Me || (Me = n.documents[0]), Tn({
2153
+ return ce ? Me = n.getDocument(ce) : ge && (Me = n.getDocument(ge.documentId)), Me || (Me = n.documents[0]), Un({
2156
2154
  fileId: Me.id,
2157
2155
  fileType: Me.type,
2158
2156
  parentCommentId: we,
@@ -2167,7 +2165,7 @@ const Yi = /* @__PURE__ */ JA("superdoc", () => {
2167
2165
  }, Ce = ({ superdoc: ge, comment: ce }) => {
2168
2166
  let we = M.value.find((Je) => Je.commentId === f.value);
2169
2167
  we || (we = ce);
2170
- const Ge = Tn(ce.getValues());
2168
+ const Ge = Un(ce.getValues());
2171
2169
  if (L.value ? Ge.setText({ text: k.value, suppressUpdate: !0 }) : Ge.setText({ text: ce.commentText, suppressUpdate: !0 }), Ge.selection.source = L.value?.selection?.source, we) {
2172
2170
  const Je = we.isInternal;
2173
2171
  Ge.isInternal = Je;
@@ -2193,7 +2191,7 @@ const Yi = /* @__PURE__ */ JA("superdoc", () => {
2193
2191
  console.debug("[processLoadedDocxComments] processing comments...", we), we.forEach((Re) => {
2194
2192
  if (!gt(Re.textJson) && !Re.trackedChange)
2195
2193
  return;
2196
- const We = Re.creatorName.replace("(imported)", ""), Ve = `${We} (imported)`, Ut = Tn({
2194
+ const We = Re.creatorName.replace("(imported)", ""), Ve = `${We} (imported)`, Ut = Un({
2197
2195
  fileId: Ge,
2198
2196
  fileType: Me.type,
2199
2197
  commentId: Re.commentId,
@@ -2893,7 +2891,7 @@ function E0(n, t, i) {
2893
2891
  let r = t * Math.min(i, 1 - i), A = (c, g = (c + n / 30) % 12) => i - r * Math.max(Math.min(g - 3, 9 - g, 1), -1);
2894
2892
  return [A(0) * 255, A(8) * 255, A(4) * 255];
2895
2893
  }
2896
- const Ki = "^\\s*", _i = "\\s*$", yn = "\\s*((\\.\\d+)|(\\d+(\\.\\d*)?))%\\s*", oi = "\\s*((\\.\\d+)|(\\d+(\\.\\d*)?))\\s*", Un = "([0-9A-Fa-f])", Hn = "([0-9A-Fa-f]{2})", Dg = new RegExp(`${Ki}hsl\\s*\\(${oi},${yn},${yn}\\)${_i}`), vg = new RegExp(`${Ki}hsv\\s*\\(${oi},${yn},${yn}\\)${_i}`), Fg = new RegExp(`${Ki}hsla\\s*\\(${oi},${yn},${yn},${oi}\\)${_i}`), kg = new RegExp(`${Ki}hsva\\s*\\(${oi},${yn},${yn},${oi}\\)${_i}`), p0 = new RegExp(`${Ki}rgb\\s*\\(${oi},${oi},${oi}\\)${_i}`), Q0 = new RegExp(`${Ki}rgba\\s*\\(${oi},${oi},${oi},${oi}\\)${_i}`), m0 = new RegExp(`${Ki}#${Un}${Un}${Un}${_i}`), y0 = new RegExp(`${Ki}#${Hn}${Hn}${Hn}${_i}`), b0 = new RegExp(`${Ki}#${Un}${Un}${Un}${Un}${_i}`), w0 = new RegExp(`${Ki}#${Hn}${Hn}${Hn}${Hn}${_i}`);
2894
+ const Ki = "^\\s*", _i = "\\s*$", bn = "\\s*((\\.\\d+)|(\\d+(\\.\\d*)?))%\\s*", oi = "\\s*((\\.\\d+)|(\\d+(\\.\\d*)?))\\s*", Hn = "([0-9A-Fa-f])", Pn = "([0-9A-Fa-f]{2})", Dg = new RegExp(`${Ki}hsl\\s*\\(${oi},${bn},${bn}\\)${_i}`), vg = new RegExp(`${Ki}hsv\\s*\\(${oi},${bn},${bn}\\)${_i}`), Fg = new RegExp(`${Ki}hsla\\s*\\(${oi},${bn},${bn},${oi}\\)${_i}`), kg = new RegExp(`${Ki}hsva\\s*\\(${oi},${bn},${bn},${oi}\\)${_i}`), p0 = new RegExp(`${Ki}rgb\\s*\\(${oi},${oi},${oi}\\)${_i}`), Q0 = new RegExp(`${Ki}rgba\\s*\\(${oi},${oi},${oi},${oi}\\)${_i}`), m0 = new RegExp(`${Ki}#${Hn}${Hn}${Hn}${_i}`), y0 = new RegExp(`${Ki}#${Pn}${Pn}${Pn}${_i}`), b0 = new RegExp(`${Ki}#${Hn}${Hn}${Hn}${Hn}${_i}`), w0 = new RegExp(`${Ki}#${Pn}${Pn}${Pn}${Pn}${_i}`);
2897
2895
  function ei(n) {
2898
2896
  return parseInt(n, 16);
2899
2897
  }
@@ -2903,12 +2901,12 @@ function S0(n) {
2903
2901
  if (t = Fg.exec(n))
2904
2902
  return [
2905
2903
  zr(t[1]),
2906
- Qn(t[5]),
2907
- Qn(t[9]),
2904
+ mn(t[5]),
2905
+ mn(t[9]),
2908
2906
  Jn(t[13])
2909
2907
  ];
2910
2908
  if (t = Dg.exec(n))
2911
- return [zr(t[1]), Qn(t[5]), Qn(t[9]), 1];
2909
+ return [zr(t[1]), mn(t[5]), mn(t[9]), 1];
2912
2910
  throw new Error(`[seemly/hsla]: Invalid color value ${n}.`);
2913
2911
  } catch (t) {
2914
2912
  throw t;
@@ -2920,12 +2918,12 @@ function D0(n) {
2920
2918
  if (t = kg.exec(n))
2921
2919
  return [
2922
2920
  zr(t[1]),
2923
- Qn(t[5]),
2924
- Qn(t[9]),
2921
+ mn(t[5]),
2922
+ mn(t[9]),
2925
2923
  Jn(t[13])
2926
2924
  ];
2927
2925
  if (t = vg.exec(n))
2928
- return [zr(t[1]), Qn(t[5]), Qn(t[9]), 1];
2926
+ return [zr(t[1]), mn(t[5]), mn(t[9]), 1];
2929
2927
  throw new Error(`[seemly/hsva]: Invalid color value ${n}.`);
2930
2928
  } catch (t) {
2931
2929
  throw t;
@@ -3014,7 +3012,7 @@ function Kt(n) {
3014
3012
  const t = Math.round(Number(n));
3015
3013
  return t > 255 ? 255 : t < 0 ? 0 : t;
3016
3014
  }
3017
- function Qn(n) {
3015
+ function mn(n) {
3018
3016
  const t = Math.round(Number(n));
3019
3017
  return t > 100 ? 100 : t < 0 ? 0 : t;
3020
3018
  }
@@ -3465,14 +3463,14 @@ function gc(n, t, i = "default") {
3465
3463
  return A[0];
3466
3464
  throw new Error(`[vueuc/${n}]: slot[${i}] should have exactly one child.`);
3467
3465
  }
3468
- let dn = null;
3466
+ let In = null;
3469
3467
  function Gg() {
3470
- if (dn === null && (dn = document.getElementById("v-binder-view-measurer"), dn === null)) {
3471
- dn = document.createElement("div"), dn.id = "v-binder-view-measurer";
3472
- const { style: n } = dn;
3473
- n.position = "fixed", n.left = "0", n.right = "0", n.top = "0", n.bottom = "0", n.pointerEvents = "none", n.visibility = "hidden", document.body.appendChild(dn);
3468
+ if (In === null && (In = document.getElementById("v-binder-view-measurer"), In === null)) {
3469
+ In = document.createElement("div"), In.id = "v-binder-view-measurer";
3470
+ const { style: n } = In;
3471
+ n.position = "fixed", n.left = "0", n.right = "0", n.top = "0", n.bottom = "0", n.pointerEvents = "none", n.visibility = "hidden", document.body.appendChild(In);
3474
3472
  }
3475
- return dn.getBoundingClientRect();
3473
+ return In.getBoundingClientRect();
3476
3474
  }
3477
3475
  function j0(n, t) {
3478
3476
  const i = Gg();
@@ -4700,7 +4698,7 @@ function GC() {
4700
4698
  return Va === void 0 && (Va = navigator.userAgent.includes("Node.js") || navigator.userAgent.includes("jsdom")), Va;
4701
4699
  }
4702
4700
  const xc = /* @__PURE__ */ new Set();
4703
- function Gn(n, t) {
4701
+ function Tn(n, t) {
4704
4702
  const i = `[naive/${n}]: ${t}`;
4705
4703
  xc.has(i) || (xc.add(i), console.error(i));
4706
4704
  }
@@ -4880,7 +4878,7 @@ function PC(n, {
4880
4878
  }
4881
4879
  };
4882
4880
  }
4883
- var eh = typeof Ti == "object" && Ti && Ti.Object === Object && Ti, OC = typeof self == "object" && self && self.Object === Object && self, qi = eh || OC || Function("return this")(), bn = qi.Symbol, th = Object.prototype, JC = th.hasOwnProperty, YC = th.toString, Ms = bn ? bn.toStringTag : void 0;
4881
+ var eh = typeof Ti == "object" && Ti && Ti.Object === Object && Ti, OC = typeof self == "object" && self && self.Object === Object && self, qi = eh || OC || Function("return this")(), wn = qi.Symbol, th = Object.prototype, JC = th.hasOwnProperty, YC = th.toString, Ms = wn ? wn.toStringTag : void 0;
4884
4882
  function KC(n) {
4885
4883
  var t = JC.call(n, Ms), i = n[Ms];
4886
4884
  try {
@@ -4895,23 +4893,23 @@ var _C = Object.prototype, qC = _C.toString;
4895
4893
  function jC(n) {
4896
4894
  return qC.call(n);
4897
4895
  }
4898
- var WC = "[object Null]", XC = "[object Undefined]", Lc = bn ? bn.toStringTag : void 0;
4896
+ var WC = "[object Null]", XC = "[object Undefined]", Lc = wn ? wn.toStringTag : void 0;
4899
4897
  function Vn(n) {
4900
4898
  return n == null ? n === void 0 ? XC : WC : Lc && Lc in Object(n) ? KC(n) : jC(n);
4901
4899
  }
4902
- function wn(n) {
4900
+ function Sn(n) {
4903
4901
  return n != null && typeof n == "object";
4904
4902
  }
4905
4903
  var VC = "[object Symbol]";
4906
4904
  function XA(n) {
4907
- return typeof n == "symbol" || wn(n) && Vn(n) == VC;
4905
+ return typeof n == "symbol" || Sn(n) && Vn(n) == VC;
4908
4906
  }
4909
4907
  function ih(n, t) {
4910
4908
  for (var i = -1, r = n == null ? 0 : n.length, A = Array(r); ++i < r; )
4911
4909
  A[i] = t(n[i], i, n);
4912
4910
  return A;
4913
4911
  }
4914
- var pi = Array.isArray, Gc = bn ? bn.prototype : void 0, Tc = Gc ? Gc.toString : void 0;
4912
+ var pi = Array.isArray, Gc = wn ? wn.prototype : void 0, Tc = Gc ? Gc.toString : void 0;
4915
4913
  function nh(n) {
4916
4914
  if (typeof n == "string")
4917
4915
  return n;
@@ -4922,7 +4920,7 @@ function nh(n) {
4922
4920
  var t = n + "";
4923
4921
  return t == "0" && 1 / n == -1 / 0 ? "-0" : t;
4924
4922
  }
4925
- function Sn(n) {
4923
+ function Dn(n) {
4926
4924
  var t = typeof n;
4927
4925
  return n != null && (t == "object" || t == "function");
4928
4926
  }
@@ -4931,7 +4929,7 @@ function VA(n) {
4931
4929
  }
4932
4930
  var zC = "[object AsyncFunction]", ZC = "[object Function]", $C = "[object GeneratorFunction]", ef = "[object Proxy]";
4933
4931
  function zA(n) {
4934
- if (!Sn(n))
4932
+ if (!Dn(n))
4935
4933
  return !1;
4936
4934
  var t = Vn(n);
4937
4935
  return t == ZC || t == $C || t == zC || t == ef;
@@ -4961,7 +4959,7 @@ var rf = /[\\^$.*+?()[\]{}|]/g, af = /^\[object .+?Constructor\]$/, Af = Functio
4961
4959
  "^" + cf.call(lf).replace(rf, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
4962
4960
  );
4963
4961
  function hf(n) {
4964
- if (!Sn(n) || tf(n))
4962
+ if (!Dn(n) || tf(n))
4965
4963
  return !1;
4966
4964
  var t = zA(n) ? gf : af;
4967
4965
  return t.test(zn(n));
@@ -4977,7 +4975,7 @@ var bA = Zn(qi, "WeakMap"), Hc = Object.create, df = /* @__PURE__ */ function()
4977
4975
  function n() {
4978
4976
  }
4979
4977
  return function(t) {
4980
- if (!Sn(t))
4978
+ if (!Dn(t))
4981
4979
  return {};
4982
4980
  if (Hc)
4983
4981
  return Hc(t);
@@ -5088,7 +5086,7 @@ function ps(n) {
5088
5086
  return n != null && eo(n.length) && !zA(n);
5089
5087
  }
5090
5088
  function Nf(n, t, i) {
5091
- if (!Sn(i))
5089
+ if (!Dn(i))
5092
5090
  return !1;
5093
5091
  var r = typeof t;
5094
5092
  return (r == "number" ? ps(i) && ZA(t, i.length) : r == "string" && t in i) ? Ar(i[t], n) : !1;
@@ -5115,12 +5113,12 @@ function Gf(n, t) {
5115
5113
  }
5116
5114
  var Tf = "[object Arguments]";
5117
5115
  function Oc(n) {
5118
- return wn(n) && Vn(n) == Tf;
5116
+ return Sn(n) && Vn(n) == Tf;
5119
5117
  }
5120
5118
  var sh = Object.prototype, Uf = sh.hasOwnProperty, Hf = sh.propertyIsEnumerable, ta = Oc(/* @__PURE__ */ function() {
5121
5119
  return arguments;
5122
5120
  }()) ? Oc : function(n) {
5123
- return wn(n) && Uf.call(n, "callee") && !Hf.call(n, "callee");
5121
+ return Sn(n) && Uf.call(n, "callee") && !Hf.call(n, "callee");
5124
5122
  };
5125
5123
  function Pf() {
5126
5124
  return !1;
@@ -5129,7 +5127,7 @@ var rh = typeof exports == "object" && exports && !exports.nodeType && exports,
5129
5127
  ct[s1] = ct[r1] = ct[a1] = ct[A1] = ct[o1] = ct[c1] = ct[l1] = ct[g1] = ct[h1] = !0;
5130
5128
  ct[Yf] = ct[Kf] = ct[i1] = ct[_f] = ct[n1] = ct[qf] = ct[jf] = ct[Wf] = ct[Xf] = ct[Vf] = ct[zf] = ct[Zf] = ct[$f] = ct[e1] = ct[t1] = !1;
5131
5129
  function u1(n) {
5132
- return wn(n) && eo(n.length) && !!ct[Vn(n)];
5130
+ return Sn(n) && eo(n.length) && !!ct[Vn(n)];
5133
5131
  }
5134
5132
  function d1(n) {
5135
5133
  return function(t) {
@@ -5179,7 +5177,7 @@ function m1(n) {
5179
5177
  }
5180
5178
  var y1 = Object.prototype, b1 = y1.hasOwnProperty;
5181
5179
  function w1(n) {
5182
- if (!Sn(n))
5180
+ if (!Dn(n))
5183
5181
  return m1(n);
5184
5182
  var t = to(n), i = [];
5185
5183
  for (var r in n)
@@ -5263,23 +5261,23 @@ function _1(n, t) {
5263
5261
  var i = this.__data__, r = Ia(i, n);
5264
5262
  return r < 0 ? (++this.size, i.push([n, t])) : i[r][1] = t, this;
5265
5263
  }
5266
- function cn(n) {
5264
+ function ln(n) {
5267
5265
  var t = -1, i = n == null ? 0 : n.length;
5268
5266
  for (this.clear(); ++t < i; ) {
5269
5267
  var r = n[t];
5270
5268
  this.set(r[0], r[1]);
5271
5269
  }
5272
5270
  }
5273
- cn.prototype.clear = H1;
5274
- cn.prototype.delete = J1;
5275
- cn.prototype.get = Y1;
5276
- cn.prototype.has = K1;
5277
- cn.prototype.set = _1;
5271
+ ln.prototype.clear = H1;
5272
+ ln.prototype.delete = J1;
5273
+ ln.prototype.get = Y1;
5274
+ ln.prototype.has = K1;
5275
+ ln.prototype.set = _1;
5278
5276
  var Zs = Zn(qi, "Map");
5279
5277
  function q1() {
5280
5278
  this.size = 0, this.__data__ = {
5281
5279
  hash: new Xn(),
5282
- map: new (Zs || cn)(),
5280
+ map: new (Zs || ln)(),
5283
5281
  string: new Xn()
5284
5282
  };
5285
5283
  }
@@ -5305,18 +5303,18 @@ function z1(n, t) {
5305
5303
  var i = Ca(this, n), r = i.size;
5306
5304
  return i.set(n, t), this.size += i.size == r ? 0 : 1, this;
5307
5305
  }
5308
- function ln(n) {
5306
+ function gn(n) {
5309
5307
  var t = -1, i = n == null ? 0 : n.length;
5310
5308
  for (this.clear(); ++t < i; ) {
5311
5309
  var r = n[t];
5312
5310
  this.set(r[0], r[1]);
5313
5311
  }
5314
5312
  }
5315
- ln.prototype.clear = q1;
5316
- ln.prototype.delete = W1;
5317
- ln.prototype.get = X1;
5318
- ln.prototype.has = V1;
5319
- ln.prototype.set = z1;
5313
+ gn.prototype.clear = q1;
5314
+ gn.prototype.delete = W1;
5315
+ gn.prototype.get = X1;
5316
+ gn.prototype.has = V1;
5317
+ gn.prototype.set = z1;
5320
5318
  var Z1 = "Expected a function";
5321
5319
  function ro(n, t) {
5322
5320
  if (typeof n != "function" || t != null && typeof t != "function")
@@ -5328,9 +5326,9 @@ function ro(n, t) {
5328
5326
  var g = n.apply(this, r);
5329
5327
  return i.cache = c.set(A, g) || c, g;
5330
5328
  };
5331
- return i.cache = new (ro.Cache || ln)(), i;
5329
+ return i.cache = new (ro.Cache || gn)(), i;
5332
5330
  }
5333
- ro.Cache = ln;
5331
+ ro.Cache = gn;
5334
5332
  var $1 = 500;
5335
5333
  function eB(n) {
5336
5334
  var t = ro(n, function(r) {
@@ -5373,7 +5371,7 @@ function aB(n, t) {
5373
5371
  }
5374
5372
  var hh = oh(Object.getPrototypeOf, Object), AB = "[object Object]", oB = Function.prototype, cB = Object.prototype, uh = oB.toString, lB = cB.hasOwnProperty, gB = uh.call(Object);
5375
5373
  function hB(n) {
5376
- if (!wn(n) || Vn(n) != AB)
5374
+ if (!Sn(n) || Vn(n) != AB)
5377
5375
  return !1;
5378
5376
  var t = hh(n);
5379
5377
  if (t === null)
@@ -5382,7 +5380,7 @@ function hB(n) {
5382
5380
  return typeof i == "function" && i instanceof i && uh.call(i) == gB;
5383
5381
  }
5384
5382
  function uB() {
5385
- this.__data__ = new cn(), this.size = 0;
5383
+ this.__data__ = new ln(), this.size = 0;
5386
5384
  }
5387
5385
  function dB(n) {
5388
5386
  var t = this.__data__, i = t.delete(n);
@@ -5397,16 +5395,16 @@ function CB(n) {
5397
5395
  var fB = 200;
5398
5396
  function BB(n, t) {
5399
5397
  var i = this.__data__;
5400
- if (i instanceof cn) {
5398
+ if (i instanceof ln) {
5401
5399
  var r = i.__data__;
5402
5400
  if (!Zs || r.length < fB - 1)
5403
5401
  return r.push([n, t]), this.size = ++i.size, this;
5404
- i = this.__data__ = new ln(r);
5402
+ i = this.__data__ = new gn(r);
5405
5403
  }
5406
5404
  return i.set(n, t), this.size = i.size, this;
5407
5405
  }
5408
5406
  function Pi(n) {
5409
- var t = this.__data__ = new cn(n);
5407
+ var t = this.__data__ = new ln(n);
5410
5408
  this.size = t.size;
5411
5409
  }
5412
5410
  Pi.prototype.clear = uB;
@@ -5441,8 +5439,8 @@ function SB(n, t, i) {
5441
5439
  function Xc(n) {
5442
5440
  return SB(n, no, wB);
5443
5441
  }
5444
- var wA = Zn(qi, "DataView"), SA = Zn(qi, "Promise"), DA = Zn(qi, "Set"), Vc = "[object Map]", DB = "[object Object]", zc = "[object Promise]", Zc = "[object Set]", $c = "[object WeakMap]", el = "[object DataView]", vB = zn(wA), FB = zn(Zs), kB = zn(SA), xB = zn(DA), RB = zn(bA), fn = Vn;
5445
- (wA && fn(new wA(new ArrayBuffer(1))) != el || Zs && fn(new Zs()) != Vc || SA && fn(SA.resolve()) != zc || DA && fn(new DA()) != Zc || bA && fn(new bA()) != $c) && (fn = function(n) {
5442
+ var wA = Zn(qi, "DataView"), SA = Zn(qi, "Promise"), DA = Zn(qi, "Set"), Vc = "[object Map]", DB = "[object Object]", zc = "[object Promise]", Zc = "[object Set]", $c = "[object WeakMap]", el = "[object DataView]", vB = zn(wA), FB = zn(Zs), kB = zn(SA), xB = zn(DA), RB = zn(bA), Bn = Vn;
5443
+ (wA && Bn(new wA(new ArrayBuffer(1))) != el || Zs && Bn(new Zs()) != Vc || SA && Bn(SA.resolve()) != zc || DA && Bn(new DA()) != Zc || bA && Bn(new bA()) != $c) && (Bn = function(n) {
5446
5444
  var t = Vn(n), i = t == DB ? n.constructor : void 0, r = i ? zn(i) : "";
5447
5445
  if (r)
5448
5446
  switch (r) {
@@ -5480,7 +5478,7 @@ function UB(n) {
5480
5478
  }
5481
5479
  function sa(n) {
5482
5480
  var t = -1, i = n == null ? 0 : n.length;
5483
- for (this.__data__ = new ln(); ++t < i; )
5481
+ for (this.__data__ = new gn(); ++t < i; )
5484
5482
  this.add(n[t]);
5485
5483
  }
5486
5484
  sa.prototype.add = sa.prototype.push = TB;
@@ -5540,7 +5538,7 @@ function KB(n) {
5540
5538
  i[++t] = r;
5541
5539
  }), i;
5542
5540
  }
5543
- var _B = 1, qB = 2, jB = "[object Boolean]", WB = "[object Date]", XB = "[object Error]", VB = "[object Map]", zB = "[object Number]", ZB = "[object RegExp]", $B = "[object Set]", eE = "[object String]", tE = "[object Symbol]", iE = "[object ArrayBuffer]", nE = "[object DataView]", tl = bn ? bn.prototype : void 0, $a = tl ? tl.valueOf : void 0;
5541
+ var _B = 1, qB = 2, jB = "[object Boolean]", WB = "[object Date]", XB = "[object Error]", VB = "[object Map]", zB = "[object Number]", ZB = "[object RegExp]", $B = "[object Set]", eE = "[object String]", tE = "[object Symbol]", iE = "[object ArrayBuffer]", nE = "[object DataView]", tl = wn ? wn.prototype : void 0, $a = tl ? tl.valueOf : void 0;
5544
5542
  function sE(n, t, i, r, A, c, g) {
5545
5543
  switch (i) {
5546
5544
  case nE:
@@ -5610,7 +5608,7 @@ function oE(n, t, i, r, A, c) {
5610
5608
  }
5611
5609
  var cE = 1, il = "[object Arguments]", nl = "[object Array]", vr = "[object Object]", lE = Object.prototype, sl = lE.hasOwnProperty;
5612
5610
  function gE(n, t, i, r, A, c) {
5613
- var g = pi(n), u = pi(t), I = g ? nl : fn(n), f = u ? nl : fn(t);
5611
+ var g = pi(n), u = pi(t), I = g ? nl : Bn(n), f = u ? nl : Bn(t);
5614
5612
  I = I == il ? vr : I, f = f == il ? vr : f;
5615
5613
  var Q = I == vr, y = f == vr, b = I == f;
5616
5614
  if (b && ia(n)) {
@@ -5630,7 +5628,7 @@ function gE(n, t, i, r, A, c) {
5630
5628
  return b ? (c || (c = new Pi()), oE(n, t, i, r, A, c)) : !1;
5631
5629
  }
5632
5630
  function ao(n, t, i, r, A) {
5633
- return n === t ? !0 : n == null || t == null || !wn(n) && !wn(t) ? n !== n && t !== t : gE(n, t, i, r, ao, A);
5631
+ return n === t ? !0 : n == null || t == null || !Sn(n) && !Sn(t) ? n !== n && t !== t : gE(n, t, i, r, ao, A);
5634
5632
  }
5635
5633
  var hE = 1, uE = 2;
5636
5634
  function dE(n, t, i, r) {
@@ -5657,7 +5655,7 @@ function dE(n, t, i, r) {
5657
5655
  return !0;
5658
5656
  }
5659
5657
  function Ch(n) {
5660
- return n === n && !Sn(n);
5658
+ return n === n && !Dn(n);
5661
5659
  }
5662
5660
  function IE(n) {
5663
5661
  for (var t = no(n), i = t.length; i--; ) {
@@ -5746,7 +5744,7 @@ function vA(n, t, i) {
5746
5744
  (i !== void 0 && !Ar(n[t], i) || i === void 0 && !(t in n)) && $A(n, t, i);
5747
5745
  }
5748
5746
  function xE(n) {
5749
- return wn(n) && ps(n);
5747
+ return Sn(n) && ps(n);
5750
5748
  }
5751
5749
  function FA(n, t) {
5752
5750
  if (!(t === "constructor" && typeof n[t] == "function") && t != "__proto__")
@@ -5764,13 +5762,13 @@ function NE(n, t, i, r, A, c, g) {
5764
5762
  var Q = c ? c(u, I, i + "", n, t, g) : void 0, y = Q === void 0;
5765
5763
  if (y) {
5766
5764
  var b = pi(I), D = !b && ia(I), w = !b && !D && io(I);
5767
- Q = I, b || D || w ? pi(u) ? Q = u : xE(u) ? Q = Cf(u) : D ? (y = !1, Q = pB(I)) : w ? (y = !1, Q = MB(I)) : Q = [] : hB(I) || ta(I) ? (Q = u, ta(u) ? Q = RE(u) : (!Sn(u) || zA(u)) && (Q = LB(I))) : y = !1;
5765
+ Q = I, b || D || w ? pi(u) ? Q = u : xE(u) ? Q = Cf(u) : D ? (y = !1, Q = pB(I)) : w ? (y = !1, Q = MB(I)) : Q = [] : hB(I) || ta(I) ? (Q = u, ta(u) ? Q = RE(u) : (!Dn(u) || zA(u)) && (Q = LB(I))) : y = !1;
5768
5766
  }
5769
5767
  y && (g.set(I, Q), A(Q, I, r, c, g), g.delete(I)), vA(n, i, Q);
5770
5768
  }
5771
5769
  function Eh(n, t, i, r, A) {
5772
5770
  n !== t && Bh(t, function(c, g) {
5773
- if (A || (A = new Pi()), Sn(c))
5771
+ if (A || (A = new Pi()), Dn(c))
5774
5772
  NE(n, t, g, i, Eh, r, A);
5775
5773
  else {
5776
5774
  var u = r ? r(FA(n, g), c, g + "", n, t, A) : void 0;
@@ -6754,7 +6752,7 @@ const XE = {
6754
6752
  }), Qi(() => {
6755
6753
  U !== void 0 && window.clearTimeout(U), S !== void 0 && window.clearTimeout(S), ut("mousemove", window, ji, !0), ut("mouseup", window, Wi, !0);
6756
6754
  });
6757
- const gn = Ae(() => {
6755
+ const hn = Ae(() => {
6758
6756
  const {
6759
6757
  common: {
6760
6758
  cubicBezierEaseInOut: X
@@ -6773,7 +6771,7 @@ const XE = {
6773
6771
  }
6774
6772
  } = z.value, {
6775
6773
  top: mi,
6776
- right: Dn,
6774
+ right: vn,
6777
6775
  bottom: ms,
6778
6776
  left: $n
6779
6777
  } = Hs(xt), {
@@ -6782,7 +6780,7 @@ const XE = {
6782
6780
  bottom: ys,
6783
6781
  left: ba
6784
6782
  } = Hs(nt), {
6785
- top: vn,
6783
+ top: Fn,
6786
6784
  right: bs,
6787
6785
  bottom: Fi,
6788
6786
  left: Xi
@@ -6800,14 +6798,14 @@ const XE = {
6800
6798
  "--n-scrollbar-width": At,
6801
6799
  "--n-scrollbar-height": Ye,
6802
6800
  "--n-scrollbar-rail-top-horizontal-top": mi,
6803
- "--n-scrollbar-rail-right-horizontal-top": Dn,
6801
+ "--n-scrollbar-rail-right-horizontal-top": vn,
6804
6802
  "--n-scrollbar-rail-bottom-horizontal-top": ms,
6805
6803
  "--n-scrollbar-rail-left-horizontal-top": $n,
6806
6804
  "--n-scrollbar-rail-top-horizontal-bottom": ma,
6807
6805
  "--n-scrollbar-rail-right-horizontal-bottom": ya,
6808
6806
  "--n-scrollbar-rail-bottom-horizontal-bottom": ys,
6809
6807
  "--n-scrollbar-rail-left-horizontal-bottom": ba,
6810
- "--n-scrollbar-rail-top-vertical-right": vn,
6808
+ "--n-scrollbar-rail-top-vertical-right": Fn,
6811
6809
  "--n-scrollbar-rail-right-vertical-right": bs,
6812
6810
  "--n-scrollbar-rail-bottom-vertical-right": Fi,
6813
6811
  "--n-scrollbar-rail-left-vertical-right": Xi,
@@ -6817,7 +6815,7 @@ const XE = {
6817
6815
  "--n-scrollbar-rail-left-vertical-left": Vt,
6818
6816
  "--n-scrollbar-rail-color": si
6819
6817
  };
6820
- }), vi = i ? Es("scrollbar", void 0, gn, n) : void 0;
6818
+ }), vi = i ? Es("scrollbar", void 0, hn, n) : void 0;
6821
6819
  return Object.assign(Object.assign({}, {
6822
6820
  scrollTo: de,
6823
6821
  scrollBy: Se,
@@ -6848,7 +6846,7 @@ const XE = {
6848
6846
  handleContainerResize: Qe,
6849
6847
  handleYScrollMouseDown: hi,
6850
6848
  handleXScrollMouseDown: ni,
6851
- cssVars: i ? void 0 : gn,
6849
+ cssVars: i ? void 0 : hn,
6852
6850
  themeClass: vi?.themeClass,
6853
6851
  onRender: vi?.onRender
6854
6852
  });
@@ -7957,7 +7955,7 @@ const oo = {
7957
7955
  __popover__: !0,
7958
7956
  setup(n) {
7959
7957
  Ne.env.NODE_ENV !== "production" && Oi(() => {
7960
- n.maxWidth !== void 0 && Gn("popover", "`max-width` is deprecated, please use `style` instead."), n.minWidth !== void 0 && Gn("popover", "`min-width` is deprecated, please use `style` instead."), n.arrow !== void 0 && Gn("popover", "`arrow` is deprecated, please use `showArrow` instead."), n.onHide !== void 0 && Gn("popover", "`on-hide` is deprecated, please use `on-update:show` instead."), n.onShow !== void 0 && Gn("popover", "`on-show` is deprecated, please use `on-update:show` instead.");
7958
+ n.maxWidth !== void 0 && Tn("popover", "`max-width` is deprecated, please use `style` instead."), n.minWidth !== void 0 && Tn("popover", "`min-width` is deprecated, please use `style` instead."), n.arrow !== void 0 && Tn("popover", "`arrow` is deprecated, please use `showArrow` instead."), n.onHide !== void 0 && Tn("popover", "`on-hide` is deprecated, please use `on-update:show` instead."), n.onShow !== void 0 && Tn("popover", "`on-show` is deprecated, please use `on-update:show` instead.");
7961
7959
  });
7962
7960
  const t = KA(), i = V(null), r = Ae(() => n.show), A = V(n.defaultShow), c = YA(r, A), g = Hi(() => n.disabled ? !1 : c.value), u = () => {
7963
7961
  if (n.disabled) return !0;
@@ -8415,7 +8413,7 @@ const Gp = {
8415
8413
  props: Op,
8416
8414
  setup(n) {
8417
8415
  Ne.env.NODE_ENV !== "production" && Oi(() => {
8418
- n.onChange && Gn("checkbox", "`on-change` is deprecated, please use `on-update:checked` instead.");
8416
+ n.onChange && Tn("checkbox", "`on-change` is deprecated, please use `on-update:checked` instead.");
8419
8417
  });
8420
8418
  const t = lt(Tp, null), i = V(null), {
8421
8419
  mergedClsPrefixRef: r,
@@ -9848,7 +9846,7 @@ const AQ = {
9848
9846
  slots: Object,
9849
9847
  setup(n) {
9850
9848
  Ne.env.NODE_ENV !== "production" && Oi(() => {
9851
- n.spinning !== void 0 && Gn("spin", "`spinning` is deprecated, please use `show` instead.");
9849
+ n.spinning !== void 0 && Tn("spin", "`spinning` is deprecated, please use `show` instead.");
9852
9850
  });
9853
9851
  const {
9854
9852
  mergedClsPrefixRef: t,
@@ -10141,7 +10139,7 @@ const xQ = { class: "card-section comment-header" }, RQ = { class: "comment-head
10141
10139
  },
10142
10140
  emits: ["resolve", "reject", "overflow-select"],
10143
10141
  setup(n, { emit: t }) {
10144
- const i = t, r = on(), A = n, { proxy: c } = Ji(), g = c.$superdoc.config.role, u = c.$superdoc.config.isInternal, I = A.comment.creatorEmail === c.$superdoc.config.user.email, f = Object.freeze({
10142
+ const i = t, r = cn(), A = n, { proxy: c } = Ji(), g = c.$superdoc.config.role, u = c.$superdoc.config.isInternal, I = A.comment.creatorEmail === c.$superdoc.config.user.email, f = Object.freeze({
10145
10143
  edit: { label: "Edit", key: "edit" },
10146
10144
  delete: { label: "Delete", key: "delete" }
10147
10145
  }), Q = Ae(() => !(!A.comment || A.comment.resolvedTime || r.pendingComment || A.isPendingInput)), y = Ae(() => !Q.value || A.comment.parentCommentId ? !1 : os(I ? Ot.RESOLVE_OWN : Ot.RESOLVE_OTHER, g, u)), b = Ae(() => !Q.value || !A.comment.trackedChange ? !1 : os(I ? Ot.REJECT_OWN : Ot.REJECT_OTHER, g, u)), D = Ae(() => !(!Q.value || A.comment.trackedChange || A.isPendingInput || w.value.length === 0)), w = Ae(() => {
@@ -10227,7 +10225,7 @@ const xQ = { class: "card-section comment-header" }, RQ = { class: "comment-head
10227
10225
  setup(n, { emit: t }) {
10228
10226
  const i = t;
10229
10227
  Yi();
10230
- const r = on(), { currentCommentText: A } = Ei(r), c = (g) => i("focus", g);
10228
+ const r = cn(), { currentCommentText: A } = Ei(r), c = (g) => i("focus", g);
10231
10229
  return (g, u) => (pe(), ye("div", OQ, [
10232
10230
  n.includeHeader ? (pe(), Ci(Gh, {
10233
10231
  key: 0,
@@ -10291,7 +10289,7 @@ const xQ = { class: "card-section comment-header" }, RQ = { class: "comment-head
10291
10289
  setup(n, { emit: t }) {
10292
10290
  const i = t, r = n, { proxy: A } = Ji();
10293
10291
  A.$superdoc.config.role, r.comment.email;
10294
- const c = Yi(), g = on(), { addComment: u, cancelComment: I, deleteComment: f, removePendingComment: Q } = g, {
10292
+ const c = Yi(), g = cn(), { addComment: u, cancelComment: I, deleteComment: f, removePendingComment: Q } = g, {
10295
10293
  suppressInternalExternal: y,
10296
10294
  getConfig: b,
10297
10295
  activeComment: D,
@@ -10392,7 +10390,7 @@ const xQ = { class: "card-section comment-header" }, RQ = { class: "comment-head
10392
10390
  onSelect: st
10393
10391
  }, null, 8, ["is-disabled", "state"])
10394
10392
  ])) : tt("", !0),
10395
- (pe(!0), ye(qt, null, An(K.value, (Se, _e) => (pe(), ye("div", {
10393
+ (pe(!0), ye(qt, null, on(K.value, (Se, _e) => (pe(), ye("div", {
10396
10394
  key: _e,
10397
10395
  class: "conversation-item"
10398
10396
  }, [
@@ -10488,20 +10486,20 @@ const xQ = { class: "card-section comment-header" }, RQ = { class: "comment-head
10488
10486
  setup(n) {
10489
10487
  const t = n;
10490
10488
  Yi();
10491
- const i = on(), { COMMENT_EVENTS: r } = i, { commentsList: A, getGroupedComments: c, isCommentsListVisible: g } = Ei(i), { proxy: u } = Ji(), I = Ae(() => t.showResolvedComments && c.value?.resolvedComments?.length > 0);
10489
+ const i = cn(), { COMMENT_EVENTS: r } = i, { commentsList: A, getGroupedComments: c, isCommentsListVisible: g } = Ei(i), { proxy: u } = Ji(), I = Ae(() => t.showResolvedComments && c.value?.resolvedComments?.length > 0);
10492
10490
  return li(() => {
10493
10491
  g.value = !0;
10494
10492
  }), Qi(() => {
10495
10493
  g.value = !1;
10496
10494
  }), (f, Q) => (pe(), ye("div", gm, [
10497
10495
  n.showMainComments ? (pe(), ye("div", hm, [
10498
- (pe(!0), ye(qt, null, An(Oe(c).parentComments, (y) => (pe(), ye("div", um, [
10496
+ (pe(!0), ye(qt, null, on(Oe(c).parentComments, (y) => (pe(), ye("div", um, [
10499
10497
  Si(er, { comment: y }, null, 8, ["comment"])
10500
10498
  ]))), 256))
10501
10499
  ])) : tt("", !0),
10502
10500
  I.value ? (pe(), ye("div", dm, [
10503
10501
  Q[0] || (Q[0] = Xe("div", { class: "comment-title" }, "Resolved", -1)),
10504
- (pe(!0), ye(qt, null, An(Oe(c).resolvedComments, (y) => (pe(), ye("div", Im, [
10502
+ (pe(!0), ye(qt, null, on(Oe(c).resolvedComments, (y) => (pe(), ye("div", Im, [
10505
10503
  Si(er, { comment: y }, null, 8, ["comment"])
10506
10504
  ]))), 256))
10507
10505
  ])) : tt("", !0)
@@ -13268,7 +13266,7 @@ var Te = globalThis.pdfjsLib = {};
13268
13266
  ),
13269
13267
  isPdfFile: () => (
13270
13268
  /* reexport */
13271
- gn
13269
+ hn
13272
13270
  ),
13273
13271
  noContextMenu: () => (
13274
13272
  /* reexport */
@@ -14163,7 +14161,7 @@ var Te = globalThis.pdfjsLib = {};
14163
14161
  s++;
14164
14162
  return p.substring(s, s + 5).toLowerCase() === "data:";
14165
14163
  }
14166
- function gn(p) {
14164
+ function hn(p) {
14167
14165
  return typeof p == "string" && /\.pdf$/i.test(p);
14168
14166
  }
14169
14167
  function vi(p) {
@@ -14321,7 +14319,7 @@ var Te = globalThis.pdfjsLib = {};
14321
14319
  }
14322
14320
  a && p.setAttribute("data-main-rotation", e.rotation);
14323
14321
  }
14324
- class Dn {
14322
+ class vn {
14325
14323
  #e = null;
14326
14324
  #t = null;
14327
14325
  #i;
@@ -14331,7 +14329,7 @@ var Te = globalThis.pdfjsLib = {};
14331
14329
  }
14332
14330
  render() {
14333
14331
  const e = this.#e = document.createElement("div");
14334
- e.className = "editToolbar", e.setAttribute("role", "toolbar"), e.addEventListener("contextmenu", Ie), e.addEventListener("pointerdown", Dn.#r);
14332
+ e.className = "editToolbar", e.setAttribute("role", "toolbar"), e.addEventListener("contextmenu", Ie), e.addEventListener("pointerdown", vn.#r);
14335
14333
  const s = this.#s = document.createElement("div");
14336
14334
  s.className = "buttons", e.append(s);
14337
14335
  const a = this.#i.toolbarPosition;
@@ -14585,7 +14583,7 @@ var Te = globalThis.pdfjsLib = {};
14585
14583
  this.#e = null;
14586
14584
  }
14587
14585
  }
14588
- class vn {
14586
+ class Fn {
14589
14587
  constructor(e) {
14590
14588
  this.buffer = [], this.callbacks = /* @__PURE__ */ new Map(), this.allKeys = /* @__PURE__ */ new Set();
14591
14589
  const {
@@ -14713,7 +14711,7 @@ var Te = globalThis.pdfjsLib = {};
14713
14711
  }
14714
14712
  return !0;
14715
14713
  }, o = this.TRANSLATE_SMALL, l = this.TRANSLATE_BIG;
14716
- return K(this, "_keyboardManager", new vn([[["ctrl+a", "mac+meta+a"], e.selectAll, {
14714
+ return K(this, "_keyboardManager", new Fn([[["ctrl+a", "mac+meta+a"], e.selectAll, {
14717
14715
  checker: a
14718
14716
  }], [["ctrl+z", "mac+meta+z"], e.undo, {
14719
14717
  checker: a
@@ -15638,7 +15636,7 @@ var Te = globalThis.pdfjsLib = {};
15638
15636
  static _telemetryTimeout = 1e3;
15639
15637
  static get _resizerKeyboardManager() {
15640
15638
  const e = Le.prototype._resizeWithKeyboard, s = Fi.TRANSLATE_SMALL, a = Fi.TRANSLATE_BIG;
15641
- return K(this, "_resizerKeyboardManager", new vn([[["ArrowLeft", "mac+ArrowLeft"], e, {
15639
+ return K(this, "_resizerKeyboardManager", new Fn([[["ArrowLeft", "mac+ArrowLeft"], e, {
15642
15640
  args: [-s, 0]
15643
15641
  }], [["ctrl+ArrowLeft", "mac+shift+ArrowLeft"], e, {
15644
15642
  args: [-a, 0]
@@ -16012,7 +16010,7 @@ var Te = globalThis.pdfjsLib = {};
16012
16010
  this.#t?.finish();
16013
16011
  }
16014
16012
  async addEditToolbar() {
16015
- return this.#o || this.#d ? this.#o : (this.#o = new Dn(this), this.div.append(this.#o.render()), this.#t && this.#o.addAltTextButton(await this.#t.render()), this.#o);
16013
+ return this.#o || this.#d ? this.#o : (this.#o = new vn(this), this.div.append(this.#o.render()), this.#t && this.#o.addAltTextButton(await this.#t.render()), this.#o);
16016
16014
  }
16017
16015
  removeEditToolbar() {
16018
16016
  this.#o && (this.#o.remove(), this.#o = null, this.#t?.destroy());
@@ -16926,10 +16924,10 @@ var Te = globalThis.pdfjsLib = {};
16926
16924
  }
16927
16925
  let Gt;
16928
16926
  ai < x ? Gt = 0 : ai > ie ? Gt = 1 : Gt = (x - ai) / (x - ie), qe = N - (N - Y) * Gt, fr = oe - (oe - Ue) * Gt, Br = ae - (ae - $e) * Gt, is = Be - (Be - Ke) * Gt;
16929
- const un = Math.round(Math.min($t, qe)), Rs = Math.round(Math.max($t, qe));
16930
- let Rn = m * ai + un * 4;
16931
- for (let ot = un; ot <= Rs; ot++)
16932
- Gt = ($t - ot) / ($t - qe), Gt < 0 ? Gt = 0 : Gt > 1 && (Gt = 1), B[Rn++] = pt - (pt - fr) * Gt | 0, B[Rn++] = Xt - (Xt - Br) * Gt | 0, B[Rn++] = He - (He - is) * Gt | 0, B[Rn++] = 255;
16927
+ const dn = Math.round(Math.min($t, qe)), Rs = Math.round(Math.max($t, qe));
16928
+ let Nn = m * ai + dn * 4;
16929
+ for (let ot = dn; ot <= Rs; ot++)
16930
+ Gt = ($t - ot) / ($t - qe), Gt < 0 ? Gt = 0 : Gt > 1 && (Gt = 1), B[Nn++] = pt - (pt - fr) * Gt | 0, B[Nn++] = Xt - (Xt - Br) * Gt | 0, B[Nn++] = He - (He - is) * Gt | 0, B[Nn++] = 255;
16933
16931
  }
16934
16932
  }
16935
16933
  function iu(p, e, s) {
@@ -18555,7 +18553,7 @@ var Te = globalThis.pdfjsLib = {};
18555
18553
  return this.#e.has(e);
18556
18554
  }
18557
18555
  }
18558
- const hn = Symbol("INTERNAL");
18556
+ const un = Symbol("INTERNAL");
18559
18557
  class Iu {
18560
18558
  #e = !1;
18561
18559
  #t = !1;
@@ -18580,7 +18578,7 @@ var Te = globalThis.pdfjsLib = {};
18580
18578
  return this.#e ? s?.viewState !== "OFF" : this.#t ? e?.printState !== "OFF" : !0;
18581
18579
  }
18582
18580
  _setVisible(e, s, a = !1) {
18583
- e !== hn && G("Internal method `_setVisible` called."), this.#i = a, this.#s = s;
18581
+ e !== un && G("Internal method `_setVisible` called."), this.#i = a, this.#s = s;
18584
18582
  }
18585
18583
  }
18586
18584
  class Cu {
@@ -18595,11 +18593,11 @@ var Te = globalThis.pdfjsLib = {};
18595
18593
  this.#t.set(a.id, new Iu(s, a));
18596
18594
  if (e.baseState === "OFF")
18597
18595
  for (const a of this.#t.values())
18598
- a._setVisible(hn, !1);
18596
+ a._setVisible(un, !1);
18599
18597
  for (const a of e.on)
18600
- this.#t.get(a)._setVisible(hn, !0);
18598
+ this.#t.get(a)._setVisible(un, !0);
18601
18599
  for (const a of e.off)
18602
- this.#t.get(a)._setVisible(hn, !1);
18600
+ this.#t.get(a)._setVisible(un, !1);
18603
18601
  this.#i = this.getHash();
18604
18602
  }
18605
18603
  }
@@ -18687,7 +18685,7 @@ var Te = globalThis.pdfjsLib = {};
18687
18685
  S(`Optional content group not found: ${e}`);
18688
18686
  return;
18689
18687
  }
18690
- a._setVisible(hn, !!s, !0), this.#e = null;
18688
+ a._setVisible(un, !!s, !0), this.#e = null;
18691
18689
  }
18692
18690
  setOCGState({
18693
18691
  state: e,
@@ -18706,13 +18704,13 @@ var Te = globalThis.pdfjsLib = {};
18706
18704
  if (l)
18707
18705
  switch (a) {
18708
18706
  case "ON":
18709
- l._setVisible(hn, !0);
18707
+ l._setVisible(un, !0);
18710
18708
  break;
18711
18709
  case "OFF":
18712
- l._setVisible(hn, !1);
18710
+ l._setVisible(un, !1);
18713
18711
  break;
18714
18712
  case "Toggle":
18715
- l._setVisible(hn, !l.visible);
18713
+ l._setVisible(un, !l.visible);
18716
18714
  break;
18717
18715
  }
18718
18716
  }
@@ -18825,7 +18823,7 @@ var Te = globalThis.pdfjsLib = {};
18825
18823
  }
18826
18824
  class Bu {
18827
18825
  constructor(e, s, a = !1, o = null) {
18828
- this._stream = e, this._done = a || !1, this._filename = gn(o) ? o : null, this._queuedChunks = s || [], this._loaded = 0;
18826
+ this._stream = e, this._done = a || !1, this._filename = hn(o) ? o : null, this._queuedChunks = s || [], this._loaded = 0;
18829
18827
  for (const l of this._queuedChunks)
18830
18828
  this._loaded += l.byteLength;
18831
18829
  this._requests = [], this._headersReady = Promise.resolve(), e._fullRequestReader = this, this.onProgress = null;
@@ -19040,7 +19038,7 @@ var Te = globalThis.pdfjsLib = {};
19040
19038
  s = decodeURIComponent(s);
19041
19039
  } catch {
19042
19040
  }
19043
- if (gn(s))
19041
+ if (hn(s))
19044
19042
  return s;
19045
19043
  }
19046
19044
  return null;
@@ -19986,11 +19984,11 @@ var Te = globalThis.pdfjsLib = {};
19986
19984
  }), is.standardFontDataFactory = new Y({
19987
19985
  baseUrl: j
19988
19986
  })), !B) {
19989
- const un = {
19987
+ const dn = {
19990
19988
  verbosity: m,
19991
19989
  port: Ds.workerPort
19992
19990
  };
19993
- B = un.port ? ui.fromPort(un) : new ui(un), e._worker = B;
19991
+ B = dn.port ? ui.fromPort(dn) : new ui(dn), e._worker = B;
19994
19992
  }
19995
19993
  const ai = {
19996
19994
  docId: s,
@@ -20030,7 +20028,7 @@ var Te = globalThis.pdfjsLib = {};
20030
20028
  throw new Error("Loading aborted");
20031
20029
  if (B.destroyed)
20032
20030
  throw new Error("Worker was destroyed");
20033
- const un = B.messageHandler.sendWithPromise("GetDocRequest", ai, o ? [o.buffer] : null);
20031
+ const dn = B.messageHandler.sendWithPromise("GetDocRequest", ai, o ? [o.buffer] : null);
20034
20032
  let Rs;
20035
20033
  return C ? Rs = new fu(C, {
20036
20034
  disableRange: Ke,
@@ -20045,12 +20043,12 @@ var Te = globalThis.pdfjsLib = {};
20045
20043
  rangeChunkSize: E,
20046
20044
  disableRange: Ke,
20047
20045
  disableStream: vt
20048
- })), un.then((Rn) => {
20046
+ })), dn.then((Nn) => {
20049
20047
  if (e.destroyed)
20050
20048
  throw new Error("Loading aborted");
20051
20049
  if (B.destroyed)
20052
20050
  throw new Error("Worker was destroyed");
20053
- const ot = new vs(s, Rn, B.port), qo = new zu(ot, e, Rs, Gt, is);
20051
+ const ot = new vs(s, Nn, B.port), qo = new zu(ot, e, Rs, Gt, is);
20054
20052
  e._transport = qo, ot.send("Ready", null);
20055
20053
  });
20056
20054
  }).catch(e._capability.reject), e;
@@ -20067,7 +20065,7 @@ var Te = globalThis.pdfjsLib = {};
20067
20065
  throw new Error("Invalid PDF url data: either string or URL-object is expected in the url property.");
20068
20066
  }
20069
20067
  function ju(p) {
20070
- if (n && typeof Pn < "u" && p instanceof Pn)
20068
+ if (n && typeof On < "u" && p instanceof On)
20071
20069
  throw new Error("Please provide binary data as `Uint8Array`, rather than `Buffer`.");
20072
20070
  if (p instanceof Uint8Array && p.byteLength === p.buffer.byteLength)
20073
20071
  return p;
@@ -21476,7 +21474,7 @@ var Te = globalThis.pdfjsLib = {};
21476
21474
  e.div.style.transform = s, e.div.hidden = !1;
21477
21475
  }
21478
21476
  }
21479
- const xs = 1e3, td = 9, Fn = /* @__PURE__ */ new WeakSet();
21477
+ const xs = 1e3, td = 9, kn = /* @__PURE__ */ new WeakSet();
21480
21478
  function zi(p) {
21481
21479
  return {
21482
21480
  width: p[2] - p[0],
@@ -21501,7 +21499,7 @@ var Te = globalThis.pdfjsLib = {};
21501
21499
  case "Sig":
21502
21500
  return new rd(e);
21503
21501
  }
21504
- return new kn(e);
21502
+ return new xn(e);
21505
21503
  case D.POPUP:
21506
21504
  return new Ua(e);
21507
21505
  case D.FREETEXT:
@@ -21607,7 +21605,7 @@ var Te = globalThis.pdfjsLib = {};
21607
21605
  viewport: o
21608
21606
  }
21609
21607
  } = this, l = document.createElement("section");
21610
- l.setAttribute("data-annotation-id", s.id), this instanceof kn || (l.tabIndex = xs);
21608
+ l.setAttribute("data-annotation-id", s.id), this instanceof xn || (l.tabIndex = xs);
21611
21609
  const {
21612
21610
  style: h
21613
21611
  } = l;
@@ -21862,7 +21860,7 @@ var Te = globalThis.pdfjsLib = {};
21862
21860
  if (l === -1 || h === s)
21863
21861
  continue;
21864
21862
  const C = typeof d == "string" ? d : null, E = document.querySelector(`[data-element-id="${h}"]`);
21865
- if (E && !Fn.has(E)) {
21863
+ if (E && !kn.has(E)) {
21866
21864
  S(`_getElementsByName - element not allowed: ${h}`);
21867
21865
  continue;
21868
21866
  }
@@ -21878,7 +21876,7 @@ var Te = globalThis.pdfjsLib = {};
21878
21876
  const {
21879
21877
  exportValue: l
21880
21878
  } = o, h = o.getAttribute("data-element-id");
21881
- h !== s && Fn.has(o) && a.push({
21879
+ h !== s && kn.has(o) && a.push({
21882
21880
  id: h,
21883
21881
  exportValue: l,
21884
21882
  domElement: o
@@ -22033,7 +22031,7 @@ var Te = globalThis.pdfjsLib = {};
22033
22031
  }
22034
22032
  const v = document.querySelector(`[data-element-id="${m}"]`);
22035
22033
  if (v) {
22036
- if (!Fn.has(v)) {
22034
+ if (!kn.has(v)) {
22037
22035
  S(`_bindResetFormAction - element not allowed: ${m}`);
22038
22036
  continue;
22039
22037
  }
@@ -22065,7 +22063,7 @@ var Te = globalThis.pdfjsLib = {};
22065
22063
  })), !this.data.popupRef && this.hasPopupData && this._createPopup(), this.container.append(e), this.container;
22066
22064
  }
22067
22065
  }
22068
- class kn extends Et {
22066
+ class xn extends Et {
22069
22067
  render() {
22070
22068
  return this.container;
22071
22069
  }
@@ -22136,7 +22134,7 @@ var Te = globalThis.pdfjsLib = {};
22136
22134
  s ? e.setAttribute("required", !0) : e.removeAttribute("required"), e.setAttribute("aria-required", s);
22137
22135
  }
22138
22136
  }
22139
- class sd extends kn {
22137
+ class sd extends xn {
22140
22138
  constructor(e) {
22141
22139
  const s = e.renderForms || e.data.hasOwnCanvas || !e.data.hasAppearance && !!e.data.fieldValue;
22142
22140
  super(e, {
@@ -22173,7 +22171,7 @@ var Te = globalThis.pdfjsLib = {};
22173
22171
  commitKey: 1,
22174
22172
  focused: !1
22175
22173
  };
22176
- this.data.multiLine ? (a = document.createElement("textarea"), a.textContent = d ?? l, this.data.doNotScroll && (a.style.overflowY = "hidden")) : (a = document.createElement("input"), a.type = "text", a.setAttribute("value", d ?? l), this.data.doNotScroll && (a.style.overflowX = "hidden")), this.data.hasOwnCanvas && (a.hidden = !0), Fn.add(a), a.setAttribute("data-element-id", s), a.disabled = this.data.readOnly, a.name = this.data.fieldName, a.tabIndex = xs, this._setRequired(a, this.data.required), h && (a.maxLength = h), a.addEventListener("input", (B) => {
22174
+ this.data.multiLine ? (a = document.createElement("textarea"), a.textContent = d ?? l, this.data.doNotScroll && (a.style.overflowY = "hidden")) : (a = document.createElement("input"), a.type = "text", a.setAttribute("value", d ?? l), this.data.doNotScroll && (a.style.overflowX = "hidden")), this.data.hasOwnCanvas && (a.hidden = !0), kn.add(a), a.setAttribute("data-element-id", s), a.disabled = this.data.readOnly, a.name = this.data.fieldName, a.tabIndex = xs, this._setRequired(a, this.data.required), h && (a.maxLength = h), a.addEventListener("input", (B) => {
22177
22175
  e.setValue(s, {
22178
22176
  value: B.target.value
22179
22177
  }), this.setPropertyOnSiblings(a, "value", B.target.value, "value"), C.formattedValue = null;
@@ -22336,14 +22334,14 @@ var Te = globalThis.pdfjsLib = {};
22336
22334
  return this._setTextStyle(a), this._setBackgroundColor(a), this._setDefaultPropertiesFromJS(a), this.container.append(a), this.container;
22337
22335
  }
22338
22336
  }
22339
- class rd extends kn {
22337
+ class rd extends xn {
22340
22338
  constructor(e) {
22341
22339
  super(e, {
22342
22340
  isRenderable: !!e.data.hasOwnCanvas
22343
22341
  });
22344
22342
  }
22345
22343
  }
22346
- class ad extends kn {
22344
+ class ad extends xn {
22347
22345
  constructor(e) {
22348
22346
  super(e, {
22349
22347
  isRenderable: e.renderForms
@@ -22358,7 +22356,7 @@ var Te = globalThis.pdfjsLib = {};
22358
22356
  value: o
22359
22357
  })), this.container.classList.add("buttonWidgetAnnotation", "checkBox");
22360
22358
  const l = document.createElement("input");
22361
- return Fn.add(l), l.setAttribute("data-element-id", a), l.disabled = s.readOnly, this._setRequired(l, this.data.required), l.type = "checkbox", l.name = s.fieldName, o && l.setAttribute("checked", !0), l.setAttribute("exportValue", s.exportValue), l.tabIndex = xs, l.addEventListener("change", (h) => {
22359
+ return kn.add(l), l.setAttribute("data-element-id", a), l.disabled = s.readOnly, this._setRequired(l, this.data.required), l.type = "checkbox", l.name = s.fieldName, o && l.setAttribute("checked", !0), l.setAttribute("exportValue", s.exportValue), l.tabIndex = xs, l.addEventListener("change", (h) => {
22362
22360
  const {
22363
22361
  name: d,
22364
22362
  checked: C
@@ -22387,7 +22385,7 @@ var Te = globalThis.pdfjsLib = {};
22387
22385
  }), this._setEventListeners(l, null, [["change", "Validate"], ["change", "Action"], ["focus", "Focus"], ["blur", "Blur"], ["mousedown", "Mouse Down"], ["mouseenter", "Mouse Enter"], ["mouseleave", "Mouse Exit"], ["mouseup", "Mouse Up"]], (h) => h.target.checked)), this._setBackgroundColor(l), this._setDefaultPropertiesFromJS(l), this.container.append(l), this.container;
22388
22386
  }
22389
22387
  }
22390
- class Po extends kn {
22388
+ class Po extends xn {
22391
22389
  constructor(e) {
22392
22390
  super(e, {
22393
22391
  isRenderable: e.renderForms
@@ -22407,7 +22405,7 @@ var Te = globalThis.pdfjsLib = {};
22407
22405
  value: !1
22408
22406
  });
22409
22407
  const l = document.createElement("input");
22410
- if (Fn.add(l), l.setAttribute("data-element-id", a), l.disabled = s.readOnly, this._setRequired(l, this.data.required), l.type = "radio", l.name = s.fieldName, o && l.setAttribute("checked", !0), l.tabIndex = xs, l.addEventListener("change", (h) => {
22408
+ if (kn.add(l), l.setAttribute("data-element-id", a), l.disabled = s.readOnly, this._setRequired(l, this.data.required), l.type = "radio", l.name = s.fieldName, o && l.setAttribute("checked", !0), l.tabIndex = xs, l.addEventListener("change", (h) => {
22411
22409
  const {
22412
22410
  name: d,
22413
22411
  checked: C
@@ -22457,7 +22455,7 @@ var Te = globalThis.pdfjsLib = {};
22457
22455
  })), e;
22458
22456
  }
22459
22457
  }
22460
- class od extends kn {
22458
+ class od extends xn {
22461
22459
  constructor(e) {
22462
22460
  super(e, {
22463
22461
  isRenderable: e.renderForms
@@ -22468,7 +22466,7 @@ var Te = globalThis.pdfjsLib = {};
22468
22466
  const e = this.annotationStorage, s = this.data.id, a = e.getValue(s, {
22469
22467
  value: this.data.fieldValue
22470
22468
  }), o = document.createElement("select");
22471
- Fn.add(o), o.setAttribute("data-element-id", s), o.disabled = this.data.readOnly, this._setRequired(o, this.data.required), o.name = this.data.fieldName, o.tabIndex = xs;
22469
+ kn.add(o), o.setAttribute("data-element-id", s), o.disabled = this.data.readOnly, this._setRequired(o, this.data.required), o.name = this.data.fieldName, o.tabIndex = xs;
22472
22470
  let l = this.data.combo && this.data.options.length > 0;
22473
22471
  this.data.combo || (o.size = this.data.options.length, this.data.multiSelect && (o.multiple = !0)), o.addEventListener("resetform", (B) => {
22474
22472
  const m = this.data.defaultFieldValue;
@@ -23203,7 +23201,7 @@ var Te = globalThis.pdfjsLib = {};
23203
23201
  static _defaultFontSize = 10;
23204
23202
  static get _keyboardManager() {
23205
23203
  const e = Dt.prototype, s = (l) => l.isEmpty(), a = Fi.TRANSLATE_SMALL, o = Fi.TRANSLATE_BIG;
23206
- return K(this, "_keyboardManager", new vn([[["ctrl+s", "mac+meta+s", "ctrl+p", "mac+meta+p"], e.commitOrRemove, {
23204
+ return K(this, "_keyboardManager", new Fn([[["ctrl+s", "mac+meta+s", "ctrl+p", "mac+meta+p"], e.commitOrRemove, {
23207
23205
  bubbles: !0
23208
23206
  }], [["ctrl+Enter", "mac+meta+Enter", "Escape", "mac+Escape"], e.commitOrRemove], [["ArrowLeft", "mac+ArrowLeft"], e._translateEmpty, {
23209
23207
  args: [-a, 0],
@@ -23795,7 +23793,7 @@ var Te = globalThis.pdfjsLib = {};
23795
23793
  return this.#e;
23796
23794
  }
23797
23795
  }
23798
- class xn {
23796
+ class Rn {
23799
23797
  #e;
23800
23798
  #t = [];
23801
23799
  #i;
@@ -23811,12 +23809,12 @@ var Te = globalThis.pdfjsLib = {};
23811
23809
  #A = [];
23812
23810
  static #d = 8;
23813
23811
  static #I = 2;
23814
- static #u = xn.#d + xn.#I;
23812
+ static #u = Rn.#d + Rn.#I;
23815
23813
  constructor({
23816
23814
  x: e,
23817
23815
  y: s
23818
23816
  }, a, o, l, h, d = 0) {
23819
- this.#e = a, this.#g = l * o, this.#s = h, this.#n.set([NaN, NaN, NaN, NaN, e, s], 6), this.#i = d, this.#c = xn.#d * o, this.#o = xn.#u * o, this.#h = o, this.#A.push(e, s);
23817
+ this.#e = a, this.#g = l * o, this.#s = h, this.#n.set([NaN, NaN, NaN, NaN, e, s], 6), this.#i = d, this.#c = Rn.#d * o, this.#o = Rn.#u * o, this.#h = o, this.#A.push(e, s);
23820
23818
  }
23821
23819
  get free() {
23822
23820
  return !0;
@@ -23987,7 +23985,7 @@ var Te = globalThis.pdfjsLib = {};
23987
23985
  y: o,
23988
23986
  width: l,
23989
23987
  height: h
23990
- } = this.#t, [d, C, E, B] = this.#e, m = l * E, v = h * B, N = a * E + d, x = o * B + C, _ = new xn({
23988
+ } = this.#t, [d, C, E, B] = this.#e, m = l * E, v = h * B, N = a * E + d, x = o * B + C, _ = new Rn({
23991
23989
  x: this.#r[0] * m + N,
23992
23990
  y: this.#r[1] * v + x
23993
23991
  }, this.#e, this.#n, e, this.#s, s ?? this.#i);
@@ -24013,7 +24011,7 @@ var Te = globalThis.pdfjsLib = {};
24013
24011
  #h = null;
24014
24012
  #g;
24015
24013
  static get _keyboardManager() {
24016
- return K(this, "_keyboardManager", new vn([[["Escape", "mac+Escape"], Ni.prototype._hideDropdownFromKeyboard], [[" ", "mac+ "], Ni.prototype._colorSelectFromKeyboard], [["ArrowDown", "ArrowRight", "mac+ArrowDown", "mac+ArrowRight"], Ni.prototype._moveToNext], [["ArrowUp", "ArrowLeft", "mac+ArrowUp", "mac+ArrowLeft"], Ni.prototype._moveToPrevious], [["Home", "mac+Home"], Ni.prototype._moveToBeginning], [["End", "mac+End"], Ni.prototype._moveToEnd]]));
24014
+ return K(this, "_keyboardManager", new Fn([[["Escape", "mac+Escape"], Ni.prototype._hideDropdownFromKeyboard], [[" ", "mac+ "], Ni.prototype._colorSelectFromKeyboard], [["ArrowDown", "ArrowRight", "mac+ArrowDown", "mac+ArrowRight"], Ni.prototype._moveToNext], [["ArrowUp", "ArrowLeft", "mac+ArrowUp", "mac+ArrowLeft"], Ni.prototype._moveToPrevious], [["Home", "mac+Home"], Ni.prototype._moveToBeginning], [["End", "mac+End"], Ni.prototype._moveToEnd]]));
24017
24015
  }
24018
24016
  constructor({
24019
24017
  editor: e = null,
@@ -24167,7 +24165,7 @@ var Te = globalThis.pdfjsLib = {};
24167
24165
  static _freeHighlightClipId = "";
24168
24166
  static get _keyboardManager() {
24169
24167
  const e = mt.prototype;
24170
- return K(this, "_keyboardManager", new vn([[["ArrowLeft", "mac+ArrowLeft"], e._moveCaret, {
24168
+ return K(this, "_keyboardManager", new Fn([[["ArrowLeft", "mac+ArrowLeft"], e._moveCaret, {
24171
24169
  args: [0]
24172
24170
  }], [["ArrowRight", "mac+ArrowRight"], e._moveCaret, {
24173
24171
  args: [1]
@@ -24516,7 +24514,7 @@ var Te = globalThis.pdfjsLib = {};
24516
24514
  }, N = (x) => {
24517
24515
  a.removeEventListener("pointermove", B), window.removeEventListener("blur", N), window.removeEventListener("pointerup", N), window.removeEventListener("pointerdown", v, m), window.removeEventListener("contextmenu", Ie), this.#M(e, x);
24518
24516
  };
24519
- window.addEventListener("blur", N), window.addEventListener("pointerup", N), window.addEventListener("pointerdown", v, m), window.addEventListener("contextmenu", Ie), a.addEventListener("pointermove", B), this._freeHighlight = new xn({
24517
+ window.addEventListener("blur", N), window.addEventListener("pointerup", N), window.addEventListener("pointerdown", v, m), window.addEventListener("contextmenu", Ie), a.addEventListener("pointermove", B), this._freeHighlight = new Rn({
24520
24518
  x: o,
24521
24519
  y: l
24522
24520
  }, [h, d, C, E], e.scale, this._defaultThickness / 2, s, 1e-3), {
@@ -25893,15 +25891,15 @@ Ks.d(It, {
25893
25891
  ),
25894
25892
  FindState: () => (
25895
25893
  /* reexport */
25896
- In
25894
+ Cn
25897
25895
  ),
25898
25896
  GenericL10n: () => (
25899
25897
  /* reexport */
25900
- rn
25898
+ an
25901
25899
  ),
25902
25900
  LinkTarget: () => (
25903
25901
  /* reexport */
25904
- Mn
25902
+ Ln
25905
25903
  ),
25906
25904
  PDFFindController: () => (
25907
25905
  /* reexport */
@@ -26264,7 +26262,7 @@ let Ql;
26264
26262
  function qm() {
26265
26263
  return Ql ||= " ¨ª¯²-µ¸-º¼-¾IJ-ijĿ-ŀʼnſDŽ-njDZ-dzʰ-ʸ˘-˝ˠ-ˤʹͺ;΄-΅·ϐ-ϖϰ-ϲϴ-ϵϹևٵ-ٸक़-य़ড়-ঢ়য়ਲ਼ਸ਼ਖ਼-ਜ਼ਫ਼ଡ଼-ଢ଼ำຳໜ-ໝ༌གྷཌྷདྷབྷཛྷཀྵჼᴬ-ᴮᴰ-ᴺᴼ-ᵍᵏ-ᵪᵸᶛ-ᶿẚ-ẛάέήίόύώΆ᾽-῁ΈΉ῍-῏ΐΊ῝-῟ΰΎ῭-`ΌΏ´-῾ - ‑‗․-… ″-‴‶-‷‼‾⁇-⁉⁗ ⁰-ⁱ⁴-₎ₐ-ₜ₨℀-℃℅-ℇ℉-ℓℕ-№ℙ-ℝ℠-™ℤΩℨK-ℭℯ-ℱℳ-ℹ℻-⅀ⅅ-ⅉ⅐-ⅿ↉∬-∭∯-∰〈-〉①-⓪⨌⩴-⩶⫝̸ⱼ-ⱽⵯ⺟⻳⼀-⿕ 〶〸-〺゛-゜ゟヿㄱ-ㆎ㆒-㆟㈀-㈞㈠-㉇㉐-㉾㊀-㏿ꚜ-ꚝꝰꟲ-ꟴꟸ-ꟹꭜ-ꭟꭩ豈-嗀塚晴凞-羽蘒諸逸-都飯-舘並-龎ff-stﬓ-ﬗיִײַ-זּטּ-לּמּנּ-סּףּ-פּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-﷼︐-︙︰-﹄﹇-﹒﹔-﹦﹨-﹫ﹰ-ﹲﹴﹶ-ﻼ!-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ¢-₩", Ql;
26266
26264
  }
26267
- const In = {
26265
+ const Cn = {
26268
26266
  FOUND: 0,
26269
26267
  NOT_FOUND: 1,
26270
26268
  WRAPPED: 2,
@@ -26406,7 +26404,7 @@ class n2 {
26406
26404
  const i = this._pdfDocument, {
26407
26405
  type: r
26408
26406
  } = t;
26409
- (this.#e === null || this.#a(t)) && (this._dirtyMatch = !0), this.#e = t, r !== "highlightallchange" && this.#w(In.PENDING), this._firstPageCapability.promise.then(() => {
26407
+ (this.#e === null || this.#a(t)) && (this._dirtyMatch = !0), this.#e = t, r !== "highlightallchange" && this.#w(Cn.PENDING), this._firstPageCapability.promise.then(() => {
26410
26408
  if (!this._pdfDocument || i && this._pdfDocument !== i)
26411
26409
  return;
26412
26410
  this.#g();
@@ -26568,7 +26566,7 @@ class n2 {
26568
26566
  }));
26569
26567
  }
26570
26568
  if (this.#n.length === 0) {
26571
- this.#w(In.FOUND);
26569
+ this.#w(Cn.FOUND);
26572
26570
  return;
26573
26571
  }
26574
26572
  if (this._resumePageIdx)
@@ -26604,18 +26602,18 @@ class n2 {
26604
26602
  i.pageIdx = t ? i.pageIdx - 1 : i.pageIdx + 1, i.matchIdx = null, this._pagesToSearch--, (i.pageIdx >= r || i.pageIdx < 0) && (i.pageIdx = t ? r - 1 : 0, i.wrapped = !0);
26605
26603
  }
26606
26604
  #B(t = !1) {
26607
- let i = In.NOT_FOUND;
26605
+ let i = Cn.NOT_FOUND;
26608
26606
  const r = this._offset.wrapped;
26609
26607
  if (this._offset.wrapped = !1, t) {
26610
26608
  const A = this._selected.pageIdx;
26611
- this._selected.pageIdx = this._offset.pageIdx, this._selected.matchIdx = this._offset.matchIdx, i = r ? In.WRAPPED : In.FOUND, A !== -1 && A !== this._selected.pageIdx && this.#A(A);
26609
+ this._selected.pageIdx = this._offset.pageIdx, this._selected.matchIdx = this._offset.matchIdx, i = r ? Cn.WRAPPED : Cn.FOUND, A !== -1 && A !== this._selected.pageIdx && this.#A(A);
26612
26610
  }
26613
26611
  this.#w(i, this.#e.findPrevious), this._selected.pageIdx !== -1 && (this._scrollMatches = !0, this.#A(this._selected.pageIdx));
26614
26612
  }
26615
26613
  #p(t) {
26616
26614
  const i = this._pdfDocument;
26617
26615
  this._firstPageCapability.promise.then(() => {
26618
- !this._pdfDocument || i && this._pdfDocument !== i || (this._findTimeout && (clearTimeout(this._findTimeout), this._findTimeout = null), this._resumePageIdx && (this._resumePageIdx = null, this._dirtyMatch = !0), this.#w(In.FOUND), this._highlightMatches = !1, this.#d());
26616
+ !this._pdfDocument || i && this._pdfDocument !== i || (this._findTimeout && (clearTimeout(this._findTimeout), this._findTimeout = null), this._resumePageIdx && (this._resumePageIdx = null, this._dirtyMatch = !0), this.#w(Cn.FOUND), this._highlightMatches = !1, this.#d());
26619
26617
  });
26620
26618
  }
26621
26619
  #b() {
@@ -26641,7 +26639,7 @@ class n2 {
26641
26639
  });
26642
26640
  }
26643
26641
  #w(t, i = !1) {
26644
- !this.#t && (this.#i !== this._linkService.pagesCount || t === In.PENDING) || this._eventBus.dispatch("updatefindcontrolstate", {
26642
+ !this.#t && (this.#i !== this._linkService.pagesCount || t === Cn.PENDING) || this._eventBus.dispatch("updatefindcontrolstate", {
26645
26643
  source: this,
26646
26644
  state: t,
26647
26645
  previous: i,
@@ -26650,7 +26648,7 @@ class n2 {
26650
26648
  });
26651
26649
  }
26652
26650
  }
26653
- const s2 = "noopener noreferrer nofollow", Mn = {
26651
+ const s2 = "noopener noreferrer nofollow", Ln = {
26654
26652
  NONE: 0,
26655
26653
  SELF: 1,
26656
26654
  BLANK: 2,
@@ -26741,22 +26739,22 @@ class pa {
26741
26739
  addLinkAttributes(t, i, r = !1) {
26742
26740
  if (!i || typeof i != "string")
26743
26741
  throw new Error('A valid "url" parameter must provided.');
26744
- const A = r ? Mn.BLANK : this.externalLinkTarget, c = this.externalLinkRel;
26742
+ const A = r ? Ln.BLANK : this.externalLinkTarget, c = this.externalLinkRel;
26745
26743
  this.externalLinkEnabled ? t.href = t.title = i : (t.href = "", t.title = `Disabled: ${i}`, t.onclick = () => !1);
26746
26744
  let g = "";
26747
26745
  switch (A) {
26748
- case Mn.NONE:
26746
+ case Ln.NONE:
26749
26747
  break;
26750
- case Mn.SELF:
26748
+ case Ln.SELF:
26751
26749
  g = "_self";
26752
26750
  break;
26753
- case Mn.BLANK:
26751
+ case Ln.BLANK:
26754
26752
  g = "_blank";
26755
26753
  break;
26756
- case Mn.PARENT:
26754
+ case Ln.PARENT:
26757
26755
  g = "_parent";
26758
26756
  break;
26759
- case Mn.TOP:
26757
+ case Ln.TOP:
26760
26758
  g = "_top";
26761
26759
  break;
26762
26760
  }
@@ -26900,7 +26898,7 @@ const {
26900
26898
  AbortException: r2,
26901
26899
  AnnotationEditorLayer: a2,
26902
26900
  AnnotationEditorParamsType: My,
26903
- AnnotationEditorType: Bn,
26901
+ AnnotationEditorType: En,
26904
26902
  AnnotationEditorUIManager: A2,
26905
26903
  AnnotationLayer: o2,
26906
26904
  AnnotationMode: sn,
@@ -27170,7 +27168,7 @@ class St extends Qa {
27170
27168
  return `{${this.value}}`;
27171
27169
  }
27172
27170
  }
27173
- class an extends Qa {
27171
+ class An extends Qa {
27174
27172
  constructor(t, i = {}) {
27175
27173
  super(t), this.opts = i;
27176
27174
  }
@@ -27196,9 +27194,9 @@ class _s extends Qa {
27196
27194
  }
27197
27195
  const kl = 100, B2 = "⁨", E2 = "⁩";
27198
27196
  function p2(n, t, i) {
27199
- if (i === t || i instanceof an && t instanceof an && i.value === t.value)
27197
+ if (i === t || i instanceof An && t instanceof An && i.value === t.value)
27200
27198
  return !0;
27201
- if (t instanceof an && typeof i == "string") {
27199
+ if (t instanceof An && typeof i == "string") {
27202
27200
  let r = n.memoizeIntlObject(Intl.PluralRules, t.opts).select(t.value);
27203
27201
  if (i === r)
27204
27202
  return !0;
@@ -27222,7 +27220,7 @@ function ir(n, t) {
27222
27220
  case "str":
27223
27221
  return t.value;
27224
27222
  case "num":
27225
- return new an(t.value, {
27223
+ return new An(t.value, {
27226
27224
  minimumFractionDigits: t.precision
27227
27225
  });
27228
27226
  case "var":
@@ -27258,7 +27256,7 @@ function Q2(n, {
27258
27256
  case "string":
27259
27257
  return i;
27260
27258
  case "number":
27261
- return new an(i);
27259
+ return new An(i);
27262
27260
  case "object":
27263
27261
  if (i instanceof Date)
27264
27262
  return new _s(i.getTime());
@@ -27377,13 +27375,13 @@ function D2(n, t) {
27377
27375
  let i = n[0];
27378
27376
  if (i instanceof St)
27379
27377
  return new St(`NUMBER(${i.valueOf()})`);
27380
- if (i instanceof an)
27381
- return new an(i.valueOf(), {
27378
+ if (i instanceof An)
27379
+ return new An(i.valueOf(), {
27382
27380
  ...i.opts,
27383
27381
  ...oa(t, Rl)
27384
27382
  });
27385
27383
  if (i instanceof _s)
27386
- return new an(i.valueOf(), {
27384
+ return new An(i.valueOf(), {
27387
27385
  ...oa(t, Rl)
27388
27386
  });
27389
27387
  throw new TypeError("Invalid argument to NUMBER");
@@ -27398,7 +27396,7 @@ function v2(n, t) {
27398
27396
  ...i.opts,
27399
27397
  ...oa(t, Nl)
27400
27398
  });
27401
- if (i instanceof an)
27399
+ if (i instanceof An)
27402
27400
  return new _s(i.valueOf(), {
27403
27401
  ...oa(t, Nl)
27404
27402
  });
@@ -27972,7 +27970,7 @@ function A9(n, t, i, r) {
27972
27970
  c.add(g);
27973
27971
  }), c;
27974
27972
  }
27975
- const Ln = "data-l10n-id", Ls = "data-l10n-args", o9 = `[${Ln}]`;
27973
+ const Gn = "data-l10n-id", Ls = "data-l10n-args", o9 = `[${Gn}]`;
27976
27974
  class c9 extends s9 {
27977
27975
  constructor(t, i) {
27978
27976
  super(t, i), this.roots = /* @__PURE__ */ new Set(), this.pendingrAF = null, this.pendingElements = /* @__PURE__ */ new Set(), this.windowElement = null, this.mutationObserver = null, this.observerConfig = {
@@ -27980,18 +27978,18 @@ class c9 extends s9 {
27980
27978
  characterData: !1,
27981
27979
  childList: !0,
27982
27980
  subtree: !0,
27983
- attributeFilter: [Ln, Ls]
27981
+ attributeFilter: [Gn, Ls]
27984
27982
  };
27985
27983
  }
27986
27984
  onChange(t = !1) {
27987
27985
  super.onChange(t), this.roots && this.translateRoots();
27988
27986
  }
27989
27987
  setAttributes(t, i, r) {
27990
- return t.setAttribute(Ln, i), r ? t.setAttribute(Ls, JSON.stringify(r)) : t.removeAttribute(Ls), t;
27988
+ return t.setAttribute(Gn, i), r ? t.setAttribute(Ls, JSON.stringify(r)) : t.removeAttribute(Ls), t;
27991
27989
  }
27992
27990
  getAttributes(t) {
27993
27991
  return {
27994
- id: t.getAttribute(Ln),
27992
+ id: t.getAttribute(Gn),
27995
27993
  args: JSON.parse(t.getAttribute(Ls) || null)
27996
27994
  };
27997
27995
  }
@@ -28034,7 +28032,7 @@ class c9 extends s9 {
28034
28032
  if (r.childElementCount)
28035
28033
  for (const A of this.getTranslatables(r))
28036
28034
  this.pendingElements.add(A);
28037
- else r.hasAttribute(Ln) && this.pendingElements.add(r);
28035
+ else r.hasAttribute(Gn) && this.pendingElements.add(r);
28038
28036
  break;
28039
28037
  }
28040
28038
  this.pendingElements.size > 0 && this.pendingrAF === null && (this.pendingrAF = this.windowElement.requestAnimationFrame(() => {
@@ -28058,11 +28056,11 @@ class c9 extends s9 {
28058
28056
  }
28059
28057
  getTranslatables(t) {
28060
28058
  const i = Array.from(t.querySelectorAll(o9));
28061
- return typeof t.hasAttribute == "function" && t.hasAttribute(Ln) && i.push(t), i;
28059
+ return typeof t.hasAttribute == "function" && t.hasAttribute(Gn) && i.push(t), i;
28062
28060
  }
28063
28061
  getKeysForElement(t) {
28064
28062
  return {
28065
- id: t.getAttribute(Ln),
28063
+ id: t.getAttribute(Gn),
28066
28064
  args: JSON.parse(t.getAttribute(Ls) || null)
28067
28065
  };
28068
28066
  }
@@ -28133,12 +28131,12 @@ function Yl(n, t) {
28133
28131
  const i = new q2(t), r = new k2(n), A = r.addResource(i);
28134
28132
  return A.length && console.error("L10n errors", A), r;
28135
28133
  }
28136
- class rn extends ca {
28134
+ class an extends ca {
28137
28135
  constructor(t) {
28138
28136
  super({
28139
28137
  lang: t
28140
28138
  });
28141
- const i = t ? rn.#e.bind(rn, "en-us", this.getLanguage()) : rn.#s.bind(rn, this.getLanguage());
28139
+ const i = t ? an.#e.bind(an, "en-us", this.getLanguage()) : an.#s.bind(an, this.getLanguage());
28142
28140
  this._setL10n(new c9([], i));
28143
28141
  }
28144
28142
  static async *#e(t, i) {
@@ -28748,7 +28746,7 @@ class C9 {
28748
28746
  #s = null;
28749
28747
  #r;
28750
28748
  constructor(t) {
28751
- this.pdfPage = t.pdfPage, this.accessibilityManager = t.accessibilityManager, this.l10n = t.l10n, this.l10n ||= new rn(), this.annotationEditorLayer = null, this.div = null, this._cancelled = !1, this.#r = t.uiManager, this.#e = t.annotationLayer || null, this.#s = t.textLayer || null, this.#t = t.drawLayer || null, this.#i = t.onAppend || null;
28749
+ this.pdfPage = t.pdfPage, this.accessibilityManager = t.accessibilityManager, this.l10n = t.l10n, this.l10n ||= new an(), this.annotationEditorLayer = null, this.div = null, this._cancelled = !1, this.#r = t.uiManager, this.#e = t.annotationLayer || null, this.#s = t.textLayer || null, this.#t = t.drawLayer || null, this.#i = t.onAppend || null;
28752
28750
  }
28753
28751
  async render(t, i = "display") {
28754
28752
  if (i !== "display" || this._cancelled)
@@ -28805,7 +28803,7 @@ const le = {
28805
28803
  API: 4,
28806
28804
  WORKER: 8,
28807
28805
  PREFERENCE: 128
28808
- }, mn = {
28806
+ }, yn = {
28809
28807
  canvasMaxAreaInBytes: {
28810
28808
  value: -1,
28811
28809
  kind: le.BROWSER + le.API
@@ -29035,61 +29033,61 @@ const le = {
29035
29033
  kind: le.WORKER
29036
29034
  }
29037
29035
  };
29038
- mn.defaultUrl = {
29036
+ yn.defaultUrl = {
29039
29037
  value: "compressed.tracemonkey-pldi-09.pdf",
29040
29038
  kind: le.VIEWER
29041
- }, mn.sandboxBundleSrc = {
29039
+ }, yn.sandboxBundleSrc = {
29042
29040
  value: "../build/pdf.sandbox.mjs",
29043
29041
  kind: le.VIEWER
29044
- }, mn.viewerCssTheme = {
29042
+ }, yn.viewerCssTheme = {
29045
29043
  value: 0,
29046
29044
  kind: le.VIEWER + le.PREFERENCE
29047
29045
  };
29048
- mn.disablePreferences = {
29046
+ yn.disablePreferences = {
29049
29047
  value: !1,
29050
29048
  kind: le.VIEWER
29051
- }, mn.locale = {
29049
+ }, yn.locale = {
29052
29050
  value: navigator.language || "en-US",
29053
29051
  kind: le.VIEWER
29054
29052
  };
29055
- const Cn = /* @__PURE__ */ Object.create(null);
29053
+ const fn = /* @__PURE__ */ Object.create(null);
29056
29054
  for (const n in nr)
29057
- Cn[n] = nr[n];
29055
+ fn[n] = nr[n];
29058
29056
  class f9 {
29059
29057
  constructor() {
29060
29058
  throw new Error("Cannot initialize AppOptions.");
29061
29059
  }
29062
29060
  static get(t) {
29063
- return Cn[t] ?? mn[t]?.value ?? void 0;
29061
+ return fn[t] ?? yn[t]?.value ?? void 0;
29064
29062
  }
29065
29063
  static getAll(t = null, i = !1) {
29066
29064
  const r = /* @__PURE__ */ Object.create(null);
29067
- for (const A in mn) {
29068
- const c = mn[A];
29069
- t && !(t & c.kind) || (r[A] = i ? c.value : Cn[A] ?? c.value);
29065
+ for (const A in yn) {
29066
+ const c = yn[A];
29067
+ t && !(t & c.kind) || (r[A] = i ? c.value : fn[A] ?? c.value);
29070
29068
  }
29071
29069
  return r;
29072
29070
  }
29073
29071
  static set(t, i) {
29074
- Cn[t] = i;
29072
+ fn[t] = i;
29075
29073
  }
29076
29074
  static setAll(t, i = !1) {
29077
29075
  if (i) {
29078
29076
  if (this.get("disablePreferences"))
29079
29077
  return;
29080
- for (const r in Cn)
29078
+ for (const r in fn)
29081
29079
  if (nr[r] === void 0) {
29082
29080
  console.warn('setAll: The Preferences may override manually set AppOptions; please use the "disablePreferences"-option in order to prevent that.');
29083
29081
  break;
29084
29082
  }
29085
29083
  }
29086
29084
  for (const r in t)
29087
- Cn[r] = t[r];
29085
+ fn[r] = t[r];
29088
29086
  }
29089
29087
  static remove(t) {
29090
- delete Cn[t];
29088
+ delete fn[t];
29091
29089
  const i = nr[t];
29092
- i !== void 0 && (Cn[t] = i);
29090
+ i !== void 0 && (fn[t] = i);
29093
29091
  }
29094
29092
  }
29095
29093
  class B9 {
@@ -29620,7 +29618,7 @@ class jh {
29620
29618
  #h = [null, null, null, null];
29621
29619
  constructor(t) {
29622
29620
  const i = t.container, r = t.defaultViewport;
29623
- this.id = t.id, this.renderingId = "page" + this.id, this.#i = t.layerProperties || Q9, this.pdfPage = null, this.pageLabel = null, this.rotation = 0, this.scale = t.scale || Th, this.viewport = r, this.pdfPageRotate = r.rotation, this._optionalContentConfigPromise = t.optionalContentConfigPromise || null, this.#l = t.textLayerMode ?? Gi.ENABLE, this.#e = t.annotationMode ?? sn.ENABLE_FORMS, this.imageResourcesPath = t.imageResourcesPath || "", this.maxCanvasPixels = t.maxCanvasPixels ?? f9.get("maxCanvasPixels"), this.pageColors = t.pageColors || null, this.eventBus = t.eventBus, this.renderingQueue = t.renderingQueue, this.l10n = t.l10n, this.l10n ||= new rn(), this.renderTask = null, this.resume = null, this._isStandalone = !this.renderingQueue?.hasViewer(), this._container = i, this._annotationCanvasMap = null, this.annotationLayer = null, this.annotationEditorLayer = null, this.textLayer = null, this.zoomLayer = null, this.xfaLayer = null, this.structTreeLayer = null, this.drawLayer = null;
29621
+ this.id = t.id, this.renderingId = "page" + this.id, this.#i = t.layerProperties || Q9, this.pdfPage = null, this.pageLabel = null, this.rotation = 0, this.scale = t.scale || Th, this.viewport = r, this.pdfPageRotate = r.rotation, this._optionalContentConfigPromise = t.optionalContentConfigPromise || null, this.#l = t.textLayerMode ?? Gi.ENABLE, this.#e = t.annotationMode ?? sn.ENABLE_FORMS, this.imageResourcesPath = t.imageResourcesPath || "", this.maxCanvasPixels = t.maxCanvasPixels ?? f9.get("maxCanvasPixels"), this.pageColors = t.pageColors || null, this.eventBus = t.eventBus, this.renderingQueue = t.renderingQueue, this.l10n = t.l10n, this.l10n ||= new an(), this.renderTask = null, this.resume = null, this._isStandalone = !this.renderingQueue?.hasViewer(), this._container = i, this._annotationCanvasMap = null, this.annotationLayer = null, this.annotationEditorLayer = null, this.textLayer = null, this.zoomLayer = null, this.xfaLayer = null, this.structTreeLayer = null, this.drawLayer = null;
29624
29622
  const A = document.createElement("div");
29625
29623
  if (A.className = "page", A.setAttribute("data-page-number", this.id), A.setAttribute("role", "region"), A.setAttribute("data-l10n-id", "pdfjs-page-landmark"), A.setAttribute("data-l10n-args", JSON.stringify({
29626
29624
  page: this.id
@@ -30486,7 +30484,7 @@ const _l = 10, Mr = {
30486
30484
  PAUSE_EAGER_PAGE_INIT: 250
30487
30485
  };
30488
30486
  function ql(n) {
30489
- return Object.values(Bn).includes(n) && n !== Bn.DISABLE;
30487
+ return Object.values(En).includes(n) && n !== En.DISABLE;
30490
30488
  }
30491
30489
  class F9 {
30492
30490
  #e = /* @__PURE__ */ new Set();
@@ -30526,7 +30524,7 @@ class Wh {
30526
30524
  #e = null;
30527
30525
  #t = null;
30528
30526
  #i = null;
30529
- #s = Bn.NONE;
30527
+ #s = En.NONE;
30530
30528
  #r = null;
30531
30529
  #n = sn.ENABLE_FORMS;
30532
30530
  #a = null;
@@ -30550,7 +30548,7 @@ class Wh {
30550
30548
  throw new Error("Invalid `container` and/or `viewer` option.");
30551
30549
  if (this.container.offsetParent && getComputedStyle(this.container).position !== "absolute")
30552
30550
  throw new Error("The `container` must be absolutely positioned.");
30553
- this.#u.observe(this.container), this.eventBus = t.eventBus, this.linkService = t.linkService || new lo(), this.downloadManager = t.downloadManager || null, this.findController = t.findController || null, this.#t = t.altTextManager || null, this.findController && (this.findController.onIsPageVisible = (r) => this._getVisiblePages().ids.has(r)), this._scriptingManager = t.scriptingManager || null, this.#B = t.textLayerMode ?? Gi.ENABLE, this.#n = t.annotationMode ?? sn.ENABLE_FORMS, this.#s = t.annotationEditorMode ?? Bn.NONE, this.#i = t.annotationEditorHighlightColors || null, this.#l = t.enableHighlightFloatingButton === !0, this.imageResourcesPath = t.imageResourcesPath || "", this.enablePrintAutoRotate = t.enablePrintAutoRotate || !1, this.removePageBorders = t.removePageBorders || !1, this.maxCanvasPixels = t.maxCanvasPixels, this.l10n = t.l10n, this.l10n ||= new rn(), this.#o = t.enablePermissions || !1, this.pageColors = t.pageColors || null, this.#h = t.mlManager || null, this.defaultRenderingQueue = !t.renderingQueue, this.defaultRenderingQueue ? (this.renderingQueue = new v9(), this.renderingQueue.setViewer(this)) : this.renderingQueue = t.renderingQueue, this.scroll = Dm(this.container, this._scrollUpdate.bind(this)), this.presentationModeState = hs.UNKNOWN, this._resetView(), this.removePageBorders && this.viewer.classList.add("removePageBorders"), this.#k(), this.eventBus._on("thumbnailrendered", ({
30551
+ this.#u.observe(this.container), this.eventBus = t.eventBus, this.linkService = t.linkService || new lo(), this.downloadManager = t.downloadManager || null, this.findController = t.findController || null, this.#t = t.altTextManager || null, this.findController && (this.findController.onIsPageVisible = (r) => this._getVisiblePages().ids.has(r)), this._scriptingManager = t.scriptingManager || null, this.#B = t.textLayerMode ?? Gi.ENABLE, this.#n = t.annotationMode ?? sn.ENABLE_FORMS, this.#s = t.annotationEditorMode ?? En.NONE, this.#i = t.annotationEditorHighlightColors || null, this.#l = t.enableHighlightFloatingButton === !0, this.imageResourcesPath = t.imageResourcesPath || "", this.enablePrintAutoRotate = t.enablePrintAutoRotate || !1, this.removePageBorders = t.removePageBorders || !1, this.maxCanvasPixels = t.maxCanvasPixels, this.l10n = t.l10n, this.l10n ||= new an(), this.#o = t.enablePermissions || !1, this.pageColors = t.pageColors || null, this.#h = t.mlManager || null, this.defaultRenderingQueue = !t.renderingQueue, this.defaultRenderingQueue ? (this.renderingQueue = new v9(), this.renderingQueue.setViewer(this)) : this.renderingQueue = t.renderingQueue, this.scroll = Dm(this.container, this._scrollUpdate.bind(this)), this.presentationModeState = hs.UNKNOWN, this._resetView(), this.removePageBorders && this.viewer.classList.add("removePageBorders"), this.#k(), this.eventBus._on("thumbnailrendered", ({
30554
30552
  pageNumber: r,
30555
30553
  pdfPage: A
30556
30554
  }) => {
@@ -30692,7 +30690,7 @@ class Wh {
30692
30690
  annotationMode: this.#n,
30693
30691
  textLayerMode: this.#B
30694
30692
  };
30695
- return t && (!t.includes(Rr.COPY) && this.#B === Gi.ENABLE && (i.textLayerMode = Gi.ENABLE_PERMISSIONS), t.includes(Rr.MODIFY_CONTENTS) || (i.annotationEditorMode = Bn.DISABLE), !t.includes(Rr.MODIFY_ANNOTATIONS) && !t.includes(Rr.FILL_INTERACTIVE_FORMS) && this.#n === sn.ENABLE_FORMS && (i.annotationMode = sn.ENABLE)), i;
30693
+ return t && (!t.includes(Rr.COPY) && this.#B === Gi.ENABLE && (i.textLayerMode = Gi.ENABLE_PERMISSIONS), t.includes(Rr.MODIFY_CONTENTS) || (i.annotationEditorMode = En.DISABLE), !t.includes(Rr.MODIFY_ANNOTATIONS) && !t.includes(Rr.FILL_INTERACTIVE_FORMS) && this.#n === sn.ENABLE_FORMS && (i.annotationMode = sn.ENABLE)), i;
30696
30694
  }
30697
30695
  async #b(t) {
30698
30696
  if (document.visibilityState === "hidden" || !this.container.offsetParent || this._getVisiblePages().views.length === 0)
@@ -30803,12 +30801,12 @@ class Wh {
30803
30801
  const T = this.#A = document.createElement("div");
30804
30802
  T.id = "hiddenCopyElement", I.before(T);
30805
30803
  }
30806
- if (w !== Bn.DISABLE) {
30804
+ if (w !== En.DISABLE) {
30807
30805
  const T = w;
30808
30806
  t.isPureXfa ? console.warn("Warning: XFA-editing is not implemented.") : ql(T) ? (this.#r = new A2(this.container, I, this.#t, g, t, u, this.#i, this.#l, this.#h), g.dispatch("annotationeditoruimanager", {
30809
30807
  source: this,
30810
30808
  uiManager: this.#r
30811
- }), T !== Bn.NONE && this.#r.updateMode(T)) : console.error(`Invalid AnnotationEditor mode: ${T}`);
30809
+ }), T !== En.NONE && this.#r.updateMode(T)) : console.error(`Invalid AnnotationEditor mode: ${T}`);
30812
30810
  }
30813
30811
  const F = this._scrollMode === ze.PAGE ? null : I, O = this.currentScale, J = b.getViewport({
30814
30812
  scale: O * tn.PDF_TO_CSS_UNITS
@@ -31419,7 +31417,7 @@ class Wh {
31419
31417
  return this.#a ||= [this.container.offsetTop, this.container.offsetLeft];
31420
31418
  }
31421
31419
  get annotationEditorMode() {
31422
- return this.#r ? this.#s : Bn.DISABLE;
31420
+ return this.#r ? this.#s : En.DISABLE;
31423
31421
  }
31424
31422
  set annotationEditorMode({
31425
31423
  mode: t,
@@ -31632,7 +31630,7 @@ const N9 = '/**\n * @licstart The following is the entire license notice for the
31632
31630
  },
31633
31631
  emits: ["highlight-click"],
31634
31632
  setup(n, { expose: t, emit: i }) {
31635
- const r = Yi(), A = on(), { COMMENT_EVENTS: c } = A, { documentsWithConverations: g, activeComment: u, floatingCommentsOffset: I, commentsList: f } = Ei(A), { documents: Q, activeZoom: y } = Ei(r), { proxy: b } = Ji(), D = i, w = n, k = (T) => {
31633
+ const r = Yi(), A = cn(), { COMMENT_EVENTS: c } = A, { documentsWithConverations: g, activeComment: u, floatingCommentsOffset: I, commentsList: f } = Ei(A), { documents: Q, activeZoom: y } = Ei(r), { proxy: b } = Ji(), D = i, w = n, k = (T) => {
31636
31634
  const H = {
31637
31635
  creatorEmail: w.user.email,
31638
31636
  creatorName: w.user.name,
@@ -31649,7 +31647,7 @@ const N9 = '/**\n * @licstart The following is the entire license notice for the
31649
31647
  U.left = U.right, U.right = R;
31650
31648
  }
31651
31649
  T.selectionBounds = U;
31652
- const S = Q.value.find((R) => R.id === T.documentId), G = Tn(H);
31650
+ const S = Q.value.find((R) => R.id === T.documentId), G = Un(H);
31653
31651
  u.value = G.commentId, S.conversations.push(G), b.$superdoc.emit("comments-update", { type: c.NEW, comment: G.getValues() });
31654
31652
  }, M = (T) => {
31655
31653
  const { selection: H, commentId: U } = T, S = H.getContainerLocation(w.parent), G = T.selection.selectionBounds;
@@ -31681,7 +31679,7 @@ const N9 = '/**\n * @licstart The following is the entire license notice for the
31681
31679
  setFloatingCommentOffset: F
31682
31680
  }), (T, H) => (pe(), ye("div", U9, [
31683
31681
  Xe("div", H9, [
31684
- (pe(!0), ye(qt, null, An(J.value, (U) => (pe(), ye("div", {
31682
+ (pe(!0), ye(qt, null, on(J.value, (U) => (pe(), ye("div", {
31685
31683
  class: "comment-anchor sd-highlight",
31686
31684
  onClick: wi((S) => O(U), ["stop", "prevent"]),
31687
31685
  "data-id": U.commentId,
@@ -31705,7 +31703,7 @@ const N9 = '/**\n * @licstart The following is the entire license notice for the
31705
31703
  setup(n) {
31706
31704
  const t = n;
31707
31705
  Yi();
31708
- const i = on(), {
31706
+ const i = cn(), {
31709
31707
  getFloatingComments: r,
31710
31708
  hasInitializedLocations: A,
31711
31709
  activeComment: c,
@@ -31772,7 +31770,7 @@ const N9 = '/**\n * @licstart The following is the entire license notice for the
31772
31770
  ref: I
31773
31771
  }, [
31774
31772
  Xe("div", Y9, [
31775
- (pe(!0), ye(qt, null, An(Oe(r), (J) => (pe(), ye("div", {
31773
+ (pe(!0), ye(qt, null, on(Oe(r), (J) => (pe(), ye("div", {
31776
31774
  key: J.commentId || J.importedId
31777
31775
  }, [
31778
31776
  Xe("div", {
@@ -31794,7 +31792,7 @@ const N9 = '/**\n * @licstart The following is the entire license notice for the
31794
31792
  class: "sidebar-container",
31795
31793
  style: ci({ top: y.value + "px" })
31796
31794
  }, [
31797
- (pe(!0), ye(qt, null, An(f.value, (J) => (pe(), ye("div", {
31795
+ (pe(!0), ye(qt, null, on(f.value, (J) => (pe(), ye("div", {
31798
31796
  key: J.id,
31799
31797
  style: ci(D.value(J)),
31800
31798
  class: "floating-comment"
@@ -32062,7 +32060,7 @@ const N9 = '/**\n * @licstart The following is the entire license notice for the
32062
32060
  }), u;
32063
32061
  });
32064
32062
  return (u, I) => (pe(), ye("div", cy, [
32065
- (pe(!0), ye(qt, null, An(g.value, (f) => (pe(), ye("div", {
32063
+ (pe(!0), ye(qt, null, on(g.value, (f) => (pe(), ye("div", {
32066
32064
  style: ci(c.value(f)),
32067
32065
  class: js(["field-container", { "field-container--no-style": f.nostyle }])
32068
32066
  }, [
@@ -32127,7 +32125,7 @@ const N9 = '/**\n * @licstart The following is the entire license notice for the
32127
32125
  __name: "SuperDoc",
32128
32126
  emits: ["selection-update"],
32129
32127
  setup(n, { emit: t }) {
32130
- const i = Yi(), r = on(), {
32128
+ const i = Yi(), r = cn(), {
32131
32129
  documents: A,
32132
32130
  isReady: c,
32133
32131
  areDocumentsReady: g,
@@ -32192,13 +32190,13 @@ const N9 = '/**\n * @licstart The following is the entire license notice for the
32192
32190
  }
32193
32191
  const { documentId: he } = ue.options, { $from: Ie, $to: Ye } = X.selection;
32194
32192
  if (Ie.pos === Ye.pos && jt({ x: null, y: null, source: "super-editor" }), !ee.value) return;
32195
- const { view: At } = ue, Bt = At.coordsAtPos(Ie.pos), xt = At.coordsAtPos(Ye.pos), { pageMargins: nt } = ue.getPageStyles(), Mt = ee.value.getBoundingClientRect(), si = Math.max(96, Bt.top - Mt.top), mi = xt.bottom - Mt.top, Dn = {
32193
+ const { view: At } = ue, Bt = At.coordsAtPos(Ie.pos), xt = At.coordsAtPos(Ye.pos), { pageMargins: nt } = ue.getPageStyles(), Mt = ee.value.getBoundingClientRect(), si = Math.max(96, Bt.top - Mt.top), mi = xt.bottom - Mt.top, vn = {
32196
32194
  top: si,
32197
32195
  left: Bt.left,
32198
32196
  right: xt.left,
32199
32197
  bottom: mi
32200
32198
  }, ms = Xs({
32201
- selectionBounds: Dn,
32199
+ selectionBounds: vn,
32202
32200
  page: 1,
32203
32201
  documentId: he,
32204
32202
  source: "super-editor"
@@ -32345,7 +32343,7 @@ const N9 = '/**\n * @licstart The following is the entire license notice for the
32345
32343
  documentId: A.value[0].id
32346
32344
  });
32347
32345
  Nt(X), We.value.style.pointerEvents = "none";
32348
- }, Wi = Ae(() => !(q.$superdoc.config.modules?.comments).readOnly), gn = (ue, X) => {
32346
+ }, Wi = Ae(() => !(q.$superdoc.config.modules?.comments).readOnly), hn = (ue, X) => {
32349
32347
  ue.documentMarginsLastChange = X.pageMargins;
32350
32348
  }, vi = (ue) => {
32351
32349
  Me.value && (ni(), Ve.value = !0, gi(ue));
@@ -32413,7 +32411,7 @@ const N9 = '/**\n * @licstart The following is the entire license notice for the
32413
32411
  user: Oe(b),
32414
32412
  onHighlightClick: je
32415
32413
  }, null, 8, ["parent", "user"])) : tt("", !0),
32416
- (pe(!0), ye(qt, null, An(Oe(A), (Ie) => (pe(), ye("div", {
32414
+ (pe(!0), ye(qt, null, on(Oe(A), (Ie) => (pe(), ye("div", {
32417
32415
  class: "superdoc__sub-document sub-document",
32418
32416
  key: Ie.id
32419
32417
  }, [
@@ -32425,13 +32423,13 @@ const N9 = '/**\n * @licstart The following is the entire license notice for the
32425
32423
  onPageLoaded: Oe(Q),
32426
32424
  onBypassSelection: vi
32427
32425
  }, null, 8, ["document-data", "onPageLoaded"])) : tt("", !0),
32428
- Ie.type === Oe(On) ? (pe(), Ci(Oe(Sd), {
32426
+ Ie.type === Oe(rn) ? (pe(), Ci(Oe(Sd), {
32429
32427
  key: 1,
32430
32428
  "file-source": Ie.data,
32431
32429
  state: Ie.state,
32432
32430
  "document-id": Ie.id,
32433
32431
  options: ce(Ie),
32434
- onPageMarginsChange: (Ye) => gn(Ie, Ye)
32432
+ onPageMarginsChange: (Ye) => hn(Ie, Ye)
32435
32433
  }, null, 8, ["file-source", "state", "document-id", "options", "onPageMarginsChange"])) : tt("", !0),
32436
32434
  Ie.type === Oe(TA) ? (pe(), Ci(Cy, {
32437
32435
  key: 2,
@@ -32453,7 +32451,7 @@ const N9 = '/**\n * @licstart The following is the entire license notice for the
32453
32451
  [he, st]
32454
32452
  ]) : tt("", !0),
32455
32453
  Xe("div", py, [
32456
- Oe(P) && Oe(G).length > 0 ? (pe(!0), ye(qt, { key: 0 }, An(Oe(k), (Ie) => (pe(), Ci(q9, {
32454
+ Oe(P) && Oe(G).length > 0 ? (pe(!0), ye(qt, { key: 0 }, on(Oe(k), (Ie) => (pe(), Ci(q9, {
32457
32455
  parent: ee.value,
32458
32456
  "current-document": Ie
32459
32457
  }, null, 8, ["parent", "current-document"]))), 256)) : tt("", !0)
@@ -32465,7 +32463,7 @@ const N9 = '/**\n * @licstart The following is the entire license notice for the
32465
32463
  }, my = /* @__PURE__ */ Tt(Qy, [["__scopeId", "data-v-6a70b4b3"]]), yy = () => {
32466
32464
  const n = $l(my), t = mI();
32467
32465
  n.use(t), n.directive("click-outside", ng);
32468
- const i = Yi(), r = on();
32466
+ const i = Yi(), r = cn();
32469
32467
  return { app: n, pinia: t, superdocStore: i, commentsStore: r };
32470
32468
  }, Wl = (n, t, i) => {
32471
32469
  const r = URL.createObjectURL(n), A = document.createElement("a");
@@ -32473,7 +32471,7 @@ const N9 = '/**\n * @licstart The following is the entire license notice for the
32473
32471
  }, Xl = (n) => n.toLowerCase().endsWith(".docx") || n.toLowerCase().endsWith(".pdf") ? n.slice(0, -5) : n;
32474
32472
  class ab extends eg {
32475
32473
  /** @type {Array<string>} */
32476
- static allowedTypes = [On, ha, TA];
32474
+ static allowedTypes = [rn, ha, TA];
32477
32475
  /** @type {number} */
32478
32476
  version;
32479
32477
  users;
@@ -32536,10 +32534,10 @@ class ab extends eg {
32536
32534
  this.config = {
32537
32535
  ...this.config,
32538
32536
  ...t
32539
- }, this.config.colors = RI(this.config.colors), this.userColorMap = /* @__PURE__ */ new Map(), this.colorIndex = 0, this.version = "0.10.7", console.debug("🦋 [superdoc] Using SuperDoc version:", this.version), this.superdocId = t.superdocId || ig(), this.colors = this.config.colors, this.#t(), await this.#r(this.config.modules), this.#i(), this.#s(), this.user = this.config.user, this.users = this.config.users || [], this.socket = null, this.isDev = this.config.isDev || !1, this.activeEditor = null, this.comments = [], this.app.mount(this.config.selector), this.readyEditors = 0, this.isLocked = this.config.isLocked || !1, this.lockedBy = this.config.lockedBy || null, this.#a(this);
32537
+ }, this.config.colors = RI(this.config.colors), this.userColorMap = /* @__PURE__ */ new Map(), this.colorIndex = 0, this.version = "0.10.8", console.debug("🦋 [superdoc] Using SuperDoc version:", this.version), this.superdocId = t.superdocId || ig(), this.colors = this.config.colors, this.#t(), await this.#r(this.config.modules), this.#i(), this.#s(), this.user = this.config.user, this.users = this.config.users || [], this.socket = null, this.isDev = this.config.isDev || !1, this.activeEditor = null, this.comments = [], this.app.mount(this.config.selector), this.readyEditors = 0, this.isLocked = this.config.isLocked || !1, this.lockedBy = this.config.lockedBy || null, this.#a(this);
32540
32538
  }
32541
32539
  get requiredNumberOfEditors() {
32542
- return this.superdocStore.documents.filter((t) => t.type === On).length;
32540
+ return this.superdocStore.documents.filter((t) => t.type === rn).length;
32543
32541
  }
32544
32542
  get state() {
32545
32543
  return {
@@ -32547,9 +32545,16 @@ class ab extends eg {
32547
32545
  users: this.users
32548
32546
  };
32549
32547
  }
32550
- #t(t) {
32551
- const i = this.config.document && Object.keys(this.config.document)?.length, r = this.config.documents && this.config.documents?.length;
32552
- i && r && console.warn("🦋 [superdoc] You can only provide one of document or documents"), i && (this.config.documents = [this.config.document]);
32548
+ #t() {
32549
+ const t = this.config.document, i = !!t && typeof t == "object" && Object.keys(this.config.document)?.length, r = !!t && typeof t == "string" && t.length > 0, A = this.config.documents && this.config.documents?.length;
32550
+ i && A && console.warn("🦋 [superdoc] You can only provide one of document or documents"), i ? this.config.documents = [this.config.document] : r && (this.config.documents = [
32551
+ {
32552
+ type: rn,
32553
+ url: this.config.document,
32554
+ name: "document.docx",
32555
+ isNewFile: !0
32556
+ }
32557
+ ]);
32553
32558
  }
32554
32559
  #i() {
32555
32560
  const { app: t, pinia: i, superdocStore: r, commentsStore: A } = yy();
@@ -32792,7 +32797,7 @@ class ab extends eg {
32792
32797
  }
32793
32798
  export {
32794
32799
  Jd as BlankDOCX,
32795
- On as DOCX,
32800
+ rn as DOCX,
32796
32801
  jo as Editor,
32797
32802
  TA as HTML,
32798
32803
  ha as PDF,