typerighter 0.7.0 → 0.9.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.

Potentially problematic release.


This version of typerighter might be problematic. Click here for more details.

Files changed (37) hide show
  1. package/dist/app-C-qfoH4a.js +373 -0
  2. package/dist/brand-CG1fQshq.js +5 -0
  3. package/dist/{cli-CDd4TNg1.js → cli-mg9QpUrf.js} +159 -132
  4. package/dist/cli.js +1 -1
  5. package/dist/client/app/index.d.ts +12 -3
  6. package/dist/client/app/index.d.ts.map +1 -1
  7. package/dist/client/app/router.d.ts +6 -2
  8. package/dist/client/app/router.d.ts.map +1 -1
  9. package/dist/client/theme-default.js +541 -417
  10. package/dist/client.js +1 -1
  11. package/dist/es-CG8rP6j5.js +22524 -0
  12. package/dist/index.js +2 -2
  13. package/dist/{init-Bfnl0t1B.js → init-BSgCv7vy.js} +664 -654
  14. package/dist/node/build/index.d.ts.map +1 -1
  15. package/dist/node/build/prerender.d.ts +2 -0
  16. package/dist/node/build/prerender.d.ts.map +1 -1
  17. package/dist/node/plugin/vite/index.d.ts.map +1 -1
  18. package/dist/shared/utils/field.d.ts +2 -0
  19. package/dist/shared/utils/field.d.ts.map +1 -0
  20. package/dist/shared/utils/index.d.ts +1 -0
  21. package/dist/shared/utils/index.d.ts.map +1 -1
  22. package/dist/shared/utils/url.d.ts +5 -0
  23. package/dist/shared/utils/url.d.ts.map +1 -1
  24. package/dist/shared-BIdsxcZ2.js +265 -0
  25. package/dist/shared.js +2 -0
  26. package/dist/typerighter.css +1 -1
  27. package/dist/vite-8CV23ALg.js +10704 -0
  28. package/dist/vite.js +1 -1
  29. package/package.json +7 -3
  30. package/dist/app-Bf0aLzaG.js +0 -370
  31. package/dist/brand-BfamszbH.js +0 -12
  32. package/dist/client/app/composables/useUrl.d.ts +0 -6
  33. package/dist/client/app/composables/useUrl.d.ts.map +0 -1
  34. package/dist/constants-DJbUAb1-.js +0 -32189
  35. package/dist/es-ClqUVRJn.js +0 -705
  36. package/dist/shared-CpPZZ8IH.js +0 -196
  37. package/dist/vite-DnP-_NzR.js +0 -326
