typerighter 0.36.0 → 0.38.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{app-I-BVWGvX.js → app-Bnln5XCo.js} +387 -390
- package/dist/{cli-gWL2iV9t.js → cli-DEOw0tox.js} +9 -8
- package/dist/cli.js +1 -1
- package/dist/client/theme-default.js +807 -824
- package/dist/client.js +2 -2
- package/dist/index.js +2 -2
- package/dist/{init-B4qgEdbu.js → init-BhEVxNbG.js} +3 -3
- package/dist/node/cli/index.d.ts.map +1 -1
- package/dist/node/lib/typedown-context.d.ts.map +1 -1
- package/dist/node/plugin/vite/index.d.ts.map +1 -1
- package/dist/node/plugin/vite/middleware/vault-assets.d.ts.map +1 -1
- package/dist/shared/constants.d.ts.map +1 -1
- package/dist/shared/utils/path.d.ts +1 -0
- package/dist/shared/utils/path.d.ts.map +1 -1
- package/dist/{shared-hpG9wf_j.js → shared-l3GF0JOc.js} +67 -62
- package/dist/shared.js +2 -2
- package/dist/typerighter.css +1 -1
- package/dist/{vite-3b1YMuxJ.js → vite-DACnySpv.js} +207 -217
- package/dist/vite.js +1 -1
- package/package.json +8 -5
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as
|
|
3
|
-
import { t as
|
|
4
|
-
import { A as
|
|
5
|
-
import { a as
|
|
6
|
-
import { Fragment as M, Teleport as
|
|
7
|
-
var
|
|
1
|
+
import { D as e, E as t, K as n, M as r, N as i, O as a, P as o, S as s, V as c, _ as l, c as u, d, f, g as p, h as m, i as h, j as g, n as _, o as v, q as y, r as b, s as x, v as S, w as C, x as w } from "../shared-l3GF0JOc.js";
|
|
2
|
+
import { t as T } from "../temml-DZbhOfRE.js";
|
|
3
|
+
import { t as ee } from "../es-ClqUVRJn.js";
|
|
4
|
+
import { A as te, C as ne, D as E, E as re, F as ie, I as D, M as ae, N as oe, O as se, P as ce, S as le, T as ue, _ as de, a as fe, b as pe, c as O, d as k, f as me, g as he, h as ge, i as _e, j as ve, k as ye, m as A, n as be, o as xe, p as Se, r as j, s as Ce, u as we, v as Te, w as Ee, x as De, y as Oe } from "../app-Bnln5XCo.js";
|
|
5
|
+
import { a as ke, i as Ae, n as je, t as Me } from "../brand-CG1fQshq.js";
|
|
6
|
+
import { Fragment as M, Teleport as Ne, computed as N, createBlock as P, createCommentVNode as F, createElementBlock as I, createElementVNode as L, createTextVNode as R, createVNode as z, defineComponent as B, getCurrentScope as Pe, markRaw as Fe, mergeModels as Ie, mergeProps as Le, nextTick as Re, normalizeClass as V, normalizeStyle as ze, onBeforeUnmount as Be, onMounted as Ve, onScopeDispose as He, onUnmounted as Ue, openBlock as H, readonly as We, ref as U, renderList as W, renderSlot as Ge, resolveComponent as Ke, resolveDynamicComponent as G, shallowReadonly as qe, shallowRef as Je, toDisplayString as K, toValue as Ye, unref as q, useModel as Xe, useTemplateRef as Ze, vModelText as Qe, watch as J, watchEffect as $e, withCtx as et, withDirectives as tt, withKeys as nt, withModifiers as rt } from "vue";
|
|
7
|
+
var it = D({
|
|
8
8
|
name: "circle-dot",
|
|
9
9
|
size: 24,
|
|
10
10
|
node: [["circle", {
|
|
@@ -18,14 +18,14 @@ var lt = D({
|
|
|
18
18
|
r: "10",
|
|
19
19
|
key: "1mglay"
|
|
20
20
|
}]]
|
|
21
|
-
}),
|
|
21
|
+
}), at = D({
|
|
22
22
|
name: "command",
|
|
23
23
|
size: 24,
|
|
24
24
|
node: [["path", {
|
|
25
25
|
d: "M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",
|
|
26
26
|
key: "11bfej"
|
|
27
27
|
}]]
|
|
28
|
-
}),
|
|
28
|
+
}), ot = D({
|
|
29
29
|
name: "corner-down-left",
|
|
30
30
|
size: 24,
|
|
31
31
|
node: [["path", {
|
|
@@ -35,7 +35,7 @@ var lt = D({
|
|
|
35
35
|
d: "m9 10-5 5 5 5",
|
|
36
36
|
key: "1kshq7"
|
|
37
37
|
}]]
|
|
38
|
-
}),
|
|
38
|
+
}), st = D({
|
|
39
39
|
name: "delete",
|
|
40
40
|
size: 24,
|
|
41
41
|
node: [
|
|
@@ -52,14 +52,14 @@ var lt = D({
|
|
|
52
52
|
key: "1fp51s"
|
|
53
53
|
}]
|
|
54
54
|
]
|
|
55
|
-
}),
|
|
55
|
+
}), ct = D({
|
|
56
56
|
name: "folder-open",
|
|
57
57
|
size: 24,
|
|
58
58
|
node: [["path", {
|
|
59
59
|
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",
|
|
60
60
|
key: "usdka0"
|
|
61
61
|
}]]
|
|
62
|
-
}),
|
|
62
|
+
}), lt = D({
|
|
63
63
|
name: "loader-circle",
|
|
64
64
|
size: 24,
|
|
65
65
|
node: [["path", {
|
|
@@ -67,7 +67,7 @@ var lt = D({
|
|
|
67
67
|
key: "13zald"
|
|
68
68
|
}]],
|
|
69
69
|
aliases: ["loader-2"]
|
|
70
|
-
}),
|
|
70
|
+
}), ut = D({
|
|
71
71
|
name: "option",
|
|
72
72
|
size: 24,
|
|
73
73
|
node: [["path", {
|
|
@@ -77,14 +77,14 @@ var lt = D({
|
|
|
77
77
|
d: "M3 3h5.28a1 1 0 0 1 .948.684l5.544 16.632a1 1 0 0 0 .949.684H21",
|
|
78
78
|
key: "1qf1im"
|
|
79
79
|
}]]
|
|
80
|
-
}),
|
|
80
|
+
}), dt = D({
|
|
81
81
|
name: "space",
|
|
82
82
|
size: 24,
|
|
83
83
|
node: [["path", {
|
|
84
84
|
d: "M22 17v1c0 .5-.5 1-1 1H3c-.5 0-1-.5-1-1v-1",
|
|
85
85
|
key: "lt2kga"
|
|
86
86
|
}]]
|
|
87
|
-
}),
|
|
87
|
+
}), ft = D({
|
|
88
88
|
name: "square-check-big",
|
|
89
89
|
size: 24,
|
|
90
90
|
node: [["path", {
|
|
@@ -95,7 +95,7 @@ var lt = D({
|
|
|
95
95
|
key: "1pflzl"
|
|
96
96
|
}]],
|
|
97
97
|
aliases: ["check-square"]
|
|
98
|
-
}),
|
|
98
|
+
}), pt = D({
|
|
99
99
|
name: "tags",
|
|
100
100
|
size: 24,
|
|
101
101
|
node: [
|
|
@@ -115,7 +115,7 @@ var lt = D({
|
|
|
115
115
|
key: "12ikhr"
|
|
116
116
|
}]
|
|
117
117
|
]
|
|
118
|
-
}),
|
|
118
|
+
}), mt = D({
|
|
119
119
|
name: "type",
|
|
120
120
|
size: 24,
|
|
121
121
|
node: [
|
|
@@ -132,11 +132,11 @@ var lt = D({
|
|
|
132
132
|
key: "s66wpe"
|
|
133
133
|
}]
|
|
134
134
|
]
|
|
135
|
-
}),
|
|
135
|
+
}), ht = [
|
|
136
136
|
"height",
|
|
137
137
|
"width",
|
|
138
138
|
"viewBox"
|
|
139
|
-
],
|
|
139
|
+
], gt = ["d"], _t = ["d"], vt = ["d"], yt = /* @__PURE__ */ B({
|
|
140
140
|
__name: "TdBrandIcon",
|
|
141
141
|
props: { size: { default: 28 } },
|
|
142
142
|
setup(e) {
|
|
@@ -144,26 +144,26 @@ var lt = D({
|
|
|
144
144
|
fill: "none",
|
|
145
145
|
height: e.size,
|
|
146
146
|
width: e.size * 208 / 128,
|
|
147
|
-
viewBox: q(
|
|
147
|
+
viewBox: q(ke),
|
|
148
148
|
xmlns: "http://www.w3.org/2000/svg"
|
|
149
149
|
}, [
|
|
150
150
|
L("path", {
|
|
151
151
|
"clip-rule": "evenodd",
|
|
152
|
-
d: q(
|
|
152
|
+
d: q(je),
|
|
153
153
|
"fill-rule": "evenodd",
|
|
154
154
|
fill: "currentColor"
|
|
155
|
-
}, null, 8,
|
|
155
|
+
}, null, 8, gt),
|
|
156
156
|
L("path", {
|
|
157
|
-
d: q(
|
|
157
|
+
d: q(Ae),
|
|
158
158
|
fill: "currentColor"
|
|
159
|
-
}, null, 8,
|
|
159
|
+
}, null, 8, _t),
|
|
160
160
|
L("path", {
|
|
161
|
-
d: q(
|
|
161
|
+
d: q(Me),
|
|
162
162
|
fill: "currentColor"
|
|
163
|
-
}, null, 8,
|
|
164
|
-
], 8,
|
|
163
|
+
}, null, 8, vt)
|
|
164
|
+
], 8, ht));
|
|
165
165
|
}
|
|
166
|
-
}),
|
|
166
|
+
}), bt = ["title", "aria-label"], xt = /*#__PURE__*/ A(/* @__PURE__ */ B({
|
|
167
167
|
__name: "TdButton",
|
|
168
168
|
props: { label: {} },
|
|
169
169
|
setup(e) {
|
|
@@ -172,93 +172,93 @@ var lt = D({
|
|
|
172
172
|
class: "td-icon-btn",
|
|
173
173
|
title: e.label,
|
|
174
174
|
"aria-label": e.label
|
|
175
|
-
}, [
|
|
175
|
+
}, [Ge(t.$slots, "default", {}, void 0, !0)], 8, bt));
|
|
176
176
|
}
|
|
177
|
-
}), [["__scopeId", "data-v-b1861a4a"]]),
|
|
178
|
-
function
|
|
177
|
+
}), [["__scopeId", "data-v-b1861a4a"]]), St = /`([^`]+)`|\$([^$]+)\$/g;
|
|
178
|
+
function Ct(e) {
|
|
179
179
|
let t = 0, n = "";
|
|
180
|
-
for (let r of e.matchAll(
|
|
181
|
-
if (n +=
|
|
180
|
+
for (let r of e.matchAll(St)) {
|
|
181
|
+
if (n += x(e.slice(t, r.index)), r[1] !== void 0) n += `<code>${x(r[1])}</code>`;
|
|
182
182
|
else if (r[2] !== void 0) try {
|
|
183
|
-
n +=
|
|
183
|
+
n += T.renderToString(r[2], { throwOnError: !1 });
|
|
184
184
|
} catch {
|
|
185
|
-
n +=
|
|
185
|
+
n += x(r[0]);
|
|
186
186
|
}
|
|
187
187
|
t = r.index + r[0].length;
|
|
188
188
|
}
|
|
189
|
-
return n +=
|
|
189
|
+
return n += x(e.slice(t)), n;
|
|
190
190
|
}
|
|
191
191
|
//#endregion
|
|
192
192
|
//#region ../../node_modules/.pnpm/@floating-ui+utils@0.2.12/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs
|
|
193
|
-
var
|
|
193
|
+
var wt = Math.min, Tt = Math.max, Et = Math.round, Y = (e) => ({
|
|
194
194
|
x: e,
|
|
195
195
|
y: e
|
|
196
|
-
}),
|
|
196
|
+
}), Dt = {
|
|
197
197
|
left: "right",
|
|
198
198
|
right: "left",
|
|
199
199
|
bottom: "top",
|
|
200
200
|
top: "bottom"
|
|
201
201
|
};
|
|
202
|
-
function
|
|
203
|
-
return
|
|
202
|
+
function Ot(e, t, n) {
|
|
203
|
+
return Tt(e, wt(t, n));
|
|
204
204
|
}
|
|
205
|
-
function
|
|
205
|
+
function kt(e, t) {
|
|
206
206
|
return typeof e == "function" ? e(t) : e;
|
|
207
207
|
}
|
|
208
|
-
function
|
|
208
|
+
function At(e) {
|
|
209
209
|
return e.split("-")[0];
|
|
210
210
|
}
|
|
211
|
-
function
|
|
211
|
+
function jt(e) {
|
|
212
212
|
return e.split("-")[1];
|
|
213
213
|
}
|
|
214
|
-
function
|
|
214
|
+
function Mt(e) {
|
|
215
215
|
return e === "x" ? "y" : "x";
|
|
216
216
|
}
|
|
217
|
-
function
|
|
217
|
+
function Nt(e) {
|
|
218
218
|
return e === "y" ? "height" : "width";
|
|
219
219
|
}
|
|
220
|
-
function
|
|
220
|
+
function Pt(e) {
|
|
221
221
|
let t = e[0];
|
|
222
222
|
return t === "t" || t === "b" ? "y" : "x";
|
|
223
223
|
}
|
|
224
|
-
function
|
|
225
|
-
return
|
|
224
|
+
function Ft(e) {
|
|
225
|
+
return Mt(Pt(e));
|
|
226
226
|
}
|
|
227
|
-
function
|
|
227
|
+
function It(e, t, n) {
|
|
228
228
|
n === void 0 && (n = !1);
|
|
229
|
-
let r =
|
|
230
|
-
return t.reference[a] > t.floating[a] && (o =
|
|
229
|
+
let r = jt(e), i = Ft(e), a = Nt(i), o = i === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
|
|
230
|
+
return t.reference[a] > t.floating[a] && (o = Gt(o)), [o, Gt(o)];
|
|
231
231
|
}
|
|
232
|
-
function
|
|
233
|
-
let t =
|
|
232
|
+
function Lt(e) {
|
|
233
|
+
let t = Gt(e);
|
|
234
234
|
return [
|
|
235
|
-
|
|
235
|
+
Rt(e),
|
|
236
236
|
t,
|
|
237
|
-
|
|
237
|
+
Rt(t)
|
|
238
238
|
];
|
|
239
239
|
}
|
|
240
|
-
function
|
|
240
|
+
function Rt(e) {
|
|
241
241
|
return e.includes("start") ? e.replace("start", "end") : e.replace("end", "start");
|
|
242
242
|
}
|
|
243
|
-
var
|
|
244
|
-
function
|
|
243
|
+
var zt = ["left", "right"], Bt = ["right", "left"], Vt = ["top", "bottom"], Ht = ["bottom", "top"];
|
|
244
|
+
function Ut(e, t, n) {
|
|
245
245
|
switch (e) {
|
|
246
246
|
case "top":
|
|
247
|
-
case "bottom": return n ? t ?
|
|
247
|
+
case "bottom": return n ? t ? Bt : zt : t ? zt : Bt;
|
|
248
248
|
case "left":
|
|
249
|
-
case "right": return t ?
|
|
249
|
+
case "right": return t ? Vt : Ht;
|
|
250
250
|
default: return [];
|
|
251
251
|
}
|
|
252
252
|
}
|
|
253
|
-
function
|
|
254
|
-
let i =
|
|
255
|
-
return i && (a = a.map((e) => e + "-" + i), t && (a = a.concat(a.map(
|
|
253
|
+
function Wt(e, t, n, r) {
|
|
254
|
+
let i = jt(e), a = Ut(At(e), n === "start", r);
|
|
255
|
+
return i && (a = a.map((e) => e + "-" + i), t && (a = a.concat(a.map(Rt)))), a;
|
|
256
256
|
}
|
|
257
|
-
function
|
|
258
|
-
let t =
|
|
259
|
-
return
|
|
257
|
+
function Gt(e) {
|
|
258
|
+
let t = At(e);
|
|
259
|
+
return Dt[t] + e.slice(t.length);
|
|
260
260
|
}
|
|
261
|
-
function
|
|
261
|
+
function Kt(e) {
|
|
262
262
|
return {
|
|
263
263
|
top: e.top ?? 0,
|
|
264
264
|
right: e.right ?? 0,
|
|
@@ -266,15 +266,15 @@ function Zt(e) {
|
|
|
266
266
|
left: e.left ?? 0
|
|
267
267
|
};
|
|
268
268
|
}
|
|
269
|
-
function
|
|
269
|
+
function qt(e) {
|
|
270
270
|
return typeof e == "number" ? {
|
|
271
271
|
top: e,
|
|
272
272
|
right: e,
|
|
273
273
|
bottom: e,
|
|
274
274
|
left: e
|
|
275
|
-
} :
|
|
275
|
+
} : Kt(e);
|
|
276
276
|
}
|
|
277
|
-
function
|
|
277
|
+
function Jt(e) {
|
|
278
278
|
let { x: t, y: n, width: r, height: i } = e;
|
|
279
279
|
return {
|
|
280
280
|
width: r,
|
|
@@ -289,8 +289,8 @@ function $t(e) {
|
|
|
289
289
|
}
|
|
290
290
|
//#endregion
|
|
291
291
|
//#region ../../node_modules/.pnpm/@floating-ui+core@1.8.0/node_modules/@floating-ui/core/dist/floating-ui.core.mjs
|
|
292
|
-
function
|
|
293
|
-
let { reference: r, floating: i } = e, a =
|
|
292
|
+
function Yt(e, t, n) {
|
|
293
|
+
let { reference: r, floating: i } = e, a = Pt(t), o = Ft(t), s = Nt(o), c = At(t), l = a === "y", u = r.x + r.width / 2 - i.width / 2, d = r.y + r.height / 2 - i.height / 2, f = r[s] / 2 - i[s] / 2, p;
|
|
294
294
|
switch (c) {
|
|
295
295
|
case "top":
|
|
296
296
|
p = {
|
|
@@ -321,12 +321,12 @@ function en(e, t, n) {
|
|
|
321
321
|
y: r.y
|
|
322
322
|
};
|
|
323
323
|
}
|
|
324
|
-
let m =
|
|
324
|
+
let m = jt(t);
|
|
325
325
|
return m && (p[o] += f * (m === "end" ? 1 : -1) * (n && l ? -1 : 1)), p;
|
|
326
326
|
}
|
|
327
|
-
async function
|
|
327
|
+
async function Xt(e, t) {
|
|
328
328
|
t === void 0 && (t = {});
|
|
329
|
-
let { x: n, y: r, platform: i, rects: a, elements: o, strategy: s } = e, { boundary: c = "clippingAncestors", rootBoundary: l = "viewport", elementContext: u = "floating", altBoundary: d = !1, padding: f = 0 } =
|
|
329
|
+
let { x: n, y: r, platform: i, rects: a, elements: o, strategy: s } = e, { boundary: c = "clippingAncestors", rootBoundary: l = "viewport", elementContext: u = "floating", altBoundary: d = !1, padding: f = 0 } = kt(t, e), p = qt(f), m = o[d ? u === "floating" ? "reference" : "floating" : u], h = Jt(await i.getClippingRect({
|
|
330
330
|
element: await (i.isElement == null ? void 0 : i.isElement(m)) ?? !0 ? m : m.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(o.floating)),
|
|
331
331
|
boundary: c,
|
|
332
332
|
rootBoundary: l,
|
|
@@ -339,7 +339,7 @@ async function tn(e, t) {
|
|
|
339
339
|
} : a.reference, _ = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(o.floating)), v = await (i.isElement == null ? void 0 : i.isElement(_)) && await (i.getScale == null ? void 0 : i.getScale(_)) || {
|
|
340
340
|
x: 1,
|
|
341
341
|
y: 1
|
|
342
|
-
}, y =
|
|
342
|
+
}, y = Jt(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
343
343
|
elements: o,
|
|
344
344
|
rect: g,
|
|
345
345
|
offsetParent: _,
|
|
@@ -352,15 +352,15 @@ async function tn(e, t) {
|
|
|
352
352
|
right: (y.right - h.right + p.right) / v.x
|
|
353
353
|
};
|
|
354
354
|
}
|
|
355
|
-
var
|
|
355
|
+
var Zt = 50, Qt = async (e, t, n) => {
|
|
356
356
|
let { placement: r = "bottom", strategy: i = "absolute", middleware: a = [], platform: o } = n, s = o.detectOverflow ? o : {
|
|
357
357
|
...o,
|
|
358
|
-
detectOverflow:
|
|
358
|
+
detectOverflow: Xt
|
|
359
359
|
}, c = await (o.isRTL == null ? void 0 : o.isRTL(t)), l = await o.getElementRects({
|
|
360
360
|
reference: e,
|
|
361
361
|
floating: t,
|
|
362
362
|
strategy: i
|
|
363
|
-
}), { x: u, y: d } =
|
|
363
|
+
}), { x: u, y: d } = Yt(l, r, c), f = r, p = 0, m = {};
|
|
364
364
|
for (let n = 0; n < a.length; n++) {
|
|
365
365
|
let h = a[n];
|
|
366
366
|
if (!h) continue;
|
|
@@ -381,11 +381,11 @@ var nn = 50, rn = async (e, t, n) => {
|
|
|
381
381
|
u = v ?? u, d = y ?? d, m[g] = {
|
|
382
382
|
...m[g],
|
|
383
383
|
...b
|
|
384
|
-
}, x && p <
|
|
384
|
+
}, x && p < Zt && (p++, typeof x == "object" && (x.placement && (f = x.placement), x.rects && (l = x.rects === !0 ? await o.getElementRects({
|
|
385
385
|
reference: e,
|
|
386
386
|
floating: t,
|
|
387
387
|
strategy: i
|
|
388
|
-
}) : x.rects), {x: u, y: d} =
|
|
388
|
+
}) : x.rects), {x: u, y: d} = Yt(l, f, c)), n = -1);
|
|
389
389
|
}
|
|
390
390
|
return {
|
|
391
391
|
x: u,
|
|
@@ -394,41 +394,41 @@ var nn = 50, rn = async (e, t, n) => {
|
|
|
394
394
|
strategy: i,
|
|
395
395
|
middlewareData: m
|
|
396
396
|
};
|
|
397
|
-
},
|
|
397
|
+
}, $t = (e) => ({
|
|
398
398
|
name: "arrow",
|
|
399
399
|
options: e,
|
|
400
400
|
async fn(t) {
|
|
401
|
-
let { x: n, y: r, placement: i, rects: a, platform: o, elements: s, middlewareData: c } = t, { element: l, padding: u = 0 } =
|
|
401
|
+
let { x: n, y: r, placement: i, rects: a, platform: o, elements: s, middlewareData: c } = t, { element: l, padding: u = 0 } = kt(e, t) || {};
|
|
402
402
|
if (l == null) return {};
|
|
403
|
-
let d =
|
|
403
|
+
let d = qt(u), f = {
|
|
404
404
|
x: n,
|
|
405
405
|
y: r
|
|
406
|
-
}, p =
|
|
406
|
+
}, p = Ft(i), m = Nt(p), h = await o.getDimensions(l), g = p === "y", _ = g ? "top" : "left", v = g ? "bottom" : "right", y = g ? "clientHeight" : "clientWidth", b = a.reference[m] + a.reference[p] - f[p] - a.floating[m], x = f[p] - a.reference[p], S = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(l)), C = S ? S[y] : 0;
|
|
407
407
|
(!C || !await (o.isElement == null ? void 0 : o.isElement(S))) && (C = s.floating[y] || a.floating[m]);
|
|
408
|
-
let w = b / 2 - x / 2, T = C / 2 - h[m] / 2 - 1, ee =
|
|
408
|
+
let w = b / 2 - x / 2, T = C / 2 - h[m] / 2 - 1, ee = wt(d[_], T), te = wt(d[v], T), ne = C - h[m] - te, E = C / 2 - h[m] / 2 + w, re = Ot(ee, E, ne), ie = !c.arrow && jt(i) != null && E !== re && a.reference[m] / 2 - (E < ee ? ee : te) - h[m] / 2 < 0, D = ie ? E < ee ? E - ee : E - ne : 0;
|
|
409
409
|
return {
|
|
410
|
-
[p]: f[p] +
|
|
410
|
+
[p]: f[p] + D,
|
|
411
411
|
data: {
|
|
412
412
|
[p]: re,
|
|
413
|
-
centerOffset: E - re -
|
|
414
|
-
...ie && { alignmentOffset:
|
|
413
|
+
centerOffset: E - re - D,
|
|
414
|
+
...ie && { alignmentOffset: D }
|
|
415
415
|
},
|
|
416
416
|
reset: ie
|
|
417
417
|
};
|
|
418
418
|
}
|
|
419
|
-
}),
|
|
419
|
+
}), en = function(e) {
|
|
420
420
|
return e === void 0 && (e = {}), {
|
|
421
421
|
name: "flip",
|
|
422
422
|
options: e,
|
|
423
423
|
async fn(t) {
|
|
424
424
|
var n;
|
|
425
|
-
let { placement: r, middlewareData: i, rects: a, initialPlacement: o, platform: s, elements: c } = t, { mainAxis: l = !0, crossAxis: u = !0, fallbackPlacements: d, fallbackStrategy: f = "bestFit", fallbackAxisSideDirection: p = "none", flipAlignment: m = !0, ...h } =
|
|
425
|
+
let { placement: r, middlewareData: i, rects: a, initialPlacement: o, platform: s, elements: c } = t, { mainAxis: l = !0, crossAxis: u = !0, fallbackPlacements: d, fallbackStrategy: f = "bestFit", fallbackAxisSideDirection: p = "none", flipAlignment: m = !0, ...h } = kt(e, t);
|
|
426
426
|
if ((n = i.arrow) != null && n.alignmentOffset) return {};
|
|
427
|
-
let g =
|
|
428
|
-
!d && x && b.push(...
|
|
427
|
+
let g = At(r), _ = Pt(o), v = At(o) === o, y = await (s.isRTL == null ? void 0 : s.isRTL(c.floating)), b = d || (v || !m ? [Gt(o)] : Lt(o)), x = p !== "none";
|
|
428
|
+
!d && x && b.push(...Wt(o, m, p, y));
|
|
429
429
|
let S = [o, ...b], C = await s.detectOverflow(t, h), w = [], T = i.flip?.overflows || [];
|
|
430
430
|
if (l && w.push(C[g]), u) {
|
|
431
|
-
let e =
|
|
431
|
+
let e = It(r, a, y);
|
|
432
432
|
w.push(C[e[0]], C[e[1]]);
|
|
433
433
|
}
|
|
434
434
|
if (T = [...T, {
|
|
@@ -436,7 +436,7 @@ var nn = 50, rn = async (e, t, n) => {
|
|
|
436
436
|
overflows: w
|
|
437
437
|
}], !w.every((e) => e <= 0)) {
|
|
438
438
|
let e = (i.flip?.index || 0) + 1, t = S[e];
|
|
439
|
-
if (t && (u !== "alignment" || _ ===
|
|
439
|
+
if (t && (u !== "alignment" || _ === Pt(t) || T.every((e) => Pt(e.placement) !== _ || e.overflows[0] > 0))) return {
|
|
440
440
|
data: {
|
|
441
441
|
index: e,
|
|
442
442
|
overflows: T
|
|
@@ -448,7 +448,7 @@ var nn = 50, rn = async (e, t, n) => {
|
|
|
448
448
|
case "bestFit": {
|
|
449
449
|
let e = T.filter((e) => {
|
|
450
450
|
if (x) {
|
|
451
|
-
let t =
|
|
451
|
+
let t = Pt(e.placement);
|
|
452
452
|
return t === _ || t === "y";
|
|
453
453
|
}
|
|
454
454
|
return !0;
|
|
@@ -463,9 +463,9 @@ var nn = 50, rn = async (e, t, n) => {
|
|
|
463
463
|
return {};
|
|
464
464
|
}
|
|
465
465
|
};
|
|
466
|
-
},
|
|
467
|
-
async function
|
|
468
|
-
let { placement: n, platform: r, elements: i } = e, a = await (r.isRTL == null ? void 0 : r.isRTL(i.floating)), o =
|
|
466
|
+
}, tn = /*#__PURE__*/ new Set(["left", "top"]);
|
|
467
|
+
async function nn(e, t) {
|
|
468
|
+
let { placement: n, platform: r, elements: i } = e, a = await (r.isRTL == null ? void 0 : r.isRTL(i.floating)), o = At(n), s = jt(n), c = Pt(n) === "y", l = tn.has(o) ? -1 : 1, u = a && c ? -1 : 1, d = kt(t, e), { mainAxis: f, crossAxis: p, alignmentAxis: m } = typeof d == "number" ? {
|
|
469
469
|
mainAxis: d,
|
|
470
470
|
crossAxis: 0,
|
|
471
471
|
alignmentAxis: null
|
|
@@ -482,13 +482,13 @@ async function cn(e, t) {
|
|
|
482
482
|
y: p * u
|
|
483
483
|
};
|
|
484
484
|
}
|
|
485
|
-
var
|
|
485
|
+
var rn = function(e) {
|
|
486
486
|
return e === void 0 && (e = 0), {
|
|
487
487
|
name: "offset",
|
|
488
488
|
options: e,
|
|
489
489
|
async fn(t) {
|
|
490
490
|
var n;
|
|
491
|
-
let { x: r, y: i, placement: a, middlewareData: o } = t, s = await
|
|
491
|
+
let { x: r, y: i, placement: a, middlewareData: o } = t, s = await nn(t, e);
|
|
492
492
|
return a === o.offset?.placement && (n = o.arrow) != null && n.alignmentOffset ? {} : {
|
|
493
493
|
x: r + s.x,
|
|
494
494
|
y: i + s.y,
|
|
@@ -499,7 +499,7 @@ var ln = function(e) {
|
|
|
499
499
|
};
|
|
500
500
|
}
|
|
501
501
|
};
|
|
502
|
-
},
|
|
502
|
+
}, an = function(e) {
|
|
503
503
|
return e === void 0 && (e = {}), {
|
|
504
504
|
name: "shift",
|
|
505
505
|
options: e,
|
|
@@ -510,10 +510,10 @@ var ln = function(e) {
|
|
|
510
510
|
x: t,
|
|
511
511
|
y: n
|
|
512
512
|
};
|
|
513
|
-
} }, ...l } =
|
|
513
|
+
} }, ...l } = kt(e, t), u = {
|
|
514
514
|
x: n,
|
|
515
515
|
y: r
|
|
516
|
-
}, d = await a.detectOverflow(t, l), f =
|
|
516
|
+
}, d = await a.detectOverflow(t, l), f = Pt(i), p = Mt(f), m = u[p], h = u[f], g = (e, t) => Ot(t + d[e === "y" ? "top" : "left"], t, t - d[e === "y" ? "bottom" : "right"]);
|
|
517
517
|
o && (m = g(p, m)), s && (h = g(f, h));
|
|
518
518
|
let _ = c.fn({
|
|
519
519
|
...t,
|
|
@@ -536,39 +536,39 @@ var ln = function(e) {
|
|
|
536
536
|
};
|
|
537
537
|
//#endregion
|
|
538
538
|
//#region ../../node_modules/.pnpm/@floating-ui+utils@0.2.12/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs
|
|
539
|
-
function
|
|
539
|
+
function on() {
|
|
540
540
|
return typeof window < "u";
|
|
541
541
|
}
|
|
542
|
-
function
|
|
543
|
-
return
|
|
542
|
+
function sn(e) {
|
|
543
|
+
return ln(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
544
544
|
}
|
|
545
545
|
function X(e) {
|
|
546
546
|
var t;
|
|
547
547
|
return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
|
|
548
548
|
}
|
|
549
|
-
function
|
|
550
|
-
return ((
|
|
549
|
+
function cn(e) {
|
|
550
|
+
return ((ln(e) ? e.ownerDocument : e.document) || window.document)?.documentElement;
|
|
551
551
|
}
|
|
552
|
-
function
|
|
553
|
-
return
|
|
552
|
+
function ln(e) {
|
|
553
|
+
return on() ? e instanceof Node || e instanceof X(e).Node : !1;
|
|
554
554
|
}
|
|
555
555
|
function Z(e) {
|
|
556
|
-
return
|
|
556
|
+
return on() ? e instanceof Element || e instanceof X(e).Element : !1;
|
|
557
557
|
}
|
|
558
|
-
function
|
|
559
|
-
return
|
|
558
|
+
function un(e) {
|
|
559
|
+
return on() ? e instanceof HTMLElement || e instanceof X(e).HTMLElement : !1;
|
|
560
560
|
}
|
|
561
|
-
function
|
|
562
|
-
return !
|
|
561
|
+
function dn(e) {
|
|
562
|
+
return !on() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof X(e).ShadowRoot;
|
|
563
563
|
}
|
|
564
|
-
function
|
|
564
|
+
function fn(e) {
|
|
565
565
|
let { overflow: t, overflowX: n, overflowY: r, display: i } = Q(e);
|
|
566
566
|
return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && i !== "inline" && i !== "contents";
|
|
567
567
|
}
|
|
568
|
-
function
|
|
569
|
-
return /^(table|td|th)$/.test(
|
|
568
|
+
function pn(e) {
|
|
569
|
+
return /^(table|td|th)$/.test(sn(e));
|
|
570
570
|
}
|
|
571
|
-
function
|
|
571
|
+
function mn(e) {
|
|
572
572
|
try {
|
|
573
573
|
if (e.matches(":popover-open")) return !0;
|
|
574
574
|
} catch {}
|
|
@@ -578,30 +578,30 @@ function yn(e) {
|
|
|
578
578
|
return !1;
|
|
579
579
|
}
|
|
580
580
|
}
|
|
581
|
-
var
|
|
582
|
-
function
|
|
581
|
+
var hn = /transform|translate|scale|rotate|perspective|filter/, gn = /paint|layout|strict|content/, _n = (e) => !!e && e !== "none", vn;
|
|
582
|
+
function yn(e) {
|
|
583
583
|
let t = Z(e) ? Q(e) : e;
|
|
584
|
-
return
|
|
584
|
+
return _n(t.transform) || _n(t.translate) || _n(t.scale) || _n(t.rotate) || _n(t.perspective) || !xn() && (_n(t.backdropFilter) || _n(t.filter)) || hn.test(t.willChange || "") || gn.test(t.contain || "");
|
|
585
585
|
}
|
|
586
|
-
function
|
|
587
|
-
let t =
|
|
588
|
-
for (;
|
|
589
|
-
if (
|
|
590
|
-
if (
|
|
591
|
-
t =
|
|
586
|
+
function bn(e) {
|
|
587
|
+
let t = wn(e);
|
|
588
|
+
for (; un(t) && !Sn(t);) {
|
|
589
|
+
if (yn(t)) return t;
|
|
590
|
+
if (mn(t)) return null;
|
|
591
|
+
t = wn(t);
|
|
592
592
|
}
|
|
593
593
|
return null;
|
|
594
594
|
}
|
|
595
|
-
function
|
|
596
|
-
return
|
|
595
|
+
function xn() {
|
|
596
|
+
return vn ??= typeof CSS < "u" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none"), vn;
|
|
597
597
|
}
|
|
598
|
-
function
|
|
599
|
-
return /^(html|body|#document)$/.test(
|
|
598
|
+
function Sn(e) {
|
|
599
|
+
return /^(html|body|#document)$/.test(sn(e));
|
|
600
600
|
}
|
|
601
601
|
function Q(e) {
|
|
602
602
|
return X(e).getComputedStyle(e);
|
|
603
603
|
}
|
|
604
|
-
function
|
|
604
|
+
function Cn(e) {
|
|
605
605
|
return Z(e) ? {
|
|
606
606
|
scrollLeft: e.scrollLeft,
|
|
607
607
|
scrollTop: e.scrollTop
|
|
@@ -610,102 +610,102 @@ function On(e) {
|
|
|
610
610
|
scrollTop: e.scrollY
|
|
611
611
|
};
|
|
612
612
|
}
|
|
613
|
-
function
|
|
614
|
-
if (
|
|
615
|
-
let t = e.assignedSlot || e.parentNode ||
|
|
616
|
-
return
|
|
613
|
+
function wn(e) {
|
|
614
|
+
if (sn(e) === "html") return e;
|
|
615
|
+
let t = e.assignedSlot || e.parentNode || dn(e) && e.host || cn(e);
|
|
616
|
+
return dn(t) ? t.host : t;
|
|
617
617
|
}
|
|
618
|
-
function
|
|
619
|
-
let t =
|
|
620
|
-
return
|
|
618
|
+
function Tn(e) {
|
|
619
|
+
let t = wn(e);
|
|
620
|
+
return Sn(t) ? (e.ownerDocument || e).body : un(t) && fn(t) ? t : Tn(t);
|
|
621
621
|
}
|
|
622
|
-
function
|
|
622
|
+
function En(e, t, n) {
|
|
623
623
|
t === void 0 && (t = []), n === void 0 && (n = !0);
|
|
624
|
-
let r =
|
|
624
|
+
let r = Tn(e), i = r === e.ownerDocument?.body, a = X(r);
|
|
625
625
|
if (i) {
|
|
626
|
-
let e =
|
|
627
|
-
return t.concat(a, a.visualViewport || [],
|
|
626
|
+
let e = Dn(a);
|
|
627
|
+
return t.concat(a, a.visualViewport || [], fn(r) ? r : [], e && n ? En(e) : []);
|
|
628
628
|
}
|
|
629
|
-
return t.concat(r,
|
|
629
|
+
return t.concat(r, En(r, [], n));
|
|
630
630
|
}
|
|
631
|
-
function
|
|
631
|
+
function Dn(e) {
|
|
632
632
|
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
633
633
|
}
|
|
634
634
|
//#endregion
|
|
635
635
|
//#region ../../node_modules/.pnpm/@floating-ui+dom@1.8.0/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs
|
|
636
|
-
function
|
|
637
|
-
let t = Q(e), n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0, i =
|
|
636
|
+
function On(e) {
|
|
637
|
+
let t = Q(e), n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0, i = un(e), a = i ? e.offsetWidth : n, o = i ? e.offsetHeight : r, s = Et(n) !== a || Et(r) !== o;
|
|
638
638
|
return s && (n = a, r = o), {
|
|
639
639
|
width: n,
|
|
640
640
|
height: r,
|
|
641
641
|
$: s
|
|
642
642
|
};
|
|
643
643
|
}
|
|
644
|
-
function
|
|
644
|
+
function kn(e) {
|
|
645
645
|
return Z(e) ? e : e.contextElement;
|
|
646
646
|
}
|
|
647
|
-
function
|
|
648
|
-
let t =
|
|
649
|
-
if (!
|
|
650
|
-
let n = t.getBoundingClientRect(), { width: r, height: i, $: a } =
|
|
647
|
+
function An(e) {
|
|
648
|
+
let t = kn(e);
|
|
649
|
+
if (!un(t)) return Y(1);
|
|
650
|
+
let n = t.getBoundingClientRect(), { width: r, height: i, $: a } = On(t), o = (a ? Et(n.width) : n.width) / r, s = (a ? Et(n.height) : n.height) / i;
|
|
651
651
|
return (!o || !Number.isFinite(o)) && (o = 1), (!s || !Number.isFinite(s)) && (s = 1), {
|
|
652
652
|
x: o,
|
|
653
653
|
y: s
|
|
654
654
|
};
|
|
655
655
|
}
|
|
656
|
-
var
|
|
657
|
-
function
|
|
656
|
+
var jn = /*#__PURE__*/ Y(0);
|
|
657
|
+
function Mn(e) {
|
|
658
658
|
let t = X(e);
|
|
659
|
-
return !
|
|
659
|
+
return !xn() || !t.visualViewport ? jn : {
|
|
660
660
|
x: t.visualViewport.offsetLeft,
|
|
661
661
|
y: t.visualViewport.offsetTop
|
|
662
662
|
};
|
|
663
663
|
}
|
|
664
|
-
function
|
|
664
|
+
function Nn(e, t, n) {
|
|
665
665
|
return t === void 0 && (t = !1), !!n && t && n === X(e);
|
|
666
666
|
}
|
|
667
|
-
function
|
|
667
|
+
function Pn(e, t, n, r) {
|
|
668
668
|
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
669
|
-
let i = e.getBoundingClientRect(), a =
|
|
670
|
-
t && (r ? Z(r) && (o =
|
|
671
|
-
let s =
|
|
669
|
+
let i = e.getBoundingClientRect(), a = kn(e), o = Y(1);
|
|
670
|
+
t && (r ? Z(r) && (o = An(r)) : o = An(e));
|
|
671
|
+
let s = Nn(a, n, r) ? Mn(a) : Y(0), c = (i.left + s.x) / o.x, l = (i.top + s.y) / o.y, u = i.width / o.x, d = i.height / o.y;
|
|
672
672
|
if (a && r) {
|
|
673
|
-
let e = X(a), t = Z(r) ? X(r) : r, n = e, i =
|
|
673
|
+
let e = X(a), t = Z(r) ? X(r) : r, n = e, i = Dn(n);
|
|
674
674
|
for (; i && t !== n;) {
|
|
675
|
-
let e =
|
|
676
|
-
c *= e.x, l *= e.y, u *= e.x, d *= e.y, c += a, l += o, n = X(i), i =
|
|
675
|
+
let e = An(i), t = i.getBoundingClientRect(), r = Q(i), a = t.left + (i.clientLeft + parseFloat(r.paddingLeft)) * e.x, o = t.top + (i.clientTop + parseFloat(r.paddingTop)) * e.y;
|
|
676
|
+
c *= e.x, l *= e.y, u *= e.x, d *= e.y, c += a, l += o, n = X(i), i = Dn(n);
|
|
677
677
|
}
|
|
678
678
|
}
|
|
679
|
-
return
|
|
679
|
+
return Jt({
|
|
680
680
|
width: u,
|
|
681
681
|
height: d,
|
|
682
682
|
x: c,
|
|
683
683
|
y: l
|
|
684
684
|
});
|
|
685
685
|
}
|
|
686
|
-
function
|
|
687
|
-
let n =
|
|
688
|
-
return t ? t.left + n :
|
|
686
|
+
function Fn(e, t) {
|
|
687
|
+
let n = Cn(e).scrollLeft;
|
|
688
|
+
return t ? t.left + n : Pn(cn(e)).left + n;
|
|
689
689
|
}
|
|
690
|
-
function
|
|
690
|
+
function In(e, t) {
|
|
691
691
|
let n = e.getBoundingClientRect();
|
|
692
692
|
return {
|
|
693
|
-
x: n.left + t.scrollLeft -
|
|
693
|
+
x: n.left + t.scrollLeft - Fn(e, n),
|
|
694
694
|
y: n.top + t.scrollTop
|
|
695
695
|
};
|
|
696
696
|
}
|
|
697
|
-
function
|
|
698
|
-
let { elements: t, rect: n, offsetParent: r, strategy: i } = e, a = i === "fixed", o =
|
|
697
|
+
function Ln(e) {
|
|
698
|
+
let { elements: t, rect: n, offsetParent: r, strategy: i } = e, a = i === "fixed", o = cn(r), s = t ? mn(t.floating) : !1;
|
|
699
699
|
if (r === o || s && a) return n;
|
|
700
700
|
let c = {
|
|
701
701
|
scrollLeft: 0,
|
|
702
702
|
scrollTop: 0
|
|
703
|
-
}, l = Y(1), u = Y(0), d =
|
|
704
|
-
if ((d || !a) && ((
|
|
705
|
-
let e =
|
|
706
|
-
l =
|
|
703
|
+
}, l = Y(1), u = Y(0), d = un(r);
|
|
704
|
+
if ((d || !a) && ((sn(r) !== "body" || fn(o)) && (c = Cn(r)), d)) {
|
|
705
|
+
let e = Pn(r);
|
|
706
|
+
l = An(r), u.x = e.x + r.clientLeft, u.y = e.y + r.clientTop;
|
|
707
707
|
}
|
|
708
|
-
let f = o && !d && !a ?
|
|
708
|
+
let f = o && !d && !a ? In(o, c) : Y(0);
|
|
709
709
|
return {
|
|
710
710
|
width: n.width * l.x,
|
|
711
711
|
height: n.height * l.y,
|
|
@@ -713,29 +713,29 @@ function Hn(e) {
|
|
|
713
713
|
y: n.y * l.y - c.scrollTop * l.y + u.y + f.y
|
|
714
714
|
};
|
|
715
715
|
}
|
|
716
|
-
function
|
|
716
|
+
function Rn(e) {
|
|
717
717
|
return e.getClientRects ? Array.from(e.getClientRects()) : [];
|
|
718
718
|
}
|
|
719
|
-
function
|
|
720
|
-
let t =
|
|
721
|
-
return Q(n).direction === "rtl" && (a +=
|
|
719
|
+
function zn(e) {
|
|
720
|
+
let t = Cn(e), n = e.ownerDocument.body, r = Tt(e.scrollWidth, e.clientWidth, n.scrollWidth, n.clientWidth), i = Tt(e.scrollHeight, e.clientHeight, n.scrollHeight, n.clientHeight), a = -t.scrollLeft + Fn(e), o = -t.scrollTop;
|
|
721
|
+
return Q(n).direction === "rtl" && (a += Tt(e.clientWidth, n.clientWidth) - r), {
|
|
722
722
|
width: r,
|
|
723
723
|
height: i,
|
|
724
724
|
x: a,
|
|
725
725
|
y: o
|
|
726
726
|
};
|
|
727
727
|
}
|
|
728
|
-
var
|
|
729
|
-
function
|
|
728
|
+
var Bn = 25;
|
|
729
|
+
function Vn(e, t, n) {
|
|
730
730
|
n === void 0 && (n = "viewport");
|
|
731
|
-
let r = n === "layoutViewport", i = X(e), a =
|
|
731
|
+
let r = n === "layoutViewport", i = X(e), a = cn(e), o = i.visualViewport, s = a.clientWidth, c = a.clientHeight, l = 0, u = 0;
|
|
732
732
|
if (o) {
|
|
733
|
-
let e = !
|
|
733
|
+
let e = !xn() || t === "fixed";
|
|
734
734
|
r ? e || (l = -o.offsetLeft, u = -o.offsetTop) : (s = o.width, c = o.height, e && (l = o.offsetLeft, u = o.offsetTop));
|
|
735
735
|
}
|
|
736
|
-
if (
|
|
736
|
+
if (Fn(a) <= 0) {
|
|
737
737
|
let e = a.ownerDocument, t = e.body, n = getComputedStyle(t), r = e.compatMode === "CSS1Compat" && parseFloat(n.marginLeft) + parseFloat(n.marginRight) || 0, i = Math.abs(a.clientWidth - t.clientWidth - r), o = getComputedStyle(a).scrollbarGutter === "stable both-edges" ? i / 2 : i;
|
|
738
|
-
o <=
|
|
738
|
+
o <= Bn && (s -= o);
|
|
739
739
|
}
|
|
740
740
|
return {
|
|
741
741
|
width: s,
|
|
@@ -744,8 +744,8 @@ function Kn(e, t, n) {
|
|
|
744
744
|
y: u
|
|
745
745
|
};
|
|
746
746
|
}
|
|
747
|
-
function
|
|
748
|
-
let n =
|
|
747
|
+
function Hn(e, t) {
|
|
748
|
+
let n = Pn(e, !0, t === "fixed"), r = n.top + e.clientTop, i = n.left + e.clientLeft, a = An(e);
|
|
749
749
|
return {
|
|
750
750
|
width: e.clientWidth * a.x,
|
|
751
751
|
height: e.clientHeight * a.y,
|
|
@@ -753,13 +753,13 @@ function qn(e, t) {
|
|
|
753
753
|
y: r * a.y
|
|
754
754
|
};
|
|
755
755
|
}
|
|
756
|
-
function
|
|
756
|
+
function Un(e, t, n) {
|
|
757
757
|
let r;
|
|
758
|
-
if (t === "viewport" || t === "layoutViewport") r =
|
|
759
|
-
else if (t === "document") r =
|
|
760
|
-
else if (Z(t)) r =
|
|
758
|
+
if (t === "viewport" || t === "layoutViewport") r = Vn(e, n, t);
|
|
759
|
+
else if (t === "document") r = zn(cn(e));
|
|
760
|
+
else if (Z(t)) r = Hn(t, n);
|
|
761
761
|
else {
|
|
762
|
-
let n =
|
|
762
|
+
let n = Mn(e);
|
|
763
763
|
r = {
|
|
764
764
|
x: t.x - n.x,
|
|
765
765
|
y: t.y - n.y,
|
|
@@ -767,23 +767,23 @@ function Jn(e, t, n) {
|
|
|
767
767
|
height: t.height
|
|
768
768
|
};
|
|
769
769
|
}
|
|
770
|
-
return
|
|
770
|
+
return Jt(r);
|
|
771
771
|
}
|
|
772
|
-
function
|
|
772
|
+
function Wn(e, t) {
|
|
773
773
|
let n = t.get(e);
|
|
774
774
|
if (n) return n;
|
|
775
|
-
let r =
|
|
776
|
-
for (; Z(o) && !
|
|
777
|
-
let e = Q(o), t =
|
|
778
|
-
!t && (n === "fixed" || n === "absolute" && e.position === "static") ? r = r.filter((e) => e !== o) : i = e, o =
|
|
775
|
+
let r = En(e, [], !1).filter((e) => Z(e) && sn(e) !== "body"), i = null, a = Q(e).position === "fixed", o = a ? wn(e) : e;
|
|
776
|
+
for (; Z(o) && !Sn(o);) {
|
|
777
|
+
let e = Q(o), t = yn(o), n = i ? i.position : a ? "fixed" : "";
|
|
778
|
+
!t && (n === "fixed" || n === "absolute" && e.position === "static") ? r = r.filter((e) => e !== o) : i = e, o = wn(o);
|
|
779
779
|
}
|
|
780
780
|
return t.set(e, r), r;
|
|
781
781
|
}
|
|
782
|
-
function
|
|
783
|
-
let { element: t, boundary: n, rootBoundary: r, strategy: i } = e, a = [...n === "clippingAncestors" ?
|
|
782
|
+
function Gn(e) {
|
|
783
|
+
let { element: t, boundary: n, rootBoundary: r, strategy: i } = e, a = [...n === "clippingAncestors" ? mn(t) ? [] : Wn(t, this._c) : [].concat(n), r], o = Un(t, a[0], i), s = o.top, c = o.right, l = o.bottom, u = o.left;
|
|
784
784
|
for (let e = 1; e < a.length; e++) {
|
|
785
|
-
let n =
|
|
786
|
-
s =
|
|
785
|
+
let n = Un(t, a[e], i);
|
|
786
|
+
s = Tt(n.top, s), c = wt(n.right, c), l = wt(n.bottom, l), u = Tt(n.left, u);
|
|
787
787
|
}
|
|
788
788
|
return {
|
|
789
789
|
width: c - u,
|
|
@@ -792,24 +792,24 @@ function Xn(e) {
|
|
|
792
792
|
y: s
|
|
793
793
|
};
|
|
794
794
|
}
|
|
795
|
-
function
|
|
796
|
-
let { width: t, height: n } =
|
|
795
|
+
function Kn(e) {
|
|
796
|
+
let { width: t, height: n } = On(e);
|
|
797
797
|
return {
|
|
798
798
|
width: t,
|
|
799
799
|
height: n
|
|
800
800
|
};
|
|
801
801
|
}
|
|
802
|
-
function
|
|
803
|
-
let r =
|
|
802
|
+
function qn(e, t, n) {
|
|
803
|
+
let r = un(t), i = cn(t), a = n === "fixed", o = Pn(e, !0, a, t), s = {
|
|
804
804
|
scrollLeft: 0,
|
|
805
805
|
scrollTop: 0
|
|
806
806
|
}, c = Y(0);
|
|
807
|
-
if ((r || !a) && ((
|
|
808
|
-
let e =
|
|
807
|
+
if ((r || !a) && ((sn(t) !== "body" || fn(i)) && (s = Cn(t)), r)) {
|
|
808
|
+
let e = Pn(t, !0, a, t);
|
|
809
809
|
c.x = e.x + t.clientLeft, c.y = e.y + t.clientTop;
|
|
810
810
|
}
|
|
811
|
-
!r && i && (c.x =
|
|
812
|
-
let l = i && !r && !a ?
|
|
811
|
+
!r && i && (c.x = Fn(i));
|
|
812
|
+
let l = i && !r && !a ? In(i, s) : Y(0);
|
|
813
813
|
return {
|
|
814
814
|
x: o.left + s.scrollLeft - c.x - l.x,
|
|
815
815
|
y: o.top + s.scrollTop - c.y - l.y,
|
|
@@ -817,34 +817,34 @@ function Qn(e, t, n) {
|
|
|
817
817
|
height: o.height
|
|
818
818
|
};
|
|
819
819
|
}
|
|
820
|
-
function
|
|
820
|
+
function Jn(e) {
|
|
821
821
|
return Q(e).position === "static";
|
|
822
822
|
}
|
|
823
|
-
function
|
|
824
|
-
if (!
|
|
823
|
+
function Yn(e, t) {
|
|
824
|
+
if (!un(e) || Q(e).position === "fixed") return null;
|
|
825
825
|
if (t) return t(e);
|
|
826
826
|
let n = e.offsetParent;
|
|
827
|
-
return
|
|
827
|
+
return cn(e) === n && (n = n.ownerDocument.body), n;
|
|
828
828
|
}
|
|
829
|
-
function
|
|
829
|
+
function Xn(e, t) {
|
|
830
830
|
let n = X(e);
|
|
831
|
-
if (
|
|
832
|
-
if (!
|
|
833
|
-
let t =
|
|
834
|
-
for (; t && !
|
|
835
|
-
if (Z(t) &&
|
|
836
|
-
t =
|
|
831
|
+
if (mn(e)) return n;
|
|
832
|
+
if (!un(e)) {
|
|
833
|
+
let t = wn(e);
|
|
834
|
+
for (; t && !Sn(t);) {
|
|
835
|
+
if (Z(t) && !Jn(t)) return t;
|
|
836
|
+
t = wn(t);
|
|
837
837
|
}
|
|
838
838
|
return n;
|
|
839
839
|
}
|
|
840
|
-
let r =
|
|
841
|
-
for (; r &&
|
|
842
|
-
return r &&
|
|
840
|
+
let r = Yn(e, t);
|
|
841
|
+
for (; r && pn(r) && Jn(r);) r = Yn(r, t);
|
|
842
|
+
return r && Sn(r) && Jn(r) && !yn(r) ? n : r || bn(e) || n;
|
|
843
843
|
}
|
|
844
|
-
var
|
|
845
|
-
let t = this.getOffsetParent ||
|
|
844
|
+
var Zn = async function(e) {
|
|
845
|
+
let t = this.getOffsetParent || Xn, n = this.getDimensions, r = await n(e.floating);
|
|
846
846
|
return {
|
|
847
|
-
reference:
|
|
847
|
+
reference: qn(e.reference, await t(e.floating), e.strategy),
|
|
848
848
|
floating: {
|
|
849
849
|
x: 0,
|
|
850
850
|
y: 0,
|
|
@@ -853,77 +853,77 @@ var nr = async function(e) {
|
|
|
853
853
|
}
|
|
854
854
|
};
|
|
855
855
|
};
|
|
856
|
-
function
|
|
856
|
+
function Qn(e) {
|
|
857
857
|
return Q(e).direction === "rtl";
|
|
858
858
|
}
|
|
859
|
-
var
|
|
860
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
861
|
-
getDocumentElement:
|
|
862
|
-
getClippingRect:
|
|
863
|
-
getOffsetParent:
|
|
864
|
-
getElementRects:
|
|
865
|
-
getClientRects:
|
|
866
|
-
getDimensions:
|
|
867
|
-
getScale:
|
|
859
|
+
var $n = {
|
|
860
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: Ln,
|
|
861
|
+
getDocumentElement: cn,
|
|
862
|
+
getClippingRect: Gn,
|
|
863
|
+
getOffsetParent: Xn,
|
|
864
|
+
getElementRects: Zn,
|
|
865
|
+
getClientRects: Rn,
|
|
866
|
+
getDimensions: Kn,
|
|
867
|
+
getScale: An,
|
|
868
868
|
isElement: Z,
|
|
869
|
-
isRTL:
|
|
870
|
-
},
|
|
869
|
+
isRTL: Qn
|
|
870
|
+
}, er = rn, tr = an, nr = en, rr = $t, ir = (e, t, n) => {
|
|
871
871
|
let r = /* @__PURE__ */ new Map(), i = n ?? {}, a = {
|
|
872
|
-
|
|
872
|
+
...$n,
|
|
873
873
|
...i.platform,
|
|
874
874
|
_c: r
|
|
875
875
|
};
|
|
876
|
-
return
|
|
876
|
+
return Qt(e, t, {
|
|
877
877
|
...i,
|
|
878
878
|
platform: a
|
|
879
879
|
});
|
|
880
880
|
};
|
|
881
881
|
//#endregion
|
|
882
882
|
//#region ../../node_modules/.pnpm/@floating-ui+vue@2.0.1_vue@3.5.42_typescript@6.0.3_/node_modules/@floating-ui/vue/dist/floating-ui.vue.mjs
|
|
883
|
-
function
|
|
883
|
+
function ar(e) {
|
|
884
884
|
return typeof e == "object" && !!e && "$el" in e;
|
|
885
885
|
}
|
|
886
|
-
function
|
|
887
|
-
if (
|
|
886
|
+
function or(e) {
|
|
887
|
+
if (ar(e)) {
|
|
888
888
|
let t = e.$el;
|
|
889
|
-
return
|
|
889
|
+
return ln(t) && sn(t) === "#comment" ? null : t;
|
|
890
890
|
}
|
|
891
891
|
return e;
|
|
892
892
|
}
|
|
893
|
-
function
|
|
893
|
+
function sr(e) {
|
|
894
894
|
return {
|
|
895
895
|
name: "arrow",
|
|
896
896
|
options: e,
|
|
897
897
|
fn(t) {
|
|
898
|
-
let n =
|
|
899
|
-
return n == null ? {} :
|
|
898
|
+
let n = or(Ye(e.element));
|
|
899
|
+
return n == null ? {} : rr({
|
|
900
900
|
element: n,
|
|
901
901
|
padding: e.padding
|
|
902
902
|
}).fn(t);
|
|
903
903
|
}
|
|
904
904
|
};
|
|
905
905
|
}
|
|
906
|
-
function
|
|
906
|
+
function cr(e) {
|
|
907
907
|
return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
908
908
|
}
|
|
909
|
-
function
|
|
910
|
-
let n =
|
|
909
|
+
function lr(e, t) {
|
|
910
|
+
let n = cr(e);
|
|
911
911
|
return Math.round(t * n) / n;
|
|
912
912
|
}
|
|
913
|
-
function
|
|
913
|
+
function ur(e, t, n) {
|
|
914
914
|
n === void 0 && (n = {});
|
|
915
|
-
let r = n.whileElementsMounted, i = N(() =>
|
|
915
|
+
let r = n.whileElementsMounted, i = N(() => Ye(n.open) ?? !0), a = N(() => Ye(n.middleware)), o = N(() => Ye(n.placement) ?? "bottom"), s = N(() => Ye(n.strategy) ?? "absolute"), c = N(() => Ye(n.transform) ?? !0), l = N(() => or(e.value)), u = N(() => or(t.value)), d = U(0), f = U(0), p = U(s.value), m = U(o.value), h = Je({}), g = U(!1), _ = N(() => {
|
|
916
916
|
let e = {
|
|
917
917
|
position: p.value,
|
|
918
918
|
left: "0",
|
|
919
919
|
top: "0"
|
|
920
920
|
};
|
|
921
921
|
if (!u.value) return e;
|
|
922
|
-
let t =
|
|
922
|
+
let t = lr(u.value, d.value), n = lr(u.value, f.value);
|
|
923
923
|
return c.value ? {
|
|
924
924
|
...e,
|
|
925
925
|
transform: "translate(" + t + "px, " + n + "px)",
|
|
926
|
-
...
|
|
926
|
+
...cr(u.value) >= 1.5 && { willChange: "transform" }
|
|
927
927
|
} : {
|
|
928
928
|
position: p.value,
|
|
929
929
|
left: t + "px",
|
|
@@ -933,7 +933,7 @@ function hr(e, t, n) {
|
|
|
933
933
|
function y() {
|
|
934
934
|
if (l.value == null || u.value == null) return;
|
|
935
935
|
let e = i.value;
|
|
936
|
-
|
|
936
|
+
ir(l.value, u.value, {
|
|
937
937
|
middleware: a.value,
|
|
938
938
|
placement: o.value,
|
|
939
939
|
strategy: s.value
|
|
@@ -962,31 +962,31 @@ function hr(e, t, n) {
|
|
|
962
962
|
o,
|
|
963
963
|
s,
|
|
964
964
|
i
|
|
965
|
-
], y, { flush: "sync" }), J([l, u], x, { flush: "sync" }), J(i, S, { flush: "sync" }),
|
|
966
|
-
x:
|
|
967
|
-
y:
|
|
968
|
-
strategy:
|
|
969
|
-
placement:
|
|
970
|
-
middlewareData:
|
|
971
|
-
isPositioned:
|
|
965
|
+
], y, { flush: "sync" }), J([l, u], x, { flush: "sync" }), J(i, S, { flush: "sync" }), Pe() && He(b), {
|
|
966
|
+
x: qe(d),
|
|
967
|
+
y: qe(f),
|
|
968
|
+
strategy: qe(p),
|
|
969
|
+
placement: qe(m),
|
|
970
|
+
middlewareData: qe(h),
|
|
971
|
+
isPositioned: qe(g),
|
|
972
972
|
floatingStyles: _,
|
|
973
973
|
update: y
|
|
974
974
|
};
|
|
975
975
|
}
|
|
976
976
|
//#endregion
|
|
977
977
|
//#region src/client/theme-default/components/TdTooltip.vue
|
|
978
|
-
var
|
|
978
|
+
var dr = /*#__PURE__*/ A(/* @__PURE__ */ B({
|
|
979
979
|
inheritAttrs: !1,
|
|
980
980
|
__name: "TdTooltip",
|
|
981
981
|
props: { text: {} },
|
|
982
982
|
setup(e) {
|
|
983
|
-
let t =
|
|
983
|
+
let t = Ze("trigger"), n = Ze("tooltip"), r = Ze("arrowEl"), i = U(!1), a, o, { floatingStyles: s, middlewareData: c, placement: l } = ur(t, n, {
|
|
984
984
|
placement: "right",
|
|
985
985
|
middleware: [
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
986
|
+
er(8),
|
|
987
|
+
nr(),
|
|
988
|
+
tr({ padding: 8 }),
|
|
989
|
+
sr({ element: r })
|
|
990
990
|
]
|
|
991
991
|
});
|
|
992
992
|
function u() {
|
|
@@ -998,32 +998,32 @@ var gr = /*#__PURE__*/ k(/* @__PURE__ */ B({
|
|
|
998
998
|
i.value = !0;
|
|
999
999
|
}, 400));
|
|
1000
1000
|
}
|
|
1001
|
-
|
|
1001
|
+
Be(u);
|
|
1002
1002
|
function f() {
|
|
1003
1003
|
u(), o = setTimeout(() => {
|
|
1004
1004
|
i.value = !1;
|
|
1005
1005
|
}, 100);
|
|
1006
1006
|
}
|
|
1007
|
-
return (r, a) => (H(), I(M, null, [L("span",
|
|
1007
|
+
return (r, a) => (H(), I(M, null, [L("span", Le({
|
|
1008
1008
|
ref_key: "trigger",
|
|
1009
1009
|
ref: t
|
|
1010
1010
|
}, r.$attrs, {
|
|
1011
1011
|
class: "td-tooltip-trigger",
|
|
1012
1012
|
onMouseenter: d,
|
|
1013
1013
|
onMouseleave: f
|
|
1014
|
-
}), [
|
|
1014
|
+
}), [Ge(r.$slots, "default", {}, void 0, !0)], 16), (H(), P(Ne, { to: "body" }, [i.value ? (H(), I("div", {
|
|
1015
1015
|
key: 0,
|
|
1016
1016
|
ref_key: "tooltip",
|
|
1017
1017
|
ref: n,
|
|
1018
1018
|
class: "td-tooltip",
|
|
1019
|
-
style:
|
|
1019
|
+
style: ze(q(s)),
|
|
1020
1020
|
role: "tooltip",
|
|
1021
1021
|
onMouseenter: u,
|
|
1022
1022
|
onMouseleave: f
|
|
1023
1023
|
}, [R(K(e.text) + " ", 1), L("div", {
|
|
1024
1024
|
ref: "arrowEl",
|
|
1025
1025
|
class: "td-tooltip-arrow",
|
|
1026
|
-
style:
|
|
1026
|
+
style: ze({
|
|
1027
1027
|
left: q(c).arrow?.x === void 0 ? "" : `${q(c).arrow.x}px`,
|
|
1028
1028
|
top: q(c).arrow?.y === void 0 ? "" : `${q(c).arrow.y}px`,
|
|
1029
1029
|
...q(l).startsWith("bottom") ? { top: "-4px" } : {},
|
|
@@ -1033,166 +1033,166 @@ var gr = /*#__PURE__*/ k(/* @__PURE__ */ B({
|
|
|
1033
1033
|
})
|
|
1034
1034
|
}, null, 4)], 36)) : F("", !0)]))], 64));
|
|
1035
1035
|
}
|
|
1036
|
-
}), [["__scopeId", "data-v-fca9f648"]]),
|
|
1036
|
+
}), [["__scopeId", "data-v-fca9f648"]]), fr = {
|
|
1037
1037
|
key: 0,
|
|
1038
1038
|
class: "td-tree-node"
|
|
1039
|
-
},
|
|
1039
|
+
}, pr = { class: "td-tree-label" }, mr = ["aria-expanded"], hr = { class: "td-tree-label-text" }, gr = ["href"], _r = { class: "td-tree-count" }, vr = ["href"], yr = ["innerHTML"], br = {
|
|
1040
1040
|
key: 2,
|
|
1041
1041
|
class: "td-tree-time"
|
|
1042
|
-
},
|
|
1042
|
+
}, xr = 5, Sr = /*#__PURE__*/ A(/* @__PURE__ */ B({
|
|
1043
1043
|
__name: "TdTreeNode",
|
|
1044
1044
|
props: {
|
|
1045
1045
|
node: {},
|
|
1046
1046
|
urlPrefix: { default: "" }
|
|
1047
1047
|
},
|
|
1048
|
-
setup(
|
|
1049
|
-
let
|
|
1048
|
+
setup(t) {
|
|
1049
|
+
let n = O(), { withBase: r } = j(), i = N(() => w(t.urlPrefix, t.node.name)), a = N(() => m(t.node)), o = N(() => a.value ? C(a.value.filepath) : s(i.value)), u = N(() => r(o.value)), d = N(() => a.value?.label ?? c(t.node.name)), f = N(() => a.value?.icon ? k(a.value.icon.name) : void 0), p = N(() => t.node.entries.filter((e) => e.kind === "dir" || !S(e.item.filepath))), g = N(() => 0 < t.node.entries.length), _ = N(() => v(t.node));
|
|
1050
1050
|
function v(e) {
|
|
1051
1051
|
let t = 0;
|
|
1052
1052
|
for (let n of e.entries) n.kind === "file" ? t++ : t += v(n.node);
|
|
1053
1053
|
return t;
|
|
1054
1054
|
}
|
|
1055
|
-
let y = U(!
|
|
1055
|
+
let y = U(!e(i.value, n.path)), b = U(!1), x = N(() => p.value.filter((e) => e.kind === "file").length), T = N(() => b.value ? 0 : Math.max(0, x.value - xr)), ee = N(() => {
|
|
1056
1056
|
if (b.value) return p.value;
|
|
1057
1057
|
let e = 0;
|
|
1058
|
-
return p.value.filter((t) => t.kind === "dir" || ++e <=
|
|
1058
|
+
return p.value.filter((t) => t.kind === "dir" || ++e <= xr);
|
|
1059
1059
|
});
|
|
1060
|
-
J(() =>
|
|
1061
|
-
|
|
1060
|
+
J(() => n.path, (t) => {
|
|
1061
|
+
e(i.value, t) && (y.value = !1);
|
|
1062
1062
|
});
|
|
1063
|
-
function
|
|
1063
|
+
function ne() {
|
|
1064
1064
|
b.value = !0;
|
|
1065
1065
|
}
|
|
1066
|
-
function
|
|
1067
|
-
return
|
|
1066
|
+
function E(e) {
|
|
1067
|
+
return n.path === e;
|
|
1068
1068
|
}
|
|
1069
|
-
function
|
|
1069
|
+
function re() {
|
|
1070
1070
|
y.value = !y.value;
|
|
1071
1071
|
}
|
|
1072
1072
|
return (e, t) => {
|
|
1073
|
-
let n =
|
|
1074
|
-
return
|
|
1073
|
+
let n = Ke("TdTreeNode", !0);
|
|
1074
|
+
return g.value ? (H(), I("div", fr, [L("div", pr, [
|
|
1075
1075
|
L("button", {
|
|
1076
1076
|
type: "button",
|
|
1077
1077
|
class: "td-tree-toggle",
|
|
1078
1078
|
"aria-expanded": !y.value,
|
|
1079
|
-
onClick:
|
|
1080
|
-
}, [z(q(
|
|
1079
|
+
onClick: re
|
|
1080
|
+
}, [z(q(te), {
|
|
1081
1081
|
size: 14,
|
|
1082
1082
|
class: V(["td-tree-caret", { "is-collapsed": y.value }])
|
|
1083
|
-
}, null, 8, ["class"]), L("span",
|
|
1083
|
+
}, null, 8, ["class"]), L("span", hr, K(d.value), 1)], 8, mr),
|
|
1084
1084
|
L("a", {
|
|
1085
|
-
href:
|
|
1086
|
-
class: V(["td-tree-index-btn", { "is-active":
|
|
1085
|
+
href: u.value,
|
|
1086
|
+
class: V(["td-tree-index-btn", { "is-active": E(o.value) }])
|
|
1087
1087
|
}, [f.value ? (H(), P(G(f.value), {
|
|
1088
1088
|
key: 0,
|
|
1089
1089
|
size: 12
|
|
1090
|
-
})) :
|
|
1090
|
+
})) : E(o.value) ? (H(), P(q(ct), {
|
|
1091
1091
|
key: 1,
|
|
1092
1092
|
size: 12
|
|
1093
|
-
})) : (H(), P(q(
|
|
1093
|
+
})) : (H(), P(q(Ee), {
|
|
1094
1094
|
key: 2,
|
|
1095
1095
|
size: 12
|
|
1096
|
-
}))], 10,
|
|
1097
|
-
L("span",
|
|
1096
|
+
}))], 10, gr),
|
|
1097
|
+
L("span", _r, K(_.value), 1)
|
|
1098
1098
|
]), L("div", { class: V(["td-collapse td-tree-children", { "is-collapsed": y.value }]) }, [L("div", null, [(H(!0), I(M, null, W(ee.value, (e) => (H(), I(M, { key: e.kind === "dir" ? e.node.name : e.item.filepath }, [e.kind === "dir" ? (H(), P(n, {
|
|
1099
1099
|
key: 0,
|
|
1100
1100
|
node: e.node,
|
|
1101
|
-
"url-prefix":
|
|
1101
|
+
"url-prefix": i.value
|
|
1102
1102
|
}, null, 8, ["node", "url-prefix"])) : (H(), I("a", {
|
|
1103
1103
|
key: 1,
|
|
1104
|
-
href: q(
|
|
1105
|
-
class: V(["td-tree-link", { "is-active":
|
|
1104
|
+
href: q(r)(q(C)(e.item.filepath)),
|
|
1105
|
+
class: V(["td-tree-link", { "is-active": E(q(C)(e.item.filepath)) }])
|
|
1106
1106
|
}, [
|
|
1107
|
-
e.item.icon && q(
|
|
1107
|
+
e.item.icon && q(k)(e.item.icon.name) ? (H(), P(G(q(k)(e.item.icon.name)), {
|
|
1108
1108
|
key: 0,
|
|
1109
1109
|
size: 14,
|
|
1110
1110
|
class: "td-tree-file-icon"
|
|
1111
|
-
})) : (H(), P(q(
|
|
1111
|
+
})) : (H(), P(q(ue), {
|
|
1112
1112
|
key: 1,
|
|
1113
1113
|
size: 14,
|
|
1114
1114
|
class: "td-tree-file-icon"
|
|
1115
1115
|
})),
|
|
1116
|
-
z(
|
|
1116
|
+
z(dr, {
|
|
1117
1117
|
class: "td-tree-link-text",
|
|
1118
|
-
text: q(
|
|
1118
|
+
text: q(l)(e.item.filepath, e.item.label)
|
|
1119
1119
|
}, {
|
|
1120
|
-
default:
|
|
1120
|
+
default: et(() => [L("span", { innerHTML: q(Ct)(q(l)(e.item.filepath, e.item.label)) }, null, 8, yr)]),
|
|
1121
1121
|
_: 2
|
|
1122
1122
|
}, 1032, ["text"]),
|
|
1123
|
-
e.item.metadata ? (H(), I("span",
|
|
1124
|
-
], 10,
|
|
1123
|
+
e.item.metadata ? (H(), I("span", br, K(q(h)(e.item.metadata.mtime)), 1)) : F("", !0)
|
|
1124
|
+
], 10, vr))], 64))), 128)), T.value > 0 && !b.value ? (H(), I("button", {
|
|
1125
1125
|
key: 0,
|
|
1126
1126
|
class: "td-tree-more",
|
|
1127
1127
|
type: "button",
|
|
1128
|
-
onClick:
|
|
1129
|
-
}, K(
|
|
1128
|
+
onClick: ne
|
|
1129
|
+
}, K(T.value) + " more... ", 1)) : F("", !0)])], 2)])) : F("", !0);
|
|
1130
1130
|
};
|
|
1131
1131
|
}
|
|
1132
|
-
}), [["__scopeId", "data-v-
|
|
1132
|
+
}), [["__scopeId", "data-v-8638a605"]]), Cr = { class: "td-nav" }, wr = ["href"], Tr = {
|
|
1133
1133
|
key: 0,
|
|
1134
1134
|
class: "td-root-link-time"
|
|
1135
|
-
},
|
|
1135
|
+
}, Er = ["href"], Dr = { class: "td-root-link-text" }, Or = {
|
|
1136
1136
|
key: 2,
|
|
1137
1137
|
class: "td-root-link-time"
|
|
1138
|
-
},
|
|
1138
|
+
}, kr = /*#__PURE__*/ A(/* @__PURE__ */ B({
|
|
1139
1139
|
__name: "TdContentNav",
|
|
1140
1140
|
props: { tree: {} },
|
|
1141
1141
|
setup(e) {
|
|
1142
|
-
let t =
|
|
1142
|
+
let t = O(), { withBase: n } = j(), r = N(() => e.tree.entries.find((e) => e.kind === "file" && S(e.item.filepath))?.item), i = N(() => e.tree.entries.filter((e) => e.kind === "dir" || !S(e.item.filepath)));
|
|
1143
1143
|
function a(e) {
|
|
1144
1144
|
return t.path === e;
|
|
1145
1145
|
}
|
|
1146
|
-
return (e, t) => (H(), I("nav",
|
|
1147
|
-
href: q(n)(r.value ? q(
|
|
1148
|
-
class: V(["td-root-link", { "is-active": a(r.value ? q(
|
|
1146
|
+
return (e, t) => (H(), I("nav", Cr, [L("a", {
|
|
1147
|
+
href: q(n)(r.value ? q(C)(r.value.filepath) : q(s)("/")),
|
|
1148
|
+
class: V(["td-root-link", { "is-active": a(r.value ? q(C)(r.value.filepath) : q(s)("/")) }])
|
|
1149
1149
|
}, [
|
|
1150
|
-
z(q(
|
|
1150
|
+
z(q(ne), {
|
|
1151
1151
|
size: 14,
|
|
1152
1152
|
class: "td-root-link-icon"
|
|
1153
1153
|
}),
|
|
1154
1154
|
t[0] ||= L("span", { class: "td-root-link-text" }, "Overview", -1),
|
|
1155
|
-
r.value ? (H(), I("span",
|
|
1156
|
-
], 10,
|
|
1155
|
+
r.value ? (H(), I("span", Tr, K(r.value.metadata ? q(h)(r.value.metadata.mtime) : ""), 1)) : F("", !0)
|
|
1156
|
+
], 10, wr), (H(!0), I(M, null, W(i.value, (e) => (H(), I(M, { key: e.kind === "dir" ? e.node.name : e.item.filepath }, [e.kind === "dir" ? (H(), P(Sr, {
|
|
1157
1157
|
key: 0,
|
|
1158
1158
|
node: e.node
|
|
1159
1159
|
}, null, 8, ["node"])) : (H(), I("a", {
|
|
1160
1160
|
key: 1,
|
|
1161
|
-
href: q(n)(q(
|
|
1162
|
-
class: V(["td-root-link", { "is-active": a(q(
|
|
1161
|
+
href: q(n)(q(C)(e.item.filepath)),
|
|
1162
|
+
class: V(["td-root-link", { "is-active": a(q(C)(e.item.filepath)) }])
|
|
1163
1163
|
}, [
|
|
1164
|
-
e.item.icon && q(
|
|
1164
|
+
e.item.icon && q(k)(e.item.icon.name) ? (H(), P(G(q(k)(e.item.icon.name)), {
|
|
1165
1165
|
key: 0,
|
|
1166
1166
|
size: 14,
|
|
1167
1167
|
class: "td-root-link-icon"
|
|
1168
|
-
})) : (H(), P(q(
|
|
1168
|
+
})) : (H(), P(q(ue), {
|
|
1169
1169
|
key: 1,
|
|
1170
1170
|
size: 14,
|
|
1171
1171
|
class: "td-root-link-icon"
|
|
1172
1172
|
})),
|
|
1173
|
-
L("span",
|
|
1174
|
-
e.item.metadata ? (H(), I("span",
|
|
1175
|
-
], 10,
|
|
1173
|
+
L("span", Dr, K(q(l)(e.item.filepath, e.item.label)), 1),
|
|
1174
|
+
e.item.metadata ? (H(), I("span", Or, K(q(h)(e.item.metadata.mtime)), 1)) : F("", !0)
|
|
1175
|
+
], 10, Er))], 64))), 128))]));
|
|
1176
1176
|
}
|
|
1177
|
-
}), [["__scopeId", "data-v-
|
|
1177
|
+
}), [["__scopeId", "data-v-c78d7204"]]), Ar = { class: "td-footer" }, jr = { key: 0 }, Mr = /*#__PURE__*/ A(/* @__PURE__ */ B({
|
|
1178
1178
|
__name: "TdFooter",
|
|
1179
1179
|
setup(e) {
|
|
1180
|
-
let t =
|
|
1181
|
-
return (e, r) => (H(), I("footer",
|
|
1180
|
+
let t = j(), n = (/* @__PURE__ */ new Date()).getFullYear();
|
|
1181
|
+
return (e, r) => (H(), I("footer", Ar, [r[0] ||= L("span", null, [R(" Powered by "), L("a", {
|
|
1182
1182
|
href: "https://github.com/huydo862003/typerighter",
|
|
1183
1183
|
target: "_blank",
|
|
1184
1184
|
rel: "noopener noreferrer",
|
|
1185
1185
|
class: "td-footer-link"
|
|
1186
|
-
}, "Typerighter")], -1), q(t).author || q(t).license ? (H(), I("span",
|
|
1186
|
+
}, "Typerighter")], -1), q(t).author || q(t).license ? (H(), I("span", jr, [
|
|
1187
1187
|
q(t).license ? (H(), I(M, { key: 0 }, [R(K(q(t).license), 1)], 64)) : F("", !0),
|
|
1188
1188
|
q(t).license && q(t).author ? (H(), I(M, { key: 1 }, [R(" · ")], 64)) : F("", !0),
|
|
1189
1189
|
q(t).author ? (H(), I(M, { key: 2 }, [R("© " + K(q(n)) + " " + K(q(t).author), 1)], 64)) : F("", !0)
|
|
1190
1190
|
])) : F("", !0)]));
|
|
1191
1191
|
}
|
|
1192
|
-
}), [["__scopeId", "data-v-50e2a5bc"]]),
|
|
1192
|
+
}), [["__scopeId", "data-v-50e2a5bc"]]), Nr = {
|
|
1193
1193
|
key: 0,
|
|
1194
1194
|
class: "td-dropdown-panel"
|
|
1195
|
-
},
|
|
1195
|
+
}, Pr = /*#__PURE__*/ A(/* @__PURE__ */ B({
|
|
1196
1196
|
inheritAttrs: !1,
|
|
1197
1197
|
__name: "TdDropdown",
|
|
1198
1198
|
props: {
|
|
@@ -1204,7 +1204,7 @@ var gr = /*#__PURE__*/ k(/* @__PURE__ */ B({
|
|
|
1204
1204
|
},
|
|
1205
1205
|
emits: ["update:open"],
|
|
1206
1206
|
setup(e) {
|
|
1207
|
-
let t =
|
|
1207
|
+
let t = Xe(e, "open"), n = Ze("wrapper");
|
|
1208
1208
|
function r(e) {
|
|
1209
1209
|
n.value?.contains(e.target) || (t.value = !1);
|
|
1210
1210
|
}
|
|
@@ -1213,156 +1213,156 @@ var gr = /*#__PURE__*/ k(/* @__PURE__ */ B({
|
|
|
1213
1213
|
}
|
|
1214
1214
|
return J(t, (e) => {
|
|
1215
1215
|
typeof document > "u" || (e ? document.addEventListener("click", r) : document.removeEventListener("click", r));
|
|
1216
|
-
}),
|
|
1216
|
+
}), Ue(() => {
|
|
1217
1217
|
typeof document > "u" || document.removeEventListener("click", r);
|
|
1218
|
-
}), (e, r) => (H(), I("span",
|
|
1218
|
+
}), (e, r) => (H(), I("span", Le({
|
|
1219
1219
|
ref_key: "wrapper",
|
|
1220
1220
|
ref: n
|
|
1221
|
-
}, e.$attrs, { class: "td-dropdown" }), [L("span", { onClick: i }, [
|
|
1221
|
+
}, e.$attrs, { class: "td-dropdown" }), [L("span", { onClick: i }, [Ge(e.$slots, "trigger", {}, void 0, !0)]), t.value ? (H(), I("div", Nr, [Ge(e.$slots, "default", {}, void 0, !0)])) : F("", !0)], 16));
|
|
1222
1222
|
}
|
|
1223
|
-
}), [["__scopeId", "data-v-80759150"]]),
|
|
1223
|
+
}), [["__scopeId", "data-v-80759150"]]), Fr = {
|
|
1224
1224
|
class: "td-breadcrumb",
|
|
1225
1225
|
"aria-label": "Breadcrumb"
|
|
1226
|
-
},
|
|
1226
|
+
}, Ir = ["href"], Lr = {
|
|
1227
1227
|
type: "button",
|
|
1228
1228
|
class: "td-breadcrumb-ellipsis"
|
|
1229
|
-
},
|
|
1229
|
+
}, Rr = ["href"], zr = ["href"], Br = {
|
|
1230
1230
|
key: 1,
|
|
1231
1231
|
class: "td-breadcrumb-current"
|
|
1232
|
-
},
|
|
1232
|
+
}, Vr = ["href"], Hr = {
|
|
1233
1233
|
key: 1,
|
|
1234
1234
|
class: "td-breadcrumb-current"
|
|
1235
|
-
},
|
|
1235
|
+
}, Ur = 3, Wr = /*#__PURE__*/ A(/* @__PURE__ */ B({
|
|
1236
1236
|
__name: "TdBreadcrumb",
|
|
1237
|
-
setup(
|
|
1238
|
-
let
|
|
1239
|
-
let
|
|
1237
|
+
setup(e) {
|
|
1238
|
+
let n = O(), { withBase: i } = j(), a = U(!1), o = N(() => {
|
|
1239
|
+
let e = r(n.path), a = [{
|
|
1240
1240
|
name: "Home",
|
|
1241
|
-
href: i(
|
|
1241
|
+
href: i(s("/"))
|
|
1242
1242
|
}];
|
|
1243
|
-
if (
|
|
1244
|
-
let
|
|
1245
|
-
for (let
|
|
1246
|
-
let
|
|
1247
|
-
|
|
1248
|
-
name:
|
|
1249
|
-
href: i(
|
|
1243
|
+
if (e === "/") return a;
|
|
1244
|
+
let o = e.replace(/^\//, "").split("/"), l = t(e) ? o.slice(0, -1) : o;
|
|
1245
|
+
for (let e = 0; e < l.length; e++) {
|
|
1246
|
+
let t = "/" + l.slice(0, e + 1).join("/"), n = e === l.length - 1;
|
|
1247
|
+
a.push({
|
|
1248
|
+
name: c(l[e]),
|
|
1249
|
+
href: i(n ? t : s(t))
|
|
1250
1250
|
});
|
|
1251
1251
|
}
|
|
1252
|
-
return
|
|
1253
|
-
}),
|
|
1254
|
-
return J(() =>
|
|
1255
|
-
|
|
1256
|
-
}), (e, t) => (H(), I("nav",
|
|
1257
|
-
href:
|
|
1252
|
+
return a;
|
|
1253
|
+
}), l = N(() => Ur < o.value.length), u = N(() => o.value.slice(1, -2));
|
|
1254
|
+
return J(() => n.path, () => {
|
|
1255
|
+
a.value = !1;
|
|
1256
|
+
}), (e, t) => (H(), I("nav", Fr, [L("a", {
|
|
1257
|
+
href: o.value[0].href,
|
|
1258
1258
|
class: "td-breadcrumb-link td-breadcrumb-home"
|
|
1259
|
-
}, K(
|
|
1259
|
+
}, K(o.value[0].name), 9, Ir), l.value ? (H(), I(M, { key: 0 }, [
|
|
1260
1260
|
t[2] ||= L("span", {
|
|
1261
1261
|
class: "td-breadcrumb-sep",
|
|
1262
1262
|
"aria-hidden": "true"
|
|
1263
1263
|
}, "/", -1),
|
|
1264
|
-
z(
|
|
1265
|
-
open:
|
|
1266
|
-
"onUpdate:open": t[0] ||= (e) =>
|
|
1264
|
+
z(Pr, {
|
|
1265
|
+
open: a.value,
|
|
1266
|
+
"onUpdate:open": t[0] ||= (e) => a.value = e
|
|
1267
1267
|
}, {
|
|
1268
|
-
trigger:
|
|
1269
|
-
default:
|
|
1268
|
+
trigger: et(() => [L("button", Lr, [z(q(E), { size: 14 })])]),
|
|
1269
|
+
default: et(() => [(H(!0), I(M, null, W(u.value, (e) => (H(), I("a", {
|
|
1270
1270
|
key: e.href,
|
|
1271
1271
|
href: e.href,
|
|
1272
1272
|
class: "td-breadcrumb-dropdown-item"
|
|
1273
|
-
}, K(e.name), 9,
|
|
1273
|
+
}, K(e.name), 9, Rr))), 128))]),
|
|
1274
1274
|
_: 1
|
|
1275
1275
|
}, 8, ["open"]),
|
|
1276
|
-
(H(!0), I(M, null, W(
|
|
1276
|
+
(H(!0), I(M, null, W(o.value.slice(-2), (e) => (H(), I(M, { key: e.href }, [t[1] ||= L("span", {
|
|
1277
1277
|
class: "td-breadcrumb-sep",
|
|
1278
1278
|
"aria-hidden": "true"
|
|
1279
|
-
}, "/", -1), e ===
|
|
1279
|
+
}, "/", -1), e === o.value[o.value.length - 1] ? (H(), I("span", Br, K(e.name), 1)) : (H(), I("a", {
|
|
1280
1280
|
key: 0,
|
|
1281
1281
|
href: e.href,
|
|
1282
1282
|
class: "td-breadcrumb-link"
|
|
1283
|
-
}, K(e.name), 9,
|
|
1284
|
-
], 64)) : (H(!0), I(M, { key: 1 }, W(
|
|
1283
|
+
}, K(e.name), 9, zr))], 64))), 128))
|
|
1284
|
+
], 64)) : (H(!0), I(M, { key: 1 }, W(o.value.slice(1), (e, n) => (H(), I(M, { key: e.href }, [t[3] ||= L("span", {
|
|
1285
1285
|
class: "td-breadcrumb-sep",
|
|
1286
1286
|
"aria-hidden": "true"
|
|
1287
|
-
}, "/", -1), n <
|
|
1287
|
+
}, "/", -1), n < o.value.length - 2 ? (H(), I("a", {
|
|
1288
1288
|
key: 0,
|
|
1289
1289
|
href: e.href,
|
|
1290
1290
|
class: "td-breadcrumb-link"
|
|
1291
|
-
}, K(e.name), 9,
|
|
1291
|
+
}, K(e.name), 9, Vr)) : (H(), I("span", Hr, K(e.name), 1))], 64))), 128))]));
|
|
1292
1292
|
}
|
|
1293
|
-
}), [["__scopeId", "data-v-3400a7c6"]]),
|
|
1293
|
+
}), [["__scopeId", "data-v-3400a7c6"]]), Gr = {
|
|
1294
1294
|
key: 0,
|
|
1295
1295
|
class: "td-header-nav"
|
|
1296
|
-
},
|
|
1296
|
+
}, Kr = [
|
|
1297
1297
|
"href",
|
|
1298
1298
|
"target",
|
|
1299
1299
|
"rel"
|
|
1300
|
-
],
|
|
1300
|
+
], qr = /*#__PURE__*/ A(/* @__PURE__ */ B({
|
|
1301
1301
|
__name: "TdHeaderNavBar",
|
|
1302
1302
|
setup(e) {
|
|
1303
|
-
let t =
|
|
1303
|
+
let t = j(), { withBase: n } = t, r = O();
|
|
1304
1304
|
function i(e) {
|
|
1305
|
-
return !
|
|
1305
|
+
return !a(e) && r.path.startsWith(n(e));
|
|
1306
1306
|
}
|
|
1307
|
-
return (e, r) => q(t).nav?.length ? (H(), I("nav",
|
|
1307
|
+
return (e, r) => q(t).nav?.length ? (H(), I("nav", Gr, [(H(!0), I(M, null, W(q(t).nav, (e) => (H(), I("a", {
|
|
1308
1308
|
key: e.link,
|
|
1309
|
-
href: q(
|
|
1310
|
-
target: q(
|
|
1311
|
-
rel: q(
|
|
1309
|
+
href: q(a)(e.link) ? e.link : q(n)(e.link),
|
|
1310
|
+
target: q(a)(e.link) ? "_blank" : void 0,
|
|
1311
|
+
rel: q(a)(e.link) ? "noopener noreferrer" : void 0,
|
|
1312
1312
|
class: V(["td-header-nav-link", { "is-active": i(e.link) }])
|
|
1313
|
-
}, [R(K(e.title), 1), q(
|
|
1313
|
+
}, [R(K(e.title), 1), q(a)(e.link) ? (H(), P(q(ae), {
|
|
1314
1314
|
key: 0,
|
|
1315
1315
|
size: 14
|
|
1316
|
-
})) : F("", !0)], 10,
|
|
1316
|
+
})) : F("", !0)], 10, Kr))), 128))])) : F("", !0);
|
|
1317
1317
|
}
|
|
1318
|
-
}), [["__scopeId", "data-v-f416755c"]]),
|
|
1318
|
+
}), [["__scopeId", "data-v-f416755c"]]), Jr = {
|
|
1319
1319
|
key: 0,
|
|
1320
1320
|
class: "td-menu-nav"
|
|
1321
|
-
},
|
|
1321
|
+
}, Yr = [
|
|
1322
1322
|
"href",
|
|
1323
1323
|
"target",
|
|
1324
1324
|
"rel"
|
|
1325
|
-
],
|
|
1325
|
+
], Xr = /*#__PURE__*/ A(/* @__PURE__ */ B({
|
|
1326
1326
|
__name: "TdHeaderNavMenu",
|
|
1327
1327
|
setup(e) {
|
|
1328
|
-
let t =
|
|
1328
|
+
let t = j(), { withBase: n } = t, r = O();
|
|
1329
1329
|
function i(e) {
|
|
1330
|
-
return !
|
|
1330
|
+
return !a(e) && r.path.startsWith(n(e));
|
|
1331
1331
|
}
|
|
1332
|
-
return (e, r) => q(t).nav?.length ? (H(), I("nav",
|
|
1332
|
+
return (e, r) => q(t).nav?.length ? (H(), I("nav", Jr, [(H(!0), I(M, null, W(q(t).nav, (e) => (H(), I("a", {
|
|
1333
1333
|
key: e.link,
|
|
1334
|
-
href: q(
|
|
1335
|
-
target: q(
|
|
1336
|
-
rel: q(
|
|
1334
|
+
href: q(a)(e.link) ? e.link : q(n)(e.link),
|
|
1335
|
+
target: q(a)(e.link) ? "_blank" : void 0,
|
|
1336
|
+
rel: q(a)(e.link) ? "noopener noreferrer" : void 0,
|
|
1337
1337
|
class: V(["td-menu-nav-item", { "is-active": i(e.link) }])
|
|
1338
1338
|
}, [
|
|
1339
|
-
e.icon ? (H(), P(
|
|
1339
|
+
e.icon ? (H(), P(we, {
|
|
1340
1340
|
key: 0,
|
|
1341
1341
|
name: e.icon,
|
|
1342
1342
|
size: 16
|
|
1343
1343
|
}, null, 8, ["name"])) : F("", !0),
|
|
1344
1344
|
L("span", null, K(e.title), 1),
|
|
1345
|
-
q(
|
|
1345
|
+
q(a)(e.link) ? (H(), P(q(ae), {
|
|
1346
1346
|
key: 1,
|
|
1347
1347
|
size: 14
|
|
1348
1348
|
})) : F("", !0)
|
|
1349
|
-
], 10,
|
|
1349
|
+
], 10, Yr))), 128))])) : F("", !0);
|
|
1350
1350
|
}
|
|
1351
|
-
}), [["__scopeId", "data-v-f3c16d10"]]),
|
|
1351
|
+
}), [["__scopeId", "data-v-f3c16d10"]]), Zr = { class: "td-widget-checkbox" }, Qr = /*#__PURE__*/ A(/* @__PURE__ */ B({
|
|
1352
1352
|
__name: "TdWidgetCheckbox",
|
|
1353
1353
|
props: { value: {} },
|
|
1354
1354
|
setup(e) {
|
|
1355
|
-
return (t, n) => (H(), I("span",
|
|
1355
|
+
return (t, n) => (H(), I("span", Zr, [e.value ? (H(), P(q(ft), {
|
|
1356
1356
|
key: 0,
|
|
1357
1357
|
size: 16,
|
|
1358
1358
|
class: "td-widget-checkbox-icon is-checked"
|
|
1359
|
-
})) : (H(), P(q(
|
|
1359
|
+
})) : (H(), P(q(Te), {
|
|
1360
1360
|
key: 1,
|
|
1361
1361
|
size: 16,
|
|
1362
1362
|
class: "td-widget-checkbox-icon"
|
|
1363
1363
|
}))]));
|
|
1364
1364
|
}
|
|
1365
|
-
}), [["__scopeId", "data-v-13241c06"]]),
|
|
1365
|
+
}), [["__scopeId", "data-v-13241c06"]]), $r = /* @__PURE__ */ new Set([
|
|
1366
1366
|
"png",
|
|
1367
1367
|
"jpg",
|
|
1368
1368
|
"jpeg",
|
|
@@ -1374,43 +1374,43 @@ var gr = /*#__PURE__*/ k(/* @__PURE__ */ B({
|
|
|
1374
1374
|
"ico",
|
|
1375
1375
|
"tiff"
|
|
1376
1376
|
]);
|
|
1377
|
-
function
|
|
1377
|
+
function ei(e) {
|
|
1378
1378
|
if (!e) return;
|
|
1379
1379
|
if (typeof e == "string") {
|
|
1380
1380
|
let t = e.trim();
|
|
1381
|
-
return !t || !
|
|
1381
|
+
return !t || !ti({ url: t }) ? void 0 : {
|
|
1382
1382
|
url: t,
|
|
1383
|
-
name:
|
|
1383
|
+
name: i(t),
|
|
1384
1384
|
isImage: !0
|
|
1385
1385
|
};
|
|
1386
1386
|
}
|
|
1387
1387
|
if (typeof e != "object") return;
|
|
1388
1388
|
let t = e, n = t.$ref ?? t;
|
|
1389
1389
|
if (typeof n.url != "string") return;
|
|
1390
|
-
let r = n.url,
|
|
1390
|
+
let r = n.url, a = n.name ?? i(r), o = n.format ?? t.format;
|
|
1391
1391
|
return {
|
|
1392
1392
|
url: r,
|
|
1393
|
-
name:
|
|
1394
|
-
format:
|
|
1393
|
+
name: a,
|
|
1394
|
+
format: o,
|
|
1395
1395
|
icon: n.icon,
|
|
1396
|
-
isImage:
|
|
1396
|
+
isImage: ti({
|
|
1397
1397
|
url: r,
|
|
1398
|
-
name:
|
|
1399
|
-
format:
|
|
1398
|
+
name: a,
|
|
1399
|
+
format: o
|
|
1400
1400
|
})
|
|
1401
1401
|
};
|
|
1402
1402
|
}
|
|
1403
|
-
function
|
|
1404
|
-
if (e.format &&
|
|
1405
|
-
let t =
|
|
1406
|
-
return t ?
|
|
1403
|
+
function ti(e) {
|
|
1404
|
+
if (e.format && $r.has(e.format.toLowerCase())) return !0;
|
|
1405
|
+
let t = o(e.name || e.url).slice(1);
|
|
1406
|
+
return t ? $r.has(t.toLowerCase()) : !1;
|
|
1407
1407
|
}
|
|
1408
1408
|
//#endregion
|
|
1409
1409
|
//#region src/client/theme-default/components/TdFrontmatter/widgets/TdWidgetRelation.vue?vue&type=script&setup=true&lang.ts
|
|
1410
|
-
var
|
|
1410
|
+
var ni = {
|
|
1411
1411
|
key: 0,
|
|
1412
1412
|
class: "td-widget-relation-wrapper"
|
|
1413
|
-
},
|
|
1413
|
+
}, ri = ["href", "title"], ii = ["src", "alt"], ai = ["href"], oi = { class: "td-widget-file-name" }, si = ["href"], ci = ["href"], li = { key: 1 }, ui = /*#__PURE__*/ A(/* @__PURE__ */ B({
|
|
1414
1414
|
__name: "TdWidgetRelation",
|
|
1415
1415
|
props: {
|
|
1416
1416
|
value: {},
|
|
@@ -1420,8 +1420,8 @@ var oi = {
|
|
|
1420
1420
|
}
|
|
1421
1421
|
},
|
|
1422
1422
|
setup(e) {
|
|
1423
|
-
let { withBase: t } =
|
|
1424
|
-
return (a, o) => n.value ? (H(), I("span",
|
|
1423
|
+
let { withBase: t } = j(), n = N(() => ei(e.value)), r = N(() => n.value?.icon ? k(n.value.icon.name) : void 0), i = N(() => n.value !== void 0 && a(n.value.url));
|
|
1424
|
+
return (a, o) => n.value ? (H(), I("span", ni, [n.value.isImage ? (H(), I("a", {
|
|
1425
1425
|
key: 0,
|
|
1426
1426
|
href: q(t)(n.value.url),
|
|
1427
1427
|
target: "_blank",
|
|
@@ -1433,22 +1433,22 @@ var oi = {
|
|
|
1433
1433
|
alt: n.value.name,
|
|
1434
1434
|
class: "td-widget-image-img",
|
|
1435
1435
|
loading: "lazy"
|
|
1436
|
-
}, null, 8,
|
|
1436
|
+
}, null, 8, ii)], 8, ri)) : n.value.format || n.value.url.includes(".") ? (H(), I("a", {
|
|
1437
1437
|
key: 1,
|
|
1438
1438
|
href: q(t)(n.value.url),
|
|
1439
1439
|
target: "_blank",
|
|
1440
1440
|
rel: "noopener noreferrer",
|
|
1441
1441
|
class: "td-widget-file-link"
|
|
1442
|
-
}, [z(q(
|
|
1442
|
+
}, [z(q(re), { class: "td-widget-file-icon" }), L("span", oi, K(n.value.name), 1)], 8, ai)) : i.value ? (H(), I("a", {
|
|
1443
1443
|
key: 2,
|
|
1444
1444
|
href: n.value.url,
|
|
1445
1445
|
target: "_blank",
|
|
1446
1446
|
rel: "noopener noreferrer",
|
|
1447
1447
|
class: "td-widget-ref td-widget-ref-external"
|
|
1448
|
-
}, [z(q(
|
|
1448
|
+
}, [z(q(ae), {
|
|
1449
1449
|
size: 12,
|
|
1450
1450
|
class: "td-widget-external-icon"
|
|
1451
|
-
})], 8,
|
|
1451
|
+
})], 8, si)) : (H(), I("a", {
|
|
1452
1452
|
key: 3,
|
|
1453
1453
|
href: q(t)(n.value.url),
|
|
1454
1454
|
class: "td-widget-ref"
|
|
@@ -1456,26 +1456,26 @@ var oi = {
|
|
|
1456
1456
|
key: 0,
|
|
1457
1457
|
size: 14,
|
|
1458
1458
|
class: "td-widget-ref-icon"
|
|
1459
|
-
})) : F("", !0), R(K(n.value.name), 1)], 8,
|
|
1459
|
+
})) : F("", !0), R(K(n.value.name), 1)], 8, ci))])) : (H(), I("span", li, K(e.value), 1));
|
|
1460
1460
|
}
|
|
1461
|
-
}), [["__scopeId", "data-v-e593af69"]]),
|
|
1461
|
+
}), [["__scopeId", "data-v-e593af69"]]), di = { key: 0 }, fi = { class: "td-widget-list td-widget-list-icons" }, pi = { key: 1 }, mi = { class: "td-widget-list" }, hi = 5, gi = /*#__PURE__*/ A(/* @__PURE__ */ B({
|
|
1462
1462
|
__name: "TdWidgetList",
|
|
1463
1463
|
props: {
|
|
1464
1464
|
definition: {},
|
|
1465
1465
|
value: {}
|
|
1466
1466
|
},
|
|
1467
1467
|
setup(e) {
|
|
1468
|
-
let t = U(!1), n = N(() => Array.isArray(e.value) ? e.value : []), r = N(() => e.definition.items?.widget === "relation"), i = N(() => r.value ? n.value.map((e) =>
|
|
1468
|
+
let t = U(!1), n = N(() => Array.isArray(e.value) ? e.value : []), r = N(() => e.definition.items?.widget === "relation"), i = N(() => r.value ? n.value.map((e) => ei(e)).filter((e) => e !== void 0) : []), a = N(() => r.value ? Math.max(0, i.value.length - hi) : Math.max(0, n.value.length - hi));
|
|
1469
1469
|
function o() {
|
|
1470
1470
|
t.value = !t.value;
|
|
1471
1471
|
}
|
|
1472
1472
|
function s(e) {
|
|
1473
|
-
return t.value ? e : e.slice(0,
|
|
1473
|
+
return t.value ? e : e.slice(0, hi);
|
|
1474
1474
|
}
|
|
1475
|
-
return (e, c) => r.value ? (H(), I("div",
|
|
1475
|
+
return (e, c) => r.value ? (H(), I("div", di, [L("ul", fi, [(H(!0), I(M, null, W(s(i.value), (e, t) => (H(), I("li", { key: t }, [(H(), P(G(e.icon ? q(k)(e.icon.name) ?? q(ue) : q(ue)), {
|
|
1476
1476
|
size: 14,
|
|
1477
1477
|
class: "td-widget-list-icon"
|
|
1478
|
-
})), z(
|
|
1478
|
+
})), z(ui, {
|
|
1479
1479
|
value: { $ref: e },
|
|
1480
1480
|
"hide-icon": ""
|
|
1481
1481
|
}, null, 8, ["value"])]))), 128))]), a.value > 0 ? (H(), I("button", {
|
|
@@ -1483,7 +1483,7 @@ var oi = {
|
|
|
1483
1483
|
class: "td-widget-more",
|
|
1484
1484
|
type: "button",
|
|
1485
1485
|
onClick: o
|
|
1486
|
-
}, K(t.value ? "show less" : `+${a.value} more`), 1)) : F("", !0)])) : (H(), I("div",
|
|
1486
|
+
}, K(t.value ? "show less" : `+${a.value} more`), 1)) : F("", !0)])) : (H(), I("div", pi, [L("ul", mi, [(H(!0), I(M, null, W(s(n.value), (e, t) => (H(), I("li", { key: t }, [q(ei)(e) ? (H(), P(ui, {
|
|
1487
1487
|
key: 0,
|
|
1488
1488
|
value: e
|
|
1489
1489
|
}, null, 8, ["value"])) : (H(), I(M, { key: 1 }, [R(K(e), 1)], 64))]))), 128))]), a.value > 0 ? (H(), I("button", {
|
|
@@ -1493,7 +1493,7 @@ var oi = {
|
|
|
1493
1493
|
onClick: o
|
|
1494
1494
|
}, K(t.value ? "show less" : `+${a.value} more`), 1)) : F("", !0)]));
|
|
1495
1495
|
}
|
|
1496
|
-
}), [["__scopeId", "data-v-e838ea77"]]),
|
|
1496
|
+
}), [["__scopeId", "data-v-e838ea77"]]), _i = [
|
|
1497
1497
|
{
|
|
1498
1498
|
fg: "#a0522d",
|
|
1499
1499
|
bg: "rgba(160, 82, 45, 0.1)"
|
|
@@ -1527,32 +1527,32 @@ var oi = {
|
|
|
1527
1527
|
bg: "rgba(239, 68, 68, 0.1)"
|
|
1528
1528
|
}
|
|
1529
1529
|
];
|
|
1530
|
-
function
|
|
1531
|
-
let t =
|
|
1530
|
+
function vi(e) {
|
|
1531
|
+
let t = _i[yi(String(e ?? "")) % _i.length];
|
|
1532
1532
|
return {
|
|
1533
1533
|
color: t.fg,
|
|
1534
1534
|
background: t.bg
|
|
1535
1535
|
};
|
|
1536
1536
|
}
|
|
1537
|
-
function
|
|
1537
|
+
function yi(e) {
|
|
1538
1538
|
let t = 0;
|
|
1539
1539
|
for (let n = 0; n < e.length; n++) t = (t << 5) - t + e.charCodeAt(n) | 0;
|
|
1540
1540
|
return Math.abs(t);
|
|
1541
1541
|
}
|
|
1542
1542
|
//#endregion
|
|
1543
1543
|
//#region src/client/theme-default/components/TdFrontmatter/widgets/TdWidgetMultiSelect.vue?vue&type=script&setup=true&lang.ts
|
|
1544
|
-
var
|
|
1544
|
+
var bi = 5, xi = /*#__PURE__*/ A(/* @__PURE__ */ B({
|
|
1545
1545
|
__name: "TdWidgetMultiSelect",
|
|
1546
1546
|
props: { value: {} },
|
|
1547
1547
|
setup(e) {
|
|
1548
|
-
let t = U(!1), n = N(() => Array.isArray(e.value) ? e.value : []), r = N(() => t.value ? n.value : n.value.slice(0,
|
|
1548
|
+
let t = U(!1), n = N(() => Array.isArray(e.value) ? e.value : []), r = N(() => t.value ? n.value : n.value.slice(0, bi)), i = N(() => Math.max(0, n.value.length - bi));
|
|
1549
1549
|
function a() {
|
|
1550
1550
|
t.value = !t.value;
|
|
1551
1551
|
}
|
|
1552
1552
|
return (e, n) => (H(), I(M, null, [(H(!0), I(M, null, W(r.value, (e, t) => (H(), I("span", {
|
|
1553
1553
|
key: t,
|
|
1554
1554
|
class: "td-widget-pill",
|
|
1555
|
-
style:
|
|
1555
|
+
style: ze(q(vi)(e))
|
|
1556
1556
|
}, K(e), 5))), 128)), i.value > 0 ? (H(), I("button", {
|
|
1557
1557
|
key: 0,
|
|
1558
1558
|
class: "td-widget-more",
|
|
@@ -1560,25 +1560,25 @@ var wi = 5, Ti = /*#__PURE__*/ k(/* @__PURE__ */ B({
|
|
|
1560
1560
|
onClick: a
|
|
1561
1561
|
}, K(t.value ? "show less" : `+${i.value} more`), 1)) : F("", !0)], 64));
|
|
1562
1562
|
}
|
|
1563
|
-
}), [["__scopeId", "data-v-2f88152d"]]),
|
|
1563
|
+
}), [["__scopeId", "data-v-2f88152d"]]), Si = /*#__PURE__*/ A(/* @__PURE__ */ B({
|
|
1564
1564
|
__name: "TdWidgetSelect",
|
|
1565
1565
|
props: { value: {} },
|
|
1566
1566
|
setup(e) {
|
|
1567
1567
|
return (t, n) => (H(), I("span", {
|
|
1568
1568
|
class: "td-widget-pill",
|
|
1569
|
-
style:
|
|
1569
|
+
style: ze(q(vi)(e.value))
|
|
1570
1570
|
}, K(e.value), 5));
|
|
1571
1571
|
}
|
|
1572
|
-
}), [["__scopeId", "data-v-b9e2b4fd"]]),
|
|
1572
|
+
}), [["__scopeId", "data-v-b9e2b4fd"]]), Ci = ["href", "title"], wi = ["src", "alt"], Ti = ["href"], Ei = { class: "td-widget-file-name" }, Di = /*#__PURE__*/ A(/* @__PURE__ */ B({
|
|
1573
1573
|
__name: "TdWidgetText",
|
|
1574
1574
|
props: {
|
|
1575
1575
|
definition: {},
|
|
1576
1576
|
value: {}
|
|
1577
1577
|
},
|
|
1578
1578
|
setup(e) {
|
|
1579
|
-
let { withBase: t } =
|
|
1579
|
+
let { withBase: t } = j(), n = N(() => typeof e.value == "string" ? e.value.trim() : ""), r = N(() => ei(e.value)), i = N(() => r.value ? r.value.isImage : 0 < n.value.length && ti({ url: n.value })), a = N(() => r.value ? r.value.url : n.value), o = N(() => t(a.value)), s = N(() => !n.value || !n.value.includes(".") || n.value.includes(" ") ? !1 : n.value.endsWith(".pdf") || n.value.endsWith(".zip") || n.value.endsWith(".doc") || n.value.endsWith(".docx"));
|
|
1580
1580
|
function c(t) {
|
|
1581
|
-
return t == null ? "" : e.definition.widget === "date" ?
|
|
1581
|
+
return t == null ? "" : e.definition.widget === "date" ? _(String(t)) : String(t);
|
|
1582
1582
|
}
|
|
1583
1583
|
return (t, a) => i.value ? (H(), I("a", {
|
|
1584
1584
|
key: 0,
|
|
@@ -1592,138 +1592,138 @@ var wi = 5, Ti = /*#__PURE__*/ k(/* @__PURE__ */ B({
|
|
|
1592
1592
|
alt: r.value ? r.value.name : n.value,
|
|
1593
1593
|
class: "td-widget-image-img",
|
|
1594
1594
|
loading: "lazy"
|
|
1595
|
-
}, null, 8,
|
|
1595
|
+
}, null, 8, wi)], 8, Ci)) : s.value ? (H(), I("a", {
|
|
1596
1596
|
key: 1,
|
|
1597
1597
|
href: o.value,
|
|
1598
1598
|
target: "_blank",
|
|
1599
1599
|
rel: "noopener noreferrer",
|
|
1600
1600
|
class: "td-widget-file-link"
|
|
1601
|
-
}, [z(q(
|
|
1601
|
+
}, [z(q(re), { class: "td-widget-file-icon" }), L("span", Ei, K(n.value.split("/").pop() ?? n.value), 1)], 8, Ti)) : (H(), I(M, { key: 2 }, [R(K(c(e.value)), 1)], 64));
|
|
1602
1602
|
}
|
|
1603
|
-
}), [["__scopeId", "data-v-37708635"]]),
|
|
1603
|
+
}), [["__scopeId", "data-v-37708635"]]), Oi = {
|
|
1604
1604
|
key: 0,
|
|
1605
1605
|
class: "td-frontmatter-empty"
|
|
1606
|
-
},
|
|
1606
|
+
}, ki = /*#__PURE__*/ A(/* @__PURE__ */ B({
|
|
1607
1607
|
__name: "TdFrontmatterValue",
|
|
1608
1608
|
props: {
|
|
1609
1609
|
definition: {},
|
|
1610
1610
|
value: {}
|
|
1611
1611
|
},
|
|
1612
1612
|
setup(e) {
|
|
1613
|
-
return (t, n) => e.value === void 0 || e.value === null ? (H(), I("span",
|
|
1613
|
+
return (t, n) => e.value === void 0 || e.value === null ? (H(), I("span", Oi, "Empty")) : e.definition.widget === "checkbox" ? (H(), P(Qr, {
|
|
1614
1614
|
key: 1,
|
|
1615
1615
|
value: e.value
|
|
1616
|
-
}, null, 8, ["value"])) : e.definition.widget === "select" ? (H(), P(
|
|
1616
|
+
}, null, 8, ["value"])) : e.definition.widget === "select" ? (H(), P(Si, {
|
|
1617
1617
|
key: 2,
|
|
1618
1618
|
value: e.value
|
|
1619
|
-
}, null, 8, ["value"])) : e.definition.widget === "multiSelect" ? (H(), P(
|
|
1619
|
+
}, null, 8, ["value"])) : e.definition.widget === "multiSelect" ? (H(), P(xi, {
|
|
1620
1620
|
key: 3,
|
|
1621
1621
|
value: e.value
|
|
1622
|
-
}, null, 8, ["value"])) : q(
|
|
1622
|
+
}, null, 8, ["value"])) : q(ei)(e.value) || e.definition.widget === "relation" ? (H(), P(ui, {
|
|
1623
1623
|
key: 4,
|
|
1624
1624
|
value: e.value
|
|
1625
|
-
}, null, 8, ["value"])) : Array.isArray(e.value) || e.definition.widget === "list" ? (H(), P(
|
|
1625
|
+
}, null, 8, ["value"])) : Array.isArray(e.value) || e.definition.widget === "list" ? (H(), P(gi, {
|
|
1626
1626
|
key: 5,
|
|
1627
1627
|
definition: e.definition,
|
|
1628
1628
|
value: e.value
|
|
1629
|
-
}, null, 8, ["definition", "value"])) : (H(), P(
|
|
1629
|
+
}, null, 8, ["definition", "value"])) : (H(), P(Di, {
|
|
1630
1630
|
key: 6,
|
|
1631
1631
|
definition: e.definition,
|
|
1632
1632
|
value: e.value
|
|
1633
1633
|
}, null, 8, ["definition", "value"]));
|
|
1634
1634
|
}
|
|
1635
|
-
}), [["__scopeId", "data-v-1deedc98"]]),
|
|
1635
|
+
}), [["__scopeId", "data-v-1deedc98"]]), Ai = {
|
|
1636
1636
|
key: 0,
|
|
1637
1637
|
class: "td-fm-rail"
|
|
1638
|
-
},
|
|
1638
|
+
}, ji = { class: "td-fm-rail-key" }, Mi = { class: "td-fm-rail-value" }, Ni = {
|
|
1639
1639
|
key: 1,
|
|
1640
1640
|
class: "td-fm-box"
|
|
1641
|
-
},
|
|
1641
|
+
}, Pi = { class: "td-fm-box-label" }, Fi = { class: "td-fm-box-count" }, Ii = { class: "td-fm-box-toggle" }, Li = { class: "td-fm-box-body" }, Ri = { class: "td-fm-box-key" }, zi = { class: "td-fm-box-value" }, Bi = /*#__PURE__*/ A(/* @__PURE__ */ B({
|
|
1642
1642
|
__name: "TdFrontmatter",
|
|
1643
1643
|
props: {
|
|
1644
1644
|
mode: { default: "inline" },
|
|
1645
1645
|
schema: { default: () => void 0 },
|
|
1646
1646
|
frontmatter: {}
|
|
1647
1647
|
},
|
|
1648
|
-
setup(
|
|
1649
|
-
let
|
|
1650
|
-
if (
|
|
1651
|
-
}),
|
|
1652
|
-
let
|
|
1653
|
-
|
|
1654
|
-
for (let
|
|
1655
|
-
if (
|
|
1656
|
-
let i =
|
|
1648
|
+
setup(e) {
|
|
1649
|
+
let t = _e(), n = N(() => {
|
|
1650
|
+
if (e.schema) return t.value.schemas[e.schema];
|
|
1651
|
+
}), r = N(() => {
|
|
1652
|
+
let t = n.value, r = [], i = /* @__PURE__ */ new Set();
|
|
1653
|
+
t && Object.keys(t).forEach((e) => i.add(e)), Object.keys(e.frontmatter).forEach((e) => i.add(e));
|
|
1654
|
+
for (let n of i) {
|
|
1655
|
+
if (d(n)) continue;
|
|
1656
|
+
let i = e.frontmatter[n];
|
|
1657
1657
|
if (i == null || Array.isArray(i) && i.length === 0) continue;
|
|
1658
|
-
let a =
|
|
1659
|
-
|
|
1658
|
+
let a = t?.[n] ?? { widget: "text" };
|
|
1659
|
+
r.push([n, a]);
|
|
1660
1660
|
}
|
|
1661
|
-
return
|
|
1662
|
-
}),
|
|
1663
|
-
text:
|
|
1664
|
-
checkbox:
|
|
1665
|
-
select:
|
|
1666
|
-
multiSelect:
|
|
1667
|
-
relation:
|
|
1668
|
-
list:
|
|
1661
|
+
return r;
|
|
1662
|
+
}), i = {
|
|
1663
|
+
text: mt,
|
|
1664
|
+
checkbox: it,
|
|
1665
|
+
select: he,
|
|
1666
|
+
multiSelect: pt,
|
|
1667
|
+
relation: ae,
|
|
1668
|
+
list: le
|
|
1669
1669
|
};
|
|
1670
|
-
function
|
|
1671
|
-
return
|
|
1670
|
+
function a(e) {
|
|
1671
|
+
return i[e] ?? mt;
|
|
1672
1672
|
}
|
|
1673
|
-
let
|
|
1673
|
+
let o = U(!1), s = U(!1);
|
|
1674
1674
|
function l() {
|
|
1675
|
-
|
|
1675
|
+
o.value = !o.value;
|
|
1676
1676
|
}
|
|
1677
1677
|
function u() {
|
|
1678
|
-
|
|
1678
|
+
s.value = !s.value;
|
|
1679
1679
|
}
|
|
1680
|
-
return (
|
|
1680
|
+
return (t, n) => e.mode === "rail" && r.value.length > 0 ? (H(), I("div", Ai, [L("button", {
|
|
1681
1681
|
type: "button",
|
|
1682
1682
|
class: "td-fm-rail-header",
|
|
1683
1683
|
onClick: u
|
|
1684
|
-
}, [
|
|
1684
|
+
}, [n[0] ||= L("span", { class: "td-fm-rail-label" }, "Properties", -1), z(q(te), {
|
|
1685
1685
|
size: 14,
|
|
1686
|
-
class: V(["td-fm-rail-caret", { "is-collapsed":
|
|
1687
|
-
}, null, 8, ["class"])]), L("div", { class: V(["td-collapse", { "is-collapsed":
|
|
1688
|
-
key:
|
|
1686
|
+
class: V(["td-fm-rail-caret", { "is-collapsed": s.value }])
|
|
1687
|
+
}, null, 8, ["class"])]), L("div", { class: V(["td-collapse", { "is-collapsed": s.value }]) }, [L("div", null, [(H(!0), I(M, null, W(r.value, ([t, n]) => (H(), I("div", {
|
|
1688
|
+
key: t,
|
|
1689
1689
|
class: "td-fm-rail-row"
|
|
1690
|
-
}, [L("span",
|
|
1690
|
+
}, [L("span", ji, [(H(), P(G(a(n.widget)), {
|
|
1691
1691
|
size: 12,
|
|
1692
1692
|
class: "td-fm-icon"
|
|
1693
|
-
})), R(" " + K(q(
|
|
1694
|
-
definition:
|
|
1695
|
-
value:
|
|
1696
|
-
}, null, 8, ["definition", "value"])])]))), 128))])], 2)])) :
|
|
1693
|
+
})), R(" " + K(q(c)(t)), 1)]), L("span", Mi, [z(ki, {
|
|
1694
|
+
definition: n,
|
|
1695
|
+
value: e.frontmatter[t]
|
|
1696
|
+
}, null, 8, ["definition", "value"])])]))), 128))])], 2)])) : r.value.length > 0 ? (H(), I("div", Ni, [L("button", {
|
|
1697
1697
|
type: "button",
|
|
1698
1698
|
class: "td-fm-box-header",
|
|
1699
1699
|
onClick: l
|
|
1700
|
-
}, [L("span",
|
|
1700
|
+
}, [L("span", Pi, [n[1] ||= R("Properties ", -1), L("span", Fi, K(r.value.length), 1)]), L("span", Ii, [R(K(o.value ? "Show" : "Hide") + " ", 1), o.value ? (H(), P(q(se), {
|
|
1701
1701
|
key: 1,
|
|
1702
1702
|
size: 14
|
|
1703
|
-
})) : (H(), P(q(
|
|
1703
|
+
})) : (H(), P(q(te), {
|
|
1704
1704
|
key: 0,
|
|
1705
1705
|
size: 14
|
|
1706
|
-
}))])]), L("div", { class: V(["td-collapse", { "is-collapsed":
|
|
1706
|
+
}))])]), L("div", { class: V(["td-collapse", { "is-collapsed": o.value }]) }, [L("div", Li, [(H(!0), I(M, null, W(r.value, ([t, n]) => (H(), I(M, { key: t }, [L("span", Ri, [(H(), P(G(a(n.widget)), {
|
|
1707
1707
|
size: 12,
|
|
1708
1708
|
class: "td-fm-icon"
|
|
1709
|
-
})), R(" " + K(q(
|
|
1710
|
-
definition:
|
|
1711
|
-
value:
|
|
1709
|
+
})), R(" " + K(q(c)(t)), 1)]), L("span", zi, [z(ki, {
|
|
1710
|
+
definition: n,
|
|
1711
|
+
value: e.frontmatter[t]
|
|
1712
1712
|
}, null, 8, ["definition", "value"])])], 64))), 128))])], 2)])) : F("", !0);
|
|
1713
1713
|
}
|
|
1714
|
-
}), [["__scopeId", "data-v-1b3924e7"]]),
|
|
1715
|
-
function
|
|
1714
|
+
}), [["__scopeId", "data-v-1b3924e7"]]), Vi = U(!1);
|
|
1715
|
+
function Hi() {
|
|
1716
1716
|
function e() {
|
|
1717
|
-
|
|
1717
|
+
Vi.value = !Vi.value;
|
|
1718
1718
|
}
|
|
1719
1719
|
function t() {
|
|
1720
|
-
|
|
1720
|
+
Vi.value = !0;
|
|
1721
1721
|
}
|
|
1722
1722
|
function n() {
|
|
1723
|
-
|
|
1723
|
+
Vi.value = !1;
|
|
1724
1724
|
}
|
|
1725
1725
|
return {
|
|
1726
|
-
isOpen:
|
|
1726
|
+
isOpen: We(Vi),
|
|
1727
1727
|
toggle: e,
|
|
1728
1728
|
open: t,
|
|
1729
1729
|
close: n
|
|
@@ -1731,20 +1731,20 @@ function Ki() {
|
|
|
1731
1731
|
}
|
|
1732
1732
|
//#endregion
|
|
1733
1733
|
//#region src/client/theme-default/components/TdMenuButton.vue
|
|
1734
|
-
var
|
|
1734
|
+
var Ui = /* @__PURE__ */ B({
|
|
1735
1735
|
__name: "TdMenuButton",
|
|
1736
1736
|
setup(e) {
|
|
1737
|
-
let { isOpen: t, toggle: n } =
|
|
1738
|
-
return (e, r) => (H(), P(
|
|
1737
|
+
let { isOpen: t, toggle: n } = Hi();
|
|
1738
|
+
return (e, r) => (H(), P(xt, {
|
|
1739
1739
|
class: "td-menu-button",
|
|
1740
1740
|
label: q(t) ? "Close menu" : "Open menu",
|
|
1741
1741
|
"aria-expanded": q(t),
|
|
1742
1742
|
onClick: q(n)
|
|
1743
1743
|
}, {
|
|
1744
|
-
default:
|
|
1744
|
+
default: et(() => [q(t) ? (H(), P(q(ge), {
|
|
1745
1745
|
key: 0,
|
|
1746
1746
|
size: 20
|
|
1747
|
-
})) : (H(), P(q(
|
|
1747
|
+
})) : (H(), P(q(De), {
|
|
1748
1748
|
key: 1,
|
|
1749
1749
|
size: 20
|
|
1750
1750
|
}))]),
|
|
@@ -1758,9 +1758,9 @@ var qi = /* @__PURE__ */ B({
|
|
|
1758
1758
|
});
|
|
1759
1759
|
//#endregion
|
|
1760
1760
|
//#region src/client/theme-default/composables/usePreviousNext.ts
|
|
1761
|
-
function
|
|
1762
|
-
let e =
|
|
1763
|
-
let i =
|
|
1761
|
+
function Wi() {
|
|
1762
|
+
let e = _e(), t = O(), { withBase: n, title: r } = j(), i = N(() => {
|
|
1763
|
+
let i = Gi(e.value.contentTree, t.path, r);
|
|
1764
1764
|
if (i === void 0) return {};
|
|
1765
1765
|
let a = i.pages.findIndex((e) => e.url === t.path);
|
|
1766
1766
|
if (a === -1) return { groupName: i.groupName };
|
|
@@ -1783,11 +1783,11 @@ function Ji() {
|
|
|
1783
1783
|
groupName: N(() => i.value.groupName)
|
|
1784
1784
|
};
|
|
1785
1785
|
}
|
|
1786
|
-
function
|
|
1787
|
-
if (e.entries.some((e) => e.kind === "file" &&
|
|
1788
|
-
let t = [], r = e.entries.find((e) => e.kind === "file" &&
|
|
1789
|
-
r && r.kind === "file" && t.push(
|
|
1790
|
-
for (let n of e.entries) n.kind === "file" ?
|
|
1786
|
+
function Gi(e, t, n) {
|
|
1787
|
+
if (e.entries.some((e) => e.kind === "file" && C(e.item.filepath) === t)) {
|
|
1788
|
+
let t = [], r = e.entries.find((e) => e.kind === "file" && S(e.item.filepath));
|
|
1789
|
+
r && r.kind === "file" && t.push(qi(r.item, n));
|
|
1790
|
+
for (let n of e.entries) n.kind === "file" ? S(n.item.filepath) || t.push(qi(n.item)) : t.push(Ji(n.node, ""));
|
|
1791
1791
|
return {
|
|
1792
1792
|
pages: t,
|
|
1793
1793
|
groupName: ""
|
|
@@ -1795,75 +1795,75 @@ function Yi(e, t, n) {
|
|
|
1795
1795
|
}
|
|
1796
1796
|
for (let r of e.entries) {
|
|
1797
1797
|
if (r.kind !== "dir") continue;
|
|
1798
|
-
let e =
|
|
1798
|
+
let e = Ki(r.node, t, "", n);
|
|
1799
1799
|
if (e !== void 0) return e;
|
|
1800
1800
|
}
|
|
1801
1801
|
}
|
|
1802
|
-
function
|
|
1803
|
-
let
|
|
1804
|
-
if (
|
|
1805
|
-
let
|
|
1806
|
-
|
|
1807
|
-
for (let
|
|
1802
|
+
function Ki(e, t, n, r) {
|
|
1803
|
+
let i = w(n, e.name);
|
|
1804
|
+
if (e.entries.some((e) => e.kind === "file" && C(e.item.filepath) === t)) {
|
|
1805
|
+
let t = [], n = m(e);
|
|
1806
|
+
n && t.push(qi(n));
|
|
1807
|
+
for (let n of e.entries) n.kind === "file" ? S(n.item.filepath) || t.push(qi(n.item)) : t.push(Ji(n.node, i));
|
|
1808
1808
|
return {
|
|
1809
|
-
pages:
|
|
1810
|
-
groupName: e
|
|
1809
|
+
pages: t,
|
|
1810
|
+
groupName: c(e.name)
|
|
1811
1811
|
};
|
|
1812
1812
|
}
|
|
1813
|
-
for (let
|
|
1814
|
-
if (
|
|
1815
|
-
let
|
|
1816
|
-
if (
|
|
1813
|
+
for (let n of e.entries) {
|
|
1814
|
+
if (n.kind !== "dir") continue;
|
|
1815
|
+
let e = Ki(n.node, t, i, r);
|
|
1816
|
+
if (e !== void 0) return e;
|
|
1817
1817
|
}
|
|
1818
1818
|
}
|
|
1819
|
-
function
|
|
1820
|
-
let n = e.label === void 0 ? t === void 0 ?
|
|
1819
|
+
function qi(e, t) {
|
|
1820
|
+
let n = e.label === void 0 ? t === void 0 ? l(e.filepath) : p(e.filepath, t) : e.label;
|
|
1821
1821
|
return {
|
|
1822
|
-
url:
|
|
1822
|
+
url: C(e.filepath),
|
|
1823
1823
|
title: n
|
|
1824
1824
|
};
|
|
1825
1825
|
}
|
|
1826
|
-
function
|
|
1827
|
-
let
|
|
1826
|
+
function Ji(e, t) {
|
|
1827
|
+
let n = w(t, e.name), r = m(e);
|
|
1828
1828
|
return {
|
|
1829
|
-
url:
|
|
1830
|
-
title:
|
|
1829
|
+
url: r ? C(r.filepath) : s(n),
|
|
1830
|
+
title: r ? l(r.filepath, r.label) : c(e.name)
|
|
1831
1831
|
};
|
|
1832
1832
|
}
|
|
1833
1833
|
//#endregion
|
|
1834
1834
|
//#region src/client/theme-default/components/TdPreviousNext.vue?vue&type=script&setup=true&lang.ts
|
|
1835
|
-
var
|
|
1835
|
+
var Yi = {
|
|
1836
1836
|
key: 0,
|
|
1837
1837
|
class: "td-prevnext",
|
|
1838
1838
|
"aria-label": "Page navigation"
|
|
1839
|
-
},
|
|
1839
|
+
}, Xi = ["href"], Zi = { class: "td-prevnext-label" }, Qi = { class: "td-prevnext-title" }, $i = {
|
|
1840
1840
|
key: 1,
|
|
1841
1841
|
class: "td-prevnext-spacer"
|
|
1842
|
-
},
|
|
1842
|
+
}, ea = ["href"], ta = { class: "td-prevnext-label" }, na = { class: "td-prevnext-title" }, ra = {
|
|
1843
1843
|
key: 3,
|
|
1844
1844
|
class: "td-prevnext-spacer"
|
|
1845
|
-
},
|
|
1845
|
+
}, ia = /*#__PURE__*/ A(/* @__PURE__ */ B({
|
|
1846
1846
|
__name: "TdPreviousNext",
|
|
1847
1847
|
setup(e) {
|
|
1848
|
-
let { previous: t, next: n, groupName: r } =
|
|
1849
|
-
return (e, i) => q(t) || q(n) ? (H(), I("nav",
|
|
1848
|
+
let { previous: t, next: n, groupName: r } = Wi();
|
|
1849
|
+
return (e, i) => q(t) || q(n) ? (H(), I("nav", Yi, [q(t) ? (H(), I("a", {
|
|
1850
1850
|
key: 0,
|
|
1851
1851
|
href: q(t).url,
|
|
1852
1852
|
class: "td-prevnext-link is-previous"
|
|
1853
|
-
}, [L("span",
|
|
1853
|
+
}, [L("span", Zi, [z(q(ye), {
|
|
1854
1854
|
size: 14,
|
|
1855
1855
|
class: "td-prevnext-chevron"
|
|
1856
|
-
}), R(" " + K(q(r) ? `Previous in ${q(r)}` : "Previous"), 1)]), L("span",
|
|
1856
|
+
}), R(" " + K(q(r) ? `Previous in ${q(r)}` : "Previous"), 1)]), L("span", Qi, K(q(t).title), 1)], 8, Xi)) : (H(), I("span", $i)), q(n) ? (H(), I("a", {
|
|
1857
1857
|
key: 2,
|
|
1858
1858
|
href: q(n).url,
|
|
1859
1859
|
class: "td-prevnext-link is-next"
|
|
1860
|
-
}, [L("span",
|
|
1860
|
+
}, [L("span", ta, [R(K(q(r) ? `Next in ${q(r)}` : "Next") + " ", 1), z(q(se), {
|
|
1861
1861
|
size: 14,
|
|
1862
1862
|
class: "td-prevnext-chevron"
|
|
1863
|
-
})]), L("span",
|
|
1863
|
+
})]), L("span", na, K(q(n).title), 1)], 8, ea)) : (H(), I("span", ra))])) : F("", !0);
|
|
1864
1864
|
}
|
|
1865
|
-
}), [["__scopeId", "data-v-8ea01cd7"]]),
|
|
1866
|
-
function
|
|
1865
|
+
}), [["__scopeId", "data-v-8ea01cd7"]]), aa = 100;
|
|
1866
|
+
function oa(e) {
|
|
1867
1867
|
let t = U(void 0), n = [], r;
|
|
1868
1868
|
function i() {
|
|
1869
1869
|
if (n.length === 0) return;
|
|
@@ -1873,7 +1873,7 @@ function ua(e) {
|
|
|
1873
1873
|
return;
|
|
1874
1874
|
}
|
|
1875
1875
|
let r;
|
|
1876
|
-
for (let t of n) if (
|
|
1876
|
+
for (let t of n) if (sa(t) <= e + aa) r = t.id;
|
|
1877
1877
|
else break;
|
|
1878
1878
|
t.value = r;
|
|
1879
1879
|
}
|
|
@@ -1886,25 +1886,25 @@ function ua(e) {
|
|
|
1886
1886
|
let r = new Set(e.map((e) => e.slug));
|
|
1887
1887
|
n = Array.from(document.querySelectorAll(".td-content h2[id], .td-content h3[id], .td-content h4[id], .td-content h5[id]")).filter((e) => r.has(e.id)), i();
|
|
1888
1888
|
}
|
|
1889
|
-
return
|
|
1889
|
+
return Ve(() => {
|
|
1890
1890
|
window.addEventListener("scroll", a);
|
|
1891
|
-
}),
|
|
1891
|
+
}), Ue(() => {
|
|
1892
1892
|
window.removeEventListener("scroll", a), r !== void 0 && cancelAnimationFrame(r);
|
|
1893
1893
|
}), J(e, (e) => {
|
|
1894
|
-
typeof window > "u" ||
|
|
1894
|
+
typeof window > "u" || Re(() => o(e));
|
|
1895
1895
|
}, { immediate: !0 }), t;
|
|
1896
1896
|
}
|
|
1897
|
-
function
|
|
1897
|
+
function sa(e) {
|
|
1898
1898
|
let t = 0, n = e;
|
|
1899
1899
|
for (; n;) t += n.offsetTop, n = n.offsetParent;
|
|
1900
1900
|
return t;
|
|
1901
1901
|
}
|
|
1902
1902
|
//#endregion
|
|
1903
1903
|
//#region src/client/theme-default/components/TdToc.vue?vue&type=script&setup=true&lang.ts
|
|
1904
|
-
var
|
|
1904
|
+
var ca = {
|
|
1905
1905
|
key: 0,
|
|
1906
1906
|
class: "td-toc"
|
|
1907
|
-
},
|
|
1907
|
+
}, la = { class: "td-toc-list" }, ua = ["href", "innerHTML"], da = /*#__PURE__*/ A(/* @__PURE__ */ B({
|
|
1908
1908
|
__name: "TdToc",
|
|
1909
1909
|
props: {
|
|
1910
1910
|
headings: {},
|
|
@@ -1914,8 +1914,8 @@ var fa = {
|
|
|
1914
1914
|
}
|
|
1915
1915
|
},
|
|
1916
1916
|
setup(e) {
|
|
1917
|
-
let t = e.static ? N(() => void 0) :
|
|
1918
|
-
return (n, r) => e.headings.length ? (H(), I("div",
|
|
1917
|
+
let t = e.static ? N(() => void 0) : oa(() => e.headings);
|
|
1918
|
+
return (n, r) => e.headings.length ? (H(), I("div", ca, [r[0] ||= L("div", { class: "td-toc-label" }, " On this page ", -1), L("ul", la, [(H(!0), I(M, null, W(e.headings, (e) => (H(), I("li", {
|
|
1919
1919
|
key: e.slug,
|
|
1920
1920
|
class: V({
|
|
1921
1921
|
"td-toc-indent-1": e.level === 3,
|
|
@@ -1925,24 +1925,24 @@ var fa = {
|
|
|
1925
1925
|
}, [L("a", {
|
|
1926
1926
|
href: e.link,
|
|
1927
1927
|
class: V(["td-toc-link", { "is-active": q(t) === e.slug }]),
|
|
1928
|
-
innerHTML: q(
|
|
1929
|
-
}, null, 10,
|
|
1928
|
+
innerHTML: q(u)(e.titleHtml)
|
|
1929
|
+
}, null, 10, ua)], 2))), 128))])])) : F("", !0);
|
|
1930
1930
|
}
|
|
1931
|
-
}), [["__scopeId", "data-v-91e96e92"]]),
|
|
1931
|
+
}), [["__scopeId", "data-v-91e96e92"]]), fa = { class: "td-rail" }, pa = /*#__PURE__*/ A(/* @__PURE__ */ B({
|
|
1932
1932
|
__name: "TdRail",
|
|
1933
1933
|
setup(e) {
|
|
1934
|
-
let { page: t } =
|
|
1935
|
-
return (e, n) => (H(), I("aside",
|
|
1934
|
+
let { page: t } = fe();
|
|
1935
|
+
return (e, n) => (H(), I("aside", fa, [z(q(Bi), {
|
|
1936
1936
|
mode: "rail",
|
|
1937
1937
|
schema: q(t).schema,
|
|
1938
1938
|
frontmatter: q(t).frontmatter
|
|
1939
|
-
}, null, 8, ["schema", "frontmatter"]), z(
|
|
1939
|
+
}, null, 8, ["schema", "frontmatter"]), z(da, { headings: q(t).headings }, null, 8, ["headings"])]));
|
|
1940
1940
|
}
|
|
1941
|
-
}), [["__scopeId", "data-v-22485c1b"]]),
|
|
1941
|
+
}), [["__scopeId", "data-v-22485c1b"]]), ma = {
|
|
1942
1942
|
class: "td-skeleton",
|
|
1943
1943
|
role: "status",
|
|
1944
1944
|
"aria-label": "Loading"
|
|
1945
|
-
},
|
|
1945
|
+
}, ha = /*#__PURE__*/ A(/* @__PURE__ */ B({
|
|
1946
1946
|
__name: "TdSkeleton",
|
|
1947
1947
|
props: { lines: { default: 5 } },
|
|
1948
1948
|
setup(e) {
|
|
@@ -1956,28 +1956,28 @@ var fa = {
|
|
|
1956
1956
|
55,
|
|
1957
1957
|
72
|
|
1958
1958
|
];
|
|
1959
|
-
return (n, r) => (H(), I("div",
|
|
1959
|
+
return (n, r) => (H(), I("div", ma, [(H(!0), I(M, null, W(e.lines, (e) => (H(), I("div", {
|
|
1960
1960
|
key: e,
|
|
1961
1961
|
class: "td-skeleton-line",
|
|
1962
|
-
style:
|
|
1962
|
+
style: ze({ width: `${t[(e - 1) % t.length]}%` })
|
|
1963
1963
|
}, null, 4))), 128))]));
|
|
1964
1964
|
}
|
|
1965
1965
|
}), [["__scopeId", "data-v-312f021d"]]), $ = /* @__PURE__ */ function(e) {
|
|
1966
1966
|
return e.ArrowDown = "ArrowDown", e.ArrowUp = "ArrowUp", e.ArrowLeft = "ArrowLeft", e.ArrowRight = "ArrowRight", e.Enter = "Enter", e.Tab = "Tab", e.Space = " ", e.Escape = "Escape", e.Shift = "Shift", e.Control = "Control", e.Alt = "Alt", e.Meta = "Meta", e.Delete = "Delete", e.Backspace = "Backspace", e.F1 = "F1", e.F2 = "F2", e.F3 = "F3", e.F4 = "F4", e.F5 = "F5", e.F6 = "F6", e.F7 = "F7", e.F8 = "F8", e.F9 = "F9", e.F10 = "F10", e.F11 = "F11", e.F12 = "F12", e.a = "a", e.b = "b", e.c = "c", e.d = "d", e.e = "e", e.f = "f", e.g = "g", e.h = "h", e.i = "i", e.j = "j", e.k = "k", e.l = "l", e.m = "m", e.n = "n", e.o = "o", e.p = "p", e.q = "q", e.r = "r", e.s = "s", e.t = "t", e.u = "u", e.v = "v", e.w = "w", e.x = "x", e.y = "y", e.z = "z", e.FSlash = "/", e.Question = "?", e;
|
|
1967
|
-
}({}),
|
|
1967
|
+
}({}), ga = { class: "td-kbd-shortcut" }, _a = /*#__PURE__*/ A(/* @__PURE__ */ B({
|
|
1968
1968
|
__name: "TdKbdShortcut",
|
|
1969
1969
|
props: { keys: {} },
|
|
1970
1970
|
setup(e) {
|
|
1971
1971
|
let t = {
|
|
1972
|
-
[$.ArrowDown]:
|
|
1973
|
-
[$.ArrowUp]:
|
|
1974
|
-
[$.ArrowLeft]:
|
|
1975
|
-
[$.ArrowRight]:
|
|
1976
|
-
[$.Meta]:
|
|
1977
|
-
[$.Alt]:
|
|
1978
|
-
[$.Enter]:
|
|
1979
|
-
[$.Delete]:
|
|
1980
|
-
[$.Space]:
|
|
1972
|
+
[$.ArrowDown]: ie,
|
|
1973
|
+
[$.ArrowUp]: ve,
|
|
1974
|
+
[$.ArrowLeft]: ce,
|
|
1975
|
+
[$.ArrowRight]: oe,
|
|
1976
|
+
[$.Meta]: at,
|
|
1977
|
+
[$.Alt]: ut,
|
|
1978
|
+
[$.Enter]: ot,
|
|
1979
|
+
[$.Delete]: st,
|
|
1980
|
+
[$.Space]: dt
|
|
1981
1981
|
}, n = {
|
|
1982
1982
|
[$.Control]: "⌃",
|
|
1983
1983
|
[$.Shift]: "⇧",
|
|
@@ -1990,73 +1990,40 @@ var fa = {
|
|
|
1990
1990
|
let i = n[e];
|
|
1991
1991
|
return i ? { label: i } : { label: e.toUpperCase() };
|
|
1992
1992
|
}));
|
|
1993
|
-
return (e, t) => (H(), I("span",
|
|
1993
|
+
return (e, t) => (H(), I("span", ga, [(H(!0), I(M, null, W(r.value, (e, t) => (H(), I("kbd", { key: t }, [e.icon ? (H(), P(G(e.icon), {
|
|
1994
1994
|
key: 0,
|
|
1995
1995
|
size: 12
|
|
1996
1996
|
})) : (H(), I(M, { key: 1 }, [R(K(e.label), 1)], 64))]))), 128))]));
|
|
1997
1997
|
}
|
|
1998
|
-
}), [["__scopeId", "data-v-b61b97da"]]),
|
|
1999
|
-
function
|
|
2000
|
-
let e =
|
|
1998
|
+
}), [["__scopeId", "data-v-b61b97da"]]), va = 120;
|
|
1999
|
+
function ya() {
|
|
2000
|
+
let e = be(), t, r = Je([]), i = Je(!1);
|
|
2001
2001
|
J(e, () => {
|
|
2002
|
-
|
|
2002
|
+
t = void 0;
|
|
2003
2003
|
});
|
|
2004
|
-
function
|
|
2005
|
-
if (
|
|
2006
|
-
if (e.value) return
|
|
2007
|
-
fields:
|
|
2008
|
-
storeFields:
|
|
2009
|
-
})),
|
|
2010
|
-
}
|
|
2011
|
-
function u(e) {
|
|
2012
|
-
let t = /* @__PURE__ */ new Map(), n = Le(e), r = document.createElement("div");
|
|
2013
|
-
n.config.warnHandler = () => {};
|
|
2014
|
-
try {
|
|
2015
|
-
n.mount(r);
|
|
2016
|
-
let e = r.querySelectorAll("h1, h2, h3, h4, h5, h6");
|
|
2017
|
-
for (let n of e) {
|
|
2018
|
-
let e = n.querySelector("a")?.getAttribute("href")?.slice(1) ?? "", r = "", i = n.nextElementSibling;
|
|
2019
|
-
for (; i && !Ca.test(i.tagName);) r += i.outerHTML, i = i.nextElementSibling;
|
|
2020
|
-
t.set(e, v(r));
|
|
2021
|
-
}
|
|
2022
|
-
t.size === 0 ? t.set("", v(r.innerHTML)) : t.set("", [...t.values()].join(" "));
|
|
2023
|
-
} finally {
|
|
2024
|
-
n.unmount();
|
|
2025
|
-
}
|
|
2026
|
-
return t;
|
|
2027
|
-
}
|
|
2028
|
-
async function d(e) {
|
|
2029
|
-
if (!t) return "";
|
|
2030
|
-
let n = _(e), r = ee(e), i = c.get(n);
|
|
2031
|
-
if (!i) try {
|
|
2032
|
-
let e = (await t(n))?.default;
|
|
2033
|
-
if (!e) return "";
|
|
2034
|
-
if (i = u(e), wa <= c.size) {
|
|
2035
|
-
let e = c.keys().next().value;
|
|
2036
|
-
e !== void 0 && c.delete(e);
|
|
2037
|
-
}
|
|
2038
|
-
c.set(n, i);
|
|
2039
|
-
} catch {
|
|
2040
|
-
return "";
|
|
2041
|
-
}
|
|
2042
|
-
return i.get(r) ?? i.get("") ?? "";
|
|
2004
|
+
function a() {
|
|
2005
|
+
if (t) return t;
|
|
2006
|
+
if (e.value) return t = Fe(ee.loadJSON(e.value, {
|
|
2007
|
+
fields: n,
|
|
2008
|
+
storeFields: y
|
|
2009
|
+
})), t;
|
|
2043
2010
|
}
|
|
2044
|
-
function
|
|
2011
|
+
function o(e, t) {
|
|
2045
2012
|
if (!e) return "";
|
|
2046
2013
|
let n = Object.keys(t);
|
|
2047
|
-
if (n.length === 0) return e.slice(0,
|
|
2014
|
+
if (n.length === 0) return e.slice(0, va);
|
|
2048
2015
|
let r = e.toLowerCase(), i = e.length;
|
|
2049
2016
|
for (let e of n) {
|
|
2050
2017
|
let t = r.indexOf(e.toLowerCase());
|
|
2051
2018
|
t !== -1 && t < i && (i = t);
|
|
2052
2019
|
}
|
|
2053
|
-
let a = Math.max(0, i - 30), o = Math.min(e.length, a +
|
|
2020
|
+
let a = Math.max(0, i - 30), o = Math.min(e.length, a + va), s = e.slice(a, o).trim();
|
|
2054
2021
|
return 0 < a && (s = "..." + s), o < e.length && (s += "..."), s;
|
|
2055
2022
|
}
|
|
2056
|
-
async function
|
|
2057
|
-
let t =
|
|
2023
|
+
async function s(e) {
|
|
2024
|
+
let t = a();
|
|
2058
2025
|
if (!t) {
|
|
2059
|
-
|
|
2026
|
+
i.value = !1;
|
|
2060
2027
|
return;
|
|
2061
2028
|
}
|
|
2062
2029
|
let n = t.search(e, {
|
|
@@ -2067,63 +2034,59 @@ function Ta() {
|
|
|
2067
2034
|
text: 2
|
|
2068
2035
|
}
|
|
2069
2036
|
}).slice(0, 20);
|
|
2070
|
-
|
|
2037
|
+
r.value = n.map((e) => ({
|
|
2071
2038
|
id: e.id,
|
|
2072
2039
|
title: e.title,
|
|
2073
|
-
excerpt: "",
|
|
2040
|
+
excerpt: o(e.text ?? "", e.match),
|
|
2074
2041
|
score: e.score
|
|
2075
|
-
})),
|
|
2076
|
-
for (let [e, t] of n.entries()) {
|
|
2077
|
-
if (a) return;
|
|
2078
|
-
let n = f(await d(t.id), t.match);
|
|
2079
|
-
if (a) return;
|
|
2080
|
-
o.value[e].excerpt = n, et(o);
|
|
2081
|
-
}
|
|
2042
|
+
})), i.value = !1;
|
|
2082
2043
|
}
|
|
2083
|
-
let
|
|
2084
|
-
function
|
|
2085
|
-
a = !1;
|
|
2044
|
+
let c = f(s, 150);
|
|
2045
|
+
function l(e) {
|
|
2086
2046
|
let t = e.trim();
|
|
2087
|
-
if (
|
|
2088
|
-
|
|
2047
|
+
if (t.length === 0) {
|
|
2048
|
+
r.value = [], i.value = !1;
|
|
2089
2049
|
return;
|
|
2090
2050
|
}
|
|
2091
|
-
|
|
2092
|
-
}
|
|
2093
|
-
function
|
|
2094
|
-
|
|
2095
|
-
}
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2051
|
+
i.value = !0, c(t);
|
|
2052
|
+
}
|
|
2053
|
+
function u() {
|
|
2054
|
+
i.value = !1;
|
|
2055
|
+
}
|
|
2056
|
+
let d = Je(!1);
|
|
2057
|
+
return J(e, (e) => {
|
|
2058
|
+
e && (d.value = !0);
|
|
2059
|
+
}, { immediate: !0 }), {
|
|
2060
|
+
results: r,
|
|
2061
|
+
searching: i,
|
|
2062
|
+
indexLoaded: d,
|
|
2063
|
+
search: l,
|
|
2064
|
+
cancel: u
|
|
2102
2065
|
};
|
|
2103
2066
|
}
|
|
2104
2067
|
//#endregion
|
|
2105
2068
|
//#region src/client/theme-default/components/TdSiteSearch/highlight.ts
|
|
2106
|
-
function
|
|
2107
|
-
if (!e || !t) return
|
|
2108
|
-
let n = t.trim().split(/\s+/).filter(Boolean), r =
|
|
2069
|
+
function ba(e, t) {
|
|
2070
|
+
if (!e || !t) return x(e);
|
|
2071
|
+
let n = t.trim().split(/\s+/).filter(Boolean), r = x(e);
|
|
2109
2072
|
for (let e of n) {
|
|
2110
|
-
let t = RegExp(`(${
|
|
2073
|
+
let t = RegExp(`(${v(e)})`, "gi");
|
|
2111
2074
|
r = r.replace(t, "<mark>$1</mark>");
|
|
2112
2075
|
}
|
|
2113
2076
|
return r;
|
|
2114
2077
|
}
|
|
2115
2078
|
//#endregion
|
|
2116
2079
|
//#region src/client/theme-default/components/TdSiteSearch/TdSiteSearch.vue?vue&type=script&setup=true&lang.ts
|
|
2117
|
-
var
|
|
2080
|
+
var xa = { class: "td-search" }, Sa = { class: "td-search-input-wrap" }, Ca = {
|
|
2118
2081
|
key: 2,
|
|
2119
2082
|
class: "td-search-count"
|
|
2120
|
-
},
|
|
2083
|
+
}, wa = {
|
|
2121
2084
|
key: 0,
|
|
2122
2085
|
class: "td-search-results"
|
|
2123
|
-
},
|
|
2086
|
+
}, Ta = ["href"], Ea = ["innerHTML"], Da = { class: "td-search-result-path" }, Oa = ["innerHTML"], ka = {
|
|
2124
2087
|
key: 1,
|
|
2125
2088
|
class: "td-search-empty"
|
|
2126
|
-
},
|
|
2089
|
+
}, Aa = /*#__PURE__*/ A(/* @__PURE__ */ B({
|
|
2127
2090
|
__name: "TdSiteSearch",
|
|
2128
2091
|
props: {
|
|
2129
2092
|
active: {
|
|
@@ -2134,33 +2097,33 @@ var Da = { class: "td-search" }, Oa = { class: "td-search-input-wrap" }, ka = {
|
|
|
2134
2097
|
query: { default: "" },
|
|
2135
2098
|
queryModifiers: {}
|
|
2136
2099
|
},
|
|
2137
|
-
emits: /*@__PURE__*/
|
|
2138
|
-
setup(
|
|
2139
|
-
let
|
|
2140
|
-
let
|
|
2141
|
-
for (let
|
|
2142
|
-
let
|
|
2143
|
-
if (!
|
|
2144
|
-
let
|
|
2145
|
-
|
|
2146
|
-
pageUrl:
|
|
2147
|
-
pageTitle:
|
|
2100
|
+
emits: /*@__PURE__*/ Ie(["select"], ["update:active", "update:query"]),
|
|
2101
|
+
setup(e, { expose: t, emit: n }) {
|
|
2102
|
+
let r = Xe(e, "active"), i = Xe(e, "query"), a = n, o = O(), { withBase: s } = j(), { results: l, searching: u, indexLoaded: d, search: f, cancel: p } = ya(), m = U(-1), h = N(() => 0 < i.value.trim().length), _ = N(() => {
|
|
2103
|
+
let e = [], t = /* @__PURE__ */ new Map();
|
|
2104
|
+
for (let n of l.value) {
|
|
2105
|
+
let r = g(n.id), i = t.get(r);
|
|
2106
|
+
if (!i) {
|
|
2107
|
+
let n = r.split("/").pop() || "index";
|
|
2108
|
+
i = {
|
|
2109
|
+
pageUrl: r,
|
|
2110
|
+
pageTitle: c(n),
|
|
2148
2111
|
results: []
|
|
2149
|
-
},
|
|
2112
|
+
}, t.set(r, i), e.push(i);
|
|
2150
2113
|
}
|
|
2151
|
-
|
|
2114
|
+
i.results.push(n);
|
|
2152
2115
|
}
|
|
2153
|
-
return
|
|
2116
|
+
return e;
|
|
2154
2117
|
});
|
|
2155
2118
|
J(h, (e) => {
|
|
2156
|
-
|
|
2157
|
-
}), J(
|
|
2119
|
+
r.value = e;
|
|
2120
|
+
}), J(i, (e, t, n) => {
|
|
2158
2121
|
n(() => p()), m.value = 0, f(e);
|
|
2159
2122
|
});
|
|
2160
2123
|
function v() {
|
|
2161
|
-
|
|
2124
|
+
i.value = "";
|
|
2162
2125
|
}
|
|
2163
|
-
let y = N(() =>
|
|
2126
|
+
let y = N(() => _.value.flatMap((e) => e.results)), b = N(() => {
|
|
2164
2127
|
let e = /* @__PURE__ */ new Map();
|
|
2165
2128
|
for (let t = 0; t < y.value.length; t++) e.set(y.value[t].id, t);
|
|
2166
2129
|
return e;
|
|
@@ -2174,20 +2137,20 @@ var Da = { class: "td-search" }, Oa = { class: "td-search-input-wrap" }, ka = {
|
|
|
2174
2137
|
e.preventDefault();
|
|
2175
2138
|
let t = y.value[m.value];
|
|
2176
2139
|
if (!t) return;
|
|
2177
|
-
document.querySelector(`.td-search-result[href="${CSS.escape(
|
|
2140
|
+
document.querySelector(`.td-search-result[href="${CSS.escape(s(t.id))}"]`)?.click();
|
|
2178
2141
|
}
|
|
2179
2142
|
}
|
|
2180
2143
|
}
|
|
2181
2144
|
function S() {
|
|
2182
|
-
|
|
2145
|
+
a("select");
|
|
2183
2146
|
}
|
|
2184
2147
|
function C() {
|
|
2185
2148
|
requestAnimationFrame(() => {
|
|
2186
2149
|
document.querySelector(".td-search-result.is-selected")?.scrollIntoView({ block: "nearest" });
|
|
2187
2150
|
});
|
|
2188
2151
|
}
|
|
2189
|
-
let w =
|
|
2190
|
-
return
|
|
2152
|
+
let w = Ze("searchInput");
|
|
2153
|
+
return t({
|
|
2191
2154
|
focus() {
|
|
2192
2155
|
w.value?.focus();
|
|
2193
2156
|
},
|
|
@@ -2200,74 +2163,78 @@ var Da = { class: "td-search" }, Oa = { class: "td-search-input-wrap" }, ka = {
|
|
|
2200
2163
|
get isFocused() {
|
|
2201
2164
|
return document.activeElement === w.value;
|
|
2202
2165
|
}
|
|
2203
|
-
}), (e, t) => (H(), I("div",
|
|
2204
|
-
L("div",
|
|
2205
|
-
z(q(
|
|
2166
|
+
}), (e, t) => (H(), I("div", xa, [
|
|
2167
|
+
L("div", Sa, [
|
|
2168
|
+
z(q(Oe), {
|
|
2206
2169
|
size: 14,
|
|
2207
2170
|
class: "td-search-icon"
|
|
2208
2171
|
}),
|
|
2209
|
-
|
|
2172
|
+
tt(L("input", {
|
|
2210
2173
|
ref_key: "searchInput",
|
|
2211
2174
|
ref: w,
|
|
2212
|
-
"onUpdate:modelValue": t[0] ||= (e) =>
|
|
2175
|
+
"onUpdate:modelValue": t[0] ||= (e) => i.value = e,
|
|
2213
2176
|
class: "td-search-input",
|
|
2214
2177
|
type: "text",
|
|
2215
2178
|
size: "1",
|
|
2216
2179
|
placeholder: "Search...",
|
|
2217
2180
|
onKeydown: x
|
|
2218
|
-
}, null, 544), [[
|
|
2219
|
-
!h.value && !q(u) ? (H(), P(
|
|
2181
|
+
}, null, 544), [[Qe, i.value]]),
|
|
2182
|
+
!h.value && !q(u) ? (H(), P(_a, {
|
|
2220
2183
|
key: 0,
|
|
2221
2184
|
keys: [q($).Meta, q($).k],
|
|
2222
2185
|
class: "td-search-kbd"
|
|
2223
2186
|
}, null, 8, ["keys"])) : F("", !0),
|
|
2224
|
-
q(u) || !q(d) ? (H(), P(q(
|
|
2187
|
+
q(u) || !q(d) ? (H(), P(q(lt), {
|
|
2225
2188
|
key: 1,
|
|
2226
2189
|
size: 12,
|
|
2227
2190
|
class: "td-search-spinner"
|
|
2228
|
-
})) : h.value ? (H(), I("span",
|
|
2229
|
-
|
|
2191
|
+
})) : h.value ? (H(), I("span", Ca, K(q(l).length), 1)) : F("", !0),
|
|
2192
|
+
i.value ? (H(), I("button", {
|
|
2230
2193
|
key: 3,
|
|
2231
2194
|
class: "td-search-clear",
|
|
2232
2195
|
type: "button",
|
|
2233
2196
|
"aria-label": "Clear search",
|
|
2234
2197
|
onClick: v
|
|
2235
|
-
}, [z(q(
|
|
2198
|
+
}, [z(q(ge), { size: 12 })])) : F("", !0)
|
|
2236
2199
|
]),
|
|
2237
|
-
h.value && q(l).length > 0 ? (H(), I("div",
|
|
2200
|
+
h.value && q(l).length > 0 ? (H(), I("div", wa, [(H(!0), I(M, null, W(_.value, (e) => (H(), I("div", {
|
|
2238
2201
|
key: e.pageUrl,
|
|
2239
2202
|
class: "td-search-group"
|
|
2240
|
-
}, [
|
|
2203
|
+
}, [(H(!0), I(M, null, W(e.results, (e) => (H(), I("a", {
|
|
2241
2204
|
key: e.id,
|
|
2242
|
-
href: q(
|
|
2205
|
+
href: q(s)(e.id),
|
|
2243
2206
|
class: V(["td-search-result", {
|
|
2244
2207
|
"is-selected": b.value.get(e.id) === m.value,
|
|
2245
|
-
"is-current": q(
|
|
2208
|
+
"is-current": q(s)(e.id) === q(o).path
|
|
2246
2209
|
}]),
|
|
2247
2210
|
onClick: S
|
|
2248
|
-
}, [
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2211
|
+
}, [
|
|
2212
|
+
L("span", {
|
|
2213
|
+
class: "td-search-result-title",
|
|
2214
|
+
innerHTML: q(ba)(e.title, i.value)
|
|
2215
|
+
}, null, 8, Ea),
|
|
2216
|
+
L("span", Da, K(e.id), 1),
|
|
2217
|
+
e.excerpt ? (H(), I("span", {
|
|
2218
|
+
key: 0,
|
|
2219
|
+
class: "td-search-result-excerpt",
|
|
2220
|
+
innerHTML: q(ba)(e.excerpt, i.value)
|
|
2221
|
+
}, null, 8, Oa)) : F("", !0)
|
|
2222
|
+
], 10, Ta))), 128))]))), 128))])) : F("", !0),
|
|
2223
|
+
h.value && q(l).length === 0 ? (H(), I("div", ka, " No results for \"" + K(i.value) + "\" ", 1)) : F("", !0)
|
|
2257
2224
|
]));
|
|
2258
2225
|
}
|
|
2259
|
-
}), [["__scopeId", "data-v-
|
|
2226
|
+
}), [["__scopeId", "data-v-06d05932"]]), ja = /* @__PURE__ */ B({
|
|
2260
2227
|
__name: "TdThemeToggle",
|
|
2261
2228
|
setup(e) {
|
|
2262
|
-
let { isDark: t, toggle: n } =
|
|
2263
|
-
return (e, r) => (H(), P(
|
|
2229
|
+
let { isDark: t, toggle: n } = xe();
|
|
2230
|
+
return (e, r) => (H(), P(xt, {
|
|
2264
2231
|
label: q(t) ? "Switch to light mode" : "Switch to dark mode",
|
|
2265
2232
|
onClick: q(n)
|
|
2266
2233
|
}, {
|
|
2267
|
-
default:
|
|
2234
|
+
default: et(() => [q(t) ? (H(), P(q(de), {
|
|
2268
2235
|
key: 0,
|
|
2269
2236
|
size: 18
|
|
2270
|
-
})) : (H(), P(q(
|
|
2237
|
+
})) : (H(), P(q(pe), {
|
|
2271
2238
|
key: 1,
|
|
2272
2239
|
size: 18
|
|
2273
2240
|
}))]),
|
|
@@ -2277,7 +2244,7 @@ var Da = { class: "td-search" }, Oa = { class: "td-search-input-wrap" }, ka = {
|
|
|
2277
2244
|
});
|
|
2278
2245
|
//#endregion
|
|
2279
2246
|
//#region src/client/theme-default/composables/useCopyCode.ts
|
|
2280
|
-
function
|
|
2247
|
+
function Ma() {
|
|
2281
2248
|
function e(e) {
|
|
2282
2249
|
let t = e.target?.closest(".copy");
|
|
2283
2250
|
if (!t) return;
|
|
@@ -2289,27 +2256,27 @@ function Ra() {
|
|
|
2289
2256
|
t.classList.remove("copied"), t.setAttribute("title", i);
|
|
2290
2257
|
}, 2e3);
|
|
2291
2258
|
}
|
|
2292
|
-
|
|
2259
|
+
Ve(() => {
|
|
2293
2260
|
document.addEventListener("click", e);
|
|
2294
|
-
}),
|
|
2261
|
+
}), Ue(() => {
|
|
2295
2262
|
document.removeEventListener("click", e);
|
|
2296
2263
|
});
|
|
2297
2264
|
}
|
|
2298
2265
|
//#endregion
|
|
2299
2266
|
//#region src/client/theme-default/composables/useHotkey.ts
|
|
2300
|
-
var
|
|
2267
|
+
var Na = /* @__PURE__ */ new Map([
|
|
2301
2268
|
[$.Control, "ctrlKey"],
|
|
2302
2269
|
[$.Alt, "altKey"],
|
|
2303
2270
|
[$.Shift, "shiftKey"],
|
|
2304
2271
|
[$.Meta, "metaKey"]
|
|
2305
2272
|
]);
|
|
2306
|
-
function
|
|
2273
|
+
function Pa(e, t) {
|
|
2307
2274
|
function n(n) {
|
|
2308
|
-
n.defaultPrevented ||
|
|
2275
|
+
n.defaultPrevented || Ia(n, e) && (n.preventDefault(), t(n));
|
|
2309
2276
|
}
|
|
2310
|
-
|
|
2277
|
+
Ve(() => window.addEventListener("keydown", n)), Ue(() => window.removeEventListener("keydown", n));
|
|
2311
2278
|
}
|
|
2312
|
-
function
|
|
2279
|
+
function Fa(e) {
|
|
2313
2280
|
let t = [];
|
|
2314
2281
|
function n(e, n) {
|
|
2315
2282
|
t.push({
|
|
@@ -2318,30 +2285,30 @@ function Va(e) {
|
|
|
2318
2285
|
});
|
|
2319
2286
|
}
|
|
2320
2287
|
function r(e) {
|
|
2321
|
-
for (let n of t) if (
|
|
2288
|
+
for (let n of t) if (Ia(e, n.keys)) {
|
|
2322
2289
|
e.preventDefault(), e.stopPropagation(), n.handler(e);
|
|
2323
2290
|
return;
|
|
2324
2291
|
}
|
|
2325
2292
|
}
|
|
2326
2293
|
return J(e, (e, t) => {
|
|
2327
2294
|
t?.removeEventListener("keydown", r), e?.addEventListener("keydown", r);
|
|
2328
|
-
}, { immediate: !0 }),
|
|
2295
|
+
}, { immediate: !0 }), Ue(() => {
|
|
2329
2296
|
e.value?.removeEventListener("keydown", r);
|
|
2330
2297
|
}), { register: n };
|
|
2331
2298
|
}
|
|
2332
|
-
function
|
|
2333
|
-
let n = t.filter((e) =>
|
|
2299
|
+
function Ia(e, t) {
|
|
2300
|
+
let n = t.filter((e) => Na.has(e)), r = t.filter((e) => !Na.has(e));
|
|
2334
2301
|
if (r.length !== 1 || e.key.toLowerCase() !== r[0].toLowerCase()) return !1;
|
|
2335
|
-
for (let t of n) if (!e[
|
|
2302
|
+
for (let t of n) if (!e[Na.get(t)]) return !1;
|
|
2336
2303
|
return !(e.ctrlKey && !n.includes($.Control) || e.altKey && !n.includes($.Alt) || e.shiftKey && !n.includes($.Shift) || e.metaKey && !n.includes($.Meta));
|
|
2337
2304
|
}
|
|
2338
2305
|
//#endregion
|
|
2339
2306
|
//#region src/client/theme-default/composables/useResizableTable.ts
|
|
2340
|
-
var
|
|
2341
|
-
function
|
|
2307
|
+
var La = 6, Ra = 40;
|
|
2308
|
+
function za() {
|
|
2342
2309
|
let e, t = !1;
|
|
2343
2310
|
function n(e, t) {
|
|
2344
|
-
return e.getBoundingClientRect().right - t <
|
|
2311
|
+
return e.getBoundingClientRect().right - t < La;
|
|
2345
2312
|
}
|
|
2346
2313
|
function r(r) {
|
|
2347
2314
|
if (t) return;
|
|
@@ -2361,34 +2328,34 @@ function Ga() {
|
|
|
2361
2328
|
r.classList.add("is-resizing"), document.body.style.cursor = "col-resize";
|
|
2362
2329
|
function o(e) {
|
|
2363
2330
|
let t = e.clientX - i;
|
|
2364
|
-
r && (r.style.width = `${Math.max(
|
|
2331
|
+
r && (r.style.width = `${Math.max(Ra, a + t)}px`);
|
|
2365
2332
|
}
|
|
2366
2333
|
function s() {
|
|
2367
2334
|
t = !1, r?.classList.remove("is-resizing"), document.body.style.cursor = "", document.removeEventListener("pointermove", o), document.removeEventListener("pointerup", s);
|
|
2368
2335
|
}
|
|
2369
2336
|
document.addEventListener("pointermove", o), document.addEventListener("pointerup", s);
|
|
2370
2337
|
}
|
|
2371
|
-
|
|
2338
|
+
Ve(() => {
|
|
2372
2339
|
document.addEventListener("pointermove", r), document.addEventListener("pointerdown", i);
|
|
2373
|
-
}),
|
|
2340
|
+
}), Ue(() => {
|
|
2374
2341
|
document.removeEventListener("pointermove", r), document.removeEventListener("pointerdown", i);
|
|
2375
2342
|
});
|
|
2376
2343
|
}
|
|
2377
2344
|
//#endregion
|
|
2378
2345
|
//#region src/client/theme-default/composables/useMermaid.ts
|
|
2379
|
-
var
|
|
2380
|
-
function
|
|
2381
|
-
let e
|
|
2346
|
+
var Ba = "https://cdn.jsdelivr.net/npm/mermaid@11/dist/mermaid.esm.min.mjs", Va, Ha = 0;
|
|
2347
|
+
function Ua() {
|
|
2348
|
+
let e;
|
|
2382
2349
|
async function t() {
|
|
2383
2350
|
let e = document.getElementById("td-content");
|
|
2384
2351
|
if (!e) return;
|
|
2385
2352
|
let t = e.querySelectorAll(".td-mermaid-placeholder");
|
|
2386
2353
|
if (t.length === 0) return;
|
|
2387
|
-
let n = await
|
|
2354
|
+
let n = await Wa();
|
|
2388
2355
|
if (n !== void 0) for (let e of t) {
|
|
2389
2356
|
let t = e.querySelector("code");
|
|
2390
2357
|
if (!t) continue;
|
|
2391
|
-
let r = `td-mermaid-${
|
|
2358
|
+
let r = `td-mermaid-${Ha++}`;
|
|
2392
2359
|
try {
|
|
2393
2360
|
let { svg: i } = await n.default.render(r, t.textContent ?? ""), a = document.createElement("div");
|
|
2394
2361
|
a.className = "td-mermaid", a.innerHTML = i, e.replaceWith(a);
|
|
@@ -2397,99 +2364,109 @@ function Ya() {
|
|
|
2397
2364
|
}
|
|
2398
2365
|
}
|
|
2399
2366
|
}
|
|
2400
|
-
|
|
2367
|
+
Ve(() => {
|
|
2368
|
+
t();
|
|
2369
|
+
let n = document.getElementById("td-content");
|
|
2370
|
+
n && (e = new MutationObserver(t), e.observe(n, {
|
|
2371
|
+
childList: !0,
|
|
2372
|
+
subtree: !0
|
|
2373
|
+
}));
|
|
2374
|
+
}), Ue(() => {
|
|
2375
|
+
e?.disconnect();
|
|
2376
|
+
});
|
|
2401
2377
|
}
|
|
2402
|
-
async function
|
|
2403
|
-
if (
|
|
2378
|
+
async function Wa() {
|
|
2379
|
+
if (Va !== void 0) return Va;
|
|
2404
2380
|
try {
|
|
2405
|
-
|
|
2381
|
+
Va = await import(
|
|
2406
2382
|
/* @vite-ignore */
|
|
2407
|
-
|
|
2383
|
+
Ba
|
|
2408
2384
|
);
|
|
2409
2385
|
} catch {
|
|
2410
2386
|
return;
|
|
2411
2387
|
}
|
|
2412
|
-
return
|
|
2388
|
+
return Va.default.initialize({
|
|
2413
2389
|
startOnLoad: !1,
|
|
2414
2390
|
theme: document.documentElement.classList.contains("dark") ? "dark" : "default"
|
|
2415
|
-
}),
|
|
2391
|
+
}), Va;
|
|
2416
2392
|
}
|
|
2417
2393
|
//#endregion
|
|
2418
2394
|
//#region src/client/theme-default/TdLayout.vue?vue&type=script&setup=true&lang.ts
|
|
2419
|
-
var
|
|
2395
|
+
var Ga = { class: "td-header" }, Ka = { class: "td-header-left" }, qa = ["href"], Ja = { class: "td-brand-name" }, Ya = { class: "td-header-right" }, Xa = ["href"], Za = { class: "td-drawer-header" }, Qa = ["href"], $a = { class: "td-brand-name" }, eo = {
|
|
2420
2396
|
key: 0,
|
|
2421
2397
|
class: "pt-4",
|
|
2422
2398
|
"aria-label": "Site navigation"
|
|
2423
|
-
},
|
|
2399
|
+
}, to = { class: "td-page" }, no = { class: "td-sidebar-scroll" }, ro = ["onKeydown"], io = { class: "td-main-and-rail" }, ao = { class: "td-main" }, oo = {
|
|
2424
2400
|
id: "td-content",
|
|
2425
|
-
class: "td-content"
|
|
2426
|
-
|
|
2401
|
+
class: "td-content",
|
|
2402
|
+
"data-testid": "content"
|
|
2403
|
+
}, so = {
|
|
2427
2404
|
key: 0,
|
|
2428
2405
|
class: "td-page-eyebrow"
|
|
2429
|
-
},
|
|
2406
|
+
}, co = {
|
|
2430
2407
|
key: 1,
|
|
2431
2408
|
class: "td-page-icon"
|
|
2432
|
-
},
|
|
2409
|
+
}, lo = ["innerHTML"], uo = {
|
|
2433
2410
|
key: 3,
|
|
2434
2411
|
class: "td-page-meta"
|
|
2435
|
-
},
|
|
2412
|
+
}, fo = { key: 0 }, po = { class: "td-content-body" }, mo = 200, ho = 500, go = 300, _o = "td-sidebar-width", vo = /*#__PURE__*/ A(/* @__PURE__ */ B({
|
|
2436
2413
|
__name: "TdLayout",
|
|
2437
2414
|
setup(e) {
|
|
2438
|
-
let { title: t, page: n } =
|
|
2415
|
+
let { title: t, page: n } = fe(), r = N(() => {
|
|
2439
2416
|
let e = n.value.icon;
|
|
2440
|
-
return e ?
|
|
2441
|
-
}), i =
|
|
2442
|
-
J(() => h.path, () => d()),
|
|
2443
|
-
let g =
|
|
2417
|
+
return e ? k(e.name) : void 0;
|
|
2418
|
+
}), i = j(), { withBase: a } = i, o = _e(), c = N(() => o.value.ready), { isOpen: l, open: u, close: d } = Hi(), f = U(""), p = U(!1), m = U(!1), h = O();
|
|
2419
|
+
J(() => h.path, () => d()), Ma(), Ua();
|
|
2420
|
+
let g = Ze("sidebarSearch"), _ = Ze("menuSearch");
|
|
2444
2421
|
function v() {
|
|
2445
2422
|
if (_.value?.isFocused || g.value?.isFocused) {
|
|
2446
|
-
_.value?.blur(), g.value?.blur(),
|
|
2423
|
+
_.value?.blur(), g.value?.blur(), l.value && d();
|
|
2447
2424
|
return;
|
|
2448
2425
|
}
|
|
2449
|
-
|
|
2426
|
+
l.value ? _.value?.focus() : g.value?.isVisible ? g.value.focus() : (u(), Re(() => _.value?.focus()));
|
|
2450
2427
|
}
|
|
2451
|
-
|
|
2428
|
+
Pa([$.Control, $.k], v), Pa([$.Meta, $.k], v), $e(() => {
|
|
2452
2429
|
if (typeof document > "u") return;
|
|
2453
2430
|
let e = t.value, r = i.title;
|
|
2454
2431
|
document.title = e && e !== r ? `${e} - ${r}` : r;
|
|
2455
2432
|
let a = n.value.frontmatter?.description === void 0 ? i.description ?? "" : String(n.value.frontmatter.description), o = document.querySelector("meta[name=\"description\"]");
|
|
2456
2433
|
o && o.setAttribute("content", a);
|
|
2457
|
-
}),
|
|
2458
|
-
let y = U(typeof localStorage < "u" && Number(localStorage.getItem(
|
|
2459
|
-
function
|
|
2460
|
-
y.value = Math.min(
|
|
2434
|
+
}), za();
|
|
2435
|
+
let y = U(typeof localStorage < "u" && Number(localStorage.getItem(_o)) || go);
|
|
2436
|
+
function x() {
|
|
2437
|
+
y.value = Math.min(ho, y.value + 20);
|
|
2461
2438
|
}
|
|
2462
2439
|
function S(e) {
|
|
2463
2440
|
let t = e.clientX, n = y.value, r = e.currentTarget;
|
|
2464
2441
|
r.setPointerCapture(e.pointerId);
|
|
2465
2442
|
function i(e) {
|
|
2466
|
-
let r = Math.min(
|
|
2443
|
+
let r = Math.min(ho, window.innerWidth * .85), i = Math.min(r, Math.max(mo, n + e.clientX - t));
|
|
2467
2444
|
y.value = i;
|
|
2468
2445
|
}
|
|
2469
2446
|
function a() {
|
|
2470
|
-
document.body.style.cursor = "", r.removeEventListener("pointermove", i), r.removeEventListener("pointerup", a), localStorage.setItem(
|
|
2447
|
+
document.body.style.cursor = "", r.removeEventListener("pointermove", i), r.removeEventListener("pointerup", a), localStorage.setItem(_o, String(y.value));
|
|
2471
2448
|
}
|
|
2472
2449
|
document.body.style.cursor = "col-resize", r.addEventListener("pointermove", i), r.addEventListener("pointerup", a);
|
|
2473
2450
|
}
|
|
2474
2451
|
function C() {
|
|
2475
|
-
y.value = Math.max(
|
|
2452
|
+
y.value = Math.max(mo, y.value - 20);
|
|
2476
2453
|
}
|
|
2477
2454
|
return (e, u) => (H(), I("div", null, [
|
|
2478
2455
|
u[6] ||= L("a", {
|
|
2479
2456
|
href: "#td-content",
|
|
2480
2457
|
class: "td-skip-link"
|
|
2481
2458
|
}, "Skip to content", -1),
|
|
2482
|
-
L("header",
|
|
2483
|
-
L("div",
|
|
2484
|
-
z(
|
|
2459
|
+
L("header", Ga, [
|
|
2460
|
+
L("div", Ka, [
|
|
2461
|
+
z(Ui, { onClick: v }),
|
|
2485
2462
|
L("a", {
|
|
2486
|
-
href: q(a)(q(
|
|
2463
|
+
href: q(a)(q(s)("/")),
|
|
2487
2464
|
class: "td-brand"
|
|
2488
|
-
}, [z(
|
|
2489
|
-
z(
|
|
2465
|
+
}, [z(yt), L("span", Ja, K(q(i).title || "Typedown"), 1)], 8, qa),
|
|
2466
|
+
z(Wr, { class: "td-header-breadcrumb" })
|
|
2490
2467
|
]),
|
|
2491
|
-
z(q(
|
|
2492
|
-
L("div",
|
|
2468
|
+
z(q(qr)),
|
|
2469
|
+
L("div", Ya, [z(ja), q(i).repo ? (H(), I("a", {
|
|
2493
2470
|
key: 0,
|
|
2494
2471
|
href: q(i).repo,
|
|
2495
2472
|
target: "_blank",
|
|
@@ -2507,32 +2484,32 @@ var Za = { class: "td-header" }, Qa = { class: "td-header-left" }, $a = ["href"]
|
|
|
2507
2484
|
"fill-rule": "evenodd",
|
|
2508
2485
|
"clip-rule": "evenodd",
|
|
2509
2486
|
d: "M48.854 0C21.839 0 0 22 0 49.217c0 21.756 13.993 40.172 33.405 46.69 2.427.49 3.316-1.059 3.316-2.362 0-1.141-.08-5.052-.08-9.127-13.59\n 2.934-16.42-5.867-16.42-5.867-2.184-5.704-5.42-7.17-5.42-7.17-4.448-3.015.324-3.015.324-3.015 4.934.326 7.523 5.052 7.523 5.052 4.367\n 7.496 11.404 5.378 14.235 4.074.404-3.178 1.699-5.378 3.074-6.6-10.839-1.141-22.243-5.378-22.243-24.283 0-5.378 1.94-9.778\n 5.014-13.2-.485-1.222-2.184-6.275.486-13.038 0 0 4.125-1.304 13.426 5.052a46.97 46.97 0 0 1 12.214-1.63c4.125\n 0 8.33.571 12.213 1.63 9.302-6.356 13.427-5.052 13.427-5.052 2.67 6.763.97 11.816.485 13.038 3.155 3.422 5.015 7.822 5.015 13.2\n 0 18.905-11.404 23.06-22.324 24.283 1.78 1.548 3.316 4.481 3.316 9.126 0 6.6-.08 11.897-.08 13.526 0 1.304.89 2.853 3.316 2.364\n 19.412-6.52 33.405-24.935 33.405-46.691C97.707 22 75.788 0 48.854 0z"
|
|
2510
|
-
})], -1)]], 8,
|
|
2487
|
+
})], -1)]], 8, Xa)) : F("", !0)])
|
|
2511
2488
|
]),
|
|
2512
2489
|
L("div", {
|
|
2513
|
-
class: V(["td-drawer-scrim", { "is-open": q(
|
|
2490
|
+
class: V(["td-drawer-scrim", { "is-open": q(l) }]),
|
|
2514
2491
|
onClick: u[0] ||= (...e) => q(d) && q(d)(...e)
|
|
2515
2492
|
}, null, 2),
|
|
2516
2493
|
L("aside", {
|
|
2517
|
-
class: V(["td-drawer", { "is-open": q(
|
|
2518
|
-
style:
|
|
2494
|
+
class: V(["td-drawer", { "is-open": q(l) }]),
|
|
2495
|
+
style: ze({ width: `${y.value}px` })
|
|
2519
2496
|
}, [
|
|
2520
2497
|
L("div", {
|
|
2521
2498
|
class: "td-resize-handle",
|
|
2522
|
-
onPointerdown:
|
|
2499
|
+
onPointerdown: rt(S, ["prevent"])
|
|
2523
2500
|
}, null, 32),
|
|
2524
|
-
L("header",
|
|
2525
|
-
href: q(a)(q(
|
|
2501
|
+
L("header", Za, [L("a", {
|
|
2502
|
+
href: q(a)(q(s)("/")),
|
|
2526
2503
|
class: "td-brand"
|
|
2527
|
-
}, [z(
|
|
2504
|
+
}, [z(yt), L("span", $a, K(q(i).title || "Typedown"), 1)], 8, Qa), z(xt, {
|
|
2528
2505
|
label: "Close menu",
|
|
2529
2506
|
onClick: q(d)
|
|
2530
2507
|
}, {
|
|
2531
|
-
default:
|
|
2508
|
+
default: et(() => [z(q(ge), { size: 20 })]),
|
|
2532
2509
|
_: 1
|
|
2533
2510
|
}, 8, ["onClick"])]),
|
|
2534
|
-
z(q(
|
|
2535
|
-
z(
|
|
2511
|
+
z(q(Xr)),
|
|
2512
|
+
z(Aa, {
|
|
2536
2513
|
ref_key: "menuSearch",
|
|
2537
2514
|
ref: _,
|
|
2538
2515
|
query: f.value,
|
|
@@ -2545,76 +2522,82 @@ var Za = { class: "td-header" }, Qa = { class: "td-header-left" }, $a = ["href"]
|
|
|
2545
2522
|
"active",
|
|
2546
2523
|
"onSelect"
|
|
2547
2524
|
]),
|
|
2548
|
-
m.value ? F("", !0) : (H(), I("nav",
|
|
2525
|
+
m.value ? F("", !0) : (H(), I("nav", eo, [c.value ? (H(), P(kr, {
|
|
2549
2526
|
key: 1,
|
|
2550
2527
|
tree: q(o).contentTree
|
|
2551
|
-
}, null, 8, ["tree"])) : (H(), P(
|
|
2528
|
+
}, null, 8, ["tree"])) : (H(), P(ha, { key: 0 }))]))
|
|
2552
2529
|
], 6),
|
|
2553
|
-
L("div",
|
|
2530
|
+
L("div", to, [L("nav", {
|
|
2554
2531
|
class: "td-sidebar-left",
|
|
2532
|
+
"data-testid": "sidebar",
|
|
2555
2533
|
"aria-label": "Site navigation",
|
|
2556
|
-
style:
|
|
2557
|
-
}, [
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
"
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2534
|
+
style: ze({ width: `${y.value}px` })
|
|
2535
|
+
}, [
|
|
2536
|
+
z(Aa, {
|
|
2537
|
+
ref_key: "sidebarSearch",
|
|
2538
|
+
ref: g,
|
|
2539
|
+
query: f.value,
|
|
2540
|
+
"onUpdate:query": u[3] ||= (e) => f.value = e,
|
|
2541
|
+
active: p.value,
|
|
2542
|
+
"onUpdate:active": u[4] ||= (e) => p.value = e,
|
|
2543
|
+
class: "td-sidebar-search"
|
|
2544
|
+
}, null, 8, ["query", "active"]),
|
|
2545
|
+
L("div", no, [!p.value && !c.value ? (H(), P(ha, { key: 0 })) : p.value ? F("", !0) : (H(), P(kr, {
|
|
2546
|
+
key: 1,
|
|
2547
|
+
tree: q(o).contentTree
|
|
2548
|
+
}, null, 8, ["tree"]))]),
|
|
2549
|
+
L("div", {
|
|
2550
|
+
class: "td-resize-handle",
|
|
2551
|
+
role: "separator",
|
|
2552
|
+
"aria-orientation": "vertical",
|
|
2553
|
+
"aria-label": "Resize sidebar",
|
|
2554
|
+
tabindex: "0",
|
|
2555
|
+
onPointerdown: rt(S, ["prevent"]),
|
|
2556
|
+
onKeydown: [nt(rt(C, ["prevent"]), ["left"]), nt(rt(x, ["prevent"]), ["right"])]
|
|
2557
|
+
}, null, 40, ro)
|
|
2558
|
+
], 4), L("div", io, [L("main", ao, [L("article", oo, [
|
|
2559
|
+
q(n).schema ? (H(), I("div", so, K(q(n).schemaLabel ?? q(n).schema), 1)) : F("", !0),
|
|
2560
|
+
r.value ? (H(), I("div", co, [(H(), P(G(r.value), { size: 32 }))])) : F("", !0),
|
|
2578
2561
|
q(t) ? (H(), I("h1", {
|
|
2579
2562
|
key: 2,
|
|
2580
2563
|
class: "td-page-title",
|
|
2581
|
-
innerHTML: q(
|
|
2582
|
-
}, null, 8,
|
|
2583
|
-
q(n).metadata ? (H(), I("div",
|
|
2584
|
-
z(q(
|
|
2564
|
+
innerHTML: q(Ct)(q(t))
|
|
2565
|
+
}, null, 8, lo)) : F("", !0),
|
|
2566
|
+
q(n).metadata ? (H(), I("div", uo, [L("span", null, K(q(b)(q(n).metadata.mtime, "Modified")), 1), q(n).metadata.ctime === q(n).metadata.mtime ? F("", !0) : (H(), I("span", fo, " · " + K(q(b)(q(n).metadata.ctime, "Created")), 1))])) : F("", !0),
|
|
2567
|
+
z(q(Bi), {
|
|
2585
2568
|
class: "td-frontmatter-inline",
|
|
2586
2569
|
schema: q(n).schema,
|
|
2587
2570
|
frontmatter: q(n).frontmatter
|
|
2588
2571
|
}, null, 8, ["schema", "frontmatter"]),
|
|
2589
|
-
q(n).headings.length > 0 ? (H(), P(
|
|
2572
|
+
q(n).headings.length > 0 ? (H(), P(da, {
|
|
2590
2573
|
key: 4,
|
|
2591
2574
|
class: "td-toc-inline",
|
|
2592
2575
|
headings: q(n).headings,
|
|
2593
2576
|
static: ""
|
|
2594
2577
|
}, null, 8, ["headings"])) : F("", !0),
|
|
2595
|
-
L("div",
|
|
2596
|
-
z(
|
|
2597
|
-
])]), z(
|
|
2598
|
-
z(
|
|
2578
|
+
L("div", po, [z(q(Ce))]),
|
|
2579
|
+
z(ia)
|
|
2580
|
+
])]), z(pa, { class: "td-rail" })])]),
|
|
2581
|
+
z(Mr)
|
|
2599
2582
|
]));
|
|
2600
2583
|
}
|
|
2601
|
-
}), [["__scopeId", "data-v-
|
|
2584
|
+
}), [["__scopeId", "data-v-5b2a8a69"]]), yo = { class: "pt-16 pb-24" }, bo = ["href"], xo = /* @__PURE__ */ B({
|
|
2602
2585
|
__name: "TdNotFound",
|
|
2603
2586
|
setup(e) {
|
|
2604
|
-
let { withBase: t } =
|
|
2605
|
-
return (e, n) => (H(), I("div",
|
|
2587
|
+
let { withBase: t } = j();
|
|
2588
|
+
return (e, n) => (H(), I("div", yo, [
|
|
2606
2589
|
n[0] ||= L("p", { class: "text-td-4xl font-extrabold leading-none tracking-td-tight text-td-fg-muted" }, " 404 ", -1),
|
|
2607
2590
|
n[1] ||= L("h1", { class: "text-td-xl font-extrabold leading-td-tight tracking-td-tight mt-4" }, " Page Not Found ", -1),
|
|
2608
2591
|
n[2] ||= L("p", { class: "text-td-fg-muted mt-2 text-td-base leading-td-relaxed" }, " The page you are looking for does not exist. ", -1),
|
|
2609
2592
|
L("a", {
|
|
2610
2593
|
class: "inline-flex items-center mt-6 text-td-accent text-td-sm font-extrabold tracking-td-tight hover:text-td-accent-hi",
|
|
2611
|
-
href: q(t)(q(
|
|
2612
|
-
}, "Go Home", 8,
|
|
2594
|
+
href: q(t)(q(s)("/"))
|
|
2595
|
+
}, "Go Home", 8, bo)
|
|
2613
2596
|
]));
|
|
2614
2597
|
}
|
|
2615
|
-
}),
|
|
2616
|
-
Layout:
|
|
2617
|
-
NotFound:
|
|
2598
|
+
}), So = {
|
|
2599
|
+
Layout: vo,
|
|
2600
|
+
NotFound: xo
|
|
2618
2601
|
};
|
|
2619
2602
|
//#endregion
|
|
2620
|
-
export { Se as TdDirectoryIndex,
|
|
2603
|
+
export { Se as TdDirectoryIndex, me as TdGlossaryIndex, _a as TdKbdShortcut, $ as TdKeyName, vo as TdLayout, xo as TdNotFound, So as default, Ma as useCopyCode, Pa as useGlobalHotkey, Fa as useLocalHotkeys };
|