@aiquants/markdown-explorer 0.28.0 → 0.29.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,27 +1,27 @@
1
1
  import { jsxs as B, jsx as c, Fragment as pe } from "react/jsx-runtime";
2
2
  import * as E from "react";
3
- import { createContext as ve, use as se, useMemo as X, useSyncExternalStore as oe, useRef as U, useLayoutEffect as Y, useCallback as F, useId as Te, useEffect as ee, Component as Yn, Suspense as Ie, lazy as Pt, useState as V, useEffectEvent as le } from "react";
4
- import { useParams as ho, useSearchParams as po, matchPath as go, useBlocker as wo, useNavigate as vo, Link as bo, useHref as nt, useLocation as Xn, useRevalidator as yo } from "react-router";
5
- import { k as ko, h as Jn, H as Eo, E as Qn, a as er, I as So, J as Qt, K as xo, s as To, L as Ro, M as Me, e as Ne, m as Co, O as Oo, Q as Lo, R as Mo, T as en, U as Ao, V as tn, W as No, w as Do, X as Po } from "./location-CKuabtKl.js";
6
- import { SPREADSHEET_BLOCK_LABEL_PLACEHOLDERS as nn, SPREADSHEET_BLOCK_LABEL_CATALOGS as Xe } from "@aiquants/markdown/code-blocks";
7
- import { H as fe, i as Io, I as rt, J as $o, A as te, K as dt, B as ut, z as _o, L as Fo, f as qo, N as Bo, O as Uo, P as Ho, Q as zo, R as rn, x as jo, S as Vo, T as Zo, U as Wo, D as Go, y as Ko, V as Yo, W as Xo, X as Jo, w as on } from "./dataRoute-DLhQfdoW.js";
8
- import { HostedScrollArea as sn, SpreadsheetBlock as Qo, useMarkdownToolbarState as es, MarkdownViewer as tr } from "@aiquants/markdown";
9
- import { SOURCE_LINES_ATTRIBUTE as nr, parseSourceLines as ts } from "@aiquants/markdown/source-lines";
10
- import { iterateTsvRows as ns, iterateTsvPrefixRows as rs, serializeTsv as os } from "@aiquants/spreadsheet/tsv";
11
- import { SPREADSHEET_MAX_OPERATION_CELLS as an } from "@aiquants/spreadsheet/view";
12
- import { DEFAULT_CONTENT_ALIGN as ss } from "@aiquants/markdown/viewer-settings";
13
- import { w as Rt, r as Ct, a as as, b as ln, s as Oe, c as is } from "./storage-CmGHg7OA.js";
14
- import { createShouldRevalidate as ls } from "@aiquants/route-revalidation";
15
- const cn = Object.freeze(["en", "ja"]), cs = "en", It = (e) => `viewerSpreadsheet${e.charAt(0).toUpperCase()}${e.slice(1)}`, rr = Object.freeze(Object.keys(Xe.en)), or = (e) => Object.fromEntries(rr.map((t) => [It(t), Xe[e][t].text])), ds = Object.freeze({
3
+ import { createContext as ve, use as se, useMemo as X, useSyncExternalStore as re, useRef as U, useLayoutEffect as Y, useCallback as F, useId as Te, useEffect as ee, Component as Qn, Suspense as Ie, lazy as $t, useState as V, useEffectEvent as le } from "react";
4
+ import { useParams as vo, useSearchParams as bo, matchPath as yo, useBlocker as ko, useNavigate as Eo, Link as So, useHref as nt, useLocation as er, useRevalidator as xo } from "react-router";
5
+ import { k as To, h as tr, H as Ro, E as nr, a as rr, I as Co, J as nn, K as Oo, s as Lo, L as Mo, M as Me, e as Ne, m as Ao, O as No, Q as Do, R as Po, T as rn, U as Io, V as on, W as $o, w as _o, X as Fo } from "./location-CKuabtKl.js";
6
+ import { SPREADSHEET_BLOCK_LABEL_PLACEHOLDERS as sn, SPREADSHEET_BLOCK_LABEL_CATALOGS as Xe } from "@aiquants/markdown/code-blocks";
7
+ import { H as fe, i as qo, I as rt, J as Bo, A as te, K as dt, B as ut, z as Uo, L as Ho, f as zo, N as jo, O as Vo, P as Zo, Q as Wo, R as an, x as Go, S as Ko, T as Yo, U as Xo, D as Jo, y as Qo, V as es, W as ts, X as ns, w as ln } from "./dataRoute-DLhQfdoW.js";
8
+ import { HostedScrollArea as cn, SpreadsheetBlock as rs, useMarkdownToolbarState as os, MarkdownViewer as or } from "@aiquants/markdown";
9
+ import { SOURCE_LINES_ATTRIBUTE as sr, parseSourceLines as ss } from "@aiquants/markdown/source-lines";
10
+ import { iterateTsvRows as as, iterateTsvPrefixRows as is, serializeTsv as ls } from "@aiquants/spreadsheet/tsv";
11
+ import { SPREADSHEET_MAX_OPERATION_CELLS as dn } from "@aiquants/spreadsheet/view";
12
+ import { DEFAULT_CONTENT_ALIGN as cs } from "@aiquants/markdown/viewer-settings";
13
+ import { w as Ct, r as Ot, a as ds, b as un, s as Oe, c as us } from "./storage-CmGHg7OA.js";
14
+ import { createShouldRevalidate as fs } from "@aiquants/route-revalidation";
15
+ const fn = Object.freeze(["en", "ja"]), ms = "en", _t = (e) => `viewerSpreadsheet${e.charAt(0).toUpperCase()}${e.slice(1)}`, ar = Object.freeze(Object.keys(Xe.en)), ir = (e) => Object.fromEntries(ar.map((t) => [_t(t), Xe[e][t].text])), hs = Object.freeze({
16
16
  panelMoved: Object.freeze(["title", "column", "position"]),
17
17
  panelMoveUnavailable: Object.freeze(["title", "move"]),
18
18
  panelDragStarted: Object.freeze(["title"]),
19
19
  panelDragCancelled: Object.freeze(["title"]),
20
20
  multiColumnRegion: Object.freeze(["column"]),
21
21
  viewerSvgImageSourceRegion: Object.freeze(["name"]),
22
- ...Object.fromEntries(rr.filter((e) => nn[e].length > 0).map((e) => [It(e), nn[e]]))
23
- }), us = /\{(\w+)\}/gu, sr = {
24
- ...or("en"),
22
+ ...Object.fromEntries(ar.filter((e) => sn[e].length > 0).map((e) => [_t(e), sn[e]]))
23
+ }), ps = /\{(\w+)\}/gu, lr = {
24
+ ...ir("en"),
25
25
  explorerRegion: "Explorer",
26
26
  sourceLabel: "Source",
27
27
  refreshTreeLabel: "Refresh tree",
@@ -316,8 +316,8 @@ const cn = Object.freeze(["en", "ja"]), cs = "en", It = (e) => `viewerSpreadshee
316
316
  multiColumnEmpty: "This column is empty",
317
317
  multiColumnRegion: "Column {column}",
318
318
  panelDropHere: "Drop the panel here"
319
- }, fs = {
320
- ...or("ja"),
319
+ }, gs = {
320
+ ...ir("ja"),
321
321
  explorerRegion: "エクスプローラー",
322
322
  sourceLabel: "ソース",
323
323
  refreshTreeLabel: "ツリーを更新",
@@ -612,24 +612,24 @@ const cn = Object.freeze(["en", "ja"]), cs = "en", It = (e) => `viewerSpreadshee
612
612
  multiColumnEmpty: "この列は空です",
613
613
  multiColumnRegion: "{column} 列目",
614
614
  panelDropHere: "ここへパネルをドロップ"
615
- }, ms = Object.freeze({
616
- en: Object.freeze(sr),
617
- ja: Object.freeze(fs)
618
- }), ar = Object.freeze(Object.keys(sr)), hs = new Set(ar), ps = (e) => hs.has(e), Ge = (e) => e === null ? "null" : typeof e == "string" ? JSON.stringify(e.length > 40 ? `${e.slice(0, 40)}…` : e) : typeof e == "function" ? "a function" : Array.isArray(e) ? "an array" : typeof e, ir = (e) => {
619
- if (e === void 0) return cs;
620
- if (cn.includes(e)) return e;
621
- throw new RangeError(`[markdown-explorer] locale is the UI language (${cn.map((t) => JSON.stringify(t)).join(" or ")}), not a BCP 47 tag; got ${Ge(e)}`);
622
- }, dn = (e, t) => {
623
- const n = ms[ir(e)];
615
+ }, ws = Object.freeze({
616
+ en: Object.freeze(lr),
617
+ ja: Object.freeze(gs)
618
+ }), cr = Object.freeze(Object.keys(lr)), vs = new Set(cr), bs = (e) => vs.has(e), Ge = (e) => e === null ? "null" : typeof e == "string" ? JSON.stringify(e.length > 40 ? `${e.slice(0, 40)}…` : e) : typeof e == "function" ? "a function" : Array.isArray(e) ? "an array" : typeof e, dr = (e) => {
619
+ if (e === void 0) return ms;
620
+ if (fn.includes(e)) return e;
621
+ throw new RangeError(`[markdown-explorer] locale is the UI language (${fn.map((t) => JSON.stringify(t)).join(" or ")}), not a BCP 47 tag; got ${Ge(e)}`);
622
+ }, mn = (e, t) => {
623
+ const n = ws[dr(e)];
624
624
  if (t === void 0) return n;
625
625
  if (t === null || typeof t != "object")
626
626
  throw new RangeError(`[markdown-explorer] labels must be an object; got ${Ge(t)}`);
627
- if (!ko(t))
627
+ if (!To(t))
628
628
  throw new RangeError(`[markdown-explorer] labels must be a plain object; got ${Ge(t)}`);
629
629
  const r = t, o = { ...n };
630
630
  for (const s of Object.keys(r)) {
631
- if (!ps(s))
632
- throw new RangeError(`[markdown-explorer] labels.${s} is not a known label key; expected one of ${ar.join(", ")}`);
631
+ if (!bs(s))
632
+ throw new RangeError(`[markdown-explorer] labels.${s} is not a known label key; expected one of ${cr.join(", ")}`);
633
633
  const a = r[s];
634
634
  if (a === void 0) continue;
635
635
  const i = typeof n[s];
@@ -637,35 +637,35 @@ const cn = Object.freeze(["en", "ja"]), cs = "en", It = (e) => `viewerSpreadshee
637
637
  throw new TypeError(`[markdown-explorer] labels.${s} must be a ${i}; got ${Ge(a)}`);
638
638
  if (typeof a == "string" && a.trim() === "")
639
639
  throw new RangeError(`[markdown-explorer] labels.${s} must be a non-blank string`);
640
- const f = ds[s];
640
+ const f = hs[s];
641
641
  if (typeof a == "string" && f !== void 0) {
642
- for (const [, u] of a.matchAll(us))
642
+ for (const [, u] of a.matchAll(ps))
643
643
  if (!f.includes(u ?? ""))
644
644
  throw new RangeError(`[markdown-explorer] labels.${s} uses the unknown placeholder {${String(u)}}; it accepts ${f.map((l) => `{${l}}`).join(", ")}`);
645
645
  }
646
646
  o[s] = a;
647
647
  }
648
648
  return Object.freeze(o);
649
- }, gs = (e, t) => {
649
+ }, ys = (e, t) => {
650
650
  if (Object.is(e, t)) return !0;
651
651
  if (e === null || t === null || typeof e != "object" || typeof t != "object") return !1;
652
652
  const n = e, r = t, o = Object.keys(n), s = Object.keys(r);
653
653
  return o.length === s.length && s.every((a) => Object.hasOwn(n, a) && Object.is(n[a], r[a]));
654
- }, un = Object.freeze(["light", "dark"]), ws = (e) => {
654
+ }, hn = Object.freeze(["light", "dark"]), ks = (e) => {
655
655
  if (e === void 0) return "light";
656
- if (un.includes(e)) return e;
657
- throw new RangeError(`[markdown-explorer] theme must be ${un.map((t) => JSON.stringify(t)).join(" or ")}; got ${typeof e == "string" ? JSON.stringify(e) : typeof e}`);
658
- }, lr = ve(null), $ = () => {
659
- const e = se(lr);
656
+ if (hn.includes(e)) return e;
657
+ throw new RangeError(`[markdown-explorer] theme must be ${hn.map((t) => JSON.stringify(t)).join(" or ")}; got ${typeof e == "string" ? JSON.stringify(e) : typeof e}`);
658
+ }, ur = ve(null), $ = () => {
659
+ const e = se(ur);
660
660
  if (e === null) throw new Error("[markdown-explorer] explorer components must be rendered inside <MarkdownExplorer>");
661
661
  return e;
662
662
  }, Je = (e) => {
663
663
  const { viewSettings: t } = $(), n = () => e(t.getSnapshot());
664
- return oe(t.subscribe, n, n);
665
- }, $t = () => {
666
- const { config: e } = $(), t = ho()["*"], [n] = po(), r = n.toString();
667
- return X(() => Jn(e, t, new URLSearchParams(r)), [e, t, r]);
668
- }, cr = {
664
+ return re(t.subscribe, n, n);
665
+ }, Ft = () => {
666
+ const { config: e } = $(), t = vo()["*"], [n] = bo(), r = n.toString();
667
+ return X(() => tr(e, t, new URLSearchParams(r)), [e, t, r]);
668
+ }, fr = {
669
669
  unauthorized: ["failureUnauthorizedTitle", "failureUnauthorizedBody"],
670
670
  forbidden: ["failureForbiddenTitle", "failureForbiddenBody"],
671
671
  "not-found": ["failureNotFoundTitle", "failureNotFoundBody"],
@@ -674,14 +674,14 @@ const cn = Object.freeze(["en", "ja"]), cs = "en", It = (e) => `viewerSpreadshee
674
674
  "too-large": ["failureTooLargeTitle", "failureTooLargeBody"],
675
675
  unsupported: ["failureUnsupportedTitle", "failureUnsupportedBody"],
676
676
  failed: ["failureFailedTitle", "failureFailedBody"]
677
- }, de = (e, t) => e[cr[t][0]], Re = ({ failure: e, alert: t, onRetry: n, testId: r }) => {
678
- const { labels: o } = $(), s = de(o, e.reason), a = o[cr[e.reason][1]], i = e.reason === "unauthorized" || e.reason === "forbidden" || e.reason === "failed" ? "danger" : "warning";
677
+ }, de = (e, t) => e[fr[t][0]], Re = ({ failure: e, alert: t, onRetry: n, testId: r }) => {
678
+ const { labels: o } = $(), s = de(o, e.reason), a = o[fr[e.reason][1]], i = e.reason === "unauthorized" || e.reason === "forbidden" || e.reason === "failed" ? "danger" : "warning";
679
679
  return /* @__PURE__ */ B("div", { className: "aqmx-callout", role: t ? "alert" : void 0, "data-aqmx-tone": i, "data-testid": r === null ? void 0 : r, "data-aqmx-failure": r === null ? void 0 : e.reason, children: [
680
680
  /* @__PURE__ */ c("p", { className: "aqmx-callout-title", children: s }),
681
681
  /* @__PURE__ */ c("p", { className: "aqmx-callout-body", children: a }),
682
682
  e.reason === "unauthorized" ? /* @__PURE__ */ c("button", { type: "button", className: "aqmx-callout-action", onClick: () => window.location.reload(), children: o.reloadPage }) : n !== void 0 && e.reason === "failed" ? /* @__PURE__ */ c("button", { type: "button", className: "aqmx-callout-action", onClick: n, children: o.retry }) : null
683
683
  ] });
684
- }, vs = (e, t) => {
684
+ }, Es = (e, t) => {
685
685
  const { phase: n, save: r, dirty: o } = t;
686
686
  switch (n.kind) {
687
687
  case "opening":
@@ -707,7 +707,7 @@ const cn = Object.freeze(["en", "ja"]), cs = "en", It = (e) => `viewerSpreadshee
707
707
  break;
708
708
  }
709
709
  return o ? e.draftUnsaved : "";
710
- }, bs = (e, t, n) => {
710
+ }, Ss = (e, t, n) => {
711
711
  switch (t.kind) {
712
712
  case "draft":
713
713
  return e.draftNotSaved;
@@ -733,28 +733,28 @@ const cn = Object.freeze(["en", "ja"]), cs = "en", It = (e) => `viewerSpreadshee
733
733
  for (const t of [...e]) t();
734
734
  }
735
735
  };
736
- }, ys = "<<<<<<<", ks = "=======", Es = ">>>>>>>", fn = (e, t) => e === t || e.startsWith(`${t} `), mn = (e) => Ss(e.split(`
737
- `)), Ss = (e) => {
736
+ }, xs = "<<<<<<<", Ts = "=======", Rs = ">>>>>>>", pn = (e, t) => e === t || e.startsWith(`${t} `), gn = (e) => Cs(e.split(`
737
+ `)), Cs = (e) => {
738
738
  const t = [];
739
739
  let n = null, r = null, o = 0;
740
740
  for (const s of e) {
741
741
  o += 1;
742
742
  const a = s.charCodeAt(0);
743
- a !== 60 && a !== 61 && a !== 62 || (fn(s, ys) ? (n = o, r = null) : s === ks ? n !== null && r === null ? r = o : n = null : fn(s, Es) && (n !== null && r !== null && t.push({ start: n, separator: r, end: o }), n = null, r = null));
743
+ a !== 60 && a !== 61 && a !== 62 || (pn(s, xs) ? (n = o, r = null) : s === Ts ? n !== null && r === null ? r = o : n = null : pn(s, Rs) && (n !== null && r !== null && t.push({ start: n, separator: r, end: o }), n = null, r = null));
744
744
  }
745
745
  return t;
746
- }, hn = (e) => e.includes(`\r
746
+ }, wn = (e) => e.includes(`\r
747
747
  `) ? `\r
748
748
  ` : `
749
749
  `, ft = (e) => e.replace(/\r\n?/gu, `
750
- `), xs = (e, t) => t === `
750
+ `), Os = (e, t) => t === `
751
751
  ` ? e : e.replaceAll(`
752
752
  `, `\r
753
- `), Ts = 3, Rs = /^\d+(?:\.\d+)?$/u, Cs = (e) => {
754
- if (e === null || !Rs.test(e)) return null;
753
+ `), Ls = 3, Ms = /^\d+(?:\.\d+)?$/u, As = (e) => {
754
+ if (e === null || !Ms.test(e)) return null;
755
755
  const t = Number(e);
756
- return t >= er && t <= Qn ? t : null;
757
- }, mt = Object.freeze({ kind: "idle" }), pn = Object.freeze({ kind: "draft" }), Os = ({ data: e, conflictLabels: t, onSaveSettled: n, sideBySideSetting: r, editorShareSetting: o }) => {
756
+ return t >= rr && t <= nr ? t : null;
757
+ }, mt = Object.freeze({ kind: "idle" }), vn = Object.freeze({ kind: "draft" }), Ns = ({ data: e, conflictLabels: t, onSaveSettled: n, sideBySideSetting: r, editorShareSetting: o }) => {
758
758
  const s = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), f = /* @__PURE__ */ new Map(), u = /* @__PURE__ */ new Map(), l = qe();
759
759
  let d = null, h = null, g = null;
760
760
  const v = (m, p) => {
@@ -774,7 +774,7 @@ const cn = Object.freeze(["en", "ja"]), cs = "en", It = (e) => `viewerSpreadshee
774
774
  return;
775
775
  }
776
776
  const I = ft(A.text), _ = A.kind === "draft";
777
- p.base = { text: I, version: _ ? null : A.version }, p.draft = I, p.ending = hn(A.text), v(p, { phase: { kind: "editing" }, history: _ ? !1 : A.history, dirty: !1, save: _ ? pn : mt, generation: p.value.generation + 1 });
777
+ p.base = { text: I, version: _ ? null : A.version }, p.draft = I, p.ending = wn(A.text), v(p, { phase: { kind: "editing" }, history: _ ? !1 : A.history, dirty: !1, save: _ ? vn : mt, generation: p.value.generation + 1 });
778
778
  }, O = (m) => {
779
779
  const p = s.get(m);
780
780
  p !== void 0 && (p.controller.abort(), s.delete(m), i.delete(m));
@@ -788,10 +788,10 @@ const cn = Object.freeze(["en", "ja"]), cs = "en", It = (e) => `viewerSpreadshee
788
788
  if (p === void 0 || p.value.phase.kind !== "editing" || p.base === null || p.value.save.kind === "saving") return;
789
789
  const { version: x } = p.base;
790
790
  if (x === null) {
791
- n(m, pn);
791
+ n(m, vn);
792
792
  return;
793
793
  }
794
- const A = mn(p.draft).length;
794
+ const A = gn(p.draft).length;
795
795
  if (A > 0) {
796
796
  q(m, p, { kind: "conflicts", count: A });
797
797
  return;
@@ -800,8 +800,8 @@ const cn = Object.freeze(["en", "ja"]), cs = "en", It = (e) => `viewerSpreadshee
800
800
  const { signal: I } = p.controller;
801
801
  let _ = { text: p.base.text, version: x }, b = p.draft, S = !1;
802
802
  v(p, { save: { kind: "saving" } });
803
- for (let L = 0; L < Ts; L += 1) {
804
- const M = await e.save(m, _.version, xs(b, p.ending), I);
803
+ for (let L = 0; L < Ls; L += 1) {
804
+ const M = await e.save(m, _.version, Os(b, p.ending), I);
805
805
  if (!y(m, p) || I.aborted || !("kind" in M)) return;
806
806
  if (M.kind === "saved") {
807
807
  f.get(m)?.flush(), p.base = { text: b, version: M.version }, q(m, p, { kind: "saved", merged: S }, { dirty: p.draft !== b });
@@ -815,12 +815,12 @@ const cn = Object.freeze(["en", "ja"]), cs = "en", It = (e) => `viewerSpreadshee
815
815
  q(m, p, { kind: "failed", failure: M.failure });
816
816
  return;
817
817
  }
818
- const { mergeDraft: P } = await import("./merge-BQgbDcHR.js");
818
+ const { mergeDraft: P } = await import("./merge-qfptirid.js");
819
819
  if (!y(m, p) || I.aborted) return;
820
820
  const H = f.get(m);
821
821
  H?.flush();
822
822
  const K = ft(M.text), w = P(_.text, p.draft, K, t());
823
- if (_ = { text: K, version: M.version }, p.base = _, p.ending = hn(M.text), p.draft = w.text, H?.adopt(w.text), w.kind === "conflicts") {
823
+ if (_ = { text: K, version: M.version }, p.base = _, p.ending = wn(M.text), p.draft = w.text, H?.adopt(w.text), w.kind === "conflicts") {
824
824
  q(m, p, { kind: "conflicts", count: w.conflicts }, { dirty: !0, generation: p.value.generation + 1 });
825
825
  return;
826
826
  }
@@ -868,7 +868,7 @@ const cn = Object.freeze(["en", "ja"]), cs = "en", It = (e) => `viewerSpreadshee
868
868
  I !== x.value.dirty && (A.dirty = I);
869
869
  const { save: _ } = x.value;
870
870
  if (_.kind === "conflicts") {
871
- const b = mn(p).length;
871
+ const b = gn(p).length;
872
872
  b === 0 ? A.save = mt : b !== _.count && (A.save = { kind: "conflicts", count: b });
873
873
  }
874
874
  (A.dirty !== void 0 || A.save !== void 0) && v(x, A);
@@ -940,10 +940,10 @@ const cn = Object.freeze(["en", "ja"]), cs = "en", It = (e) => `viewerSpreadshee
940
940
  setSideBySide: (m) => {
941
941
  d !== m && (d = m, r.write(m), l.emit());
942
942
  },
943
- editorShare: () => (h ??= o.read() ?? Eo, h),
943
+ editorShare: () => (h ??= o.read() ?? Ro, h),
944
944
  setEditorShare: (m) => {
945
945
  if (!Number.isFinite(m)) throw new RangeError(`[markdown-explorer] an editor share must be a finite number; got ${String(m)}`);
946
- const p = Math.min(Qn, Math.max(er, m));
946
+ const p = Math.min(nr, Math.max(rr, m));
947
947
  h !== p && (h = p, o.write(p));
948
948
  },
949
949
  setView: (m, p) => {
@@ -955,18 +955,18 @@ const cn = Object.freeze(["en", "ja"]), cs = "en", It = (e) => `viewerSpreadshee
955
955
  p !== void 0 && !p.value.previewPrepared && v(p, { previewPrepared: !0 });
956
956
  }
957
957
  };
958
- }, dr = (e) => {
958
+ }, mr = (e) => {
959
959
  e.preventDefault(), e.stopPropagation();
960
- }, Ls = (e) => e.endsWith("px") ? Number.parseFloat(e) : Number.NaN, ur = "data-aqmx-content-pane", Ot = Object.freeze({ [ur]: "" }), Ms = "--aqmx-dialog-left", As = "--aqmx-dialog-top", Ns = '[data-testid="markdown-explorer"]', Ds = (e) => {
961
- const t = e.closest(Ns)?.querySelectorAll(`[${ur}]`), n = t?.item(t.length - 1);
960
+ }, Ds = (e) => e.endsWith("px") ? Number.parseFloat(e) : Number.NaN, hr = "data-aqmx-content-pane", Lt = Object.freeze({ [hr]: "" }), Ps = "--aqmx-dialog-left", Is = "--aqmx-dialog-top", $s = '[data-testid="markdown-explorer"]', _s = (e) => {
961
+ const t = e.closest($s)?.querySelectorAll(`[${hr}]`), n = t?.item(t.length - 1);
962
962
  if (!(n instanceof HTMLElement)) throw new Error("[markdown-explorer] a dialog opened where the explorer marks no content pane");
963
963
  return n;
964
- }, Ps = (e) => {
965
- const t = Ls(getComputedStyle(e).marginTop);
964
+ }, Fs = (e) => {
965
+ const t = Ds(getComputedStyle(e).marginTop);
966
966
  if (Number.isNaN(t)) return null;
967
- const n = Ds(e), r = e.getBoundingClientRect(), o = e.ownerDocument.documentElement, { left: s, top: a } = So(n.getBoundingClientRect(), { width: r.width + 2 * t, height: r.height + 2 * t }, { width: o.clientWidth, height: o.clientHeight });
968
- return e.style.setProperty(Ms, `${String(s)}px`), e.style.setProperty(As, `${String(a)}px`), n;
969
- }, Is = (e) => e.preventDefault(), fr = ({ open: e, onOpen: t, onDismiss: n }) => {
967
+ const n = _s(e), r = e.getBoundingClientRect(), o = e.ownerDocument.documentElement, { left: s, top: a } = Co(n.getBoundingClientRect(), { width: r.width + 2 * t, height: r.height + 2 * t }, { width: o.clientWidth, height: o.clientHeight });
968
+ return e.style.setProperty(Ps, `${String(s)}px`), e.style.setProperty(Is, `${String(a)}px`), n;
969
+ }, qs = (e) => e.preventDefault(), pr = ({ open: e, onOpen: t, onDismiss: n }) => {
970
970
  const r = U(null), o = U(null), s = U(!1), a = U(t);
971
971
  Y(() => {
972
972
  a.current = t;
@@ -984,7 +984,7 @@ const cn = Object.freeze(["en", "ja"]), cs = "en", It = (e) => `viewerSpreadshee
984
984
  const d = new ResizeObserver(() => g());
985
985
  let h = null;
986
986
  const g = () => {
987
- const y = Ps(l);
987
+ const y = Fs(l);
988
988
  y === null || y === h || (h !== null && d.unobserve(h), d.observe(y), h = y);
989
989
  };
990
990
  g(), d.observe(l);
@@ -995,7 +995,7 @@ const cn = Object.freeze(["en", "ja"]), cs = "en", It = (e) => `viewerSpreadshee
995
995
  }, [e]);
996
996
  const i = F(
997
997
  (l) => {
998
- l.key !== "Escape" || l.defaultPrevented || (dr(l), n());
998
+ l.key !== "Escape" || l.defaultPrevented || (mr(l), n());
999
999
  },
1000
1000
  [n]
1001
1001
  ), f = F(
@@ -1006,9 +1006,9 @@ const cn = Object.freeze(["en", "ja"]), cs = "en", It = (e) => `viewerSpreadshee
1006
1006
  ), u = F(() => {
1007
1007
  s.current && n();
1008
1008
  }, [n]);
1009
- return { ref: r, onKeyDown: i, onClick: f, onCancel: Is, onClose: u };
1010
- }, mr = ({ open: e, title: t, body: n, confirmLabel: r, cancelLabel: o, onConfirm: s, onCancel: a, testId: i }) => {
1011
- const f = U(null), u = Te(), l = Te(), d = F(() => f.current?.focus(), []), h = fr({ open: e, onOpen: d, onDismiss: a });
1009
+ return { ref: r, onKeyDown: i, onClick: f, onCancel: qs, onClose: u };
1010
+ }, gr = ({ open: e, title: t, body: n, confirmLabel: r, cancelLabel: o, onConfirm: s, onCancel: a, testId: i }) => {
1011
+ const f = U(null), u = Te(), l = Te(), d = F(() => f.current?.focus(), []), h = pr({ open: e, onOpen: d, onDismiss: a });
1012
1012
  return /* @__PURE__ */ c("dialog", { ...h, className: "aqmx-confirm", "aria-labelledby": u, "aria-describedby": l, "data-testid": i, children: /* @__PURE__ */ B("div", { className: "aqmx-confirm-panel", children: [
1013
1013
  /* @__PURE__ */ c("p", { id: u, className: "aqmx-confirm-title", children: t }),
1014
1014
  /* @__PURE__ */ c("p", { id: l, className: "aqmx-confirm-body", children: n }),
@@ -1027,7 +1027,7 @@ const cn = Object.freeze(["en", "ja"]), cs = "en", It = (e) => `viewerSpreadshee
1027
1027
  t.status = "rejected", t.reason = n;
1028
1028
  }
1029
1029
  )), t;
1030
- }, hr = (e) => Object.assign(Promise.resolve(e), { status: "fulfilled", value: e }), Ae = (e) => e.status === "fulfilled" ? e.value : void 0, $s = Object.freeze({ readme: Object.freeze({ status: "loading" }), claim: !1 }), _s = Object.freeze({ readme: Object.freeze({ status: "loading" }), claim: !0 }), Fs = (e, t, n) => {
1030
+ }, wr = (e) => Object.assign(Promise.resolve(e), { status: "fulfilled", value: e }), Ae = (e) => e.status === "fulfilled" ? e.value : void 0, Bs = Object.freeze({ readme: Object.freeze({ status: "loading" }), claim: !1 }), Us = Object.freeze({ readme: Object.freeze({ status: "loading" }), claim: !0 }), Hs = (e, t, n) => {
1031
1031
  const r = /* @__PURE__ */ new Set(), o = [...e].reverse();
1032
1032
  for (let s = o.pop(); s !== void 0; s = o.pop()) {
1033
1033
  if (s.type !== "directory" || r.has(s.path)) continue;
@@ -1037,21 +1037,21 @@ const cn = Object.freeze(["en", "ja"]), cs = "en", It = (e) => `viewerSpreadshee
1037
1037
  if (i !== null) for (const f of [...i].reverse()) o.push(f);
1038
1038
  }
1039
1039
  return null;
1040
- }, qs = (e, t, n) => {
1040
+ }, zs = (e, t, n) => {
1041
1041
  const r = Ae(e.read(t));
1042
- if (r === void 0 || r.status === "deferred") return $s;
1042
+ if (r === void 0 || r.status === "deferred") return Bs;
1043
1043
  if (r.status === "error") return { readme: { status: "failed", failure: r.failure, retry: () => e.retry(t) }, claim: !1 };
1044
- const o = Fs(r.entries, n, (a) => e.children(t, a));
1045
- if (o !== null) return { readme: { status: "ok", readme: Qt(o) }, claim: !1 };
1044
+ const o = Hs(r.entries, n, (a) => e.children(t, a));
1045
+ if (o !== null) return { readme: { status: "ok", readme: nn(o) }, claim: !1 };
1046
1046
  const s = e.children(t, n);
1047
- return s === void 0 || s.status === "loading" ? _s : s.status === "failed" ? { readme: { status: "failed", failure: s.failure, retry: () => e.retryChildren(t, n) }, claim: !0 } : { readme: { status: "ok", readme: Qt(s.entries) }, claim: !0 };
1048
- }, Bs = (e, t, n) => {
1049
- const { readme: r } = qs(e, t, n);
1047
+ return s === void 0 || s.status === "loading" ? Us : s.status === "failed" ? { readme: { status: "failed", failure: s.failure, retry: () => e.retryChildren(t, n) }, claim: !0 } : { readme: { status: "ok", readme: nn(s.entries) }, claim: !0 };
1048
+ }, js = (e, t, n) => {
1049
+ const { readme: r } = zs(e, t, n);
1050
1050
  return r.status === "ok" ? r.readme : null;
1051
- }, Us = (e, t, n) => {
1052
- const r = go({ path: `${e.basePath}/*`, end: !0 }, t.pathname);
1051
+ }, Vs = (e, t, n) => {
1052
+ const r = yo({ path: `${e.basePath}/*`, end: !0 }, t.pathname);
1053
1053
  if (r === null) return /* @__PURE__ */ new Set();
1054
- const { location: o } = Jn(e, r.params["*"], new URLSearchParams(t.search));
1054
+ const { location: o } = tr(e, r.params["*"], new URLSearchParams(t.search));
1055
1055
  switch (o.view) {
1056
1056
  case "tree": {
1057
1057
  const s = o.folder === null ? o.doc : n(o.source, o.folder);
@@ -1062,24 +1062,24 @@ const cn = Object.freeze(["en", "ja"]), cs = "en", It = (e) => `viewerSpreadshee
1062
1062
  case "multi":
1063
1063
  return new Set(o.docs);
1064
1064
  }
1065
- }, pr = (e) => {
1065
+ }, vr = (e) => {
1066
1066
  const { edits: t } = $(), n = F(() => t.session(e), [t, e]);
1067
- return oe(t.subscribe, n, Hs);
1068
- }, gr = () => !1, Hs = () => {
1069
- }, zs = () => {
1067
+ return re(t.subscribe, n, Zs);
1068
+ }, br = () => !1, Zs = () => {
1069
+ }, Ws = () => {
1070
1070
  const { edits: e } = $();
1071
- return oe(e.subscribe, e.hasSessions, gr);
1072
- }, js = () => {
1071
+ return re(e.subscribe, e.hasSessions, br);
1072
+ }, Gs = () => {
1073
1073
  const { edits: e } = $();
1074
- return oe(e.subscribe, e.sideBySide, gr);
1075
- }, Vs = () => null, Zs = () => {
1074
+ return re(e.subscribe, e.sideBySide, br);
1075
+ }, Ks = () => null, Ys = () => {
1076
1076
  const { edits: e, labels: t, config: n, trees: r } = $(), o = U([]), s = F(
1077
1077
  ({ nextLocation: g }) => {
1078
- const v = Us(n, g, (y, T) => Bs(r, y, T));
1078
+ const v = Vs(n, g, (y, T) => js(r, y, T));
1079
1079
  return e.flushDrafts(), o.current = e.dirtyPaths().filter((y) => !v.has(y)), o.current.length > 0;
1080
1080
  },
1081
1081
  [e, n, r]
1082
- ), a = wo(s), i = zs();
1082
+ ), a = ko(s), i = Ws();
1083
1083
  ee(() => {
1084
1084
  if (!i) return;
1085
1085
  const g = (v) => {
@@ -1087,9 +1087,9 @@ const cn = Object.freeze(["en", "ja"]), cs = "en", It = (e) => `viewerSpreadshee
1087
1087
  };
1088
1088
  return window.addEventListener("beforeunload", g), () => window.removeEventListener("beforeunload", g);
1089
1089
  }, [i, e]);
1090
- const f = oe(e.subscribe, e.discardRequest, Vs), u = a.state === "blocked", l = u ? o.current : f === null ? [] : f.paths, d = l.map((g) => fe(g)).join(", "), h = l.length > 0 && l.every((g) => e.session(g)?.save.kind === "draft");
1090
+ const f = re(e.subscribe, e.discardRequest, Ks), u = a.state === "blocked", l = u ? o.current : f === null ? [] : f.paths, d = l.map((g) => fe(g)).join(", "), h = l.length > 0 && l.every((g) => e.session(g)?.save.kind === "draft");
1091
1091
  return /* @__PURE__ */ c(
1092
- mr,
1092
+ gr,
1093
1093
  {
1094
1094
  open: u || f !== null,
1095
1095
  title: h ? t.draftDiscardTitle : t.unsavedTitle,
@@ -1114,7 +1114,7 @@ const cn = Object.freeze(["en", "ja"]), cs = "en", It = (e) => `viewerSpreadshee
1114
1114
  }
1115
1115
  );
1116
1116
  };
1117
- function Ws({
1117
+ function Xs({
1118
1118
  title: e,
1119
1119
  titleId: t,
1120
1120
  ...n
@@ -1135,18 +1135,18 @@ function Ws({
1135
1135
  clipRule: "evenodd"
1136
1136
  }));
1137
1137
  }
1138
- const Gs = /* @__PURE__ */ E.forwardRef(Ws);
1138
+ const Js = /* @__PURE__ */ E.forwardRef(Xs);
1139
1139
  let ht = null;
1140
- const wr = () => (ht ??= import("./EditSurface-BYKUL-a1.js").catch((e) => {
1140
+ const yr = () => (ht ??= import("./EditSurface-BrdChI9n.js").catch((e) => {
1141
1141
  throw ht = null, e;
1142
- }), ht), Ks = () => {
1143
- wr().catch(() => {
1142
+ }), ht), Qs = () => {
1143
+ yr().catch(() => {
1144
1144
  });
1145
- }, Ys = (e) => {
1146
- const { default: t } = se(wr());
1145
+ }, ea = (e) => {
1146
+ const { default: t } = se(yr());
1147
1147
  return /* @__PURE__ */ c(t, { ...e });
1148
1148
  };
1149
- class Xs extends Yn {
1149
+ class ta extends Qn {
1150
1150
  state = { failed: !1 };
1151
1151
  static getDerivedStateFromError() {
1152
1152
  return { failed: !0 };
@@ -1156,55 +1156,55 @@ class Xs extends Yn {
1156
1156
  return this.state.failed ? this.props.fallback(this.retry) : this.props.children;
1157
1157
  }
1158
1158
  }
1159
- const _t = `[${nr}]`, Js = "[data-aqmd-content]", Qs = 'a[href], button, input, select, textarea, summary, label, [contenteditable], [role="menu"], iframe, video, audio, object, embed, svg, [data-aqmd-spreadsheet-editable], [data-aqmd-spreadsheet-fullscreen], [data-aqmd-svg-image-source]', ea = 200, _e = (e) => ts(e.getAttribute(nr)), ta = (e, t) => {
1159
+ const qt = `[${sr}]`, na = "[data-aqmd-content]", ra = 'a[href], button, input, select, textarea, summary, label, [contenteditable], [role="menu"], iframe, video, audio, object, embed, svg, [data-aqmd-spreadsheet-editable], [data-aqmd-spreadsheet-fullscreen], [data-aqmd-svg-image-source]', oa = 200, _e = (e) => ss(e.getAttribute(sr)), sa = (e, t) => {
1160
1160
  for (let r = e; r !== null && t.contains(r); r = r.parentElement) {
1161
1161
  const o = _e(r);
1162
1162
  if (o !== null) return { block: r, lines: o, own: !0 };
1163
1163
  }
1164
1164
  let n = null;
1165
- for (const r of t.querySelectorAll(_t)) {
1165
+ for (const r of t.querySelectorAll(qt)) {
1166
1166
  if (!(r.compareDocumentPosition(e) & Node.DOCUMENT_POSITION_FOLLOWING)) break;
1167
1167
  const o = _e(r);
1168
1168
  o !== null && (n = { block: r, lines: o });
1169
1169
  }
1170
1170
  return n === null ? null : { ...n, own: !1 };
1171
- }, na = (e, t) => {
1171
+ }, aa = (e, t) => {
1172
1172
  let n = 0;
1173
1173
  for (let r = e.indexOf(t); r >= 0; r = e.indexOf(t, r + t.length)) n += 1;
1174
1174
  return n;
1175
- }, ra = (e) => e.closest(Js) !== null && e.closest(Qs) === null, oa = (e, t, n) => {
1176
- const r = ta(e, t);
1175
+ }, ia = (e) => e.closest(na) !== null && e.closest(ra) === null, la = (e, t, n) => {
1176
+ const r = sa(e, t);
1177
1177
  if (r === null) return null;
1178
1178
  const { block: o, own: s } = r;
1179
1179
  if (!s) {
1180
1180
  const i = r.lines.last + 1;
1181
1181
  return { lines: { first: i, last: i }, word: null, occurrence: 0, clientTop: Qe(e) };
1182
1182
  }
1183
- const a = la(o, n);
1183
+ const a = fa(o, n);
1184
1184
  return a === null ? { lines: r.lines, word: null, occurrence: 0, clientTop: Qe(o) } : { lines: r.lines, word: a.text, occurrence: a.occurrence, clientTop: a.clientTop };
1185
- }, sa = (e, t) => {
1185
+ }, ca = (e, t) => {
1186
1186
  let n = null, r = null, o = null;
1187
- for (const a of e.querySelectorAll(_t)) {
1187
+ for (const a of e.querySelectorAll(qt)) {
1188
1188
  const i = _e(a);
1189
1189
  if (i === null) continue;
1190
- n ??= ia(t, a);
1190
+ n ??= ua(t, a);
1191
1191
  const { top: f, bottom: u } = a.getBoundingClientRect();
1192
1192
  f <= n && n < u ? r = { lines: i, block: a } : o === null && f >= n && (o = { lines: i, block: a });
1193
1193
  }
1194
1194
  const s = r === null ? o : r;
1195
1195
  return s === null ? null : { lines: s.lines, word: null, occurrence: 0, clientTop: Qe(s.block) };
1196
- }, aa = (e) => e === e.ownerDocument.scrollingElement ? 0 : e.getBoundingClientRect().top + e.clientTop, ia = (e, t) => {
1196
+ }, da = (e) => e === e.ownerDocument.scrollingElement ? 0 : e.getBoundingClientRect().top + e.clientTop, ua = (e, t) => {
1197
1197
  const n = Number.parseFloat(getComputedStyle(t).scrollMarginTop);
1198
- return aa(e) + (Number.isFinite(n) ? n : 0);
1199
- }, la = (e, t) => {
1198
+ return da(e) + (Number.isFinite(n) ? n : 0);
1199
+ }, fa = (e, t) => {
1200
1200
  if (t === null || t.rangeCount === 0) return null;
1201
1201
  const n = t.getRangeAt(0);
1202
1202
  if (!(e.contains(n.startContainer) && e.contains(n.endContainer))) return null;
1203
1203
  const r = n.toString().trim();
1204
- if (r === "" || r.length > ea || /[\r\n]/u.test(r)) return null;
1204
+ if (r === "" || r.length > oa || /[\r\n]/u.test(r)) return null;
1205
1205
  const o = e.ownerDocument.createRange();
1206
- return o.setStart(e, 0), o.setEnd(n.startContainer, n.startOffset), { text: r, occurrence: na(o.toString(), r), clientTop: n.getBoundingClientRect().top };
1207
- }, lu = (e, t) => {
1206
+ return o.setStart(e, 0), o.setEnd(n.startContainer, n.startOffset), { text: r, occurrence: aa(o.toString(), r), clientTop: n.getBoundingClientRect().top };
1207
+ }, wu = (e, t) => {
1208
1208
  const n = e.split(`
1209
1209
  `), r = Math.min(t.lines.first, n.length), o = Math.min(t.lines.last, n.length), s = { line: r, column: 0 };
1210
1210
  if (t.word === null) return s;
@@ -1216,21 +1216,21 @@ const _t = `[${nr}]`, Js = "[data-aqmd-content]", Qs = 'a[href], button, input,
1216
1216
  a += 1;
1217
1217
  }
1218
1218
  }
1219
- return a > 0 ? ca(n, r, o, t.word) ?? s : s;
1220
- }, ca = (e, t, n, r) => {
1219
+ return a > 0 ? ma(n, r, o, t.word) ?? s : s;
1220
+ }, ma = (e, t, n, r) => {
1221
1221
  for (let o = n; o >= t; o -= 1) {
1222
1222
  const s = (e[o - 1] ?? "").lastIndexOf(r);
1223
1223
  if (s >= 0) return { line: o, column: s };
1224
1224
  }
1225
1225
  return null;
1226
- }, da = (e, t) => {
1226
+ }, ha = (e, t) => {
1227
1227
  let n = null, r = null;
1228
- for (const o of e.querySelectorAll(_t)) {
1228
+ for (const o of e.querySelectorAll(qt)) {
1229
1229
  const s = _e(o);
1230
1230
  s === null || s.first > t || (s.last >= t ? n = o : (r === null || s.last >= r.last) && (r = { element: o, last: s.last }));
1231
1231
  }
1232
1232
  return n !== null ? n : r === null ? null : r.element;
1233
- }, ua = (e, t) => {
1233
+ }, pa = (e, t) => {
1234
1234
  const { bottom: n } = e.getBoundingClientRect(), r = Qe(e), o = _e(e);
1235
1235
  if (o === null) return r;
1236
1236
  const s = Math.min(Math.max(t - o.first, 0) / (o.last - o.first + 1), 1);
@@ -1246,20 +1246,20 @@ const _t = `[${nr}]`, Js = "[data-aqmd-content]", Qs = 'a[href], button, input,
1246
1246
  if (i > 0) return a;
1247
1247
  }
1248
1248
  return e.getBoundingClientRect().top;
1249
- }, Ft = Object.freeze({
1249
+ }, Bt = Object.freeze({
1250
1250
  browse: Object.freeze({ replace: !0, preventScrollReset: !0, defaultShouldRevalidate: !1 }),
1251
1251
  "switch-source": Object.freeze({ replace: !1, preventScrollReset: !0, defaultShouldRevalidate: !1 }),
1252
1252
  "switch-view": Object.freeze({ replace: !1, preventScrollReset: !1, defaultShouldRevalidate: !1 }),
1253
1253
  "follow-link": Object.freeze({ replace: !1, preventScrollReset: !1, defaultShouldRevalidate: !1 })
1254
- }), cu = (e) => Ft[e], ot = () => {
1255
- const e = vo();
1254
+ }), vu = (e) => Bt[e], ot = () => {
1255
+ const e = Eo();
1256
1256
  return F(
1257
1257
  (t, n) => {
1258
- e(t, Ft[n]);
1258
+ e(t, Bt[n]);
1259
1259
  },
1260
1260
  [e]
1261
1261
  );
1262
- }, fa = ({ navigation: e, ...t }) => /* @__PURE__ */ c(bo, { ...t, ...Ft[e] }), vr = (e) => {
1262
+ }, ga = ({ navigation: e, ...t }) => /* @__PURE__ */ c(So, { ...t, ...Bt[e] }), kr = (e) => {
1263
1263
  const t = e.ownerDocument;
1264
1264
  if (e.focus({ preventScroll: !0 }), t.activeElement === e) return !0;
1265
1265
  if (e.hasAttribute("tabindex")) return !1;
@@ -1269,7 +1269,7 @@ const _t = `[${nr}]`, Js = "[data-aqmd-content]", Qs = 'a[href], button, input,
1269
1269
  t.activeElement !== e && (e.removeAttribute("tabindex"), e.removeEventListener("blur", n));
1270
1270
  };
1271
1271
  return e.addEventListener("blur", n), !0;
1272
- }, ma = (e, t) => {
1272
+ }, wa = (e, t) => {
1273
1273
  const n = U(null), r = U(null), o = U(null), s = F(() => {
1274
1274
  n.current !== null && window.clearTimeout(n.current), n.current = null, r.current = null;
1275
1275
  }, []);
@@ -1296,7 +1296,7 @@ const _t = `[${nr}]`, Js = "[data-aqmd-content]", Qs = 'a[href], button, input,
1296
1296
  const l = t(u);
1297
1297
  l !== r.current && (s(), l !== null && (r.current = l, n.current = window.setTimeout(() => {
1298
1298
  n.current = null, a(l);
1299
- }, xo)));
1299
+ }, Oo)));
1300
1300
  },
1301
1301
  [s, t, a]
1302
1302
  ), f = F(
@@ -1314,8 +1314,8 @@ const _t = `[${nr}]`, Js = "[data-aqmd-content]", Qs = 'a[href], button, input,
1314
1314
  }),
1315
1315
  [i, f]
1316
1316
  );
1317
- }, ha = Pt(() => import("./NativeScrollBar-DLdveoaN.js").then((e) => ({ default: e.NativeScrollBar })));
1318
- class pa extends Yn {
1317
+ }, va = $t(() => import("./NativeScrollBar-ybJw3OHE.js").then((e) => ({ default: e.NativeScrollBar })));
1318
+ class ba extends Qn {
1319
1319
  state = { failed: !1 };
1320
1320
  static getDerivedStateFromError() {
1321
1321
  return { failed: !0 };
@@ -1327,7 +1327,33 @@ class pa extends Yn {
1327
1327
  return this.state.failed ? null : this.props.children;
1328
1328
  }
1329
1329
  }
1330
- const ga = ({ scroller: e, withCircle: t }) => /* @__PURE__ */ c(pa, { children: /* @__PURE__ */ c(Ie, { fallback: null, children: /* @__PURE__ */ c(ha, { scroller: e, withCircle: t }) }) }), br = (e) => /* @__PURE__ */ c(ga, { scroller: e, withCircle: !0 }), du = 8, yr = To, kr = Ro[3], Er = yr + 2 * kr, uu = -(yr + kr), Sr = () => {
1330
+ const ya = ({ scroller: e, withCircle: t }) => /* @__PURE__ */ c(ba, { children: /* @__PURE__ */ c(Ie, { fallback: null, children: /* @__PURE__ */ c(va, { scroller: e, withCircle: t }) }) }), Er = (e) => /* @__PURE__ */ c(ya, { scroller: e, withCircle: !0 }), bu = 8, Ut = Lo, Sr = Mo[3], xr = Ut + 2 * Sr, yu = -(Ut + Sr), ka = Object.freeze({ minSpeedMultiplier: 0.25, maxSpeedMultiplier: 18 });
1331
+ let Tr = null, pt = null;
1332
+ const Mt = /* @__PURE__ */ new Set(), Ea = (e) => (Mt.add(e), () => {
1333
+ Mt.delete(e);
1334
+ }), Sa = () => {
1335
+ pt === null && (pt = import("./tapScrollCircle-DYmzWI-8.js").then((e) => {
1336
+ const t = e.TAP_SCROLL_CIRCLE.renderVisual;
1337
+ if (t === void 0) throw new TypeError("[markdown-explorer] the bars' tap-scroll circle has no look to share");
1338
+ Tr = t;
1339
+ for (const n of [...Mt]) n();
1340
+ }).catch((e) => {
1341
+ pt = null, console.error("[markdown-explorer] the look of a table's tap-scroll circle failed to load; the circle still scrolls without it.", e);
1342
+ }));
1343
+ }, xa = ({ look: e, state: t }) => e(t), Ta = (e) => {
1344
+ const t = re(
1345
+ Ea,
1346
+ () => Tr,
1347
+ () => null
1348
+ );
1349
+ return ee(() => {
1350
+ t === null && Sa();
1351
+ }, [t]), t === null ? null : /* @__PURE__ */ c(xa, { look: t, state: e });
1352
+ }, Rr = Object.freeze({
1353
+ renderVisual: (e) => /* @__PURE__ */ c(Ta, { ...e }),
1354
+ ...ka,
1355
+ size: Ut
1356
+ }), Cr = () => {
1331
1357
  const e = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Set();
1332
1358
  let n = !1;
1333
1359
  const r = (o) => {
@@ -1361,9 +1387,9 @@ const ga = ({ scroller: e, withCircle: t }) => /* @__PURE__ */ c(pa, { children:
1361
1387
  return !(Array.isArray(e) && Array.isArray(t)) || e.length !== t.length ? !1 : e.every((s, a) => et(s, t[a]));
1362
1388
  const n = e, r = t, o = Object.keys(n);
1363
1389
  return o.length !== Object.keys(r).length ? !1 : o.every((s) => Object.hasOwn(r, s) && et(n[s], r[s]));
1364
- }, wa = 55e3, gn = Object.freeze({ status: "deferred" }), pt = Object.freeze({ status: "refreshed" }), gt = Object.freeze({ status: "shown", failed: !1 }), je = Object.freeze({ status: "shown", failed: !0 }), Ve = Object.freeze({ status: "superseded" }), ge = (e) => e === void 0 || e.status === "deferred" ? null : e.status === "loaded" ? e : e.previous, va = (e) => e !== void 0 && e.status === "loaded" && e.document.kind !== "failure", ba = ({ client: e, capacity: t }) => {
1390
+ }, Ra = 55e3, bn = Object.freeze({ status: "deferred" }), gt = Object.freeze({ status: "refreshed" }), wt = Object.freeze({ status: "shown", failed: !1 }), je = Object.freeze({ status: "shown", failed: !0 }), Ve = Object.freeze({ status: "superseded" }), ge = (e) => e === void 0 || e.status === "deferred" ? null : e.status === "loaded" ? e : e.previous, Ca = (e) => e !== void 0 && e.status === "loaded" && e.document.kind !== "failure", Oa = ({ client: e, capacity: t }) => {
1365
1391
  if (!Number.isInteger(t) || t < 1) throw new RangeError(`[markdown-explorer] the document cache capacity must be a positive integer; got ${String(t)}`);
1366
- const n = /* @__PURE__ */ new Map(), r = Sr(), o = qe(), s = /* @__PURE__ */ new WeakSet(), a = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), f = /* @__PURE__ */ new Map();
1392
+ const n = /* @__PURE__ */ new Map(), r = Cr(), o = qe(), s = /* @__PURE__ */ new WeakSet(), a = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), f = /* @__PURE__ */ new Map();
1367
1393
  let u = 0;
1368
1394
  const l = o.emit, d = () => (u += 1, u), h = () => {
1369
1395
  if (!(n.size <= t))
@@ -1373,7 +1399,7 @@ const ga = ({ scroller: e, withCircle: t }) => /* @__PURE__ */ c(pa, { children:
1373
1399
  }
1374
1400
  }, g = (b, S) => {
1375
1401
  n.delete(b), n.set(b, S);
1376
- }, v = (b) => performance.now() - b.validatedAt >= wa, y = (b, S, L) => {
1402
+ }, v = (b) => performance.now() - b.validatedAt >= Ra, y = (b, S, L) => {
1377
1403
  const M = n.get(b), P = ge(M?.snapshot), H = L || M?.refreshPending === !0, K = $e(e.document(b, { refresh: H }).then((k) => ({ status: "loaded", document: k }))), w = { snapshot: { status: "pending", promise: K, previous: P }, validatedAt: performance.now(), opened: S, background: null, refreshPending: !1, seeded: void 0, stamp: d() };
1378
1404
  return g(b, w), h(), K.then((k) => {
1379
1405
  n.get(b) === w && (w.snapshot = k, w.stamp = d(), l());
@@ -1420,15 +1446,15 @@ const ga = ({ scroller: e, withCircle: t }) => /* @__PURE__ */ c(pa, { children:
1420
1446
  }, p = async (b, S, L) => {
1421
1447
  const M = await new Promise((P) => m(b, { stamp: S.stamp, resolve: P }));
1422
1448
  if (n.get(b) !== S) return Ve;
1423
- if (M === null) return L ? pt : gt;
1424
- if (!L) return M.failure === null ? gt : je;
1449
+ if (M === null) return L ? gt : wt;
1450
+ if (!L) return M.failure === null ? wt : je;
1425
1451
  switch (M.before) {
1426
1452
  case "copy":
1427
- return M.failure === null ? pt : { status: "failed", failure: M.failure };
1453
+ return M.failure === null ? gt : { status: "failed", failure: M.failure };
1428
1454
  case "failure":
1429
- return M.failure === null ? gt : je;
1455
+ return M.failure === null ? wt : je;
1430
1456
  case "none":
1431
- return M.failure === null ? pt : je;
1457
+ return M.failure === null ? gt : je;
1432
1458
  }
1433
1459
  }, x = (b) => {
1434
1460
  const S = { showing: "none", last: null, waiters: /* @__PURE__ */ new Set() };
@@ -1487,8 +1513,8 @@ const ga = ({ scroller: e, withCircle: t }) => /* @__PURE__ */ c(pa, { children:
1487
1513
  seed: (b, S) => {
1488
1514
  const L = performance.now(), M = $e(
1489
1515
  S.then(
1490
- (k) => k === null ? gn : { status: "loaded", document: k },
1491
- () => gn
1516
+ (k) => k === null ? bn : { status: "loaded", document: k },
1517
+ () => bn
1492
1518
  )
1493
1519
  ), P = n.get(b);
1494
1520
  if (P !== void 0 && P.snapshot.status === "loaded") {
@@ -1524,7 +1550,7 @@ const ga = ({ scroller: e, withCircle: t }) => /* @__PURE__ */ c(pa, { children:
1524
1550
  },
1525
1551
  refresh: async (b) => {
1526
1552
  const S = n.get(b);
1527
- if (S !== void 0 && va(S.snapshot)) {
1553
+ if (S !== void 0 && Ca(S.snapshot)) {
1528
1554
  S.refreshPending = !0;
1529
1555
  const P = await O(b, S);
1530
1556
  return P === null ? Ve : P.kind === "failure" ? { status: "failed", failure: P.failure } : p(b, S, !0);
@@ -1551,11 +1577,11 @@ const ga = ({ scroller: e, withCircle: t }) => /* @__PURE__ */ c(pa, { children:
1551
1577
  },
1552
1578
  noteFailureShown: (b) => s.has(b) ? !1 : (s.add(b), !0)
1553
1579
  };
1554
- }, we = ve("fill"), ya = "--aqmx-tap-circle-gutter", ka = Object.freeze({ blockSize: "100%", [ya]: `${String(Er)}px` }), Be = ({ scrollerProps: e, children: t }) => se(we) === "content" ? /* @__PURE__ */ c(sn, { scrollerProps: e, children: t }) : /* @__PURE__ */ c(sn, { scrollerProps: { ...e, style: ka }, rowClassName: "aqmx-document-scroll-row", renderScrollBar: br, children: t }), Ea = Object.freeze(["l1", "l2", "l3", "l4", "l5", "l6", "l7", "l8"]), Sa = Object.freeze({ className: "aqmx-document-failure", "data-aqmx-document-scroller": "" }), Ce = ({ label: e, testId: t }) => /* @__PURE__ */ B(pe, { children: [
1555
- /* @__PURE__ */ c("div", { className: "aqmx-skeleton", "aria-hidden": "true", "data-testid": t, children: Ea.map((n) => /* @__PURE__ */ c("span", {}, n)) }),
1580
+ }, we = ve("fill"), La = "--aqmx-tap-circle-gutter", Ma = Object.freeze({ blockSize: "100%", [La]: `${String(xr)}px` }), Be = ({ scrollerProps: e, children: t }) => se(we) === "content" ? /* @__PURE__ */ c(cn, { scrollerProps: e, children: t }) : /* @__PURE__ */ c(cn, { scrollerProps: { ...e, style: Ma }, rowClassName: "aqmx-document-scroll-row", renderScrollBar: Er, children: t }), Aa = Object.freeze(["l1", "l2", "l3", "l4", "l5", "l6", "l7", "l8"]), Na = Object.freeze({ className: "aqmx-document-failure", "data-aqmx-document-scroller": "" }), Ce = ({ label: e, testId: t }) => /* @__PURE__ */ B(pe, { children: [
1581
+ /* @__PURE__ */ c("div", { className: "aqmx-skeleton", "aria-hidden": "true", "data-testid": t, children: Aa.map((n) => /* @__PURE__ */ c("span", {}, n)) }),
1556
1582
  /* @__PURE__ */ c("p", { className: "aqmx-sr-only", children: e })
1557
- ] }), qt = ({ failure: e, onRetry: t, testId: n }) => /* @__PURE__ */ c(Be, { scrollerProps: Sa, children: /* @__PURE__ */ c(Re, { failure: e, alert: !1, onRetry: t, testId: n }) });
1558
- function xa({
1583
+ ] }), Ht = ({ failure: e, onRetry: t, testId: n }) => /* @__PURE__ */ c(Be, { scrollerProps: Na, children: /* @__PURE__ */ c(Re, { failure: e, alert: !1, onRetry: t, testId: n }) });
1584
+ function Da({
1559
1585
  title: e,
1560
1586
  titleId: t,
1561
1587
  ...n
@@ -1580,8 +1606,8 @@ function xa({
1580
1606
  clipRule: "evenodd"
1581
1607
  }));
1582
1608
  }
1583
- const Ta = /* @__PURE__ */ E.forwardRef(xa);
1584
- function Ra({
1609
+ const Pa = /* @__PURE__ */ E.forwardRef(Da);
1610
+ function Ia({
1585
1611
  title: e,
1586
1612
  titleId: t,
1587
1613
  ...n
@@ -1604,8 +1630,8 @@ function Ra({
1604
1630
  d: "M3.5 6A1.5 1.5 0 0 0 2 7.5v9A1.5 1.5 0 0 0 3.5 18h7a1.5 1.5 0 0 0 1.5-1.5v-5.879a1.5 1.5 0 0 0-.44-1.06L8.44 6.439A1.5 1.5 0 0 0 7.378 6H3.5Z"
1605
1631
  }));
1606
1632
  }
1607
- const Ca = /* @__PURE__ */ E.forwardRef(Ra);
1608
- function Oa({
1633
+ const $a = /* @__PURE__ */ E.forwardRef(Ia);
1634
+ function _a({
1609
1635
  title: e,
1610
1636
  titleId: t,
1611
1637
  ...n
@@ -1626,33 +1652,33 @@ function Oa({
1626
1652
  clipRule: "evenodd"
1627
1653
  }));
1628
1654
  }
1629
- const La = /* @__PURE__ */ E.forwardRef(Oa), Ma = 2e3, wn = Object.freeze({ outcome: "idle" }), Aa = (e) => {
1655
+ const Fa = /* @__PURE__ */ E.forwardRef(_a), qa = 2e3, yn = Object.freeze({ outcome: "idle" }), Ba = (e) => {
1630
1656
  const t = navigator.clipboard;
1631
1657
  return t === void 0 ? Promise.reject(new Error("[markdown-explorer] this browser has no asynchronous clipboard")) : t.writeText(e);
1632
- }, Na = ({ text: e }) => {
1633
- const { announcer: t, labels: n } = $(), [r, o] = V(wn);
1658
+ }, Ua = ({ text: e }) => {
1659
+ const { announcer: t, labels: n } = $(), [r, o] = V(yn);
1634
1660
  ee(() => {
1635
1661
  if (r.outcome === "idle") return;
1636
- const f = setTimeout(() => o(wn), Ma);
1662
+ const f = setTimeout(() => o(yn), qa);
1637
1663
  return () => clearTimeout(f);
1638
1664
  }, [r]);
1639
1665
  const s = (f) => {
1640
1666
  o({ outcome: f }), t.announce(f === "copied" ? n.copiedText : n.copyTextFailed);
1641
1667
  }, a = () => {
1642
- Aa(e).then(
1668
+ Ba(e).then(
1643
1669
  () => s("copied"),
1644
1670
  () => s("failed")
1645
1671
  );
1646
1672
  }, i = r.outcome === "copied" ? n.copiedText : r.outcome === "failed" ? n.copyTextFailed : n.copyText;
1647
1673
  return (
1648
- /* @__PURE__ */ c("button", { type: "button", className: "aqmx-icon-button", "aria-label": n.copyText, title: i, onClick: a, "data-aqmx-copy-outcome": r.outcome, "data-testid": "markdown-explorer-file-copy", children: r.outcome === "copied" ? /* @__PURE__ */ c(Ta, {}) : r.outcome === "failed" ? /* @__PURE__ */ c(La, {}) : /* @__PURE__ */ c(Ca, {}) })
1674
+ /* @__PURE__ */ c("button", { type: "button", className: "aqmx-icon-button", "aria-label": n.copyText, title: i, onClick: a, "data-aqmx-copy-outcome": r.outcome, "data-testid": "markdown-explorer-file-copy", children: r.outcome === "copied" ? /* @__PURE__ */ c(Pa, {}) : r.outcome === "failed" ? /* @__PURE__ */ c(Fa, {}) : /* @__PURE__ */ c($a, {}) })
1649
1675
  );
1650
- }, xr = ve(null), Da = () => {
1651
- const e = se(xr);
1676
+ }, Or = ve(null), Ha = () => {
1677
+ const e = se(Or);
1652
1678
  if (e === null) throw new Error("[markdown-explorer] a document's content reads its own part only inside a document pane (DocumentContentChannelContext)");
1653
1679
  return e;
1654
1680
  };
1655
- function Pa({
1681
+ function za({
1656
1682
  title: e,
1657
1683
  titleId: t,
1658
1684
  ...n
@@ -1673,8 +1699,8 @@ function Pa({
1673
1699
  d: "M3.5 12.75a.75.75 0 0 0-1.5 0v2.5A2.75 2.75 0 0 0 4.75 18h10.5A2.75 2.75 0 0 0 18 15.25v-2.5a.75.75 0 0 0-1.5 0v2.5c0 .69-.56 1.25-1.25 1.25H4.75c-.69 0-1.25-.56-1.25-1.25v-2.5Z"
1674
1700
  }));
1675
1701
  }
1676
- const Ia = /* @__PURE__ */ E.forwardRef(Pa);
1677
- function $a({
1702
+ const ja = /* @__PURE__ */ E.forwardRef(za);
1703
+ function Va({
1678
1704
  title: e,
1679
1705
  titleId: t,
1680
1706
  ...n
@@ -1699,17 +1725,17 @@ function $a({
1699
1725
  clipRule: "evenodd"
1700
1726
  }));
1701
1727
  }
1702
- const _a = /* @__PURE__ */ E.forwardRef($a), Ue = ({ name: e, openUrl: t, downloadUrl: n, icon: r, children: o }) => {
1728
+ const Za = /* @__PURE__ */ E.forwardRef(Va), Ue = ({ name: e, openUrl: t, downloadUrl: n, icon: r, children: o }) => {
1703
1729
  const { labels: s } = $();
1704
1730
  return /* @__PURE__ */ B("div", { className: "aqmx-document-toolbar", children: [
1705
1731
  /* @__PURE__ */ c("span", { className: "aqmx-document-file-icon", "aria-hidden": "true", children: r }),
1706
1732
  /* @__PURE__ */ c("span", { className: "aqmx-document-title", title: e, "data-testid": "markdown-explorer-file-name", children: e }),
1707
1733
  o,
1708
- /* @__PURE__ */ c("a", { className: "aqmx-icon-button", href: t, target: "_blank", rel: "noopener noreferrer", "aria-label": s.openInNewTab, title: s.openInNewTab, "data-testid": "markdown-explorer-file-open", children: /* @__PURE__ */ c(_a, {}) }),
1709
- /* @__PURE__ */ c("a", { className: "aqmx-icon-button", href: n, download: e, "aria-label": s.download, title: s.download, "data-testid": "markdown-explorer-file-download", children: /* @__PURE__ */ c(Ia, {}) })
1734
+ /* @__PURE__ */ c("a", { className: "aqmx-icon-button", href: t, target: "_blank", rel: "noopener noreferrer", "aria-label": s.openInNewTab, title: s.openInNewTab, "data-testid": "markdown-explorer-file-open", children: /* @__PURE__ */ c(Za, {}) }),
1735
+ /* @__PURE__ */ c("a", { className: "aqmx-icon-button", href: n, download: e, "aria-label": s.download, title: s.download, "data-testid": "markdown-explorer-file-download", children: /* @__PURE__ */ c(ja, {}) })
1710
1736
  ] });
1711
1737
  };
1712
- function Fa({
1738
+ function Wa({
1713
1739
  title: e,
1714
1740
  titleId: t,
1715
1741
  ...n
@@ -1730,45 +1756,45 @@ function Fa({
1730
1756
  clipRule: "evenodd"
1731
1757
  }));
1732
1758
  }
1733
- const qa = /* @__PURE__ */ E.forwardRef(Fa), Ba = Object.freeze({ className: "aqmx-document-stage" }), Ua = ({ document: e }) => {
1759
+ const Ga = /* @__PURE__ */ E.forwardRef(Wa), Ka = Object.freeze({ className: "aqmx-document-stage" }), Ya = ({ document: e }) => {
1734
1760
  const { labels: t } = $();
1735
1761
  return /* @__PURE__ */ B("div", { className: "aqmx-document-file", "data-testid": "markdown-explorer-file-view", children: [
1736
- /* @__PURE__ */ c(Ue, { name: e.name, openUrl: e.url, downloadUrl: e.url, icon: /* @__PURE__ */ c(qa, {}) }),
1737
- /* @__PURE__ */ c(Be, { scrollerProps: Ba, children: /* @__PURE__ */ B("div", { className: "aqmx-callout", role: "note", "data-testid": "markdown-explorer-file-not-shown", children: [
1762
+ /* @__PURE__ */ c(Ue, { name: e.name, openUrl: e.url, downloadUrl: e.url, icon: /* @__PURE__ */ c(Ga, {}) }),
1763
+ /* @__PURE__ */ c(Be, { scrollerProps: Ka, children: /* @__PURE__ */ B("div", { className: "aqmx-callout", role: "note", "data-testid": "markdown-explorer-file-not-shown", children: [
1738
1764
  /* @__PURE__ */ c("p", { className: "aqmx-callout-body", children: t.fileNotShown }),
1739
1765
  /* @__PURE__ */ c("a", { className: "aqmx-callout-action", href: e.url, download: e.name, "data-testid": "markdown-explorer-file-not-shown-download", children: t.download })
1740
1766
  ] }) })
1741
1767
  ] });
1742
- }, st = "[data-aqmd-scroll-container], [data-aqmx-document-scroller]", Ha = (e) => {
1768
+ }, st = "[data-aqmd-scroll-container], [data-aqmx-document-scroller]", Xa = (e) => {
1743
1769
  const t = e.indexOf("#");
1744
1770
  return t === -1 ? "" : e.slice(t);
1745
- }, za = /(%[0-9A-Fa-f]{2})/u, Bt = (e) => {
1771
+ }, Ja = /(%[0-9A-Fa-f]{2})/u, zt = (e) => {
1746
1772
  if (!e.startsWith("#") || e.length === 1) return null;
1747
- const t = new TextEncoder(), n = e.slice(1).split(za).flatMap((r, o) => o % 2 === 1 ? [Number.parseInt(r.slice(1), 16)] : [...t.encode(r)]);
1773
+ const t = new TextEncoder(), n = e.slice(1).split(Ja).flatMap((r, o) => o % 2 === 1 ? [Number.parseInt(r.slice(1), 16)] : [...t.encode(r)]);
1748
1774
  return new TextDecoder("utf-8", { ignoreBOM: !0 }).decode(Uint8Array.from(n));
1749
- }, Tr = (e) => `#${encodeURIComponent(e)}`, ja = (e) => {
1775
+ }, Lr = (e) => `#${encodeURIComponent(e)}`, Qa = (e) => {
1750
1776
  if (e === "#") return !0;
1751
- const t = Bt(e);
1777
+ const t = zt(e);
1752
1778
  return t !== null && t.replace(/[A-Z]/gu, (n) => n.toLowerCase()) === "top";
1753
- }, Rr = (e, t) => {
1779
+ }, Mr = (e, t) => {
1754
1780
  if (t === "") return null;
1755
1781
  for (const n of e.querySelectorAll("[id]"))
1756
1782
  if (n.id === t) return n;
1757
1783
  return null;
1758
- }, Va = "http://www.w3.org/1999/xhtml", vn = (e, t) => {
1784
+ }, ei = "http://www.w3.org/1999/xhtml", kn = (e, t) => {
1759
1785
  if (t === "") return null;
1760
- const n = Rr(e, t);
1786
+ const n = Mr(e, t);
1761
1787
  if (n !== null) return n;
1762
1788
  for (const r of e.querySelectorAll("a[name]"))
1763
- if (r.localName === "a" && r.namespaceURI === Va && r.getAttribute("name") === t) return r;
1789
+ if (r.localName === "a" && r.namespaceURI === ei && r.getAttribute("name") === t) return r;
1764
1790
  return null;
1765
- }, Cr = (e, t) => {
1791
+ }, Ar = (e, t) => {
1766
1792
  if (e === null || !t.startsWith("#")) return null;
1767
- const n = vn(e, t.slice(1));
1793
+ const n = kn(e, t.slice(1));
1768
1794
  if (n !== null) return n;
1769
- const r = Bt(t);
1770
- return r === null ? null : vn(e, r);
1771
- }, bn = (e) => {
1795
+ const r = zt(t);
1796
+ return r === null ? null : kn(e, r);
1797
+ }, En = (e) => {
1772
1798
  const { body: t, documentElement: n } = e.ownerDocument;
1773
1799
  if (e === t) {
1774
1800
  const o = getComputedStyle(n);
@@ -1776,22 +1802,22 @@ const qa = /* @__PURE__ */ E.forwardRef(Fa), Ba = Object.freeze({ className: "aq
1776
1802
  }
1777
1803
  const { overflowY: r } = getComputedStyle(e);
1778
1804
  return r === "auto" || r === "scroll";
1779
- }, Za = (e) => {
1805
+ }, ti = (e) => {
1780
1806
  const { body: t, documentElement: n } = e, r = getComputedStyle(n), o = r.overflowX === "visible" && r.overflowY === "visible" && t !== null ? getComputedStyle(t).overflowY : r.overflowY;
1781
1807
  return o !== "hidden" && o !== "clip";
1782
- }, Wa = (e, t) => {
1808
+ }, ni = (e, t) => {
1783
1809
  const n = t.closest(st), r = n !== null && e.contains(n) ? n : e;
1784
- if (r.scrollHeight > r.clientHeight && bn(r)) return r;
1810
+ if (r.scrollHeight > r.clientHeight && En(r)) return r;
1785
1811
  const o = e.getBoundingClientRect().height, { documentElement: s, scrollingElement: a } = e.ownerDocument;
1786
1812
  for (let i = e.parentElement; i !== null && i !== s; i = i.parentElement)
1787
- if (bn(i) && i.scrollHeight > i.clientHeight && i.clientHeight < o) return i;
1788
- return a instanceof Element && Za(e.ownerDocument) && a.scrollHeight > a.clientHeight && a.clientHeight < o ? a : r;
1789
- }, Ga = Object.freeze({
1790
- scrollerOf: Wa,
1813
+ if (En(i) && i.scrollHeight > i.clientHeight && i.clientHeight < o) return i;
1814
+ return a instanceof Element && ti(e.ownerDocument) && a.scrollHeight > a.clientHeight && a.clientHeight < o ? a : r;
1815
+ }, ri = Object.freeze({
1816
+ scrollerOf: ni,
1791
1817
  reveal: (e) => {
1792
- e.scrollIntoView(Lt);
1818
+ e.scrollIntoView(At);
1793
1819
  }
1794
- }), Lt = Object.freeze({ block: "nearest", inline: "nearest", behavior: "instant" }), Ka = (e, t) => {
1820
+ }), At = Object.freeze({ block: "nearest", inline: "nearest", behavior: "instant" }), oi = (e, t) => {
1795
1821
  for (let n = t; n !== null && n !== e; n = n.parentElement) {
1796
1822
  const r = n.parentElement;
1797
1823
  if (r instanceof HTMLDetailsElement && n !== r.querySelector(":scope > summary") && (r.open = !0), n.getAttribute("hidden")?.toLowerCase() === "until-found") {
@@ -1799,23 +1825,23 @@ const qa = /* @__PURE__ */ E.forwardRef(Fa), Ba = Object.freeze({ className: "aq
1799
1825
  n.removeAttribute("hidden");
1800
1826
  }
1801
1827
  }
1802
- }, Ya = (e, t) => {
1828
+ }, si = (e, t) => {
1803
1829
  if (t.getClientRects().length === 0) return;
1804
1830
  const n = e === e.ownerDocument.scrollingElement ? 0 : e.getBoundingClientRect().top + e.clientTop, { scrollMarginTop: r, scrollMarginBottom: o } = getComputedStyle(t), s = Number.parseFloat(r), a = t.getBoundingClientRect(), i = a.height + s + Number.parseFloat(o) > e.clientHeight;
1805
1831
  if (!i && Math.abs(a.top - s - n) < 1) {
1806
- t.scrollIntoView(Lt);
1832
+ t.scrollIntoView(At);
1807
1833
  return;
1808
1834
  }
1809
- e.scrollBy({ top: i ? a.top - n - e.clientHeight : a.bottom - n + e.clientHeight, behavior: "instant" }), t.scrollIntoView(Lt);
1810
- }, Xa = (e, t) => {
1835
+ e.scrollBy({ top: i ? a.top - n - e.clientHeight : a.bottom - n + e.clientHeight, behavior: "instant" }), t.scrollIntoView(At);
1836
+ }, ai = (e, t) => {
1811
1837
  const n = t.scrollerOf(e, e.querySelector(st) ?? e);
1812
1838
  n.getClientRects().length !== 0 && (n.scrollTo({ top: 0, left: 0, behavior: "instant" }), t.reveal(n));
1813
- }, yn = (e, t, n) => {
1839
+ }, Sn = (e, t, n) => {
1814
1840
  if (e === null) return null;
1815
- const r = Cr(e, t);
1816
- return r === null ? (ja(t) && Xa(e, n), null) : (Ka(e, r), Ya(n.scrollerOf(e, r), r), n.reveal(r), r);
1841
+ const r = Ar(e, t);
1842
+ return r === null ? (Qa(t) && ai(e, n), null) : (oi(e, r), si(n.scrollerOf(e, r), r), n.reveal(r), r);
1817
1843
  };
1818
- function Ja({
1844
+ function ii({
1819
1845
  title: e,
1820
1846
  titleId: t,
1821
1847
  ...n
@@ -1834,8 +1860,8 @@ function Ja({
1834
1860
  d: "M3.28 2.22a.75.75 0 0 0-1.06 1.06L5.44 6.5H2.75a.75.75 0 0 0 0 1.5h4.5A.75.75 0 0 0 8 7.25v-4.5a.75.75 0 0 0-1.5 0v2.69L3.28 2.22ZM13.5 2.75a.75.75 0 0 0-1.5 0v4.5c0 .414.336.75.75.75h4.5a.75.75 0 0 0 0-1.5h-2.69l3.22-3.22a.75.75 0 0 0-1.06-1.06L13.5 5.44V2.75ZM3.28 17.78l3.22-3.22v2.69a.75.75 0 0 0 1.5 0v-4.5a.75.75 0 0 0-.75-.75h-4.5a.75.75 0 0 0 0 1.5h2.69l-3.22 3.22a.75.75 0 1 0 1.06 1.06ZM13.5 14.56l3.22 3.22a.75.75 0 1 0 1.06-1.06l-3.22-3.22h2.69a.75.75 0 0 0 0-1.5h-4.5a.75.75 0 0 0-.75.75v4.5a.75.75 0 0 0 1.5 0v-2.69Z"
1835
1861
  }));
1836
1862
  }
1837
- const Qa = /* @__PURE__ */ E.forwardRef(Ja);
1838
- function ei({
1863
+ const li = /* @__PURE__ */ E.forwardRef(ii);
1864
+ function ci({
1839
1865
  title: e,
1840
1866
  titleId: t,
1841
1867
  ...n
@@ -1858,8 +1884,8 @@ function ei({
1858
1884
  clipRule: "evenodd"
1859
1885
  }));
1860
1886
  }
1861
- const ti = /* @__PURE__ */ E.forwardRef(ei);
1862
- function ni({
1887
+ const di = /* @__PURE__ */ E.forwardRef(ci);
1888
+ function ui({
1863
1889
  title: e,
1864
1890
  titleId: t,
1865
1891
  ...n
@@ -1882,8 +1908,8 @@ function ni({
1882
1908
  clipRule: "evenodd"
1883
1909
  }));
1884
1910
  }
1885
- const ri = /* @__PURE__ */ E.forwardRef(ni);
1886
- function oi({
1911
+ const fi = /* @__PURE__ */ E.forwardRef(ui);
1912
+ function mi({
1887
1913
  title: e,
1888
1914
  titleId: t,
1889
1915
  ...n
@@ -1904,7 +1930,7 @@ function oi({
1904
1930
  clipRule: "evenodd"
1905
1931
  }));
1906
1932
  }
1907
- const si = /* @__PURE__ */ E.forwardRef(oi), Mt = "data-aqmx-key-repeat", At = Object.freeze({ [Mt]: "allow" }), ai = `[${Mt}="${At[Mt]}"]`, ii = () => {
1933
+ const hi = /* @__PURE__ */ E.forwardRef(mi), Nt = "data-aqmx-key-repeat", Dt = Object.freeze({ [Nt]: "allow" }), pi = `[${Nt}="${Dt[Nt]}"]`, gi = () => {
1908
1934
  let e = null;
1909
1935
  return {
1910
1936
  onKeyDownCapture: (t) => {
@@ -1913,7 +1939,7 @@ const si = /* @__PURE__ */ E.forwardRef(oi), Mt = "data-aqmx-key-repeat", At = O
1913
1939
  e = t.target instanceof Element ? t.target : null;
1914
1940
  return;
1915
1941
  }
1916
- e !== null && t.target === e && e.closest(ai) !== null || (t.preventDefault(), t.stopPropagation());
1942
+ e !== null && t.target === e && e.closest(pi) !== null || (t.preventDefault(), t.stopPropagation());
1917
1943
  }
1918
1944
  },
1919
1945
  onKeyUpCapture: (t) => {
@@ -1923,7 +1949,7 @@ const si = /* @__PURE__ */ E.forwardRef(oi), Mt = "data-aqmx-key-repeat", At = O
1923
1949
  t.target === e && (e = null);
1924
1950
  }
1925
1951
  };
1926
- }, Ke = Object.freeze([1 / Me ** 2, 1 / Me, 1, Me, Me ** 2]), kn = Object.freeze({ mode: "fit" }), li = 1, Or = Object.freeze({ className: "aqmx-document-canvas", "data-testid": "markdown-explorer-image-canvas" }), En = `[data-testid="${Or["data-testid"]}"]`, ci = ve(null), di = (e, t) => e.width > 0 && e.height > 0 && t.width - e.width <= li ? { base: e, scale: t.width / e.width } : t.width > 0 && t.height > 0 ? { base: t, scale: 1 } : null, Sn = (e, t, n) => {
1952
+ }, Ke = Object.freeze([1 / Me ** 2, 1 / Me, 1, Me, Me ** 2]), xn = Object.freeze({ mode: "fit" }), wi = 1, Nr = Object.freeze({ className: "aqmx-document-canvas", "data-testid": "markdown-explorer-image-canvas" }), Tn = `[data-testid="${Nr["data-testid"]}"]`, vi = ve(null), bi = (e, t) => e.width > 0 && e.height > 0 && t.width - e.width <= wi ? { base: e, scale: t.width / e.width } : t.width > 0 && t.height > 0 ? { base: t, scale: 1 } : null, Rn = (e, t, n) => {
1927
1953
  if (e.mode === "level") {
1928
1954
  const o = e.index + n;
1929
1955
  return o >= 0 && o < Ke.length ? o : null;
@@ -1931,29 +1957,29 @@ const si = /* @__PURE__ */ E.forwardRef(oi), Mt = "data-aqmx-key-repeat", At = O
1931
1957
  if (t === null || !Number.isFinite(t) || t <= 0) return null;
1932
1958
  const r = n === 1 ? Ke.findIndex((o) => o > t) : Ke.findLastIndex((o) => o < t);
1933
1959
  return r === -1 ? null : r;
1934
- }, xn = (e, t, n) => {
1960
+ }, Cn = (e, t, n) => {
1935
1961
  if (e.mode === "level") {
1936
- const o = Sn(e, null, n);
1962
+ const o = Rn(e, null, n);
1937
1963
  return o === null ? null : { mode: "level", index: o, base: e.base };
1938
1964
  }
1939
1965
  if (t === null) return null;
1940
- const r = Sn(e, t.scale, n);
1966
+ const r = Rn(e, t.scale, n);
1941
1967
  return r === null ? null : { mode: "level", index: r, base: t.base };
1942
- }, ui = (e, t) => {
1968
+ }, yi = (e, t) => {
1943
1969
  if (e <= 0 || t <= 0) return 0;
1944
1970
  const n = Math.trunc(Math.log(t / e) / Math.log(Me));
1945
1971
  return n === 0 ? 0 : n;
1946
- }, Tn = (e) => {
1972
+ }, On = (e) => {
1947
1973
  const t = e[0], n = e[1];
1948
1974
  return e.length !== 2 || t === void 0 || n === void 0 ? null : { distance: Math.hypot(n.clientX - t.clientX, n.clientY - t.clientY), middle: { x: (t.clientX + n.clientX) / 2, y: (t.clientY + n.clientY) / 2 } };
1949
- }, fi = (e) => {
1975
+ }, ki = (e) => {
1950
1976
  const t = Ke[e];
1951
1977
  if (t === void 0) throw new RangeError(`[markdown-explorer] no image zoom step ${String(e)}`);
1952
1978
  return t;
1953
- }, Rn = (e, t, n) => e !== null && e.width === t && e.height === n ? e : { width: t, height: n }, mi = ({ document: e }) => {
1954
- const { labels: t } = $(), n = se(ci), [r] = V(() => n === null ? null : n.read(e.url)), [o, s] = V(r === null ? kn : r.zoom), [a, i] = V(r === null ? null : r.reported), [f, u] = V(null), l = U(null), d = F((D) => {
1979
+ }, Ln = (e, t, n) => e !== null && e.width === t && e.height === n ? e : { width: t, height: n }, Ei = ({ document: e }) => {
1980
+ const { labels: t } = $(), n = se(vi), [r] = V(() => n === null ? null : n.read(e.url)), [o, s] = V(r === null ? xn : r.zoom), [a, i] = V(r === null ? null : r.reported), [f, u] = V(null), l = U(null), d = F((D) => {
1955
1981
  const { naturalWidth: m, naturalHeight: p } = D;
1956
- i((x) => Rn(x, m, p));
1982
+ i((x) => Ln(x, m, p));
1957
1983
  }, []), h = F(
1958
1984
  (D) => {
1959
1985
  l.current = D, !(D === null || !D.complete) && (D.naturalWidth > 0 || D.naturalHeight > 0 ? d(D) : D.decode().then(
@@ -1969,31 +1995,31 @@ const si = /* @__PURE__ */ E.forwardRef(oi), Mt = "data-aqmx-key-repeat", At = O
1969
1995
  }, [n, e.url, o, a]), Y(() => {
1970
1996
  const D = l.current;
1971
1997
  if (D === null || a === null || o.mode !== "fit") return;
1972
- const m = () => u((x) => Rn(x, D.clientWidth, D.clientHeight));
1998
+ const m = () => u((x) => Ln(x, D.clientWidth, D.clientHeight));
1973
1999
  if (m(), typeof ResizeObserver > "u") return;
1974
2000
  const p = new ResizeObserver(m);
1975
2001
  return p.observe(D), () => p.disconnect();
1976
2002
  }, [a, o.mode]);
1977
- const g = a === null || f === null ? null : di(a, f), v = xn(o, g, -1), y = xn(o, g, 1), T = o.mode === "level" ? fi(o.index) : null, O = U({ zoomIn: y, zoomOut: v });
2003
+ const g = a === null || f === null ? null : bi(a, f), v = Cn(o, g, -1), y = Cn(o, g, 1), T = o.mode === "level" ? ki(o.index) : null, O = U({ zoomIn: y, zoomOut: v });
1978
2004
  Y(() => {
1979
2005
  O.current = { zoomIn: y, zoomOut: v };
1980
2006
  });
1981
2007
  const R = U(null);
1982
2008
  Y(() => {
1983
- const D = R.current, m = l.current?.closest(En);
2009
+ const D = R.current, m = l.current?.closest(Tn);
1984
2010
  R.current = null, !(D === null || m === null || m === void 0) && (m.scrollLeft = D.across * m.scrollWidth - D.x, m.scrollTop = D.down * m.scrollHeight - D.y);
1985
2011
  }, [o]), ee(() => {
1986
- const D = l.current?.closest(En);
2012
+ const D = l.current?.closest(Tn);
1987
2013
  if (D == null) return;
1988
2014
  let m = null;
1989
2015
  const p = (I) => {
1990
- const _ = Tn(I.touches);
2016
+ const _ = On(I.touches);
1991
2017
  m = _ === null ? null : { distance: _.distance, steps: 0 };
1992
2018
  }, x = (I) => {
1993
- const _ = Tn(I.touches);
2019
+ const _ = On(I.touches);
1994
2020
  if (m === null || _ === null) return;
1995
2021
  I.preventDefault();
1996
- const b = ui(m.distance, _.distance);
2022
+ const b = yi(m.distance, _.distance);
1997
2023
  if (b === m.steps) return;
1998
2024
  const S = b > m.steps ? 1 : -1, L = S === 1 ? O.current.zoomIn : O.current.zoomOut;
1999
2025
  if (L === null) return;
@@ -2009,7 +2035,7 @@ const si = /* @__PURE__ */ E.forwardRef(oi), Mt = "data-aqmx-key-repeat", At = O
2009
2035
  }, []);
2010
2036
  const q = o.mode === "level" && T !== null ? { width: `${o.base.width * T}px`, height: `${o.base.height * T}px` } : void 0;
2011
2037
  return /* @__PURE__ */ B("div", { className: "aqmx-document-file", "data-testid": "markdown-explorer-image-view", children: [
2012
- /* @__PURE__ */ B(Ue, { name: e.name, openUrl: e.url, downloadUrl: e.url, icon: /* @__PURE__ */ c(si, {}), children: [
2038
+ /* @__PURE__ */ B(Ue, { name: e.name, openUrl: e.url, downloadUrl: e.url, icon: /* @__PURE__ */ c(hi, {}), children: [
2013
2039
  /* @__PURE__ */ c(
2014
2040
  "button",
2015
2041
  {
@@ -2021,8 +2047,8 @@ const si = /* @__PURE__ */ E.forwardRef(oi), Mt = "data-aqmx-key-repeat", At = O
2021
2047
  onClick: () => {
2022
2048
  v !== null && s(v);
2023
2049
  },
2024
- ...At,
2025
- children: /* @__PURE__ */ c(ti, {})
2050
+ ...Dt,
2051
+ children: /* @__PURE__ */ c(di, {})
2026
2052
  }
2027
2053
  ),
2028
2054
  /* @__PURE__ */ c("output", { className: "aqmx-document-level", "aria-live": "polite", "data-testid": "markdown-explorer-image-level", children: T === null ? t.imageFitLevel : t.imageZoomLevel(Math.round(T * 100)) }),
@@ -2037,33 +2063,33 @@ const si = /* @__PURE__ */ E.forwardRef(oi), Mt = "data-aqmx-key-repeat", At = O
2037
2063
  onClick: () => {
2038
2064
  y !== null && s(y);
2039
2065
  },
2040
- ...At,
2041
- children: /* @__PURE__ */ c(ri, {})
2066
+ ...Dt,
2067
+ children: /* @__PURE__ */ c(fi, {})
2042
2068
  }
2043
2069
  ),
2044
- /* @__PURE__ */ c("button", { type: "button", className: "aqmx-icon-button", "aria-label": t.imageFit, title: t.imageFit, "aria-pressed": o.mode === "fit", onClick: () => s(kn), children: /* @__PURE__ */ c(Qa, {}) })
2070
+ /* @__PURE__ */ c("button", { type: "button", className: "aqmx-icon-button", "aria-label": t.imageFit, title: t.imageFit, "aria-pressed": o.mode === "fit", onClick: () => s(xn), children: /* @__PURE__ */ c(li, {}) })
2045
2071
  ] }),
2046
- /* @__PURE__ */ c(Be, { scrollerProps: Or, children: /* @__PURE__ */ c("img", { ref: h, className: "aqmx-document-image", src: e.url, alt: e.name, "data-aqmx-image-mode": o.mode, style: q, onLoad: (D) => d(D.currentTarget), "data-testid": "markdown-explorer-image" }) })
2072
+ /* @__PURE__ */ c(Be, { scrollerProps: Nr, children: /* @__PURE__ */ c("img", { ref: h, className: "aqmx-document-image", src: e.url, alt: e.name, "data-aqmx-image-mode": o.mode, style: q, onLoad: (D) => d(D.currentTarget), "data-testid": "markdown-explorer-image" }) })
2047
2073
  ] });
2048
- }, hi = async (e, t, n) => {
2074
+ }, Si = async (e, t, n) => {
2049
2075
  const r = await e.text(t, n);
2050
2076
  if (!("kind" in r)) throw n.reason;
2051
2077
  return r.kind === "text" ? { kind: "text", text: r.text, truncated: r.truncated } : { kind: "failure", retryable: r.failure.reason === "failed" };
2052
- }, Lr = ve(null), at = ve(void 0), Mr = ve(null), it = () => {
2053
- const e = se(Lr);
2078
+ }, Dr = ve(null), at = ve(void 0), Pr = ve(null), it = () => {
2079
+ const e = se(Dr);
2054
2080
  if (e === null) throw new Error("[markdown-explorer] document links must be rendered inside a document pane");
2055
2081
  return e;
2056
- }, pi = () => {
2057
- const e = se(Mr);
2082
+ }, xi = () => {
2083
+ const e = se(Pr);
2058
2084
  if (e === null) throw new Error("[markdown-explorer] table-of-contents entries must be rendered inside a document pane's links");
2059
2085
  return e;
2060
- }, lt = (e, t, n, r) => t.kind === "panel" ? Ne(e, { view: "tree", source: n, doc: r }) : t.view === "single" ? Ne(e, { view: "single", source: n, doc: r, overrides: t.overrides, embed: t.embed }) : Ne(e, { view: "tree", source: n, doc: r, overrides: t.overrides }), gi = ({ children: e }) => {
2061
- const { config: t } = $(), n = it(), r = $t(), o = r.kind === "location" ? r.location.source : void 0, s = nt(lt(t, n.navigation, o, n.currentPath));
2062
- return /* @__PURE__ */ c(at, { value: o, children: /* @__PURE__ */ c(Mr, { value: s, children: e }) });
2063
- }, wi = 'a[data-link-kind="doc"][data-doc-path]:not([data-doc-exists="false"])', vi = (e) => {
2064
- const t = e instanceof Element ? e.closest(wi) : null;
2086
+ }, lt = (e, t, n, r) => t.kind === "panel" ? Ne(e, { view: "tree", source: n, doc: r }) : t.view === "single" ? Ne(e, { view: "single", source: n, doc: r, overrides: t.overrides, embed: t.embed }) : Ne(e, { view: "tree", source: n, doc: r, overrides: t.overrides }), Ti = ({ children: e }) => {
2087
+ const { config: t } = $(), n = it(), r = Ft(), o = r.kind === "location" ? r.location.source : void 0, s = nt(lt(t, n.navigation, o, n.currentPath));
2088
+ return /* @__PURE__ */ c(at, { value: o, children: /* @__PURE__ */ c(Pr, { value: s, children: e }) });
2089
+ }, Ri = 'a[data-link-kind="doc"][data-doc-path]:not([data-doc-exists="false"])', Ci = (e) => {
2090
+ const t = e instanceof Element ? e.closest(Ri) : null;
2065
2091
  return t === null ? null : t.getAttribute("data-doc-path");
2066
- }, ct = (e) => !e.defaultPrevented && e.button === 0 && !e.metaKey && !e.ctrlKey && !e.shiftKey && !e.altKey, bi = ({ to: e, docPath: t, fragment: n, exists: r, className: o, attributes: s, onDocumentLink: a, scope: i, children: f }) => {
2092
+ }, ct = (e) => !e.defaultPrevented && e.button === 0 && !e.metaKey && !e.ctrlKey && !e.shiftKey && !e.altKey, Oi = ({ to: e, docPath: t, fragment: n, exists: r, className: o, attributes: s, onDocumentLink: a, scope: i, children: f }) => {
2067
2093
  const u = nt(e);
2068
2094
  return /* @__PURE__ */ c("a", { ...s, href: u, className: o, "data-link-kind": "doc", "data-doc-path": t, "data-doc-exists": r, onClick: (d) => {
2069
2095
  if (ct(d)) {
@@ -2074,10 +2100,10 @@ const si = /* @__PURE__ */ E.forwardRef(oi), Mt = "data-aqmx-key-repeat", At = O
2074
2100
  a(t, n);
2075
2101
  }
2076
2102
  }, children: f });
2077
- }, yi = ({ href: e, docPath: t, docExists: n, className: r, attributes: o, children: s }) => {
2078
- const { config: a } = $(), i = it(), f = se(at), u = Ha(e), { navigation: l } = i, d = `${lt(a, l, f, t)}${u}`, h = n === !1 ? "false" : void 0;
2079
- return l.kind === "page" ? /* @__PURE__ */ c(fa, { ...o, to: d, navigation: "follow-link", className: r, "data-link-kind": "doc", "data-doc-path": t, "data-doc-exists": h, children: s }) : /* @__PURE__ */ c(bi, { to: d, docPath: t, fragment: u, exists: h, className: r, attributes: o, onDocumentLink: l.onDocumentLink, scope: i, children: s });
2080
- }, ki = ({ className: e, attributes: t, children: n }) => {
2103
+ }, Li = ({ href: e, docPath: t, docExists: n, className: r, attributes: o, children: s }) => {
2104
+ const { config: a } = $(), i = it(), f = se(at), u = Xa(e), { navigation: l } = i, d = `${lt(a, l, f, t)}${u}`, h = n === !1 ? "false" : void 0;
2105
+ return l.kind === "page" ? /* @__PURE__ */ c(ga, { ...o, to: d, navigation: "follow-link", className: r, "data-link-kind": "doc", "data-doc-path": t, "data-doc-exists": h, children: s }) : /* @__PURE__ */ c(Oi, { to: d, docPath: t, fragment: u, exists: h, className: r, attributes: o, onDocumentLink: l.onDocumentLink, scope: i, children: s });
2106
+ }, Mi = ({ className: e, attributes: t, children: n }) => {
2081
2107
  const { labels: r } = $();
2082
2108
  return (
2083
2109
  /* @__PURE__ */ B("a", { ...t, className: e === void 0 ? "aqmx-document-inert-link" : `${e} aqmx-document-inert-link`, title: r.inertLink, "data-link-kind": "doc", "data-doc-exists": "false", children: [
@@ -2089,34 +2115,34 @@ const si = /* @__PURE__ */ E.forwardRef(oi), Mt = "data-aqmx-key-repeat", At = O
2089
2115
  ] })
2090
2116
  ] })
2091
2117
  );
2092
- }, Ei = ({ href: e, className: t, attributes: n, scope: r, children: o }) => {
2118
+ }, Ai = ({ href: e, className: t, attributes: n, scope: r, children: o }) => {
2093
2119
  const { config: s } = $(), a = se(at), i = nt(`${lt(s, r.navigation, a, r.currentPath)}${e}`);
2094
2120
  return /* @__PURE__ */ c("a", { ...n, href: i, className: t, onClick: (u) => {
2095
2121
  ct(u) && (u.preventDefault(), r.scrollWithin(e));
2096
2122
  }, children: o });
2097
- }, Si = ({ href: e, className: t, attributes: n, children: r }) => {
2123
+ }, Ni = ({ href: e, className: t, attributes: n, children: r }) => {
2098
2124
  const o = it();
2099
2125
  return o.navigation.kind === "page" ? /* @__PURE__ */ c("a", { ...n, href: e, className: t, onClick: (a) => {
2100
2126
  if (!ct(a)) return;
2101
2127
  const i = a.currentTarget;
2102
2128
  e === "#" ? o.followEmptyFragment(a.nativeEvent) : i.href === i.ownerDocument.URL && o.followSameUrlJump(e, a.nativeEvent);
2103
- }, children: r }) : /* @__PURE__ */ c(Ei, { href: e, className: t, attributes: n, scope: o, children: r });
2104
- }, xi = ({ href: e, kind: t, docPath: n, docExists: r, className: o, attributes: s, children: a }) => t === "doc" ? n === void 0 || !Io(n) ? /* @__PURE__ */ c(ki, { className: o, attributes: s, children: a }) : /* @__PURE__ */ c(yi, { href: e, docPath: n, docExists: r, className: o, attributes: s, children: a }) : e.startsWith("#") ? /* @__PURE__ */ c(Si, { href: e, className: o, attributes: s, children: a }) : /* @__PURE__ */ c("a", { ...s, href: e, className: o, children: a }), Ti = () => {
2129
+ }, children: r }) : /* @__PURE__ */ c(Ai, { href: e, className: t, attributes: n, scope: o, children: r });
2130
+ }, Di = ({ href: e, kind: t, docPath: n, docExists: r, className: o, attributes: s, children: a }) => t === "doc" ? n === void 0 || !qo(n) ? /* @__PURE__ */ c(Mi, { className: o, attributes: s, children: a }) : /* @__PURE__ */ c(Li, { href: e, docPath: n, docExists: r, className: o, attributes: s, children: a }) : e.startsWith("#") ? /* @__PURE__ */ c(Ni, { href: e, className: o, attributes: s, children: a }) : /* @__PURE__ */ c("a", { ...s, href: e, className: o, children: a }), Pi = () => {
2105
2131
  const { config: e } = $(), t = it(), n = se(at), r = ot();
2106
2132
  return F(
2107
2133
  (o, s) => {
2108
2134
  if (!ct(s)) return !0;
2109
2135
  s.preventDefault();
2110
- const a = Tr(o.id), { navigation: i } = t;
2111
- return i.kind === "panel" || Bt(s.currentTarget.ownerDocument.location.hash) === o.id ? (t.scrollWithin(a), !0) : (r(`${lt(e, i, n, t.currentPath)}${a}`, "follow-link"), !0);
2136
+ const a = Lr(o.id), { navigation: i } = t;
2137
+ return i.kind === "panel" || zt(s.currentTarget.ownerDocument.location.hash) === o.id ? (t.scrollWithin(a), !0) : (r(`${lt(e, i, n, t.currentPath)}${a}`, "follow-link"), !0);
2112
2138
  },
2113
2139
  [e, t, n, r]
2114
2140
  );
2115
- }, Ri = () => {
2116
- const e = pi();
2117
- return F((t) => `${e}${Tr(t.id)}`, [e]);
2141
+ }, Ii = () => {
2142
+ const e = xi();
2143
+ return F((t) => `${e}${Lr(t.id)}`, [e]);
2118
2144
  };
2119
- function Ci({
2145
+ function $i({
2120
2146
  title: e,
2121
2147
  titleId: t,
2122
2148
  ...n
@@ -2135,8 +2161,8 @@ function Ci({
2135
2161
  d: "M3 3.5A1.5 1.5 0 0 1 4.5 2h6.879a1.5 1.5 0 0 1 1.06.44l4.122 4.12A1.5 1.5 0 0 1 17 7.622V16.5a1.5 1.5 0 0 1-1.5 1.5h-11A1.5 1.5 0 0 1 3 16.5v-13Z"
2136
2162
  }));
2137
2163
  }
2138
- const Oi = /* @__PURE__ */ E.forwardRef(Ci);
2139
- function Li({
2164
+ const _i = /* @__PURE__ */ E.forwardRef($i);
2165
+ function Fi({
2140
2166
  title: e,
2141
2167
  titleId: t,
2142
2168
  ...n
@@ -2157,8 +2183,8 @@ function Li({
2157
2183
  clipRule: "evenodd"
2158
2184
  }));
2159
2185
  }
2160
- const Mi = /* @__PURE__ */ E.forwardRef(Li);
2161
- function Ai({
2186
+ const qi = /* @__PURE__ */ E.forwardRef(Fi);
2187
+ function Bi({
2162
2188
  title: e,
2163
2189
  titleId: t,
2164
2190
  ...n
@@ -2179,9 +2205,9 @@ function Ai({
2179
2205
  clipRule: "evenodd"
2180
2206
  }));
2181
2207
  }
2182
- const Ni = /* @__PURE__ */ E.forwardRef(Ai), Di = Object.freeze({ className: "aqmx-document-stage" }), Pi = () => () => {
2183
- }, Ii = () => navigator.pdfViewerEnabled !== !1, $i = () => null, _i = ({ document: e }) => {
2184
- const { labels: t } = $(), n = oe(Pi, Ii, $i);
2208
+ const Ui = /* @__PURE__ */ E.forwardRef(Bi), Hi = Object.freeze({ className: "aqmx-document-stage" }), zi = () => () => {
2209
+ }, ji = () => navigator.pdfViewerEnabled !== !1, Vi = () => null, Zi = ({ document: e }) => {
2210
+ const { labels: t } = $(), n = re(zi, ji, Vi);
2185
2211
  return n === null ? null : n ? /* @__PURE__ */ c("iframe", { className: "aqmx-document-frame", src: e.url, title: e.name, "data-testid": "markdown-explorer-media-player" }) : /* @__PURE__ */ B("div", { className: "aqmx-callout", role: "note", "data-testid": "markdown-explorer-pdf-not-shown", children: [
2186
2212
  /* @__PURE__ */ c("p", { className: "aqmx-callout-body", children: t.pdfNotShown }),
2187
2213
  /* @__PURE__ */ B("div", { className: "aqmx-callout-actions", children: [
@@ -2189,20 +2215,20 @@ const Ni = /* @__PURE__ */ E.forwardRef(Ai), Di = Object.freeze({ className: "aq
2189
2215
  /* @__PURE__ */ c("a", { className: "aqmx-callout-action", href: e.url, download: e.name, "data-testid": "markdown-explorer-pdf-not-shown-download", children: t.download })
2190
2216
  ] })
2191
2217
  ] });
2192
- }, Fi = (e) => {
2218
+ }, Wi = (e) => {
2193
2219
  switch (e) {
2194
2220
  case "video":
2195
- return /* @__PURE__ */ c(Mi, {});
2221
+ return /* @__PURE__ */ c(qi, {});
2196
2222
  case "audio":
2197
- return /* @__PURE__ */ c(Ni, {});
2223
+ return /* @__PURE__ */ c(Ui, {});
2198
2224
  case "pdf":
2199
- return /* @__PURE__ */ c(Oi, {});
2225
+ return /* @__PURE__ */ c(_i, {});
2200
2226
  default: {
2201
2227
  const t = e;
2202
2228
  throw new RangeError(`[markdown-explorer] unknown media type ${String(t)}`);
2203
2229
  }
2204
2230
  }
2205
- }, qi = ({ document: e }) => {
2231
+ }, Gi = ({ document: e }) => {
2206
2232
  const { labels: t } = $();
2207
2233
  switch (e.mediaType) {
2208
2234
  case "video":
@@ -2214,16 +2240,16 @@ const Ni = /* @__PURE__ */ E.forwardRef(Ai), Di = Object.freeze({ className: "aq
2214
2240
  /* @__PURE__ */ c("audio", { className: "aqmx-document-audio", src: e.url, controls: !0, preload: "metadata", "aria-label": e.name, "data-testid": "markdown-explorer-media-player", children: t.mediaUnsupported })
2215
2241
  );
2216
2242
  case "pdf":
2217
- return /* @__PURE__ */ c(_i, { document: e });
2243
+ return /* @__PURE__ */ c(Zi, { document: e });
2218
2244
  default: {
2219
2245
  const n = e.mediaType;
2220
2246
  throw new RangeError(`[markdown-explorer] unknown media type ${String(n)}`);
2221
2247
  }
2222
2248
  }
2223
- }, Bi = ({ document: e }) => /* @__PURE__ */ B("div", { className: "aqmx-document-file", "data-testid": "markdown-explorer-media-view", "data-aqmx-media-type": e.mediaType, children: [
2224
- /* @__PURE__ */ c(Ue, { name: e.name, openUrl: e.url, downloadUrl: e.url, icon: Fi(e.mediaType) }),
2225
- /* @__PURE__ */ c(Be, { scrollerProps: Di, children: /* @__PURE__ */ c(qi, { document: e }) })
2226
- ] }), Ut = (e) => {
2249
+ }, Ki = ({ document: e }) => /* @__PURE__ */ B("div", { className: "aqmx-document-file", "data-testid": "markdown-explorer-media-view", "data-aqmx-media-type": e.mediaType, children: [
2250
+ /* @__PURE__ */ c(Ue, { name: e.name, openUrl: e.url, downloadUrl: e.url, icon: Wi(e.mediaType) }),
2251
+ /* @__PURE__ */ c(Be, { scrollerProps: Hi, children: /* @__PURE__ */ c(Gi, { document: e }) })
2252
+ ] }), jt = (e) => {
2227
2253
  switch (e.kind) {
2228
2254
  case "markdown":
2229
2255
  return "markdown";
@@ -2234,14 +2260,14 @@ const Ni = /* @__PURE__ */ E.forwardRef(Ai), Di = Object.freeze({ className: "aq
2234
2260
  default:
2235
2261
  return null;
2236
2262
  }
2237
- }, Ui = (e) => {
2238
- const { documents: t } = $(), n = F(() => t.peek(e), [t, e]), r = F(() => t.peekSeeded(e), [t, e]), o = oe(t.subscribe, n, r), s = ge(o);
2239
- return s === null ? null : Ut(s.document);
2240
- }, Hi = (e) => {
2263
+ }, Yi = (e) => {
2264
+ const { documents: t } = $(), n = F(() => t.peek(e), [t, e]), r = F(() => t.peekSeeded(e), [t, e]), o = re(t.subscribe, n, r), s = ge(o);
2265
+ return s === null ? null : jt(s.document);
2266
+ }, Xi = (e) => {
2241
2267
  const { config: t } = $(), n = ot(), r = F(() => n(Ne(t, { ...e, markup: !e.markup }), "browse"), [t, n, e]);
2242
2268
  return X(() => ({ shown: e.markup, toggle: r }), [e.markup, r]);
2243
2269
  };
2244
- function zi({
2270
+ function Ji({
2245
2271
  title: e,
2246
2272
  titleId: t,
2247
2273
  ...n
@@ -2262,16 +2288,16 @@ function zi({
2262
2288
  clipRule: "evenodd"
2263
2289
  }));
2264
2290
  }
2265
- const ji = /* @__PURE__ */ E.forwardRef(zi), Vi = 100, Zi = 32767, Ye = Object.freeze({ maxCells: an, maxColumns: an / Vi, maxCellLength: Zi }), Ar = 44, Nr = 10, Dr = 13, Ze = '"', Cn = (e, t) => {
2291
+ const Qi = /* @__PURE__ */ E.forwardRef(Ji), el = 100, tl = 32767, Ye = Object.freeze({ maxCells: dn, maxColumns: dn / el, maxCellLength: tl }), Ir = 44, $r = 10, _r = 13, Ze = '"', Mn = (e, t) => {
2266
2292
  let n = t;
2267
2293
  for (; n < e.length; ) {
2268
2294
  const r = e.charCodeAt(n);
2269
- if (r === Ar || r === Nr || r === Dr) return n;
2295
+ if (r === Ir || r === $r || r === _r) return n;
2270
2296
  n += 1;
2271
2297
  }
2272
2298
  return n;
2273
2299
  };
2274
- function* Wi(e, t) {
2300
+ function* nl(e, t) {
2275
2301
  let n = [], r = 0;
2276
2302
  for (; ; ) {
2277
2303
  let o;
@@ -2291,10 +2317,10 @@ function* Wi(e, t) {
2291
2317
  r = f + 1;
2292
2318
  break;
2293
2319
  }
2294
- const i = Cn(e, r);
2320
+ const i = Mn(e, r);
2295
2321
  o += e.slice(r, i), r = i;
2296
2322
  } else {
2297
- const a = Cn(e, r);
2323
+ const a = Mn(e, r);
2298
2324
  o = e.slice(r, a), r = a;
2299
2325
  }
2300
2326
  if (n.push(o), r >= e.length) {
@@ -2302,15 +2328,15 @@ function* Wi(e, t) {
2302
2328
  return;
2303
2329
  }
2304
2330
  const s = e.charCodeAt(r);
2305
- if (r += 1, s !== Ar && (yield n, n = [], s === Dr && e.charCodeAt(r) === Nr && (r += 1), r >= e.length))
2331
+ if (r += 1, s !== Ir && (yield n, n = [], s === _r && e.charCodeAt(r) === $r && (r += 1), r >= e.length))
2306
2332
  return;
2307
2333
  }
2308
2334
  }
2309
- const Gi = (e, t, n) => t === "csv" ? Wi(e, n) : n === "whole" ? ns(e) : rs(e), Ki = (e, t) => {
2335
+ const rl = (e, t, n) => t === "csv" ? nl(e, n) : n === "whole" ? as(e) : is(e), ol = (e, t) => {
2310
2336
  if (e.length <= t) return e;
2311
2337
  const n = e.charCodeAt(t - 1);
2312
2338
  return e.slice(0, n >= 55296 && n <= 56319 ? t - 1 : t);
2313
- }, Pr = (e, t) => {
2339
+ }, Fr = (e, t) => {
2314
2340
  const n = [];
2315
2341
  let r = 0, o = !1, s = !1;
2316
2342
  for (const i of e) {
@@ -2319,17 +2345,17 @@ const Gi = (e, t, n) => t === "csv" ? Wi(e, n) : n === "whole" ? ns(e) : rs(e),
2319
2345
  s = !0;
2320
2346
  break;
2321
2347
  }
2322
- const l = f.some((d) => d.length > t.maxCellLength) ? f.map((d) => Ki(d, t.maxCellLength)) : f;
2348
+ const l = f.some((d) => d.length > t.maxCellLength) ? f.map((d) => ol(d, t.maxCellLength)) : f;
2323
2349
  l !== i && (o = !0), n.push(l), r = u;
2324
2350
  }
2325
2351
  return { rows: n.map((i) => i.length === r ? i : [...i, ...Array(r - i.length).fill("")]), truncated: s || o, full: s };
2326
- }, wt = (e, t, n, r, o) => {
2327
- const s = Co(e, t, r);
2328
- if (s === null) return { kind: "unreadable", code: "encoding", encodings: Oo(e, t, r) };
2352
+ }, vt = (e, t, n, r, o) => {
2353
+ const s = Ao(e, t, r);
2354
+ if (s === null) return { kind: "unreadable", code: "encoding", encodings: No(e, t, r) };
2329
2355
  if (s.includes("\0")) return { kind: "unreadable", code: "binary" };
2330
- const a = Pr(Gi(s, n, t ? "whole" : "prefix"), o);
2356
+ const a = Fr(rl(s, n, t ? "whole" : "prefix"), o);
2331
2357
  return t ? a.truncated || a.rows.some((i) => i.some((f) => f !== "")) ? { kind: "table", table: a } : { kind: "empty" } : a.rows.length === 0 ? { kind: "unreadable", code: "long-row" } : { kind: "table", table: { ...a, truncated: !0 } };
2332
- }, Yi = Object.freeze({ maxPartBytes: 64 * 1024 * 1024, maxSheets: 256 }), Ir = (e) => {
2358
+ }, sl = Object.freeze({ maxPartBytes: 64 * 1024 * 1024, maxSheets: 256 }), qr = (e) => {
2333
2359
  const t = [];
2334
2360
  let n = 0, r = !1;
2335
2361
  const o = (s) => {
@@ -2355,14 +2381,14 @@ const Gi = (e, t, n) => t === "csv" ? Wi(e, n) : n === "whole" ? ns(e) : rs(e),
2355
2381
  for (let d = 0; d < i && !r; d += 1) o(d === 0 ? u : [...u]);
2356
2382
  },
2357
2383
  full: () => r,
2358
- table: () => Pr(t, e)
2384
+ table: () => Fr(t, e)
2359
2385
  };
2360
- }, Xi = (e) => {
2386
+ }, al = (e) => {
2361
2387
  const t = Array.from(e.currentTarget.querySelectorAll('[role="tab"]')), n = e.target instanceof HTMLButtonElement ? t.indexOf(e.target) : -1;
2362
2388
  if (n === -1) return;
2363
2389
  const r = getComputedStyle(e.currentTarget).direction === "rtl" ? "ArrowRight" : "ArrowLeft", o = r === "ArrowLeft" ? "ArrowRight" : "ArrowLeft", s = e.key === o ? (n + 1) % t.length : e.key === r ? (n - 1 + t.length) % t.length : e.key === "Home" ? 0 : e.key === "End" ? t.length - 1 : null;
2364
2390
  s !== null && (e.preventDefault(), t[s]?.focus());
2365
- }, Ji = ({ names: e, selected: t, onSelect: n, label: r, tabIdOf: o, panelId: s }) => /* @__PURE__ */ c("div", { role: "tablist", "aria-label": r, className: "aqmx-sheet-tabs", "data-testid": "markdown-explorer-spreadsheet-sheets", onKeyDown: Xi, children: e.map((a, i) => /* @__PURE__ */ c(
2391
+ }, il = ({ names: e, selected: t, onSelect: n, label: r, tabIdOf: o, panelId: s }) => /* @__PURE__ */ c("div", { role: "tablist", "aria-label": r, className: "aqmx-sheet-tabs", "data-testid": "markdown-explorer-spreadsheet-sheets", onKeyDown: al, children: e.map((a, i) => /* @__PURE__ */ c(
2366
2392
  "button",
2367
2393
  {
2368
2394
  type: "button",
@@ -2377,8 +2403,8 @@ const Gi = (e, t, n) => t === "csv" ? Wi(e, n) : n === "whole" ? ns(e) : rs(e),
2377
2403
  children: a
2378
2404
  },
2379
2405
  i
2380
- )) }), $r = 64 * 1024, Qi = (e) => {
2381
- let t = new Uint8Array(Math.min(e, $r)), n = 0;
2406
+ )) }), Br = 64 * 1024, ll = (e) => {
2407
+ let t = new Uint8Array(Math.min(e, Br)), n = 0;
2382
2408
  return {
2383
2409
  append: (r) => {
2384
2410
  if (n + r.byteLength > t.byteLength) {
@@ -2390,46 +2416,46 @@ const Gi = (e, t, n) => t === "csv" ? Wi(e, n) : n === "whole" ? ns(e) : rs(e),
2390
2416
  bytes: () => t.subarray(0, n),
2391
2417
  length: () => n
2392
2418
  };
2393
- }, el = async (e) => {
2419
+ }, cl = async (e) => {
2394
2420
  for (; ; ) {
2395
2421
  const { done: t, value: n } = await e.read();
2396
2422
  if (t) return !0;
2397
2423
  if (n.byteLength > 0) return !1;
2398
2424
  }
2399
- }, tl = async (e, t) => {
2400
- const { format: n, legacyEncoding: r, maxBytes: o, budget: s } = t, a = e.getReader(), i = Qi(o);
2401
- let f = $r;
2425
+ }, dl = async (e, t) => {
2426
+ const { format: n, legacyEncoding: r, maxBytes: o, budget: s } = t, a = e.getReader(), i = ll(o);
2427
+ let f = Br;
2402
2428
  try {
2403
2429
  for (; ; ) {
2404
2430
  const { done: u, value: l } = await a.read();
2405
- if (u) return wt(i.bytes(), !0, n, r, s);
2431
+ if (u) return vt(i.bytes(), !0, n, r, s);
2406
2432
  const d = o - i.length();
2407
2433
  if (i.append(l.byteLength > d ? l.subarray(0, d) : l), i.length() === o) {
2408
- const g = l.byteLength <= d && await el(a);
2409
- return wt(i.bytes(), g, n, r, s);
2434
+ const g = l.byteLength <= d && await cl(a);
2435
+ return vt(i.bytes(), g, n, r, s);
2410
2436
  }
2411
2437
  if (i.length() < f) continue;
2412
2438
  f = i.length() * 2;
2413
- const h = wt(i.bytes(), !1, n, r, s);
2439
+ const h = vt(i.bytes(), !1, n, r, s);
2414
2440
  if (h.kind === "unreadable" && h.code !== "long-row" || h.kind === "table" && h.table.full) return h;
2415
2441
  }
2416
2442
  } finally {
2417
2443
  a.cancel().catch(() => {
2418
2444
  });
2419
2445
  }
2420
- }, _r = async (e, t, n, r) => {
2446
+ }, Ur = async (e, t, n, r) => {
2421
2447
  const o = await e.asset(rt(t), r);
2422
2448
  if (o.status === "cancelled") return null;
2423
2449
  if (o.status === "error") return { kind: "failure", failure: o.failure };
2424
2450
  let s;
2425
2451
  try {
2426
- s = await tl(o.body, n);
2452
+ s = await dl(o.body, n);
2427
2453
  } catch {
2428
2454
  return r.aborted ? null : { kind: "failure", failure: { reason: "failed" } };
2429
2455
  }
2430
2456
  return r.aborted ? null : s.kind === "table" ? { kind: "table", rows: s.table.rows, truncated: s.table.truncated } : s;
2431
- }, Ht = (e, t, n) => {
2432
- const { documents: r, labels: o } = $(), s = Da(), a = F(() => r.answerStampOf(e), [r, e]), i = oe(r.subscribe, a, a), [f, u] = V(0), l = X(() => ({ read: n, stamp: i, attempt: f }), [n, i, f]), [d, h] = V({ settled: null, shown: null, failure: null }), g = U(null), v = le((O, R) => {
2457
+ }, Vt = (e, t, n) => {
2458
+ const { documents: r, labels: o } = $(), s = Ha(), a = F(() => r.answerStampOf(e), [r, e]), i = re(r.subscribe, a, a), [f, u] = V(0), l = X(() => ({ read: n, stamp: i, attempt: f }), [n, i, f]), [d, h] = V({ settled: null, shown: null, failure: null }), g = U(null), v = le((O, R) => {
2433
2459
  if (g.current?.settle(R.stamp, O.kind === "failure" ? O.failure : null), O.kind === "read") {
2434
2460
  h({ settled: R, shown: O.value, failure: null });
2435
2461
  return;
@@ -2455,15 +2481,15 @@ const Gi = (e, t, n) => t === "csv" ? Wi(e, n) : n === "whole" ? ns(e) : rs(e),
2455
2481
  Y(() => y ? s.holdBusy() : void 0, [y, s]);
2456
2482
  const T = F(() => u((O) => O + 1), []);
2457
2483
  return { shown: d.shown, failure: d.failure, retry: T };
2458
- }, Fr = (e, t) => {
2484
+ }, Hr = (e, t) => {
2459
2485
  const n = {};
2460
2486
  for (const r of Object.keys(Xe[t])) {
2461
- const o = e[It(r)];
2487
+ const o = e[_t(r)];
2462
2488
  o !== Xe[t][r].text && (n[r] = o);
2463
2489
  }
2464
2490
  return n;
2465
- }, nl = (e, t) => Object.fromEntries(Object.entries(Fr(e, t)).map(([n, r]) => [`spreadsheet${n.charAt(0).toUpperCase()}${n.slice(1)}`, r])), rl = (e, t) => ({
2466
- ...nl(e, t),
2491
+ }, ul = (e, t) => Object.fromEntries(Object.entries(Hr(e, t)).map(([n, r]) => [`spreadsheet${n.charAt(0).toUpperCase()}${n.slice(1)}`, r])), fl = (e, t) => ({
2492
+ ...ul(e, t),
2467
2493
  loading: e.viewerLoading,
2468
2494
  errorPrefix: e.viewerErrorPrefix,
2469
2495
  styleTitle: e.viewerStyleTitle,
@@ -2521,28 +2547,28 @@ const Gi = (e, t, n) => t === "csv" ? Wi(e, n) : n === "whole" ? ns(e) : rs(e),
2521
2547
  svgImageCopyImage: e.viewerSvgImageCopyImage,
2522
2548
  svgImageCopiedImage: e.viewerSvgImageCopiedImage,
2523
2549
  svgImageCopyImageFailed: e.viewerSvgImageCopyImageFailed
2524
- }), qr = (e, t, n) => {
2550
+ }), zr = (e, t, n) => {
2525
2551
  if (t !== void 0) return t;
2526
2552
  if (n !== void 0) return n;
2527
2553
  const [r] = e.documentStyles;
2528
2554
  if (r === void 0) throw new Error("[markdown-explorer] the configuration has no document style");
2529
2555
  return r.name;
2530
- }, Br = (e, t) => e !== void 0 ? e : t !== void 0 ? t : ss;
2556
+ }, jr = (e, t) => e !== void 0 ? e : t !== void 0 ? t : cs;
2531
2557
  class ne extends Error {
2532
2558
  refusal;
2533
2559
  constructor(t, n) {
2534
2560
  super(n), this.name = "WorkbookError", this.refusal = t;
2535
2561
  }
2536
2562
  }
2537
- const ol = /* @__PURE__ */ new Map([
2563
+ const ml = /* @__PURE__ */ new Map([
2538
2564
  ["lt", "<"],
2539
2565
  ["gt", ">"],
2540
2566
  ["amp", "&"],
2541
2567
  ["quot", '"'],
2542
2568
  ["apos", "'"]
2543
- ]), sl = /&(#x[0-9A-Fa-f]+|#[0-9]+|[A-Za-z_][A-Za-z0-9._-]*);/gu, al = /([^\s=/>]+)\s*=\s*(?:"([^"]*)"|'([^']*)')/gu, il = /^[^\s/>]+/u, Se = (e) => {
2569
+ ]), hl = /&(#x[0-9A-Fa-f]+|#[0-9]+|[A-Za-z_][A-Za-z0-9._-]*);/gu, pl = /([^\s=/>]+)\s*=\s*(?:"([^"]*)"|'([^']*)')/gu, gl = /^[^\s/>]+/u, Se = (e) => {
2544
2570
  throw new ne("not-workbook", `the XML ${e}`);
2545
- }, On = (e) => Number.isInteger(e) && e >= 0 && e <= 1114111 ? String.fromCodePoint(e) : Se(`refers to the code point ${e}`), Ur = (e) => e.includes("&") ? e.replace(sl, (t, n) => n.startsWith("#x") ? On(Number.parseInt(n.slice(2), 16)) : n.startsWith("#") ? On(Number.parseInt(n.slice(1), 10)) : ol.get(n) ?? Se(`names the undeclared entity ${t}`)) : e, Nt = (e) => e.slice(e.indexOf(":") + 1), ll = (e, t) => {
2571
+ }, An = (e) => Number.isInteger(e) && e >= 0 && e <= 1114111 ? String.fromCodePoint(e) : Se(`refers to the code point ${e}`), Vr = (e) => e.includes("&") ? e.replace(hl, (t, n) => n.startsWith("#x") ? An(Number.parseInt(n.slice(2), 16)) : n.startsWith("#") ? An(Number.parseInt(n.slice(1), 10)) : ml.get(n) ?? Se(`names the undeclared entity ${t}`)) : e, Pt = (e) => e.slice(e.indexOf(":") + 1), wl = (e, t) => {
2546
2572
  let n = "";
2547
2573
  for (let r = t; r < e.length; r += 1) {
2548
2574
  const o = e[r];
@@ -2554,18 +2580,18 @@ const ol = /* @__PURE__ */ new Map([
2554
2580
  return r;
2555
2581
  }
2556
2582
  return -1;
2557
- }, cl = (e) => {
2583
+ }, vl = (e) => {
2558
2584
  const t = /* @__PURE__ */ new Map();
2559
- for (const n of e.matchAll(al)) t.set(Nt(n[1] ?? ""), Ur(n[2] ?? n[3] ?? ""));
2585
+ for (const n of e.matchAll(pl)) t.set(Pt(n[1] ?? ""), Vr(n[2] ?? n[3] ?? ""));
2560
2586
  return t;
2561
- }, Hr = (e, t) => {
2587
+ }, Zr = (e, t) => {
2562
2588
  let n = "";
2563
2589
  const r = () => {
2564
2590
  let o = 0;
2565
2591
  for (; !t(); ) {
2566
2592
  const s = n.indexOf("<", o);
2567
2593
  if (s === -1) break;
2568
- if (s > o && (e.text?.(Ur(n.slice(o, s))), o = s), n.startsWith("<!--", s)) {
2594
+ if (s > o && (e.text?.(Vr(n.slice(o, s))), o = s), n.startsWith("<!--", s)) {
2569
2595
  const u = n.indexOf("-->", s + 4);
2570
2596
  if (u === -1) break;
2571
2597
  o = u + 3;
@@ -2585,14 +2611,14 @@ const ol = /* @__PURE__ */ new Map([
2585
2611
  o = u + 2;
2586
2612
  continue;
2587
2613
  }
2588
- const i = ll(n, s + 1);
2614
+ const i = wl(n, s + 1);
2589
2615
  if (i === -1) break;
2590
2616
  const f = n.slice(s + 1, i);
2591
2617
  if (f.startsWith("/"))
2592
- e.end?.(Nt(f.slice(1).trim()));
2618
+ e.end?.(Pt(f.slice(1).trim()));
2593
2619
  else {
2594
- const u = f.endsWith("/"), l = u ? f.slice(0, -1) : f, d = il.exec(l)?.[0] ?? Se("has a tag without a name"), h = Nt(d);
2595
- e.start?.(h, cl(l.slice(d.length)), u), u && e.end?.(h);
2620
+ const u = f.endsWith("/"), l = u ? f.slice(0, -1) : f, d = gl.exec(l)?.[0] ?? Se("has a tag without a name"), h = Pt(d);
2621
+ e.start?.(h, vl(l.slice(d.length)), u), u && e.end?.(h);
2596
2622
  }
2597
2623
  o = i + 1;
2598
2624
  }
@@ -2607,7 +2633,7 @@ const ol = /* @__PURE__ */ new Map([
2607
2633
  }
2608
2634
  };
2609
2635
  }, He = async (e, t, n) => {
2610
- const r = Hr(t, n), o = new TextDecoder("utf-8", { fatal: !0 }), s = e.getReader();
2636
+ const r = Zr(t, n), o = new TextDecoder("utf-8", { fatal: !0 }), s = e.getReader();
2611
2637
  try {
2612
2638
  for (; !n(); ) {
2613
2639
  const { done: a, value: i } = await s.read();
@@ -2624,44 +2650,44 @@ const ol = /* @__PURE__ */ new Map([
2624
2650
  s.cancel().catch(() => {
2625
2651
  });
2626
2652
  }
2627
- }, dl = 101010256, ul = 33639248, fl = 67324752, zr = 22, ml = 65535, Ln = 46, Mn = 30, hl = 1, An = 0, pl = 8, gl = 65535, Le = 4294967295, wl = new TextDecoder("utf-8"), ae = (e) => {
2653
+ }, bl = 101010256, yl = 33639248, kl = 67324752, Wr = 22, El = 65535, Nn = 46, Dn = 30, Sl = 1, Pn = 0, xl = 8, Tl = 65535, Le = 4294967295, Rl = new TextDecoder("utf-8"), ae = (e) => {
2628
2654
  throw new ne("not-workbook", `the ZIP package ${e}`);
2629
- }, vl = (e) => {
2630
- const t = e.byteLength - zr, n = Math.max(0, t - ml);
2655
+ }, Cl = (e) => {
2656
+ const t = e.byteLength - Wr, n = Math.max(0, t - El);
2631
2657
  for (let r = t; r >= n; r -= 1)
2632
- if (e.getUint32(r, !0) === dl) return r;
2658
+ if (e.getUint32(r, !0) === bl) return r;
2633
2659
  return ae("has no end of central directory record");
2634
- }, bl = (e) => {
2635
- if (e.byteLength < zr) return ae("is shorter than its end record");
2636
- const t = new DataView(e.buffer, e.byteOffset, e.byteLength), n = vl(t), r = t.getUint16(n + 4, !0), o = t.getUint16(n + 6, !0), s = t.getUint16(n + 10, !0), a = t.getUint32(n + 12, !0), i = t.getUint32(n + 16, !0);
2660
+ }, Ol = (e) => {
2661
+ if (e.byteLength < Wr) return ae("is shorter than its end record");
2662
+ const t = new DataView(e.buffer, e.byteOffset, e.byteLength), n = Cl(t), r = t.getUint16(n + 4, !0), o = t.getUint16(n + 6, !0), s = t.getUint16(n + 10, !0), a = t.getUint32(n + 12, !0), i = t.getUint32(n + 16, !0);
2637
2663
  if (r !== 0 || o !== 0) return ae("spans several disks");
2638
- if (s === gl || a === Le || i === Le) return ae("is a ZIP64 package");
2664
+ if (s === Tl || a === Le || i === Le) return ae("is a ZIP64 package");
2639
2665
  if (i + a > n) return ae("has a central directory past its end record");
2640
2666
  const f = /* @__PURE__ */ new Map();
2641
2667
  let u = i;
2642
2668
  for (let l = 0; l < s; l += 1) {
2643
- if (u + Ln > n || t.getUint32(u, !0) !== ul) return ae("has a malformed central directory");
2644
- const d = t.getUint16(u + 8, !0), h = t.getUint16(u + 10, !0), g = t.getUint32(u + 20, !0), v = t.getUint32(u + 24, !0), y = t.getUint16(u + 28, !0), T = t.getUint16(u + 30, !0), O = t.getUint16(u + 32, !0), R = t.getUint32(u + 42, !0), q = u + Ln;
2669
+ if (u + Nn > n || t.getUint32(u, !0) !== yl) return ae("has a malformed central directory");
2670
+ const d = t.getUint16(u + 8, !0), h = t.getUint16(u + 10, !0), g = t.getUint32(u + 20, !0), v = t.getUint32(u + 24, !0), y = t.getUint16(u + 28, !0), T = t.getUint16(u + 30, !0), O = t.getUint16(u + 32, !0), R = t.getUint32(u + 42, !0), q = u + Nn;
2645
2671
  if (q + y > n) return ae("has a name past its central directory");
2646
- const D = wl.decode(e.subarray(q, q + y));
2672
+ const D = Rl.decode(e.subarray(q, q + y));
2647
2673
  if (g === Le || v === Le || R === Le) return ae("has a ZIP64 entry");
2648
2674
  if (!D.endsWith("/")) {
2649
2675
  if (f.has(D)) return ae(`names ${D} twice`);
2650
- f.set(D, { name: D, encrypted: (d & hl) !== 0, method: h, compressedSize: g, uncompressedSize: v, localHeaderOffset: R });
2676
+ f.set(D, { name: D, encrypted: (d & Sl) !== 0, method: h, compressedSize: g, uncompressedSize: v, localHeaderOffset: R });
2651
2677
  }
2652
2678
  u = q + y + T + O;
2653
2679
  }
2654
2680
  return { bytes: e, entries: f };
2655
- }, yl = (e, t) => {
2681
+ }, Ll = (e, t) => {
2656
2682
  const { bytes: n } = e, r = new DataView(n.buffer, n.byteOffset, n.byteLength), o = t.localHeaderOffset;
2657
- if (o + Mn > n.byteLength || r.getUint32(o, !0) !== fl) return ae(`has no local header for ${t.name}`);
2658
- const s = o + Mn + r.getUint16(o + 26, !0) + r.getUint16(o + 28, !0), a = s + t.compressedSize;
2683
+ if (o + Dn > n.byteLength || r.getUint32(o, !0) !== kl) return ae(`has no local header for ${t.name}`);
2684
+ const s = o + Dn + r.getUint16(o + 26, !0) + r.getUint16(o + 28, !0), a = s + t.compressedSize;
2659
2685
  return a > n.byteLength ? ae(`has the data of ${t.name} past its end`) : { start: s, end: a };
2660
- }, jr = (e) => new ReadableStream({
2686
+ }, Gr = (e) => new ReadableStream({
2661
2687
  start(t) {
2662
2688
  e.byteLength > 0 && t.enqueue(e), t.close();
2663
2689
  }
2664
- }), kl = (e) => jr(e).pipeThrough(new DecompressionStream("deflate-raw")), El = (e, t) => {
2690
+ }), Ml = (e) => Gr(e).pipeThrough(new DecompressionStream("deflate-raw")), Al = (e, t) => {
2665
2691
  let n = 0;
2666
2692
  return new TransformStream({
2667
2693
  transform(r, o) {
@@ -2676,10 +2702,10 @@ const ol = /* @__PURE__ */ new Map([
2676
2702
  const r = e.entries.get(t);
2677
2703
  if (r === void 0) return null;
2678
2704
  if (r.encrypted) throw new ne("encrypted", `${t} is encrypted`);
2679
- if (r.method !== An && r.method !== pl) return ae(`compresses ${t} with method ${r.method}`);
2705
+ if (r.method !== Pn && r.method !== xl) return ae(`compresses ${t} with method ${r.method}`);
2680
2706
  if (r.uncompressedSize > n) throw new ne("too-large", `${t} declares ${r.uncompressedSize} bytes`);
2681
- const { start: o, end: s } = yl(e, r), a = e.bytes.subarray(o, s);
2682
- return (r.method === An ? jr(a) : kl(a)).pipeThrough(El(t, n));
2707
+ const { start: o, end: s } = Ll(e, r), a = e.bytes.subarray(o, s);
2708
+ return (r.method === Pn ? Gr(a) : Ml(a)).pipeThrough(Al(t, n));
2683
2709
  }, tt = async (e, t, n) => {
2684
2710
  const r = Fe(e, t, n);
2685
2711
  if (r === null) return null;
@@ -2698,10 +2724,10 @@ const ol = /* @__PURE__ */ new Map([
2698
2724
  } finally {
2699
2725
  s.releaseLock();
2700
2726
  }
2701
- }, Nn = "content.xml", Sl = "META-INF/manifest.xml", Vr = (e) => {
2727
+ }, In = "content.xml", Nl = "META-INF/manifest.xml", Kr = (e) => {
2702
2728
  throw new ne("not-workbook", `the spreadsheet ${e}`);
2703
- }, Dn = (e, t) => Fe(e, Nn, t.maxPartBytes) ?? Vr(`has no ${Nn}`), xl = async (e, t) => {
2704
- const n = Fe(e, Sl, t.maxPartBytes);
2729
+ }, $n = (e, t) => Fe(e, In, t.maxPartBytes) ?? Kr(`has no ${In}`), Dl = async (e, t) => {
2730
+ const n = Fe(e, Nl, t.maxPartBytes);
2705
2731
  if (n === null) return !1;
2706
2732
  let r = !1;
2707
2733
  return await He(
@@ -2713,7 +2739,7 @@ const ol = /* @__PURE__ */ new Map([
2713
2739
  },
2714
2740
  () => r
2715
2741
  ), r;
2716
- }, Tl = async (e) => {
2742
+ }, Pl = async (e) => {
2717
2743
  const t = [], n = /* @__PURE__ */ new Set();
2718
2744
  let r = null, o = 0;
2719
2745
  return await He(
@@ -2728,11 +2754,11 @@ const ol = /* @__PURE__ */ new Map([
2728
2754
  },
2729
2755
  () => !1
2730
2756
  ), { tables: t, hidingStyles: n };
2731
- }, vt = (e) => {
2757
+ }, bt = (e) => {
2732
2758
  const t = Number(e);
2733
2759
  return Number.isInteger(t) && t > 0 ? t : 1;
2734
- }, Rl = async (e, t, n) => {
2735
- const r = Ir(n);
2760
+ }, Il = async (e, t, n) => {
2761
+ const r = qr(n);
2736
2762
  let o = 0, s = 0, a = !1, i = !1, f = 0, u = 1, l = /* @__PURE__ */ new Map(), d = 0, h = null;
2737
2763
  return await He(
2738
2764
  e,
@@ -2742,8 +2768,8 @@ const ol = /* @__PURE__ */ new Map([
2742
2768
  s === 0 && (a = o === t, o += 1), y || (s += 1);
2743
2769
  return;
2744
2770
  }
2745
- !a || s !== 1 || (g === "table-row" ? (u = vt(v.get("number-rows-repeated")), l = /* @__PURE__ */ new Map(), d = 0) : g === "table-cell" || g === "covered-table-cell" ? h = { repeat: vt(v.get("number-columns-repeated")), covered: g === "covered-table-cell", parts: [], paragraphs: 0, paragraphDepth: 0, annotationDepth: 0 } : h !== null && h.annotationDepth === 0 && (g === "annotation" && !y ? h.annotationDepth += 1 : g === "p" || g === "h" ? (h.paragraphs > 0 && h.parts.push(`
2746
- `), h.paragraphs += 1, y || (h.paragraphDepth += 1)) : h.paragraphDepth > 0 && (g === "s" ? h.parts.push(" ".repeat(vt(v.get("c")))) : g === "tab" ? h.parts.push(" ") : g === "line-break" && h.parts.push(`
2771
+ !a || s !== 1 || (g === "table-row" ? (u = bt(v.get("number-rows-repeated")), l = /* @__PURE__ */ new Map(), d = 0) : g === "table-cell" || g === "covered-table-cell" ? h = { repeat: bt(v.get("number-columns-repeated")), covered: g === "covered-table-cell", parts: [], paragraphs: 0, paragraphDepth: 0, annotationDepth: 0 } : h !== null && h.annotationDepth === 0 && (g === "annotation" && !y ? h.annotationDepth += 1 : g === "p" || g === "h" ? (h.paragraphs > 0 && h.parts.push(`
2772
+ `), h.paragraphs += 1, y || (h.paragraphDepth += 1)) : h.paragraphDepth > 0 && (g === "s" ? h.parts.push(" ".repeat(bt(v.get("c")))) : g === "tab" ? h.parts.push(" ") : g === "line-break" && h.parts.push(`
2747
2773
  `))));
2748
2774
  },
2749
2775
  end: (g) => {
@@ -2771,18 +2797,18 @@ const ol = /* @__PURE__ */ new Map([
2771
2797
  },
2772
2798
  () => i || r.full()
2773
2799
  ), r.table();
2774
- }, Cl = async (e, t) => {
2775
- if (await xl(e, t)) throw new ne("encrypted", "the spreadsheet's manifest names encryption data");
2776
- const { tables: n, hidingStyles: r } = await Tl(Dn(e, t)), o = [];
2800
+ }, $l = async (e, t) => {
2801
+ if (await Dl(e, t)) throw new ne("encrypted", "the spreadsheet's manifest names encryption data");
2802
+ const { tables: n, hidingStyles: r } = await Pl($n(e, t)), o = [];
2777
2803
  let s = 0;
2778
2804
  return n.forEach((a, i) => {
2779
2805
  if (r.has(a.style)) {
2780
2806
  s += 1;
2781
2807
  return;
2782
2808
  }
2783
- o.push({ name: a.name, read: async (f) => Rl(Dn(e, t), i, f) });
2784
- }), o.length === 0 && Vr("shows no table"), { sheets: o.slice(0, t.maxSheets), unshownSheets: s, unlistedSheets: Math.max(0, o.length - t.maxSheets) };
2785
- }, Ee = Object.freeze({ kind: "general" }), Ol = new Map([
2809
+ o.push({ name: a.name, read: async (f) => Il($n(e, t), i, f) });
2810
+ }), o.length === 0 && Kr("shows no table"), { sheets: o.slice(0, t.maxSheets), unshownSheets: s, unlistedSheets: Math.max(0, o.length - t.maxSheets) };
2811
+ }, Ee = Object.freeze({ kind: "general" }), _l = new Map([
2786
2812
  [0, "General"],
2787
2813
  [1, "0"],
2788
2814
  [2, "0.00"],
@@ -2814,7 +2840,7 @@ const ol = /* @__PURE__ */ new Map([
2814
2840
  [47, "mmss.0"],
2815
2841
  [48, "##0.0E+0"],
2816
2842
  [49, "@"]
2817
- ]), Ll = /^\[(h+|m+|s+)\]$/iu, Ml = (e) => {
2843
+ ]), Fl = /^\[(h+|m+|s+)\]$/iu, ql = (e) => {
2818
2844
  let t = "", n = !1;
2819
2845
  for (let r = 0; r < e.length; r += 1) {
2820
2846
  const o = e[r];
@@ -2826,13 +2852,13 @@ const ol = /* @__PURE__ */ new Map([
2826
2852
  r += 1;
2827
2853
  else if (o === "[") {
2828
2854
  const s = e.indexOf("]", r + 1), a = e.slice(r, s === -1 ? e.length : s + 1);
2829
- Ll.test(a) && (t += a.slice(1, -1), n = !0), r = s === -1 ? e.length : s;
2855
+ Fl.test(a) && (t += a.slice(1, -1), n = !0), r = s === -1 ? e.length : s;
2830
2856
  } else
2831
2857
  t += o;
2832
2858
  }
2833
2859
  return { text: t.toLowerCase(), elapsed: n };
2834
- }, Al = (e) => {
2835
- const { text: t, elapsed: n } = Ml(e);
2860
+ }, Bl = (e) => {
2861
+ const { text: t, elapsed: n } = ql(e);
2836
2862
  if (t === "" || t === "general" || t.includes("@") || /[0#?.]e[+-]/u.test(t)) return Ee;
2837
2863
  const r = n || /[hs]/u.test(t) || t.includes("am/pm") || t.includes("a/p"), o = /[ydge]/u.test(t.replace(/am\/pm|a\/p/gu, "")) || t.includes("m") && !r;
2838
2864
  if (o || r) return { kind: "date-time", date: o, time: r, seconds: t.includes("s"), elapsed: n };
@@ -2841,77 +2867,77 @@ const ol = /* @__PURE__ */ new Map([
2841
2867
  if (s === void 0) return Ee;
2842
2868
  const a = /,*$/u.exec(s)?.[0].length ?? 0, [i = "", f = ""] = s.slice(0, s.length - a).split("."), u = (f.match(/[0#?]/gu) ?? []).length;
2843
2869
  return t.includes("%") ? { kind: "percent", decimals: u } : { kind: "fixed", decimals: u, grouping: i.includes(","), scale: 1e3 ** a };
2844
- }, Nl = (e, t) => {
2845
- const n = t.get(e) ?? Ol.get(e);
2846
- return n === void 0 ? Ee : Al(n);
2847
- }, zt = (e) => {
2870
+ }, Ul = (e, t) => {
2871
+ const n = t.get(e) ?? _l.get(e);
2872
+ return n === void 0 ? Ee : Bl(n);
2873
+ }, Zt = (e) => {
2848
2874
  if (Number.isInteger(e) && Math.abs(e) < 1e15) return String(e);
2849
2875
  const [t = "", n] = e.toPrecision(15).split("e"), r = t.includes(".") ? t.replace(/0+$/u, "").replace(/\.$/u, "") : t;
2850
2876
  return n === void 0 ? r : `${r}E${n.startsWith("-") ? n : `+${n.replace("+", "")}`}`;
2851
- }, Pn = (e, t, n) => {
2877
+ }, _n = (e, t, n) => {
2852
2878
  const r = Math.abs(e).toFixed(t);
2853
- if (r.includes("e")) return zt(e);
2879
+ if (r.includes("e")) return Zt(e);
2854
2880
  const [o = "", s] = r.split("."), a = n ? o.replace(/\B(?=(\d{3})+(?!\d))/gu, ",") : o;
2855
2881
  return `${e < 0 && /[1-9]/u.test(r) ? "-" : ""}${a}${s === void 0 ? "" : `.${s}`}`;
2856
- }, Dl = 864e5, In = 86400, Pl = 2958465, xe = (e, t) => String(e).padStart(t, "0"), Il = (e, t) => {
2882
+ }, Hl = 864e5, Fn = 86400, zl = 2958465, xe = (e, t) => String(e).padStart(t, "0"), jl = (e, t) => {
2857
2883
  if (!t && e === 0) return "1900-01-00";
2858
2884
  if (!t && e === 60) return "1900-02-29";
2859
- const n = t ? Date.UTC(1904, 0, 1) : e < 60 ? Date.UTC(1899, 11, 31) : Date.UTC(1899, 11, 30), r = new Date(n + e * Dl);
2885
+ const n = t ? Date.UTC(1904, 0, 1) : e < 60 ? Date.UTC(1899, 11, 31) : Date.UTC(1899, 11, 30), r = new Date(n + e * Hl);
2860
2886
  return `${xe(r.getUTCFullYear(), 4)}-${xe(r.getUTCMonth() + 1, 2)}-${xe(r.getUTCDate(), 2)}`;
2861
- }, $l = (e, t, n) => {
2862
- if (e < 0 || e >= Pl + 1) return zt(e);
2863
- let r = Math.floor(e), o = Math.round((e - r) * In);
2864
- o === In && (r += 1, o = 0);
2887
+ }, Vl = (e, t, n) => {
2888
+ if (e < 0 || e >= zl + 1) return Zt(e);
2889
+ let r = Math.floor(e), o = Math.round((e - r) * Fn);
2890
+ o === Fn && (r += 1, o = 0);
2865
2891
  const s = Math.floor(o / 3600), a = Math.floor(o % 3600 / 60), i = `${xe(t.elapsed ? r * 24 + s : s, 2)}:${xe(a, 2)}${t.seconds ? `:${xe(o % 60, 2)}` : ""}`;
2866
2892
  if (t.elapsed || !t.date) return i;
2867
- const f = Il(r, n);
2893
+ const f = jl(r, n);
2868
2894
  return t.time ? `${f} ${i}` : f;
2869
- }, _l = (e, t, n) => {
2895
+ }, Zl = (e, t, n) => {
2870
2896
  switch (t.kind) {
2871
2897
  case "general":
2872
- return zt(e);
2898
+ return Zt(e);
2873
2899
  case "date-time":
2874
- return $l(e, t, n);
2900
+ return Vl(e, t, n);
2875
2901
  case "percent":
2876
- return `${Pn(e * 100, t.decimals, !1)}%`;
2902
+ return `${_n(e * 100, t.decimals, !1)}%`;
2877
2903
  case "fixed":
2878
- return Pn(e / t.scale, t.decimals, t.grouping);
2904
+ return _n(e / t.scale, t.decimals, t.grouping);
2879
2905
  }
2880
- }, Zr = "_rels/.rels", ce = (e) => {
2906
+ }, Yr = "_rels/.rels", ce = (e) => {
2881
2907
  throw new ne("not-workbook", `the workbook ${e}`);
2882
- }, jt = (e, t) => {
2883
- const n = Hr(t, () => !1);
2908
+ }, Wt = (e, t) => {
2909
+ const n = Zr(t, () => !1);
2884
2910
  n.write(e), n.finish();
2885
- }, Fl = (e, t) => {
2911
+ }, Wl = (e, t) => {
2886
2912
  try {
2887
2913
  return decodeURIComponent(e);
2888
2914
  } catch {
2889
2915
  return ce(`points to a malformed part name (${t})`);
2890
2916
  }
2891
- }, ql = (e, t) => {
2917
+ }, Gl = (e, t) => {
2892
2918
  const r = [...t.startsWith("/") ? [] : e.split("/").slice(0, -1)];
2893
2919
  for (const o of t.split("/"))
2894
- o === "" || o === "." || (o === ".." ? (r.length === 0 && ce(`points above its root (${t})`), r.pop()) : r.push(Fl(o, t)));
2920
+ o === "" || o === "." || (o === ".." ? (r.length === 0 && ce(`points above its root (${t})`), r.pop()) : r.push(Wl(o, t)));
2895
2921
  return r.join("/");
2896
- }, Bl = (e) => {
2922
+ }, Kl = (e) => {
2897
2923
  const t = e.lastIndexOf("/");
2898
2924
  return `${e.slice(0, t + 1)}_rels/${e.slice(t + 1)}.rels`;
2899
- }, $n = async (e, t, n) => {
2900
- const r = await tt(e, t === "" ? Zr : Bl(t), n.maxPartBytes), o = /* @__PURE__ */ new Map();
2901
- return r === null || jt(r, {
2925
+ }, qn = async (e, t, n) => {
2926
+ const r = await tt(e, t === "" ? Yr : Kl(t), n.maxPartBytes), o = /* @__PURE__ */ new Map();
2927
+ return r === null || Wt(r, {
2902
2928
  start: (s, a) => {
2903
2929
  if (s !== "Relationship") return;
2904
2930
  const i = a.get("Id"), f = a.get("Type"), u = a.get("Target");
2905
- i === void 0 || f === void 0 || u === void 0 || a.get("TargetMode") === "External" || o.set(i, { type: f, target: ql(t, u) });
2931
+ i === void 0 || f === void 0 || u === void 0 || a.get("TargetMode") === "External" || o.set(i, { type: f, target: Gl(t, u) });
2906
2932
  }
2907
2933
  }), o;
2908
- }, bt = (e, t) => {
2934
+ }, yt = (e, t) => {
2909
2935
  for (const n of e.values()) if (n.type.endsWith(`/${t}`)) return n.target;
2910
2936
  return null;
2911
- }, Ul = (e) => {
2937
+ }, Yl = (e) => {
2912
2938
  const t = [];
2913
2939
  let n = !1;
2914
- return jt(e, {
2940
+ return Wt(e, {
2915
2941
  start: (r, o) => {
2916
2942
  if (r === "workbookPr") {
2917
2943
  const s = o.get("date1904");
@@ -2919,7 +2945,7 @@ const ol = /* @__PURE__ */ new Map([
2919
2945
  } else r === "sheet" && t.push({ name: o.get("name") ?? "", state: o.get("state") ?? "visible", relationship: o.get("id") ?? "" });
2920
2946
  }
2921
2947
  }), { sheets: t, date1904: n };
2922
- }, Hl = async (e) => {
2948
+ }, Xl = async (e) => {
2923
2949
  const t = [];
2924
2950
  let n = null, r = !1, o = 0;
2925
2951
  return await He(
@@ -2937,10 +2963,10 @@ const ol = /* @__PURE__ */ new Map([
2937
2963
  },
2938
2964
  () => !1
2939
2965
  ), t;
2940
- }, zl = (e) => {
2966
+ }, Jl = (e) => {
2941
2967
  const t = /* @__PURE__ */ new Map(), n = [];
2942
2968
  let r = !1;
2943
- return jt(e, {
2969
+ return Wt(e, {
2944
2970
  start: (o, s) => {
2945
2971
  if (o === "numFmt") {
2946
2972
  const a = Number(s.get("numFmtId")), i = s.get("formatCode");
@@ -2955,19 +2981,19 @@ const ol = /* @__PURE__ */ new Map([
2955
2981
  end: (o) => {
2956
2982
  o === "cellXfs" && (r = !1);
2957
2983
  }
2958
- }), n.map((o) => Nl(o, t));
2959
- }, jl = /^(\d{4}-\d{2}-\d{2})(?:T(\d{2}:\d{2}(?::\d{2})?)(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})?)?$/u, Vl = (e) => {
2960
- const t = jl.exec(e);
2984
+ }), n.map((o) => Ul(o, t));
2985
+ }, Ql = /^(\d{4}-\d{2}-\d{2})(?:T(\d{2}:\d{2}(?::\d{2})?)(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})?)?$/u, ec = (e) => {
2986
+ const t = Ql.exec(e);
2961
2987
  if (t === null) return e;
2962
2988
  const [, n, r] = t;
2963
2989
  return r === void 0 || /^00:00(?::00)?$/u.test(r) ? n ?? e : `${n} ${r}`;
2964
- }, Zl = /^([A-Za-z]{1,3})(\d+)$/u, Wl = (e) => {
2965
- const t = Zl.exec(e)?.[1];
2990
+ }, tc = /^([A-Za-z]{1,3})(\d+)$/u, nc = (e) => {
2991
+ const t = tc.exec(e)?.[1];
2966
2992
  if (t === void 0) return null;
2967
2993
  let n = 0;
2968
2994
  for (const r of t.toUpperCase()) n = n * 26 + (r.charCodeAt(0) - 64);
2969
2995
  return n - 1;
2970
- }, Gl = (e, t, n, r) => {
2996
+ }, rc = (e, t, n, r) => {
2971
2997
  const o = e.value.join("");
2972
2998
  switch (e.type) {
2973
2999
  case "s":
@@ -2980,16 +3006,16 @@ const ol = /* @__PURE__ */ new Map([
2980
3006
  case "e":
2981
3007
  return o;
2982
3008
  case "d":
2983
- return Vl(o.trim());
3009
+ return ec(o.trim());
2984
3010
  default: {
2985
3011
  const s = o.trim();
2986
3012
  if (s === "") return "";
2987
3013
  const a = Number(s);
2988
- return Number.isFinite(a) ? _l(a, n[e.style] ?? Ee, r) : s;
3014
+ return Number.isFinite(a) ? Zl(a, n[e.style] ?? Ee, r) : s;
2989
3015
  }
2990
3016
  }
2991
- }, Kl = async (e, t, n, r, o) => {
2992
- const s = Ir(t);
3017
+ }, oc = async (e, t, n, r, o) => {
3018
+ const s = qr(t);
2993
3019
  let a = -1, i = /* @__PURE__ */ new Map(), f = 0, u = null;
2994
3020
  return await He(
2995
3021
  e,
@@ -2999,13 +3025,13 @@ const ol = /* @__PURE__ */ new Map([
2999
3025
  const g = Number(d.get("r"));
3000
3026
  a = Number.isInteger(g) && g > a + 1 ? g - 1 : a + 1, i = /* @__PURE__ */ new Map(), f = 0;
3001
3027
  } else if (l === "c") {
3002
- const g = Wl(d.get("r") ?? "") ?? f, v = Number(d.get("s") ?? "0");
3028
+ const g = nc(d.get("r") ?? "") ?? f, v = Number(d.get("s") ?? "0");
3003
3029
  u = { column: g, type: d.get("t") ?? "n", style: Number.isInteger(v) ? v : 0, value: [], inline: [], inValue: !1, inInlineText: !1, phoneticDepth: 0 };
3004
3030
  } else u !== null && (l === "v" ? u.inValue = !h : l === "rPh" && !h ? u.phoneticDepth += 1 : l === "t" && u.type === "inlineStr" && u.phoneticDepth === 0 && (u.inInlineText = !h));
3005
3031
  },
3006
3032
  end: (l) => {
3007
3033
  if (l === "c" && u !== null) {
3008
- const d = Gl(u, n, r, o);
3034
+ const d = rc(u, n, r, o);
3009
3035
  d !== "" && i.set(u.column, d), f = u.column + 1, u = null;
3010
3036
  } else l === "row" ? s.addRow(a, i, 1) : u !== null && (l === "v" ? u.inValue = !1 : l === "rPh" ? u.phoneticDepth = Math.max(0, u.phoneticDepth - 1) : l === "t" && (u.inInlineText = !1));
3011
3037
  },
@@ -3015,8 +3041,8 @@ const ol = /* @__PURE__ */ new Map([
3015
3041
  },
3016
3042
  s.full
3017
3043
  ), s.table();
3018
- }, Yl = async (e, t) => {
3019
- const n = bt(await $n(e, "", t), "officeDocument") ?? ce("has no officeDocument relationship"), r = await tt(e, n, t.maxPartBytes) ?? ce(`has no part ${n}`), { sheets: o, date1904: s } = Ul(r), a = await $n(e, n, t), i = bt(a, "sharedStrings"), f = i === null ? null : Fe(e, i, t.maxPartBytes), u = f === null ? [] : await Hl(f), l = bt(a, "styles"), d = l === null ? null : await tt(e, l, t.maxPartBytes), h = d === null ? [] : zl(d), g = [];
3044
+ }, sc = async (e, t) => {
3045
+ const n = yt(await qn(e, "", t), "officeDocument") ?? ce("has no officeDocument relationship"), r = await tt(e, n, t.maxPartBytes) ?? ce(`has no part ${n}`), { sheets: o, date1904: s } = Yl(r), a = await qn(e, n, t), i = yt(a, "sharedStrings"), f = i === null ? null : Fe(e, i, t.maxPartBytes), u = f === null ? [] : await Xl(f), l = yt(a, "styles"), d = l === null ? null : await tt(e, l, t.maxPartBytes), h = d === null ? [] : Jl(d), g = [];
3020
3046
  let v = 0;
3021
3047
  for (const y of o) {
3022
3048
  const T = a.get(y.relationship) ?? ce(`lists the sheet ${y.name} without its relationship`);
@@ -3028,25 +3054,25 @@ const ol = /* @__PURE__ */ new Map([
3028
3054
  name: y.name,
3029
3055
  read: async (O) => {
3030
3056
  const R = Fe(e, T.target, t.maxPartBytes) ?? ce(`has no part ${T.target}`);
3031
- return Kl(R, O, u, h, s);
3057
+ return oc(R, O, u, h, s);
3032
3058
  }
3033
3059
  });
3034
3060
  }
3035
3061
  return g.length === 0 && ce("shows no sheet"), { sheets: g.slice(0, t.maxSheets), unshownSheets: v, unlistedSheets: Math.max(0, g.length - t.maxSheets) };
3036
- }, Xl = Object.freeze([80, 75, 3, 4]), Jl = Object.freeze([208, 207, 17, 224, 161, 177, 26, 225]), yt = Uint8Array.from([..."EncryptedPackage"].flatMap((e) => [e.charCodeAt(0), 0])), Ql = /* @__PURE__ */ new Set(["application/vnd.oasis.opendocument.spreadsheet", "application/vnd.oasis.opendocument.spreadsheet-template"]), ec = "mimetype", Wr = (e, t) => e.byteLength >= t.length && t.every((n, r) => e[r] === n), Gr = (e) => Wr(e, Xl), Kr = (e) => Wr(e, Jl), tc = (e) => {
3037
- const t = e.byteLength - yt.byteLength;
3062
+ }, ac = Object.freeze([80, 75, 3, 4]), ic = Object.freeze([208, 207, 17, 224, 161, 177, 26, 225]), kt = Uint8Array.from([..."EncryptedPackage"].flatMap((e) => [e.charCodeAt(0), 0])), lc = /* @__PURE__ */ new Set(["application/vnd.oasis.opendocument.spreadsheet", "application/vnd.oasis.opendocument.spreadsheet-template"]), cc = "mimetype", Xr = (e, t) => e.byteLength >= t.length && t.every((n, r) => e[r] === n), Jr = (e) => Xr(e, ac), Qr = (e) => Xr(e, ic), dc = (e) => {
3063
+ const t = e.byteLength - kt.byteLength;
3038
3064
  for (let n = 0; n <= t; n += 1)
3039
- if (e[n] === yt[0] && yt.every((r, o) => e[n + o] === r)) return !0;
3065
+ if (e[n] === kt[0] && kt.every((r, o) => e[n + o] === r)) return !0;
3040
3066
  return !1;
3041
- }, nc = async (e, t) => {
3042
- if (Kr(e))
3043
- throw tc(e) ? new ne("encrypted", "the bytes are a password-protected workbook") : new ne("not-workbook", "the bytes are a compound file (a legacy .xls)");
3044
- if (!Gr(e)) throw new ne("not-workbook", "the bytes are no ZIP package");
3045
- const n = bl(e), r = await tt(n, ec, t.maxPartBytes);
3046
- if (r !== null && Ql.has(r.trim())) return Cl(n, t);
3047
- if (n.entries.has(Zr)) return Yl(n, t);
3067
+ }, uc = async (e, t) => {
3068
+ if (Qr(e))
3069
+ throw dc(e) ? new ne("encrypted", "the bytes are a password-protected workbook") : new ne("not-workbook", "the bytes are a compound file (a legacy .xls)");
3070
+ if (!Jr(e)) throw new ne("not-workbook", "the bytes are no ZIP package");
3071
+ const n = Ol(e), r = await tt(n, cc, t.maxPartBytes);
3072
+ if (r !== null && lc.has(r.trim())) return $l(n, t);
3073
+ if (n.entries.has(Yr)) return sc(n, t);
3048
3074
  throw new ne("not-workbook", "the ZIP package is neither an OpenDocument spreadsheet nor an Office Open XML package");
3049
- }, rc = async (e, t) => {
3075
+ }, fc = async (e, t) => {
3050
3076
  const n = e.getReader(), r = [];
3051
3077
  let o = 0;
3052
3078
  try {
@@ -3065,34 +3091,34 @@ const ol = /* @__PURE__ */ new Map([
3065
3091
  for (const i of r)
3066
3092
  s.set(i, a), a += i.byteLength;
3067
3093
  return s;
3068
- }, Yr = async (e, t) => {
3094
+ }, eo = async (e, t) => {
3069
3095
  try {
3070
3096
  return { kind: "table", table: await e.read(t) };
3071
3097
  } catch (n) {
3072
3098
  return { kind: "refused", refusal: n instanceof ne ? n.refusal : "not-workbook" };
3073
3099
  }
3074
- }, oc = async (e, t, n, r, o) => {
3075
- const s = await e.asset($o(t), o);
3100
+ }, mc = async (e, t, n, r, o) => {
3101
+ const s = await e.asset(Bo(t), o);
3076
3102
  if (s.status === "cancelled") return null;
3077
3103
  if (s.status === "error") return { kind: "failure", failure: s.failure };
3078
3104
  let a;
3079
3105
  try {
3080
- a = await rc(s.body, n.maxBytes);
3106
+ a = await fc(s.body, n.maxBytes);
3081
3107
  } catch {
3082
3108
  return o.aborted ? null : { kind: "failure", failure: { reason: "failed" } };
3083
3109
  }
3084
3110
  if (o.aborted) return null;
3085
3111
  if (a === null) return { kind: "refused", refusal: "too-large" };
3086
- if (!(Gr(a) || Kr(a))) return { kind: "not-package" };
3112
+ if (!(Jr(a) || Qr(a))) return { kind: "not-package" };
3087
3113
  try {
3088
- const i = await nc(a, n.limits), f = r === null ? -1 : i.sheets.findIndex((h) => h.name === r), u = Math.max(f, 0), l = i.sheets[u];
3114
+ const i = await uc(a, n.limits), f = r === null ? -1 : i.sheets.findIndex((h) => h.name === r), u = Math.max(f, 0), l = i.sheets[u];
3089
3115
  if (l === void 0) return { kind: "refused", refusal: "not-workbook" };
3090
- const d = await Yr(l, n.budget);
3116
+ const d = await eo(l, n.budget);
3091
3117
  return o.aborted ? null : { kind: "workbook", workbook: i, selected: u, sheet: d };
3092
3118
  } catch (i) {
3093
3119
  return i instanceof ne ? { kind: "refused", refusal: i.refusal } : o.aborted ? null : { kind: "failure", failure: { reason: "failed" } };
3094
3120
  }
3095
- }, sc = Object.freeze({ className: "aqmx-document-spreadsheet-body", "data-aqmx-document-scroller": "" }), ac = (e, t) => {
3121
+ }, hc = Object.freeze({ className: "aqmx-document-spreadsheet-body", "data-aqmx-document-scroller": "" }), pc = (e, t) => {
3096
3122
  switch (t.code) {
3097
3123
  case "encoding":
3098
3124
  return e.spreadsheetUnreadableEncoding(t.encodings);
@@ -3101,7 +3127,7 @@ const ol = /* @__PURE__ */ new Map([
3101
3127
  case "long-row":
3102
3128
  return e.spreadsheetLongRow;
3103
3129
  }
3104
- }, _n = (e, t) => {
3130
+ }, Bn = (e, t) => {
3105
3131
  switch (t) {
3106
3132
  case "encrypted":
3107
3133
  return e.spreadsheetWorkbookEncrypted;
@@ -3110,13 +3136,13 @@ const ol = /* @__PURE__ */ new Map([
3110
3136
  case "too-large":
3111
3137
  return e.spreadsheetWorkbookTooLarge;
3112
3138
  }
3113
- }, kt = (e) => e.every((t) => t.every((n) => n === "")), Xr = ({ name: e, url: t, openUrl: n, state: r, children: o }) => /* @__PURE__ */ B("div", { className: "aqmx-document-file", "data-testid": "markdown-explorer-spreadsheet-view", "data-aqmx-spreadsheet": r, children: [
3114
- /* @__PURE__ */ c(Ue, { name: e, openUrl: n, downloadUrl: t, icon: /* @__PURE__ */ c(ji, {}) }),
3115
- /* @__PURE__ */ c(Be, { scrollerProps: sc, children: /* @__PURE__ */ c("div", { className: "aqmx-document-spreadsheet-column", children: o }) })
3116
- ] }), Jr = ({ rows: e, title: t }) => {
3117
- const { labels: n, locale: r, theme: o } = $(), s = se(we), a = X(() => ({ ...Fr(n, r), table: t, fullscreenDialog: n.spreadsheetFullscreen(t) }), [n, r, t]), i = X(() => os(e), [e]);
3139
+ }, Et = (e) => e.every((t) => t.every((n) => n === "")), to = ({ name: e, url: t, openUrl: n, state: r, children: o }) => /* @__PURE__ */ B("div", { className: "aqmx-document-file", "data-testid": "markdown-explorer-spreadsheet-view", "data-aqmx-spreadsheet": r, children: [
3140
+ /* @__PURE__ */ c(Ue, { name: e, openUrl: n, downloadUrl: t, icon: /* @__PURE__ */ c(Qi, {}) }),
3141
+ /* @__PURE__ */ c(Be, { scrollerProps: hc, children: /* @__PURE__ */ c("div", { className: "aqmx-document-spreadsheet-column", children: o }) })
3142
+ ] }), no = ({ rows: e, title: t }) => {
3143
+ const { labels: n, locale: r, theme: o } = $(), s = se(we), a = X(() => ({ ...Hr(n, r), table: t, fullscreenDialog: n.spreadsheetFullscreen(t) }), [n, r, t]), i = X(() => ls(e), [e]);
3118
3144
  return (
3119
- /* @__PURE__ */ c("div", { className: "aqmx-document-spreadsheet", "data-theme": o, children: /* @__PURE__ */ c(Qo, { tsv: i, layout: s === "fill" ? "fill" : "inline", locale: r, labels: a }) })
3145
+ /* @__PURE__ */ c("div", { className: "aqmx-document-spreadsheet", "data-theme": o, children: /* @__PURE__ */ c(rs, { tsv: i, layout: s === "fill" ? "fill" : "inline", locale: r, labels: a, tapScrollCircle: Rr }) })
3120
3146
  );
3121
3147
  }, De = ({ note: e, testId: t, code: n, download: r }) => {
3122
3148
  const { labels: o } = $();
@@ -3124,46 +3150,46 @@ const ol = /* @__PURE__ */ new Map([
3124
3150
  /* @__PURE__ */ c("p", { className: "aqmx-callout-body", children: e }),
3125
3151
  /* @__PURE__ */ c("a", { className: "aqmx-callout-action", href: r.url, download: r.name, "data-testid": "markdown-explorer-spreadsheet-unreadable-download", children: o.download })
3126
3152
  ] }) });
3127
- }, Qr = ({ reading: e, name: t, url: n }) => {
3153
+ }, ro = ({ reading: e, name: t, url: n }) => {
3128
3154
  const { labels: r } = $();
3129
3155
  switch (e.kind) {
3130
3156
  case "table":
3131
3157
  return /* @__PURE__ */ B(pe, { children: [
3132
3158
  e.truncated ? /* @__PURE__ */ c("p", { className: "aqmx-callout aqmx-document-notice", role: "note", "data-testid": "markdown-explorer-spreadsheet-truncated", children: r.spreadsheetTruncated }) : null,
3133
- /* @__PURE__ */ c(Jr, { rows: e.rows, title: t })
3159
+ /* @__PURE__ */ c(no, { rows: e.rows, title: t })
3134
3160
  ] });
3135
3161
  case "empty":
3136
3162
  return /* @__PURE__ */ c(De, { note: r.spreadsheetEmpty, testId: "markdown-explorer-spreadsheet-empty" });
3137
3163
  case "unreadable":
3138
- return /* @__PURE__ */ c(De, { note: ac(r, e), testId: "markdown-explorer-spreadsheet-unreadable", code: e.code, download: { url: n, name: t } });
3164
+ return /* @__PURE__ */ c(De, { note: pc(r, e), testId: "markdown-explorer-spreadsheet-unreadable", code: e.code, download: { url: n, name: t } });
3139
3165
  }
3140
- }, ic = ({ path: e, document: t }) => t.format === "workbook" ? /* @__PURE__ */ c(cc, { path: e, document: t }) : /* @__PURE__ */ c(lc, { path: e, document: t, format: t.format }), lc = ({ path: e, document: t, format: n }) => {
3166
+ }, gc = ({ path: e, document: t }) => t.format === "workbook" ? /* @__PURE__ */ c(vc, { path: e, document: t }) : /* @__PURE__ */ c(wc, { path: e, document: t, format: t.format }), wc = ({ path: e, document: t, format: n }) => {
3141
3167
  const { config: r, data: o, labels: s } = $(), { name: a, url: i } = t, f = F(
3142
3168
  async (h) => {
3143
- const g = await _r(o, i, { format: n, legacyEncoding: r.legacyTextEncoding, maxBytes: r.spreadsheets.maxBytes, budget: Ye }, h);
3169
+ const g = await Ur(o, i, { format: n, legacyEncoding: r.legacyTextEncoding, maxBytes: r.spreadsheets.maxBytes, budget: Ye }, h);
3144
3170
  return g === null || g.kind === "failure" ? g : { kind: "read", value: g };
3145
3171
  },
3146
3172
  [o, i, n, r.legacyTextEncoding, r.spreadsheets.maxBytes]
3147
- ), { shown: u, failure: l, retry: d } = Ht(e, a, f);
3148
- return /* @__PURE__ */ B(Xr, { name: a, url: i, openUrl: rt(i), state: u === null ? l === null ? "loading" : "failure" : u.kind, children: [
3173
+ ), { shown: u, failure: l, retry: d } = Vt(e, a, f);
3174
+ return /* @__PURE__ */ B(to, { name: a, url: i, openUrl: rt(i), state: u === null ? l === null ? "loading" : "failure" : u.kind, children: [
3149
3175
  u === null && l === null ? /* @__PURE__ */ c(Ce, { label: s.spreadsheetLoading, testId: "markdown-explorer-spreadsheet-skeleton" }) : null,
3150
3176
  u === null && l !== null ? /* @__PURE__ */ c("div", { className: "aqmx-document-spreadsheet-failure", children: /* @__PURE__ */ c(Re, { failure: l, alert: !1, onRetry: d, testId: "markdown-explorer-spreadsheet-failure" }) }) : null,
3151
- u === null ? null : /* @__PURE__ */ c(Qr, { reading: u, name: a, url: i })
3177
+ u === null ? null : /* @__PURE__ */ c(ro, { reading: u, name: a, url: i })
3152
3178
  ] });
3153
- }, cc = ({ path: e, document: t }) => {
3179
+ }, vc = ({ path: e, document: t }) => {
3154
3180
  const { config: n, data: r, labels: o } = $(), { name: s, url: a, firstSheetText: i } = t, f = Te(), u = U(null), l = F(
3155
3181
  async (b) => {
3156
- const S = await oc(r, a, { maxBytes: n.spreadsheets.maxWorkbookBytes, limits: Yi, budget: Ye }, u.current, b);
3182
+ const S = await mc(r, a, { maxBytes: n.spreadsheets.maxWorkbookBytes, limits: sl, budget: Ye }, u.current, b);
3157
3183
  if (S === null || S.kind === "failure") return S;
3158
3184
  if (S.kind === "workbook") return { kind: "read", value: S };
3159
3185
  if (i !== null) {
3160
- const L = await _r(r, a, { format: i, legacyEncoding: n.legacyTextEncoding, maxBytes: n.spreadsheets.maxBytes, budget: Ye }, b);
3186
+ const L = await Ur(r, a, { format: i, legacyEncoding: n.legacyTextEncoding, maxBytes: n.spreadsheets.maxBytes, budget: Ye }, b);
3161
3187
  return L === null || L.kind === "failure" ? L : { kind: "read", value: { kind: "first-sheet", reading: L } };
3162
3188
  }
3163
3189
  return { kind: "read", value: { kind: "refused", refusal: S.kind === "not-package" ? "not-workbook" : S.refusal } };
3164
3190
  },
3165
3191
  [r, a, i, n.legacyTextEncoding, n.spreadsheets.maxBytes, n.spreadsheets.maxWorkbookBytes]
3166
- ), { shown: d, failure: h, retry: g } = Ht(e, s, l), [v, y] = V(null), T = U(/* @__PURE__ */ new WeakMap()), O = d?.kind === "workbook" ? d : null, R = O === null ? null : v !== null && v.workbook === O.workbook ? v : { workbook: O.workbook, index: O.selected, reading: O.sheet }, q = (b) => {
3192
+ ), { shown: d, failure: h, retry: g } = Vt(e, s, l), [v, y] = V(null), T = U(/* @__PURE__ */ new WeakMap()), O = d?.kind === "workbook" ? d : null, R = O === null ? null : v !== null && v.workbook === O.workbook ? v : { workbook: O.workbook, index: O.selected, reading: O.sheet }, q = (b) => {
3167
3193
  if (O === null) return;
3168
3194
  const S = O.workbook.sheets[b];
3169
3195
  if (S === void 0) return;
@@ -3173,32 +3199,32 @@ const ol = /* @__PURE__ */ new Map([
3173
3199
  const M = L.get(b), P = { workbook: O.workbook, index: b, reading: M ?? null };
3174
3200
  if (y(P), M !== void 0) return;
3175
3201
  const H = L;
3176
- Yr(S, Ye).then((K) => {
3202
+ eo(S, Ye).then((K) => {
3177
3203
  H.set(b, K), y((w) => w === P ? { ...P, reading: K } : w);
3178
3204
  });
3179
- }, D = R === null ? null : R.reading === null ? "loading" : R.reading.kind === "refused" ? "unreadable" : kt(R.reading.table.rows) ? "empty" : "table", m = d === null ? h === null ? "loading" : "failure" : d.kind === "first-sheet" ? d.reading.kind : d.kind === "refused" ? "unreadable" : D ?? "loading", p = i === null ? a : rt(a), x = (b) => `${f}-sheet-${b}`, A = `${f}-panel`, I = R === null ? null : O?.workbook.sheets[R.index]?.name ?? null, _ = O !== null && O.workbook.sheets.length > 1;
3180
- return /* @__PURE__ */ B(Xr, { name: s, url: a, openUrl: p, state: m, children: [
3205
+ }, D = R === null ? null : R.reading === null ? "loading" : R.reading.kind === "refused" ? "unreadable" : Et(R.reading.table.rows) ? "empty" : "table", m = d === null ? h === null ? "loading" : "failure" : d.kind === "first-sheet" ? d.reading.kind : d.kind === "refused" ? "unreadable" : D ?? "loading", p = i === null ? a : rt(a), x = (b) => `${f}-sheet-${b}`, A = `${f}-panel`, I = R === null ? null : O?.workbook.sheets[R.index]?.name ?? null, _ = O !== null && O.workbook.sheets.length > 1;
3206
+ return /* @__PURE__ */ B(to, { name: s, url: a, openUrl: p, state: m, children: [
3181
3207
  d === null && h === null ? /* @__PURE__ */ c(Ce, { label: o.spreadsheetLoading, testId: "markdown-explorer-spreadsheet-skeleton" }) : null,
3182
3208
  d === null && h !== null ? /* @__PURE__ */ c("div", { className: "aqmx-document-spreadsheet-failure", children: /* @__PURE__ */ c(Re, { failure: h, alert: !1, onRetry: g, testId: "markdown-explorer-spreadsheet-failure" }) }) : null,
3183
- d?.kind === "refused" ? /* @__PURE__ */ c(De, { note: _n(o, d.refusal), testId: "markdown-explorer-spreadsheet-unreadable", code: d.refusal, download: { url: a, name: s } }) : null,
3209
+ d?.kind === "refused" ? /* @__PURE__ */ c(De, { note: Bn(o, d.refusal), testId: "markdown-explorer-spreadsheet-unreadable", code: d.refusal, download: { url: a, name: s } }) : null,
3184
3210
  d?.kind === "first-sheet" ? /* @__PURE__ */ B(pe, { children: [
3185
3211
  /* @__PURE__ */ c("p", { className: "aqmx-callout aqmx-document-notice", role: "note", "data-testid": "markdown-explorer-spreadsheet-first-sheet", children: o.spreadsheetWorkbookFirstSheet }),
3186
- /* @__PURE__ */ c(Qr, { reading: d.reading, name: s, url: a })
3212
+ /* @__PURE__ */ c(ro, { reading: d.reading, name: s, url: a })
3187
3213
  ] }) : null,
3188
3214
  O === null || R === null || I === null ? null : /* @__PURE__ */ B(pe, { children: [
3189
3215
  O.workbook.unshownSheets > 0 ? /* @__PURE__ */ c("p", { className: "aqmx-callout aqmx-document-notice", role: "note", "data-testid": "markdown-explorer-spreadsheet-unshown-sheets", children: o.spreadsheetUnshownSheets(O.workbook.unshownSheets) }) : null,
3190
3216
  O.workbook.unlistedSheets > 0 ? /* @__PURE__ */ c("p", { className: "aqmx-callout aqmx-document-notice", role: "note", "data-testid": "markdown-explorer-spreadsheet-unlisted-sheets", children: o.spreadsheetUnlistedSheets(O.workbook.sheets.length) }) : null,
3191
- _ ? /* @__PURE__ */ c(Ji, { names: O.workbook.sheets.map((b) => b.name), selected: R.index, onSelect: q, label: o.spreadsheetSheets(s), tabIdOf: x, panelId: A }) : null,
3217
+ _ ? /* @__PURE__ */ c(il, { names: O.workbook.sheets.map((b) => b.name), selected: R.index, onSelect: q, label: o.spreadsheetSheets(s), tabIdOf: x, panelId: A }) : null,
3192
3218
  /* @__PURE__ */ B("div", { className: "aqmx-document-spreadsheet-sheet", "data-testid": "markdown-explorer-spreadsheet-sheet", "data-aqmx-sheet": R.index, ..._ ? { role: "tabpanel", id: A, "aria-labelledby": x(R.index) } : {}, children: [
3193
3219
  R.reading === null ? /* @__PURE__ */ c(Ce, { label: o.spreadsheetSheetLoading, testId: "markdown-explorer-spreadsheet-sheet-skeleton" }) : null,
3194
3220
  R.reading?.kind === "table" && R.reading.table.truncated ? /* @__PURE__ */ c("p", { className: "aqmx-callout aqmx-document-notice", role: "note", "data-testid": "markdown-explorer-spreadsheet-truncated", children: o.spreadsheetTruncated }) : null,
3195
- R.reading?.kind === "refused" ? /* @__PURE__ */ c(De, { note: _n(o, R.reading.refusal), testId: "markdown-explorer-spreadsheet-unreadable", code: R.reading.refusal, download: { url: a, name: s } }) : null,
3196
- R.reading?.kind === "table" && kt(R.reading.table.rows) ? /* @__PURE__ */ c(De, { note: o.spreadsheetSheetEmpty, testId: "markdown-explorer-spreadsheet-empty" }) : null,
3197
- R.reading?.kind === "table" && !kt(R.reading.table.rows) ? /* @__PURE__ */ c(Jr, { rows: R.reading.table.rows, title: o.spreadsheetSheetName(s, I) }, R.index) : null
3221
+ R.reading?.kind === "refused" ? /* @__PURE__ */ c(De, { note: Bn(o, R.reading.refusal), testId: "markdown-explorer-spreadsheet-unreadable", code: R.reading.refusal, download: { url: a, name: s } }) : null,
3222
+ R.reading?.kind === "table" && Et(R.reading.table.rows) ? /* @__PURE__ */ c(De, { note: o.spreadsheetSheetEmpty, testId: "markdown-explorer-spreadsheet-empty" }) : null,
3223
+ R.reading?.kind === "table" && !Et(R.reading.table.rows) ? /* @__PURE__ */ c(no, { rows: R.reading.table.rows, title: o.spreadsheetSheetName(s, I) }, R.index) : null
3198
3224
  ] })
3199
3225
  ] })
3200
3226
  ] });
3201
- }, dc = Object.freeze({ kind: "empty" }), uc = (e, t, n) => {
3227
+ }, bc = Object.freeze({ kind: "empty" }), yc = (e, t, n) => {
3202
3228
  if (t.view === "multi" || t.overrides[n] === void 0) return null;
3203
3229
  const r = n === "style" ? { align: t.overrides.align } : { style: t.overrides.style };
3204
3230
  return Ne(e, { ...t, overrides: r });
@@ -3210,7 +3236,7 @@ const ol = /* @__PURE__ */ new Map([
3210
3236
  i
3211
3237
  ] })
3212
3238
  );
3213
- }, fc = ({ absence: e, announces: t, announceFailure: n }) => {
3239
+ }, kc = ({ absence: e, announces: t, announceFailure: n }) => {
3214
3240
  const { labels: r, announcer: o } = $(), s = e.kind === "no-readme" ? e.folder : null, a = e.kind === "failure" ? e.folder : null, i = e.kind === "failure" ? e.failure : null;
3215
3241
  switch (ee(() => {
3216
3242
  t && s !== null && o.announce(r.folderReadmeMissing(fe(s)));
@@ -3220,46 +3246,46 @@ const ol = /* @__PURE__ */ new Map([
3220
3246
  case "empty":
3221
3247
  return /* @__PURE__ */ c(Pe, { kind: "empty", label: r.documentRegion, stale: !1, busy: !1, children: /* @__PURE__ */ c("div", { className: "aqmx-empty", "data-testid": "markdown-explorer-document-empty", children: /* @__PURE__ */ c("p", { className: "aqmx-empty-title", children: r.documentEmpty }) }) });
3222
3248
  case "loading":
3223
- return /* @__PURE__ */ c(Vt, { label: r.documentRegion });
3249
+ return /* @__PURE__ */ c(Gt, { label: r.documentRegion });
3224
3250
  case "no-readme":
3225
3251
  return /* @__PURE__ */ c(Pe, { kind: "empty", label: r.documentRegion, stale: !1, busy: !1, children: /* @__PURE__ */ c("div", { className: "aqmx-empty", "data-testid": "markdown-explorer-folder-empty", children: /* @__PURE__ */ c("p", { className: "aqmx-empty-title", children: r.folderReadmeMissing(fe(e.folder)) }) }) });
3226
3252
  case "failure":
3227
- return /* @__PURE__ */ c(Pe, { kind: "failure", label: r.documentRegion, stale: !1, busy: !1, children: /* @__PURE__ */ c(qt, { failure: e.failure, onRetry: e.onRetry, testId: "markdown-explorer-folder-failure" }) });
3253
+ return /* @__PURE__ */ c(Pe, { kind: "failure", label: r.documentRegion, stale: !1, busy: !1, children: /* @__PURE__ */ c(Ht, { failure: e.failure, onRetry: e.onRetry, testId: "markdown-explorer-folder-failure" }) });
3228
3254
  }
3229
- }, Vt = ({ label: e }) => {
3255
+ }, Gt = ({ label: e }) => {
3230
3256
  const { labels: t } = $();
3231
3257
  return /* @__PURE__ */ c(Pe, { kind: "loading", label: e, stale: !1, busy: !0, children: /* @__PURE__ */ c(Ce, { label: t.documentLoading, testId: "markdown-explorer-document-skeleton" }) });
3232
- }, Fn = Object.freeze(["wheel", "touchstart", "pointerdown", "keydown"]), mc = ({ path: e, document: t, viewer: n, editing: r }) => {
3233
- const { reportMathDiagnostics: o, edits: s } = $(), a = X(() => ({ htmlContent: t.htmlContent, headings: [...t.headings] }), [t]), i = Ti(), f = Ri(), u = X(() => o === void 0 ? void 0 : (m) => o(e, m), [o, e]), l = U(null), { editable: d, doubleClick: h, region: g, paneScroll: v, stale: y } = r;
3258
+ }, Un = Object.freeze(["wheel", "touchstart", "pointerdown", "keydown"]), Ec = ({ path: e, document: t, viewer: n, editing: r }) => {
3259
+ const { reportMathDiagnostics: o, edits: s } = $(), a = X(() => ({ htmlContent: t.htmlContent, headings: [...t.headings] }), [t]), i = Pi(), f = Ii(), u = X(() => o === void 0 ? void 0 : (m) => o(e, m), [o, e]), l = U(null), { editable: d, doubleClick: h, region: g, paneScroll: v, stale: y } = r;
3234
3260
  Y(() => {
3235
3261
  if (d)
3236
3262
  return s.bindView(e, {
3237
3263
  anchor: () => {
3238
3264
  const m = l.current, p = g(), x = m === null ? null : m.querySelector(st);
3239
- return m === null || p === null || x === null ? null : sa(m, v.scrollerOf(p, x));
3265
+ return m === null || p === null || x === null ? null : ca(m, v.scrollerOf(p, x));
3240
3266
  }
3241
3267
  });
3242
3268
  }, [s, e, d, g, v]);
3243
3269
  const T = (m) => {
3244
3270
  const p = l.current, { target: x } = m;
3245
- !h || p === null || !(x instanceof Element) || !ra(x) || (m.stopPropagation(), s.start(e, oa(x, p, p.ownerDocument.getSelection())));
3271
+ !h || p === null || !(x instanceof Element) || !ia(x) || (m.stopPropagation(), s.start(e, la(x, p, p.ownerDocument.getSelection())));
3246
3272
  }, O = U(null), R = U(y);
3247
3273
  Y(() => {
3248
3274
  R.current = y;
3249
3275
  });
3250
3276
  const q = le((m) => {
3251
- const p = l.current, x = g(), A = p === null ? null : da(p, m.line);
3277
+ const p = l.current, x = g(), A = p === null ? null : ha(p, m.line);
3252
3278
  if (x === null || A === null) return !1;
3253
3279
  const I = v.scrollerOf(x, A);
3254
- return I.scrollTop += ua(A, m.line) - m.clientTop, !0;
3280
+ return I.scrollTop += pa(A, m.line) - m.clientTop, !0;
3255
3281
  }), D = le((m) => {
3256
3282
  const p = g();
3257
3283
  if (p === null) return;
3258
3284
  const x = () => {
3259
- for (const I of Fn) p.removeEventListener(I, A, !0);
3285
+ for (const I of Un) p.removeEventListener(I, A, !0);
3260
3286
  O.current?.release === x && (O.current = null);
3261
3287
  }, A = () => x();
3262
- for (const I of Fn) p.addEventListener(I, A, { capture: !0, passive: !0 });
3288
+ for (const I of Un) p.addEventListener(I, A, { capture: !0, passive: !0 });
3263
3289
  O.current = { point: m, release: x };
3264
3290
  });
3265
3291
  return Y(() => {
@@ -3272,67 +3298,67 @@ const ol = /* @__PURE__ */ new Map([
3272
3298
  const m = O.current;
3273
3299
  m === null || y || (m.release(), q(m.point));
3274
3300
  }, [t, y]),
3275
- /* @__PURE__ */ c("div", { ref: l, className: "aqmx-document-viewer", onDoubleClick: T, children: /* @__PURE__ */ c(tr, { ...n, onHeadingSelect: i, headingHref: f, onMathDiagnostics: u, parseResult: a, content: null }) });
3276
- }, eo = ({ document: e, viewer: t }) => {
3301
+ /* @__PURE__ */ c("div", { ref: l, className: "aqmx-document-viewer", onDoubleClick: T, children: /* @__PURE__ */ c(or, { ...n, onHeadingSelect: i, headingHref: f, onMathDiagnostics: u, parseResult: a, content: null }) });
3302
+ }, oo = ({ document: e, viewer: t }) => {
3277
3303
  const { labels: n } = $();
3278
3304
  return /* @__PURE__ */ B(pe, { children: [
3279
- /* @__PURE__ */ c(Ue, { name: e.name, openUrl: rt(e.url), downloadUrl: e.url, icon: /* @__PURE__ */ c(Gs, {}), children: e.truncated ? null : /* @__PURE__ */ c(Na, { text: e.text }) }),
3305
+ /* @__PURE__ */ c(Ue, { name: e.name, openUrl: rt(e.url), downloadUrl: e.url, icon: /* @__PURE__ */ c(Js, {}), children: e.truncated ? null : /* @__PURE__ */ c(Ua, { text: e.text }) }),
3280
3306
  e.truncated ? /* @__PURE__ */ c("p", { className: "aqmx-callout aqmx-document-notice", role: "note", "data-testid": "markdown-explorer-text-truncated", children: n.textTruncated }) : null,
3281
- /* @__PURE__ */ c("div", { className: "aqmx-document-viewer", children: /* @__PURE__ */ c(tr, { ...t, parseResult: null, content: e.text }) })
3307
+ /* @__PURE__ */ c("div", { className: "aqmx-document-viewer", children: /* @__PURE__ */ c(or, { ...t, parseResult: null, content: e.text }) })
3282
3308
  ] });
3283
- }, Et = ({ path: e, name: t, viewer: n }) => {
3309
+ }, St = ({ path: e, name: t, viewer: n }) => {
3284
3310
  const { data: r, labels: o } = $(), s = F(
3285
3311
  async (u) => {
3286
3312
  const l = await r.text(e, u);
3287
3313
  return "kind" in l ? l.kind === "failure" ? { kind: "failure", failure: l.failure } : { kind: "read", value: l } : null;
3288
3314
  },
3289
3315
  [r, e]
3290
- ), { shown: a, failure: i, retry: f } = Ht(e, t, s);
3291
- return a !== null ? /* @__PURE__ */ c(eo, { document: a, viewer: n }) : i !== null ? /* @__PURE__ */ c(qt, { failure: i, onRetry: f, testId: "markdown-explorer-markup-failure" }) : /* @__PURE__ */ c(Ce, { label: o.markupLoading, testId: "markdown-explorer-markup-skeleton" });
3292
- }, hc = Object.freeze({ reason: "failed" }), pc = (e) => {
3316
+ ), { shown: a, failure: i, retry: f } = Vt(e, t, s);
3317
+ return a !== null ? /* @__PURE__ */ c(oo, { document: a, viewer: n }) : i !== null ? /* @__PURE__ */ c(Ht, { failure: i, onRetry: f, testId: "markdown-explorer-markup-failure" }) : /* @__PURE__ */ c(Ce, { label: o.markupLoading, testId: "markdown-explorer-markup-skeleton" });
3318
+ }, Sc = Object.freeze({ reason: "failed" }), xc = (e) => {
3293
3319
  const { labels: t } = $();
3294
3320
  return /* @__PURE__ */ c(
3295
- Xs,
3321
+ ta,
3296
3322
  {
3297
- fallback: (n) => /* @__PURE__ */ c("div", { className: "aqmx-edit-message", children: /* @__PURE__ */ c(Re, { failure: hc, alert: !1, onRetry: n, testId: "markdown-explorer-edit-load-failure" }) }),
3298
- children: /* @__PURE__ */ c(Ie, { fallback: /* @__PURE__ */ c(Ce, { label: t.editLoading, testId: "markdown-explorer-edit-skeleton" }), children: /* @__PURE__ */ c(Ys, { ...e }) })
3323
+ fallback: (n) => /* @__PURE__ */ c("div", { className: "aqmx-edit-message", children: /* @__PURE__ */ c(Re, { failure: Sc, alert: !1, onRetry: n, testId: "markdown-explorer-edit-load-failure" }) }),
3324
+ children: /* @__PURE__ */ c(Ie, { fallback: /* @__PURE__ */ c(Ce, { label: t.editLoading, testId: "markdown-explorer-edit-skeleton" }), children: /* @__PURE__ */ c(ea, { ...e }) })
3299
3325
  }
3300
3326
  );
3301
- }, gc = ({ path: e, document: t, view: n, viewer: r, onRetry: o, editing: s }) => {
3327
+ }, Tc = ({ path: e, document: t, view: n, viewer: r, onRetry: o, editing: s }) => {
3302
3328
  switch (t.kind) {
3303
3329
  case "markdown": {
3304
3330
  const { session: a, layout: i, region: f, paneScroll: u, stale: l } = s;
3305
- if (n === "edit" && a !== void 0) return /* @__PURE__ */ c(pc, { path: e, name: t.name, session: a, layout: i, viewer: r, region: f, paneScroll: u });
3306
- if (n === "markup") return /* @__PURE__ */ c(Et, { path: e, name: t.name, viewer: r });
3331
+ if (n === "edit" && a !== void 0) return /* @__PURE__ */ c(xc, { path: e, name: t.name, session: a, layout: i, viewer: r, region: f, paneScroll: u });
3332
+ if (n === "markup") return /* @__PURE__ */ c(St, { path: e, name: t.name, viewer: r });
3307
3333
  const d = t.edit !== null && (t.edit.kind === "inline" || t.edit.kind === "draft");
3308
- return /* @__PURE__ */ c(mc, { path: e, document: t, viewer: r, editing: { editable: d, doubleClick: d && i === "fill", region: f, paneScroll: u, stale: l } });
3334
+ return /* @__PURE__ */ c(Ec, { path: e, document: t, viewer: r, editing: { editable: d, doubleClick: d && i === "fill", region: f, paneScroll: u, stale: l } });
3309
3335
  }
3310
3336
  case "text":
3311
- return /* @__PURE__ */ c(eo, { document: t, viewer: r });
3337
+ return /* @__PURE__ */ c(oo, { document: t, viewer: r });
3312
3338
  case "image":
3313
- return n === "markup" && Ut(t) === "svg" ? /* @__PURE__ */ c(Et, { path: e, name: t.name, viewer: r }) : /* @__PURE__ */ c(mi, { document: t });
3339
+ return n === "markup" && jt(t) === "svg" ? /* @__PURE__ */ c(St, { path: e, name: t.name, viewer: r }) : /* @__PURE__ */ c(Ei, { document: t });
3314
3340
  case "media":
3315
- return /* @__PURE__ */ c(Bi, { document: t });
3341
+ return /* @__PURE__ */ c(Ki, { document: t });
3316
3342
  case "spreadsheet":
3317
- return n === "markup" ? /* @__PURE__ */ c(Et, { path: e, name: t.name, viewer: r }) : /* @__PURE__ */ c(ic, { path: e, document: t });
3343
+ return n === "markup" ? /* @__PURE__ */ c(St, { path: e, name: t.name, viewer: r }) : /* @__PURE__ */ c(gc, { path: e, document: t });
3318
3344
  case "file":
3319
- return /* @__PURE__ */ c(Ua, { document: t });
3345
+ return /* @__PURE__ */ c(Ya, { document: t });
3320
3346
  case "failure":
3321
- return /* @__PURE__ */ c(qt, { failure: t.failure, onRetry: o, testId: "markdown-explorer-document-failure" });
3347
+ return /* @__PURE__ */ c(Ht, { failure: t.failure, onRetry: o, testId: "markdown-explorer-document-failure" });
3322
3348
  default: {
3323
3349
  const a = t;
3324
3350
  throw new RangeError(`[markdown-explorer] unknown document kind in ${JSON.stringify(a)}`);
3325
3351
  }
3326
3352
  }
3327
- }, wc = 'a[href], button:not(:disabled), input:not(:disabled), select:not(:disabled), textarea:not(:disabled), iframe, audio[controls], video[controls], [tabindex]:not([tabindex="-1"])', vc = (e, t, n) => {
3328
- const [r] = t.kind === "markdown" ? t.headings : [], o = [n === null ? null : Cr(e, n), r === void 0 ? null : Rr(e, r.id), e.querySelector(st), e.querySelector(wc)];
3353
+ }, Rc = 'a[href], button:not(:disabled), input:not(:disabled), select:not(:disabled), textarea:not(:disabled), iframe, audio[controls], video[controls], [tabindex]:not([tabindex="-1"])', Cc = (e, t, n) => {
3354
+ const [r] = t.kind === "markdown" ? t.headings : [], o = [n === null ? null : Ar(e, n), r === void 0 ? null : Mr(e, r.id), e.querySelector(st), e.querySelector(Rc)];
3329
3355
  for (const s of o)
3330
- if (s instanceof HTMLElement && vr(s)) return s;
3356
+ if (s instanceof HTMLElement && kr(s)) return s;
3331
3357
  return null;
3332
- }, qn = (e, t, n) => {
3358
+ }, Hn = (e, t, n) => {
3333
3359
  const { activeElement: r, body: o } = e.ownerDocument, s = r === null || r === o;
3334
- t instanceof HTMLElement && n && (s || e.contains(r)) && vr(t);
3335
- }, bc = (e) => {
3360
+ t instanceof HTMLElement && n && (s || e.contains(r)) && kr(t);
3361
+ }, Oc = (e) => {
3336
3362
  const t = U(!1);
3337
3363
  return Y(() => {
3338
3364
  const n = e.current;
@@ -3358,11 +3384,11 @@ const ol = /* @__PURE__ */ new Map([
3358
3384
  clearTimeout(a), o.removeEventListener("pointerdown", i, !0), o.removeEventListener("mousedown", i, !0), o.removeEventListener("focusin", f, !0), o.removeEventListener("blur", l), o.removeEventListener("focus", d), n.removeEventListener("focusout", u);
3359
3385
  };
3360
3386
  }, [e]), t;
3361
- }, yc = Object.freeze({ count: 0, recovered: !1 }), kc = ({ path: e, snapshot: t, markup: n, stale: r, viewer: o, editLayout: s, regionLabel: a, navigation: i, fragment: f, paneScroll: u, announces: l, announceFailure: d, onDocumentShown: h }) => {
3362
- const { labels: g, announcer: v, documents: y } = $(), { document: T } = t, O = U(null), R = U(null), q = U(null), D = U(0), m = bc(O), p = U({ path: e, document: T }), x = U(null), A = F(
3387
+ }, Lc = Object.freeze({ count: 0, recovered: !1 }), Mc = ({ path: e, snapshot: t, markup: n, stale: r, viewer: o, editLayout: s, regionLabel: a, navigation: i, fragment: f, paneScroll: u, announces: l, announceFailure: d, onDocumentShown: h }) => {
3388
+ const { labels: g, announcer: v, documents: y } = $(), { document: T } = t, O = U(null), R = U(null), q = U(null), D = U(0), m = Oc(O), p = U({ path: e, document: T }), x = U(null), A = F(
3363
3389
  (j) => {
3364
- const Z = O.current, Q = yn(Z, j, u);
3365
- Z !== null && Q !== null && qn(Z, Q, m.current);
3390
+ const Z = O.current, Q = Sn(Z, j, u);
3391
+ Z !== null && Q !== null && Hn(Z, Q, m.current);
3366
3392
  },
3367
3393
  [u, m]
3368
3394
  ), I = F(
@@ -3380,31 +3406,31 @@ const ol = /* @__PURE__ */ new Map([
3380
3406
  }, 0);
3381
3407
  },
3382
3408
  [A]
3383
- ), b = X(() => ({ navigation: i, currentPath: e, scrollWithin: A, followSameUrlJump: I, followEmptyFragment: _ }), [i, e, A, I, _]), S = F(() => y.retry(e), [y, e]), L = ma(y, vi), M = pr(e), P = M !== void 0 ? "edit" : n ? "markup" : "rendered", H = Ut(T) === null ? void 0 : P, K = F(() => O.current, []), w = X(() => ({ session: M, layout: s, region: K, paneScroll: u, stale: r }), [M, s, K, u, r]), k = H === "edit" ? !1 : r, C = se(we), N = H === "edit" && s === "fill" ? "fill" : C, [z, W] = V(0), J = U(0), G = U(!1), [ie, Wt] = V(yc), [Gt, oo] = V(0), Kt = U(d), Yt = U(r);
3409
+ ), b = X(() => ({ navigation: i, currentPath: e, scrollWithin: A, followSameUrlJump: I, followEmptyFragment: _ }), [i, e, A, I, _]), S = F(() => y.retry(e), [y, e]), L = wa(y, Ci), M = vr(e), P = M !== void 0 ? "edit" : n ? "markup" : "rendered", H = jt(T) === null ? void 0 : P, K = F(() => O.current, []), w = X(() => ({ session: M, layout: s, region: K, paneScroll: u, stale: r }), [M, s, K, u, r]), k = H === "edit" ? !1 : r, C = se(we), N = H === "edit" && s === "fill" ? "fill" : C, [z, W] = V(0), J = U(0), G = U(!1), [ie, Yt] = V(Lc), [Xt, lo] = V(0), Jt = U(d), Qt = U(r);
3384
3410
  Y(() => {
3385
- Kt.current = d, Yt.current = r;
3411
+ Jt.current = d, Qt.current = r;
3386
3412
  }, [d, r]);
3387
- const so = X(
3413
+ const co = X(
3388
3414
  () => ({
3389
3415
  announceFailure: (j) => {
3390
- Yt.current || Kt.current(j);
3416
+ Qt.current || Jt.current(j);
3391
3417
  },
3392
3418
  readPart: () => {
3393
3419
  const j = y.readPart(e);
3394
3420
  J.current += 1;
3395
- let Z = !1, Q = !1, re = !1;
3421
+ let Z = !1, Q = !1, oe = !1;
3396
3422
  return {
3397
3423
  settle: (be, ye) => {
3398
- if (j.settle(be, ye), !(re || Z)) {
3424
+ if (j.settle(be, ye), !(oe || Z)) {
3399
3425
  if (ye !== null) {
3400
3426
  Q = !0, G.current = !1;
3401
3427
  return;
3402
3428
  }
3403
- Z = !0, Wt((ze) => ({ count: ze.count + 1, recovered: Q }));
3429
+ Z = !0, Yt((ze) => ({ count: ze.count + 1, recovered: Q }));
3404
3430
  }
3405
3431
  },
3406
3432
  release: () => {
3407
- re || (re = !0, j.release(), J.current -= 1, Z || oo((be) => be + 1));
3433
+ oe || (oe = !0, j.release(), J.current -= 1, Z || lo((be) => be + 1));
3408
3434
  }
3409
3435
  };
3410
3436
  },
@@ -3417,94 +3443,95 @@ const ol = /* @__PURE__ */ new Map([
3417
3443
  }
3418
3444
  }),
3419
3445
  [y, e]
3420
- ), Xt = k || z > 0, ao = le((j, Z) => {
3446
+ ), en = k || z > 0, uo = le((j, Z) => {
3421
3447
  const Q = R.current;
3422
3448
  if (Q !== null && Q.path === j && Q.snapshot === Z) return;
3423
3449
  R.current = { path: j, snapshot: Z }, y.noteShown(j, Z);
3424
- const re = Z.document;
3425
- if (re.kind === "failure") {
3426
- G.current = !1, y.noteFailureShown(Z) && d(g.documentFailed(fe(j), de(g, re.failure.reason)));
3450
+ const oe = Z.document;
3451
+ if (oe.kind === "failure") {
3452
+ G.current = !1, y.noteFailureShown(Z) && d(g.documentFailed(fe(j), de(g, oe.failure.reason)));
3427
3453
  return;
3428
3454
  }
3429
- h?.(j, re), !(!l || Q !== null && Q.path === j && Q.snapshot.document.kind !== "failure") && (G.current = J.current > 0, G.current || v.announce(g.documentShown(re.name)));
3455
+ h?.(j, oe), !(!l || Q !== null && Q.path === j && Q.snapshot.document.kind !== "failure") && (G.current = J.current > 0, G.current || v.announce(g.documentShown(oe.name)));
3430
3456
  });
3431
3457
  ee(() => {
3432
- ao(e, t);
3458
+ uo(e, t);
3433
3459
  }, [e, t]);
3434
- const io = le(() => {
3460
+ const fo = le(() => {
3435
3461
  f.kind === "panel" && f.consume();
3436
- }), Jt = le((j) => {
3462
+ }), tn = le((j) => {
3437
3463
  const Z = O.current;
3438
3464
  if (Z === null || !m.current) return null;
3439
- const { activeElement: Q, body: re } = Z.ownerDocument;
3440
- return Q !== null && Q !== re ? null : vc(Z, T, j);
3441
- }), lo = le((j) => {
3465
+ const { activeElement: Q, body: oe } = Z.ownerDocument;
3466
+ return Q !== null && Q !== oe ? null : Cc(Z, T, j);
3467
+ }), mo = le((j) => {
3442
3468
  const Z = G.current;
3443
- G.current = !1, !r && (j && Jt(null), l && (j || Z) && T.kind !== "failure" && v.announce(g.documentShown(T.name)));
3469
+ G.current = !1, !r && (j && tn(null), l && (j || Z) && T.kind !== "failure" && v.announce(g.documentShown(T.name)));
3444
3470
  });
3445
3471
  ee(() => {
3446
- ie.count > 0 && lo(ie.recovered);
3472
+ ie.count > 0 && mo(ie.recovered);
3447
3473
  }, [ie]);
3448
- const co = le(() => {
3474
+ const ho = le(() => {
3449
3475
  J.current > 0 || !G.current || (G.current = !1, l && !r && T.kind !== "failure" && v.announce(g.documentShown(T.name)));
3450
3476
  });
3451
3477
  ee(() => {
3452
- Gt > 0 && co();
3453
- }, [Gt]);
3454
- const uo = le((j) => {
3478
+ Xt > 0 && ho();
3479
+ }, [Xt]);
3480
+ const po = le((j) => {
3455
3481
  const Z = O.current;
3456
- Z !== null && qn(Z, j, m.current);
3457
- }), fo = le((j) => u.reveal(j)), mo = le((j) => yn(O.current, j, u));
3482
+ Z !== null && Hn(Z, j, m.current);
3483
+ }), go = le((j) => u.reveal(j)), wo = le((j) => Sn(O.current, j, u));
3458
3484
  return ee(() => {
3459
3485
  if (r) return;
3460
3486
  const j = p.current.path !== e, Z = j || p.current.document !== T;
3461
3487
  p.current = { path: e, document: T };
3462
3488
  const Q = x.current !== e;
3463
3489
  x.current = e;
3464
- let re = null;
3465
- f.kind === "page" ? q.current !== f.navigation && (q.current = f.navigation, D.current += 1, re = f.fragment) : f.fragment !== null && (re = f.fragment, io());
3490
+ let oe = null;
3491
+ f.kind === "page" ? q.current !== f.navigation && (q.current = f.navigation, D.current += 1, oe = f.fragment) : f.fragment !== null && (oe = f.fragment, fo());
3466
3492
  const be = () => {
3467
- const ye = re === null ? null : mo(re);
3493
+ const ye = oe === null ? null : wo(oe);
3468
3494
  if (!Z) {
3469
- ye !== null && uo(ye);
3495
+ ye !== null && po(ye);
3470
3496
  return;
3471
3497
  }
3472
- const ze = Jt(f.fragment);
3473
- j && ye === null && ze !== null && fo(ze);
3498
+ const ze = tn(f.fragment);
3499
+ j && ye === null && ze !== null && go(ze);
3474
3500
  };
3475
3501
  Q ? queueMicrotask(be) : be();
3476
- }, [f, e, T, r]), /* @__PURE__ */ c(we, { value: N, children: /* @__PURE__ */ c(Pe, { kind: T.kind, view: H, label: a(e, T), stale: Xt, busy: Xt, frameRef: O, intent: L, children: /* @__PURE__ */ c(Lr, { value: b, children: /* @__PURE__ */ c(gi, { children: /* @__PURE__ */ c(xr, { value: so, children: /* @__PURE__ */ c(gc, { path: e, document: T, view: P, viewer: o, onRetry: S, editing: w }, e) }) }) }) }) });
3477
- }, Zt = Object.freeze({ kind: "skeleton" }), Ec = (e, t, n, r, o) => {
3502
+ }, [f, e, T, r]), /* @__PURE__ */ c(we, { value: N, children: /* @__PURE__ */ c(Pe, { kind: T.kind, view: H, label: a(e, T), stale: en, busy: en, frameRef: O, intent: L, children: /* @__PURE__ */ c(Dr, { value: b, children: /* @__PURE__ */ c(Ti, { children: /* @__PURE__ */ c(Or, { value: co, children: /* @__PURE__ */ c(Tc, { path: e, document: T, view: P, viewer: o, onRetry: S, editing: w }, e) }) }) }) }) });
3503
+ }, Kt = Object.freeze({ kind: "skeleton" }), Ac = (e, t, n, r, o) => {
3478
3504
  if (t?.status === "loaded") return { kind: "document", path: e, snapshot: t, stale: !1 };
3479
3505
  const s = ge(t);
3480
3506
  if (s !== null) return { kind: "document", path: e, snapshot: s, stale: !0 };
3481
3507
  if (o && t?.status === "pending") return { kind: "streaming", path: e, promise: t.promise };
3482
3508
  const a = n === null || n === e ? null : ge(r);
3483
- return n === null || a === null ? Zt : { kind: "document", path: n, snapshot: a, stale: !0 };
3484
- }, Sc = (e, t) => t.status === "deferred" ? Zt : { kind: "document", path: e, snapshot: t, stale: !1 }, xc = ({ requestedPath: e, content: t, markup: n, ...r }) => {
3485
- const o = t.kind === "streaming" ? Sc(t.path, se(t.promise)) : t;
3486
- return o.kind !== "document" ? /* @__PURE__ */ c(Vt, { label: r.regionLabel(e, null) }) : /* @__PURE__ */ c(kc, { path: o.path, snapshot: o.snapshot, markup: n, stale: o.stale, ...r });
3487
- }, to = ({ path: e, absence: t, markup: n, display: r, navigation: o, fragment: s, paneScroll: a, announces: i, announceFailure: f, onDocumentShown: u }) => {
3488
- const { config: l, labels: d, locale: h, theme: g, documents: v, data: y } = $(), T = es(), O = U(!1);
3509
+ return n === null || a === null ? Kt : { kind: "document", path: n, snapshot: a, stale: !0 };
3510
+ }, Nc = (e, t) => t.status === "deferred" ? Kt : { kind: "document", path: e, snapshot: t, stale: !1 }, Dc = ({ requestedPath: e, content: t, markup: n, ...r }) => {
3511
+ const o = t.kind === "streaming" ? Nc(t.path, se(t.promise)) : t;
3512
+ return o.kind !== "document" ? /* @__PURE__ */ c(Gt, { label: r.regionLabel(e, null) }) : /* @__PURE__ */ c(Mc, { path: o.path, snapshot: o.snapshot, markup: n, stale: o.stale, ...r });
3513
+ }, so = ({ path: e, absence: t, markup: n, display: r, navigation: o, fragment: s, paneScroll: a, announces: i, announceFailure: f, onDocumentShown: u }) => {
3514
+ const { config: l, labels: d, locale: h, theme: g, documents: v, data: y } = $(), T = os(), O = U(!1);
3489
3515
  Y(() => {
3490
3516
  O.current = !0;
3491
3517
  }, []);
3492
- const [R, q] = V(null), [D, m] = V(n), p = F(() => e === null ? void 0 : v.peek(e), [v, e]), x = oe(v.subscribe, p, p), A = F(() => R === null ? void 0 : v.peek(R), [v, R]), I = oe(v.subscribe, A, A);
3518
+ const [R, q] = V(null), [D, m] = V(n), p = F(() => e === null ? void 0 : v.peek(e), [v, e]), x = re(v.subscribe, p, p), A = F(() => R === null ? void 0 : v.peek(R), [v, R]), I = re(v.subscribe, A, A);
3493
3519
  Y(() => e === null ? void 0 : v.open(e), [v, e]), Y(() => R === null ? void 0 : v.retain(R), [v, R]);
3494
- const _ = e === null ? Zt : Ec(e, x, R, I, !O.current), b = e === null ? null : _.kind === "document" && !_.stale ? _.path : R;
3520
+ const _ = e === null ? Kt : Ac(e, x, R, I, !O.current), b = e === null ? null : _.kind === "document" && !_.stale ? _.path : R;
3495
3521
  b !== R && q(b);
3496
3522
  const S = _.kind !== "document" || _.path === e;
3497
3523
  S && n !== D && m(n);
3498
- const L = X(() => rl(d, h), [d, h]), M = X(() => ({ read: (C, N) => hi(y, C, N) }), [y]), P = X(() => [...l.iframeHosts], [l]), H = o.kind === "panel", K = X(
3524
+ const L = X(() => fl(d, h), [d, h]), M = X(() => ({ read: (C, N) => Si(y, C, N) }), [y]), P = X(() => [...l.iframeHosts], [l]), H = o.kind === "panel", K = X(
3499
3525
  () => ({
3500
3526
  labels: L,
3501
3527
  spreadsheetLocale: h,
3528
+ spreadsheetTapScrollCircle: Rr,
3502
3529
  emptyMessage: d.documentEmpty,
3503
3530
  theme: g,
3504
3531
  availableStyles: l.documentStyles,
3505
3532
  iFrameAllowedDomains: P,
3506
3533
  embeds: l.embeds,
3507
- linkComponent: xi,
3534
+ linkComponent: Di,
3508
3535
  toolbar: T,
3509
3536
  style: r.style,
3510
3537
  onStyleChange: r.onStyleChange,
@@ -3516,14 +3543,14 @@ const ol = /* @__PURE__ */ new Map([
3516
3543
  padding: r.padding,
3517
3544
  width: r.width === void 0 ? void 0 : `min(${r.width}, 100%)`,
3518
3545
  maxWidth: r.maxWidth === void 0 ? void 0 : `min(${r.maxWidth}, 100%)`,
3519
- renderScrollBar: H ? void 0 : br,
3520
- scrollBarGutter: H ? void 0 : Er,
3546
+ renderScrollBar: H ? void 0 : Er,
3547
+ scrollBarGutter: H ? void 0 : xr,
3521
3548
  imageSource: M
3522
3549
  }),
3523
3550
  [L, h, d.documentEmpty, g, l.documentStyles, P, l.embeds, T, r, H, M]
3524
3551
  ), w = F((C, N) => H ? N === null || N.kind === "failure" ? fe(C) : N.name : d.documentRegion, [H, d.documentRegion]), k = H ? "content" : "fill";
3525
- return e === null ? /* @__PURE__ */ c(we, { value: k, children: /* @__PURE__ */ c(fc, { absence: t, announces: i, announceFailure: f }) }) : /* @__PURE__ */ c(we, { value: k, children: /* @__PURE__ */ c(Ie, { fallback: /* @__PURE__ */ c(Vt, { label: w(e, null) }), children: /* @__PURE__ */ c(
3526
- xc,
3552
+ return e === null ? /* @__PURE__ */ c(we, { value: k, children: /* @__PURE__ */ c(kc, { absence: t, announces: i, announceFailure: f }) }) : /* @__PURE__ */ c(we, { value: k, children: /* @__PURE__ */ c(Ie, { fallback: /* @__PURE__ */ c(Gt, { label: w(e, null) }), children: /* @__PURE__ */ c(
3553
+ Dc,
3527
3554
  {
3528
3555
  requestedPath: e,
3529
3556
  content: _,
@@ -3539,11 +3566,11 @@ const ol = /* @__PURE__ */ new Map([
3539
3566
  onDocumentShown: u
3540
3567
  }
3541
3568
  ) }) });
3542
- }, Tc = ({ path: e, absence: t, markup: n, variant: r, onDocumentShown: o }) => {
3543
- const { config: s, viewSettings: a, announcer: i } = $(), f = Je((I) => I.style), u = Je((I) => I.align), l = ot(), d = Xn(), h = $t(), { view: g, overrides: v, embed: y } = r, T = F(
3569
+ }, Pc = ({ path: e, absence: t, markup: n, variant: r, onDocumentShown: o }) => {
3570
+ const { config: s, viewSettings: a, announcer: i } = $(), f = Je((I) => I.style), u = Je((I) => I.align), l = ot(), d = er(), h = Ft(), { view: g, overrides: v, embed: y } = r, T = F(
3544
3571
  (I) => {
3545
3572
  if (h.kind !== "location") return;
3546
- const _ = uc(s, h.location, I);
3573
+ const _ = yc(s, h.location, I);
3547
3574
  _ !== null && l(_, "browse");
3548
3575
  },
3549
3576
  [s, l, h]
@@ -3557,7 +3584,7 @@ const ol = /* @__PURE__ */ new Map([
3557
3584
  a.update({ align: I }), T("align");
3558
3585
  },
3559
3586
  [a, T]
3560
- ), q = qr(s, v.style, f), D = Br(v.align, u), m = X(
3587
+ ), q = zr(s, v.style, f), D = jr(v.align, u), m = X(
3561
3588
  () => ({
3562
3589
  style: q,
3563
3590
  onStyleChange: O,
@@ -3573,9 +3600,9 @@ const ol = /* @__PURE__ */ new Map([
3573
3600
  }),
3574
3601
  [q, O, D, R, y]
3575
3602
  ), p = X(() => ({ kind: "page", view: g, overrides: v, embed: y }), [g, v, y]), x = X(() => ({ kind: "page", fragment: d.hash, navigation: d }), [d]), A = F((I) => i.announce(I), [i]);
3576
- return /* @__PURE__ */ c(to, { path: e, absence: t, markup: n, display: m, navigation: p, fragment: x, paneScroll: Ga, announces: !0, announceFailure: A, onDocumentShown: o });
3577
- }, Rc = ({ path: e, absence: t, markup: n, variant: r, onDocumentShown: o }) => {
3578
- const { config: s, viewSettings: a } = $(), i = Je((p) => p.style), f = Je((p) => p.align), [u, l] = V(() => qr(s, void 0, i)), d = Br(void 0, f), h = F((p) => a.update({ align: p }), [a]), { maximized: g, onDocumentLink: v, pendingHash: y, onHashConsumed: T, announceFailure: O, paneScroll: R } = r, q = X(
3603
+ return /* @__PURE__ */ c(so, { path: e, absence: t, markup: n, display: m, navigation: p, fragment: x, paneScroll: ri, announces: !0, announceFailure: A, onDocumentShown: o });
3604
+ }, Ic = ({ path: e, absence: t, markup: n, variant: r, onDocumentShown: o }) => {
3605
+ const { config: s, viewSettings: a } = $(), i = Je((p) => p.style), f = Je((p) => p.align), [u, l] = V(() => zr(s, void 0, i)), d = jr(void 0, f), h = F((p) => a.update({ align: p }), [a]), { maximized: g, onDocumentLink: v, pendingHash: y, onHashConsumed: T, announceFailure: O, paneScroll: R } = r, q = X(
3579
3606
  () => ({
3580
3607
  style: u,
3581
3608
  onStyleChange: l,
@@ -3591,9 +3618,9 @@ const ol = /* @__PURE__ */ new Map([
3591
3618
  }),
3592
3619
  [u, d, h, g]
3593
3620
  ), D = X(() => ({ kind: "panel", onDocumentLink: v }), [v]), m = X(() => ({ kind: "panel", fragment: y, consume: T }), [y, T]);
3594
- return /* @__PURE__ */ c(to, { path: e, absence: t, markup: n, display: q, navigation: D, fragment: m, paneScroll: R, announces: !1, announceFailure: O, onDocumentShown: o });
3595
- }, Cc = ({ path: e, absence: t, markup: n, variant: r, onDocumentShown: o }) => r.kind === "page" ? /* @__PURE__ */ c(Tc, { path: e, absence: t, markup: n, variant: r, onDocumentShown: o }) : /* @__PURE__ */ c(Rc, { path: e, absence: t, markup: n, variant: r, onDocumentShown: o });
3596
- function Oc({
3621
+ return /* @__PURE__ */ c(so, { path: e, absence: t, markup: n, display: q, navigation: D, fragment: m, paneScroll: R, announces: !1, announceFailure: O, onDocumentShown: o });
3622
+ }, $c = ({ path: e, absence: t, markup: n, variant: r, onDocumentShown: o }) => r.kind === "page" ? /* @__PURE__ */ c(Pc, { path: e, absence: t, markup: n, variant: r, onDocumentShown: o }) : /* @__PURE__ */ c(Ic, { path: e, absence: t, markup: n, variant: r, onDocumentShown: o });
3623
+ function _c({
3597
3624
  title: e,
3598
3625
  titleId: t,
3599
3626
  ...n
@@ -3614,8 +3641,8 @@ function Oc({
3614
3641
  clipRule: "evenodd"
3615
3642
  }));
3616
3643
  }
3617
- const Lc = /* @__PURE__ */ E.forwardRef(Oc);
3618
- function Mc({
3644
+ const Fc = /* @__PURE__ */ E.forwardRef(_c);
3645
+ function qc({
3619
3646
  title: e,
3620
3647
  titleId: t,
3621
3648
  ...n
@@ -3636,8 +3663,8 @@ function Mc({
3636
3663
  clipRule: "evenodd"
3637
3664
  }));
3638
3665
  }
3639
- const no = /* @__PURE__ */ E.forwardRef(Mc);
3640
- function Ac({
3666
+ const ao = /* @__PURE__ */ E.forwardRef(qc);
3667
+ function Bc({
3641
3668
  title: e,
3642
3669
  titleId: t,
3643
3670
  ...n
@@ -3658,8 +3685,8 @@ function Ac({
3658
3685
  clipRule: "evenodd"
3659
3686
  }));
3660
3687
  }
3661
- const Nc = /* @__PURE__ */ E.forwardRef(Ac);
3662
- function Dc({
3688
+ const Uc = /* @__PURE__ */ E.forwardRef(Bc);
3689
+ function Hc({
3663
3690
  title: e,
3664
3691
  titleId: t,
3665
3692
  ...n
@@ -3684,8 +3711,8 @@ function Dc({
3684
3711
  clipRule: "evenodd"
3685
3712
  }));
3686
3713
  }
3687
- const Pc = /* @__PURE__ */ E.forwardRef(Dc);
3688
- function Ic({
3714
+ const zc = /* @__PURE__ */ E.forwardRef(Hc);
3715
+ function jc({
3689
3716
  title: e,
3690
3717
  titleId: t,
3691
3718
  ...n
@@ -3706,8 +3733,8 @@ function Ic({
3706
3733
  clipRule: "evenodd"
3707
3734
  }));
3708
3735
  }
3709
- const $c = /* @__PURE__ */ E.forwardRef(Ic);
3710
- function _c({
3736
+ const Vc = /* @__PURE__ */ E.forwardRef(jc);
3737
+ function Zc({
3711
3738
  title: e,
3712
3739
  titleId: t,
3713
3740
  ...n
@@ -3730,8 +3757,8 @@ function _c({
3730
3757
  d: "M12.971 1.816A5.23 5.23 0 0 1 14.25 5.25v1.875c0 .207.168.375.375.375H16.5a5.23 5.23 0 0 1 3.434 1.279 9.768 9.768 0 0 0-6.963-6.963Z"
3731
3758
  }));
3732
3759
  }
3733
- const Fc = /* @__PURE__ */ E.forwardRef(_c);
3734
- function qc({
3760
+ const Wc = /* @__PURE__ */ E.forwardRef(Zc);
3761
+ function Gc({
3735
3762
  title: e,
3736
3763
  titleId: t,
3737
3764
  ...n
@@ -3754,8 +3781,8 @@ function qc({
3754
3781
  clipRule: "evenodd"
3755
3782
  }));
3756
3783
  }
3757
- const Bc = /* @__PURE__ */ E.forwardRef(qc);
3758
- function Uc({
3784
+ const Kc = /* @__PURE__ */ E.forwardRef(Gc);
3785
+ function Yc({
3759
3786
  title: e,
3760
3787
  titleId: t,
3761
3788
  ...n
@@ -3776,8 +3803,8 @@ function Uc({
3776
3803
  d: "M5.25 5.25a3 3 0 0 0-3 3v10.5a3 3 0 0 0 3 3h10.5a3 3 0 0 0 3-3V13.5a.75.75 0 0 0-1.5 0v5.25a1.5 1.5 0 0 1-1.5 1.5H5.25a1.5 1.5 0 0 1-1.5-1.5V8.25a1.5 1.5 0 0 1 1.5-1.5h5.25a.75.75 0 0 0 0-1.5H5.25Z"
3777
3804
  }));
3778
3805
  }
3779
- const Hc = /* @__PURE__ */ E.forwardRef(Uc);
3780
- function zc({
3806
+ const Xc = /* @__PURE__ */ E.forwardRef(Yc);
3807
+ function Jc({
3781
3808
  title: e,
3782
3809
  titleId: t,
3783
3810
  ...n
@@ -3796,7 +3823,7 @@ function zc({
3796
3823
  d: "M15 3.75H9v16.5h6V3.75ZM16.5 20.25h3.375c1.035 0 1.875-.84 1.875-1.875V5.625c0-1.036-.84-1.875-1.875-1.875H16.5v16.5ZM4.125 3.75H7.5v16.5H4.125a1.875 1.875 0 0 1-1.875-1.875V5.625c0-1.036.84-1.875 1.875-1.875Z"
3797
3824
  }));
3798
3825
  }
3799
- const jc = /* @__PURE__ */ E.forwardRef(zc), Vc = ({ href: e, onRetry: t, testId: n }) => {
3826
+ const Qc = /* @__PURE__ */ E.forwardRef(Jc), ed = ({ href: e, onRetry: t, testId: n }) => {
3800
3827
  const { labels: r, onEditGrant: o } = $(), [s, a] = V(!1), i = () => {
3801
3828
  o === void 0 || s || (a(!0), o(e).then((f) => {
3802
3829
  f && t();
@@ -3812,23 +3839,23 @@ const jc = /* @__PURE__ */ E.forwardRef(zc), Vc = ({ href: e, onRetry: t, testId
3812
3839
  /* @__PURE__ */ c("button", { type: "button", className: "aqmx-callout-action", "data-testid": `${n}-retry`, onClick: t, children: r.editGrantRetry })
3813
3840
  ] })
3814
3841
  ] });
3815
- }, Zc = "Control+E Meta+E", Wc = (e, t, n) => n && t ? "split" : e.view, Bn = (e, t, n, r) => {
3842
+ }, td = "Control+E Meta+E", nd = (e, t, n) => n && t ? "split" : e.view, zn = (e, t, n, r) => {
3816
3843
  if (n === "split") {
3817
3844
  e.setSideBySide(!0);
3818
3845
  return;
3819
3846
  }
3820
3847
  e.setView(t, n), r && e.sideBySide() && e.setSideBySide(!1);
3821
- }, fu = (e) => e === "split" ? null : e, Gc = (e) => e === "preview" ? "editor" : "preview", Kc = (e) => /Mac|iPhone|iPad|iPod/u.test(e), Yc = (e, t) => {
3848
+ }, ku = (e) => e === "split" ? null : e, rd = (e) => e === "preview" ? "editor" : "preview", od = (e) => /Mac|iPhone|iPad|iPod/u.test(e), sd = (e, t) => {
3822
3849
  if (e.isComposing || e.altKey || e.shiftKey || (t ? !e.metaKey || e.ctrlKey : !e.ctrlKey || e.metaKey)) return !1;
3823
3850
  const n = e.key.toLowerCase();
3824
3851
  return n === "e" || e.code === "KeyE" && /^\p{L}$/u.test(n) && !/^[a-z]$/u.test(n);
3825
- }, Un = (e, t, n) => {
3852
+ }, jn = (e, t, n) => {
3826
3853
  const r = e.modifiedAt === null ? Number.NaN : Date.parse(e.modifiedAt);
3827
3854
  return n(Number.isNaN(r) ? e.id : t.format(r), e.author === null ? "" : e.author);
3828
- }, Xc = ({ path: e, documentName: t, open: n, onClose: r }) => {
3855
+ }, ad = ({ path: e, documentName: t, open: n, onClose: r }) => {
3829
3856
  const { data: o, edits: s, labels: a, locale: i, announcer: f } = $(), u = Te(), [l, d] = V(null), [h, g] = V(0), [v, y] = V(null), [T, O] = V(null), R = X(() => new Intl.DateTimeFormat(i, { dateStyle: "medium", timeStyle: "short" }), [i]), q = F(() => {
3830
3857
  y(null), O(null);
3831
- }, []), D = fr({ open: n, onOpen: q, onDismiss: r });
3858
+ }, []), D = pr({ open: n, onOpen: q, onDismiss: r });
3832
3859
  ee(() => {
3833
3860
  if (!n) return;
3834
3861
  const x = new AbortController();
@@ -3848,25 +3875,25 @@ const jc = /* @__PURE__ */ E.forwardRef(zc), Vc = ({ href: e, onRetry: t, testId
3848
3875
  return /* @__PURE__ */ c("dialog", { ...D, className: "aqmx-confirm aqmx-history", "aria-labelledby": u, "data-testid": "markdown-explorer-history", children: /* @__PURE__ */ B("div", { className: "aqmx-confirm-panel aqmx-history-panel", children: [
3849
3876
  /* @__PURE__ */ c("p", { id: u, className: "aqmx-confirm-title", children: a.historyTitle(t) }),
3850
3877
  l === null ? /* @__PURE__ */ c("p", { className: "aqmx-history-note", "data-testid": "markdown-explorer-history-loading", children: a.historyLoading }) : l.kind === "failure" ? /* @__PURE__ */ c(Re, { failure: l.failure, alert: !1, onRetry: () => g((x) => x + 1), testId: "markdown-explorer-history-failure" }) : l.revisions.length === 0 ? /* @__PURE__ */ c("p", { className: "aqmx-history-note", "data-testid": "markdown-explorer-history-empty", children: a.historyEmpty }) : /* @__PURE__ */ c("ul", { className: "aqmx-history-list", "data-testid": "markdown-explorer-history-list", children: l.revisions.map((x) => /* @__PURE__ */ c("li", { children: /* @__PURE__ */ B("button", { type: "button", className: "aqmx-history-entry", "aria-pressed": x.id === v, "data-testid": "markdown-explorer-history-entry", onClick: () => y(x.id), children: [
3851
- /* @__PURE__ */ c("span", { children: Un(x, R, a.historyEntry) }),
3878
+ /* @__PURE__ */ c("span", { children: jn(x, R, a.historyEntry) }),
3852
3879
  x.current ? /* @__PURE__ */ c("span", { className: "aqmx-history-mark", children: a.historyCurrent }) : null,
3853
3880
  x.kept ? /* @__PURE__ */ c("span", { className: "aqmx-history-mark", children: a.historyKept }) : null
3854
3881
  ] }) }, x.id)) }),
3855
3882
  v === null ? null : T === null ? /* @__PURE__ */ c("p", { className: "aqmx-history-note", children: a.historyLoading }) : T.kind === "failure" ? /* @__PURE__ */ c(Re, { failure: T.failure, alert: !1, testId: "markdown-explorer-history-revision-failure" }) : (
3856
- /* @__PURE__ */ c("section", { className: "aqmx-history-text", tabIndex: 0, "aria-label": p === void 0 ? a.historyTitle(t) : Un(p, R, a.historyEntry), "data-testid": "markdown-explorer-history-text", children: /* @__PURE__ */ c("pre", { children: T.text }) })
3883
+ /* @__PURE__ */ c("section", { className: "aqmx-history-text", tabIndex: 0, "aria-label": p === void 0 ? a.historyTitle(t) : jn(p, R, a.historyEntry), "data-testid": "markdown-explorer-history-text", children: /* @__PURE__ */ c("pre", { children: T.text }) })
3857
3884
  ),
3858
3885
  /* @__PURE__ */ B("div", { className: "aqmx-confirm-actions", children: [
3859
3886
  /* @__PURE__ */ c("button", { type: "button", className: "aqmx-callout-action", "data-testid": "markdown-explorer-history-close", onClick: r, children: a.historyClose }),
3860
3887
  /* @__PURE__ */ c("button", { type: "button", className: "aqmx-callout-action", "aria-disabled": T === null || T.kind !== "revision", "data-testid": "markdown-explorer-history-restore", onClick: m, children: a.historyRestore })
3861
3888
  ] })
3862
3889
  ] }) });
3863
- }, Jc = (e) => {
3864
- const { documents: t } = $(), n = F(() => t.peek(e), [t, e]), r = F(() => t.peekSeeded(e), [t, e]), o = oe(t.subscribe, n, r), s = ge(o)?.document;
3890
+ }, id = (e) => {
3891
+ const { documents: t } = $(), n = F(() => t.peek(e), [t, e]), r = F(() => t.peekSeeded(e), [t, e]), o = re(t.subscribe, n, r), s = ge(o)?.document;
3865
3892
  return s === void 0 || s.kind === "failure" ? { edit: null, name: fe(e) } : { edit: s.kind === "markdown" || s.kind === "spreadsheet" ? s.edit : null, name: s.name };
3866
3893
  }, me = (e) => {
3867
3894
  e.stopPropagation();
3868
- }, Qc = ({ path: e, documentName: t, iconOnly: n, previewAvailable: r, draft: o }) => {
3869
- const { draftConverter: s, edits: a, labels: i } = $(), f = oe(
3895
+ }, ld = ({ path: e, documentName: t, iconOnly: n, previewAvailable: r, draft: o }) => {
3896
+ const { draftConverter: s, edits: a, labels: i } = $(), f = re(
3870
3897
  a.subscribe,
3871
3898
  () => a.session(e) !== void 0,
3872
3899
  () => !1
@@ -3879,7 +3906,7 @@ const jc = /* @__PURE__ */ E.forwardRef(zc), Vc = ({ href: e, onRetry: t, testId
3879
3906
  const y = a.session(e);
3880
3907
  y?.dirty === !0 ? l(y.save.kind === "draft" ? "draft" : "unsaved") : a.close(e);
3881
3908
  }, h = () => {
3882
- f || (Ks(), r && a.sideBySide() && s?.prepare?.());
3909
+ f || (Qs(), r && a.sideBySide() && s?.prepare?.());
3883
3910
  }, g = n ? o ? i.editDraftDocumentNamed(t) : i.editDocumentNamed(t) : null, v = o ? i.editDraftDocument : i.editDocument;
3884
3911
  return /* @__PURE__ */ B(pe, { children: [
3885
3912
  /* @__PURE__ */ B(
@@ -3896,13 +3923,13 @@ const jc = /* @__PURE__ */ E.forwardRef(zc), Vc = ({ href: e, onRetry: t, testId
3896
3923
  onPointerEnter: h,
3897
3924
  onFocus: h,
3898
3925
  children: [
3899
- /* @__PURE__ */ c(Hc, { "aria-hidden": "true" }),
3926
+ /* @__PURE__ */ c(Xc, { "aria-hidden": "true" }),
3900
3927
  g === null ? /* @__PURE__ */ c("span", { children: i.editDocumentLabel }) : null
3901
3928
  ]
3902
3929
  }
3903
3930
  ),
3904
3931
  /* @__PURE__ */ c(
3905
- mr,
3932
+ gr,
3906
3933
  {
3907
3934
  open: u !== null,
3908
3935
  title: u === "draft" ? i.draftDiscardTitle : i.unsavedTitle,
@@ -3917,7 +3944,7 @@ const jc = /* @__PURE__ */ E.forwardRef(zc), Vc = ({ href: e, onRetry: t, testId
3917
3944
  }
3918
3945
  )
3919
3946
  ] });
3920
- }, ed = ({ href: e, documentName: t, iconOnly: n }) => {
3947
+ }, cd = ({ href: e, documentName: t, iconOnly: n }) => {
3921
3948
  const { labels: r } = $(), o = n ? r.editExternallyNamed(t) : null;
3922
3949
  return /* @__PURE__ */ B(
3923
3950
  "a",
@@ -3931,29 +3958,29 @@ const jc = /* @__PURE__ */ E.forwardRef(zc), Vc = ({ href: e, onRetry: t, testId
3931
3958
  "data-testid": "markdown-explorer-document-edit-external",
3932
3959
  onDoubleClick: me,
3933
3960
  children: [
3934
- /* @__PURE__ */ c(Nc, { "aria-hidden": "true" }),
3961
+ /* @__PURE__ */ c(Uc, { "aria-hidden": "true" }),
3935
3962
  o === null ? /* @__PURE__ */ c("span", { children: r.editExternallyLabel }) : null
3936
3963
  ]
3937
3964
  }
3938
3965
  );
3939
- }, td = ({ session: e }) => {
3940
- const { labels: t } = $(), n = vs(t, e);
3966
+ }, dd = ({ session: e }) => {
3967
+ const { labels: t } = $(), n = Es(t, e);
3941
3968
  return /* @__PURE__ */ c("p", { className: "aqmx-edit-status", title: n === "" ? void 0 : n, "data-testid": "markdown-explorer-edit-status", "data-aqmx-save": e.save.kind, children: n });
3942
- }, nd = Object.freeze(["editor", "split", "preview"]), rd = Object.freeze(["editor", "preview"]), od = Object.freeze({ editor: no, split: jc, preview: Bc }), sd = ({ path: e, documentName: t, iconOnly: n, session: r, previewAvailable: o }) => {
3943
- const { draftConverter: s, edits: a, labels: i } = $(), f = js(), u = Wc(r, f, o), l = o ? nd : rd, d = Te(), h = U(/* @__PURE__ */ new Map()), g = {
3969
+ }, ud = Object.freeze(["editor", "split", "preview"]), fd = Object.freeze(["editor", "preview"]), md = Object.freeze({ editor: ao, split: Qc, preview: Kc }), hd = ({ path: e, documentName: t, iconOnly: n, session: r, previewAvailable: o }) => {
3970
+ const { draftConverter: s, edits: a, labels: i } = $(), f = Gs(), u = nd(r, f, o), l = o ? ud : fd, d = Te(), h = U(/* @__PURE__ */ new Map()), g = {
3944
3971
  editor: { label: i.editViewEditor, tooltip: i.editViewEditorTooltip },
3945
3972
  split: { label: i.editViewSplit, tooltip: i.editViewSplitTooltip },
3946
3973
  preview: { label: i.editViewPreview, tooltip: i.editViewPreviewTooltip }
3947
3974
  }, v = () => {
3948
3975
  a.preparePreview(e), s?.prepare?.();
3949
3976
  }, y = (T) => {
3950
- if (!Yc(T.nativeEvent, Kc(navigator.platform))) return;
3951
- dr(T);
3952
- const O = Gc(u);
3953
- Bn(a, e, O, o), h.current.get(O)?.focus();
3977
+ if (!sd(T.nativeEvent, od(navigator.platform))) return;
3978
+ mr(T);
3979
+ const O = rd(u);
3980
+ zn(a, e, O, o), h.current.get(O)?.focus();
3954
3981
  };
3955
3982
  return /* @__PURE__ */ c("div", { role: "radiogroup", "aria-label": n ? i.editViewNamed(t) : i.editView, className: "aqmx-edit-view", "data-testid": "markdown-explorer-edit-view", onKeyDown: y, children: l.map((T) => {
3956
- const O = od[T], { label: R, tooltip: q } = g[T], D = T === "preview" ? v : void 0;
3983
+ const O = md[T], { label: R, tooltip: q } = g[T], D = T === "preview" ? v : void 0;
3957
3984
  return /* @__PURE__ */ B("label", { className: n ? "aqmx-icon-button" : "aqmx-icon-button aqmx-labelled-button", children: [
3958
3985
  /* @__PURE__ */ c(
3959
3986
  "input",
@@ -3966,10 +3993,10 @@ const jc = /* @__PURE__ */ E.forwardRef(zc), Vc = ({ href: e, onRetry: t, testId
3966
3993
  value: T,
3967
3994
  checked: T === u,
3968
3995
  "aria-label": R,
3969
- "aria-keyshortcuts": T === "split" ? void 0 : Zc,
3996
+ "aria-keyshortcuts": T === "split" ? void 0 : td,
3970
3997
  title: q,
3971
3998
  "data-testid": `markdown-explorer-edit-view-${T}`,
3972
- onChange: () => Bn(a, e, T, o),
3999
+ onChange: () => zn(a, e, T, o),
3973
4000
  onDoubleClick: me,
3974
4001
  onPointerEnter: D,
3975
4002
  onFocus: D
@@ -3979,7 +4006,7 @@ const jc = /* @__PURE__ */ E.forwardRef(zc), Vc = ({ href: e, onRetry: t, testId
3979
4006
  n ? null : /* @__PURE__ */ c("span", { children: R })
3980
4007
  ] }, T);
3981
4008
  }) });
3982
- }, ad = ({ path: e, documentName: t, iconOnly: n, session: r, previewAvailable: o }) => {
4009
+ }, pd = ({ path: e, documentName: t, iconOnly: n, session: r, previewAvailable: o }) => {
3983
4010
  const { edits: s, labels: a } = $(), [i, f] = V(!1);
3984
4011
  if (r.phase.kind !== "editing") return null;
3985
4012
  const u = r.save.kind === "saving", l = u || !r.dirty, d = () => {
@@ -3989,27 +4016,27 @@ const jc = /* @__PURE__ */ E.forwardRef(zc), Vc = ({ href: e, onRetry: t, testId
3989
4016
  }, h = (g) => n ? { className: "aqmx-icon-button", "aria-label": g } : { className: "aqmx-icon-button aqmx-labelled-button" };
3990
4017
  return /* @__PURE__ */ B(pe, { children: [
3991
4018
  r.save.kind === "conflicts" ? /* @__PURE__ */ B("button", { type: "button", ...h(a.conflictNext), title: a.conflictNext, "data-testid": "markdown-explorer-edit-next-conflict", onClick: () => s.nextConflict(e), onDoubleClick: me, children: [
3992
- /* @__PURE__ */ c(Pc, { "aria-hidden": "true" }),
4019
+ /* @__PURE__ */ c(zc, { "aria-hidden": "true" }),
3993
4020
  n ? null : /* @__PURE__ */ c("span", { children: a.conflictNext })
3994
4021
  ] }) : null,
3995
- /* @__PURE__ */ c(sd, { path: e, documentName: t, iconOnly: n, session: r, previewAvailable: o }),
4022
+ /* @__PURE__ */ c(hd, { path: e, documentName: t, iconOnly: n, session: r, previewAvailable: o }),
3996
4023
  r.history ? /* @__PURE__ */ B("button", { type: "button", ...h(a.historyOpen), title: a.historyOpen, "aria-haspopup": "dialog", "data-testid": "markdown-explorer-edit-history", onClick: () => f(!0), onDoubleClick: me, children: [
3997
- /* @__PURE__ */ c($c, { "aria-hidden": "true" }),
4024
+ /* @__PURE__ */ c(Vc, { "aria-hidden": "true" }),
3998
4025
  n ? null : /* @__PURE__ */ c("span", { children: a.historyOpen })
3999
4026
  ] }) : null,
4000
4027
  r.save.kind === "draft" ? null : /* @__PURE__ */ B("button", { type: "button", ...h(a.saveDraft), title: a.saveDraftTooltip, "aria-disabled": l, "aria-busy": u, "aria-keyshortcuts": "Control+S Meta+S", "data-testid": "markdown-explorer-edit-save", onClick: d, onDoubleClick: me, children: [
4001
- /* @__PURE__ */ c(Fc, { "aria-hidden": "true" }),
4028
+ /* @__PURE__ */ c(Wc, { "aria-hidden": "true" }),
4002
4029
  n ? null : /* @__PURE__ */ c("span", { children: a.saveDraft })
4003
4030
  ] }),
4004
- r.history ? /* @__PURE__ */ c(Xc, { path: e, documentName: t, open: i, onClose: () => f(!1) }) : null
4031
+ r.history ? /* @__PURE__ */ c(ad, { path: e, documentName: t, open: i, onClose: () => f(!1) }) : null
4005
4032
  ] });
4006
- }, id = ({ path: e, session: t }) => {
4033
+ }, gd = ({ path: e, session: t }) => {
4007
4034
  const { edits: n } = $();
4008
- return t.save.kind !== "grant" ? null : /* @__PURE__ */ c(Vc, { href: t.save.href, onRetry: () => {
4035
+ return t.save.kind !== "grant" ? null : /* @__PURE__ */ c(ed, { href: t.save.href, onRetry: () => {
4009
4036
  n.save(e);
4010
4037
  }, testId: "markdown-explorer-save-grant" });
4011
- }, ld = /* @__PURE__ */ new Set(), cd = (e, t, n) => {
4012
- const { documents: r, announcer: o, labels: s } = $(), a = F(() => r.peek(e), [r, e]), i = F(() => r.peekSeeded(e), [r, e]), f = oe(r.subscribe, a, i), u = F(() => r.answerStampOf(e), [r, e]), l = oe(r.subscribe, u, u), [d] = V(() => /* @__PURE__ */ new Set()), [h, g] = V(ld), [v, y] = V(null);
4038
+ }, wd = /* @__PURE__ */ new Set(), vd = (e, t, n) => {
4039
+ const { documents: r, announcer: o, labels: s } = $(), a = F(() => r.peek(e), [r, e]), i = F(() => r.peekSeeded(e), [r, e]), f = re(r.subscribe, a, i), u = F(() => r.answerStampOf(e), [r, e]), l = re(r.subscribe, u, u), [d] = V(() => /* @__PURE__ */ new Set()), [h, g] = V(wd), [v, y] = V(null);
4013
4040
  v !== null && (v.path !== e || v.markup !== n) && y(null);
4014
4041
  const T = U(null);
4015
4042
  Y(() => (T.current = e, () => {
@@ -4039,7 +4066,7 @@ const jc = /* @__PURE__ */ E.forwardRef(zc), Vc = ({ href: e, onRetry: t, testId
4039
4066
  })());
4040
4067
  }, [e, t, d, r, o, s]), q = h.has(e), D = v !== null && v.path === e && v.stamp === l && v.markup === n ? v.failure : null;
4041
4068
  return { refreshing: q, unavailable: q || f?.status === "pending", failure: D, refresh: R };
4042
- }, dd = (e, t) => {
4069
+ }, bd = (e, t) => {
4043
4070
  switch (t) {
4044
4071
  case "markdown":
4045
4072
  return e.showMarkup;
@@ -4049,30 +4076,30 @@ const jc = /* @__PURE__ */ E.forwardRef(zc), Vc = ({ href: e, onRetry: t, testId
4049
4076
  case "tsv":
4050
4077
  return e.showSpreadsheetMarkup(t.toUpperCase());
4051
4078
  }
4052
- }, ud = Object.freeze({ kind: "page" }), fd = ({ path: e, placement: t, markup: n }) => {
4053
- const { labels: r } = $(), { refreshing: o, unavailable: s, failure: a, refresh: i } = cd(e, t.kind === "page", n.shown), f = Ui(e), u = Jc(e), l = pr(e), d = t.kind === "panel" ? r.refreshDocumentNamed(t.documentName) : null, h = t.kind === "panel" ? r.showMarkupNamed(t.documentName) : null, g = t.kind === "panel", v = t.kind === "panel" ? t.documentName : u.name, y = t.kind === "page" || t.maximized;
4079
+ }, yd = Object.freeze({ kind: "page" }), kd = ({ path: e, placement: t, markup: n }) => {
4080
+ const { labels: r } = $(), { refreshing: o, unavailable: s, failure: a, refresh: i } = vd(e, t.kind === "page", n.shown), f = Yi(e), u = id(e), l = vr(e), d = t.kind === "panel" ? r.refreshDocumentNamed(t.documentName) : null, h = t.kind === "panel" ? r.showMarkupNamed(t.documentName) : null, g = t.kind === "panel", v = t.kind === "panel" ? t.documentName : u.name, y = t.kind === "page" || t.maximized;
4054
4081
  return /* @__PURE__ */ B("div", { className: "aqmx-document-refresh-bar", "data-testid": "markdown-explorer-document-refresh-bar", "data-aqmx-editing": l === void 0 ? void 0 : "true", children: [
4055
4082
  /* @__PURE__ */ B("div", { className: "aqmx-document-refresh-row", children: [
4056
- l === void 0 ? null : /* @__PURE__ */ c(td, { session: l }),
4057
- l === void 0 ? null : /* @__PURE__ */ c(ad, { path: e, documentName: v, iconOnly: g, session: l, previewAvailable: y }),
4083
+ l === void 0 ? null : /* @__PURE__ */ c(dd, { session: l }),
4084
+ l === void 0 ? null : /* @__PURE__ */ c(pd, { path: e, documentName: v, iconOnly: g, session: l, previewAvailable: y }),
4058
4085
  l === void 0 && f !== null ? /* @__PURE__ */ B(
4059
4086
  "button",
4060
4087
  {
4061
4088
  type: "button",
4062
4089
  className: h === null ? "aqmx-icon-button aqmx-labelled-button" : "aqmx-icon-button",
4063
- title: h === null ? dd(r, f) : h,
4090
+ title: h === null ? bd(r, f) : h,
4064
4091
  "aria-label": h === null ? void 0 : h,
4065
4092
  "aria-pressed": n.shown,
4066
4093
  "data-testid": "markdown-explorer-document-markup",
4067
4094
  onClick: n.toggle,
4068
4095
  onDoubleClick: me,
4069
4096
  children: [
4070
- /* @__PURE__ */ c(no, { "aria-hidden": "true" }),
4097
+ /* @__PURE__ */ c(ao, { "aria-hidden": "true" }),
4071
4098
  h === null ? /* @__PURE__ */ c("span", { children: r.showMarkupLabel }) : null
4072
4099
  ]
4073
4100
  }
4074
4101
  ) : null,
4075
- l !== void 0 || u.edit?.kind === "inline" || u.edit?.kind === "draft" ? /* @__PURE__ */ c(Qc, { path: e, documentName: v, iconOnly: g, previewAvailable: y, draft: u.edit?.kind === "draft" }) : u.edit?.kind === "external" ? /* @__PURE__ */ c(ed, { href: u.edit.href, documentName: v, iconOnly: g }) : null,
4102
+ l !== void 0 || u.edit?.kind === "inline" || u.edit?.kind === "draft" ? /* @__PURE__ */ c(ld, { path: e, documentName: v, iconOnly: g, previewAvailable: y, draft: u.edit?.kind === "draft" }) : u.edit?.kind === "external" ? /* @__PURE__ */ c(cd, { href: u.edit.href, documentName: v, iconOnly: g }) : null,
4076
4103
  l === void 0 ? /* @__PURE__ */ B(
4077
4104
  "button",
4078
4105
  {
@@ -4087,27 +4114,27 @@ const jc = /* @__PURE__ */ E.forwardRef(zc), Vc = ({ href: e, onRetry: t, testId
4087
4114
  onClick: i,
4088
4115
  onDoubleClick: me,
4089
4116
  children: [
4090
- /* @__PURE__ */ c(Lc, { "aria-hidden": "true" }),
4117
+ /* @__PURE__ */ c(Fc, { "aria-hidden": "true" }),
4091
4118
  d === null ? /* @__PURE__ */ c("span", { children: r.refreshDocumentLabel }) : null
4092
4119
  ]
4093
4120
  }
4094
4121
  ) : null
4095
4122
  ] }),
4096
4123
  l !== void 0 || a === null ? null : /* @__PURE__ */ c("p", { className: "aqmx-document-refresh-failure", "data-testid": "markdown-explorer-document-refresh-failure", "data-aqmx-failure": a.reason, children: r.documentRefreshFailed(de(r, a.reason)) }),
4097
- l === void 0 ? null : /* @__PURE__ */ c(id, { path: e, session: l })
4124
+ l === void 0 ? null : /* @__PURE__ */ c(gd, { path: e, session: l })
4098
4125
  ] });
4099
- }, md = ({ location: e }) => {
4100
- const t = e.doc, n = X(() => ({ kind: "page", view: "single", overrides: e.overrides, embed: e.embed }), [e.overrides, e.embed]), r = Hi(e);
4101
- return /* @__PURE__ */ B("div", { className: "aqmx-single aqmx-document-column", "data-testid": "markdown-explorer-single", ...Ot, children: [
4102
- /* @__PURE__ */ c(fd, { path: t, placement: ud, markup: r }),
4103
- /* @__PURE__ */ c(Cc, { path: t, absence: dc, markup: e.markup, variant: n })
4126
+ }, Ed = ({ location: e }) => {
4127
+ const t = e.doc, n = X(() => ({ kind: "page", view: "single", overrides: e.overrides, embed: e.embed }), [e.overrides, e.embed]), r = Xi(e);
4128
+ return /* @__PURE__ */ B("div", { className: "aqmx-single aqmx-document-column", "data-testid": "markdown-explorer-single", ...Lt, children: [
4129
+ /* @__PURE__ */ c(kd, { path: t, placement: yd, markup: r }),
4130
+ /* @__PURE__ */ c($c, { path: t, absence: bc, markup: e.markup, variant: n })
4104
4131
  ] });
4105
- }, hd = ({ holds: e, testId: t }) => {
4132
+ }, Sd = ({ holds: e, testId: t }) => {
4106
4133
  const { labels: n, announcer: r } = $(), o = Te();
4107
4134
  Y(() => e ? r.claim(o) : void 0, [e, r, o]);
4108
- const s = F(() => r.shownIn(o), [r, o]), a = oe(r.subscribe, s, s);
4135
+ const s = F(() => r.shownIn(o), [r, o]), a = re(r.subscribe, s, s);
4109
4136
  return /* @__PURE__ */ c("div", { className: "aqmx-sr-only", role: "status", "aria-live": "polite", "aria-atomic": "true", "data-testid": t, children: a.length > 1 ? n.announcementSequence(a) : a[0] });
4110
- }, ke = Object.freeze([]), pd = (e) => {
4137
+ }, ke = Object.freeze([]), xd = (e) => {
4111
4138
  const t = /* @__PURE__ */ new Set();
4112
4139
  let n = ke, r = [], o = !1;
4113
4140
  const s = [], a = (l) => {
@@ -4142,16 +4169,16 @@ const jc = /* @__PURE__ */ E.forwardRef(zc), Vc = ({ href: e, onRetry: t, testId
4142
4169
  },
4143
4170
  shownIn: (l) => i() === l ? n : ke
4144
4171
  };
4145
- }, ue = Object.freeze({ status: "cancelled" }), Hn = (e) => {
4172
+ }, ue = Object.freeze({ status: "cancelled" }), Vn = (e) => {
4146
4173
  if (e === null || typeof e != "object") return null;
4147
4174
  const { failure: t } = e;
4148
- if (Fo(t) !== null) return null;
4175
+ if (Ho(t) !== null) return null;
4149
4176
  const { reason: n, code: r } = t;
4150
- return qo(n, r);
4151
- }, gd = ({ dataPath: e, onScope: t, fetch: n }) => {
4177
+ return zo(n, r);
4178
+ }, Td = ({ dataPath: e, onScope: t, fetch: n }) => {
4152
4179
  const r = n ?? ((l, d) => globalThis.fetch(l, d)), o = (l, d) => `${e}/${l}?${new URLSearchParams(d).toString()}`, s = (l) => {
4153
4180
  l.status === 401 && t(null);
4154
- const d = l.headers.get(_o);
4181
+ const d = l.headers.get(Uo);
4155
4182
  d !== null && t(d);
4156
4183
  }, a = async (l, d, h, g) => {
4157
4184
  let v;
@@ -4174,29 +4201,29 @@ const jc = /* @__PURE__ */ E.forwardRef(zc), Vc = ({ href: e, onRetry: t, testId
4174
4201
  T = !1;
4175
4202
  }
4176
4203
  if (T) return y;
4177
- const O = Hn(y);
4204
+ const O = Vn(y);
4178
4205
  return g(O !== null ? O : { reason: v.status === 200 ? "failed" : dt(v.status) });
4179
- }, i = { [on]: jo }, f = { [on]: Ko, "Content-Type": `${Go}; charset=utf-8` }, u = async (l, d, h) => {
4206
+ }, i = { [ln]: Go }, f = { [ln]: Qo, "Content-Type": `${Jo}; charset=utf-8` }, u = async (l, d, h) => {
4180
4207
  const g = await a(l, d, h, (v) => ut(v.reason, v.code));
4181
4208
  return d.signal.aborted ? ue : g;
4182
4209
  };
4183
4210
  return {
4184
- tree: (l) => a(o("tree", { [te.source]: l }), { method: "GET" }, rn, (d) => ({ status: "error", failure: d })),
4211
+ tree: (l) => a(o("tree", { [te.source]: l }), { method: "GET" }, an, (d) => ({ status: "error", failure: d })),
4185
4212
  children: async (l, d, h) => {
4186
- const g = await a(o("children", { [te.source]: l, [te.path]: d }), { method: "GET", signal: h }, zo, (v) => ({ status: "error", failure: v }));
4213
+ const g = await a(o("children", { [te.source]: l, [te.path]: d }), { method: "GET", signal: h }, Wo, (v) => ({ status: "error", failure: v }));
4187
4214
  return h.aborted ? ue : g;
4188
4215
  },
4189
4216
  ancestors: async (l, d, h) => {
4190
- const g = await a(o("ancestors", { [te.source]: l, [te.path]: d }), { method: "GET", signal: h }, Ho, (v) => ({ status: "error", failure: v }));
4217
+ const g = await a(o("ancestors", { [te.source]: l, [te.path]: d }), { method: "GET", signal: h }, Zo, (v) => ({ status: "error", failure: v }));
4191
4218
  return h.aborted ? ue : g;
4192
4219
  },
4193
4220
  reveal: async (l, d, h) => {
4194
- const g = await a(o("reveal", { [te.source]: l, [te.path]: d }), { method: "GET", signal: h }, Uo, (v) => ({ status: "error", failure: v }));
4221
+ const g = await a(o("reveal", { [te.source]: l, [te.path]: d }), { method: "GET", signal: h }, Vo, (v) => ({ status: "error", failure: v }));
4195
4222
  return h.aborted ? ue : g;
4196
4223
  },
4197
- document: (l, { refresh: d }) => a(o("document", { [te.path]: l }), d ? { method: "GET", headers: i } : { method: "GET" }, Jo, (h) => ut(h.reason, h.code)),
4224
+ document: (l, { refresh: d }) => a(o("document", { [te.path]: l }), d ? { method: "GET", headers: i } : { method: "GET" }, ns, (h) => ut(h.reason, h.code)),
4198
4225
  text: async (l, d) => {
4199
- const h = await a(o("text", { [te.path]: l }), { method: "GET", signal: d }, Bo, (g) => ut(g.reason, g.code));
4226
+ const h = await a(o("text", { [te.path]: l }), { method: "GET", signal: d }, jo, (g) => ut(g.reason, g.code));
4200
4227
  return d.aborted ? ue : h;
4201
4228
  },
4202
4229
  asset: async (l, d) => {
@@ -4214,17 +4241,17 @@ const jc = /* @__PURE__ */ E.forwardRef(zc), Vc = ({ href: e, onRetry: t, testId
4214
4241
  } catch {
4215
4242
  }
4216
4243
  if (d.aborted) return ue;
4217
- const v = Hn(g);
4244
+ const v = Vn(g);
4218
4245
  return { status: "error", failure: v === null ? { reason: dt(h.status) } : v };
4219
4246
  },
4220
- edit: (l, d) => u(o("edit", { [te.path]: l }), { method: "GET", signal: d }, Xo),
4221
- save: (l, d, h, g) => u(o("save", { [te.path]: l, [te.base]: d }), { method: "POST", headers: f, body: h, signal: g }, Yo),
4222
- preview: (l, d, h) => u(o("preview", { [te.path]: l }), { method: "POST", headers: f, body: d, signal: h }, Wo),
4223
- revisions: (l, d) => u(o("revisions", { [te.path]: l }), { method: "GET", signal: d }, Zo),
4224
- revision: (l, d, h) => u(o("revision", { [te.path]: l, [te.revision]: d }), { method: "GET", signal: h }, Vo),
4225
- refresh: (l) => a(o("refresh", { [te.source]: l }), { method: "POST", headers: i }, rn, (d) => ({ status: "error", failure: d }))
4247
+ edit: (l, d) => u(o("edit", { [te.path]: l }), { method: "GET", signal: d }, ts),
4248
+ save: (l, d, h, g) => u(o("save", { [te.path]: l, [te.base]: d }), { method: "POST", headers: f, body: h, signal: g }, es),
4249
+ preview: (l, d, h) => u(o("preview", { [te.path]: l }), { method: "POST", headers: f, body: d, signal: h }, Xo),
4250
+ revisions: (l, d) => u(o("revisions", { [te.path]: l }), { method: "GET", signal: d }, Yo),
4251
+ revision: (l, d, h) => u(o("revision", { [te.path]: l, [te.revision]: d }), { method: "GET", signal: h }, Ko),
4252
+ refresh: (l) => a(o("refresh", { [te.source]: l }), { method: "POST", headers: i }, an, (d) => ({ status: "error", failure: d }))
4226
4253
  };
4227
- }, wd = () => {
4254
+ }, Rd = () => {
4228
4255
  let e = null, t = null;
4229
4256
  return {
4230
4257
  settle: (n) => {
@@ -4239,20 +4266,20 @@ const jc = /* @__PURE__ */ E.forwardRef(zc), Vc = ({ href: e, onRetry: t, testId
4239
4266
  return t = null, o;
4240
4267
  }
4241
4268
  };
4242
- }, vd = (e) => {
4243
- const t = Ct(e);
4244
- if (t === null) return tn;
4269
+ }, Cd = (e) => {
4270
+ const t = Ot(e);
4271
+ if (t === null) return on;
4245
4272
  try {
4246
- return No(JSON.parse(t));
4273
+ return $o(JSON.parse(t));
4247
4274
  } catch (n) {
4248
- return console.warn(`[markdown-explorer] localStorage key ${JSON.stringify(e)} does not hold JSON; using the default tree settings.`, n), tn;
4275
+ return console.warn(`[markdown-explorer] localStorage key ${JSON.stringify(e)} does not hold JSON; using the default tree settings.`, n), on;
4249
4276
  }
4250
- }, zn = (e, t) => {
4277
+ }, Zn = (e, t) => {
4251
4278
  let n = null;
4252
4279
  const r = () => {
4253
4280
  if (n === null) {
4254
- const s = vd(e);
4255
- n = { changes: s, settings: en(t, s) };
4281
+ const s = Cd(e);
4282
+ n = { changes: s, settings: rn(t, s) };
4256
4283
  }
4257
4284
  return n;
4258
4285
  }, o = qe();
@@ -4263,12 +4290,12 @@ const jc = /* @__PURE__ */ E.forwardRef(zc), Vc = ({ href: e, onRetry: t, testId
4263
4290
  getServerSnapshot: () => t,
4264
4291
  subscribe: o.subscribe,
4265
4292
  advance: (s) => {
4266
- const { changes: a, settings: i } = r(), f = Lo(a, s, Mo(i, s)[s], t);
4267
- return n = { changes: f, settings: en(t, f) }, o.emit(), Rt(e, Ao(f)), n.settings;
4293
+ const { changes: a, settings: i } = r(), f = Do(a, s, Po(i, s)[s], t);
4294
+ return n = { changes: f, settings: rn(t, f) }, o.emit(), Ct(e, Io(f)), n.settings;
4268
4295
  }
4269
4296
  };
4270
- }, bd = Object.freeze({ status: "refreshed" }), yd = Object.freeze({ status: "superseded" }), Dt = Object.freeze({ status: "deferred" }), kd = hr(Dt), ro = 4, Ed = ro - 1, jn = Object.freeze({ status: "loading" }), Sd = Object.freeze({ status: "error", failure: Object.freeze({ reason: "failed" }) }), xd = (e) => {
4271
- const t = /* @__PURE__ */ new Map(), n = Sr(), r = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), i = qe(), f = /* @__PURE__ */ new Set();
4297
+ }, Od = Object.freeze({ status: "refreshed" }), Ld = Object.freeze({ status: "superseded" }), It = Object.freeze({ status: "deferred" }), Md = wr(It), io = 4, Ad = io - 1, Wn = Object.freeze({ status: "loading" }), Nd = Object.freeze({ status: "error", failure: Object.freeze({ reason: "failed" }) }), Dd = (e) => {
4298
+ const t = /* @__PURE__ */ new Map(), n = Cr(), r = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), i = qe(), f = /* @__PURE__ */ new Set();
4272
4299
  let u = 0, l = 0;
4273
4300
  const d = { direct: null, bulk: null }, h = /* @__PURE__ */ new Set();
4274
4301
  let g = !1, v = 0;
@@ -4322,16 +4349,16 @@ const jc = /* @__PURE__ */ E.forwardRef(zc), Vc = ({ href: e, onRetry: t, testId
4322
4349
  const N = { controller: new AbortController(), lane: C };
4323
4350
  O(w).inFlight.set(k, N), u += 1, C === "bulk" && (l += 1), e.children(w, k, N.controller.signal).then(
4324
4351
  (z) => A(w, k, N, z),
4325
- () => A(w, k, N, Sd)
4352
+ () => A(w, k, N, Nd)
4326
4353
  );
4327
4354
  }, _ = () => {
4328
- for (; u < ro; ) {
4355
+ for (; u < io; ) {
4329
4356
  const w = x("direct");
4330
4357
  if (w !== null) {
4331
4358
  I(w.sourceId, w.path, "direct");
4332
4359
  continue;
4333
4360
  }
4334
- const k = l < Ed ? x("bulk") : null;
4361
+ const k = l < Ad ? x("bulk") : null;
4335
4362
  if (k === null) return;
4336
4363
  I(k.sourceId, k.path, "bulk");
4337
4364
  }
@@ -4356,7 +4383,7 @@ const jc = /* @__PURE__ */ E.forwardRef(zc), Vc = ({ href: e, onRetry: t, testId
4356
4383
  t.set(w, m($e(e.tree(w)), k));
4357
4384
  }, M = (w, k, C) => {
4358
4385
  D(w);
4359
- const N = m(hr(k), C);
4386
+ const N = m(wr(k), C);
4360
4387
  return t.set(w, N), r.delete(w), y(), _(), N;
4361
4388
  }, P = (w, k, C, N) => {
4362
4389
  if (C !== T(w) || t.get(w) !== k) return;
@@ -4377,7 +4404,7 @@ const jc = /* @__PURE__ */ E.forwardRef(zc), Vc = ({ href: e, onRetry: t, testId
4377
4404
  e.tree(w).then((N) => P(w, k, C, N));
4378
4405
  };
4379
4406
  return {
4380
- read: (w) => t.get(w)?.promise ?? kd,
4407
+ read: (w) => t.get(w)?.promise ?? Md,
4381
4408
  open: (w) => {
4382
4409
  const k = n.resumes(w), C = n.hold(w), N = t.get(w);
4383
4410
  return N === void 0 || H(w, "deferred") ? (L(w, !0), y()) : k || (N.opened && H(w, "error") ? (L(w, !0), y()) : (N.opened = !0, N.stale && H(w, "ok") && K(w, N))), C;
@@ -4387,8 +4414,8 @@ const jc = /* @__PURE__ */ E.forwardRef(zc), Vc = ({ href: e, onRetry: t, testId
4387
4414
  },
4388
4415
  seed: (w, k) => {
4389
4416
  const C = k.then(
4390
- (W) => W === null ? Dt : W,
4391
- () => Dt
4417
+ (W) => W === null ? It : W,
4418
+ () => It
4392
4419
  ), N = t.get(w);
4393
4420
  if (N !== void 0 && H(w, "ok")) {
4394
4421
  const W = T(w);
@@ -4405,7 +4432,7 @@ const jc = /* @__PURE__ */ E.forwardRef(zc), Vc = ({ href: e, onRetry: t, testId
4405
4432
  const k = (s.get(w) ?? 0) + 1;
4406
4433
  s.set(w, k);
4407
4434
  const C = await e.refresh(w);
4408
- if (s.get(w) !== k) return yd;
4435
+ if (s.get(w) !== k) return Ld;
4409
4436
  if (C.status === "error") return { status: "failed", failure: C.failure };
4410
4437
  const N = t.get(w);
4411
4438
  if (!(N !== void 0 && N.loadedAt !== null && H(w, "ok") && N.loadedAt > C.loadedAt)) {
@@ -4417,14 +4444,14 @@ const jc = /* @__PURE__ */ E.forwardRef(zc), Vc = ({ href: e, onRetry: t, testId
4417
4444
  }
4418
4445
  for (const [W, J] of t)
4419
4446
  W !== w && Ae(J.promise)?.status === "ok" && (J.stale = !0);
4420
- return bd;
4447
+ return Od;
4421
4448
  },
4422
4449
  children: (w, k) => r.get(w)?.get(k),
4423
4450
  claimChildren: (w, k) => {
4424
4451
  const C = O(w), N = p(w);
4425
4452
  let z = !1, W = !1;
4426
4453
  for (const [G, ie] of k)
4427
- C.claims.set(G, (C.claims.get(G) ?? 0) + 1), N.get(G) === void 0 ? (N.set(G, jn), C[ie].add(G), z = !0, W = !0) : ie === "direct" && C.bulk.delete(G) && (C.direct.add(G), W = !0);
4454
+ C.claims.set(G, (C.claims.get(G) ?? 0) + 1), N.get(G) === void 0 ? (N.set(G, Wn), C[ie].add(G), z = !0, W = !0) : ie === "direct" && C.bulk.delete(G) && (C.direct.add(G), W = !0);
4428
4455
  z && y(), W && _();
4429
4456
  let J = !1;
4430
4457
  return () => {
@@ -4443,7 +4470,7 @@ const jc = /* @__PURE__ */ E.forwardRef(zc), Vc = ({ href: e, onRetry: t, testId
4443
4470
  if (C === void 0 || C.get(k)?.status !== "failed") return;
4444
4471
  const N = O(w);
4445
4472
  if ((N.claims.get(k) ?? 0) > 0) {
4446
- C.set(k, jn), N.direct.add(k), y(), _();
4473
+ C.set(k, Wn), N.direct.add(k), y(), _();
4447
4474
  return;
4448
4475
  }
4449
4476
  C.delete(k), y();
@@ -4463,7 +4490,7 @@ const jc = /* @__PURE__ */ E.forwardRef(zc), Vc = ({ href: e, onRetry: t, testId
4463
4490
  subscribe: i.subscribe,
4464
4491
  version: () => v
4465
4492
  };
4466
- }, Td = (e, t) => {
4493
+ }, Pd = (e, t) => {
4467
4494
  let n = e;
4468
4495
  const r = qe();
4469
4496
  return {
@@ -4473,66 +4500,66 @@ const jc = /* @__PURE__ */ E.forwardRef(zc), Vc = ({ href: e, onRetry: t, testId
4473
4500
  n = { ...n, ...o }, t(n), r.emit();
4474
4501
  }
4475
4502
  };
4476
- }, Rd = 1;
4503
+ }, Id = 1;
4477
4504
  let We = 0, he = null;
4478
- const Cd = () => {
4505
+ const $d = () => {
4479
4506
  const { documentElement: e, body: t } = document;
4480
4507
  We === 0 && (he = { htmlOverflow: e.style.overflow, bodyOverflow: t.style.overflow, htmlGutter: e.style.scrollbarGutter, bodyGutter: t.style.scrollbarGutter }, e.style.overflow = "hidden", t.style.overflow = "hidden", e.style.scrollbarGutter = "auto", t.style.scrollbarGutter = "auto"), We += 1;
4481
4508
  let n = !1;
4482
4509
  return () => {
4483
4510
  n || (n = !0, We -= 1, !(We > 0 || he === null) && (e.style.overflow = he.htmlOverflow, t.style.overflow = he.bodyOverflow, e.style.scrollbarGutter = he.htmlGutter, t.style.scrollbarGutter = he.bodyGutter, he = null));
4484
4511
  };
4485
- }, Od = [
4512
+ }, _d = [
4486
4513
  { selector: '[data-aqmx-document-flow="fill"]', name: "document region" },
4487
4514
  { selector: "[data-aqmx-explorer-body]", name: "tree area" }
4488
- ], Vn = 1, Ld = 1e3, Zn = (e) => e.getClientRects().length > 0, St = "Give the explorer's container a definite block size (for example height: 100dvh, or a flex column of definite height whose item has flex: 1 and min-height: 0; in a fresh React Router app also html and body at height: 100%) instead of an auto or only a minimum height.", Md = (e) => {
4489
- if (!Zn(e)) return null;
4515
+ ], Gn = 1, Fd = 1e3, Kn = (e) => e.getClientRects().length > 0, xt = "Give the explorer's container a definite block size (for example height: 100dvh, or a flex column of definite height whose item has flex: 1 and min-height: 0; in a fresh React Router app also html and body at height: 100%) instead of an auto or only a minimum height.", qd = (e) => {
4516
+ if (!Kn(e)) return null;
4490
4517
  const t = e.getBoundingClientRect(), n = window.innerHeight;
4491
- if (t.bottom > n + Rd)
4492
- return `[markdown-explorer] the explorer ends ${String(Math.round(t.bottom))}px down a ${String(n)}px viewport while lockDocumentScroll stops the page from scrolling, so the rest cannot be reached. ${St}`;
4493
- if (t.height < Vn)
4494
- return `[markdown-explorer] the explorer collapsed to ${String(Math.round(t.height))}px while lockDocumentScroll stops the page from scrolling, so nothing can be read. ${St}`;
4495
- for (const { selector: r, name: o } of Od)
4518
+ if (t.bottom > n + Id)
4519
+ return `[markdown-explorer] the explorer ends ${String(Math.round(t.bottom))}px down a ${String(n)}px viewport while lockDocumentScroll stops the page from scrolling, so the rest cannot be reached. ${xt}`;
4520
+ if (t.height < Gn)
4521
+ return `[markdown-explorer] the explorer collapsed to ${String(Math.round(t.height))}px while lockDocumentScroll stops the page from scrolling, so nothing can be read. ${xt}`;
4522
+ for (const { selector: r, name: o } of _d)
4496
4523
  for (const s of e.querySelectorAll(r)) {
4497
- if (!Zn(s)) continue;
4524
+ if (!Kn(s)) continue;
4498
4525
  const a = s.getBoundingClientRect().height;
4499
- if (a < Vn)
4500
- return `[markdown-explorer] the explorer's ${o} collapsed to ${String(Math.round(a))}px while lockDocumentScroll stops the page from scrolling, so it cannot be read. ${St}`;
4526
+ if (a < Gn)
4527
+ return `[markdown-explorer] the explorer's ${o} collapsed to ${String(Math.round(a))}px while lockDocumentScroll stops the page from scrolling, so it cannot be read. ${xt}`;
4501
4528
  }
4502
4529
  return null;
4503
- }, Ad = (e) => {
4530
+ }, Bd = (e) => {
4504
4531
  let t = !1, n;
4505
4532
  const r = () => {
4506
4533
  n = void 0;
4507
- const a = Md(e);
4534
+ const a = qd(e);
4508
4535
  a !== null && (t = !0, console.error(a));
4509
4536
  }, o = () => {
4510
- t || (clearTimeout(n), n = setTimeout(r, Ld));
4537
+ t || (clearTimeout(n), n = setTimeout(r, Fd));
4511
4538
  }, s = typeof ResizeObserver > "u" ? null : new ResizeObserver(o);
4512
4539
  return s?.observe(e), window.addEventListener("resize", o), o(), () => {
4513
4540
  clearTimeout(n), s?.disconnect(), window.removeEventListener("resize", o);
4514
4541
  };
4515
- }, Nd = (e, t) => {
4516
- ee(() => e ? Cd() : void 0, [e]), ee(() => {
4542
+ }, Ud = (e, t) => {
4543
+ ee(() => e ? $d() : void 0, [e]), ee(() => {
4517
4544
  const n = t.current;
4518
4545
  if (!(!e || n === null))
4519
- return Ad(n);
4546
+ return Bd(n);
4520
4547
  }, [e, t]);
4521
- }, Wn = '[data-testid="markdown-explorer-view-switch"]', Dd = [
4522
- { control: Wn, successors: [Wn, '[data-testid="markdown-explorer-sheet-toggle"]'] },
4548
+ }, Yn = '[data-testid="markdown-explorer-view-switch"]', Hd = [
4549
+ { control: Yn, successors: [Yn, '[data-testid="markdown-explorer-sheet-toggle"]'] },
4523
4550
  { control: '[data-testid="markdown-explorer-selection-open"]', successors: ['[data-testid="markdown-explorer-panel-frame"]'] }
4524
- ], Pd = (e) => {
4525
- for (const t of Dd) {
4551
+ ], zd = (e) => {
4552
+ for (const t of Hd) {
4526
4553
  const n = e.closest(t.control);
4527
4554
  if (n !== null) return { element: n, control: t };
4528
4555
  }
4529
4556
  return null;
4530
- }, Id = (e, t) => {
4557
+ }, jd = (e, t) => {
4531
4558
  const n = U(null);
4532
4559
  ee(() => {
4533
4560
  const o = (i) => {
4534
4561
  const f = e.current;
4535
- n.current = f !== null && i instanceof Element && f.contains(i) ? Pd(i) : null;
4562
+ n.current = f !== null && i instanceof Element && f.contains(i) ? zd(i) : null;
4536
4563
  }, s = (i) => o(i.target);
4537
4564
  o(document.activeElement);
4538
4565
  const a = (i) => {
@@ -4570,37 +4597,37 @@ const Cd = () => {
4570
4597
  });
4571
4598
  return i.observe(a, { childList: !0, subtree: !0 }), () => i.disconnect();
4572
4599
  }, [t, e]);
4573
- }, $d = Pt(() => import("./TreeLayout-C8TuS9ue.js").then((e) => ({ default: e.TreeLayout }))), _d = Pt(() => import("./MultiLayout-DpxzsXKz.js").then((e) => ({ default: e.MultiLayout }))), Fd = 64, qd = {
4600
+ }, Vd = $t(() => import("./TreeLayout-C4l591Nc.js").then((e) => ({ default: e.TreeLayout }))), Zd = $t(() => import("./MultiLayout-Pf-6yPif.js").then((e) => ({ default: e.MultiLayout }))), Wd = 64, Gd = {
4574
4601
  request: (e) => {
4575
4602
  requestAnimationFrame(e);
4576
4603
  }
4577
- }, Gn = (e) => {
4604
+ }, Xn = (e) => {
4578
4605
  e.documents.clear(), e.trees.clear();
4579
- }, xt = (e, t) => {
4606
+ }, Tt = (e, t) => {
4580
4607
  t.tree !== null && e.trees.seed(t.tree.sourceId, t.tree.result);
4581
4608
  for (const { path: n, document: r } of t.documents) e.documents.seed(n, r);
4582
- }, Bd = (e, t) => {
4583
- const [n, r] = V(() => ({ overrides: t, locale: e, labels: dn(e, t) }));
4584
- if (n.locale === e && gs(n.overrides, t)) return n.labels;
4585
- const o = { overrides: t, locale: e, labels: dn(e, t) };
4609
+ }, Kd = (e, t) => {
4610
+ const [n, r] = V(() => ({ overrides: t, locale: e, labels: mn(e, t) }));
4611
+ if (n.locale === e && ys(n.overrides, t)) return n.labels;
4612
+ const o = { overrides: t, locale: e, labels: mn(e, t) };
4586
4613
  return r(o), o.labels;
4587
- }, Ud = (e, t, n) => {
4588
- const [r, o] = V(() => ({ scope: t, store: zn(e, n) }));
4614
+ }, Yd = (e, t, n) => {
4615
+ const [r, o] = V(() => ({ scope: t, store: Zn(e, n) }));
4589
4616
  if (r.scope === t && r.store.storageKey === e && r.store.defaults === n) return r.store;
4590
- const s = { scope: t, store: zn(e, n) };
4617
+ const s = { scope: t, store: Zn(e, n) };
4591
4618
  return o(s), s.store;
4592
- }, Tt = (e, t) => {
4619
+ }, Rt = (e, t) => {
4593
4620
  const [n, r] = V(() => ({ scope: e, value: t() }));
4594
4621
  if (n.scope === e) return n.value;
4595
4622
  const o = { scope: e, value: t() };
4596
4623
  return r(o), o.value;
4597
- }, Hd = () => pd(qd), Kn = "on", zd = "off", jd = Object.freeze({ kind: "unavailable" }), Vd = (e) => {
4624
+ }, Xd = () => xd(Gd), Jn = "on", Jd = "off", Qd = Object.freeze({ kind: "unavailable" }), eu = (e) => {
4598
4625
  if (e !== void 0 && (e === null || typeof e != "object" || typeof e.convert != "function"))
4599
4626
  throw new TypeError("[markdown-explorer] draftConverter must be an object with a convert function");
4600
- }, Zd = (e, t) => {
4627
+ }, tu = (e, t) => {
4601
4628
  const n = ge(e.peek(t));
4602
4629
  return n === null || n.document.kind === "failure" ? fe(t) : n.document.name;
4603
- }, mu = ({
4630
+ }, Eu = ({
4604
4631
  data: e,
4605
4632
  config: t,
4606
4633
  storageNamespace: n,
@@ -4614,24 +4641,24 @@ const Cd = () => {
4614
4641
  onEditGrant: l,
4615
4642
  draftConverter: d
4616
4643
  }) => {
4617
- as(n), Vd(d);
4618
- const h = ir(r), g = ws(s), v = Bd(h, o), { revalidate: y } = yo(), T = U(() => {
4644
+ ds(n), eu(d);
4645
+ const h = dr(r), g = ks(s), v = Kd(h, o), { revalidate: y } = xo(), T = U(() => {
4619
4646
  }), O = nt(t.dataPath), [R] = V(() => {
4620
- const C = gd({ dataPath: O, onScope: (z) => T.current(z) }), N = { documents: ba({ client: C, capacity: Math.max(Fd, t.multiView.maxPanels * 2) }), trees: xd(C) };
4621
- return xt(N, e), ln(n, e.scope), { data: C, ...N, aligned: { pageData: e, storageNamespace: n, pendingReader: null } };
4647
+ const C = Td({ dataPath: O, onScope: (z) => T.current(z) }), N = { documents: Oa({ client: C, capacity: Math.max(Wd, t.multiView.maxPanels * 2) }), trees: Dd(C) };
4648
+ return Tt(N, e), un(n, e.scope), { data: C, ...N, aligned: { pageData: e, storageNamespace: n, pendingReader: null } };
4622
4649
  });
4623
4650
  if (R.aligned.pageData !== e || R.aligned.storageNamespace !== n) {
4624
4651
  const C = R.aligned.pageData;
4625
- R.aligned.pageData = e, R.aligned.storageNamespace = n, C !== e && (C.scope !== e.scope ? R.aligned.pendingReader = e : xt(R, e)), ln(n, e.scope);
4652
+ R.aligned.pageData = e, R.aligned.storageNamespace = n, C !== e && (C.scope !== e.scope ? R.aligned.pendingReader = e : Tt(R, e)), un(n, e.scope);
4626
4653
  }
4627
- const q = Ud(Oe(n).treeSettings, e.scope, t.defaultTreeSettings);
4654
+ const q = Yd(Oe(n).treeSettings, e.scope, t.defaultTreeSettings);
4628
4655
  Y(() => {
4629
4656
  const C = R.aligned.pendingReader;
4630
- C !== null && (R.aligned.pendingReader = null, Gn(R), xt(R, C));
4657
+ C !== null && (R.aligned.pendingReader = null, Xn(R), Tt(R, C));
4631
4658
  }, [e, R]), Y(() => {
4632
4659
  let C = !1;
4633
4660
  return T.current = (N) => {
4634
- N === e.scope || C || (C = !0, N !== null && (Gn(R), is(n)), y());
4661
+ N === e.scope || C || (C = !0, N !== null && (Xn(R), us(n)), y());
4635
4662
  }, () => {
4636
4663
  T.current = () => {
4637
4664
  };
@@ -4642,34 +4669,34 @@ const Cd = () => {
4642
4669
  D.current = t.settingsCookie;
4643
4670
  }, [t.settingsCookie]);
4644
4671
  const [m] = V(
4645
- () => Td(e.settings, (C) => {
4646
- document.cookie = Po(D.current, C, window.location.protocol === "https:");
4672
+ () => Pd(e.settings, (C) => {
4673
+ document.cookie = Fo(D.current, C, window.location.protocol === "https:");
4647
4674
  })
4648
- ), p = Tt(e.scope, Hd), x = Tt(e.scope, wd), A = U(v);
4675
+ ), p = Rt(e.scope, Xd), x = Rt(e.scope, Rd), A = U(v);
4649
4676
  Y(() => {
4650
4677
  A.current = v;
4651
4678
  }, [v]);
4652
- const I = Tt(
4679
+ const I = Rt(
4653
4680
  e.scope,
4654
- () => Os({
4681
+ () => Ns({
4655
4682
  data: R.data,
4656
4683
  conflictLabels: () => ({ ours: A.current.conflictOurs, theirs: A.current.conflictTheirs }),
4657
4684
  onSaveSettled: (C, N) => {
4658
4685
  N.kind === "saved" && R.documents.refresh(C);
4659
- const z = bs(A.current, N, Zd(R.documents, C));
4686
+ const z = Ss(A.current, N, tu(R.documents, C));
4660
4687
  z !== null && p.announce(z);
4661
4688
  },
4662
4689
  sideBySideSetting: {
4663
- read: () => Ct(Oe(n).editPreview) === Kn,
4664
- write: (C) => Rt(Oe(n).editPreview, C ? Kn : zd)
4690
+ read: () => Ot(Oe(n).editPreview) === Jn,
4691
+ write: (C) => Ct(Oe(n).editPreview, C ? Jn : Jd)
4665
4692
  },
4666
4693
  editorShareSetting: {
4667
- read: () => Cs(Ct(Oe(n).editSplit)),
4668
- write: (C) => Rt(Oe(n).editSplit, String(C))
4694
+ read: () => As(Ot(Oe(n).editSplit)),
4695
+ write: (C) => Ct(Oe(n).editSplit, String(C))
4669
4696
  }
4670
4697
  })
4671
4698
  ), _ = X(() => $e(e.notices.catch(() => [])), [e.notices]), b = e.sources.map((C) => C.id).join(`
4672
- `), S = X(() => Do(t, b.split(`
4699
+ `), S = X(() => _o(t, b.split(`
4673
4700
  `)), [t, b]), L = U(u);
4674
4701
  Y(() => {
4675
4702
  L.current = u;
@@ -4685,7 +4712,7 @@ const Cd = () => {
4685
4712
  return {
4686
4713
  convert: (N, z) => {
4687
4714
  const W = H.current;
4688
- return W === void 0 ? Promise.resolve(jd) : W.convert(N, z);
4715
+ return W === void 0 ? Promise.resolve(Qd) : W.convert(N, z);
4689
4716
  },
4690
4717
  prepare: () => {
4691
4718
  try {
@@ -4721,85 +4748,86 @@ const Cd = () => {
4721
4748
  }),
4722
4749
  [S, v, h, g, n, e.scope, e.sources, _, R, m, q, p, x, I, l, w, i, P]
4723
4750
  );
4724
- return /* @__PURE__ */ c(lr, { value: k, children: /* @__PURE__ */ c(Gd, { renderFrame: a, lockDocumentScroll: f }, e.scope) });
4725
- }, Wd = ({ ref: e, theme: t, view: n, children: r }) => {
4726
- const [o] = V(ii);
4751
+ return /* @__PURE__ */ c(ur, { value: k, children: /* @__PURE__ */ c(ru, { renderFrame: a, lockDocumentScroll: f }, e.scope) });
4752
+ }, nu = ({ ref: e, theme: t, view: n, children: r }) => {
4753
+ const [o] = V(gi);
4727
4754
  return /* @__PURE__ */ c("div", { ref: e, className: "aqmx-root", "data-aqmx-theme": t, "data-aqmx-view": n, "data-testid": "markdown-explorer", onKeyDownCapture: o.onKeyDownCapture, onKeyUpCapture: o.onKeyUpCapture, onBlurCapture: o.onBlurCapture, children: r });
4728
- }, Gd = ({ renderFrame: e, lockDocumentScroll: t }) => {
4729
- const { theme: n, labels: r } = $(), o = $t(), { hash: s } = Xn(), a = ot(), i = U(null);
4730
- Nd(t, i), Y(() => {
4755
+ }, ru = ({ renderFrame: e, lockDocumentScroll: t }) => {
4756
+ const { theme: n, labels: r } = $(), o = Ft(), { hash: s } = er(), a = ot(), i = U(null);
4757
+ Ud(t, i), Y(() => {
4731
4758
  o.kind === "redirect" && a(`${o.href}${s}`, "browse");
4732
4759
  }, [o, s, a]);
4733
4760
  const { location: f } = o, u = f.view;
4734
- Id(i, u);
4735
- const l = f.view === "tree" ? /* @__PURE__ */ c(Ie, { fallback: /* @__PURE__ */ c("section", { className: "aqmx-split-fallback", "aria-label": r.explorerRegion, "aria-busy": "true", "data-testid": "markdown-explorer-split-loading", ...Ot }), children: /* @__PURE__ */ c($d, { location: f }) }) : f.view === "multi" ? /* @__PURE__ */ c(Ie, { fallback: /* @__PURE__ */ c("section", { className: "aqmx-stage-fallback", "aria-label": r.multiRegion, "aria-busy": "true", "data-testid": "markdown-explorer-stage-loading", ...Ot }), children: /* @__PURE__ */ c(_d, { location: f }) }) : /* @__PURE__ */ c(md, { location: f }), d = /* @__PURE__ */ B(Wd, { ref: i, theme: n, view: u, children: [
4761
+ jd(i, u);
4762
+ const l = f.view === "tree" ? /* @__PURE__ */ c(Ie, { fallback: /* @__PURE__ */ c("section", { className: "aqmx-split-fallback", "aria-label": r.explorerRegion, "aria-busy": "true", "data-testid": "markdown-explorer-split-loading", ...Lt }), children: /* @__PURE__ */ c(Vd, { location: f }) }) : f.view === "multi" ? /* @__PURE__ */ c(Ie, { fallback: /* @__PURE__ */ c("section", { className: "aqmx-stage-fallback", "aria-label": r.multiRegion, "aria-busy": "true", "data-testid": "markdown-explorer-stage-loading", ...Lt }), children: /* @__PURE__ */ c(Zd, { location: f }) }) : /* @__PURE__ */ c(Ed, { location: f }), d = /* @__PURE__ */ B(nu, { ref: i, theme: n, view: u, children: [
4736
4763
  l,
4737
- /* @__PURE__ */ c(Zs, {}),
4738
- /* @__PURE__ */ c(hd, { holds: !0, testId: "markdown-explorer-announcer" })
4764
+ /* @__PURE__ */ c(Ys, {}),
4765
+ /* @__PURE__ */ c(Sd, { holds: !0, testId: "markdown-explorer-announcer" })
4739
4766
  ] });
4740
4767
  return e === void 0 ? d : e({ view: u, children: d });
4741
- }, hu = ls({ submissions: "skip", otherPath: "skip", query: "skip", hashChange: "skip" });
4768
+ }, Su = fs({ submissions: "skip", otherPath: "skip", query: "skip", hashChange: "skip" });
4742
4769
  export {
4743
- cs as $,
4744
- At as A,
4745
- dr as B,
4746
- ys as C,
4747
- fd as D,
4748
- Vc as E,
4749
- $s as F,
4750
- Yc as G,
4751
- Kc as H,
4752
- Bn as I,
4753
- Gc as J,
4754
- qe as K,
4755
- cu as L,
4756
- ci as M,
4757
- du as N,
4758
- Ls as O,
4759
- ud as P,
4760
- vr as Q,
4761
- ga as R,
4762
- Er as S,
4763
- uu as T,
4764
- Lc as U,
4765
- ma as V,
4766
- Bc as W,
4767
- fa as X,
4768
- $t as Y,
4769
- hd as Z,
4770
- Je as _,
4771
- ks as a,
4772
- un as a0,
4773
- ms as a1,
4774
- ar as a2,
4775
- ds as a3,
4776
- cn as a4,
4777
- mu as a5,
4778
- dn as a6,
4779
- hu as a7,
4780
- Es as b,
4781
- yr as c,
4782
- ot as d,
4783
- dc as e,
4784
- Hi as f,
4785
- Ot as g,
4786
- Cc as h,
4787
- aa as i,
4788
- Ss as j,
4789
- da as k,
4790
- ua as l,
4791
- sa as m,
4792
- de as n,
4793
- ge as o,
4794
- ra as p,
4795
- oa as q,
4796
- qs as r,
4797
- Re as s,
4798
- Ce as t,
4770
+ Je as $,
4771
+ ku as A,
4772
+ Dt as B,
4773
+ xs as C,
4774
+ kd as D,
4775
+ ed as E,
4776
+ Bs as F,
4777
+ mr as G,
4778
+ sd as H,
4779
+ od as I,
4780
+ zn as J,
4781
+ rd as K,
4782
+ qe as L,
4783
+ vu as M,
4784
+ bu as N,
4785
+ vi as O,
4786
+ yd as P,
4787
+ Ds as Q,
4788
+ kr as R,
4789
+ ya as S,
4790
+ yu as T,
4791
+ xr as U,
4792
+ Fc as V,
4793
+ wa as W,
4794
+ Kc as X,
4795
+ ga as Y,
4796
+ Ft as Z,
4797
+ Sd as _,
4798
+ Ts as a,
4799
+ ms as a0,
4800
+ hn as a1,
4801
+ ws as a2,
4802
+ cr as a3,
4803
+ hs as a4,
4804
+ fn as a5,
4805
+ Eu as a6,
4806
+ mn as a7,
4807
+ Su as a8,
4808
+ Rs as b,
4809
+ Ut as c,
4810
+ ka as d,
4811
+ ot as e,
4812
+ bc as f,
4813
+ Xi as g,
4814
+ Lt as h,
4815
+ $c as i,
4816
+ da as j,
4817
+ Cs as k,
4818
+ ha as l,
4819
+ pa as m,
4820
+ ca as n,
4821
+ de as o,
4822
+ ge as p,
4823
+ ia as q,
4824
+ zs as r,
4825
+ la as s,
4826
+ Re as t,
4799
4827
  $ as u,
4800
- ia as v,
4801
- js as w,
4802
- Wc as x,
4803
- lu as y,
4804
- fu as z
4828
+ ua as v,
4829
+ Ce as w,
4830
+ Gs as x,
4831
+ nd as y,
4832
+ wu as z
4805
4833
  };