@@ -1,42 +1,49 @@
1
- import { C as e, S as t, c as n, d as r, h as i, m as a, n as o, r as s, s as c, t as l, u, v as d, w as f } from "../shared-CpPZZ8IH.js";
2
- import { a as p, i as m, n as h, o as g, s as _, t as v } from "../brand-BfamszbH.js";
3
- import { t as ee } from "../es-ClqUVRJn.js";
4
- import { a as y, c as b, d as x, f as S, h as C, i as te, l as w, m as T, n as ne, o as E, p as D, r as re, s as ie } from "../app-Bf0aLzaG.js";
5
- import { Fragment as O, Teleport as ae, computed as k, createBlock as A, createCommentVNode as j, createElementBlock as M, createElementVNode as N, createTextVNode as P, createVNode as F, defineComponent as I, markRaw as oe, mergeModels as se, mergeProps as ce, nextTick as le, normalizeClass as L, normalizeStyle as R, onBeforeUnmount as ue, onMounted as de, onUnmounted as z, openBlock as B, readonly as fe, ref as V, renderList as H, renderSlot as pe, resolveComponent as me, shallowRef as he, toDisplayString as U, unref as W, useModel as ge, useTemplateRef as _e, vModelText as ve, watch as G, withCtx as K, withDirectives as ye, withModifiers as be } from "vue";
6
- //#region src/shared/utils/debounce.ts
7
- function xe(e, t) {
8
- let n;
9
- return (...r) => {
10
- clearTimeout(n), n = setTimeout(() => e(...r), t);
11
- };
12
- }
13
- //#endregion
14
- //#region src/shared/utils/regex.ts
15
- function Se(e) {
16
- return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
17
- }
18
- var Ce = C("chevron-down", [["path", {
1
+ import { D as e, E as t, I as n, L as r, M as i, R as a, T as o, _ as s, b as c, c as l, g as u, i as d, l as f, m as p, n as m, o as h, r as g, s as _, u as v, x as y, y as b } from "../shared-BIdsxcZ2.js";
2
+ import { r as x, t as ee } from "../es-CG8rP6j5.js";
3
+ import { a as S, c as C, d as w, f as T, h as E, i as D, l as O, m as k, n as te, o as A, p as ne, r as re, s as ie } from "../app-C-qfoH4a.js";
4
+ import { a as ae, i as oe, n as se, t as ce } from "../brand-CG1fQshq.js";
5
+ import { Fragment as j, Teleport as le, computed as M, createBlock as N, createCommentVNode as P, createElementBlock as F, createElementVNode as I, createVNode as L, defineComponent as R, markRaw as ue, mergeModels as de, mergeProps as fe, nextTick as pe, normalizeClass as z, normalizeStyle as B, onBeforeUnmount as me, onMounted as he, onUnmounted as V, openBlock as H, readonly as ge, ref as U, renderList as W, renderSlot as G, resolveComponent as _e, shallowRef as ve, toDisplayString as K, unref as q, useModel as J, useTemplateRef as ye, vModelText as be, watch as Y, watchEffect as xe, withCtx as X, withDirectives as Se, withModifiers as Ce } from "vue";
6
+ var we = E("chevron-down", [["path", {
19
7
  d: "m6 9 6 6 6-6",
20
8
  key: "qrunsl"
21
- }]]), we = C("chevron-right", [["path", {
9
+ }]]), Te = E("chevron-right", [["path", {
22
10
  d: "m9 18 6-6-6-6",
23
11
  key: "mthhwq"
24
- }]]), Te = C("chevron-left", [["path", {
12
+ }]]), Ee = E("chevron-left", [["path", {
25
13
  d: "m15 18-6-6 6-6",
26
14
  key: "1wnfg3"
27
- }]]), Ee = C("folder-open", [["path", {
15
+ }]]), De = E("ellipsis", [
16
+ ["circle", {
17
+ cx: "12",
18
+ cy: "12",
19
+ r: "1",
20
+ key: "41hilf"
21
+ }],
22
+ ["circle", {
23
+ cx: "19",
24
+ cy: "12",
25
+ r: "1",
26
+ key: "1wjl8i"
27
+ }],
28
+ ["circle", {
29
+ cx: "5",
30
+ cy: "12",
31
+ r: "1",
32
+ key: "1pcz8c"
33
+ }]
34
+ ]), Oe = E("folder-open", [["path", {
28
35
  d: "m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",
29
36
  key: "usdka0"
30
- }]]), De = C("house", [["path", {
37
+ }]]), ke = E("house", [["path", {
31
38
  d: "M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",
32
39
  key: "5wwlr5"
33
40
  }], ["path", {
34
41
  d: "M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",
35
42
  key: "r6nss1"
36
- }]]), Oe = C("loader-circle", [["path", {
43
+ }]]), Ae = E("loader-circle", [["path", {
37
44
  d: "M21 12a9 9 0 1 1-6.219-8.56",
38
45
  key: "13zald"
39
- }]]), ke = C("menu", [
46
+ }]]), je = E("menu", [
40
47
  ["path", {
41
48
  d: "M4 5h16",
42
49
  key: "1tepv9"
@@ -49,10 +56,10 @@ var Ce = C("chevron-down", [["path", {
49
56
  d: "M4 19h16",
50
57
  key: "1djgab"
51
58
  }]
52
- ]), Ae = C("moon", [["path", {
59
+ ]), Me = E("moon", [["path", {
53
60
  d: "M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",
54
61
  key: "kfwtm"
55
- }]]), je = C("search", [["path", {
62
+ }]]), Ne = E("search", [["path", {
56
63
  d: "m21 21-4.34-4.34",
57
64
  key: "14j7rj"
58
65
  }], ["circle", {
@@ -60,20 +67,20 @@ var Ce = C("chevron-down", [["path", {
60
67
  cy: "11",
61
68
  r: "8",
62
69
  key: "4ej97u"
63
- }]]), Me = C("square-check-big", [["path", {
70
+ }]]), Pe = E("square-check-big", [["path", {
64
71
  d: "M21 10.656V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.344",
65
72
  key: "2acyp4"
66
73
  }], ["path", {
67
74
  d: "m9 11 3 3L22 4",
68
75
  key: "1pflzl"
69
- }]]), Ne = C("square", [["rect", {
76
+ }]]), Fe = E("square", [["rect", {
70
77
  width: "18",
71
78
  height: "18",
72
79
  x: "3",
73
80
  y: "3",
74
81
  rx: "2",
75
82
  key: "afitv7"
76
- }]]), Pe = C("sun", [
83
+ }]]), Ie = E("sun", [
77
84
  ["circle", {
78
85
  cx: "12",
79
86
  cy: "12",
@@ -112,60 +119,79 @@ var Ce = C("chevron-down", [["path", {
112
119
  d: "m19.07 4.93-1.41 1.41",
113
120
  key: "1shlcs"
114
121
  }]
115
- ]), q = C("x", [["path", {
122
+ ]), Z = E("x", [["path", {
116
123
  d: "M18 6 6 18",
117
124
  key: "1bl5f8"
118
125
  }], ["path", {
119
126
  d: "m6 6 12 12",
120
127
  key: "d8bk6v"
121
- }]]), Fe = [
128
+ }]]), Le = [
122
129
  "height",
123
130
  "width",
124
131
  "viewBox"
125
- ], Ie = ["d"], Le = ["d"], Re = ["d"], ze = /* @__PURE__ */ I({
132
+ ], Re = ["d"], ze = ["d"], Be = ["d"], Ve = /* @__PURE__ */ R({
126
133
  __name: "TdBrandIcon",
127
134
  props: { size: { default: 28 } },
128
135
  setup(e) {
129
- return (t, n) => (B(), M("svg", {
136
+ return (t, n) => (H(), F("svg", {
130
137
  fill: "none",
131
138
  height: e.size,
132
139
  width: e.size * 208 / 128,
133
- viewBox: W(p),
140
+ viewBox: q(ae),
134
141
  xmlns: "http://www.w3.org/2000/svg"
135
142
  }, [
136
- N("path", {
143
+ I("path", {
137
144
  "clip-rule": "evenodd",
138
- d: W(h),
145
+ d: q(se),
139
146
  "fill-rule": "evenodd",
140
147
  fill: "currentColor"
141
- }, null, 8, Ie),
142
- N("path", {
143
- d: W(m),
148
+ }, null, 8, Re),
149
+ I("path", {
150
+ d: q(oe),
144
151
  fill: "currentColor"
145
- }, null, 8, Le),
146
- N("path", {
147
- d: W(v),
152
+ }, null, 8, ze),
153
+ I("path", {
154
+ d: q(ce),
148
155
  fill: "currentColor"
149
- }, null, 8, Re)
150
- ], 8, Fe));
156
+ }, null, 8, Be)
157
+ ], 8, Le));
151
158
  }
152
- }), Be = ["title", "aria-label"], J = /* @__PURE__ */ I({
159
+ }), He = ["title", "aria-label"], Q = /* @__PURE__ */ R({
153
160
  __name: "TdButton",
154
161
  props: { label: {} },
155
162
  setup(e) {
156
- return (t, n) => (B(), M("button", {
163
+ return (t, n) => (H(), F("button", {
157
164
  type: "button",
158
165
  class: "inline-flex items-center justify-center cursor-pointer",
159
166
  title: e.label,
160
167
  "aria-label": e.label
161
- }, [pe(t.$slots, "default")], 8, Be));
168
+ }, [G(t.$slots, "default")], 8, He));
162
169
  }
163
- }), Ve = /*#__PURE__*/ S(/* @__PURE__ */ I({
170
+ }), Ue = /\$([^$]+)\$/g;
171
+ function We(e) {
172
+ let t = 0, n = "";
173
+ for (let r of e.matchAll(Ue)) {
174
+ n += _(e.slice(t, r.index));
175
+ try {
176
+ n += x.renderToString(r[1], {
177
+ throwOnError: !1,
178
+ output: "htmlAndMathml"
179
+ });
180
+ } catch {
181
+ n += _(r[0]);
182
+ }
183
+ t = r.index + r[0].length;
184
+ }
185
+ return n += _(e.slice(t)), n;
186
+ }
187
+ //#endregion
188
+ //#region src/client/theme-default/components/TdTooltip.vue
189
+ var Ge = /*#__PURE__*/ T(/* @__PURE__ */ R({
164
190
  inheritAttrs: !1,
165
191
  __name: "TdTooltip",
166
192
  props: { text: {} },
167
193
  setup(e) {
168
- let t = _e("wrapper"), n = V(!1), r = V({
194
+ let t = ye("wrapper"), n = U(!1), r = U({
169
195
  top: "0px",
170
196
  left: "0px"
171
197
  }), i;
@@ -187,195 +213,261 @@ var Ce = C("chevron-down", [["path", {
187
213
  left: `${i.left}px`
188
214
  }, n.value = !0;
189
215
  }
190
- return ue(() => {
216
+ return me(() => {
191
217
  a();
192
- }), (i, c) => (B(), M(O, null, [N("span", ce({
218
+ }), (i, c) => (H(), F(j, null, [I("span", fe({
193
219
  ref_key: "wrapper",
194
220
  ref: t
195
221
  }, i.$attrs, {
196
222
  class: "td-tooltip-trigger",
197
223
  onMouseenter: s,
198
224
  onMouseleave: o
199
- }), [pe(i.$slots, "default", {}, void 0, !0)], 16), (B(), A(ae, { to: "body" }, [n.value ? (B(), M("span", {
225
+ }), [G(i.$slots, "default", {}, void 0, !0)], 16), (H(), N(le, { to: "body" }, [n.value ? (H(), F("span", {
200
226
  key: 0,
201
227
  class: "td-tooltip",
202
- style: R(r.value),
228
+ style: B(r.value),
203
229
  role: "tooltip",
204
230
  onMouseenter: a,
205
231
  onMouseleave: o
206
- }, U(e.text), 37)) : j("", !0)]))], 64));
232
+ }, K(e.text), 37)) : P("", !0)]))], 64));
207
233
  }
208
- }), [["__scopeId", "data-v-018d7f4b"]]), He = {
234
+ }), [["__scopeId", "data-v-018d7f4b"]]), Ke = {
209
235
  key: 0,
210
236
  class: "td-tree-node"
211
- }, Ue = { class: "td-tree-label" }, We = ["aria-expanded"], Ge = { class: "td-tree-label-text" }, Ke = ["href"], qe = { class: "td-tree-count" }, Je = {
237
+ }, qe = { class: "td-tree-label" }, Je = ["aria-expanded"], Ye = { class: "td-tree-label-text" }, Xe = ["href"], Ze = { class: "td-tree-count" }, Qe = {
212
238
  key: 0,
213
239
  class: "td-tree-children"
214
- }, Ye = ["href"], Xe = { class: "td-tree-time" }, Y = 4, Ze = /*#__PURE__*/ S(/* @__PURE__ */ I({
240
+ }, $e = ["href"], et = ["innerHTML"], tt = { class: "td-tree-time" }, nt = 20, rt = /*#__PURE__*/ T(/* @__PURE__ */ R({
215
241
  __name: "TdTreeNode",
216
242
  props: {
217
243
  node: {},
218
244
  urlPrefix: { default: "" }
219
245
  },
220
- setup(e) {
221
- let a = w(), o = n(e.urlPrefix, e.node.name), l = e.node.items.find((e) => i(e.filepath) === t), f = l ? u(l.filepath) : o + "/index", p = e.node.items.filter((e) => i(e.filepath) !== t), m = 0 < e.node.children.length || 0 < e.node.items.length, h = k(() => g(e.node));
222
- function g(e) {
223
- return e.items.length + e.children.reduce((e, t) => e + g(t), 0);
246
+ setup(t) {
247
+ let r = O(), { withBase: a } = D(), o = u(t.urlPrefix, t.node.name), c = t.node.items.find((t) => e(t.filepath) === n), l = c ? b(c.filepath) : s(o), f = a(l), m = t.node.items.filter((t) => e(t.filepath) !== n), h = 0 < t.node.children.length || 0 < t.node.items.length, g = M(() => _(t.node));
248
+ function _(e) {
249
+ return e.items.length + e.children.reduce((e, t) => e + _(t), 0);
224
250
  }
225
- let _ = V(!r(o, a.path)), v = V(!1), ee = k(() => v.value ? p : p.slice(0, Y)), y = k(() => Math.max(0, p.length - Y));
226
- G(() => a.path, (e) => {
227
- r(o, e) && (_.value = !1);
251
+ let v = U(!y(o, r.path)), x = U(!1), ee = M(() => x.value ? m : m.slice(0, nt)), S = M(() => Math.max(0, m.length - nt));
252
+ Y(() => r.path, (e) => {
253
+ y(o, e) && (v.value = !1);
228
254
  });
229
- function b() {
230
- v.value = !0;
255
+ function C() {
256
+ x.value = !0;
231
257
  }
232
- function x(e) {
233
- return a.path === e;
258
+ function w(e) {
259
+ return r.path === e;
234
260
  }
235
- function S() {
236
- _.value = !_.value;
261
+ function T() {
262
+ v.value = !v.value;
237
263
  }
238
- return (t, n) => {
239
- let r = me("TdTreeNode", !0);
240
- return W(m) ? (B(), M("div", He, [N("div", Ue, [
241
- N("button", {
264
+ return (e, n) => {
265
+ let r = _e("TdTreeNode", !0);
266
+ return q(h) ? (H(), F("div", Ke, [I("div", qe, [
267
+ I("button", {
242
268
  type: "button",
243
269
  class: "td-tree-toggle",
244
- "aria-expanded": !_.value,
245
- onClick: S
246
- }, [F(W(Ce), {
270
+ "aria-expanded": !v.value,
271
+ onClick: T
272
+ }, [L(q(we), {
247
273
  size: 14,
248
- class: L(["td-tree-caret", { "is-collapsed": _.value }])
249
- }, null, 8, ["class"]), N("span", Ge, U(W(d)(e.node.name)), 1)], 8, We),
250
- N("a", {
251
- href: W(f),
252
- class: L(["td-tree-index-btn", { "is-active": x(W(f)) }])
253
- }, [x(W(f)) ? (B(), A(W(Ee), {
274
+ class: z(["td-tree-caret", { "is-collapsed": v.value }])
275
+ }, null, 8, ["class"]), I("span", Ye, K(q(i)(t.node.name)), 1)], 8, Je),
276
+ I("a", {
277
+ href: q(f),
278
+ class: z(["td-tree-index-btn", { "is-active": w(q(l)) }])
279
+ }, [w(q(l)) ? (H(), N(q(Oe), {
254
280
  key: 0,
255
281
  size: 12
256
- })) : (B(), A(W(D), {
282
+ })) : (H(), N(q(ne), {
257
283
  key: 1,
258
284
  size: 12
259
- }))], 10, Ke),
260
- N("span", qe, U(h.value), 1)
261
- ]), _.value ? j("", !0) : (B(), M("div", Je, [
262
- (B(!0), M(O, null, H(e.node.children, (e) => (B(), A(r, {
285
+ }))], 10, Xe),
286
+ I("span", Ze, K(g.value), 1)
287
+ ]), v.value ? P("", !0) : (H(), F("div", Qe, [
288
+ (H(!0), F(j, null, W(t.node.children, (e) => (H(), N(r, {
263
289
  key: e.name,
264
290
  node: e,
265
- "url-prefix": W(o)
291
+ "url-prefix": q(o)
266
292
  }, null, 8, ["node", "url-prefix"]))), 128)),
267
- (B(!0), M(O, null, H(ee.value, (e) => (B(), M("a", {
293
+ (H(!0), F(j, null, W(ee.value, (e) => (H(), F("a", {
268
294
  key: e.filepath,
269
- href: W(u)(e.filepath),
270
- class: L(["td-tree-link", { "is-active": x(W(u)(e.filepath)) }])
295
+ href: q(a)(q(b)(e.filepath)),
296
+ class: z(["td-tree-link", { "is-active": w(q(b)(e.filepath)) }])
271
297
  }, [
272
- F(W(T), {
298
+ L(q(k), {
273
299
  size: 14,
274
300
  class: "td-tree-file-icon"
275
301
  }),
276
- F(Ve, {
302
+ L(Ge, {
277
303
  class: "td-tree-link-text",
278
- text: W(c)(e.header, e.filepath)
304
+ text: q(p)(e.header, e.filepath)
279
305
  }, {
280
- default: K(() => [P(U(W(c)(e.header, e.filepath)), 1)]),
306
+ default: X(() => [I("span", { innerHTML: q(We)(q(p)(e.header, e.filepath)) }, null, 8, et)]),
281
307
  _: 2
282
308
  }, 1032, ["text"]),
283
- N("span", Xe, U(W(s)(e.metadata.mtime)), 1)
284
- ], 10, Ye))), 128)),
285
- y.value > 0 && !v.value ? (B(), M("button", {
309
+ I("span", tt, K(q(d)(e.metadata.mtime)), 1)
310
+ ], 10, $e))), 128)),
311
+ S.value > 0 && !x.value ? (H(), F("button", {
286
312
  key: 0,
287
313
  class: "td-tree-more",
288
314
  type: "button",
289
- onClick: b
290
- }, U(y.value) + " more ", 1)) : j("", !0)
291
- ]))])) : j("", !0);
315
+ onClick: C
316
+ }, K(S.value) + " more ", 1)) : P("", !0)
317
+ ]))])) : P("", !0);
292
318
  };
293
319
  }
294
- }), [["__scopeId", "data-v-f6c7b51f"]]), Qe = ["href"], $e = {
320
+ }), [["__scopeId", "data-v-357d77d6"]]), it = ["href"], at = {
295
321
  key: 0,
296
322
  class: "td-root-link-time"
297
- }, et = ["href"], tt = { class: "td-root-link-text" }, nt = { class: "td-root-link-time" }, rt = /*#__PURE__*/ S(/* @__PURE__ */ I({
323
+ }, ot = ["href"], st = { class: "td-root-link-text" }, ct = { class: "td-root-link-time" }, lt = /*#__PURE__*/ T(/* @__PURE__ */ R({
298
324
  __name: "TdContentNav",
299
325
  props: { tree: {} },
300
- setup(e) {
301
- let n = w(), r = e.tree.rootItems.find((e) => i(e.filepath) === t), a = e.tree.rootItems.filter((e) => i(e.filepath) !== t);
302
- function o(e) {
303
- return n.path === e;
326
+ setup(t) {
327
+ let r = O(), { withBase: i } = D(), a = t.tree.rootItems.find((t) => e(t.filepath) === n), o = t.tree.rootItems.filter((t) => e(t.filepath) !== n);
328
+ function c(e) {
329
+ return r.path === e;
304
330
  }
305
- return (t, n) => (B(), M("nav", null, [
306
- N("a", {
307
- href: W(r) ? W(u)(W(r).filepath) : "/index",
308
- class: L(["td-root-link", { "is-active": o(W(r) ? W(u)(W(r).filepath) : "/") }])
331
+ return (e, n) => (H(), F("nav", null, [
332
+ I("a", {
333
+ href: q(i)(q(a) ? q(b)(q(a).filepath) : q(s)("/")),
334
+ class: z(["td-root-link", { "is-active": c(q(a) ? q(b)(q(a).filepath) : q(s)("/")) }])
309
335
  }, [
310
- F(W(De), {
336
+ L(q(ke), {
311
337
  size: 14,
312
338
  class: "td-root-link-icon"
313
339
  }),
314
- n[0] ||= N("span", { class: "td-root-link-text" }, "Overview", -1),
315
- W(r) ? (B(), M("span", $e, U(W(s)(W(r).metadata.mtime)), 1)) : j("", !0)
316
- ], 10, Qe),
317
- (B(!0), M(O, null, H(W(a), (e) => (B(), M("a", {
340
+ n[0] ||= I("span", { class: "td-root-link-text" }, "Overview", -1),
341
+ q(a) ? (H(), F("span", at, K(q(d)(q(a).metadata.mtime)), 1)) : P("", !0)
342
+ ], 10, it),
343
+ (H(!0), F(j, null, W(q(o), (e) => (H(), F("a", {
318
344
  key: e.filepath,
319
- href: W(u)(e.filepath),
320
- class: L(["td-root-link", { "is-active": o(W(u)(e.filepath)) }])
345
+ href: q(i)(q(b)(e.filepath)),
346
+ class: z(["td-root-link", { "is-active": c(q(b)(e.filepath)) }])
321
347
  }, [
322
- F(W(T), {
348
+ L(q(k), {
323
349
  size: 14,
324
350
  class: "td-root-link-icon"
325
351
  }),
326
- N("span", tt, U(W(c)(e.header, e.filepath)), 1),
327
- N("span", nt, U(W(s)(e.metadata.mtime)), 1)
328
- ], 10, et))), 128)),
329
- (B(!0), M(O, null, H(e.tree.children, (e) => (B(), A(Ze, {
352
+ I("span", st, K(q(p)(e.header, e.filepath)), 1),
353
+ I("span", ct, K(q(d)(e.metadata.mtime)), 1)
354
+ ], 10, ot))), 128)),
355
+ (H(!0), F(j, null, W(t.tree.children, (e) => (H(), N(rt, {
330
356
  key: e.name,
331
357
  node: e
332
358
  }, null, 8, ["node"]))), 128))
333
359
  ]));
334
360
  }
335
- }), [["__scopeId", "data-v-4fe75821"]]), it = {
361
+ }), [["__scopeId", "data-v-1efa59be"]]), ut = {
362
+ key: 0,
363
+ class: "td-dropdown-panel"
364
+ }, dt = /*#__PURE__*/ T(/* @__PURE__ */ R({
365
+ inheritAttrs: !1,
366
+ __name: "TdDropdown",
367
+ props: {
368
+ open: {
369
+ type: Boolean,
370
+ default: !1
371
+ },
372
+ openModifiers: {}
373
+ },
374
+ emits: ["update:open"],
375
+ setup(e) {
376
+ let t = J(e, "open"), n = ye("wrapper");
377
+ function r(e) {
378
+ n.value?.contains(e.target) || (t.value = !1);
379
+ }
380
+ function i() {
381
+ t.value = !t.value;
382
+ }
383
+ return Y(t, (e) => {
384
+ e ? document.addEventListener("click", r) : document.removeEventListener("click", r);
385
+ }), V(() => {
386
+ document.removeEventListener("click", r);
387
+ }), (e, r) => (H(), F("span", fe({
388
+ ref_key: "wrapper",
389
+ ref: n
390
+ }, e.$attrs, { class: "td-dropdown" }), [I("span", { onClick: i }, [G(e.$slots, "trigger", {}, void 0, !0)]), t.value ? (H(), F("div", ut, [G(e.$slots, "default", {}, void 0, !0)])) : P("", !0)], 16));
391
+ }
392
+ }), [["__scopeId", "data-v-a30d9838"]]), ft = {
336
393
  class: "td-breadcrumb",
337
394
  "aria-label": "Breadcrumb"
338
- }, at = {
339
- key: 0,
340
- class: "td-breadcrumb-sep",
341
- "aria-hidden": "true"
342
- }, ot = ["href"], st = {
343
- key: 2,
395
+ }, pt = ["href"], mt = {
396
+ type: "button",
397
+ class: "td-breadcrumb-ellipsis"
398
+ }, ht = ["href"], gt = ["href"], _t = {
399
+ key: 1,
344
400
  class: "td-breadcrumb-current"
345
- }, ct = /*#__PURE__*/ S(/* @__PURE__ */ I({
401
+ }, vt = ["href"], yt = {
402
+ key: 1,
403
+ class: "td-breadcrumb-current"
404
+ }, bt = 3, xt = /*#__PURE__*/ T(/* @__PURE__ */ R({
346
405
  __name: "TdBreadcrumb",
347
406
  setup(e) {
348
- let t = w(), n = k(() => {
349
- let e = t.path === "/" ? "/" : t.path.replace(/\/$/, ""), n = [{
407
+ let n = O(), { withBase: r } = D(), a = U(!1), o = M(() => {
408
+ let e = t(n.path), a = [{
350
409
  name: "Home",
351
- href: "/index"
410
+ href: r(s("/"))
352
411
  }];
353
- if (e === "/") return n;
354
- let r = e.replace(/^\//, "").split("/");
355
- for (let e = 0; e < r.length; e++) {
356
- let t = "/" + r.slice(0, e + 1).join("/"), i = e === r.length - 1;
357
- n.push({
358
- name: d(r[e]),
359
- href: i ? t : t + "/index"
412
+ if (e === "/") return a;
413
+ let o = e.replace(/^\//, "").split("/"), l = c(e) ? o.slice(0, -1) : o;
414
+ for (let e = 0; e < l.length; e++) {
415
+ let t = "/" + l.slice(0, e + 1).join("/"), n = e === l.length - 1;
416
+ a.push({
417
+ name: i(l[e]),
418
+ href: r(n ? t : s(t))
360
419
  });
361
420
  }
362
- return n;
363
- });
364
- return (e, t) => (B(), M("nav", it, [(B(!0), M(O, null, H(n.value, (e, t) => (B(), M(O, { key: e.href }, [t > 0 ? (B(), M("span", at, "/")) : j("", !0), t < n.value.length - 1 ? (B(), M("a", {
365
- key: 1,
421
+ return a;
422
+ }), l = M(() => bt < o.value.length), u = M(() => o.value.slice(1, -2));
423
+ return Y(() => n.path, () => {
424
+ a.value = !1;
425
+ }), (e, t) => (H(), F("nav", ft, [I("a", {
426
+ href: o.value[0].href,
427
+ class: "td-breadcrumb-link td-breadcrumb-home"
428
+ }, K(o.value[0].name), 9, pt), l.value ? (H(), F(j, { key: 0 }, [
429
+ t[2] ||= I("span", {
430
+ class: "td-breadcrumb-sep",
431
+ "aria-hidden": "true"
432
+ }, "/", -1),
433
+ L(dt, {
434
+ open: a.value,
435
+ "onUpdate:open": t[0] ||= (e) => a.value = e
436
+ }, {
437
+ trigger: X(() => [I("button", mt, [L(q(De), { size: 14 })])]),
438
+ default: X(() => [(H(!0), F(j, null, W(u.value, (e) => (H(), F("a", {
439
+ key: e.href,
440
+ href: e.href,
441
+ class: "td-breadcrumb-dropdown-item"
442
+ }, K(e.name), 9, ht))), 128))]),
443
+ _: 1
444
+ }, 8, ["open"]),
445
+ (H(!0), F(j, null, W(o.value.slice(-2), (e) => (H(), F(j, { key: e.href }, [t[1] ||= I("span", {
446
+ class: "td-breadcrumb-sep",
447
+ "aria-hidden": "true"
448
+ }, "/", -1), e === o.value[o.value.length - 1] ? (H(), F("span", _t, K(e.name), 1)) : (H(), F("a", {
449
+ key: 0,
450
+ href: e.href,
451
+ class: "td-breadcrumb-link"
452
+ }, K(e.name), 9, gt))], 64))), 128))
453
+ ], 64)) : (H(!0), F(j, { key: 1 }, W(o.value.slice(1), (e, n) => (H(), F(j, { key: e.href }, [t[3] ||= I("span", {
454
+ class: "td-breadcrumb-sep",
455
+ "aria-hidden": "true"
456
+ }, "/", -1), n < o.value.length - 2 ? (H(), F("a", {
457
+ key: 0,
366
458
  href: e.href,
367
459
  class: "td-breadcrumb-link"
368
- }, U(e.name), 9, ot)) : (B(), M("span", st, U(e.name), 1))], 64))), 128))]));
460
+ }, K(e.name), 9, vt)) : (H(), F("span", yt, K(e.name), 1))], 64))), 128))]));
369
461
  }
370
- }), [["__scopeId", "data-v-d6597dd1"]]), lt = { class: "td-widget-checkbox" }, ut = /*#__PURE__*/ S(/* @__PURE__ */ I({
462
+ }), [["__scopeId", "data-v-948f69fb"]]), St = { class: "td-widget-checkbox" }, Ct = /*#__PURE__*/ T(/* @__PURE__ */ R({
371
463
  __name: "TdWidgetCheckbox",
372
464
  props: { value: {} },
373
465
  setup(e) {
374
- return (t, n) => (B(), M("span", lt, [e.value ? (B(), A(W(Me), {
466
+ return (t, n) => (H(), F("span", St, [e.value ? (H(), N(q(Pe), {
375
467
  key: 0,
376
468
  size: 16,
377
469
  class: "td-widget-checkbox-icon is-checked"
378
- })) : (B(), A(W(Ne), {
470
+ })) : (H(), N(q(Fe), {
379
471
  key: 1,
380
472
  size: 16,
381
473
  class: "td-widget-checkbox-icon"
@@ -384,7 +476,7 @@ var Ce = C("chevron-down", [["path", {
384
476
  }), [["__scopeId", "data-v-0efb2919"]]);
385
477
  //#endregion
386
478
  //#region src/client/theme-default/components/TdFrontmatter/widgets/ref.ts
387
- function dt(e) {
479
+ function wt(e) {
388
480
  if (typeof e != "object" || !e) return;
389
481
  let t = e.$ref;
390
482
  if (typeof t != "object" || !t) return;
@@ -396,36 +488,36 @@ function dt(e) {
396
488
  }
397
489
  //#endregion
398
490
  //#region src/client/theme-default/components/TdFrontmatter/widgets/TdWidgetList.vue?vue&type=script&setup=true&lang.ts
399
- var ft = { class: "td-widget-list" }, pt = ["href"], mt = { class: "td-widget-list" }, X = 5, ht = /*#__PURE__*/ S(/* @__PURE__ */ I({
491
+ var Tt = { class: "td-widget-list" }, Et = ["href"], Dt = { class: "td-widget-list" }, Ot = 5, kt = /*#__PURE__*/ T(/* @__PURE__ */ R({
400
492
  __name: "TdWidgetList",
401
493
  props: {
402
494
  definition: {},
403
495
  value: {}
404
496
  },
405
497
  setup(e) {
406
- let t = V(!1), n = Array.isArray(e.value) ? e.value : [], r = e.definition.items?.widget === "relation", i = r ? n.map((e) => dt(e)).filter((e) => e !== void 0) : [], a = r ? Math.max(0, i.length - X) : Math.max(0, n.length - X);
498
+ let t = U(!1), n = Array.isArray(e.value) ? e.value : [], r = e.definition.items?.widget === "relation", i = r ? n.map((e) => wt(e)).filter((e) => e !== void 0) : [], a = r ? Math.max(0, i.length - Ot) : Math.max(0, n.length - Ot);
407
499
  function o() {
408
500
  t.value = !t.value;
409
501
  }
410
502
  function s(e) {
411
- return t.value ? e : e.slice(0, X);
503
+ return t.value ? e : e.slice(0, Ot);
412
504
  }
413
- return (e, c) => r ? (B(), M(O, { key: 0 }, [N("ul", ft, [(B(!0), M(O, null, H(s(W(i)), (e, t) => (B(), M("li", { key: t }, [N("a", {
505
+ return (e, c) => r ? (H(), F(j, { key: 0 }, [I("ul", Tt, [(H(!0), F(j, null, W(s(q(i)), (e, t) => (H(), F("li", { key: t }, [I("a", {
414
506
  href: e.url,
415
507
  class: "td-widget-ref"
416
- }, U(e.name), 9, pt)]))), 128))]), W(a) > 0 ? (B(), M("button", {
508
+ }, K(e.name), 9, Et)]))), 128))]), q(a) > 0 ? (H(), F("button", {
417
509
  key: 0,
418
510
  class: "td-widget-more",
419
511
  type: "button",
420
512
  onClick: o
421
- }, U(t.value ? "show less" : `+${W(a)} more`), 1)) : j("", !0)], 64)) : (B(), M(O, { key: 1 }, [N("ul", mt, [(B(!0), M(O, null, H(s(W(n)), (e, t) => (B(), M("li", { key: t }, U(e), 1))), 128))]), W(a) > 0 ? (B(), M("button", {
513
+ }, K(t.value ? "show less" : `+${q(a)} more`), 1)) : P("", !0)], 64)) : (H(), F(j, { key: 1 }, [I("ul", Dt, [(H(!0), F(j, null, W(s(q(n)), (e, t) => (H(), F("li", { key: t }, K(e), 1))), 128))]), q(a) > 0 ? (H(), F("button", {
422
514
  key: 0,
423
515
  class: "td-widget-more",
424
516
  type: "button",
425
517
  onClick: o
426
- }, U(t.value ? "show less" : `+${W(a)} more`), 1)) : j("", !0)], 64));
518
+ }, K(t.value ? "show less" : `+${q(a)} more`), 1)) : P("", !0)], 64));
427
519
  }
428
- }), [["__scopeId", "data-v-bfc073f9"]]), gt = [
520
+ }), [["__scopeId", "data-v-ea3c2047"]]), At = [
429
521
  {
430
522
  fg: "#a0522d",
431
523
  bg: "rgba(160, 82, 45, 0.1)"
@@ -459,60 +551,60 @@ var ft = { class: "td-widget-list" }, pt = ["href"], mt = { class: "td-widget-li
459
551
  bg: "rgba(239, 68, 68, 0.1)"
460
552
  }
461
553
  ];
462
- function _t(e) {
463
- let t = gt[vt(String(e ?? "")) % gt.length];
554
+ function jt(e) {
555
+ let t = At[Mt(String(e ?? "")) % At.length];
464
556
  return {
465
557
  color: t.fg,
466
558
  background: t.bg
467
559
  };
468
560
  }
469
- function vt(e) {
561
+ function Mt(e) {
470
562
  let t = 0;
471
563
  for (let n = 0; n < e.length; n++) t = (t << 5) - t + e.charCodeAt(n) | 0;
472
564
  return Math.abs(t);
473
565
  }
474
566
  //#endregion
475
567
  //#region src/client/theme-default/components/TdFrontmatter/widgets/TdWidgetMultiSelect.vue?vue&type=script&setup=true&lang.ts
476
- var yt = 5, bt = /*#__PURE__*/ S(/* @__PURE__ */ I({
568
+ var Nt = 5, Pt = /*#__PURE__*/ T(/* @__PURE__ */ R({
477
569
  __name: "TdWidgetMultiSelect",
478
570
  props: { value: {} },
479
571
  setup(e) {
480
- let t = V(!1), n = Array.isArray(e.value) ? e.value : [], r = () => t.value ? n : n.slice(0, yt), i = Math.max(0, n.length - yt);
572
+ let t = U(!1), n = Array.isArray(e.value) ? e.value : [], r = () => t.value ? n : n.slice(0, Nt), i = Math.max(0, n.length - Nt);
481
573
  function a() {
482
574
  t.value = !t.value;
483
575
  }
484
- return (e, n) => (B(), M(O, null, [(B(!0), M(O, null, H(r(), (e, t) => (B(), M("span", {
576
+ return (e, n) => (H(), F(j, null, [(H(!0), F(j, null, W(r(), (e, t) => (H(), F("span", {
485
577
  key: t,
486
578
  class: "td-widget-pill",
487
- style: R(W(_t)(e))
488
- }, U(e), 5))), 128)), W(i) > 0 ? (B(), M("button", {
579
+ style: B(q(jt)(e))
580
+ }, K(e), 5))), 128)), q(i) > 0 ? (H(), F("button", {
489
581
  key: 0,
490
582
  class: "td-widget-more",
491
583
  type: "button",
492
584
  onClick: a
493
- }, U(t.value ? "show less" : `+${W(i)} more`), 1)) : j("", !0)], 64));
585
+ }, K(t.value ? "show less" : `+${q(i)} more`), 1)) : P("", !0)], 64));
494
586
  }
495
- }), [["__scopeId", "data-v-33269637"]]), xt = ["href"], St = { key: 1 }, Ct = /*#__PURE__*/ S(/* @__PURE__ */ I({
587
+ }), [["__scopeId", "data-v-33269637"]]), Ft = ["href"], It = { key: 1 }, Lt = /*#__PURE__*/ T(/* @__PURE__ */ R({
496
588
  __name: "TdWidgetRelation",
497
589
  props: { value: {} },
498
590
  setup(e) {
499
- let t = dt(e.value);
500
- return (n, r) => W(t) ? (B(), M("a", {
591
+ let t = wt(e.value);
592
+ return (n, r) => q(t) ? (H(), F("a", {
501
593
  key: 0,
502
- href: W(t).url,
594
+ href: q(t).url,
503
595
  class: "td-widget-ref"
504
- }, U(W(t).name), 9, xt)) : (B(), M("span", St, U(e.value), 1));
596
+ }, K(q(t).name), 9, Ft)) : (H(), F("span", It, K(e.value), 1));
505
597
  }
506
- }), [["__scopeId", "data-v-32528101"]]), wt = /*#__PURE__*/ S(/* @__PURE__ */ I({
598
+ }), [["__scopeId", "data-v-32528101"]]), Rt = /*#__PURE__*/ T(/* @__PURE__ */ R({
507
599
  __name: "TdWidgetSelect",
508
600
  props: { value: {} },
509
601
  setup(e) {
510
- return (t, n) => (B(), M("span", {
602
+ return (t, n) => (H(), F("span", {
511
603
  class: "td-widget-pill",
512
- style: R(W(_t)(e.value))
513
- }, U(e.value), 5));
604
+ style: B(q(jt)(e.value))
605
+ }, K(e.value), 5));
514
606
  }
515
- }), [["__scopeId", "data-v-7dea5e20"]]), Tt = /* @__PURE__ */ I({
607
+ }), [["__scopeId", "data-v-7dea5e20"]]), zt = /* @__PURE__ */ R({
516
608
  __name: "TdWidgetText",
517
609
  props: {
518
610
  definition: {},
@@ -520,97 +612,101 @@ var yt = 5, bt = /*#__PURE__*/ S(/* @__PURE__ */ I({
520
612
  },
521
613
  setup(e) {
522
614
  function t(t) {
523
- return t == null ? "" : e.definition.widget === "date" ? l(String(t)) : String(t);
615
+ return t == null ? "" : e.definition.widget === "date" ? m(String(t)) : String(t);
524
616
  }
525
- return (n, r) => U(t(e.value));
617
+ return (n, r) => K(t(e.value));
526
618
  }
527
- }), Et = {
619
+ }), Bt = {
528
620
  key: 0,
529
621
  class: "td-frontmatter-empty"
530
- }, Dt = /*#__PURE__*/ S(/* @__PURE__ */ I({
622
+ }, Vt = /*#__PURE__*/ T(/* @__PURE__ */ R({
531
623
  __name: "TdFrontmatterValue",
532
624
  props: {
533
625
  definition: {},
534
626
  value: {}
535
627
  },
536
628
  setup(e) {
537
- return (t, n) => e.value === void 0 || e.value === null ? (B(), M("span", Et, "Empty")) : e.definition.widget === "checkbox" ? (B(), A(ut, {
629
+ return (t, n) => e.value === void 0 || e.value === null ? (H(), F("span", Bt, "Empty")) : e.definition.widget === "checkbox" ? (H(), N(Ct, {
538
630
  key: 1,
539
631
  value: e.value
540
- }, null, 8, ["value"])) : e.definition.widget === "select" ? (B(), A(wt, {
632
+ }, null, 8, ["value"])) : e.definition.widget === "select" ? (H(), N(Rt, {
541
633
  key: 2,
542
634
  value: e.value
543
- }, null, 8, ["value"])) : e.definition.widget === "multiSelect" ? (B(), A(bt, {
635
+ }, null, 8, ["value"])) : e.definition.widget === "multiSelect" ? (H(), N(Pt, {
544
636
  key: 3,
545
637
  value: e.value
546
- }, null, 8, ["value"])) : e.definition.widget === "relation" ? (B(), A(Ct, {
638
+ }, null, 8, ["value"])) : e.definition.widget === "relation" ? (H(), N(Lt, {
547
639
  key: 4,
548
640
  value: e.value
549
- }, null, 8, ["value"])) : e.definition.widget === "list" ? (B(), A(ht, {
641
+ }, null, 8, ["value"])) : e.definition.widget === "list" ? (H(), N(kt, {
550
642
  key: 5,
551
643
  definition: e.definition,
552
644
  value: e.value
553
- }, null, 8, ["definition", "value"])) : (B(), A(Tt, {
645
+ }, null, 8, ["definition", "value"])) : (H(), N(zt, {
554
646
  key: 6,
555
647
  definition: e.definition,
556
648
  value: e.value
557
649
  }, null, 8, ["definition", "value"]));
558
650
  }
559
- }), [["__scopeId", "data-v-2d482376"]]), Ot = {
651
+ }), [["__scopeId", "data-v-2d482376"]]), Ht = {
560
652
  key: 0,
561
653
  class: "td-frontmatter"
562
- }, kt = { class: "td-frontmatter-label" }, At = { class: "td-frontmatter-value" }, jt = /*#__PURE__*/ S(/* @__PURE__ */ I({
654
+ }, Ut = { class: "td-frontmatter-label" }, Wt = { class: "td-frontmatter-value" }, Gt = /*#__PURE__*/ T(/* @__PURE__ */ R({
563
655
  __name: "TdFrontmatter",
564
656
  props: {
565
657
  schema: { default: () => void 0 },
566
658
  frontmatter: {}
567
659
  },
568
660
  setup(e) {
569
- let t = y(), n = k(() => {
661
+ let t = S(), n = M(() => {
570
662
  if (e.schema) return t.schemas[e.schema];
571
- }), r = k(() => {
572
- let e = n.value;
573
- return e ? Object.entries(e).filter(([e]) => !e.startsWith("_")) : [];
663
+ }), r = M(() => {
664
+ let t = n.value;
665
+ return t ? Object.entries(t).filter(([t]) => {
666
+ if (f(t)) return !1;
667
+ let n = e.frontmatter[t];
668
+ return !(n === void 0 || Array.isArray(n) && n.length === 0);
669
+ }) : [];
574
670
  });
575
- return (t, n) => r.value.length > 0 ? (B(), M("div", Ot, [(B(!0), M(O, null, H(r.value, ([t, n]) => (B(), M("div", {
671
+ return (t, n) => r.value.length > 0 ? (H(), F("div", Ht, [(H(!0), F(j, null, W(r.value, ([t, n]) => (H(), F("div", {
576
672
  key: t,
577
673
  class: "td-frontmatter-row"
578
- }, [N("span", kt, U(W(d)(t)), 1), N("span", At, [F(Dt, {
674
+ }, [I("span", Ut, K(q(i)(t)), 1), I("span", Wt, [L(Vt, {
579
675
  definition: n,
580
676
  value: e.frontmatter[t]
581
- }, null, 8, ["definition", "value"])])]))), 128))])) : j("", !0);
677
+ }, null, 8, ["definition", "value"])])]))), 128))])) : P("", !0);
582
678
  }
583
- }), [["__scopeId", "data-v-593e9bc4"]]), Z = V(!1);
584
- function Mt() {
679
+ }), [["__scopeId", "data-v-609c8f1c"]]), $ = U(!1);
680
+ function Kt() {
585
681
  function e() {
586
- Z.value = !Z.value;
682
+ $.value = !$.value;
587
683
  }
588
684
  function t() {
589
- Z.value = !1;
685
+ $.value = !1;
590
686
  }
591
687
  return {
592
- isOpen: fe(Z),
688
+ isOpen: ge($),
593
689
  toggle: e,
594
690
  close: t
595
691
  };
596
692
  }
597
693
  //#endregion
598
694
  //#region src/client/theme-default/components/TdMenuButton.vue
599
- var Nt = /* @__PURE__ */ I({
695
+ var qt = /* @__PURE__ */ R({
600
696
  __name: "TdMenuButton",
601
697
  setup(e) {
602
- let { isOpen: t, toggle: n } = Mt();
603
- return (e, r) => (B(), A(J, {
698
+ let { isOpen: t, toggle: n } = Kt();
699
+ return (e, r) => (H(), N(Q, {
604
700
  class: "td-menu-button w-9 h-9 text-td-neutral-fg-muted group",
605
- label: W(t) ? "Close menu" : "Open menu",
606
- "aria-expanded": W(t),
607
- onClick: W(n)
701
+ label: q(t) ? "Close menu" : "Open menu",
702
+ "aria-expanded": q(t),
703
+ onClick: q(n)
608
704
  }, {
609
- default: K(() => [W(t) ? (B(), A(W(q), {
705
+ default: X(() => [q(t) ? (H(), N(q(Z), {
610
706
  key: 0,
611
707
  size: 20,
612
708
  class: "group-hover:text-td-primary-solid transition-colors"
613
- })) : (B(), A(W(ke), {
709
+ })) : (H(), N(q(je), {
614
710
  key: 1,
615
711
  size: 20,
616
712
  class: "group-hover:text-td-primary-solid transition-colors"
@@ -625,70 +721,90 @@ var Nt = /* @__PURE__ */ I({
625
721
  });
626
722
  //#endregion
627
723
  //#region src/client/theme-default/composables/usePreviousNext.ts
628
- function Pt() {
629
- let e = y(), t = w(), n = k(() => It(e.contentTree)), r = k(() => n.value.findIndex((e) => e.url === t.path));
724
+ function Jt() {
725
+ let e = S(), t = O(), { withBase: n } = D(), r = M(() => Xt(e.contentTree)), i = M(() => r.value.findIndex((e) => e.url === t.path));
630
726
  return {
631
- previous: k(() => r.value < 1 ? void 0 : n.value[r.value - 1]),
632
- next: k(() => r.value === -1 || n.value.length - 1 <= r.value ? void 0 : n.value[r.value + 1])
727
+ previous: M(() => {
728
+ if (i.value < 1) return;
729
+ let e = r.value[i.value - 1];
730
+ return {
731
+ ...e,
732
+ url: n(e.url)
733
+ };
734
+ }),
735
+ next: M(() => {
736
+ if (i.value === -1 || r.value.length - 1 <= i.value) return;
737
+ let e = r.value[i.value + 1];
738
+ return {
739
+ ...e,
740
+ url: n(e.url)
741
+ };
742
+ })
633
743
  };
634
744
  }
635
- function Ft(e, n) {
636
- let r = e.items.find((e) => i(e.filepath) === t);
637
- r && n.push(Q(r));
638
- for (let t of e.items) i(t.filepath) !== "index" && n.push(Q(t));
639
- for (let t of e.children) Ft(t, n);
745
+ function Yt(t, r, a) {
746
+ let o = t.items.find((t) => e(t.filepath) === n), c = u(a, t.name);
747
+ o ? r.push(Zt(o)) : r.push({
748
+ url: s(c),
749
+ title: i(t.name)
750
+ });
751
+ for (let n of t.items) e(n.filepath) !== "index" && r.push(Zt(n));
752
+ for (let e of t.children) Yt(e, r, c);
640
753
  }
641
- function It(e) {
754
+ function Xt(e) {
642
755
  let t = [];
643
- for (let n of e.rootItems) t.push(Q(n));
644
- for (let n of e.children) Ft(n, t);
756
+ for (let n of e.rootItems) t.push(Zt(n));
757
+ for (let n of e.children) Yt(n, t, "");
645
758
  return t;
646
759
  }
647
- function Q(e) {
760
+ function Zt(e) {
648
761
  return {
649
- url: u(e.filepath),
650
- title: c(e.header, e.filepath)
762
+ url: b(e.filepath),
763
+ title: p(e.header, e.filepath)
651
764
  };
652
765
  }
653
766
  //#endregion
654
767
  //#region src/client/theme-default/components/TdPreviousNext.vue?vue&type=script&setup=true&lang.ts
655
- var Lt = {
768
+ var Qt = {
656
769
  key: 0,
657
770
  class: "td-previous-next",
658
771
  "aria-label": "Page navigation"
659
- }, Rt = ["href"], zt = { class: "td-previous-next-content" }, Bt = { class: "td-previous-next-title" }, Vt = {
772
+ }, $t = ["href"], en = { class: "td-previous-next-content" }, tn = { class: "td-previous-next-title" }, nn = {
660
773
  key: 1,
661
774
  class: "td-previous-next-spacer"
662
- }, Ht = ["href"], Ut = { class: "td-previous-next-content" }, Wt = { class: "td-previous-next-title" }, Gt = /*#__PURE__*/ S(/* @__PURE__ */ I({
775
+ }, rn = ["href"], an = { class: "td-previous-next-content" }, on = { class: "td-previous-next-title" }, sn = {
776
+ key: 3,
777
+ class: "td-previous-next-spacer"
778
+ }, cn = /*#__PURE__*/ T(/* @__PURE__ */ R({
663
779
  __name: "TdPreviousNext",
664
780
  setup(e) {
665
- let { previous: t, next: n } = Pt();
666
- return (e, r) => W(t) || W(n) ? (B(), M("nav", Lt, [W(t) ? (B(), M("a", {
781
+ let { previous: t, next: n } = Jt();
782
+ return (e, r) => q(t) || q(n) ? (H(), F("nav", Qt, [q(t) ? (H(), F("a", {
667
783
  key: 0,
668
- href: W(t).url,
784
+ href: q(t).url,
669
785
  class: "td-previous-next-link is-previous"
670
- }, [F(W(Te), {
786
+ }, [L(q(Ee), {
671
787
  size: 16,
672
788
  class: "td-previous-next-icon"
673
- }), N("span", zt, [r[0] ||= N("span", { class: "td-previous-next-label" }, "Previous", -1), N("span", Bt, U(W(t).title), 1)])], 8, Rt)) : (B(), M("span", Vt)), W(n) ? (B(), M("a", {
789
+ }), I("span", en, [r[0] ||= I("span", { class: "td-previous-next-label" }, "Previous", -1), I("span", tn, K(q(t).title), 1)])], 8, $t)) : (H(), F("span", nn)), q(n) ? (H(), F("a", {
674
790
  key: 2,
675
- href: W(n).url,
791
+ href: q(n).url,
676
792
  class: "td-previous-next-link is-next"
677
- }, [N("span", Ut, [r[1] ||= N("span", { class: "td-previous-next-label" }, "Next", -1), N("span", Wt, U(W(n).title), 1)]), F(W(we), {
793
+ }, [I("span", an, [r[1] ||= I("span", { class: "td-previous-next-label" }, "Next", -1), I("span", on, K(q(n).title), 1)]), L(q(Te), {
678
794
  size: 16,
679
795
  class: "td-previous-next-icon"
680
- })], 8, Ht)) : j("", !0)])) : j("", !0);
796
+ })], 8, rn)) : (H(), F("span", sn))])) : P("", !0);
681
797
  }
682
- }), [["__scopeId", "data-v-b7a6aa16"]]), Kt = { class: "td-search" }, qt = { class: "td-search-input-wrap" }, Jt = {
798
+ }), [["__scopeId", "data-v-4439d186"]]), ln = { class: "td-search" }, un = { class: "td-search-input-wrap" }, dn = {
683
799
  key: 1,
684
800
  class: "td-search-count"
685
- }, Yt = {
801
+ }, fn = {
686
802
  key: 0,
687
803
  class: "td-search-results"
688
- }, Xt = { class: "td-search-group-label" }, Zt = ["href"], Qt = ["innerHTML"], $t = ["innerHTML"], en = {
804
+ }, pn = { class: "td-search-group-label" }, mn = ["href"], hn = ["innerHTML"], gn = ["innerHTML"], _n = {
689
805
  key: 1,
690
806
  class: "td-search-empty"
691
- }, tn = 120, nn = /*#__PURE__*/ S(/* @__PURE__ */ I({
807
+ }, vn = 120, yn = /*#__PURE__*/ T(/* @__PURE__ */ R({
692
808
  __name: "TdSearch",
693
809
  props: {
694
810
  active: {
@@ -699,115 +815,115 @@ var Lt = {
699
815
  query: { default: "" },
700
816
  queryModifiers: {}
701
817
  },
702
- emits: /*@__PURE__*/ se(["select"], ["update:active", "update:query"]),
703
- setup(t, { emit: n }) {
704
- let r = ge(t, "active"), i = ge(t, "query"), o = n, s = he([]), c = V(!1), l = V(-1), u = k(() => 0 < i.value.trim().length), p = k(() => {
818
+ emits: /*@__PURE__*/ de(["select"], ["update:active", "update:query"]),
819
+ setup(e, { emit: t }) {
820
+ let n = J(e, "active"), s = J(e, "query"), c = t, u = ve([]), d = U(!1), f = U(-1), p = M(() => 0 < s.value.trim().length), m = M(() => {
705
821
  let e = [], t = /* @__PURE__ */ new Map();
706
- for (let n of s.value) {
707
- let r = a(n.id), i = t.get(r);
708
- i || (i = {
822
+ for (let n of u.value) {
823
+ let r = o(n.id), a = t.get(r);
824
+ a || (a = {
709
825
  pageUrl: r,
710
- pageTitle: d(r.split("/").pop() || "index"),
826
+ pageTitle: i(r.split("/").pop() || "index"),
711
827
  results: []
712
- }, t.set(r, i), e.push(i)), i.results.push(n);
828
+ }, t.set(r, a), e.push(a)), a.results.push(n);
713
829
  }
714
830
  return e;
715
831
  });
716
- G(u, (e) => {
717
- r.value = e;
832
+ Y(p, (e) => {
833
+ n.value = e;
718
834
  });
719
- let m = re(), h = ne(), v;
720
- G(m, () => {
721
- v = void 0;
835
+ let g = re(), y = te(), b;
836
+ Y(g, () => {
837
+ b = void 0;
722
838
  });
723
- function y() {
724
- if (v) return v;
725
- if (m.value) return v = oe(ee.loadJSON(m.value, {
726
- fields: e,
727
- storeFields: f
728
- })), v;
839
+ function x() {
840
+ if (b) return b;
841
+ if (g.value) return b = ue(ee.loadJSON(g.value, {
842
+ fields: r,
843
+ storeFields: a
844
+ })), b;
729
845
  }
730
- let b = !1, x = xe((e) => P(e), 150);
731
- G(i, (e, t, n) => {
846
+ let S = !1, C = v((e) => ae(e), 150);
847
+ Y(s, (e, t, n) => {
732
848
  n(() => {
733
- b = !0;
734
- }), b = !1;
849
+ S = !0;
850
+ }), S = !1;
735
851
  let r = e.trim();
736
852
  if (!r) {
737
- s.value = [], c.value = !1;
853
+ u.value = [], d.value = !1;
738
854
  return;
739
855
  }
740
- c.value = !0, l.value = -1, x(r);
856
+ d.value = !0, f.value = -1, C(r);
741
857
  });
742
- function S() {
743
- i.value = "";
858
+ function w() {
859
+ s.value = "";
744
860
  }
745
- function C(e, t) {
746
- let n = RegExp(`id="${Se(t)}"[^>]*>`, "i").exec(e);
747
- if (!n) return _(e);
861
+ function T(e, t) {
862
+ let n = RegExp(`id="${h(t)}"[^>]*>`, "i").exec(e);
863
+ if (!n) return l(e);
748
864
  let r = e.slice(n.index + n[0].length), i = r.search(/<h[1-6]/i);
749
- return _(0 <= i ? r.slice(0, i) : r);
865
+ return l(0 <= i ? r.slice(0, i) : r);
750
866
  }
751
- function te(e, t) {
867
+ function E(e, t) {
752
868
  if (!e) return "";
753
869
  let n = Object.keys(t);
754
- if (n.length === 0) return e.slice(0, tn);
870
+ if (n.length === 0) return e.slice(0, vn);
755
871
  let r = e.toLowerCase(), i = e.length;
756
872
  for (let e of n) {
757
873
  let t = r.indexOf(e.toLowerCase());
758
874
  t !== -1 && t < i && (i = t);
759
875
  }
760
- let a = Math.max(0, i - 30), o = Math.min(e.length, a + tn), s = e.slice(a, o).trim();
876
+ let a = Math.max(0, i - 30), o = Math.min(e.length, a + vn), s = e.slice(a, o).trim();
761
877
  return 0 < a && (s = "..." + s), o < e.length && (s += "..."), s;
762
878
  }
763
- async function w(e, t, n) {
764
- let r = a(t), i = t.indexOf("#"), o = 0 <= i ? t.slice(i + 1) : "";
879
+ async function D(e, t, n) {
880
+ let r = o(t), i = t.indexOf("#"), a = 0 <= i ? t.slice(i + 1) : "";
765
881
  try {
766
882
  let t = (await e(r))?.default, i = (typeof t?.data == "function" ? t.data() : {}).__html ?? "";
767
- return te(o ? C(i, o) : _(i), n);
883
+ return E(a ? T(i, a) : l(i), n);
768
884
  } catch {
769
885
  return "";
770
886
  }
771
887
  }
772
- let T = k(() => p.value.flatMap((e) => e.results)), E = k(() => {
888
+ let O = M(() => m.value.flatMap((e) => e.results)), k = M(() => {
773
889
  let e = /* @__PURE__ */ new Map();
774
- for (let t = 0; t < T.value.length; t++) e.set(T.value[t].id, t);
890
+ for (let t = 0; t < O.value.length; t++) e.set(O.value[t].id, t);
775
891
  return e;
776
892
  });
777
- function D(e, t) {
778
- if (!e || !t) return g(e);
779
- let n = t.trim().split(/\s+/).filter(Boolean), r = g(e);
893
+ function A(e, t) {
894
+ if (!e || !t) return _(e);
895
+ let n = t.trim().split(/\s+/).filter(Boolean), r = _(e);
780
896
  for (let e of n) {
781
- let t = RegExp(`(${Se(e)})`, "gi");
897
+ let t = RegExp(`(${h(e)})`, "gi");
782
898
  r = r.replace(t, "<mark>$1</mark>");
783
899
  }
784
900
  return r;
785
901
  }
786
- function ie(e) {
787
- let t = E.value.size;
902
+ function ne(e) {
903
+ let t = k.value.size;
788
904
  if (t !== 0) {
789
- if (e.key === "ArrowDown") e.preventDefault(), l.value = (l.value + 1) % t;
790
- else if (e.key === "ArrowUp") e.preventDefault(), l.value = (l.value - 1 + t) % t;
791
- else if (e.key === "Enter" && 0 <= l.value) {
905
+ if (e.key === "ArrowDown") e.preventDefault(), f.value = (f.value + 1) % t;
906
+ else if (e.key === "ArrowUp") e.preventDefault(), f.value = (f.value - 1 + t) % t;
907
+ else if (e.key === "Enter" && 0 <= f.value) {
792
908
  e.preventDefault();
793
- let t = T.value[l.value];
909
+ let t = O.value[f.value];
794
910
  if (!t) return;
795
911
  document.querySelector(`.td-search-result[href="${CSS.escape(t.id)}"]`)?.click();
796
912
  }
797
913
  }
798
914
  }
799
- function ae() {
800
- o("select");
915
+ function ie() {
916
+ c("select");
801
917
  }
802
- async function P(e) {
803
- let t = y();
918
+ async function ae(e) {
919
+ let t = x();
804
920
  if (t) try {
805
921
  let n = t.search(e, {
806
922
  prefix: !0,
807
923
  fuzzy: .2,
808
924
  boost: { title: 2 }
809
925
  }), r = await Promise.all(n.slice(0, 20).map(async (e) => {
810
- let t = h ? await w(h, e.id, e.match) : "";
926
+ let t = y ? await D(y, e.id, e.match) : "";
811
927
  return {
812
928
  id: e.id,
813
929
  title: e.title,
@@ -816,72 +932,72 @@ var Lt = {
816
932
  score: e.score
817
933
  };
818
934
  }));
819
- if (b) return;
820
- s.value = r;
935
+ if (S) return;
936
+ u.value = r;
821
937
  } finally {
822
- b || (c.value = !1);
938
+ S || (d.value = !1);
823
939
  }
824
940
  }
825
- return (e, t) => (B(), M("div", Kt, [
826
- N("div", qt, [
827
- F(W(je), {
941
+ return (e, t) => (H(), F("div", ln, [
942
+ I("div", un, [
943
+ L(q(Ne), {
828
944
  size: 14,
829
945
  class: "td-search-icon"
830
946
  }),
831
- ye(N("input", {
832
- "onUpdate:modelValue": t[0] ||= (e) => i.value = e,
947
+ Se(I("input", {
948
+ "onUpdate:modelValue": t[0] ||= (e) => s.value = e,
833
949
  class: "td-search-input",
834
950
  type: "text",
835
951
  size: "1",
836
952
  placeholder: "Search...",
837
- onKeydown: ie
838
- }, null, 544), [[ve, i.value]]),
839
- c.value ? (B(), A(W(Oe), {
953
+ onKeydown: ne
954
+ }, null, 544), [[be, s.value]]),
955
+ d.value ? (H(), N(q(Ae), {
840
956
  key: 0,
841
957
  size: 12,
842
958
  class: "td-search-spinner"
843
- })) : u.value ? (B(), M("span", Jt, U(s.value.length), 1)) : j("", !0),
844
- i.value ? (B(), M("button", {
959
+ })) : p.value ? (H(), F("span", dn, K(u.value.length), 1)) : P("", !0),
960
+ s.value ? (H(), F("button", {
845
961
  key: 2,
846
962
  class: "td-search-clear",
847
963
  type: "button",
848
964
  "aria-label": "Clear search",
849
- onClick: S
850
- }, [F(W(q), { size: 12 })])) : j("", !0)
965
+ onClick: w
966
+ }, [L(q(Z), { size: 12 })])) : P("", !0)
851
967
  ]),
852
- u.value && s.value.length > 0 ? (B(), M("div", Yt, [(B(!0), M(O, null, H(p.value, (e) => (B(), M("div", {
968
+ p.value && u.value.length > 0 ? (H(), F("div", fn, [(H(!0), F(j, null, W(m.value, (e) => (H(), F("div", {
853
969
  key: e.pageUrl,
854
970
  class: "td-search-group"
855
- }, [N("div", Xt, U(e.pageTitle), 1), (B(!0), M(O, null, H(e.results, (e) => (B(), M("a", {
971
+ }, [I("div", pn, K(e.pageTitle), 1), (H(!0), F(j, null, W(e.results, (e) => (H(), F("a", {
856
972
  key: e.id,
857
973
  href: e.id,
858
- class: L(["td-search-result", { "is-selected": E.value.get(e.id) === l.value }]),
859
- onClick: ae
860
- }, [N("span", {
974
+ class: z(["td-search-result", { "is-selected": k.value.get(e.id) === f.value }]),
975
+ onClick: ie
976
+ }, [I("span", {
861
977
  class: "td-search-result-title",
862
- innerHTML: D(e.title, i.value)
863
- }, null, 8, Qt), e.excerpt ? (B(), M("span", {
978
+ innerHTML: A(e.title, s.value)
979
+ }, null, 8, hn), e.excerpt ? (H(), F("span", {
864
980
  key: 0,
865
981
  class: "td-search-result-excerpt",
866
- innerHTML: D(e.excerpt, i.value)
867
- }, null, 8, $t)) : j("", !0)], 10, Zt))), 128))]))), 128))])) : j("", !0),
868
- u.value && s.value.length === 0 ? (B(), M("div", en, " No results for \"" + U(i.value) + "\" ", 1)) : j("", !0)
982
+ innerHTML: A(e.excerpt, s.value)
983
+ }, null, 8, gn)) : P("", !0)], 10, mn))), 128))]))), 128))])) : P("", !0),
984
+ p.value && u.value.length === 0 ? (H(), F("div", _n, " No results for \"" + K(s.value) + "\" ", 1)) : P("", !0)
869
985
  ]));
870
986
  }
871
- }), [["__scopeId", "data-v-dc5caa87"]]), rn = /* @__PURE__ */ I({
987
+ }), [["__scopeId", "data-v-dc5caa87"]]), bn = /* @__PURE__ */ R({
872
988
  __name: "TdThemeToggle",
873
989
  setup(e) {
874
990
  let { isDark: t, toggle: n } = ie();
875
- return (e, r) => (B(), A(J, {
991
+ return (e, r) => (H(), N(Q, {
876
992
  class: "w-9 h-9 text-td-neutral-fg-muted group hover:opacity-70",
877
- label: W(t) ? "Switch to light mode" : "Switch to dark mode",
878
- onClick: W(n)
993
+ label: q(t) ? "Switch to light mode" : "Switch to dark mode",
994
+ onClick: q(n)
879
995
  }, {
880
- default: K(() => [W(t) ? (B(), A(W(Pe), {
996
+ default: X(() => [q(t) ? (H(), N(q(Ie), {
881
997
  key: 0,
882
998
  size: 18,
883
999
  class: "group-hover:text-td-primary-solid transition-colors"
884
- })) : (B(), A(W(Ae), {
1000
+ })) : (H(), N(q(Me), {
885
1001
  key: 1,
886
1002
  size: 18,
887
1003
  class: "group-hover:text-td-primary-solid transition-colors"
@@ -892,7 +1008,7 @@ var Lt = {
892
1008
  });
893
1009
  //#endregion
894
1010
  //#region src/client/theme-default/composables/useCopyCode.ts
895
- function an() {
1011
+ function xn() {
896
1012
  function e(e) {
897
1013
  let t = e.target?.closest(".copy");
898
1014
  if (!t) return;
@@ -904,19 +1020,19 @@ function an() {
904
1020
  t.classList.remove("copied"), t.setAttribute("title", i);
905
1021
  }, 2e3);
906
1022
  }
907
- de(() => {
1023
+ he(() => {
908
1024
  document.addEventListener("click", e);
909
- }), z(() => {
1025
+ }), V(() => {
910
1026
  document.removeEventListener("click", e);
911
1027
  });
912
1028
  }
913
1029
  //#endregion
914
1030
  //#region src/client/theme-default/composables/useResizableTable.ts
915
- var on = 6, sn = 40;
916
- function cn() {
1031
+ var Sn = 6, Cn = 40;
1032
+ function wn() {
917
1033
  let e, t = !1;
918
1034
  function n(e, t) {
919
- return e.getBoundingClientRect().right - t < on;
1035
+ return e.getBoundingClientRect().right - t < Sn;
920
1036
  }
921
1037
  function r(r) {
922
1038
  if (t) return;
@@ -936,23 +1052,23 @@ function cn() {
936
1052
  r.classList.add("is-resizing"), document.body.style.cursor = "col-resize";
937
1053
  function o(e) {
938
1054
  let t = e.clientX - i;
939
- r && (r.style.width = `${Math.max(sn, a + t)}px`);
1055
+ r && (r.style.width = `${Math.max(Cn, a + t)}px`);
940
1056
  }
941
1057
  function s() {
942
1058
  t = !1, r?.classList.remove("is-resizing"), document.body.style.cursor = "", document.removeEventListener("pointermove", o), document.removeEventListener("pointerup", s);
943
1059
  }
944
1060
  document.addEventListener("pointermove", o), document.addEventListener("pointerup", s);
945
1061
  }
946
- de(() => {
1062
+ he(() => {
947
1063
  document.addEventListener("pointermove", r), document.addEventListener("pointerdown", i);
948
- }), z(() => {
1064
+ }), V(() => {
949
1065
  document.removeEventListener("pointermove", r), document.removeEventListener("pointerdown", i);
950
1066
  });
951
1067
  }
952
1068
  //#endregion
953
1069
  //#region src/client/theme-default/composables/useActiveTocHeading.ts
954
- function ln(e) {
955
- let t = V(""), n;
1070
+ function Tn(e) {
1071
+ let t = U(""), n;
956
1072
  function r() {
957
1073
  n?.disconnect(), t.value = "";
958
1074
  let e = Array.from(document.querySelectorAll(".td-content h2[id], .td-content h3[id], .td-content h4[id], .td-content h5[id]"));
@@ -974,140 +1090,148 @@ function ln(e) {
974
1090
  for (let t of e) n.observe(t);
975
1091
  }
976
1092
  }
977
- return G(e, () => le(r), { immediate: !0 }), z(() => {
1093
+ return Y(e, () => pe(r), { immediate: !0 }), V(() => {
978
1094
  n?.disconnect();
979
1095
  }), t;
980
1096
  }
981
1097
  //#endregion
982
1098
  //#region src/client/theme-default/components/TdToc.vue?vue&type=script&setup=true&lang.ts
983
- var un = {
1099
+ var En = {
984
1100
  key: 0,
985
1101
  class: "td-toc"
986
- }, dn = { class: "td-toc-list" }, fn = ["href"], pn = /*#__PURE__*/ S(/* @__PURE__ */ I({
1102
+ }, Dn = { class: "td-toc-list" }, On = ["href"], kn = /*#__PURE__*/ T(/* @__PURE__ */ R({
987
1103
  __name: "TdToc",
988
1104
  props: { headings: {} },
989
1105
  setup(e) {
990
- let t = ln(() => e.headings);
991
- return (n, r) => e.headings.length ? (B(), M("div", un, [r[0] ||= N("div", { class: "td-toc-label" }, " On this page ", -1), N("ul", dn, [(B(!0), M(O, null, H(e.headings, (e) => (B(), M("li", {
1106
+ let t = Tn(() => e.headings);
1107
+ return (n, r) => e.headings.length ? (H(), F("div", En, [r[0] ||= I("div", { class: "td-toc-label" }, " On this page ", -1), I("ul", Dn, [(H(!0), F(j, null, W(e.headings, (e) => (H(), F("li", {
992
1108
  key: e.slug,
993
- class: L({
1109
+ class: z({
994
1110
  "td-toc-indent-1": e.level === 3,
995
1111
  "td-toc-indent-2": e.level === 4,
996
1112
  "td-toc-indent-3": e.level === 5
997
1113
  })
998
- }, [N("a", {
1114
+ }, [I("a", {
999
1115
  href: e.link,
1000
- class: L(["td-toc-link", { "is-active": W(t) === e.slug }])
1001
- }, U(e.title), 11, fn)], 2))), 128))])])) : j("", !0);
1116
+ class: z(["td-toc-link", { "is-active": q(t) === e.slug }])
1117
+ }, K(e.title), 11, On)], 2))), 128))])])) : P("", !0);
1002
1118
  }
1003
- }), [["__scopeId", "data-v-84e4402d"]]), mn = { class: "td-header" }, hn = { class: "td-header-left" }, gn = {
1004
- href: "/index",
1005
- class: "td-brand"
1006
- }, _n = { class: "td-brand-name" }, vn = { class: "td-header-right" }, yn = { class: "td-menu-header" }, bn = { class: "td-header-left" }, xn = {
1007
- href: "/index",
1008
- class: "td-brand"
1009
- }, Sn = { class: "td-brand-name" }, Cn = {
1119
+ }), [["__scopeId", "data-v-84e4402d"]]), An = { class: "td-header" }, jn = { class: "td-header-left" }, Mn = ["href"], Nn = { class: "td-brand-name" }, Pn = { class: "td-header-right" }, Fn = { class: "td-menu-header" }, In = { class: "td-header-left" }, Ln = ["href"], Rn = { class: "td-brand-name" }, zn = {
1010
1120
  key: 0,
1011
1121
  class: "pt-4",
1012
1122
  "aria-label": "Site navigation"
1013
- }, wn = { class: "td-page" }, Tn = { class: "td-main-and-toc" }, En = { class: "td-main" }, Dn = { class: "td-content" }, On = {
1014
- key: 0,
1015
- class: "td-page-title"
1016
- }, kn = {
1123
+ }, Bn = { class: "td-page" }, Vn = { class: "td-main-and-toc" }, Hn = { class: "td-main" }, Un = { class: "td-content" }, Wn = ["innerHTML"], Gn = {
1017
1124
  key: 1,
1018
1125
  class: "td-page-meta"
1019
- }, An = { key: 0 }, jn = {
1126
+ }, Kn = { key: 0 }, qn = {
1020
1127
  class: "td-sidebar-right",
1021
1128
  "aria-label": "Table of contents"
1022
- }, Mn = 200, Nn = 500, Pn = 272, Fn = "td-sidebar-width", In = /*#__PURE__*/ S(/* @__PURE__ */ I({
1129
+ }, Jn = 200, Yn = 500, Xn = 272, Zn = "td-sidebar-width", Qn = /*#__PURE__*/ T(/* @__PURE__ */ R({
1023
1130
  __name: "TdLayout",
1024
1131
  setup(e) {
1025
- let { title: t, page: n } = E(), r = te(), i = y(), { isOpen: a, close: s } = Mt(), c = V(""), l = V(!1), u = V(!1), d = w();
1026
- G(() => d.path, () => s()), an(), cn();
1027
- let f = V(typeof localStorage < "u" && Number(localStorage.getItem(Fn)) || Pn);
1028
- function p(e) {
1029
- let t = e.clientX, n = f.value, r = e.currentTarget;
1132
+ let { title: t, page: n } = A(), r = D(), { withBase: i } = r, a = S(), { isOpen: o, close: c } = Kt(), l = U(""), u = U(!1), d = U(!1), f = O();
1133
+ Y(() => f.path, () => c()), xn(), xe(() => {
1134
+ let e = t.value, i = r.title;
1135
+ document.title = e && e !== i ? `${e} - ${i}` : i;
1136
+ let a = n.frontmatter?.description === void 0 ? r.description ?? "" : String(n.frontmatter.description), o = document.querySelector("meta[name=\"description\"]");
1137
+ o && o.setAttribute("content", a);
1138
+ }), wn();
1139
+ let p = U(typeof localStorage < "u" && Number(localStorage.getItem(Zn)) || Xn);
1140
+ function m(e) {
1141
+ let t = e.clientX, n = p.value, r = e.currentTarget;
1030
1142
  r.setPointerCapture(e.pointerId);
1031
1143
  function i(e) {
1032
- let r = Math.min(Nn, Math.max(Mn, n + e.clientX - t));
1033
- f.value = r;
1144
+ let r = Math.min(Yn, Math.max(Jn, n + e.clientX - t));
1145
+ p.value = r;
1034
1146
  }
1035
1147
  function a() {
1036
- document.body.style.cursor = "", r.removeEventListener("pointermove", i), r.removeEventListener("pointerup", a), localStorage.setItem(Fn, String(f.value));
1148
+ document.body.style.cursor = "", r.removeEventListener("pointermove", i), r.removeEventListener("pointerup", a), localStorage.setItem(Zn, String(p.value));
1037
1149
  }
1038
1150
  document.body.style.cursor = "col-resize", r.addEventListener("pointermove", i), r.addEventListener("pointerup", a);
1039
1151
  }
1040
- return (e, d) => (B(), M("div", null, [
1041
- N("header", mn, [N("div", hn, [F(Nt), N("a", gn, [F(ze), N("span", _n, U(W(r).title || "Typedown"), 1)])]), N("div", vn, [F(rn)])]),
1042
- N("div", { class: L(["td-menu-overlay", { "is-open": W(a) }]) }, [
1043
- N("header", yn, [N("div", bn, [F(J, {
1152
+ return (e, f) => (H(), F("div", null, [
1153
+ I("header", An, [I("div", jn, [L(qt), I("a", {
1154
+ href: q(i)(q(s)("/")),
1155
+ class: "td-brand"
1156
+ }, [L(Ve), I("span", Nn, K(q(r).title || "Typedown"), 1)], 8, Mn)]), I("div", Pn, [L(bn)])]),
1157
+ I("div", { class: z(["td-menu-overlay", { "is-open": q(o) }]) }, [
1158
+ I("header", Fn, [I("div", In, [L(Q, {
1044
1159
  class: "w-9 h-9 text-td-neutral-fg-muted hover:text-td-primary-solid",
1045
1160
  label: "Close menu",
1046
- onClick: W(s)
1161
+ onClick: q(c)
1047
1162
  }, {
1048
- default: K(() => [F(W(q), { size: 20 })]),
1163
+ default: X(() => [L(q(Z), { size: 20 })]),
1049
1164
  _: 1
1050
- }, 8, ["onClick"]), N("a", xn, [F(ze), N("span", Sn, U(W(r).title || "Typedown"), 1)])])]),
1051
- F(nn, {
1052
- query: c.value,
1053
- "onUpdate:query": d[0] ||= (e) => c.value = e,
1054
- active: u.value,
1055
- "onUpdate:active": d[1] ||= (e) => u.value = e,
1056
- onSelect: W(s)
1165
+ }, 8, ["onClick"]), I("a", {
1166
+ href: q(i)(q(s)("/")),
1167
+ class: "td-brand"
1168
+ }, [L(Ve), I("span", Rn, K(q(r).title || "Typedown"), 1)], 8, Ln)])]),
1169
+ L(yn, {
1170
+ query: l.value,
1171
+ "onUpdate:query": f[0] ||= (e) => l.value = e,
1172
+ active: d.value,
1173
+ "onUpdate:active": f[1] ||= (e) => d.value = e,
1174
+ onSelect: q(c)
1057
1175
  }, null, 8, [
1058
1176
  "query",
1059
1177
  "active",
1060
1178
  "onSelect"
1061
1179
  ]),
1062
- u.value ? j("", !0) : (B(), M("nav", Cn, [F(rt, { tree: W(i).contentTree }, null, 8, ["tree"])]))
1180
+ d.value ? P("", !0) : (H(), F("nav", zn, [L(lt, { tree: q(a).contentTree }, null, 8, ["tree"])]))
1063
1181
  ], 2),
1064
- N("div", wn, [N("nav", {
1182
+ I("div", Bn, [I("nav", {
1065
1183
  class: "td-sidebar-left",
1066
1184
  "aria-label": "Site navigation",
1067
- style: R({ width: `${f.value}px` })
1185
+ style: B({ width: `${p.value}px` })
1068
1186
  }, [
1069
- F(nn, {
1070
- query: c.value,
1071
- "onUpdate:query": d[2] ||= (e) => c.value = e,
1072
- active: l.value,
1073
- "onUpdate:active": d[3] ||= (e) => l.value = e
1187
+ L(yn, {
1188
+ query: l.value,
1189
+ "onUpdate:query": f[2] ||= (e) => l.value = e,
1190
+ active: u.value,
1191
+ "onUpdate:active": f[3] ||= (e) => u.value = e
1074
1192
  }, null, 8, ["query", "active"]),
1075
- l.value ? j("", !0) : (B(), A(rt, {
1193
+ u.value ? P("", !0) : (H(), N(lt, {
1076
1194
  key: 0,
1077
- tree: W(i).contentTree
1195
+ tree: q(a).contentTree
1078
1196
  }, null, 8, ["tree"])),
1079
- N("div", {
1197
+ I("div", {
1080
1198
  class: "td-sidebar-resize",
1081
- onPointerdown: be(p, ["prevent"])
1199
+ onPointerdown: Ce(m, ["prevent"])
1082
1200
  }, null, 32)
1083
- ], 4), N("div", Tn, [N("main", En, [N("article", Dn, [
1084
- F(ct),
1085
- W(t) ? (B(), M("h1", On, U(W(t)), 1)) : j("", !0),
1086
- W(n).metadata ? (B(), M("div", kn, [N("span", null, U(W(o)(W(n).metadata.mtime, "Modified")), 1), W(n).metadata.ctime === W(n).metadata.mtime ? j("", !0) : (B(), M("span", An, " · " + U(W(o)(W(n).metadata.ctime, "Created")), 1))])) : j("", !0),
1087
- F(W(jt), {
1088
- schema: W(n).schema,
1089
- frontmatter: W(n).frontmatter
1201
+ ], 4), I("div", Vn, [I("main", Hn, [I("article", Un, [
1202
+ L(xt),
1203
+ q(t) ? (H(), F("h1", {
1204
+ key: 0,
1205
+ class: "td-page-title",
1206
+ innerHTML: q(We)(q(t))
1207
+ }, null, 8, Wn)) : P("", !0),
1208
+ q(n).metadata ? (H(), F("div", Gn, [I("span", null, K(q(g)(q(n).metadata.mtime, "Modified")), 1), q(n).metadata.ctime === q(n).metadata.mtime ? P("", !0) : (H(), F("span", Kn, " · " + K(q(g)(q(n).metadata.ctime, "Created")), 1))])) : P("", !0),
1209
+ L(q(Gt), {
1210
+ schema: q(n).schema,
1211
+ frontmatter: q(n).frontmatter
1090
1212
  }, null, 8, ["schema", "frontmatter"]),
1091
- F(W(b)),
1092
- F(Gt)
1093
- ])]), N("nav", jn, [F(pn, { headings: W(n).headings }, null, 8, ["headings"])])])])
1213
+ L(q(C)),
1214
+ L(cn)
1215
+ ])]), I("nav", qn, [L(kn, { headings: q(n).headings }, null, 8, ["headings"])])])])
1094
1216
  ]));
1095
1217
  }
1096
- }), [["__scopeId", "data-v-9320a939"]]), Ln = {}, Rn = { class: "pt-16 pb-24" };
1097
- function zn(e, t) {
1098
- return B(), M("div", Rn, [...t[0] ||= [
1099
- N("p", { class: "text-td-display font-td-heading leading-none tracking-td-title text-td-fg-muted" }, " 404 ", -1),
1100
- N("h1", { class: "text-td-h2 font-td-heading leading-td-heading tracking-td-heading mt-4" }, " Page Not Found ", -1),
1101
- N("p", { class: "text-td-fg-muted mt-2 text-td-body leading-td-body" }, " The page you are looking for does not exist. ", -1),
1102
- N("a", {
1103
- class: "inline-flex items-center mt-6 text-td-primary-solid text-td-ui font-td-heading tracking-td-heading hover:text-td-primary-solid-hover",
1104
- href: "/index"
1105
- }, "Go Home", -1)
1106
- ]]);
1107
- }
1108
- var $ = /*#__PURE__*/ S(Ln, [["render", zn]]), Bn = {
1109
- Layout: In,
1110
- NotFound: $
1218
+ }), [["__scopeId", "data-v-81c10ebb"]]), $n = { class: "pt-16 pb-24" }, er = ["href"], tr = /* @__PURE__ */ R({
1219
+ __name: "TdNotFound",
1220
+ setup(e) {
1221
+ let { withBase: t } = D();
1222
+ return (e, n) => (H(), F("div", $n, [
1223
+ n[0] ||= I("p", { class: "text-td-display font-td-heading leading-none tracking-td-title text-td-fg-muted" }, " 404 ", -1),
1224
+ n[1] ||= I("h1", { class: "text-td-h2 font-td-heading leading-td-heading tracking-td-heading mt-4" }, " Page Not Found ", -1),
1225
+ n[2] ||= I("p", { class: "text-td-fg-muted mt-2 text-td-body leading-td-body" }, " The page you are looking for does not exist. ", -1),
1226
+ I("a", {
1227
+ class: "inline-flex items-center mt-6 text-td-primary-solid text-td-ui font-td-heading tracking-td-heading hover:text-td-primary-solid-hover",
1228
+ href: q(t)(q(s)("/"))
1229
+ }, "Go Home", 8, er)
1230
+ ]));
1231
+ }
1232
+ }), nr = {
1233
+ Layout: Qn,
1234
+ NotFound: tr
1111
1235
  };
1112
1236
  //#endregion
1113
- export { x as TdDirectoryIndex, In as TdLayout, $ as TdNotFound, Bn as default, an as useCopyCode };
1237
+ export { w as TdDirectoryIndex, Qn as TdLayout, tr as TdNotFound, nr as default, xn as useCopyCode };