@aiquants/markdown-explorer 0.14.0 → 0.16.0

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.
Files changed (60) hide show
  1. package/CHANGELOG.md +111 -0
  2. package/README.md +60 -12
  3. package/dist/EditSurface-CwKsTS11.cjs +2 -0
  4. package/dist/EditSurface-DGMLY7Gh.js +786 -0
  5. package/dist/ExplorerSplit-BLOaU5fE.cjs +1 -0
  6. package/dist/{ExplorerSplit-BPLECNpv.js → ExplorerSplit-tUCp0XdJ.js} +613 -592
  7. package/dist/MultiLayout-BBP2ajz8.cjs +1 -0
  8. package/dist/MultiLayout-DYy66vcO.js +963 -0
  9. package/dist/{NativeScrollBar-BUWXPvTV.cjs → NativeScrollBar-BkFg1EcW.cjs} +1 -1
  10. package/dist/{NativeScrollBar-BFF12oEd.js → NativeScrollBar-Dazd542j.js} +1 -1
  11. package/dist/TreeLayout-C8s5lBH_.cjs +1 -0
  12. package/dist/TreeLayout-CXX-rFO6.js +72 -0
  13. package/dist/client/storage.d.cts +1 -0
  14. package/dist/client/storage.d.ts +1 -0
  15. package/dist/core/geometry.d.cts +20 -1
  16. package/dist/core/geometry.d.ts +20 -1
  17. package/dist/core/labels.d.cts +7 -0
  18. package/dist/core/labels.d.ts +7 -0
  19. package/dist/core/location.d.cts +3 -0
  20. package/dist/core/location.d.ts +3 -0
  21. package/dist/core/treeSettings.d.cts +3 -1
  22. package/dist/core/treeSettings.d.ts +3 -1
  23. package/dist/index-DTKGgaok.js +3613 -0
  24. package/dist/index-DffJZ8-y.cjs +13 -0
  25. package/dist/index.cjs +1 -1
  26. package/dist/index.js +25 -25
  27. package/dist/location-D85EXiPt.cjs +1 -0
  28. package/dist/location-G7psbmv_.js +499 -0
  29. package/dist/{merge-Bi2VedIr.js → merge-BkFru0eg.js} +5 -5
  30. package/dist/{merge-BFk7nT59.cjs → merge-SRws1-Zj.cjs} +1 -1
  31. package/dist/server/ports.d.cts +8 -1
  32. package/dist/server/ports.d.ts +8 -1
  33. package/dist/server.cjs +1 -1
  34. package/dist/server.d.cts +1 -1
  35. package/dist/server.d.ts +1 -1
  36. package/dist/server.js +512 -499
  37. package/dist/{storage-BSthKLSG.js → storage-CmGHg7OA.js} +11 -10
  38. package/dist/storage-DM0EvkVf.cjs +1 -0
  39. package/dist/storage.cjs +1 -1
  40. package/dist/storage.js +1 -1
  41. package/dist/styles/markdown-explorer.css +1 -1
  42. package/dist/useSplitPersistence-B1b5Lg5E.js +42 -0
  43. package/dist/useSplitPersistence-DRjsPZdH.cjs +1 -0
  44. package/docs/behavior/dom-hooks.md +15 -10
  45. package/docs/behavior/layout.md +53 -14
  46. package/docs/behavior/localization.md +2 -1
  47. package/docs/behavior/url-contract.md +18 -6
  48. package/package.json +12 -10
  49. package/dist/EditSurface-BLlu5zEt.cjs +0 -2
  50. package/dist/EditSurface-CF2io496.js +0 -705
  51. package/dist/ExplorerSplit-Cjvy0JHP.cjs +0 -1
  52. package/dist/MultiLayout-BjA0k-5n.cjs +0 -1
  53. package/dist/MultiLayout-D8F0BfxA.js +0 -947
  54. package/dist/TreeLayout-CQUpgsxz.cjs +0 -1
  55. package/dist/TreeLayout-rhyVTfrI.js +0 -29
  56. package/dist/index-Dn7cYy-4.cjs +0 -13
  57. package/dist/index-v997iKxe.js +0 -3464
  58. package/dist/location-D6RE3wAN.cjs +0 -1
  59. package/dist/location-IRD9h42r.js +0 -444
  60. package/dist/storage-Dgi4JXaB.cjs +0 -1
@@ -1,19 +1,20 @@
1
- import { jsx as m, jsxs as O, Fragment as Xe } from "react/jsx-runtime";
2
- import { u as D, F as Nt, H as Oe, G as Ye, J as Lt, s as Ae, K as kt, M as Ot, j as At, N as Pt, O as qt, Q as Ct } from "./index-v997iKxe.js";
3
- import * as p from "react";
4
- import { use as be, createContext as Pe, useState as q, useCallback as w, useMemo as F, useRef as g, useLayoutEffect as I, useEffect as _, useSyncExternalStore as Ee, Suspense as Qe, useId as ye } from "react";
5
- import { C as Ft, k as Mt, l as Je, v as _t, m as It, n as Dt, E as Ht, o as Be, q as $t, s as Zt, S as ve, t as Bt, F as zt, A as Vt } from "./location-IRD9h42r.js";
1
+ import { jsx as m, jsxs as L, Fragment as Qe } from "react/jsx-runtime";
2
+ import { u as $, p as kt, O as Oe, L as Je, Q as At, x as Pe, R as Lt, S as Ot, k as Pt, T as qt, U as Ct, V as Ft } from "./index-DTKGgaok.js";
3
+ import * as f from "react";
4
+ import { use as ye, createContext as qe, useState as F, useCallback as w, useMemo as C, useRef as E, useLayoutEffect as H, useEffect as D, useSyncExternalStore as Ce, Suspense as et, useId as Re } from "react";
5
+ import { n as Mt, o as _t, q as tt, v as It, s as Dt, t as Ht, C as $t, F as Zt, u as Ve, x as Bt, y as zt, b as Ee, A as Vt } from "./location-G7psbmv_.js";
6
6
  import { useDirectoryTreeState as jt, DirectoryTree as Kt } from "@aiquants/directory-tree";
7
- import { T as Gt } from "./tapScrollCircle-u4EXeLhx.js";
8
- import { s as Ut } from "./storage-BSthKLSG.js";
9
- import { PanelGroup as Wt, Panel as ze, PanelResizeHandle as Xt } from "@aiquants/resize-panels";
10
- import { useLocation as Yt } from "react-router";
11
- function Qt({
7
+ import { T as Ut } from "./tapScrollCircle-u4EXeLhx.js";
8
+ import { s as Gt } from "./storage-CmGHg7OA.js";
9
+ import { PanelGroup as Wt, Panel as je, PanelResizeHandle as Xt } from "@aiquants/resize-panels";
10
+ import { a as Yt, u as Qt } from "./useSplitPersistence-B1b5Lg5E.js";
11
+ import { useLocation as Jt } from "react-router";
12
+ function en({
12
13
  title: e,
13
14
  titleId: t,
14
15
  ...n
15
16
  }, r) {
16
- return /* @__PURE__ */ p.createElement("svg", Object.assign({
17
+ return /* @__PURE__ */ f.createElement("svg", Object.assign({
17
18
  xmlns: "http://www.w3.org/2000/svg",
18
19
  viewBox: "0 0 24 24",
19
20
  fill: "currentColor",
@@ -21,21 +22,21 @@ function Qt({
21
22
  "data-slot": "icon",
22
23
  ref: r,
23
24
  "aria-labelledby": t
24
- }, n), e ? /* @__PURE__ */ p.createElement("title", {
25
+ }, n), e ? /* @__PURE__ */ f.createElement("title", {
25
26
  id: t
26
- }, e) : null, /* @__PURE__ */ p.createElement("path", {
27
+ }, e) : null, /* @__PURE__ */ f.createElement("path", {
27
28
  fillRule: "evenodd",
28
29
  d: "M19.5 21a3 3 0 0 0 3-3V9a3 3 0 0 0-3-3h-5.379a.75.75 0 0 1-.53-.22L11.47 3.66A2.25 2.25 0 0 0 9.879 3H4.5a3 3 0 0 0-3 3v12a3 3 0 0 0 3 3h15ZM9 12.75a.75.75 0 0 0 0 1.5h6a.75.75 0 0 0 0-1.5H9Z",
29
30
  clipRule: "evenodd"
30
31
  }));
31
32
  }
32
- const Jt = /* @__PURE__ */ p.forwardRef(Qt);
33
- function en({
33
+ const tn = /* @__PURE__ */ f.forwardRef(en);
34
+ function nn({
34
35
  title: e,
35
36
  titleId: t,
36
37
  ...n
37
38
  }, r) {
38
- return /* @__PURE__ */ p.createElement("svg", Object.assign({
39
+ return /* @__PURE__ */ f.createElement("svg", Object.assign({
39
40
  xmlns: "http://www.w3.org/2000/svg",
40
41
  viewBox: "0 0 24 24",
41
42
  fill: "currentColor",
@@ -43,21 +44,21 @@ function en({
43
44
  "data-slot": "icon",
44
45
  ref: r,
45
46
  "aria-labelledby": t
46
- }, n), e ? /* @__PURE__ */ p.createElement("title", {
47
+ }, n), e ? /* @__PURE__ */ f.createElement("title", {
47
48
  id: t
48
- }, e) : null, /* @__PURE__ */ p.createElement("path", {
49
+ }, e) : null, /* @__PURE__ */ f.createElement("path", {
49
50
  fillRule: "evenodd",
50
51
  d: "M19.5 21a3 3 0 0 0 3-3V9a3 3 0 0 0-3-3h-5.379a.75.75 0 0 1-.53-.22L11.47 3.66A2.25 2.25 0 0 0 9.879 3H4.5a3 3 0 0 0-3 3v12a3 3 0 0 0 3 3h15Zm-6.75-10.5a.75.75 0 0 0-1.5 0v2.25H9a.75.75 0 0 0 0 1.5h2.25v2.25a.75.75 0 0 0 1.5 0v-2.25H15a.75.75 0 0 0 0-1.5h-2.25V10.5Z",
51
52
  clipRule: "evenodd"
52
53
  }));
53
54
  }
54
- const tn = /* @__PURE__ */ p.forwardRef(en);
55
- function nn({
55
+ const rn = /* @__PURE__ */ f.forwardRef(nn);
56
+ function an({
56
57
  title: e,
57
58
  titleId: t,
58
59
  ...n
59
60
  }, r) {
60
- return /* @__PURE__ */ p.createElement("svg", Object.assign({
61
+ return /* @__PURE__ */ f.createElement("svg", Object.assign({
61
62
  xmlns: "http://www.w3.org/2000/svg",
62
63
  viewBox: "0 0 24 24",
63
64
  fill: "currentColor",
@@ -65,21 +66,21 @@ function nn({
65
66
  "data-slot": "icon",
66
67
  ref: r,
67
68
  "aria-labelledby": t
68
- }, n), e ? /* @__PURE__ */ p.createElement("title", {
69
+ }, n), e ? /* @__PURE__ */ f.createElement("title", {
69
70
  id: t
70
- }, e) : null, /* @__PURE__ */ p.createElement("path", {
71
+ }, e) : null, /* @__PURE__ */ f.createElement("path", {
71
72
  d: "M16.5 6a3 3 0 0 0-3-3H6a3 3 0 0 0-3 3v7.5a3 3 0 0 0 3 3v-6A4.5 4.5 0 0 1 10.5 6h6Z"
72
- }), /* @__PURE__ */ p.createElement("path", {
73
+ }), /* @__PURE__ */ f.createElement("path", {
73
74
  d: "M18 7.5a3 3 0 0 1 3 3V18a3 3 0 0 1-3 3h-7.5a3 3 0 0 1-3-3v-7.5a3 3 0 0 1 3-3H18Z"
74
75
  }));
75
76
  }
76
- const rn = /* @__PURE__ */ p.forwardRef(nn);
77
- function an({
77
+ const ln = /* @__PURE__ */ f.forwardRef(an);
78
+ function on({
78
79
  title: e,
79
80
  titleId: t,
80
81
  ...n
81
82
  }, r) {
82
- return /* @__PURE__ */ p.createElement("svg", Object.assign({
83
+ return /* @__PURE__ */ f.createElement("svg", Object.assign({
83
84
  xmlns: "http://www.w3.org/2000/svg",
84
85
  viewBox: "0 0 24 24",
85
86
  fill: "currentColor",
@@ -87,17 +88,17 @@ function an({
87
88
  "data-slot": "icon",
88
89
  ref: r,
89
90
  "aria-labelledby": t
90
- }, n), e ? /* @__PURE__ */ p.createElement("title", {
91
+ }, n), e ? /* @__PURE__ */ f.createElement("title", {
91
92
  id: t
92
- }, e) : null, /* @__PURE__ */ p.createElement("path", {
93
+ }, e) : null, /* @__PURE__ */ f.createElement("path", {
93
94
  fillRule: "evenodd",
94
95
  d: "M3 6a3 3 0 0 1 3-3h2.25a3 3 0 0 1 3 3v2.25a3 3 0 0 1-3 3H6a3 3 0 0 1-3-3V6Zm9.75 0a3 3 0 0 1 3-3H18a3 3 0 0 1 3 3v2.25a3 3 0 0 1-3 3h-2.25a3 3 0 0 1-3-3V6ZM3 15.75a3 3 0 0 1 3-3h2.25a3 3 0 0 1 3 3V18a3 3 0 0 1-3 3H6a3 3 0 0 1-3-3v-2.25Zm9.75 0a3 3 0 0 1 3-3H18a3 3 0 0 1 3 3V18a3 3 0 0 1-3 3h-2.25a3 3 0 0 1-3-3v-2.25Z",
95
96
  clipRule: "evenodd"
96
97
  }));
97
98
  }
98
- const ln = /* @__PURE__ */ p.forwardRef(an), on = () => {
99
- const { notices: e } = D(), t = be(e);
100
- return t.length === 0 ? null : /* @__PURE__ */ m("div", { className: "aqmx-explorer-notices", children: t.map((n) => /* @__PURE__ */ O("div", { className: "aqmx-callout", "data-aqmx-tone": n.tone, "data-testid": "markdown-explorer-notice", "data-aqmx-notice": n.id, children: [
99
+ const sn = /* @__PURE__ */ f.forwardRef(on), cn = () => {
100
+ const { notices: e } = $(), t = ye(e);
101
+ return t.length === 0 ? null : /* @__PURE__ */ m("div", { className: "aqmx-explorer-notices", children: t.map((n) => /* @__PURE__ */ L("div", { className: "aqmx-callout", "data-aqmx-tone": n.tone, "data-testid": "markdown-explorer-notice", "data-aqmx-notice": n.id, children: [
101
102
  /* @__PURE__ */ m("p", { className: "aqmx-callout-title", children: n.title }),
102
103
  n.body === void 0 ? null : /* @__PURE__ */ m("p", { className: "aqmx-callout-body", children: n.body }),
103
104
  n.action === void 0 ? null : (
@@ -105,12 +106,12 @@ const ln = /* @__PURE__ */ p.forwardRef(an), on = () => {
105
106
  )
106
107
  ] }, n.id)) });
107
108
  };
108
- function sn({
109
+ function dn({
109
110
  title: e,
110
111
  titleId: t,
111
112
  ...n
112
113
  }, r) {
113
- return /* @__PURE__ */ p.createElement("svg", Object.assign({
114
+ return /* @__PURE__ */ f.createElement("svg", Object.assign({
114
115
  xmlns: "http://www.w3.org/2000/svg",
115
116
  viewBox: "0 0 24 24",
116
117
  fill: "currentColor",
@@ -118,15 +119,15 @@ function sn({
118
119
  "data-slot": "icon",
119
120
  ref: r,
120
121
  "aria-labelledby": t
121
- }, n), e ? /* @__PURE__ */ p.createElement("title", {
122
+ }, n), e ? /* @__PURE__ */ f.createElement("title", {
122
123
  id: t
123
- }, e) : null, /* @__PURE__ */ p.createElement("path", {
124
+ }, e) : null, /* @__PURE__ */ f.createElement("path", {
124
125
  fillRule: "evenodd",
125
126
  d: "M6.912 3a3 3 0 0 0-2.868 2.118l-2.411 7.838a3 3 0 0 0-.133.882V18a3 3 0 0 0 3 3h15a3 3 0 0 0 3-3v-4.162c0-.299-.045-.596-.133-.882l-2.412-7.838A3 3 0 0 0 17.088 3H6.912Zm13.823 9.75-2.213-7.191A1.5 1.5 0 0 0 17.088 4.5H6.912a1.5 1.5 0 0 0-1.434 1.059L3.265 12.75H6.11a3 3 0 0 1 2.684 1.658l.256.513a1.5 1.5 0 0 0 1.342.829h3.218a1.5 1.5 0 0 0 1.342-.83l.256-.512a3 3 0 0 1 2.684-1.658h2.844Z",
126
127
  clipRule: "evenodd"
127
128
  }));
128
129
  }
129
- const cn = /* @__PURE__ */ p.forwardRef(sn), qe = Pe(!0), et = "\0loop\0", tt = "\0", dn = () => {
130
+ const un = /* @__PURE__ */ f.forwardRef(dn), Fe = qe(!0), nt = "\0loop\0", rt = "\0", mn = () => {
130
131
  const e = /* @__PURE__ */ new WeakMap(), t = /* @__PURE__ */ new WeakMap(), n = /* @__PURE__ */ new WeakMap(), r = (l) => {
131
132
  const a = e.get(l);
132
133
  if (a !== void 0) return a;
@@ -134,28 +135,28 @@ const cn = /* @__PURE__ */ p.forwardRef(sn), qe = Pe(!0), et = "\0loop\0", tt =
134
135
  return e.set(l, s), s;
135
136
  }, o = (l, a, s) => {
136
137
  let d = !1;
137
- const u = l.map((f) => {
138
- const h = c(f, a, s);
139
- return h !== f && (d = !0), h;
138
+ const u = l.map((p) => {
139
+ const h = c(p, a, s);
140
+ return h !== p && (d = !0), h;
140
141
  });
141
142
  if (!d) return l;
142
143
  const i = n.get(l);
143
- return i !== void 0 && i.length === u.length && i.every((f, h) => f === u[h]) ? i : (n.set(l, u), u);
144
+ return i !== void 0 && i.length === u.length && i.every((p, h) => p === u[h]) ? i : (n.set(l, u), u);
144
145
  }, c = (l, a, s) => {
145
146
  if (l.type !== "directory") return l;
146
147
  if (s.has(l.path)) return r(l);
147
148
  const d = l.lazy === !0 ? a(l.path) : void 0, u = d?.status === "loaded", i = u ? d.entries : l.children;
148
149
  if (i === void 0) return l;
149
150
  s.add(l.path);
150
- const f = o(i, a, s);
151
- if (s.delete(l.path), !u && f === l.children) return l;
151
+ const p = o(i, a, s);
152
+ if (s.delete(l.path), !u && p === l.children) return l;
152
153
  const h = t.get(l);
153
- if (h !== void 0 && h.state === d && h.children === f) return h.grafted;
154
- const v = { ...l, children: f, lazy: u ? !1 : l.lazy };
155
- return t.set(l, { state: d, children: f, grafted: v }), v;
154
+ if (h !== void 0 && h.state === d && h.children === p) return h.grafted;
155
+ const g = { ...l, children: p, lazy: u ? !1 : l.lazy };
156
+ return t.set(l, { state: d, children: p, grafted: g }), g;
156
157
  };
157
158
  return (l, a) => o(l, a, /* @__PURE__ */ new Set());
158
- }, un = (e, t) => `${et}${e}${tt}${t}`, pe = (e) => e.startsWith(et), mn = (e) => e.slice(e.lastIndexOf(tt) + 1), se = "data-aqmx-path", fn = (e, t, n, r, o) => {
159
+ }, fn = (e, t) => `${nt}${e}${rt}${t}`, pe = (e) => e.startsWith(nt), pn = (e) => e.slice(e.lastIndexOf(rt) + 1), ce = "data-aqmx-path", hn = (e, t, n, r, o) => {
159
160
  const c = { aqmxPath: e.path };
160
161
  return e.modifiedAt !== void 0 && (c.aqmxModifiedAt = e.modifiedAt), n && (c.aqmxOpen = !0), (r === "loading" || r === "failed") && (c.aqmxChildren = r), {
161
162
  name: e.name,
@@ -167,41 +168,41 @@ const cn = /* @__PURE__ */ p.forwardRef(sn), qe = Pe(!0), et = "\0loop\0", tt =
167
168
  label: o,
168
169
  data: c
169
170
  };
170
- }, pn = (e, t, n, r) => {
171
- const o = un(t, e.path);
171
+ }, xn = (e, t, n, r) => {
172
+ const o = fn(t, e.path);
172
173
  return { name: n, type: "directory", absolutePath: o, relativePath: o, children: r, data: { aqmxLoop: e.path } };
173
- }, hn = () => {
174
+ }, wn = () => {
174
175
  const e = /* @__PURE__ */ new WeakMap(), t = /* @__PURE__ */ new WeakMap(), n = /* @__PURE__ */ new WeakMap(), r = [], o = (a, s, d) => {
175
- const u = a.map((f) => f.type === "loop" ? c(f, s, d) : l(f, s)), i = n.get(a);
176
- return i !== void 0 && i.length === u.length && i.every((f, h) => f === u[h]) ? i : (n.set(a, u), u);
176
+ const u = a.map((p) => p.type === "loop" ? c(p, s, d) : l(p, s)), i = n.get(a);
177
+ return i !== void 0 && i.length === u.length && i.every((p, h) => p === u[h]) ? i : (n.set(a, u), u);
177
178
  }, c = (a, s, d) => {
178
179
  const u = t.get(a);
179
180
  if (u !== void 0 && u.parentKey === d && u.loopFolderName === s.loopFolderName) return u.row;
180
- const i = pn(a, d, s.loopFolderName(a.name), r);
181
+ const i = xn(a, d, s.loopFolderName(a.name), r);
181
182
  return t.set(a, { row: i, parentKey: d, loopFolderName: s.loopFolderName }), i;
182
183
  }, l = (a, s) => {
183
- const d = a.type === "directory" ? a.children === void 0 ? r : o(a.children, s, a.path) : void 0, u = s.openPaths.has(a.path), i = a.type === "directory" && a.lazy === !0 ? s.childrenOf(a.path)?.status : void 0, f = i === "failed" ? s.renderFailedFolder : void 0, h = e.get(a);
184
- if (h !== void 0 && h.open === u && h.childrenStatus === i && h.children === d && h.renderFailedFolder === f)
184
+ const d = a.type === "directory" ? a.children === void 0 ? r : o(a.children, s, a.path) : void 0, u = s.openPaths.has(a.path), i = a.type === "directory" && a.lazy === !0 ? s.childrenOf(a.path)?.status : void 0, p = i === "failed" ? s.renderFailedFolder : void 0, h = e.get(a);
185
+ if (h !== void 0 && h.open === u && h.childrenStatus === i && h.children === d && h.renderFailedFolder === p)
185
186
  return h.row;
186
- const v = fn(a, d, u, i, f === void 0 ? void 0 : f(a));
187
- return e.set(a, { row: v, open: u, childrenStatus: i, children: d, renderFailedFolder: f }), v;
187
+ const g = hn(a, d, u, i, p === void 0 ? void 0 : p(a));
188
+ return e.set(a, { row: g, open: u, childrenStatus: i, children: d, renderFailedFolder: p }), g;
188
189
  };
189
190
  return (a, s) => o(a, s, "");
190
- }, xn = (e) => {
191
+ }, gn = (e) => {
191
192
  if (e === void 0) return;
192
193
  const t = (n) => {
193
194
  const r = n.data?.aqmxModifiedAt;
194
195
  return typeof r == "number" ? { name: n.name, path: n.absolutePath, type: n.type, modifiedAt: r } : { name: n.name, path: n.absolutePath, type: n.type };
195
196
  };
196
197
  return (n, r) => e(t(n), t(r));
197
- }, ke = (e, t) => {
198
+ }, Le = (e, t) => {
198
199
  const n = e.filter((r) => r.type === "directory");
199
200
  return t === void 0 ? n : n.sort(t);
200
- }, wn = (e, t) => {
201
+ }, vn = (e, t) => {
201
202
  const n = /* @__PURE__ */ new Map();
202
203
  let r = 0;
203
204
  const o = (c) => {
204
- for (const l of ke(c, t.compare))
205
+ for (const l of Le(c, t.compare))
205
206
  if (t.isShownExpanded(l.path)) {
206
207
  if (l.lazy !== !0) {
207
208
  l.children !== void 0 && o(l.children);
@@ -211,21 +212,21 @@ const cn = /* @__PURE__ */ p.forwardRef(sn), qe = Pe(!0), et = "\0loop\0", tt =
211
212
  }
212
213
  };
213
214
  return o(e), { folders: n, waiting: r };
214
- }, gn = (e) => {
215
+ }, bn = (e) => {
215
216
  const t = /* @__PURE__ */ new Set(), n = (r) => {
216
217
  for (const o of r)
217
218
  o.type === "directory" && (o.lazy === !0 && t.add(o.path), o.children !== void 0 && n(o.children));
218
219
  };
219
220
  return n(e), t;
220
- }, nt = (e, t) => {
221
+ }, at = (e, t) => {
221
222
  for (const n of e) {
222
223
  if (n.type !== "directory") continue;
223
224
  if (n.path === t) return n;
224
- const r = n.children === void 0 ? null : nt(n.children, t);
225
+ const r = n.children === void 0 ? null : at(n.children, t);
225
226
  if (r !== null) return r;
226
227
  }
227
228
  return null;
228
- }, vn = (e, t, n, r) => {
229
+ }, En = (e, t, n, r) => {
229
230
  let o = e;
230
231
  for (const c of t) {
231
232
  const l = o.find((a) => a.type === "directory" && a.path === c);
@@ -235,14 +236,14 @@ const cn = /* @__PURE__ */ p.forwardRef(sn), qe = Pe(!0), et = "\0loop\0", tt =
235
236
  o = l.children ?? [];
236
237
  }
237
238
  return o.some((c) => c.type === "file" && c.path === n) ? "ready" : "missing";
238
- }, Ve = /* @__PURE__ */ new Set(), bn = (e, t) => e.has(t) ? e : new Set(e).add(t), En = (e, t) => {
239
+ }, Ke = /* @__PURE__ */ new Set(), yn = (e, t) => e.has(t) ? e : new Set(e).add(t), Rn = (e, t) => {
239
240
  if (!t.some((r) => e.has(r))) return e;
240
241
  const n = new Set(t);
241
242
  return new Set([...e].filter((r) => !n.has(r)));
242
- }, yn = (e, t) => [...e].every((n) => t.has(n)) ? e : new Set([...e].filter((n) => t.has(n))), Rn = () => {
243
- const [e, t] = q(Ve), n = w((l) => t((a) => bn(a, l)), []), r = w((l) => t((a) => En(a, l)), []), o = w((l) => t((a) => yn(a, l)), []), c = w(() => t(Ve), []);
244
- return F(() => ({ direct: e, markDirect: n, unmarkDirect: r, pruneDirect: o, clearDirect: c }), [e, n, r, o, c]);
245
- }, Sn = (e) => ({
243
+ }, Sn = (e, t) => [...e].every((n) => t.has(n)) ? e : new Set([...e].filter((n) => t.has(n))), Tn = () => {
244
+ const [e, t] = F(Ke), n = w((l) => t((a) => yn(a, l)), []), r = w((l) => t((a) => Rn(a, l)), []), o = w((l) => t((a) => Sn(a, l)), []), c = w(() => t(Ke), []);
245
+ return C(() => ({ direct: e, markDirect: n, unmarkDirect: r, pruneDirect: o, clearDirect: c }), [e, n, r, o, c]);
246
+ }, Nn = (e) => ({
246
247
  budget: e,
247
248
  handled: /* @__PURE__ */ new Set(),
248
249
  loads: /* @__PURE__ */ new Set(),
@@ -251,9 +252,9 @@ const cn = /* @__PURE__ */ p.forwardRef(sn), qe = Pe(!0), et = "\0loop\0", tt =
251
252
  depthLimited: !1,
252
253
  announcedStart: !1,
253
254
  issuedAgainst: null
254
- }), Tn = (e, t) => {
255
+ }), kn = (e, t) => {
255
256
  const n = [];
256
- let r = ke(t.entries, t.compare);
257
+ let r = Le(t.entries, t.compare);
257
258
  for (let o = 1; r.length > 0; o += 1) {
258
259
  const c = [];
259
260
  for (const l of r) {
@@ -275,130 +276,130 @@ const cn = /* @__PURE__ */ p.forwardRef(sn), qe = Pe(!0), et = "\0loop\0", tt =
275
276
  }
276
277
  n.push(a), e.opened += 1;
277
278
  }
278
- l.lazy !== !0 && l.children !== void 0 && c.push(...ke(l.children, t.compare));
279
+ l.lazy !== !0 && l.children !== void 0 && c.push(...Le(l.children, t.compare));
279
280
  }
280
281
  r = c;
281
282
  }
282
283
  return n;
283
- }, rt = (e, t) => e.every((n) => n.type !== "directory" || t(n.path) && (n.lazy === !0 || n.children === void 0 || rt(n.children, t))), Nn = (e, t) => {
284
+ }, lt = (e, t) => e.every((n) => n.type !== "directory" || t(n.path) && (n.lazy === !0 || n.children === void 0 || lt(n.children, t))), An = (e, t) => {
284
285
  if (e.folderLimited) return { kind: "folder-limit", opened: e.opened };
285
286
  if (e.depthLimited) return { kind: "depth-limit", opened: e.opened };
286
287
  let n = 0;
287
288
  for (const r of e.loads) t.childrenOf(r)?.status === "failed" && (n += 1);
288
- return { kind: "done", opened: e.opened, failed: n, complete: rt(t.entries, t.isShownExpanded) };
289
- }, Ne = Object.freeze({ state: "idle" }), Ln = (e) => {
290
- const t = g(null), n = g(e), [r, o] = q(Ne);
291
- I(() => {
289
+ return { kind: "done", opened: e.opened, failed: n, complete: lt(t.entries, t.isShownExpanded) };
290
+ }, ke = Object.freeze({ state: "idle" }), Ln = (e) => {
291
+ const t = E(null), n = E(e), [r, o] = F(ke);
292
+ H(() => {
292
293
  n.current = e;
293
294
  });
294
295
  const c = w(() => {
295
- t.current === null && (t.current = Sn(n.current.budget), o({ state: "running", opened: 0 }));
296
+ t.current === null && (t.current = Nn(n.current.budget), o({ state: "running", opened: 0 }));
296
297
  }, []), l = w(() => {
297
- t.current = null, o(Ne);
298
+ t.current = null, o(ke);
298
299
  }, []), a = w((s) => {
299
300
  const d = t.current;
300
301
  if (d === null) return;
301
- const u = Tn(d, s);
302
+ const u = kn(d, s);
302
303
  if (u.length > 0 && (d.issuedAgainst = s.expanded, n.current.expandMultiple([...u])), !d.announcedStart && (d.loads.size > 0 || s.waiting > 0) && (d.announcedStart = !0, n.current.onStart()), u.length === 0 && !s.expansionPending && s.expanded !== d.issuedAgainst && s.waiting === 0) {
303
304
  t.current = null;
304
- const f = Nn(d, s);
305
- o(f.kind === "done" ? Ne : { state: "stopped", stop: f.kind, opened: f.opened }), n.current.onFinish(f);
305
+ const p = An(d, s);
306
+ o(p.kind === "done" ? ke : { state: "stopped", stop: p.kind, opened: p.opened }), n.current.onFinish(p);
306
307
  return;
307
308
  }
308
309
  const { opened: i } = d;
309
- o((f) => f.state === "running" && f.opened === i ? f : { state: "running", opened: i });
310
+ o((p) => p.state === "running" && p.opened === i ? p : { state: "running", opened: i });
310
311
  }, []);
311
- return F(() => ({ status: r, start: c, end: l, advance: a }), [r, c, l, a]);
312
- }, je = ["pointerdown", "wheel", "touchstart", "keydown", "focusin"], kn = 8, Ke = { least: Number.POSITIVE_INFINITY, stalled: 0 }, On = ({ tree: e, container: t, path: n, chain: r, rows: o, cancel: c, displayed: l, placement: a }) => {
313
- const s = g(null), d = g(!0), u = g(Ke), i = g(null), f = g(null), h = g(r), v = g(a);
314
- I(() => {
315
- h.current = r, v.current = a;
312
+ return C(() => ({ status: r, start: c, end: l, advance: a }), [r, c, l, a]);
313
+ }, Ue = ["pointerdown", "wheel", "touchstart", "keydown", "focusin"], On = 8, Ge = { least: Number.POSITIVE_INFINITY, stalled: 0 }, Pn = ({ tree: e, container: t, path: n, chain: r, rows: o, cancel: c, displayed: l, placement: a }) => {
314
+ const s = E(null), d = E(!0), u = E(Ge), i = E(null), p = E(null), h = E(r), g = E(a);
315
+ H(() => {
316
+ h.current = r, g.current = a;
316
317
  }, [r, a]);
317
- const E = w(() => {
318
- const k = i.current;
319
- k !== null && (i.current = null, k.phase === "asking" ? k.controller.abort() : h.current?.open(null));
320
- }, []), S = w(() => {
321
- s.current = null, E();
322
- }, [E]), C = w(() => {
323
- const k = t.current;
324
- s.current === null || f.current !== null || k === null || k.getClientRects().length === 0 || (f.current = requestAnimationFrame(() => {
325
- f.current = null;
326
- const b = s.current;
327
- if (b === null) return;
328
- const R = v.current(b);
329
- if (R === 0) {
330
- d.current = !0, i.current?.phase === "opening" && E();
318
+ const v = w(() => {
319
+ const R = i.current;
320
+ R !== null && (i.current = null, R.phase === "asking" ? R.controller.abort() : h.current?.open(null));
321
+ }, []), O = w(() => {
322
+ s.current = null, v();
323
+ }, [v]), A = w(() => {
324
+ const R = t.current;
325
+ s.current === null || p.current !== null || R === null || R.getClientRects().length === 0 || (p.current = requestAnimationFrame(() => {
326
+ p.current = null;
327
+ const k = s.current;
328
+ if (k === null) return;
329
+ const S = g.current(k);
330
+ if (S === 0) {
331
+ d.current = !0, i.current?.phase === "opening" && v();
331
332
  return;
332
333
  }
333
- if (e.current?.scrollToPath(b, { align: "nearest" }) === !0) {
334
- i.current?.phase === "opening" && E();
335
- const { least: A, stalled: H } = u.current;
336
- u.current = R < A ? { least: R, stalled: 0 } : { least: A, stalled: H + 1 }, u.current.stalled < kn && C();
334
+ if (e.current?.scrollToPath(k, { align: "nearest" }) === !0) {
335
+ i.current?.phase === "opening" && v();
336
+ const { least: _, stalled: B } = u.current;
337
+ u.current = S < _ ? { least: S, stalled: 0 } : { least: _, stalled: B + 1 }, u.current.stalled < On && A();
337
338
  return;
338
339
  }
339
- const y = i.current;
340
- if (y === null) {
340
+ const b = i.current;
341
+ if (b === null) {
341
342
  s.current = null;
342
343
  return;
343
344
  }
344
- y.phase === "opening" && h.current?.progress(y.folders, b) !== "loading" && S();
345
+ b.phase === "opening" && h.current?.progress(b.folders, k) !== "loading" && O();
345
346
  }));
346
- }, [e, t, E, S]), T = w(() => {
347
- d.current = !1, u.current = Ke, C();
348
- }, [C]);
349
- _(() => {
350
- const k = t.current;
351
- if (k === null) return;
352
- const b = typeof ResizeObserver > "u" ? null : new ResizeObserver(T);
353
- b?.observe(k);
354
- for (const R of je) k.addEventListener(R, S, { passive: !0 });
347
+ }, [e, t, v, O]), q = w(() => {
348
+ d.current = !1, u.current = Ge, A();
349
+ }, [A]);
350
+ D(() => {
351
+ const R = t.current;
352
+ if (R === null) return;
353
+ const k = typeof ResizeObserver > "u" ? null : new ResizeObserver(q);
354
+ k?.observe(R);
355
+ for (const S of Ue) R.addEventListener(S, O, { passive: !0 });
355
356
  return () => {
356
- b?.disconnect();
357
- for (const R of je) k.removeEventListener(R, S);
358
- f.current !== null && cancelAnimationFrame(f.current), f.current = null, E();
357
+ k?.disconnect();
358
+ for (const S of Ue) R.removeEventListener(S, O);
359
+ p.current !== null && cancelAnimationFrame(p.current), p.current = null, v();
359
360
  };
360
- }, [t, T, S, E]);
361
- const L = r !== null;
362
- _(() => {
363
- const k = t.current;
364
- if (S(), n === null || k === null || k.contains(k.ownerDocument.activeElement)) return;
361
+ }, [t, q, O, v]);
362
+ const y = r !== null;
363
+ D(() => {
364
+ const R = t.current;
365
+ if (O(), n === null || R === null || R.contains(R.ownerDocument.activeElement)) return;
365
366
  s.current = n;
366
- const b = h.current;
367
- if (L && b !== null) {
368
- const R = new AbortController(), y = { phase: "asking", controller: R };
369
- i.current = y, b.ancestors(n, R.signal).then((A) => {
370
- i.current === y && (A === null ? i.current = null : (i.current = { phase: "opening", folders: A }, h.current?.open(A)), T());
367
+ const k = h.current;
368
+ if (y && k !== null) {
369
+ const S = new AbortController(), b = { phase: "asking", controller: S };
370
+ i.current = b, k.ancestors(n, S.signal).then((_) => {
371
+ i.current === b && (_ === null ? i.current = null : (i.current = { phase: "opening", folders: _ }, h.current?.open(_)), q());
371
372
  });
372
373
  }
373
- T();
374
- }, [n, L, t, S, T]), _(() => {
375
- (i.current?.phase === "opening" || s.current !== null && !d.current) && T();
376
- }, [o, T]);
377
- const Z = g(c);
378
- _(() => {
379
- Z.current !== c && (Z.current = c, S());
380
- }, [c, S]);
381
- const M = g(l);
382
- _(() => {
383
- M.current && !l && E(), M.current = l;
384
- }, [l, E]);
385
- }, An = "--aqmx-tree-line", Pn = Object.freeze(["(forced-colors: active)", "(prefers-color-scheme: dark)"]), qn = "data-aqmx-tree-probe", Cn = Object.freeze({ rowHeight: Ft, lineColor: null }), Fn = /^rgb\((\d{1,3}), (\d{1,3}), (\d{1,3})\)$/u, Mn = (e) => {
386
- const t = Fn.exec(e);
374
+ q();
375
+ }, [n, y, t, O, q]), D(() => {
376
+ (i.current?.phase === "opening" || s.current !== null && !d.current) && q();
377
+ }, [o, q]);
378
+ const Z = E(c);
379
+ D(() => {
380
+ Z.current !== c && (Z.current = c, O());
381
+ }, [c, O]);
382
+ const N = E(l);
383
+ D(() => {
384
+ N.current && !l && v(), N.current = l;
385
+ }, [l, v]);
386
+ }, qn = "--aqmx-tree-line", Cn = Object.freeze(["(forced-colors: active)", "(prefers-color-scheme: dark)"]), Fn = "data-aqmx-tree-probe", Mn = Object.freeze({ rowHeight: Mt, lineColor: null }), _n = /^rgb\((\d{1,3}), (\d{1,3}), (\d{1,3})\)$/u, In = (e) => {
387
+ const t = _n.exec(e);
387
388
  return t === null ? e : `#${t.slice(1).map((n) => Number(n).toString(16).padStart(2, "0")).join("")}`;
388
- }, _n = (e, t) => {
389
- const [n, r] = q(Cn);
390
- return I(() => {
389
+ }, Dn = (e, t) => {
390
+ const [n, r] = F(Mn);
391
+ return H(() => {
391
392
  const o = e.current;
392
393
  if (o === null) return;
393
394
  const c = () => {
394
- const s = Math.round(o.getBoundingClientRect().height), d = getComputedStyle(o), u = d.getPropertyValue(An).trim() === "" ? null : Mn(d.color);
395
+ const s = Math.round(o.getBoundingClientRect().height), d = getComputedStyle(o), u = d.getPropertyValue(qn).trim() === "" ? null : In(d.color);
395
396
  r((i) => {
396
- const f = Number.isFinite(s) && s > 0 ? s : i.rowHeight;
397
- return i.rowHeight === f && i.lineColor === u ? i : { rowHeight: f, lineColor: u };
397
+ const p = Number.isFinite(s) && s > 0 ? s : i.rowHeight;
398
+ return i.rowHeight === p && i.lineColor === u ? i : { rowHeight: p, lineColor: u };
398
399
  });
399
400
  };
400
401
  c();
401
- const l = Pn.map((s) => window.matchMedia(s));
402
+ const l = Cn.map((s) => window.matchMedia(s));
402
403
  for (const s of l) s.addEventListener("change", c);
403
404
  const a = typeof ResizeObserver > "u" ? null : new ResizeObserver(c);
404
405
  return a?.observe(o), () => {
@@ -406,13 +407,13 @@ const cn = /* @__PURE__ */ p.forwardRef(sn), qe = Pe(!0), et = "\0loop\0", tt =
406
407
  a?.disconnect();
407
408
  };
408
409
  }, [e, t]), n;
409
- }, at = "markdown-explorer-tree-scroll", In = 0.5, lt = (e, t) => [...e.querySelectorAll(`[role="treeitem"][${se}]`)].find((n) => n.getAttribute(se) === t), Dn = (e, t) => {
410
- const n = lt(e, t), r = n?.closest(`[data-testid="${at}"]`);
410
+ }, ot = "markdown-explorer-tree-scroll", Hn = 0.5, st = (e, t) => [...e.querySelectorAll(`[role="treeitem"][${ce}]`)].find((n) => n.getAttribute(ce) === t), $n = (e, t) => {
411
+ const n = st(e, t), r = n?.closest(`[data-testid="${ot}"]`);
411
412
  if (n === void 0 || r === null || r === void 0) return Number.POSITIVE_INFINITY;
412
413
  const o = r.getBoundingClientRect(), c = n.getBoundingClientRect(), l = o.top - c.top, a = c.height > o.height ? Math.abs(l) : Math.max(0, l) + Math.max(0, c.bottom - o.bottom);
413
- return a <= In ? 0 : a;
414
- }, Hn = {
415
- testId: at,
414
+ return a <= Hn ? 0 : a;
415
+ }, Zn = {
416
+ testId: ot,
416
417
  overscanCount: 13,
417
418
  callbackThrottleMs: 13,
418
419
  scrollBarOptions: {
@@ -422,17 +423,17 @@ const cn = /* @__PURE__ */ p.forwardRef(sn), qe = Pe(!0), et = "\0loop\0", tt =
422
423
  enableArrowButtons: !0,
423
424
  enableArrowButtonTabStops: !1,
424
425
  enableScrollToTopBottomButtons: !0,
425
- tapScrollCircleOptions: Gt
426
+ tapScrollCircleOptions: Ut
426
427
  },
427
428
  behaviorOptions: { enablePointerDrag: !0 }
428
- }, $n = { hoverClassName: "", directorySelectedClassName: "", itemSelectedClassName: "" }, Zn = { color: "inherit" }, Bn = { paddingBlock: 0 }, zn = /* @__PURE__ */ new Set(), Vn = /* @__PURE__ */ new Map(), jn = { color: "var(--aqmx-tree-line)" }, Kn = (e) => {
429
- const t = e instanceof Element ? e.closest(`[${se}]`) : null;
430
- return t === null || t.getAttribute("data-entry-type") !== "file" ? null : t.getAttribute(se);
431
- }, ot = (e, t, n, r) => n === "folder-limit" ? e.expandAllFolderLimit(r, t.maxFolders, e.expandAll) : e.expandAllDepthLimit(r, t.maxDepth), Gn = (e, t, n) => n.kind === "done" ? e.expandAllDone(n.opened, n.failed, n.complete) : ot(e, t, n.kind, n.opened), st = () => {
432
- const { labels: e } = D();
433
- return /* @__PURE__ */ O("div", { className: "aqmx-explorer-loading", "aria-busy": "true", "data-testid": "markdown-explorer-tree-loading", children: [
429
+ }, Bn = { hoverClassName: "", directorySelectedClassName: "", itemSelectedClassName: "" }, zn = { color: "inherit", fontSize: "inherit" }, Vn = { paddingBlock: 0, fontSize: "inherit" }, jn = /* @__PURE__ */ new Set(), Kn = /* @__PURE__ */ new Map(), Un = { color: "var(--aqmx-tree-line)" }, Gn = (e) => {
430
+ const t = e instanceof Element ? e.closest(`[${ce}]`) : null;
431
+ return t === null || t.getAttribute("data-entry-type") !== "file" ? null : t.getAttribute(ce);
432
+ }, ct = (e, t, n, r) => n === "folder-limit" ? e.expandAllFolderLimit(r, t.maxFolders, e.expandAll) : e.expandAllDepthLimit(r, t.maxDepth), Wn = (e, t, n) => n.kind === "done" ? e.expandAllDone(n.opened, n.failed, n.complete) : ct(e, t, n.kind, n.opened), it = () => {
433
+ const { labels: e } = $();
434
+ return /* @__PURE__ */ L("div", { className: "aqmx-explorer-loading", "aria-busy": "true", "data-testid": "markdown-explorer-tree-loading", children: [
434
435
  /* @__PURE__ */ m("p", { className: "aqmx-explorer-loading-text", children: e.treeLoading }),
435
- /* @__PURE__ */ O("div", { className: "aqmx-skeleton", "aria-hidden": "true", children: [
436
+ /* @__PURE__ */ L("div", { className: "aqmx-skeleton", "aria-hidden": "true", children: [
436
437
  /* @__PURE__ */ m("span", {}),
437
438
  /* @__PURE__ */ m("span", {}),
438
439
  /* @__PURE__ */ m("span", {}),
@@ -440,19 +441,19 @@ const cn = /* @__PURE__ */ p.forwardRef(sn), qe = Pe(!0), et = "\0loop\0", tt =
440
441
  /* @__PURE__ */ m("span", {})
441
442
  ] })
442
443
  ] });
443
- }, Un = () => {
444
- const { labels: e } = D();
445
- return /* @__PURE__ */ O("div", { className: "aqmx-empty", "data-testid": "markdown-explorer-tree-empty", children: [
446
- /* @__PURE__ */ m(cn, { className: "aqmx-explorer-empty-icon", "aria-hidden": "true" }),
444
+ }, Xn = () => {
445
+ const { labels: e } = $();
446
+ return /* @__PURE__ */ L("div", { className: "aqmx-empty", "data-testid": "markdown-explorer-tree-empty", children: [
447
+ /* @__PURE__ */ m(un, { className: "aqmx-explorer-empty-icon", "aria-hidden": "true" }),
447
448
  /* @__PURE__ */ m("p", { className: "aqmx-empty-title", children: e.treeEmptyTitle }),
448
449
  /* @__PURE__ */ m("p", { className: "aqmx-explorer-empty-body", children: e.treeEmptyBody })
449
450
  ] });
450
- }, Wn = ({ name: e, onRetry: t }) => {
451
- const { labels: n } = D(), r = ye();
452
- return /* @__PURE__ */ O("span", { className: "aqmx-explorer-folder-failed", children: [
451
+ }, Yn = ({ name: e, onRetry: t }) => {
452
+ const { labels: n } = $(), r = Re();
453
+ return /* @__PURE__ */ L("span", { className: "aqmx-explorer-folder-failed", children: [
453
454
  /* @__PURE__ */ m("span", { className: "aqmx-explorer-folder-name", children: e }),
454
455
  /* @__PURE__ */ m("span", { id: r, className: "aqmx-explorer-folder-error", children: n.folderLoadFailed }),
455
- /* @__PURE__ */ O(
456
+ /* @__PURE__ */ L(
456
457
  "button",
457
458
  {
458
459
  type: "button",
@@ -462,7 +463,7 @@ const cn = /* @__PURE__ */ p.forwardRef(sn), qe = Pe(!0), et = "\0loop\0", tt =
462
463
  onClick: (o) => {
463
464
  o.stopPropagation();
464
465
  const c = o.currentTarget, l = c.ownerDocument.activeElement === c ? c.closest('[role="treeitem"]') : null;
465
- l instanceof HTMLElement && Ye(l), t();
466
+ l instanceof HTMLElement && Je(l), t();
466
467
  },
467
468
  onKeyDown: (o) => {
468
469
  o.key !== "Escape" && o.stopPropagation();
@@ -474,7 +475,7 @@ const cn = /* @__PURE__ */ p.forwardRef(sn), qe = Pe(!0), et = "\0loop\0", tt =
474
475
  }
475
476
  )
476
477
  ] });
477
- }, Xn = ({
478
+ }, Qn = ({
478
479
  entries: e,
479
480
  version: t,
480
481
  mode: n,
@@ -484,151 +485,158 @@ const cn = /* @__PURE__ */ p.forwardRef(sn), qe = Pe(!0), et = "\0loop\0", tt =
484
485
  openPaths: l,
485
486
  selection: a,
486
487
  onOpenDocument: s,
487
- onRevealSource: d,
488
- expansion: u,
489
- onShown: i,
490
- marks: f,
491
- claimsHeld: h,
488
+ folders: d,
489
+ onRevealSource: u,
490
+ expansion: i,
491
+ onShown: p,
492
+ marks: h,
493
+ claimsHeld: g,
492
494
  expandAll: v,
493
- revealCancel: E
495
+ revealCancel: O
494
496
  }) => {
495
- const { trees: S, documents: C, labels: T, locale: L, theme: Z, data: M, config: k, sources: b, reveals: R } = D(), y = be(qe), [A] = q(hn), H = g(null), { rowHeight: de, lineColor: W } = _n(H, Z), { isExpanded: B, toggle: ee, expandMultiple: K, collapseMultiple: ae, expanded: V, isPending: le } = u, { alwaysExpanded: X, sortMode: $, folderPlacement: G } = o, { direct: ue, markDirect: U, unmarkDirect: ce, pruneDirect: me } = f, { running: oe, advance: he } = v, fe = g(null), te = g(null), N = F(() => Mt({ sortMode: $, folderPlacement: G }), [$, G]), Y = F(() => xn(N), [N]), z = w((x) => S.children(r, x), [S, r]), ne = F(() => gn(e), [e]), re = w((x) => !pe(x) && (B(x) || X && !ne.has(x)), [B, X, ne]), Q = g({ shownExpanded: re, isExpanded: B, unloadedFolders: ne, entries: e, childrenOf: z });
496
- I(() => {
497
- Q.current = { shownExpanded: re, isExpanded: B, unloadedFolders: ne, entries: e, childrenOf: z };
498
- }, [re, B, ne, e, z]);
499
- const Me = w((x) => {
500
- fe.current?.scrollToPath(x, { align: "nearest" }), requestAnimationFrame(() => {
501
- const P = te.current, j = P === null ? void 0 : lt(P, x);
502
- j !== void 0 && Ye(j);
497
+ const { trees: A, documents: q, labels: y, locale: Z, theme: N, data: R, config: k, sources: S, reveals: b } = $(), _ = ye(Fe), [B] = F(wn), ie = E(null), { rowHeight: re, lineColor: K } = Dn(ie, N), { isExpanded: U, toggle: ae, expandMultiple: z, collapseMultiple: Q, expanded: J, isPending: ee } = i, { alwaysExpanded: M, sortMode: le, folderPlacement: de, readmePlacement: he } = o, { direct: oe, markDirect: G, unmarkDirect: te, pruneDirect: we } = h, { running: ue, advance: me } = v, xe = E(null), se = E(null), W = C(() => _t({ sortMode: le, folderPlacement: de, readmePlacement: he }), [le, de, he]), P = C(() => gn(W), [W]), I = w((x) => A.children(r, x), [A, r]), V = C(() => bn(e), [e]), ne = w((x) => !pe(x) && (U(x) || M && !V.has(x)), [U, M, V]), X = E({ shownExpanded: ne, isExpanded: U, unloadedFolders: V, entries: e, childrenOf: I });
498
+ H(() => {
499
+ X.current = { shownExpanded: ne, isExpanded: U, unloadedFolders: V, entries: e, childrenOf: I };
500
+ }, [ne, U, V, e, I]);
501
+ const Ie = w((x) => {
502
+ xe.current?.scrollToPath(x, { align: "nearest" }), requestAnimationFrame(() => {
503
+ const T = se.current, j = T === null ? void 0 : st(T, x);
504
+ j !== void 0 && Je(j);
503
505
  });
504
- }, []), pt = w(
506
+ }, []), ht = w(
505
507
  (x) => {
506
508
  if (pe(x)) {
507
- Me(mn(x));
509
+ Ie(pn(x));
508
510
  return;
509
511
  }
510
- Q.current.isExpanded(x) ? ce([x]) : Q.current.unloadedFolders.has(x) && U(x), ee(x);
512
+ X.current.isExpanded(x) ? te([x]) : X.current.unloadedFolders.has(x) && G(x), ae(x);
511
513
  },
512
- [Me, U, ce, ee]
513
- ), Re = w(
514
+ [Ie, G, te, ae]
515
+ ), Se = w(
514
516
  (x) => {
515
- const P = x.filter((j) => !pe(j));
516
- P.length !== 0 && (ce(P), ae(P));
517
+ const T = x.filter((j) => !pe(j));
518
+ T.length !== 0 && (te(T), Q(T));
517
519
  },
518
- [ce, ae]
519
- ), ht = w(
520
+ [te, Q]
521
+ ), xt = w(
520
522
  (x) => {
521
- const P = x.filter((j) => !pe(j));
522
- P.length !== 0 && (P.length < x.length && P.every((j) => Q.current.shownExpanded(j)) ? Re(P) : K(P));
523
+ const T = x.filter((j) => !pe(j));
524
+ T.length !== 0 && (T.length < x.length && T.every((j) => X.current.shownExpanded(j)) ? Se(T) : z(T));
523
525
  },
524
- [K, Re]
525
- ), _e = w(
526
+ [z, Se]
527
+ ), De = w(
526
528
  (x) => /* @__PURE__ */ m(
527
- Wn,
529
+ Yn,
528
530
  {
529
531
  name: x.name,
530
532
  onRetry: () => {
531
- U(x.path), S.retryChildren(r, x.path), Q.current.shownExpanded(x.path) || K([x.path]);
533
+ G(x.path), A.retryChildren(r, x.path), X.current.shownExpanded(x.path) || z([x.path]);
532
534
  }
533
535
  }
534
536
  ),
535
- [S, r, U, K]
536
- ), Ie = n === "multi" ? l : zn, { loopFolderName: De } = T, xt = F(() => A(e, { openPaths: Ie, childrenOf: z, renderFailedFolder: _e, loopFolderName: De }), [A, e, Ie, z, _e, De, t]), wt = Lt(C, Kn), He = g([]), xe = w(() => {
537
- for (const x of He.current) Q.current.unloadedFolders.has(x) && U(x);
538
- }, [U]), { maxDepth: Se } = k.revealDocument, $e = g(d);
539
- I(() => {
540
- $e.current = d;
541
- }, [d]);
542
- const gt = F(
537
+ [A, r, G, z]
538
+ ), He = n === "multi" ? l : jn, { loopFolderName: $e } = y, wt = C(() => B(e, { openPaths: He, childrenOf: I, renderFailedFolder: De, loopFolderName: $e }), [B, e, He, I, De, $e, t]), gt = At(q, Gn), Ze = E([]), ge = w(() => {
539
+ for (const x of Ze.current) X.current.unloadedFolders.has(x) && G(x);
540
+ }, [G]), { maxDepth: Te } = k.revealDocument, Be = E(u);
541
+ H(() => {
542
+ Be.current = u;
543
+ }, [u]);
544
+ const vt = C(
543
545
  () => ({
544
- ancestors: async (x, P) => {
545
- const j = R.take(r, x);
546
+ ancestors: async (x, T) => {
547
+ const j = b.take(r, x);
546
548
  if (j !== null) return j;
547
- if (!R.mayMove(x)) {
548
- const ie = await M.ancestors(r, x, P);
549
- return ie.status !== "ok" || ie.ancestors === null || ie.ancestors.length > Se ? null : ie.ancestors;
549
+ if (!b.mayMove(x)) {
550
+ const fe = await R.ancestors(r, x, T);
551
+ return fe.status !== "ok" || fe.ancestors === null || fe.ancestors.length > Te ? null : fe.ancestors;
550
552
  }
551
- const J = await M.reveal(r, x, P);
552
- return J.status !== "ok" || J.source === null || J.ancestors.length > Se ? null : J.source === r ? J.ancestors : (P.aborted || !b.some((ie) => ie.id === J.source) || (R.move(J.source, x, J.ancestors), $e.current(J.source)), null);
553
+ const Y = await R.reveal(r, x, T);
554
+ return Y.status !== "ok" || Y.source === null || Y.ancestors.length > Te ? null : Y.source === r ? Y.ancestors : (T.aborted || !S.some((fe) => fe.id === Y.source) || (b.move(Y.source, x, Y.ancestors), Be.current(Y.source)), null);
553
555
  },
554
556
  open: (x) => {
555
- He.current = x ?? [], x !== null && (xe(), K([...x]));
557
+ Ze.current = x ?? [], x !== null && (ge(), z([...x]));
556
558
  },
557
- progress: (x, P) => vn(Q.current.entries, x, P, { isShownExpanded: Q.current.shownExpanded, childrenOf: Q.current.childrenOf })
559
+ progress: (x, T) => En(X.current.entries, x, T, { isShownExpanded: X.current.shownExpanded, childrenOf: X.current.childrenOf })
558
560
  }),
559
- [M, r, b, R, Se, xe, K]
561
+ [R, r, S, b, Te, ge, z]
560
562
  );
561
- _(() => xe(), [xe, ne]);
562
- const vt = F(() => [e, t, V], [e, t, V]), bt = w((x) => te.current === null ? Number.POSITIVE_INFINITY : Dn(te.current, x), []);
563
- On({ tree: fe, container: te, path: c.path, chain: c.openFolders ? gt : null, rows: vt, cancel: E, displayed: y, placement: bt });
564
- const Ze = w((x) => ue.has(x), [ue]), we = F(() => wn(e, { isShownExpanded: re, childrenOf: z, compare: N, isDirect: Ze }), [e, re, z, N, Ze, t]), ge = y && h;
565
- I(() => {
566
- i(e);
567
- }, [e, i]), I(() => () => i(null), [i]), _(() => S.claimChildren(r, ge ? we.folders : Vn), [S, r, ge, we]), _(() => me(ne), [me, ne]), _(() => {
568
- ge && oe && he({ entries: e, isShownExpanded: re, childrenOf: z, compare: N, expanded: V, waiting: we.waiting, expansionPending: le });
569
- }, [ge, oe, he, e, re, z, N, V, we, le]);
570
- const Et = w(
563
+ D(() => ge(), [ge, V]);
564
+ const bt = C(() => [e, t, J], [e, t, J]), Et = w((x) => se.current === null ? Number.POSITIVE_INFINITY : $n(se.current, x), []);
565
+ Pn({ tree: xe, container: se, path: c.path, chain: c.openFolders ? vt : null, rows: bt, cancel: O, displayed: _, placement: Et });
566
+ const ze = w((x) => oe.has(x), [oe]), ve = C(() => vn(e, { isShownExpanded: ne, childrenOf: I, compare: W, isDirect: ze }), [e, ne, I, W, ze, t]), be = _ && g;
567
+ H(() => {
568
+ p(e);
569
+ }, [e, p]), H(() => () => p(null), [p]), D(() => A.claimChildren(r, be ? ve.folders : Kn), [A, r, be, ve]), D(() => we(V), [we, V]), D(() => {
570
+ be && ue && me({ entries: e, isShownExpanded: ne, childrenOf: I, compare: W, expanded: J, waiting: ve.waiting, expansionPending: ee });
571
+ }, [be, ue, me, e, ne, I, W, J, ve, ee]);
572
+ const yt = w(
571
573
  (x) => {
572
- x.isDirectory || (R.settle(x.entry.absolutePath), s(x.entry.absolutePath));
574
+ const T = x.entry.absolutePath;
575
+ if (x.isDirectory) {
576
+ if (d === null || pe(T) || T === d.current) return;
577
+ x.isExpanded && x.preventDefault(), b.settle(T), d.open(T);
578
+ return;
579
+ }
580
+ b.settle(T), s(T);
573
581
  },
574
- [R, s]
575
- ), { onChange: Te } = a, yt = F(
576
- () => Te === null ? void 0 : (x, P) => {
577
- pe(x.absolutePath) || Te({ path: x.absolutePath, name: x.name, selected: P });
582
+ [b, s, d]
583
+ ), { onChange: Ne } = a, Rt = C(
584
+ () => Ne === null ? void 0 : (x, T) => {
585
+ pe(x.absolutePath) || Ne({ path: x.absolutePath, name: x.name, selected: T });
578
586
  },
579
- [Te]
580
- ), Rt = F(() => new Set(a.items), [a.items]), St = F(
587
+ [Ne]
588
+ ), St = C(() => new Set(a.items), [a.items]), Tt = C(
581
589
  () => ({
582
- entryKindDirectory: T.treeEntryKindDirectory,
583
- entryKindFile: T.treeEntryKindFile,
584
- scrollUp: T.treeScrollUp,
585
- scrollDown: T.treeScrollDown,
586
- scrollToTop: T.treeScrollToTop,
587
- scrollToBottom: T.treeScrollToBottom
590
+ entryKindDirectory: y.treeEntryKindDirectory,
591
+ entryKindFile: y.treeEntryKindFile,
592
+ scrollUp: y.treeScrollUp,
593
+ scrollDown: y.treeScrollDown,
594
+ scrollToTop: y.treeScrollToTop,
595
+ scrollToBottom: y.treeScrollToBottom
588
596
  }),
589
- [T]
590
- ), Tt = W === null ? { showTreeLines: !1 } : { showTreeLines: o.lines, lineColor: W };
591
- return /* @__PURE__ */ O("div", { ref: te, className: "aqmx-explorer-tree", "data-testid": "markdown-explorer-tree", ...wt, children: [
592
- /* @__PURE__ */ m("span", { ref: H, className: "aqmx-explorer-tree-probe", "aria-hidden": "true", [qn]: "" }),
597
+ [y]
598
+ ), Nt = K === null ? { showTreeLines: !1 } : { showTreeLines: o.lines, lineColor: K };
599
+ return /* @__PURE__ */ L("div", { ref: se, className: "aqmx-explorer-tree", "data-testid": "markdown-explorer-tree", ...gt, children: [
600
+ /* @__PURE__ */ m("span", { ref: ie, className: "aqmx-explorer-tree-probe", "aria-hidden": "true", [Fn]: "" }),
593
601
  /* @__PURE__ */ m(
594
602
  Kt,
595
603
  {
596
- ref: fe,
597
- entries: xt,
604
+ ref: xe,
605
+ entries: wt,
598
606
  expansion: {
599
- toggle: pt,
600
- isExpanded: re,
601
- expandMultiple: ht,
602
- collapseMultiple: Re,
603
- isPending: le && !oe,
607
+ toggle: ht,
608
+ isExpanded: ne,
609
+ expandMultiple: xt,
610
+ collapseMultiple: Se,
611
+ isPending: ee && !ue,
604
612
  doubleClickAction: o.doubleClickAction
605
613
  },
606
- selection: { mode: a.mode, selectedPath: a.shownPath, currentPath: a.shownPath, selectedItems: Rt, onEntryClick: Et, onSelectionChange: yt },
614
+ selection: { mode: a.mode, selectedPath: a.shownPath, currentPath: a.shownPath, selectedItems: St, onEntryClick: yt, onSelectionChange: Rt },
607
615
  visual: {
608
616
  className: "aqmx-explorer-tree-view",
609
- ariaLabel: T.treeRegion,
610
- ...Tt,
617
+ ariaLabel: y.treeRegion,
618
+ ...Nt,
611
619
  showExpandIcons: o.expandIcons,
612
- expandIconStyle: jn,
620
+ expandIconStyle: Un,
613
621
  showDirectoryIcons: o.directoryIcons,
614
622
  showFileIcons: o.fileIcons,
615
623
  expandIconSize: o.expandIconSize,
616
- itemHeight: de,
624
+ itemHeight: re,
617
625
  removeRootIndent: o.removeRootIndent,
618
- highlightStyles: $n,
619
- entryStyle: Bn,
620
- nameStyle: Zn
626
+ highlightStyles: Bn,
627
+ entryStyle: Vn,
628
+ nameStyle: zn
621
629
  },
622
- virtualScroll: Hn,
623
- sort: Y,
624
- locale: L,
625
- labels: St
630
+ virtualScroll: Zn,
631
+ sort: P,
632
+ locale: Z,
633
+ labels: Tt
626
634
  }
627
635
  )
628
636
  ] });
629
- }, Yn = ({ pending: e, status: t }) => {
630
- const { labels: n } = D(), r = t.state !== "running", [o, c] = q(0), l = g(!0);
631
- I(() => {
637
+ }, Jn = ({ pending: e, status: t }) => {
638
+ const { labels: n } = $(), r = t.state !== "running", [o, c] = F(0), l = E(!0);
639
+ H(() => {
632
640
  const s = l.current;
633
641
  if (l.current = r, !r || e > 0 && !s) {
634
642
  c(0);
@@ -643,62 +651,62 @@ const cn = /* @__PURE__ */ p.forwardRef(sn), qe = Pe(!0), et = "\0loop\0", tt =
643
651
  return () => clearTimeout(d);
644
652
  }, [r, e, o]);
645
653
  const a = r && e === 0 ? o : e;
646
- return a === 0 && r ? null : /* @__PURE__ */ O("p", { className: "aqmx-explorer-tree-progress", "data-testid": "markdown-explorer-tree-progress", "data-aqmx-loading": String(a), "data-aqmx-expand-all": t.state, children: [
654
+ return a === 0 && r ? null : /* @__PURE__ */ L("p", { className: "aqmx-explorer-tree-progress", "data-testid": "markdown-explorer-tree-progress", "data-aqmx-loading": String(a), "data-aqmx-expand-all": t.state, children: [
647
655
  a > 0 ? /* @__PURE__ */ m(Oe, { className: "aqmx-explorer-tree-progress-icon", "aria-hidden": "true" }) : null,
648
656
  /* @__PURE__ */ m("span", { children: t.state === "running" ? n.expandAllProgress(t.opened, a) : n.foldersLoading(a) })
649
657
  ] });
650
- }, Qn = ({ stop: e, opened: t, budget: n }) => {
651
- const { labels: r } = D();
652
- return /* @__PURE__ */ m("p", { className: "aqmx-explorer-expand-all-stop", "data-testid": "markdown-explorer-expand-all-stop", "data-aqmx-stop": e, children: ot(r, n, e, t) });
653
- }, Jn = ({ entries: e, ...t }) => {
654
- const { trees: n } = D(), r = Ee(n.subscribe, n.version, n.version), { sourceId: o } = t, [c] = q(dn), l = F(() => c(e, (a) => n.children(o, a)), [c, e, n, o, r]);
655
- return l.length === 0 ? /* @__PURE__ */ m(Un, {}) : /* @__PURE__ */ m(Xn, { entries: l, version: r, ...t });
656
- }, er = ({ result: e, onRetry: t, ...n }) => {
657
- const { renderTreeFailure: r } = D(), o = be(e);
658
- if (o.status === "deferred") return /* @__PURE__ */ m(st, {});
659
- if (o.status === "ok") return /* @__PURE__ */ m(Jn, { entries: o.entries, ...n });
658
+ }, er = ({ stop: e, opened: t, budget: n }) => {
659
+ const { labels: r } = $();
660
+ return /* @__PURE__ */ m("p", { className: "aqmx-explorer-expand-all-stop", "data-testid": "markdown-explorer-expand-all-stop", "data-aqmx-stop": e, children: ct(r, n, e, t) });
661
+ }, tr = ({ entries: e, ...t }) => {
662
+ const { trees: n } = $(), r = Ce(n.subscribe, n.version, n.version), { sourceId: o } = t, [c] = F(mn), l = C(() => c(e, (a) => n.children(o, a)), [c, e, n, o, r]);
663
+ return l.length === 0 ? /* @__PURE__ */ m(Xn, {}) : /* @__PURE__ */ m(Qn, { entries: l, version: r, ...t });
664
+ }, nr = ({ result: e, onRetry: t, ...n }) => {
665
+ const { renderTreeFailure: r } = $(), o = ye(e);
666
+ if (o.status === "deferred") return /* @__PURE__ */ m(it, {});
667
+ if (o.status === "ok") return /* @__PURE__ */ m(tr, { entries: o.entries, ...n });
660
668
  const c = r?.(o.failure);
661
- return /* @__PURE__ */ m("div", { className: "aqmx-explorer-tree-message", "data-testid": "markdown-explorer-tree-failure", "data-aqmx-failure": o.failure.reason, children: c !== void 0 ? c : /* @__PURE__ */ m(Nt, { failure: o.failure, alert: !0, onRetry: t, testId: null }) });
662
- }, tr = ({ onControls: e, ...t }) => {
663
- const { trees: n, storageNamespace: r, labels: o, announcer: c, config: l } = D(), { sourceId: a } = t, s = jt({ storageKey: Ut(r).treeExpansion(a) });
664
- Ee(n.subscribe, n.version, n.version);
669
+ return /* @__PURE__ */ m("div", { className: "aqmx-explorer-tree-message", "data-testid": "markdown-explorer-tree-failure", "data-aqmx-failure": o.failure.reason, children: c !== void 0 ? c : /* @__PURE__ */ m(kt, { failure: o.failure, alert: !0, onRetry: t, testId: null }) });
670
+ }, rr = ({ onControls: e, ...t }) => {
671
+ const { trees: n, storageNamespace: r, labels: o, announcer: c, config: l } = $(), { sourceId: a } = t, s = jt({ storageKey: Gt(r).treeExpansion(a) });
672
+ Ce(n.subscribe, n.version, n.version);
665
673
  const d = n.read(a), u = w(() => n.retry(a), [n, a]);
666
- I(() => n.open(a), [n, a]);
667
- const i = Rn(), { expanded: f, expandMultiple: h, collapseAll: v } = s, [E, S] = q(null), C = E !== f, T = g(f);
668
- I(() => {
669
- T.current = f;
670
- }, [f]);
671
- const L = l.expandAll, Z = w(() => c.announce(o.expandAllStarted), [c, o]), M = w(($) => c.announce(Gn(o, L, $)), [c, o, L]), k = Ln({ budget: L, expandMultiple: h, onStart: Z, onFinish: M }), { status: b, start: R, end: y, advance: A } = k, H = b.state === "running", de = F(() => ({ running: H, advance: A }), [H, A]), W = g(null), [B, ee] = q(!1), K = w(($) => {
672
- W.current = $, ee($ !== null);
674
+ H(() => n.open(a), [n, a]);
675
+ const i = Tn(), { expanded: p, expandMultiple: h, collapseAll: g } = s, [v, O] = F(null), A = v !== p, q = E(p);
676
+ H(() => {
677
+ q.current = p;
678
+ }, [p]);
679
+ const y = l.expandAll, Z = w(() => c.announce(o.expandAllStarted), [c, o]), N = w((M) => c.announce(Wn(o, y, M)), [c, o, y]), R = Ln({ budget: y, expandMultiple: h, onStart: Z, onFinish: N }), { status: k, start: S, end: b, advance: _ } = R, B = k.state === "running", ie = C(() => ({ running: B, advance: _ }), [B, _]), re = E(null), [K, U] = F(!1), ae = w((M) => {
680
+ re.current = M, U(M !== null);
673
681
  }, []);
674
- _(
675
- () => n.subscribeChildrenFailures(($) => {
676
- const G = $.sourceId === a && W.current !== null ? nt(W.current, $.path) : null;
677
- G !== null && c.announce({ list: o.foldersLoadFailedNamed, item: G.name });
682
+ D(
683
+ () => n.subscribeChildrenFailures((M) => {
684
+ const le = M.sourceId === a && re.current !== null ? at(re.current, M.path) : null;
685
+ le !== null && c.announce({ list: o.foldersLoadFailedNamed, item: le.name });
678
686
  }),
679
687
  [n, a, c, o]
680
688
  );
681
- const { clearDirect: ae } = i, [V, le] = q(0), X = w(() => {
682
- le(($) => $ + 1), y(), ae(), S(T.current), v();
683
- }, [y, ae, v]);
684
- return _(() => {
685
- e({ collapseAll: X, expandAll: B ? R : null, expanding: H });
686
- }, [e, X, R, B, H]), _(() => () => e(null), [e]), _(() => {
687
- B || y();
688
- }, [B, y]), /* @__PURE__ */ O(Xe, { children: [
689
- b.state === "stopped" ? /* @__PURE__ */ m(Qn, { stop: b.stop, opened: b.opened, budget: L }) : null,
690
- /* @__PURE__ */ O("div", { className: "aqmx-explorer-tree-area", children: [
691
- /* @__PURE__ */ m(Qe, { fallback: /* @__PURE__ */ m(st, {}), children: /* @__PURE__ */ m(er, { result: d, onRetry: u, expansion: s, onShown: K, marks: i, claimsHeld: C, expandAll: de, revealCancel: V, ...t }) }),
692
- /* @__PURE__ */ m(Yn, { pending: n.pendingChildren(a), status: b })
689
+ const { clearDirect: z } = i, [Q, J] = F(0), ee = w(() => {
690
+ J((M) => M + 1), b(), z(), O(q.current), g();
691
+ }, [b, z, g]);
692
+ return D(() => {
693
+ e({ collapseAll: ee, expandAll: K ? S : null, expanding: B });
694
+ }, [e, ee, S, K, B]), D(() => () => e(null), [e]), D(() => {
695
+ K || b();
696
+ }, [K, b]), /* @__PURE__ */ L(Qe, { children: [
697
+ k.state === "stopped" ? /* @__PURE__ */ m(er, { stop: k.stop, opened: k.opened, budget: y }) : null,
698
+ /* @__PURE__ */ L("div", { className: "aqmx-explorer-tree-area", children: [
699
+ /* @__PURE__ */ m(et, { fallback: /* @__PURE__ */ m(it, {}), children: /* @__PURE__ */ m(nr, { result: d, onRetry: u, expansion: s, onShown: ae, marks: i, claimsHeld: A, expandAll: ie, revealCancel: Q, ...t }) }),
700
+ /* @__PURE__ */ m(Jn, { pending: n.pendingChildren(a), status: k })
693
701
  ] })
694
702
  ] });
695
703
  };
696
- function nr({
704
+ function ar({
697
705
  title: e,
698
706
  titleId: t,
699
707
  ...n
700
708
  }, r) {
701
- return /* @__PURE__ */ p.createElement("svg", Object.assign({
709
+ return /* @__PURE__ */ f.createElement("svg", Object.assign({
702
710
  xmlns: "http://www.w3.org/2000/svg",
703
711
  viewBox: "0 0 24 24",
704
712
  fill: "currentColor",
@@ -706,69 +714,69 @@ function nr({
706
714
  "data-slot": "icon",
707
715
  ref: r,
708
716
  "aria-labelledby": t
709
- }, n), e ? /* @__PURE__ */ p.createElement("title", {
717
+ }, n), e ? /* @__PURE__ */ f.createElement("title", {
710
718
  id: t
711
- }, e) : null, /* @__PURE__ */ p.createElement("path", {
719
+ }, e) : null, /* @__PURE__ */ f.createElement("path", {
712
720
  fillRule: "evenodd",
713
721
  d: "M5.47 5.47a.75.75 0 0 1 1.06 0L12 10.94l5.47-5.47a.75.75 0 1 1 1.06 1.06L13.06 12l5.47 5.47a.75.75 0 1 1-1.06 1.06L12 13.06l-5.47 5.47a.75.75 0 0 1-1.06-1.06L10.94 12 5.47 6.53a.75.75 0 0 1 0-1.06Z",
714
722
  clipRule: "evenodd"
715
723
  }));
716
724
  }
717
- const ct = /* @__PURE__ */ p.forwardRef(nr), Ge = "markdown-explorer-selection-remove", rr = ({ selection: e, onRemove: t, onClear: n, onOpenSelection: r, onLeave: o }) => {
718
- const { labels: c } = D(), l = ye(), a = g(null), s = [...e], d = (i, f) => {
719
- if (f.ownerDocument.activeElement === f) {
720
- const h = a.current === null ? [] : [...a.current.querySelectorAll(`[data-testid="${Ge}"]`)], v = h.indexOf(f), E = [h[v + 1], h[v - 1]].find((S) => S !== void 0);
721
- E === void 0 ? o() : E.focus();
725
+ const dt = /* @__PURE__ */ f.forwardRef(ar), We = "markdown-explorer-selection-remove", lr = ({ selection: e, onRemove: t, onClear: n, onOpenSelection: r, onLeave: o }) => {
726
+ const { labels: c } = $(), l = Re(), a = E(null), s = [...e], d = (i, p) => {
727
+ if (p.ownerDocument.activeElement === p) {
728
+ const h = a.current === null ? [] : [...a.current.querySelectorAll(`[data-testid="${We}"]`)], g = h.indexOf(p), v = [h[g + 1], h[g - 1]].find((O) => O !== void 0);
729
+ v === void 0 ? o() : v.focus();
722
730
  }
723
731
  t(i);
724
732
  }, u = () => {
725
733
  const i = a.current;
726
734
  i !== null && i.contains(i.ownerDocument.activeElement) && o(), n();
727
735
  };
728
- return /* @__PURE__ */ O("section", { ref: a, className: "aqmx-explorer-tray", "aria-labelledby": l, "data-testid": "markdown-explorer-selection-tray", children: [
729
- /* @__PURE__ */ O("div", { className: "aqmx-explorer-tray-header", children: [
736
+ return /* @__PURE__ */ L("section", { ref: a, className: "aqmx-explorer-tray", "aria-labelledby": l, "data-testid": "markdown-explorer-selection-tray", children: [
737
+ /* @__PURE__ */ L("div", { className: "aqmx-explorer-tray-header", children: [
730
738
  /* @__PURE__ */ m("p", { id: l, className: "aqmx-explorer-tray-title", children: c.selectionTitle(s.length) }),
731
739
  /* @__PURE__ */ m("button", { type: "button", className: "aqmx-explorer-tray-button", "data-testid": "markdown-explorer-selection-clear", onClick: u, children: c.clearSelection })
732
740
  ] }),
733
- /* @__PURE__ */ m("ul", { className: "aqmx-explorer-tray-list", children: s.map(([i, f]) => /* @__PURE__ */ O("li", { className: "aqmx-explorer-tray-item", children: [
734
- /* @__PURE__ */ m("span", { className: "aqmx-explorer-tray-name", title: i, children: f }),
741
+ /* @__PURE__ */ m("ul", { className: "aqmx-explorer-tray-list", children: s.map(([i, p]) => /* @__PURE__ */ L("li", { className: "aqmx-explorer-tray-item", children: [
742
+ /* @__PURE__ */ m("span", { className: "aqmx-explorer-tray-name", title: i, children: p }),
735
743
  /* @__PURE__ */ m(
736
744
  "button",
737
745
  {
738
746
  type: "button",
739
747
  className: "aqmx-icon-button aqmx-explorer-tray-remove",
740
- "aria-label": c.removeFromSelection(f),
741
- title: c.removeFromSelection(f),
742
- "data-testid": Ge,
748
+ "aria-label": c.removeFromSelection(p),
749
+ title: c.removeFromSelection(p),
750
+ "data-testid": We,
743
751
  "data-aqmx-path": i,
744
752
  onClick: (h) => d(i, h.currentTarget),
745
- children: /* @__PURE__ */ m(ct, { "aria-hidden": "true" })
753
+ children: /* @__PURE__ */ m(dt, { "aria-hidden": "true" })
746
754
  }
747
755
  )
748
756
  ] }, i)) }),
749
757
  r === void 0 ? null : /* @__PURE__ */ m("button", { type: "button", className: "aqmx-explorer-tray-open", "data-testid": "markdown-explorer-selection-open", onClick: () => r(s.map(([i]) => i)), children: c.openSelectionInMulti(s.length) })
750
758
  ] });
751
- }, Le = /* @__PURE__ */ new Map(), ar = (e, t) => {
759
+ }, Ae = /* @__PURE__ */ new Map(), or = (e, t) => {
752
760
  if (t.selected === e.has(t.path)) return e;
753
761
  const n = new Map(e);
754
762
  return t.selected ? n.set(t.path, t.name) : n.delete(t.path), n;
755
- }, lr = (e, t) => {
763
+ }, sr = (e, t) => {
756
764
  if (!e.has(t)) return e;
757
765
  const n = new Map(e);
758
766
  return n.delete(t), n;
759
- }, it = Pe(null), or = (e) => {
760
- const t = be(it);
761
- I(() => {
767
+ }, ut = qe(null), cr = (e) => {
768
+ const t = ye(ut);
769
+ H(() => {
762
770
  if (t !== null)
763
771
  return t(e), () => t(!1);
764
772
  }, [t, e]);
765
773
  };
766
- function sr({
774
+ function ir({
767
775
  title: e,
768
776
  titleId: t,
769
777
  ...n
770
778
  }, r) {
771
- return /* @__PURE__ */ p.createElement("svg", Object.assign({
779
+ return /* @__PURE__ */ f.createElement("svg", Object.assign({
772
780
  xmlns: "http://www.w3.org/2000/svg",
773
781
  viewBox: "0 0 24 24",
774
782
  fill: "currentColor",
@@ -776,21 +784,21 @@ function sr({
776
784
  "data-slot": "icon",
777
785
  ref: r,
778
786
  "aria-labelledby": t
779
- }, n), e ? /* @__PURE__ */ p.createElement("title", {
787
+ }, n), e ? /* @__PURE__ */ f.createElement("title", {
780
788
  id: t
781
- }, e) : null, /* @__PURE__ */ p.createElement("path", {
789
+ }, e) : null, /* @__PURE__ */ f.createElement("path", {
782
790
  fillRule: "evenodd",
783
791
  d: "M15 3.75a.75.75 0 0 1 .75-.75h4.5a.75.75 0 0 1 .75.75v4.5a.75.75 0 0 1-1.5 0V5.56l-3.97 3.97a.75.75 0 1 1-1.06-1.06l3.97-3.97h-2.69a.75.75 0 0 1-.75-.75Zm-12 0A.75.75 0 0 1 3.75 3h4.5a.75.75 0 0 1 0 1.5H5.56l3.97 3.97a.75.75 0 0 1-1.06 1.06L4.5 5.56v2.69a.75.75 0 0 1-1.5 0v-4.5Zm11.47 11.78a.75.75 0 1 1 1.06-1.06l3.97 3.97v-2.69a.75.75 0 0 1 1.5 0v4.5a.75.75 0 0 1-.75.75h-4.5a.75.75 0 0 1 0-1.5h2.69l-3.97-3.97Zm-4.94-1.06a.75.75 0 0 1 0 1.06L5.56 19.5h2.69a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1-.75-.75v-4.5a.75.75 0 0 1 1.5 0v2.69l3.97-3.97a.75.75 0 0 1 1.06 0Z",
784
792
  clipRule: "evenodd"
785
793
  }));
786
794
  }
787
- const cr = /* @__PURE__ */ p.forwardRef(sr);
788
- function ir({
795
+ const dr = /* @__PURE__ */ f.forwardRef(ir);
796
+ function ur({
789
797
  title: e,
790
798
  titleId: t,
791
799
  ...n
792
800
  }, r) {
793
- return /* @__PURE__ */ p.createElement("svg", Object.assign({
801
+ return /* @__PURE__ */ f.createElement("svg", Object.assign({
794
802
  xmlns: "http://www.w3.org/2000/svg",
795
803
  viewBox: "0 0 24 24",
796
804
  fill: "currentColor",
@@ -798,21 +806,21 @@ function ir({
798
806
  "data-slot": "icon",
799
807
  ref: r,
800
808
  "aria-labelledby": t
801
- }, n), e ? /* @__PURE__ */ p.createElement("title", {
809
+ }, n), e ? /* @__PURE__ */ f.createElement("title", {
802
810
  id: t
803
- }, e) : null, /* @__PURE__ */ p.createElement("path", {
811
+ }, e) : null, /* @__PURE__ */ f.createElement("path", {
804
812
  fillRule: "evenodd",
805
813
  d: "M6.97 2.47a.75.75 0 0 1 1.06 0l4.5 4.5a.75.75 0 0 1-1.06 1.06L8.25 4.81V16.5a.75.75 0 0 1-1.5 0V4.81L3.53 8.03a.75.75 0 0 1-1.06-1.06l4.5-4.5Zm9.53 4.28a.75.75 0 0 1 .75.75v11.69l3.22-3.22a.75.75 0 1 1 1.06 1.06l-4.5 4.5a.75.75 0 0 1-1.06 0l-4.5-4.5a.75.75 0 1 1 1.06-1.06l3.22 3.22V7.5a.75.75 0 0 1 .75-.75Z",
806
814
  clipRule: "evenodd"
807
815
  }));
808
816
  }
809
- const dr = /* @__PURE__ */ p.forwardRef(ir);
810
- function ur({
817
+ const mr = /* @__PURE__ */ f.forwardRef(ur);
818
+ function fr({
811
819
  title: e,
812
820
  titleId: t,
813
821
  ...n
814
822
  }, r) {
815
- return /* @__PURE__ */ p.createElement("svg", Object.assign({
823
+ return /* @__PURE__ */ f.createElement("svg", Object.assign({
816
824
  xmlns: "http://www.w3.org/2000/svg",
817
825
  viewBox: "0 0 24 24",
818
826
  fill: "currentColor",
@@ -820,21 +828,41 @@ function ur({
820
828
  "data-slot": "icon",
821
829
  ref: r,
822
830
  "aria-labelledby": t
823
- }, n), e ? /* @__PURE__ */ p.createElement("title", {
831
+ }, n), e ? /* @__PURE__ */ f.createElement("title", {
824
832
  id: t
825
- }, e) : null, /* @__PURE__ */ p.createElement("path", {
833
+ }, e) : null, /* @__PURE__ */ f.createElement("path", {
834
+ d: "M11.25 4.533A9.707 9.707 0 0 0 6 3a9.735 9.735 0 0 0-3.25.555.75.75 0 0 0-.5.707v14.25a.75.75 0 0 0 1 .707A8.237 8.237 0 0 1 6 18.75c1.995 0 3.823.707 5.25 1.886V4.533ZM12.75 20.636A8.214 8.214 0 0 1 18 18.75c.966 0 1.89.166 2.75.47a.75.75 0 0 0 1-.708V4.262a.75.75 0 0 0-.5-.707A9.735 9.735 0 0 0 18 3a9.707 9.707 0 0 0-5.25 1.533v16.103Z"
835
+ }));
836
+ }
837
+ const pr = /* @__PURE__ */ f.forwardRef(fr);
838
+ function hr({
839
+ title: e,
840
+ titleId: t,
841
+ ...n
842
+ }, r) {
843
+ return /* @__PURE__ */ f.createElement("svg", Object.assign({
844
+ xmlns: "http://www.w3.org/2000/svg",
845
+ viewBox: "0 0 24 24",
846
+ fill: "currentColor",
847
+ "aria-hidden": "true",
848
+ "data-slot": "icon",
849
+ ref: r,
850
+ "aria-labelledby": t
851
+ }, n), e ? /* @__PURE__ */ f.createElement("title", {
852
+ id: t
853
+ }, e) : null, /* @__PURE__ */ f.createElement("path", {
826
854
  fillRule: "evenodd",
827
855
  d: "M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm13.36-1.814a.75.75 0 1 0-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 0 0-1.06 1.06l2.25 2.25a.75.75 0 0 0 1.14-.094l3.75-5.25Z",
828
856
  clipRule: "evenodd"
829
857
  }));
830
858
  }
831
- const mr = /* @__PURE__ */ p.forwardRef(ur);
832
- function fr({
859
+ const xr = /* @__PURE__ */ f.forwardRef(hr);
860
+ function wr({
833
861
  title: e,
834
862
  titleId: t,
835
863
  ...n
836
864
  }, r) {
837
- return /* @__PURE__ */ p.createElement("svg", Object.assign({
865
+ return /* @__PURE__ */ f.createElement("svg", Object.assign({
838
866
  xmlns: "http://www.w3.org/2000/svg",
839
867
  viewBox: "0 0 24 24",
840
868
  fill: "currentColor",
@@ -842,21 +870,21 @@ function fr({
842
870
  "data-slot": "icon",
843
871
  ref: r,
844
872
  "aria-labelledby": t
845
- }, n), e ? /* @__PURE__ */ p.createElement("title", {
873
+ }, n), e ? /* @__PURE__ */ f.createElement("title", {
846
874
  id: t
847
- }, e) : null, /* @__PURE__ */ p.createElement("path", {
875
+ }, e) : null, /* @__PURE__ */ f.createElement("path", {
848
876
  fillRule: "evenodd",
849
877
  d: "M7.72 12.53a.75.75 0 0 1 0-1.06l7.5-7.5a.75.75 0 1 1 1.06 1.06L9.31 12l6.97 6.97a.75.75 0 1 1-1.06 1.06l-7.5-7.5Z",
850
878
  clipRule: "evenodd"
851
879
  }));
852
880
  }
853
- const pr = /* @__PURE__ */ p.forwardRef(fr);
854
- function hr({
881
+ const gr = /* @__PURE__ */ f.forwardRef(wr);
882
+ function vr({
855
883
  title: e,
856
884
  titleId: t,
857
885
  ...n
858
886
  }, r) {
859
- return /* @__PURE__ */ p.createElement("svg", Object.assign({
887
+ return /* @__PURE__ */ f.createElement("svg", Object.assign({
860
888
  xmlns: "http://www.w3.org/2000/svg",
861
889
  viewBox: "0 0 24 24",
862
890
  fill: "currentColor",
@@ -864,21 +892,21 @@ function hr({
864
892
  "data-slot": "icon",
865
893
  ref: r,
866
894
  "aria-labelledby": t
867
- }, n), e ? /* @__PURE__ */ p.createElement("title", {
895
+ }, n), e ? /* @__PURE__ */ f.createElement("title", {
868
896
  id: t
869
- }, e) : null, /* @__PURE__ */ p.createElement("path", {
897
+ }, e) : null, /* @__PURE__ */ f.createElement("path", {
870
898
  fillRule: "evenodd",
871
899
  d: "M11.47 4.72a.75.75 0 0 1 1.06 0l3.75 3.75a.75.75 0 0 1-1.06 1.06L12 6.31 8.78 9.53a.75.75 0 0 1-1.06-1.06l3.75-3.75Zm-3.75 9.75a.75.75 0 0 1 1.06 0L12 17.69l3.22-3.22a.75.75 0 1 1 1.06 1.06l-3.75 3.75a.75.75 0 0 1-1.06 0l-3.75-3.75a.75.75 0 0 1 0-1.06Z",
872
900
  clipRule: "evenodd"
873
901
  }));
874
902
  }
875
- const xr = /* @__PURE__ */ p.forwardRef(hr);
876
- function wr({
903
+ const br = /* @__PURE__ */ f.forwardRef(vr);
904
+ function Er({
877
905
  title: e,
878
906
  titleId: t,
879
907
  ...n
880
908
  }, r) {
881
- return /* @__PURE__ */ p.createElement("svg", Object.assign({
909
+ return /* @__PURE__ */ f.createElement("svg", Object.assign({
882
910
  xmlns: "http://www.w3.org/2000/svg",
883
911
  viewBox: "0 0 24 24",
884
912
  fill: "currentColor",
@@ -886,21 +914,21 @@ function wr({
886
914
  "data-slot": "icon",
887
915
  ref: r,
888
916
  "aria-labelledby": t
889
- }, n), e ? /* @__PURE__ */ p.createElement("title", {
917
+ }, n), e ? /* @__PURE__ */ f.createElement("title", {
890
918
  id: t
891
- }, e) : null, /* @__PURE__ */ p.createElement("path", {
919
+ }, e) : null, /* @__PURE__ */ f.createElement("path", {
892
920
  fillRule: "evenodd",
893
921
  d: "M11.078 2.25c-.917 0-1.699.663-1.85 1.567L9.05 4.889c-.02.12-.115.26-.297.348a7.493 7.493 0 0 0-.986.57c-.166.115-.334.126-.45.083L6.3 5.508a1.875 1.875 0 0 0-2.282.819l-.922 1.597a1.875 1.875 0 0 0 .432 2.385l.84.692c.095.078.17.229.154.43a7.598 7.598 0 0 0 0 1.139c.015.2-.059.352-.153.43l-.841.692a1.875 1.875 0 0 0-.432 2.385l.922 1.597a1.875 1.875 0 0 0 2.282.818l1.019-.382c.115-.043.283-.031.45.082.312.214.641.405.985.57.182.088.277.228.297.35l.178 1.071c.151.904.933 1.567 1.85 1.567h1.844c.916 0 1.699-.663 1.85-1.567l.178-1.072c.02-.12.114-.26.297-.349.344-.165.673-.356.985-.57.167-.114.335-.125.45-.082l1.02.382a1.875 1.875 0 0 0 2.28-.819l.923-1.597a1.875 1.875 0 0 0-.432-2.385l-.84-.692c-.095-.078-.17-.229-.154-.43a7.614 7.614 0 0 0 0-1.139c-.016-.2.059-.352.153-.43l.84-.692c.708-.582.891-1.59.433-2.385l-.922-1.597a1.875 1.875 0 0 0-2.282-.818l-1.02.382c-.114.043-.282.031-.449-.083a7.49 7.49 0 0 0-.985-.57c-.183-.087-.277-.227-.297-.348l-.179-1.072a1.875 1.875 0 0 0-1.85-1.567h-1.843ZM12 15.75a3.75 3.75 0 1 0 0-7.5 3.75 3.75 0 0 0 0 7.5Z",
894
922
  clipRule: "evenodd"
895
923
  }));
896
924
  }
897
- const gr = /* @__PURE__ */ p.forwardRef(wr);
898
- function vr({
925
+ const yr = /* @__PURE__ */ f.forwardRef(Er);
926
+ function Rr({
899
927
  title: e,
900
928
  titleId: t,
901
929
  ...n
902
930
  }, r) {
903
- return /* @__PURE__ */ p.createElement("svg", Object.assign({
931
+ return /* @__PURE__ */ f.createElement("svg", Object.assign({
904
932
  xmlns: "http://www.w3.org/2000/svg",
905
933
  viewBox: "0 0 24 24",
906
934
  fill: "currentColor",
@@ -908,21 +936,21 @@ function vr({
908
936
  "data-slot": "icon",
909
937
  ref: r,
910
938
  "aria-labelledby": t
911
- }, n), e ? /* @__PURE__ */ p.createElement("title", {
939
+ }, n), e ? /* @__PURE__ */ f.createElement("title", {
912
940
  id: t
913
- }, e) : null, /* @__PURE__ */ p.createElement("path", {
941
+ }, e) : null, /* @__PURE__ */ f.createElement("path", {
914
942
  fillRule: "evenodd",
915
943
  d: "M12 1.5a.75.75 0 0 1 .75.75V4.5a.75.75 0 0 1-1.5 0V2.25A.75.75 0 0 1 12 1.5ZM5.636 4.136a.75.75 0 0 1 1.06 0l1.592 1.591a.75.75 0 0 1-1.061 1.06l-1.591-1.59a.75.75 0 0 1 0-1.061Zm12.728 0a.75.75 0 0 1 0 1.06l-1.591 1.592a.75.75 0 0 1-1.06-1.061l1.59-1.591a.75.75 0 0 1 1.061 0Zm-6.816 4.496a.75.75 0 0 1 .82.311l5.228 7.917a.75.75 0 0 1-.777 1.148l-2.097-.43 1.045 3.9a.75.75 0 0 1-1.45.388l-1.044-3.899-1.601 1.42a.75.75 0 0 1-1.247-.606l.569-9.47a.75.75 0 0 1 .554-.68ZM3 10.5a.75.75 0 0 1 .75-.75H6a.75.75 0 0 1 0 1.5H3.75A.75.75 0 0 1 3 10.5Zm14.25 0a.75.75 0 0 1 .75-.75h2.25a.75.75 0 0 1 0 1.5H18a.75.75 0 0 1-.75-.75Zm-8.962 3.712a.75.75 0 0 1 0 1.061l-1.591 1.591a.75.75 0 1 1-1.061-1.06l1.591-1.592a.75.75 0 0 1 1.06 0Z",
916
944
  clipRule: "evenodd"
917
945
  }));
918
946
  }
919
- const br = /* @__PURE__ */ p.forwardRef(vr);
920
- function Er({
947
+ const Sr = /* @__PURE__ */ f.forwardRef(Rr);
948
+ function Tr({
921
949
  title: e,
922
950
  titleId: t,
923
951
  ...n
924
952
  }, r) {
925
- return /* @__PURE__ */ p.createElement("svg", Object.assign({
953
+ return /* @__PURE__ */ f.createElement("svg", Object.assign({
926
954
  xmlns: "http://www.w3.org/2000/svg",
927
955
  viewBox: "0 0 24 24",
928
956
  fill: "currentColor",
@@ -930,23 +958,23 @@ function Er({
930
958
  "data-slot": "icon",
931
959
  ref: r,
932
960
  "aria-labelledby": t
933
- }, n), e ? /* @__PURE__ */ p.createElement("title", {
961
+ }, n), e ? /* @__PURE__ */ f.createElement("title", {
934
962
  id: t
935
- }, e) : null, /* @__PURE__ */ p.createElement("path", {
963
+ }, e) : null, /* @__PURE__ */ f.createElement("path", {
936
964
  fillRule: "evenodd",
937
965
  d: "M5.625 1.5c-1.036 0-1.875.84-1.875 1.875v17.25c0 1.035.84 1.875 1.875 1.875h12.75c1.035 0 1.875-.84 1.875-1.875V12.75A3.75 3.75 0 0 0 16.5 9h-1.875a1.875 1.875 0 0 1-1.875-1.875V5.25A3.75 3.75 0 0 0 9 1.5H5.625ZM7.5 15a.75.75 0 0 1 .75-.75h7.5a.75.75 0 0 1 0 1.5h-7.5A.75.75 0 0 1 7.5 15Zm.75 2.25a.75.75 0 0 0 0 1.5H12a.75.75 0 0 0 0-1.5H8.25Z",
938
966
  clipRule: "evenodd"
939
- }), /* @__PURE__ */ p.createElement("path", {
967
+ }), /* @__PURE__ */ f.createElement("path", {
940
968
  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"
941
969
  }));
942
970
  }
943
- const yr = /* @__PURE__ */ p.forwardRef(Er);
944
- function Rr({
971
+ const Nr = /* @__PURE__ */ f.forwardRef(Tr);
972
+ function kr({
945
973
  title: e,
946
974
  titleId: t,
947
975
  ...n
948
976
  }, r) {
949
- return /* @__PURE__ */ p.createElement("svg", Object.assign({
977
+ return /* @__PURE__ */ f.createElement("svg", Object.assign({
950
978
  xmlns: "http://www.w3.org/2000/svg",
951
979
  viewBox: "0 0 24 24",
952
980
  fill: "currentColor",
@@ -954,19 +982,19 @@ function Rr({
954
982
  "data-slot": "icon",
955
983
  ref: r,
956
984
  "aria-labelledby": t
957
- }, n), e ? /* @__PURE__ */ p.createElement("title", {
985
+ }, n), e ? /* @__PURE__ */ f.createElement("title", {
958
986
  id: t
959
- }, e) : null, /* @__PURE__ */ p.createElement("path", {
987
+ }, e) : null, /* @__PURE__ */ f.createElement("path", {
960
988
  d: "M19.5 21a3 3 0 0 0 3-3v-4.5a3 3 0 0 0-3-3h-15a3 3 0 0 0-3 3V18a3 3 0 0 0 3 3h15ZM1.5 10.146V6a3 3 0 0 1 3-3h5.379a2.25 2.25 0 0 1 1.59.659l2.122 2.121c.14.141.331.22.53.22H19.5a3 3 0 0 1 3 3v1.146A4.483 4.483 0 0 0 19.5 9h-15a4.483 4.483 0 0 0-3 1.146Z"
961
989
  }));
962
990
  }
963
- const Sr = /* @__PURE__ */ p.forwardRef(Rr);
964
- function Tr({
991
+ const Ar = /* @__PURE__ */ f.forwardRef(kr);
992
+ function Lr({
965
993
  title: e,
966
994
  titleId: t,
967
995
  ...n
968
996
  }, r) {
969
- return /* @__PURE__ */ p.createElement("svg", Object.assign({
997
+ return /* @__PURE__ */ f.createElement("svg", Object.assign({
970
998
  xmlns: "http://www.w3.org/2000/svg",
971
999
  viewBox: "0 0 24 24",
972
1000
  fill: "currentColor",
@@ -974,19 +1002,19 @@ function Tr({
974
1002
  "data-slot": "icon",
975
1003
  ref: r,
976
1004
  "aria-labelledby": t
977
- }, n), e ? /* @__PURE__ */ p.createElement("title", {
1005
+ }, n), e ? /* @__PURE__ */ f.createElement("title", {
978
1006
  id: t
979
- }, e) : null, /* @__PURE__ */ p.createElement("path", {
1007
+ }, e) : null, /* @__PURE__ */ f.createElement("path", {
980
1008
  d: "M19.906 9c.382 0 .749.057 1.094.162V9a3 3 0 0 0-3-3h-3.879a.75.75 0 0 1-.53-.22L11.47 3.66A2.25 2.25 0 0 0 9.879 3H6a3 3 0 0 0-3 3v3.162A3.756 3.756 0 0 1 4.094 9h15.812ZM4.094 10.5a2.25 2.25 0 0 0-2.227 2.568l.857 6A2.25 2.25 0 0 0 4.951 21H19.05a2.25 2.25 0 0 0 2.227-1.932l.857-6a2.25 2.25 0 0 0-2.227-2.568H4.094Z"
981
1009
  }));
982
1010
  }
983
- const Nr = /* @__PURE__ */ p.forwardRef(Tr);
984
- function Lr({
1011
+ const Or = /* @__PURE__ */ f.forwardRef(Lr);
1012
+ function Pr({
985
1013
  title: e,
986
1014
  titleId: t,
987
1015
  ...n
988
1016
  }, r) {
989
- return /* @__PURE__ */ p.createElement("svg", Object.assign({
1017
+ return /* @__PURE__ */ f.createElement("svg", Object.assign({
990
1018
  xmlns: "http://www.w3.org/2000/svg",
991
1019
  viewBox: "0 0 24 24",
992
1020
  fill: "currentColor",
@@ -994,21 +1022,21 @@ function Lr({
994
1022
  "data-slot": "icon",
995
1023
  ref: r,
996
1024
  "aria-labelledby": t
997
- }, n), e ? /* @__PURE__ */ p.createElement("title", {
1025
+ }, n), e ? /* @__PURE__ */ f.createElement("title", {
998
1026
  id: t
999
- }, e) : null, /* @__PURE__ */ p.createElement("path", {
1027
+ }, e) : null, /* @__PURE__ */ f.createElement("path", {
1000
1028
  fillRule: "evenodd",
1001
1029
  d: "M10.5 3.75a6.75 6.75 0 1 0 0 13.5 6.75 6.75 0 0 0 0-13.5ZM2.25 10.5a8.25 8.25 0 1 1 14.59 5.28l4.69 4.69a.75.75 0 1 1-1.06 1.06l-4.69-4.69A8.25 8.25 0 0 1 2.25 10.5Zm8.25-3.75a.75.75 0 0 1 .75.75v2.25h2.25a.75.75 0 0 1 0 1.5h-2.25v2.25a.75.75 0 0 1-1.5 0v-2.25H7.5a.75.75 0 0 1 0-1.5h2.25V7.5a.75.75 0 0 1 .75-.75Z",
1002
1030
  clipRule: "evenodd"
1003
1031
  }));
1004
1032
  }
1005
- const kr = /* @__PURE__ */ p.forwardRef(Lr);
1006
- function Or({
1033
+ const qr = /* @__PURE__ */ f.forwardRef(Pr);
1034
+ function Cr({
1007
1035
  title: e,
1008
1036
  titleId: t,
1009
1037
  ...n
1010
1038
  }, r) {
1011
- return /* @__PURE__ */ p.createElement("svg", Object.assign({
1039
+ return /* @__PURE__ */ f.createElement("svg", Object.assign({
1012
1040
  xmlns: "http://www.w3.org/2000/svg",
1013
1041
  viewBox: "0 0 24 24",
1014
1042
  fill: "currentColor",
@@ -1016,32 +1044,33 @@ function Or({
1016
1044
  "data-slot": "icon",
1017
1045
  ref: r,
1018
1046
  "aria-labelledby": t
1019
- }, n), e ? /* @__PURE__ */ p.createElement("title", {
1047
+ }, n), e ? /* @__PURE__ */ f.createElement("title", {
1020
1048
  id: t
1021
- }, e) : null, /* @__PURE__ */ p.createElement("path", {
1049
+ }, e) : null, /* @__PURE__ */ f.createElement("path", {
1022
1050
  d: "M5.625 3.75a2.625 2.625 0 1 0 0 5.25h12.75a2.625 2.625 0 0 0 0-5.25H5.625ZM3.75 11.25a.75.75 0 0 0 0 1.5h16.5a.75.75 0 0 0 0-1.5H3.75ZM3 15.75a.75.75 0 0 1 .75-.75h16.5a.75.75 0 0 1 0 1.5H3.75a.75.75 0 0 1-.75-.75ZM3.75 18.75a.75.75 0 0 0 0 1.5h16.5a.75.75 0 0 0 0-1.5H3.75Z"
1023
1051
  }));
1024
1052
  }
1025
- const Ar = /* @__PURE__ */ p.forwardRef(Or), Pr = Object.freeze({
1026
- sortMode: dr,
1027
- folderPlacement: Sr,
1028
- selectionMode: mr,
1029
- doubleClickAction: br,
1030
- expandIconSize: kr,
1031
- alwaysExpanded: cr,
1032
- revealDocument: kt,
1033
- removeRootIndent: pr,
1034
- lines: Ar,
1035
- expandIcons: xr,
1036
- directoryIcons: Nr,
1037
- fileIcons: yr
1038
- }), dt = (e, t) => {
1053
+ const Fr = /* @__PURE__ */ f.forwardRef(Cr), Mr = Object.freeze({
1054
+ sortMode: mr,
1055
+ folderPlacement: Ar,
1056
+ readmePlacement: pr,
1057
+ selectionMode: xr,
1058
+ doubleClickAction: Sr,
1059
+ expandIconSize: qr,
1060
+ alwaysExpanded: dr,
1061
+ revealDocument: Lt,
1062
+ removeRootIndent: gr,
1063
+ lines: Fr,
1064
+ expandIcons: br,
1065
+ directoryIcons: Or,
1066
+ fileIcons: Nr
1067
+ }), mt = (e, t) => {
1039
1068
  const n = e[t.labelKey];
1040
1069
  if (typeof n != "string") throw new TypeError(`[markdown-explorer] the tree setting ${t.key} must name a string label; labels.${t.labelKey} is a ${typeof n}`);
1041
1070
  return n;
1042
- }, qr = ({ id: e, settings: t, descriptors: n, onAdvance: r, onClose: o, ref: c }) => {
1043
- const { labels: l } = D(), a = g([]);
1044
- _(() => {
1071
+ }, _r = ({ id: e, settings: t, descriptors: n, onAdvance: r, onClose: o, ref: c }) => {
1072
+ const { labels: l } = $(), a = E([]);
1073
+ D(() => {
1045
1074
  a.current[0]?.focus();
1046
1075
  }, []);
1047
1076
  const s = w(
@@ -1066,7 +1095,7 @@ const Ar = /* @__PURE__ */ p.forwardRef(Or), Pr = Object.freeze({
1066
1095
  u.preventDefault(), s(n.length - 1);
1067
1096
  break;
1068
1097
  case "Escape":
1069
- Ae(u), o();
1098
+ Pe(u), o();
1070
1099
  break;
1071
1100
  case "Tab":
1072
1101
  o();
@@ -1076,58 +1105,58 @@ const Ar = /* @__PURE__ */ p.forwardRef(Or), Pr = Object.freeze({
1076
1105
  [n.length, s, o]
1077
1106
  );
1078
1107
  return /* @__PURE__ */ m("div", { ref: c, id: e, role: "menu", "aria-label": l.treeSettings, className: "aqmx-explorer-menu", "data-testid": "markdown-explorer-tree-settings-menu", children: n.map((u, i) => {
1079
- const f = Pr[u.key], h = dt(l, u), v = Je(l, t, u.key), E = t[u.key], S = typeof E == "boolean" ? { role: "menuitemcheckbox", "aria-checked": E, "aria-label": h } : { role: "menuitem", "aria-label": `${h}: ${v}` };
1080
- return /* @__PURE__ */ O(
1108
+ const p = Mr[u.key], h = mt(l, u), g = tt(l, t, u.key), v = t[u.key], O = typeof v == "boolean" ? { role: "menuitemcheckbox", "aria-checked": v, "aria-label": h } : { role: "menuitem", "aria-label": `${h}: ${g}` };
1109
+ return /* @__PURE__ */ L(
1081
1110
  "button",
1082
1111
  {
1083
- ref: (C) => {
1084
- a.current[i] = C;
1112
+ ref: (A) => {
1113
+ a.current[i] = A;
1085
1114
  },
1086
1115
  type: "button",
1087
1116
  tabIndex: -1,
1088
- ...S,
1089
- title: `${h}: ${v}`,
1117
+ ...O,
1118
+ title: `${h}: ${g}`,
1090
1119
  className: "aqmx-explorer-menu-item",
1091
1120
  "data-testid": "markdown-explorer-tree-settings-item",
1092
1121
  "data-aqmx-setting": u.key,
1093
1122
  onClick: () => r(u),
1094
- onKeyDown: (C) => d(C, i),
1123
+ onKeyDown: (A) => d(A, i),
1095
1124
  children: [
1096
- /* @__PURE__ */ m(f, { className: "aqmx-explorer-menu-icon", "aria-hidden": "true" }),
1125
+ /* @__PURE__ */ m(p, { className: "aqmx-explorer-menu-icon", "aria-hidden": "true" }),
1097
1126
  /* @__PURE__ */ m("span", { className: "aqmx-explorer-menu-name", children: h }),
1098
- /* @__PURE__ */ m("span", { className: "aqmx-explorer-menu-value", children: v })
1127
+ /* @__PURE__ */ m("span", { className: "aqmx-explorer-menu-value", children: g })
1099
1128
  ]
1100
1129
  },
1101
1130
  u.key
1102
1131
  );
1103
1132
  }) });
1104
- }, Cr = ({ settings: e, descriptors: t, onAdvance: n }) => {
1105
- const { labels: r, announcer: o } = D(), [c, l] = q(!1), a = g(null), s = g(null), d = g(null), u = ye(), i = w(() => {
1133
+ }, Ir = ({ settings: e, descriptors: t, onAdvance: n }) => {
1134
+ const { labels: r, announcer: o } = $(), [c, l] = F(!1), a = E(null), s = E(null), d = E(null), u = Re(), i = w(() => {
1106
1135
  a.current?.focus(), l(!1);
1107
1136
  }, []);
1108
- _(() => {
1137
+ D(() => {
1109
1138
  if (!c) return;
1110
- const v = (E) => {
1111
- E.target instanceof Node && (a.current?.contains(E.target) === !0 || s.current?.contains(E.target) === !0) || (l(!1), d.current !== null && window.clearTimeout(d.current), d.current = window.setTimeout(() => {
1139
+ const g = (v) => {
1140
+ v.target instanceof Node && (a.current?.contains(v.target) === !0 || s.current?.contains(v.target) === !0) || (l(!1), d.current !== null && window.clearTimeout(d.current), d.current = window.setTimeout(() => {
1112
1141
  d.current = null, (document.activeElement === null || document.activeElement === document.body) && a.current?.focus();
1113
1142
  }, 0));
1114
1143
  };
1115
- return document.addEventListener("pointerdown", v), () => document.removeEventListener("pointerdown", v);
1116
- }, [c]), _(
1144
+ return document.addEventListener("pointerdown", g), () => document.removeEventListener("pointerdown", g);
1145
+ }, [c]), D(
1117
1146
  () => () => {
1118
1147
  d.current !== null && window.clearTimeout(d.current);
1119
1148
  },
1120
1149
  []
1121
1150
  );
1122
- const f = w(
1123
- (v) => {
1124
- v.key !== "Escape" || !c || (Ae(v), i());
1151
+ const p = w(
1152
+ (g) => {
1153
+ g.key !== "Escape" || !c || (Pe(g), i());
1125
1154
  },
1126
1155
  [c, i]
1127
1156
  ), h = w(
1128
- (v) => {
1129
- const E = n(v.key);
1130
- o.announce(r.settingAnnouncement(dt(r, v), Je(r, E, v.key)));
1157
+ (g) => {
1158
+ const v = n(g.key);
1159
+ o.announce(r.settingAnnouncement(mt(r, g), tt(r, v, g.key)));
1131
1160
  },
1132
1161
  [o, r, n]
1133
1162
  );
@@ -1144,73 +1173,73 @@ const Ar = /* @__PURE__ */ p.forwardRef(Or), Pr = Object.freeze({
1144
1173
  "aria-label": r.treeSettings,
1145
1174
  title: r.treeSettings,
1146
1175
  "data-testid": "markdown-explorer-tree-settings",
1147
- onClick: () => l((v) => !v),
1148
- onKeyDown: f,
1149
- children: /* @__PURE__ */ m(gr, { "aria-hidden": "true" })
1176
+ onClick: () => l((g) => !g),
1177
+ onKeyDown: p,
1178
+ children: /* @__PURE__ */ m(yr, { "aria-hidden": "true" })
1150
1179
  }
1151
1180
  ),
1152
- menu: c ? /* @__PURE__ */ m(qr, { ref: s, id: u, settings: e, descriptors: t, onAdvance: h, onClose: i }) : null
1181
+ menu: c ? /* @__PURE__ */ m(_r, { ref: s, id: u, settings: e, descriptors: t, onAdvance: h, onClose: i }) : null
1153
1182
  };
1154
- }, Fr = () => {
1155
- const { treeSettings: e } = D();
1156
- return { settings: Ee(e.subscribe, e.getSnapshot, e.getServerSnapshot), advance: e.advance };
1157
- }, Ue = /* @__PURE__ */ new Set(), Mr = '[role="tree"] [role="treeitem"][tabindex="0"]', _r = "[data-directory-tree-tab-stop]", oa = (e) => {
1158
- const { mode: t, sourceId: n, currentPath: r, openPaths: o, onOpenDocument: c, onSourceChange: l, onRevealSource: a, viewSwitch: s } = e, { labels: d, sources: u, trees: i, documents: f, announcer: h, reveals: v } = D(), { settings: E, advance: S } = Fr(), C = F(() => _t(t === "tree"), [t]), T = t === "tree" && E.selectionMode === "multiple";
1159
- or(T);
1160
- const L = e.mode === "tree" ? e.tray.onGatheredChange : null, Z = e.mode === "tree" ? e.onOpenSelection : void 0, M = e.mode === "tree" && T ? e.tray.gathered : Le, k = w(
1161
- (N) => {
1162
- const Y = S(N);
1163
- return Y.selectionMode !== "multiple" && L?.(Le), Y;
1183
+ }, Dr = () => {
1184
+ const { treeSettings: e } = $();
1185
+ return { settings: Ce(e.subscribe, e.getSnapshot, e.getServerSnapshot), advance: e.advance };
1186
+ }, Xe = /* @__PURE__ */ new Set(), Hr = '[role="tree"] [role="treeitem"][tabindex="0"]', $r = "[data-directory-tree-tab-stop]", ca = (e) => {
1187
+ const { mode: t, sourceId: n, currentPath: r, openPaths: o, onOpenDocument: c, onSourceChange: l, onRevealSource: a, viewSwitch: s } = e, { labels: d, sources: u, trees: i, documents: p, announcer: h, reveals: g } = $(), { settings: v, advance: O } = Dr(), A = C(() => It(t === "tree"), [t]), q = t === "tree" && v.selectionMode === "multiple";
1188
+ cr(q);
1189
+ const y = e.mode === "tree" ? e.tray.onGatheredChange : null, Z = e.mode === "tree" ? e.onOpenSelection : void 0, N = e.mode === "tree" ? e.onOpenFolder : null, R = e.mode === "tree" && e.currentFolder, k = C(() => N === null ? null : { current: r, open: N }, [N, r]), S = e.mode === "tree" && q ? e.tray.gathered : Ae, b = w(
1190
+ (P) => {
1191
+ const I = O(P);
1192
+ return I.selectionMode !== "multiple" && y?.(Ae), I;
1164
1193
  },
1165
- [S, L]
1166
- ), b = Cr({ settings: E, descriptors: C, onAdvance: k }), R = w((N) => L?.((Y) => ar(Y, N)), [L]), y = w((N) => L?.((Y) => lr(Y, N)), [L]), A = w(() => L?.(Le), [L]), H = g(null), de = w(() => {
1167
- const N = H.current;
1168
- if (N === null) return;
1169
- [Mr, _r, '[data-testid="markdown-explorer-tree-settings"]'].map((z) => N.querySelector(z)).find((z) => z !== null)?.focus();
1170
- }, []), W = F(() => new Set(M.keys()), [M]), B = F(() => r === null ? Ue : /* @__PURE__ */ new Set([r]), [r]), ee = F(() => {
1194
+ [O, y]
1195
+ ), _ = Ir({ settings: v, descriptors: A, onAdvance: b }), B = w((P) => y?.((I) => or(I, P)), [y]), ie = w((P) => y?.((I) => sr(I, P)), [y]), re = w(() => y?.(Ae), [y]), K = E(null), U = w(() => {
1196
+ const P = K.current;
1197
+ if (P === null) return;
1198
+ [Hr, $r, '[data-testid="markdown-explorer-tree-settings"]'].map((V) => P.querySelector(V)).find((V) => V !== null)?.focus();
1199
+ }, []), ae = C(() => new Set(S.keys()), [S]), z = C(() => r === null ? Xe : /* @__PURE__ */ new Set([r]), [r]), Q = C(() => {
1171
1200
  if (t === "multi") return { mode: "multiple", items: o, shownPath: null, onChange: null };
1172
- switch (E.selectionMode) {
1201
+ switch (v.selectionMode) {
1173
1202
  case "single":
1174
- return { mode: "single", items: B, shownPath: r, onChange: null };
1203
+ return { mode: "single", items: z, shownPath: r, onChange: null };
1175
1204
  case "multiple":
1176
- return { mode: "multiple", items: W, shownPath: r, onChange: R };
1205
+ return { mode: "multiple", items: ae, shownPath: r, onChange: B };
1177
1206
  case "none":
1178
- return { mode: "none", items: Ue, shownPath: null, onChange: null };
1207
+ return { mode: "none", items: Xe, shownPath: null, onChange: null };
1179
1208
  }
1180
- }, [t, o, E.selectionMode, B, r, W, R]), K = F(() => E.revealDocument ? { path: r, openFolders: !0 } : { path: ee.shownPath, openFolders: !1 }, [E.revealDocument, r, ee.shownPath]), ae = w(
1181
- (N) => {
1182
- r !== null && v.settle(r), l(N);
1209
+ }, [t, o, v.selectionMode, z, r, ae, B]), J = C(() => v.revealDocument ? { path: r, openFolders: !R } : { path: Q.shownPath, openFolders: !1 }, [v.revealDocument, r, R, Q.shownPath]), ee = w(
1210
+ (P) => {
1211
+ r !== null && g.settle(r), l(P);
1183
1212
  },
1184
- [r, v, l]
1185
- ), [V, le] = q(null), [X, $] = q(!1), [G, ue] = q(null), U = g(!1), ce = w(async () => {
1186
- if (!U.current) {
1187
- U.current = !0, $(!0), ue(null);
1213
+ [r, g, l]
1214
+ ), [M, le] = F(null), [de, he] = F(!1), [oe, G] = F(null), te = E(!1), we = w(async () => {
1215
+ if (!te.current) {
1216
+ te.current = !0, he(!0), G(null);
1188
1217
  try {
1189
- const N = await i.refresh(n);
1190
- if (N.status === "superseded") return;
1191
- f.invalidate(), N.status === "failed" ? ue({ sourceId: n, failure: N.failure }) : h.announce(d.treeRefreshed);
1218
+ const P = await i.refresh(n);
1219
+ if (P.status === "superseded") return;
1220
+ p.invalidate(), P.status === "failed" ? G({ sourceId: n, failure: P.failure }) : h.announce(d.treeRefreshed);
1192
1221
  } finally {
1193
- U.current = !1, $(!1);
1222
+ te.current = !1, he(!1);
1194
1223
  }
1195
1224
  }
1196
- }, [i, f, n, h, d]), me = V === null ? null : V.expandAll, oe = V?.expanding === !0, he = u.find((N) => N.id === n), fe = s.target === "multi" ? ln : rn, te = s.target === "multi" ? d.switchToMulti : d.switchToTree;
1197
- return /* @__PURE__ */ O("nav", { ref: H, "aria-label": d.explorerRegion, className: "aqmx-explorer", "data-testid": "markdown-explorer-explorer", "data-aqmx-mode": t, children: [
1198
- /* @__PURE__ */ O("div", { className: "aqmx-explorer-header", children: [
1199
- u.length > 1 ? /* @__PURE__ */ m("select", { className: "aqmx-explorer-source", "aria-label": d.sourceLabel, title: he?.label, value: n, onChange: (N) => ae(N.currentTarget.value), "data-testid": "markdown-explorer-source-select", children: u.map((N) => /* @__PURE__ */ m("option", { value: N.id, children: N.label }, N.id)) }) : null,
1200
- /* @__PURE__ */ O("div", { className: "aqmx-explorer-actions", children: [
1201
- /* @__PURE__ */ m(Ot, { to: s.href, navigation: "switch-view", className: "aqmx-icon-button", "aria-label": te, title: te, "data-testid": "markdown-explorer-view-switch", "data-aqmx-target": s.target, children: /* @__PURE__ */ m(fe, { "aria-hidden": "true" }) }),
1202
- /* @__PURE__ */ O(
1225
+ }, [i, p, n, h, d]), ue = M === null ? null : M.expandAll, me = M?.expanding === !0, xe = u.find((P) => P.id === n), se = s.target === "multi" ? sn : ln, W = s.target === "multi" ? d.switchToMulti : d.switchToTree;
1226
+ return /* @__PURE__ */ L("nav", { ref: K, "aria-label": d.explorerRegion, className: "aqmx-explorer", "data-testid": "markdown-explorer-explorer", "data-aqmx-mode": t, children: [
1227
+ /* @__PURE__ */ L("div", { className: "aqmx-explorer-header", children: [
1228
+ u.length > 1 ? /* @__PURE__ */ m("select", { className: "aqmx-explorer-source", "aria-label": d.sourceLabel, title: xe?.label, value: n, onChange: (P) => ee(P.currentTarget.value), "data-testid": "markdown-explorer-source-select", children: u.map((P) => /* @__PURE__ */ m("option", { value: P.id, children: P.label }, P.id)) }) : null,
1229
+ /* @__PURE__ */ L("div", { className: "aqmx-explorer-actions", children: [
1230
+ /* @__PURE__ */ m(Ot, { to: s.href, navigation: "switch-view", className: "aqmx-icon-button", "aria-label": W, title: W, "data-testid": "markdown-explorer-view-switch", "data-aqmx-target": s.target, children: /* @__PURE__ */ m(se, { "aria-hidden": "true" }) }),
1231
+ /* @__PURE__ */ L(
1203
1232
  "button",
1204
1233
  {
1205
1234
  type: "button",
1206
1235
  className: "aqmx-icon-button aqmx-labelled-button",
1207
1236
  title: d.refreshTree,
1208
- "aria-disabled": X,
1209
- "aria-busy": X,
1210
- "data-aqmx-busy": X ? "true" : void 0,
1237
+ "aria-disabled": de,
1238
+ "aria-busy": de,
1239
+ "data-aqmx-busy": de ? "true" : void 0,
1211
1240
  "data-testid": "markdown-explorer-refresh",
1212
1241
  onClick: () => {
1213
- ce();
1242
+ we();
1214
1243
  },
1215
1244
  children: [
1216
1245
  /* @__PURE__ */ m(Oe, { "aria-hidden": "true" }),
@@ -1225,36 +1254,33 @@ const Ar = /* @__PURE__ */ p.forwardRef(Or), Pr = Object.freeze({
1225
1254
  className: "aqmx-icon-button",
1226
1255
  "aria-label": d.expandAll,
1227
1256
  title: d.expandAll,
1228
- "aria-disabled": me === null || oe,
1229
- "aria-busy": oe,
1230
- "data-aqmx-busy": oe ? "true" : void 0,
1257
+ "aria-disabled": ue === null || me,
1258
+ "aria-busy": me,
1259
+ "data-aqmx-busy": me ? "true" : void 0,
1231
1260
  "data-testid": "markdown-explorer-expand-all",
1232
- onClick: () => me?.(),
1233
- children: /* @__PURE__ */ m(tn, { "aria-hidden": "true" })
1261
+ onClick: () => ue?.(),
1262
+ children: /* @__PURE__ */ m(rn, { "aria-hidden": "true" })
1234
1263
  }
1235
1264
  ),
1236
- /* @__PURE__ */ m("button", { type: "button", className: "aqmx-icon-button", "aria-label": d.collapseAll, title: d.collapseAll, "aria-disabled": V === null, "data-testid": "markdown-explorer-collapse-all", onClick: () => V?.collapseAll(), children: /* @__PURE__ */ m(Jt, { "aria-hidden": "true" }) }),
1237
- b.trigger
1265
+ /* @__PURE__ */ m("button", { type: "button", className: "aqmx-icon-button", "aria-label": d.collapseAll, title: d.collapseAll, "aria-disabled": M === null, "data-testid": "markdown-explorer-collapse-all", onClick: () => M?.collapseAll(), children: /* @__PURE__ */ m(tn, { "aria-hidden": "true" }) }),
1266
+ _.trigger
1238
1267
  ] })
1239
1268
  ] }),
1240
- /* @__PURE__ */ O("div", { className: "aqmx-explorer-body", "data-aqmx-explorer-body": "", children: [
1241
- G !== null && G.sourceId === n ? /* @__PURE__ */ m("p", { role: "alert", className: "aqmx-explorer-refresh-failure", "data-testid": "markdown-explorer-refresh-failure", "data-aqmx-failure": G.failure.reason, children: d.treeRefreshFailed(At(d, G.failure.reason)) }) : null,
1242
- /* @__PURE__ */ m(Qe, { fallback: null, children: /* @__PURE__ */ m(on, {}) }),
1243
- /* @__PURE__ */ m(tr, { mode: t, sourceId: n, settings: E, reveal: K, openPaths: o, selection: ee, onOpenDocument: c, onRevealSource: a, onControls: le }, n),
1244
- T && M.size > 0 ? /* @__PURE__ */ m(rr, { selection: M, onRemove: y, onClear: A, onOpenSelection: Z, onLeave: de }) : null,
1245
- b.menu
1269
+ /* @__PURE__ */ L("div", { className: "aqmx-explorer-body", "data-aqmx-explorer-body": "", children: [
1270
+ oe !== null && oe.sourceId === n ? /* @__PURE__ */ m("p", { role: "alert", className: "aqmx-explorer-refresh-failure", "data-testid": "markdown-explorer-refresh-failure", "data-aqmx-failure": oe.failure.reason, children: d.treeRefreshFailed(Pt(d, oe.failure.reason)) }) : null,
1271
+ /* @__PURE__ */ m(et, { fallback: null, children: /* @__PURE__ */ m(cn, {}) }),
1272
+ /* @__PURE__ */ m(rr, { mode: t, sourceId: n, settings: v, reveal: J, openPaths: o, selection: Q, onOpenDocument: c, folders: k, onRevealSource: a, onControls: le }, n),
1273
+ q && S.size > 0 ? /* @__PURE__ */ m(lr, { selection: S, onRemove: ie, onClear: re, onOpenSelection: Z, onLeave: U }) : null,
1274
+ _.menu
1246
1275
  ] })
1247
1276
  ] });
1248
- }, ut = "(pointer: coarse)", Ir = (e) => {
1249
- const t = window.matchMedia(ut);
1250
- return t.addEventListener("change", e), () => t.removeEventListener("change", e);
1251
- }, Dr = () => window.matchMedia(ut).matches, Hr = () => !1, $r = () => Ee(Ir, Dr, Hr);
1277
+ };
1252
1278
  function Zr({
1253
1279
  title: e,
1254
1280
  titleId: t,
1255
1281
  ...n
1256
1282
  }, r) {
1257
- return /* @__PURE__ */ p.createElement("svg", Object.assign({
1283
+ return /* @__PURE__ */ f.createElement("svg", Object.assign({
1258
1284
  xmlns: "http://www.w3.org/2000/svg",
1259
1285
  viewBox: "0 0 24 24",
1260
1286
  fill: "currentColor",
@@ -1262,61 +1288,61 @@ function Zr({
1262
1288
  "data-slot": "icon",
1263
1289
  ref: r,
1264
1290
  "aria-labelledby": t
1265
- }, n), e ? /* @__PURE__ */ p.createElement("title", {
1291
+ }, n), e ? /* @__PURE__ */ f.createElement("title", {
1266
1292
  id: t
1267
- }, e) : null, /* @__PURE__ */ p.createElement("path", {
1293
+ }, e) : null, /* @__PURE__ */ f.createElement("path", {
1268
1294
  fillRule: "evenodd",
1269
1295
  d: "M3 6.75A.75.75 0 0 1 3.75 6h16.5a.75.75 0 0 1 0 1.5H3.75A.75.75 0 0 1 3 6.75ZM3 12a.75.75 0 0 1 .75-.75h16.5a.75.75 0 0 1 0 1.5H3.75A.75.75 0 0 1 3 12Zm0 5.25a.75.75 0 0 1 .75-.75h16.5a.75.75 0 0 1 0 1.5H3.75a.75.75 0 0 1-.75-.75Z",
1270
1296
  clipRule: "evenodd"
1271
1297
  }));
1272
1298
  }
1273
- const Br = /* @__PURE__ */ p.forwardRef(Zr), zr = ({ explorer: e, toggleRef: t, covered: n, onNoticeSlotChange: r, dismissals: o }) => {
1274
- const { labels: c } = D(), l = Yt(), { location: a } = Pt(), [s, d] = q(!1), [u, i] = q({ navigated: l, source: a.source }), [f, h] = q(!1);
1275
- u.navigated !== l && (i({ navigated: l, source: a.source }), u.source === a.source && !f && d(!1));
1276
- const [v, E] = q(o);
1277
- v !== o && (E(o), d(!1));
1278
- const S = g(null), C = g(null), T = g(null), L = g(!1), Z = ye();
1279
- I(() => {
1280
- const y = S.current;
1281
- y !== null && (s && !y.open ? (y.showModal(), C.current?.focus()) : !s && y.open && (y.close(), t.current?.focus()), r(s ? T.current : null));
1282
- }, [s, t, r]), I(() => () => r(null), [r]);
1283
- const M = w((y) => {
1284
- y.key !== "Escape" || y.defaultPrevented || (Ae(y), d(!1));
1285
- }, []), k = w((y) => {
1286
- L.current = y.target === y.currentTarget;
1287
- }, []), b = w((y) => {
1288
- const A = L.current;
1289
- L.current = !1, A && y.target === y.currentTarget && d(!1);
1290
- }, []), R = w(() => {
1299
+ const Br = /* @__PURE__ */ f.forwardRef(Zr), zr = ({ explorer: e, toggleRef: t, covered: n, onNoticeSlotChange: r, dismissals: o }) => {
1300
+ const { labels: c } = $(), l = Jt(), { location: a } = qt(), [s, d] = F(!1), [u, i] = F({ navigated: l, source: a.source }), [p, h] = F(!1);
1301
+ u.navigated !== l && (i({ navigated: l, source: a.source }), u.source === a.source && !p && d(!1));
1302
+ const [g, v] = F(o);
1303
+ g !== o && (v(o), d(!1));
1304
+ const O = E(null), A = E(null), q = E(null), y = E(!1), Z = Re();
1305
+ H(() => {
1306
+ const b = O.current;
1307
+ b !== null && (s && !b.open ? (b.showModal(), A.current?.focus()) : !s && b.open && (b.close(), t.current?.focus()), r(s ? q.current : null));
1308
+ }, [s, t, r]), H(() => () => r(null), [r]);
1309
+ const N = w((b) => {
1310
+ b.key !== "Escape" || b.defaultPrevented || (Pe(b), d(!1));
1311
+ }, []), R = w((b) => {
1312
+ y.current = b.target === b.currentTarget;
1313
+ }, []), k = w((b) => {
1314
+ const _ = y.current;
1315
+ y.current = !1, _ && b.target === b.currentTarget && d(!1);
1316
+ }, []), S = w(() => {
1291
1317
  d(!1);
1292
1318
  }, []);
1293
- return /* @__PURE__ */ O(Xe, { children: [
1294
- /* @__PURE__ */ m("div", { className: "aqmx-sheet-bar", inert: n, children: /* @__PURE__ */ O("button", { ref: t, type: "button", className: "aqmx-sheet-toggle", "aria-haspopup": "dialog", "aria-expanded": s, "aria-controls": Z, "data-testid": "markdown-explorer-sheet-toggle", onClick: () => d(!0), children: [
1319
+ return /* @__PURE__ */ L(Qe, { children: [
1320
+ /* @__PURE__ */ m("div", { className: "aqmx-sheet-bar", inert: n, children: /* @__PURE__ */ L("button", { ref: t, type: "button", className: "aqmx-sheet-toggle", "aria-haspopup": "dialog", "aria-expanded": s, "aria-controls": Z, "data-testid": "markdown-explorer-sheet-toggle", onClick: () => d(!0), children: [
1295
1321
  /* @__PURE__ */ m(Br, { "aria-hidden": "true" }),
1296
1322
  /* @__PURE__ */ m("span", { children: c.showExplorer })
1297
1323
  ] }) }),
1298
- /* @__PURE__ */ m("dialog", { ref: S, id: Z, className: "aqmx-sheet", "aria-label": c.explorerRegion, "data-testid": "markdown-explorer-sheet", onKeyDown: M, onPointerDown: k, onClick: b, onClose: R, children: /* @__PURE__ */ O("div", { className: "aqmx-sheet-panel", children: [
1299
- /* @__PURE__ */ O("div", { className: "aqmx-sheet-header", children: [
1300
- /* @__PURE__ */ m("div", { ref: T, className: "aqmx-sheet-notice-slot" }),
1301
- /* @__PURE__ */ m("button", { ref: C, type: "button", className: "aqmx-sheet-close", "aria-label": c.hideExplorer, title: c.hideExplorer, "data-testid": "markdown-explorer-sheet-close", onClick: () => d(!1), children: /* @__PURE__ */ m(ct, { "aria-hidden": "true" }) })
1324
+ /* @__PURE__ */ m("dialog", { ref: O, id: Z, className: "aqmx-sheet", "aria-label": c.explorerRegion, "data-testid": "markdown-explorer-sheet", onKeyDown: N, onPointerDown: R, onClick: k, onClose: S, children: /* @__PURE__ */ L("div", { className: "aqmx-sheet-panel", children: [
1325
+ /* @__PURE__ */ L("div", { className: "aqmx-sheet-header", children: [
1326
+ /* @__PURE__ */ m("div", { ref: q, className: "aqmx-sheet-notice-slot" }),
1327
+ /* @__PURE__ */ m("button", { ref: A, type: "button", className: "aqmx-sheet-close", "aria-label": c.hideExplorer, title: c.hideExplorer, "data-testid": "markdown-explorer-sheet-close", onClick: () => d(!1), children: /* @__PURE__ */ m(dt, { "aria-hidden": "true" }) })
1302
1328
  ] }),
1303
- /* @__PURE__ */ m("div", { className: "aqmx-sheet-body", children: /* @__PURE__ */ m(qe, { value: s, children: /* @__PURE__ */ m(it, { value: h, children: e }) }) }),
1304
- /* @__PURE__ */ m(qt, { holds: s, testId: "markdown-explorer-sheet-announcer" })
1329
+ /* @__PURE__ */ m("div", { className: "aqmx-sheet-body", children: /* @__PURE__ */ m(Fe, { value: s, children: /* @__PURE__ */ m(ut, { value: h, children: e }) }) }),
1330
+ /* @__PURE__ */ m(Ct, { holds: s, testId: "markdown-explorer-sheet-announcer" })
1305
1331
  ] }) })
1306
1332
  ] });
1307
- }, Vr = Pe(null), Ce = "aqmx-explorer", mt = "aqmx-content", Fe = '[role="tree"] [role="treeitem"]', jr = `${Fe}[tabindex="0"]`, Kr = "[data-directory-tree-tab-stop]", Gr = (e, t) => {
1308
- for (const n of e.querySelectorAll(`[data-panel-id="${Ce}"] ${Fe}`)) if (n.getAttribute(se) === t) return n;
1333
+ }, Vr = qe(null), Me = "aqmx-explorer", ft = "aqmx-content", jr = "--aqmx-split-band", _e = '[role="tree"] [role="treeitem"]', Kr = `${_e}[tabindex="0"]`, Ur = "[data-directory-tree-tab-stop]", Gr = (e, t) => {
1334
+ for (const n of e.querySelectorAll(`[data-panel-id="${Me}"] ${_e}`)) if (n.getAttribute(ce) === t) return n;
1309
1335
  return null;
1310
- }, We = (e, t) => ({
1336
+ }, Ye = (e, t) => ({
1311
1337
  inlineSize: e > 0 ? e : null,
1312
1338
  rootFontPixels: t > 0 ? t : Vt
1313
- }), Ur = (e, t) => {
1314
- const [n, r] = q(() => We(0, 0));
1315
- return I(() => {
1339
+ }), Wr = (e, t) => {
1340
+ const [n, r] = F(() => Ye(0, 0));
1341
+ return H(() => {
1316
1342
  const o = e.current, c = t.current;
1317
1343
  if (o === null || c === null) throw new Error("[markdown-explorer] the split frame is not mounted");
1318
1344
  const l = { frame: o.getBoundingClientRect().width, rem: c.getBoundingClientRect().width }, a = () => {
1319
- const d = We(l.frame, l.rem);
1345
+ const d = Ye(l.frame, l.rem);
1320
1346
  r((u) => u.inlineSize === d.inlineSize && u.rootFontPixels === d.rootFontPixels ? u : d);
1321
1347
  };
1322
1348
  a();
@@ -1329,14 +1355,14 @@ const Br = /* @__PURE__ */ p.forwardRef(Zr), zr = ({ explorer: e, toggleRef: t,
1329
1355
  });
1330
1356
  return s.observe(o), s.observe(c), () => s.disconnect();
1331
1357
  }, [e, t]), n;
1332
- }, ft = (e) => `aqmx-split-handle-${e}`, Wr = (e, { frameRef: t, sheetToggleRef: n, handleId: r }) => {
1333
- const o = g(!1), c = g(null), l = g(!1);
1334
- I(() => {
1358
+ }, pt = (e) => `aqmx-split-handle-${e}`, Xr = (e, { frameRef: t, sheetToggleRef: n, handleId: r }) => {
1359
+ const o = E(!1), c = E(null), l = E(!1);
1360
+ H(() => {
1335
1361
  const s = t.current;
1336
1362
  if (s === null) throw new Error("[markdown-explorer] the split frame is not mounted");
1337
1363
  const d = (i) => {
1338
- const f = i.target instanceof Element ? i.target : null;
1339
- o.current = f !== null && f.closest(`[data-panel-id="${mt}"]`) === null, !l.current && (c.current = f?.closest(`${Fe}[${se}]`)?.getAttribute(se) ?? null);
1364
+ const p = i.target instanceof Element ? i.target : null;
1365
+ o.current = p !== null && p.closest(`[data-panel-id="${ft}"]`) === null, !l.current && (c.current = p?.closest(`${_e}[${ce}]`)?.getAttribute(ce) ?? null);
1340
1366
  }, u = (i) => {
1341
1367
  i.relatedTarget instanceof Node && !s.contains(i.relatedTarget) && (o.current = !1);
1342
1368
  };
@@ -1344,16 +1370,16 @@ const Br = /* @__PURE__ */ p.forwardRef(Zr), zr = ({ explorer: e, toggleRef: t,
1344
1370
  s.removeEventListener("focusin", d), s.removeEventListener("focusout", u);
1345
1371
  };
1346
1372
  }, [t]);
1347
- const a = g(e);
1348
- I(() => {
1373
+ const a = E(e);
1374
+ H(() => {
1349
1375
  if (a.current === e) return;
1350
1376
  a.current = e;
1351
1377
  const s = t.current;
1352
1378
  if (s === null || !o.current) return;
1353
1379
  const d = (u) => {
1354
- const { activeElement: i, body: f } = s.ownerDocument;
1355
- if (i !== null && i !== f) return;
1356
- const h = u.find((v) => v !== null);
1380
+ const { activeElement: i, body: p } = s.ownerDocument;
1381
+ if (i !== null && i !== p) return;
1382
+ const h = u.find((g) => g !== null);
1357
1383
  if (h != null) {
1358
1384
  l.current = !0;
1359
1385
  try {
@@ -1369,23 +1395,23 @@ const Br = /* @__PURE__ */ p.forwardRef(Zr), zr = ({ explorer: e, toggleRef: t,
1369
1395
  }
1370
1396
  queueMicrotask(() => {
1371
1397
  if (a.current !== e || !o.current) return;
1372
- const u = c.current, i = `[data-panel-id="${Ce}"]`;
1398
+ const u = c.current, i = `[data-panel-id="${Me}"]`;
1373
1399
  d([
1374
1400
  u === null ? null : Gr(s, u),
1375
- s.querySelector(`${i} ${jr}`),
1376
1401
  s.querySelector(`${i} ${Kr}`),
1402
+ s.querySelector(`${i} ${Ur}`),
1377
1403
  s.querySelector(`[data-resize-handle-id="${r}"]`)
1378
1404
  ]);
1379
1405
  });
1380
1406
  }, [e, t, n, r]);
1381
- }, sa = ({ view: e, explorer: t, content: n, contentCoversPage: r = !1, sheetDismissals: o = 0, onDraggingChange: c }) => {
1382
- const l = g(null), [a, s] = q(null), d = g(null), u = g(null), { inlineSize: i, rootFontPixels: f } = Ur(l, d), h = i !== null && i < It(f);
1383
- return Wr(h, { frameRef: l, sheetToggleRef: u, handleId: ft(e) }), /* @__PURE__ */ O("div", { ref: l, className: "aqmx-split-frame", "data-aqmx-explorer-mode": h ? "sheet" : "split", children: [
1407
+ }, ia = ({ view: e, explorer: t, content: n, contentCoversPage: r = !1, sheetDismissals: o = 0, onDraggingChange: c }) => {
1408
+ const l = E(null), [a, s] = F(null), d = E(null), u = E(null), { inlineSize: i, rootFontPixels: p } = Wr(l, d), h = i !== null && i < Dt(p);
1409
+ return Xr(h, { frameRef: l, sheetToggleRef: u, handleId: pt(e) }), /* @__PURE__ */ L("div", { ref: l, className: "aqmx-split-frame", "data-aqmx-explorer-mode": h ? "sheet" : "split", children: [
1384
1410
  /* @__PURE__ */ m("span", { ref: d, className: "aqmx-rem-probe", "aria-hidden": "true", "data-aqmx-rem-probe": "" }),
1385
1411
  h ? /* @__PURE__ */ m(zr, { explorer: t, toggleRef: u, covered: r, onNoticeSlotChange: s, dismissals: o }) : null,
1386
- /* @__PURE__ */ m(Vr, { value: h ? a : null, children: /* @__PURE__ */ m(Xr, { view: e, sheet: h, explorer: t, content: n, contentCoversPage: r, onDraggingChange: c, explorerMinPixels: Dt(f) }) })
1412
+ /* @__PURE__ */ m(Vr, { value: h ? a : null, children: /* @__PURE__ */ m(Yr, { view: e, sheet: h, explorer: t, content: n, contentCoversPage: r, onDraggingChange: c, explorerMinPixels: Ht(p) }) })
1387
1413
  ] });
1388
- }, Xr = ({
1414
+ }, Yr = ({
1389
1415
  view: e,
1390
1416
  sheet: t,
1391
1417
  explorer: n,
@@ -1394,79 +1420,74 @@ const Br = /* @__PURE__ */ p.forwardRef(Zr), zr = ({ explorer: e, toggleRef: t,
1394
1420
  onDraggingChange: c,
1395
1421
  explorerMinPixels: l
1396
1422
  }) => {
1397
- const { viewSettings: a, labels: s } = D(), u = Ct((b) => e === "tree" ? b.treeExplorer : b.multiExplorer) ?? (e === "tree" ? $t : Zt), i = g(null), f = g(null), h = g(!1), v = g(!1), [E, S] = q(!1), C = g(c);
1398
- I(() => {
1399
- C.current = c;
1423
+ const { viewSettings: a, labels: s } = $(), u = Ft((N) => e === "tree" ? N.treeExplorer : N.multiExplorer) ?? (e === "tree" ? Bt : zt), i = E(!1), [p, h] = F(!1), g = E(c);
1424
+ H(() => {
1425
+ g.current = c;
1400
1426
  }, [c]);
1401
- const T = w(() => {
1402
- const b = i.current;
1403
- if (b === null || b.length !== 2) return;
1404
- const [R = 0, y = 0] = b, A = R + y;
1405
- if (A <= 0 || R <= 0) return;
1406
- const H = Math.min(Be, R / A * 100);
1407
- a.update(e === "tree" ? { treeExplorer: H } : { multiExplorer: H });
1408
- }, [a, e]), L = w(() => {
1409
- f.current !== null && clearTimeout(f.current), f.current = setTimeout(() => {
1410
- f.current = null, T();
1411
- }, Ht);
1412
- }, [T]);
1413
- _(
1427
+ const v = Yt(
1428
+ w(
1429
+ (N) => {
1430
+ if (N.length !== 2) return;
1431
+ const [R = 0, k = 0] = N, S = R + k;
1432
+ if (S <= 0 || R <= 0) return;
1433
+ const b = Math.min(Ve, R / S * 100);
1434
+ a.update(e === "tree" ? { treeExplorer: b } : { multiExplorer: b });
1435
+ },
1436
+ [a, e]
1437
+ )
1438
+ );
1439
+ D(
1414
1440
  () => () => {
1415
- f.current !== null && clearTimeout(f.current), v.current && C.current?.(!1);
1441
+ i.current && g.current?.(!1);
1416
1442
  },
1417
1443
  []
1418
1444
  );
1419
- const Z = $r(), M = w(
1420
- (b, R) => {
1421
- i.current = b;
1422
- const [y = 0, A = 0] = b;
1423
- b.length === 2 && A > 0 && S(y <= 0), R.source === "keyboard" ? L() : R.source === "pointer" && (h.current = !0);
1445
+ const A = Qt() ? $t : Zt, q = C(() => ({ [jr]: `${String(t ? 0 : A)}px` }), [t, A]), y = w(
1446
+ (N, R) => {
1447
+ const [k = 0, S = 0] = N;
1448
+ N.length === 2 && S > 0 && h(k <= 0), v.layoutChanged(N, R);
1424
1449
  },
1425
- [L]
1426
- ), k = w(
1427
- (b) => {
1428
- if (v.current = b, c?.(b), b) {
1429
- h.current = !1;
1430
- return;
1431
- }
1432
- h.current && (h.current = !1, L());
1450
+ [v]
1451
+ ), Z = w(
1452
+ (N) => {
1453
+ i.current = N, c?.(N), v.draggingChanged(N);
1433
1454
  },
1434
- [c, L]
1455
+ [c, v]
1435
1456
  );
1436
- return /* @__PURE__ */ O(Wt, { id: `aqmx-split-${e}`, direction: "horizontal", onLayout: M, className: "aqmx-split", "data-aqmx-split": e, children: [
1457
+ return /* @__PURE__ */ L(Wt, { id: `aqmx-split-${e}`, direction: "horizontal", onLayout: y, className: "aqmx-split", style: q, "data-aqmx-split": e, children: [
1437
1458
  t ? null : /* @__PURE__ */ m(
1438
- ze,
1459
+ je,
1439
1460
  {
1440
- id: Ce,
1461
+ id: Me,
1441
1462
  defaultSize: { value: u, unit: "percentage" },
1442
1463
  minSize: { value: l, unit: "pixels" },
1443
- maxSize: { value: Be, unit: "percentage" },
1464
+ maxSize: { value: Ve, unit: "percentage" },
1444
1465
  collapsible: { from: "end" },
1445
1466
  pixelAdjustPriority: 1,
1446
1467
  inert: o,
1447
1468
  className: "aqmx-split-explorer",
1448
- children: /* @__PURE__ */ m(qe, { value: !E, children: n })
1469
+ children: /* @__PURE__ */ m(Fe, { value: !p, children: n })
1449
1470
  }
1450
1471
  ),
1451
1472
  t ? null : /* @__PURE__ */ m(
1452
1473
  Xt,
1453
1474
  {
1454
- id: ft(e),
1455
- thickness: Z ? Bt : zt,
1456
- indicator: { visible: !0, thickness: ve.gripThickness, length: ve.gripLength, barThickness: ve.barThickness, barLength: ve.barLength },
1475
+ id: pt(e),
1476
+ thickness: A,
1477
+ indicator: { visible: !0, thickness: Ee.gripThickness, length: Ee.gripLength, barThickness: Ee.barThickness, barLength: Ee.barLength },
1457
1478
  title: s.resizeExplorer,
1458
1479
  "aria-label": s.resizeExplorer,
1459
- onDragging: k,
1480
+ onDragging: Z,
1460
1481
  inert: o,
1461
1482
  className: "aqmx-split-handle"
1462
1483
  }
1463
1484
  ),
1464
- /* @__PURE__ */ m(ze, { id: mt, defaultSize: { value: 100 - u, unit: "percentage" }, contentOverflow: "hidden", className: "aqmx-split-content", ...o ? { style: { isolation: "auto" } } : {}, children: r })
1485
+ /* @__PURE__ */ m(je, { id: ft, defaultSize: { value: 100 - u, unit: "percentage" }, contentOverflow: "hidden", className: "aqmx-split-content", ...o ? { style: { isolation: "auto" } } : {}, children: r })
1465
1486
  ] });
1466
1487
  };
1467
1488
  export {
1468
- Le as E,
1489
+ Ae as E,
1469
1490
  Vr as S,
1470
- sa as a,
1471
- oa as b
1491
+ ia as a,
1492
+ ca as b
1472
1493
  };