@dogsbay/ssg-cli 0.2.0-beta.176 → 0.2.0-beta.177
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/THIRD-PARTY-NOTICES.txt +17 -17
- package/chunks/{build-command-NZAGB7OC.mjs → build-command-OG5RROLI.mjs} +2 -2
- package/chunks/{check-command-ZKMQYQNA.mjs → check-command-VTCIWCWK.mjs} +3 -3
- package/chunks/{chunk-F6VRYHSY.mjs → chunk-5APY2GH6.mjs} +91 -17
- package/chunks/{chunk-GOEZKWKJ.mjs → chunk-7KLVHGAF.mjs} +484 -72
- package/chunks/{chunk-6CPA3I2A.mjs → chunk-SAXT3272.mjs} +1 -1
- package/chunks/{dev-MX447VF6.mjs → dev-PNLHC36G.mjs} +2 -2
- package/chunks/{publish-command-B5X67Y6Z.mjs → publish-command-NAFJ7475.mjs} +2 -2
- package/chunks/{release-diff-KT7ZLBNY.mjs → release-diff-C4DQAUQE.mjs} +3 -3
- package/chunks/{topicmap-V7FYXTVQ.mjs → topicmap-IGUURUBF.mjs} +1 -1
- package/cli.mjs +6 -6
- package/package.json +2 -2
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
rootPrefix,
|
|
27
27
|
splitHref,
|
|
28
28
|
variableRe
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-5APY2GH6.mjs";
|
|
30
30
|
import {
|
|
31
31
|
collapseLines,
|
|
32
32
|
parseLineRanges,
|
|
@@ -2731,8 +2731,8 @@ var require_index_cjs4 = __commonJS({
|
|
|
2731
2731
|
if (ch !== 124 && ch !== 45 && ch !== 58 && !isSpace(ch)) return false;
|
|
2732
2732
|
pos++;
|
|
2733
2733
|
}
|
|
2734
|
-
let
|
|
2735
|
-
let columns =
|
|
2734
|
+
let lineText2 = getLine(state, startLine + 1);
|
|
2735
|
+
let columns = lineText2.split("|");
|
|
2736
2736
|
const aligns = [];
|
|
2737
2737
|
for (let i = 0; i < columns.length; i++) {
|
|
2738
2738
|
const t = columns[i].trim();
|
|
@@ -2743,10 +2743,10 @@ var require_index_cjs4 = __commonJS({
|
|
|
2743
2743
|
else if (t.charCodeAt(0) === 58) aligns.push("left");
|
|
2744
2744
|
else aligns.push("");
|
|
2745
2745
|
}
|
|
2746
|
-
|
|
2747
|
-
if (
|
|
2746
|
+
lineText2 = getLine(state, startLine).trim();
|
|
2747
|
+
if (lineText2.indexOf("|") === -1) return false;
|
|
2748
2748
|
if (state.sCount[startLine] - state.blkIndent >= 4) return false;
|
|
2749
|
-
columns = escapedSplit(
|
|
2749
|
+
columns = escapedSplit(lineText2);
|
|
2750
2750
|
if (columns.length && columns[0] === "") columns.shift();
|
|
2751
2751
|
if (columns.length && columns[columns.length - 1] === "") columns.pop();
|
|
2752
2752
|
const columnCount = columns.length;
|
|
@@ -2782,10 +2782,10 @@ var require_index_cjs4 = __commonJS({
|
|
|
2782
2782
|
break;
|
|
2783
2783
|
}
|
|
2784
2784
|
if (terminate) break;
|
|
2785
|
-
|
|
2786
|
-
if (!
|
|
2785
|
+
lineText2 = getLine(state, nextLine).trim();
|
|
2786
|
+
if (!lineText2) break;
|
|
2787
2787
|
if (state.sCount[nextLine] - state.blkIndent >= 4) break;
|
|
2788
|
-
columns = escapedSplit(
|
|
2788
|
+
columns = escapedSplit(lineText2);
|
|
2789
2789
|
if (columns.length && columns[0] === "") columns.shift();
|
|
2790
2790
|
if (columns.length && columns[columns.length - 1] === "") columns.pop();
|
|
2791
2791
|
autocompletedCells += columnCount - columns.length;
|
|
@@ -3397,22 +3397,22 @@ var require_index_cjs4 = __commonJS({
|
|
|
3397
3397
|
if (state.sCount[startLine] - state.blkIndent >= 4) return false;
|
|
3398
3398
|
if (!state.md.options.html) return false;
|
|
3399
3399
|
if (state.src.charCodeAt(pos) !== 60) return false;
|
|
3400
|
-
let
|
|
3400
|
+
let lineText2 = state.src.slice(pos, max);
|
|
3401
3401
|
let i = 0;
|
|
3402
|
-
for (; i < HTML_SEQUENCES.length; i++) if (HTML_SEQUENCES[i][0].test(
|
|
3402
|
+
for (; i < HTML_SEQUENCES.length; i++) if (HTML_SEQUENCES[i][0].test(lineText2)) break;
|
|
3403
3403
|
if (i === HTML_SEQUENCES.length) return false;
|
|
3404
3404
|
if (silent) return HTML_SEQUENCES[i][2];
|
|
3405
3405
|
let nextLine = startLine + 1;
|
|
3406
3406
|
const endsOnBlankLine = HTML_SEQUENCES[i][1].test("");
|
|
3407
|
-
if (!HTML_SEQUENCES[i][1].test(
|
|
3407
|
+
if (!HTML_SEQUENCES[i][1].test(lineText2)) for (; nextLine < endLine; nextLine++) {
|
|
3408
3408
|
if (state.sCount[nextLine] < state.blkIndent) {
|
|
3409
3409
|
if (endsOnBlankLine || !state.isEmpty(nextLine)) break;
|
|
3410
3410
|
}
|
|
3411
3411
|
pos = state.bMarks[nextLine] + state.tShift[nextLine];
|
|
3412
3412
|
max = state.eMarks[nextLine];
|
|
3413
|
-
|
|
3414
|
-
if (HTML_SEQUENCES[i][1].test(
|
|
3415
|
-
if (
|
|
3413
|
+
lineText2 = state.src.slice(pos, max);
|
|
3414
|
+
if (HTML_SEQUENCES[i][1].test(lineText2)) {
|
|
3415
|
+
if (lineText2.length !== 0) nextLine++;
|
|
3416
3416
|
break;
|
|
3417
3417
|
}
|
|
3418
3418
|
}
|
|
@@ -9343,6 +9343,203 @@ function splitFrontmatter(source) {
|
|
|
9343
9343
|
};
|
|
9344
9344
|
}
|
|
9345
9345
|
|
|
9346
|
+
// node_modules/@dogsbay/format-dogsbay-md/dist/variable-places.js
|
|
9347
|
+
function lineStarts(text4) {
|
|
9348
|
+
const starts = [0];
|
|
9349
|
+
for (let i = text4.indexOf("\n"); i !== -1; i = text4.indexOf("\n", i + 1))
|
|
9350
|
+
starts.push(i + 1);
|
|
9351
|
+
return starts;
|
|
9352
|
+
}
|
|
9353
|
+
function lineAt(starts, at) {
|
|
9354
|
+
let lo = 0;
|
|
9355
|
+
let hi = starts.length - 1;
|
|
9356
|
+
while (lo < hi) {
|
|
9357
|
+
const mid = lo + hi + 1 >> 1;
|
|
9358
|
+
if (starts[mid] <= at)
|
|
9359
|
+
lo = mid;
|
|
9360
|
+
else
|
|
9361
|
+
hi = mid - 1;
|
|
9362
|
+
}
|
|
9363
|
+
return lo + 1;
|
|
9364
|
+
}
|
|
9365
|
+
function textNodes(node, out = []) {
|
|
9366
|
+
const inline3 = (nodes) => {
|
|
9367
|
+
for (const n of nodes ?? []) {
|
|
9368
|
+
if (n.type === "text")
|
|
9369
|
+
out.push(n);
|
|
9370
|
+
const children = n.children;
|
|
9371
|
+
if (Array.isArray(children))
|
|
9372
|
+
inline3(children);
|
|
9373
|
+
}
|
|
9374
|
+
};
|
|
9375
|
+
inline3(node.inline);
|
|
9376
|
+
for (const c of node.children ?? [])
|
|
9377
|
+
textNodes(c, out);
|
|
9378
|
+
return out;
|
|
9379
|
+
}
|
|
9380
|
+
var hasLine = (n) => typeof n.meta?.line === "number";
|
|
9381
|
+
var holding = /* @__PURE__ */ new WeakMap();
|
|
9382
|
+
var holdsBlock = (n) => {
|
|
9383
|
+
let h = holding.get(n);
|
|
9384
|
+
if (h === void 0)
|
|
9385
|
+
holding.set(n, h = (n.children ?? []).some((c) => holdsBlock(c) || hasLine(c)));
|
|
9386
|
+
return h;
|
|
9387
|
+
};
|
|
9388
|
+
var SLOT_FIRST = 57600;
|
|
9389
|
+
var SLOTS = 63743 - SLOT_FIRST + 1;
|
|
9390
|
+
var SLOT_CHARS = /[\ue100-\uf8ff]/;
|
|
9391
|
+
var WORD = /[\p{L}\p{N}]/u;
|
|
9392
|
+
var isSlot = (c) => c >= SLOT_FIRST && c < SLOT_FIRST + SLOTS;
|
|
9393
|
+
function placeVariables(tree, source, variables, parse) {
|
|
9394
|
+
const starts = lineStarts(source);
|
|
9395
|
+
const placed = variables.map((v, index2) => ({ v, index: index2 })).filter(({ v }) => typeof v.from === "number" && typeof v.to === "number" && v.to > v.from && v.to <= source.length).map(({ v, index: index2 }) => ({ index: index2, name: v.name, from: v.from, to: v.to, value: source.slice(v.from, v.to), line: lineAt(starts, v.from) })).sort((a, b) => a.from - b.from);
|
|
9396
|
+
if (!placed.length)
|
|
9397
|
+
return;
|
|
9398
|
+
const onLines = (line, end) => {
|
|
9399
|
+
const first = starts[line - 1] ?? source.length;
|
|
9400
|
+
const last = end < starts.length ? starts[end] : source.length;
|
|
9401
|
+
let lo = 0;
|
|
9402
|
+
let hi = placed.length;
|
|
9403
|
+
while (lo < hi) {
|
|
9404
|
+
const mid = lo + hi >> 1;
|
|
9405
|
+
if (placed[mid].from < first)
|
|
9406
|
+
lo = mid + 1;
|
|
9407
|
+
else
|
|
9408
|
+
hi = mid;
|
|
9409
|
+
}
|
|
9410
|
+
const out = [];
|
|
9411
|
+
for (let i = lo; i < placed.length && placed[i].from < last; i++)
|
|
9412
|
+
out.push(placed[i]);
|
|
9413
|
+
return out;
|
|
9414
|
+
};
|
|
9415
|
+
const leaves = [];
|
|
9416
|
+
const walk = (node) => {
|
|
9417
|
+
const meta2 = node.meta;
|
|
9418
|
+
if (meta2 && typeof meta2.line === "number") {
|
|
9419
|
+
const here = onLines(meta2.line, typeof meta2.endLine === "number" ? meta2.endLine : meta2.line);
|
|
9420
|
+
if (here.length) {
|
|
9421
|
+
node.meta = { ...node.meta, variables: here.map((p) => p.index) };
|
|
9422
|
+
if (!holdsBlock(node))
|
|
9423
|
+
leaves.push({ node, here });
|
|
9424
|
+
}
|
|
9425
|
+
}
|
|
9426
|
+
for (const c of node.children ?? [])
|
|
9427
|
+
walk(c);
|
|
9428
|
+
};
|
|
9429
|
+
tree.forEach(walk);
|
|
9430
|
+
if (!leaves.length || SLOT_CHARS.test(source))
|
|
9431
|
+
return;
|
|
9432
|
+
let probe = "";
|
|
9433
|
+
let at = 0;
|
|
9434
|
+
for (const p of placed) {
|
|
9435
|
+
if (p.from < at)
|
|
9436
|
+
continue;
|
|
9437
|
+
const slot = String.fromCharCode(SLOT_FIRST + p.index % SLOTS);
|
|
9438
|
+
probe += source.slice(at, p.from);
|
|
9439
|
+
for (const ch of source.slice(p.from, p.to))
|
|
9440
|
+
probe += ch.length === 1 && WORD.test(ch) ? slot : ch;
|
|
9441
|
+
at = p.to;
|
|
9442
|
+
}
|
|
9443
|
+
probe += source.slice(at);
|
|
9444
|
+
const probeLeaves = /* @__PURE__ */ new Map();
|
|
9445
|
+
const index = (nodes) => nodes.forEach((n) => {
|
|
9446
|
+
const meta2 = n.meta;
|
|
9447
|
+
if (meta2 && typeof meta2.line === "number" && !holdsBlock(n)) {
|
|
9448
|
+
const key2 = `${meta2.line}:${meta2.endLine}:${n.type}`;
|
|
9449
|
+
probeLeaves.set(key2, probeLeaves.has(key2) ? void 0 : n);
|
|
9450
|
+
}
|
|
9451
|
+
index(n.children ?? []);
|
|
9452
|
+
});
|
|
9453
|
+
index(parse(probe));
|
|
9454
|
+
for (const { node, here } of leaves) {
|
|
9455
|
+
const meta2 = node.meta;
|
|
9456
|
+
const twin = probeLeaves.get(`${meta2.line}:${meta2.endLine}:${node.type}`);
|
|
9457
|
+
if (twin && sameButSlots(node, twin))
|
|
9458
|
+
drawFrom(node, twin, here);
|
|
9459
|
+
}
|
|
9460
|
+
}
|
|
9461
|
+
function sameButSlots(a, b, key2) {
|
|
9462
|
+
if (key2 === "variables")
|
|
9463
|
+
return true;
|
|
9464
|
+
if (typeof a === "string" && typeof b === "string") {
|
|
9465
|
+
if (a === b)
|
|
9466
|
+
return true;
|
|
9467
|
+
if (a.length !== b.length)
|
|
9468
|
+
return false;
|
|
9469
|
+
for (let i = 0; i < a.length; i++) {
|
|
9470
|
+
const cb = b.charCodeAt(i);
|
|
9471
|
+
if (isSlot(cb) ? !WORD.test(a[i]) : a.charCodeAt(i) !== cb)
|
|
9472
|
+
return false;
|
|
9473
|
+
}
|
|
9474
|
+
return true;
|
|
9475
|
+
}
|
|
9476
|
+
if (Array.isArray(a) || Array.isArray(b)) {
|
|
9477
|
+
if (!Array.isArray(a) || !Array.isArray(b) || a.length !== b.length)
|
|
9478
|
+
return false;
|
|
9479
|
+
return a.every((x, i) => sameButSlots(x, b[i]));
|
|
9480
|
+
}
|
|
9481
|
+
if (a && b && typeof a === "object" && typeof b === "object") {
|
|
9482
|
+
const ka = Object.keys(a).filter((k) => k !== "variables");
|
|
9483
|
+
const kb = Object.keys(b).filter((k) => k !== "variables");
|
|
9484
|
+
if (ka.length !== kb.length)
|
|
9485
|
+
return false;
|
|
9486
|
+
return ka.every((k) => Object.prototype.hasOwnProperty.call(b, k) && sameButSlots(a[k], b[k], k));
|
|
9487
|
+
}
|
|
9488
|
+
return a === b;
|
|
9489
|
+
}
|
|
9490
|
+
function drawFrom(node, twin, here) {
|
|
9491
|
+
const plainNodes = textNodes(node);
|
|
9492
|
+
const probeNodes = textNodes(twin);
|
|
9493
|
+
if (plainNodes.length !== probeNodes.length)
|
|
9494
|
+
return;
|
|
9495
|
+
const bySlot = /* @__PURE__ */ new Map();
|
|
9496
|
+
for (const p of here) {
|
|
9497
|
+
const slot = SLOT_FIRST + p.index % SLOTS;
|
|
9498
|
+
bySlot.set(slot, bySlot.has(slot) ? null : p);
|
|
9499
|
+
}
|
|
9500
|
+
const found = /* @__PURE__ */ new Map();
|
|
9501
|
+
probeNodes.forEach((t, n) => {
|
|
9502
|
+
const text4 = t.text;
|
|
9503
|
+
const inNode = /* @__PURE__ */ new Map();
|
|
9504
|
+
for (let i = 0; i < text4.length; i++) {
|
|
9505
|
+
const c = text4.charCodeAt(i);
|
|
9506
|
+
if (!isSlot(c))
|
|
9507
|
+
continue;
|
|
9508
|
+
const s = inNode.get(c);
|
|
9509
|
+
if (s)
|
|
9510
|
+
s[2] = i;
|
|
9511
|
+
else
|
|
9512
|
+
inNode.set(c, [n, i, i]);
|
|
9513
|
+
}
|
|
9514
|
+
for (const [slot, s] of inNode) {
|
|
9515
|
+
const list5 = found.get(slot);
|
|
9516
|
+
if (list5)
|
|
9517
|
+
list5.push(s);
|
|
9518
|
+
else
|
|
9519
|
+
found.set(slot, [s]);
|
|
9520
|
+
}
|
|
9521
|
+
});
|
|
9522
|
+
for (const [slot, places] of found) {
|
|
9523
|
+
const p = bySlot.get(slot);
|
|
9524
|
+
if (!p || places.length !== 1)
|
|
9525
|
+
continue;
|
|
9526
|
+
const [n, first, last] = places[0];
|
|
9527
|
+
const t = plainNodes[n];
|
|
9528
|
+
{
|
|
9529
|
+
const value = p.value;
|
|
9530
|
+
if (!WORD.test(value[0]) || !WORD.test(value[value.length - 1]))
|
|
9531
|
+
continue;
|
|
9532
|
+
const from = first;
|
|
9533
|
+
const to = last + 1;
|
|
9534
|
+
if (from < 0 || to > t.text.length || t.text.slice(from, to) !== value)
|
|
9535
|
+
continue;
|
|
9536
|
+
(t.variables ??= []).push({ name: p.name, index: p.index, from, to });
|
|
9537
|
+
}
|
|
9538
|
+
}
|
|
9539
|
+
for (const t of plainNodes)
|
|
9540
|
+
t.variables?.sort((a, b) => a.from - b.from);
|
|
9541
|
+
}
|
|
9542
|
+
|
|
9346
9543
|
// node_modules/@dogsbay/format-dogsbay-md/dist/directive-preserve.js
|
|
9347
9544
|
var OPEN2 = "\uE000";
|
|
9348
9545
|
var CLOSE2 = "\uE001";
|
|
@@ -9730,7 +9927,7 @@ function attributeProblem(block2) {
|
|
|
9730
9927
|
return `has an unterminated ${quote === '"' ? "double" : "single"} quote`;
|
|
9731
9928
|
return void 0;
|
|
9732
9929
|
}
|
|
9733
|
-
function youtubeAsBlock(map, closed, lines, around,
|
|
9930
|
+
function youtubeAsBlock(map, closed, lines, around, lineOf2) {
|
|
9734
9931
|
if (!closed)
|
|
9735
9932
|
return "is never closed, so it takes in everything after it";
|
|
9736
9933
|
if (lines.slice(map[0] + 1, map[1]).some((l) => l.replace(/^[\s>]*/, "") !== "")) {
|
|
@@ -9740,7 +9937,7 @@ function youtubeAsBlock(map, closed, lines, around, lineOf) {
|
|
|
9740
9937
|
if (around.some((a) => a.map[1] === map[1]))
|
|
9741
9938
|
return `has no closer of its own: it ends with the :::${parent?.name ?? "block"} around it`;
|
|
9742
9939
|
if (parent && !parent.closed)
|
|
9743
|
-
return `takes the closer on line ${
|
|
9940
|
+
return `takes the closer on line ${lineOf2(map[1]) ?? "?"}, which leaves :::${parent.name} open`;
|
|
9744
9941
|
return void 0;
|
|
9745
9942
|
}
|
|
9746
9943
|
var clip = (line) => {
|
|
@@ -9760,11 +9957,11 @@ function propKeysOfAttrs(props) {
|
|
|
9760
9957
|
}
|
|
9761
9958
|
return keys;
|
|
9762
9959
|
}
|
|
9763
|
-
function collectDiagnostics(tokens, lines,
|
|
9960
|
+
function collectDiagnostics(tokens, lines, lineOf2, sourceLine2) {
|
|
9764
9961
|
const out = [];
|
|
9765
9962
|
const cursor = /* @__PURE__ */ new Map();
|
|
9766
9963
|
const add = (line0, code2, message, name, span) => {
|
|
9767
|
-
const line = line0 === void 0 ? void 0 :
|
|
9964
|
+
const line = line0 === void 0 ? void 0 : lineOf2(line0);
|
|
9768
9965
|
if (line === void 0)
|
|
9769
9966
|
return;
|
|
9770
9967
|
const text4 = span && sourceLine2?.(line);
|
|
@@ -9801,13 +9998,13 @@ function collectDiagnostics(tokens, lines, lineOf, sourceLine2) {
|
|
|
9801
9998
|
const closed = closesContainer(lines[tok.map[1]], colons);
|
|
9802
9999
|
const skipped = tok.meta?.skippedCloser;
|
|
9803
10000
|
const legacy = tok.meta?.legacyCloser;
|
|
9804
|
-
const leafAsBlock = name === "youtube" ? youtubeAsBlock(tok.map, closed, lines, around,
|
|
10001
|
+
const leafAsBlock = name === "youtube" ? youtubeAsBlock(tok.map, closed, lines, around, lineOf2) : void 0;
|
|
9805
10002
|
if (leafAsBlock) {
|
|
9806
10003
|
add(tok.map[0], "leaf-as-block", `a video has no body: write ::youtube{\u2026} on one line, with no closer \u2014 as :::youtube it ${leafAsBlock}`, void 0, opener(name));
|
|
9807
10004
|
} else if (!closed && legacy !== void 0 && !generic) {
|
|
9808
|
-
add(tok.map[0], "unclosed-container", `:::${name} is never closed \u2014 the ${clip(lines[legacy])} on line ${
|
|
10005
|
+
add(tok.map[0], "unclosed-container", `:::${name} is never closed \u2014 the ${clip(lines[legacy])} on line ${lineOf2(legacy) ?? "?"} closes only the innermost open block; each block needs its own closer (one \`:::\` used to close several)`, void 0, opener(name));
|
|
9809
10006
|
} else if (!closed && skipped !== void 0) {
|
|
9810
|
-
add(tok.map[0], "unclosed-container", `:::${name} is never closed \u2014 the ${clip(lines[skipped])} on line ${
|
|
10007
|
+
add(tok.map[0], "unclosed-container", `:::${name} is never closed \u2014 the ${clip(lines[skipped])} on line ${lineOf2(skipped) ?? "?"} is inside a code block, so it does not close it (add a closer after the code)`, void 0, opener(name));
|
|
9811
10008
|
} else if (!closed) {
|
|
9812
10009
|
add(tok.map[0], "unclosed-container", generic ? `:::${name} is never closed \u2014 it is shown as text (close it with a line of ${":".repeat(colons)})` : `:::${name} is never closed \u2014 it takes in everything after it, to the end of the page or of the block it sits in (close it with a line of ${":".repeat(colons)})`, void 0, opener(name));
|
|
9813
10010
|
} else if (generic) {
|
|
@@ -9825,7 +10022,7 @@ function collectDiagnostics(tokens, lines, lineOf, sourceLine2) {
|
|
|
9825
10022
|
if (closed) {
|
|
9826
10023
|
const label = closerLabel((lines[tok.map[1]] ?? "").replace(/^[\s>]*:+/, ""));
|
|
9827
10024
|
if (label && label !== name) {
|
|
9828
|
-
add(tok.map[1], "closer-mismatch", `this closer is labelled ${label}, but it closes :::${name} (opened on line ${
|
|
10025
|
+
add(tok.map[1], "closer-mismatch", `this closer is labelled ${label}, but it closes :::${name} (opened on line ${lineOf2(tok.map[0]) ?? "?"}) \u2014 check which block you meant to end here`, void 0, /<!--[\s\S]*?-->/);
|
|
9829
10026
|
}
|
|
9830
10027
|
}
|
|
9831
10028
|
const rest = info.slice(name.length).trim();
|
|
@@ -10534,6 +10731,9 @@ function renderParagraph(node, ctx) {
|
|
|
10534
10731
|
function renderCode(node) {
|
|
10535
10732
|
const content = node.html ?? node.props?.code ?? "";
|
|
10536
10733
|
const lang = node.props?.language ?? node.props?.lang ?? "";
|
|
10734
|
+
if (node.meta?.indented === true && !Object.keys(node.props ?? {}).length && /\S/.test(content.split("\n")[0] ?? "") && /\S/.test(content.split("\n").at(-1) ?? "")) {
|
|
10735
|
+
return content.split("\n").map((line) => line === "" ? "" : ` ${line}`).join("\n");
|
|
10736
|
+
}
|
|
10537
10737
|
const fence = pickCodeFence2(content);
|
|
10538
10738
|
const attrKeys = [
|
|
10539
10739
|
"title",
|
|
@@ -10585,8 +10785,11 @@ function renderList(node, ctx, ordered) {
|
|
|
10585
10785
|
const start = ordered ? Number.isFinite(Number(node.props?.start ?? 1)) ? Number(node.props?.start ?? 1) : 1 : 0;
|
|
10586
10786
|
const same3 = ordered && (ctx.listNumbers === "same" || ctx.listNumbers === "source" && node.meta?.sameNumbers === true);
|
|
10587
10787
|
const loose = node.meta?.loose === true;
|
|
10788
|
+
const written = node.meta?.marker;
|
|
10789
|
+
const bullet = !ordered && (written === "*" || written === "+") ? written : "-";
|
|
10790
|
+
const delimiter = ordered && written === ")" ? ")" : ".";
|
|
10588
10791
|
return items3.map((item, idx) => {
|
|
10589
|
-
const marker = ordered ? `${same3 ? start : start + idx}
|
|
10792
|
+
const marker = ordered ? `${same3 ? start : start + idx}${delimiter}` : bullet;
|
|
10590
10793
|
const body = renderListItem(item, ctx, loose);
|
|
10591
10794
|
const [first, ...rest] = body.split("\n");
|
|
10592
10795
|
const aligned = ctx.listIndent === "aligned" && /^\S/.test(first);
|
|
@@ -10601,7 +10804,7 @@ function startsWithText(item) {
|
|
|
10601
10804
|
const first = item.inline && item.inline.length > 0 ? "text" : item.children?.[0]?.type;
|
|
10602
10805
|
if (first !== "text" && first !== "paragraph" && first !== "prose")
|
|
10603
10806
|
return false;
|
|
10604
|
-
return !holdsHtml(item) && !holdsCodeBreak(item);
|
|
10807
|
+
return !holdsHtml(item) && !holdsCodeBreak(item) && !(item.children ?? []).some((c) => c.type === "code" && c.meta?.indented === true);
|
|
10605
10808
|
}
|
|
10606
10809
|
function joinCodeBreaks(node) {
|
|
10607
10810
|
if (!holdsCodeBreak(node, true))
|
|
@@ -10641,7 +10844,9 @@ var TIGHT_NEXT = /* @__PURE__ */ new Set(["unordered-list", "ordered-list", "cod
|
|
|
10641
10844
|
var OPEN_ENDED = /* @__PURE__ */ new Set(["table", "paragraph", "html", "prose"]);
|
|
10642
10845
|
function renderListItem(node, ctx, loose = true) {
|
|
10643
10846
|
const box = typeof node.props?.checked === "boolean" ? node.props.checked ? "[x] " : "[ ] " : "";
|
|
10644
|
-
const
|
|
10847
|
+
const text4 = inlineToDogsbayMd(node.inline);
|
|
10848
|
+
const literal = !box && node.inline?.[0]?.type === "text" && ctx.literalBlockStarts !== false;
|
|
10849
|
+
const inline3 = box + (literal ? escapeBlockStart(text4) : text4);
|
|
10645
10850
|
const parts = [];
|
|
10646
10851
|
if (inline3)
|
|
10647
10852
|
parts.push({ type: "paragraph", md: inline3 });
|
|
@@ -11287,7 +11492,7 @@ function parseTree(source, options) {
|
|
|
11287
11492
|
}
|
|
11288
11493
|
const yamlLifted = preprocessYamlBodies(content);
|
|
11289
11494
|
content = yamlLifted.source;
|
|
11290
|
-
const
|
|
11495
|
+
const lineOf2 = lineMap ? (line0) => {
|
|
11291
11496
|
const protectedLine = yamlLifted.lineMap[line0];
|
|
11292
11497
|
const input = protectedLine === void 0 ? void 0 : lineMap[protectedLine];
|
|
11293
11498
|
return input === void 0 ? void 0 : bodyStart + input + 1;
|
|
@@ -11307,10 +11512,10 @@ function parseTree(source, options) {
|
|
|
11307
11512
|
markUnclosedGenericContainers(tokens, content);
|
|
11308
11513
|
keepListItemBraces(tokens, content);
|
|
11309
11514
|
attachTableAttrsRow(tokens, content);
|
|
11310
|
-
let diagnostics = options?.diagnostics ? collectDiagnostics(tokens, content.split(/\r\n|\n/),
|
|
11311
|
-
if (diagnostics &&
|
|
11515
|
+
let diagnostics = options?.diagnostics ? collectDiagnostics(tokens, content.split(/\r\n|\n/), lineOf2 ?? (() => void 0), sourceLineOf(source)) : void 0;
|
|
11516
|
+
if (diagnostics && lineOf2 && yamlLifted.badProps.length) {
|
|
11312
11517
|
for (const bad of yamlLifted.badProps) {
|
|
11313
|
-
const line =
|
|
11518
|
+
const line = lineOf2(bad.line0 + bad.offset);
|
|
11314
11519
|
if (line === void 0)
|
|
11315
11520
|
continue;
|
|
11316
11521
|
diagnostics.push({ line, code: "props-yaml", message: `This reads like a props block, but its YAML does not load (line ${line}: ${bad.message}), so it is read as a rule and text` });
|
|
@@ -11324,17 +11529,21 @@ function parseTree(source, options) {
|
|
|
11324
11529
|
return protectedLine === void 0 ? void 0 : protectedLines[protectedLine];
|
|
11325
11530
|
}
|
|
11326
11531
|
};
|
|
11327
|
-
let tree = foldRelated(tokensToTree(tokens, options?.sourceLines ?
|
|
11532
|
+
let tree = foldRelated(tokensToTree(tokens, options?.sourceLines ? lineOf2 : void 0, content.split(/\r\n|\n/), writtenLines, options?.sourceLines ? endOf : void 0));
|
|
11328
11533
|
if (directiveTable) {
|
|
11329
11534
|
tree = restoreDirectives(tree, directiveTable, {
|
|
11330
11535
|
nodesFor: preserveMode ? "all" : "include"
|
|
11331
11536
|
});
|
|
11332
11537
|
}
|
|
11333
|
-
if (options?.sourceLines &&
|
|
11538
|
+
if (options?.sourceLines && lineOf2) {
|
|
11334
11539
|
endLines(tree);
|
|
11335
11540
|
if (options.sourceMap)
|
|
11336
11541
|
addSourceOrigins(tree, textLineOrigins(options.sourceMap));
|
|
11337
11542
|
}
|
|
11543
|
+
if (options?.variablePlaces?.length) {
|
|
11544
|
+
const again = { ...options, variablePlaces: void 0 };
|
|
11545
|
+
placeVariables(tree, source, options.variablePlaces, (probe) => dogsbayMdToTree(probe, again).tree);
|
|
11546
|
+
}
|
|
11338
11547
|
return { tree, frontmatter, ...diagnostics ? { diagnostics } : {} };
|
|
11339
11548
|
}
|
|
11340
11549
|
var RELATED_ROLE_CLASSES = /* @__PURE__ */ new Set(["_additional-resources"]);
|
|
@@ -11615,9 +11824,9 @@ function markUnclosedGenericContainers(tokens, src) {
|
|
|
11615
11824
|
tok.meta = { ...tok.meta ?? {}, unclosed: true };
|
|
11616
11825
|
}
|
|
11617
11826
|
}
|
|
11618
|
-
function tokensToTree(tokens,
|
|
11827
|
+
function tokensToTree(tokens, lineOf2, lines, written, endOf) {
|
|
11619
11828
|
const nodes = [];
|
|
11620
|
-
const ctx = { tokens, i: 0, ...
|
|
11829
|
+
const ctx = { tokens, i: 0, ...lineOf2 ? { lineOf: lineOf2 } : {}, ...endOf ? { endOf } : {}, ...lines ? { lines } : {}, ...written ? { written } : {} };
|
|
11621
11830
|
while (ctx.i < ctx.tokens.length) {
|
|
11622
11831
|
const node = consumeBlock(ctx);
|
|
11623
11832
|
if (node) {
|
|
@@ -11891,6 +12100,11 @@ function consumeList(ctx, ordered) {
|
|
|
11891
12100
|
};
|
|
11892
12101
|
if (looseList(ctx.tokens, openAt))
|
|
11893
12102
|
node.meta = { ...node.meta, loose: true };
|
|
12103
|
+
if (keepWritten) {
|
|
12104
|
+
const marker = ordered ? ctx.tokens[openAt + 1]?.markup : open.markup;
|
|
12105
|
+
if (marker === "*" || marker === "+" || marker === ")")
|
|
12106
|
+
node.meta = { ...node.meta, marker };
|
|
12107
|
+
}
|
|
11894
12108
|
if (ordered) {
|
|
11895
12109
|
const startAttr = open.attrs?.find(([k]) => k === "start");
|
|
11896
12110
|
if (startAttr) {
|
|
@@ -12067,7 +12281,9 @@ function consumeCode(ctx) {
|
|
|
12067
12281
|
return {
|
|
12068
12282
|
type: "code",
|
|
12069
12283
|
props,
|
|
12070
|
-
html: tok.content.replace(/\n$/, "")
|
|
12284
|
+
html: tok.content.replace(/\n$/, ""),
|
|
12285
|
+
// Indented code as written (`asWritten`): the serializer writes it indented again
|
|
12286
|
+
...keepWritten && tok.type === "code_block" ? { meta: { indented: true } } : {}
|
|
12071
12287
|
};
|
|
12072
12288
|
}
|
|
12073
12289
|
function consumeHtmlBlock(ctx) {
|
|
@@ -13821,21 +14037,91 @@ async function sha256Hex(bytes) {
|
|
|
13821
14037
|
const digest = await globalThis.crypto.subtle.digest("SHA-256", bytes);
|
|
13822
14038
|
return Array.from(new Uint8Array(digest), (b) => b.toString(16).padStart(2, "0")).join("");
|
|
13823
14039
|
}
|
|
14040
|
+
var PLAIN_TAG = /^\{\{\s*[A-Za-z_][\w.]*\s*\}\}$/;
|
|
14041
|
+
var ANY_TAG = /\{\{[\s\S]*?\}\}|\{%|\{#/g;
|
|
14042
|
+
function drawn(node) {
|
|
14043
|
+
const out = /* @__PURE__ */ new Set();
|
|
14044
|
+
const inline3 = (nodes) => {
|
|
14045
|
+
if (!Array.isArray(nodes))
|
|
14046
|
+
return;
|
|
14047
|
+
for (const n of nodes) {
|
|
14048
|
+
for (const v of n.variables ?? [])
|
|
14049
|
+
out.add(v.index);
|
|
14050
|
+
inline3(n.children);
|
|
14051
|
+
}
|
|
14052
|
+
};
|
|
14053
|
+
const walk = (n) => {
|
|
14054
|
+
inline3(n.inline);
|
|
14055
|
+
n.children?.forEach(walk);
|
|
14056
|
+
};
|
|
14057
|
+
walk(node);
|
|
14058
|
+
return out;
|
|
14059
|
+
}
|
|
14060
|
+
function plainLines(fileLines, from, to, count) {
|
|
14061
|
+
const lines = fileLines.slice(from - 1, to).join("\n");
|
|
14062
|
+
let n = 0;
|
|
14063
|
+
for (const m of lines.matchAll(ANY_TAG)) {
|
|
14064
|
+
if (!PLAIN_TAG.test(m[0]))
|
|
14065
|
+
return false;
|
|
14066
|
+
n++;
|
|
14067
|
+
}
|
|
14068
|
+
return n === count;
|
|
14069
|
+
}
|
|
13824
14070
|
async function pageRecord(tree, options) {
|
|
13825
14071
|
const blocks = [];
|
|
14072
|
+
const printed = /* @__PURE__ */ new Map();
|
|
14073
|
+
const drawnIn = /* @__PURE__ */ new Map();
|
|
13826
14074
|
const walk = (nodes) => {
|
|
13827
14075
|
for (const n of nodes) {
|
|
13828
14076
|
const meta2 = n.meta;
|
|
13829
14077
|
if (meta2 && typeof meta2.block === "string" && typeof meta2.line === "number" && meta2.source) {
|
|
13830
14078
|
const record = blockRecord(n.type, meta2.block, meta2.line, typeof meta2.endLine === "number" ? meta2.endLine : meta2.line, meta2.source, options.source);
|
|
13831
14079
|
const anchor = authoredAnchor(n);
|
|
13832
|
-
|
|
14080
|
+
const block2 = anchor ? { ...record, anchor } : record;
|
|
14081
|
+
blocks.push(block2);
|
|
14082
|
+
if (options.variables && Array.isArray(meta2.variables)) {
|
|
14083
|
+
printed.set(block2, meta2.variables);
|
|
14084
|
+
drawnIn.set(block2, drawn(n));
|
|
14085
|
+
}
|
|
13833
14086
|
}
|
|
13834
14087
|
if (n.children)
|
|
13835
14088
|
walk(n.children);
|
|
13836
14089
|
}
|
|
13837
14090
|
};
|
|
13838
14091
|
walk(tree);
|
|
14092
|
+
if (options.variables) {
|
|
14093
|
+
const texts = /* @__PURE__ */ new Map();
|
|
14094
|
+
const textOf = (file2) => {
|
|
14095
|
+
let t = texts.get(file2);
|
|
14096
|
+
if (!t) {
|
|
14097
|
+
t = Promise.resolve(options.bytes(file2)).then((b) => {
|
|
14098
|
+
if (b === void 0)
|
|
14099
|
+
return void 0;
|
|
14100
|
+
try {
|
|
14101
|
+
return new TextDecoder("utf-8", { fatal: true }).decode(b).split(/\r\n|\n/);
|
|
14102
|
+
} catch {
|
|
14103
|
+
return void 0;
|
|
14104
|
+
}
|
|
14105
|
+
});
|
|
14106
|
+
texts.set(file2, t);
|
|
14107
|
+
}
|
|
14108
|
+
return t;
|
|
14109
|
+
};
|
|
14110
|
+
for (const [block2, indices] of printed) {
|
|
14111
|
+
const variables = indices.map((i) => options.variables[i]).filter((v) => v !== void 0);
|
|
14112
|
+
if (!variables.length)
|
|
14113
|
+
continue;
|
|
14114
|
+
block2.variables = variables;
|
|
14115
|
+
const shown = drawnIn.get(block2);
|
|
14116
|
+
if (!indices.every((i) => shown.has(i)))
|
|
14117
|
+
continue;
|
|
14118
|
+
if (!block2.editable || block2.gaps || block2.kind === "include" || block2.from === void 0 || !block2.file)
|
|
14119
|
+
continue;
|
|
14120
|
+
const text4 = await textOf(block2.file);
|
|
14121
|
+
if (text4 !== void 0 && plainLines(text4, block2.from, block2.to ?? block2.from, variables.length))
|
|
14122
|
+
block2.plainVariables = true;
|
|
14123
|
+
}
|
|
14124
|
+
}
|
|
13839
14125
|
const files = {};
|
|
13840
14126
|
const names = /* @__PURE__ */ new Set([options.source]);
|
|
13841
14127
|
for (const b of blocks) {
|
|
@@ -15928,7 +16214,7 @@ function lineIndex(src) {
|
|
|
15928
16214
|
return lo + 1;
|
|
15929
16215
|
};
|
|
15930
16216
|
}
|
|
15931
|
-
function lex(src, name,
|
|
16217
|
+
function lex(src, name, lineAt2) {
|
|
15932
16218
|
const tags = [];
|
|
15933
16219
|
let pos = 0;
|
|
15934
16220
|
let stripNext = false;
|
|
@@ -15957,14 +16243,14 @@ function lex(src, name, lineAt) {
|
|
|
15957
16243
|
if (kind === "#") {
|
|
15958
16244
|
const end2 = src.indexOf("#}", bodyStart);
|
|
15959
16245
|
if (end2 < 0)
|
|
15960
|
-
throw new TemplateError("Unclosed comment", name,
|
|
16246
|
+
throw new TemplateError("Unclosed comment", name, lineAt2(start));
|
|
15961
16247
|
stripNext = src[end2 - 1] === "-" && end2 - 1 >= bodyStart;
|
|
15962
16248
|
pos = end2 + 2;
|
|
15963
16249
|
continue;
|
|
15964
16250
|
}
|
|
15965
16251
|
const end = findClose(src, bodyStart, kind === "{" ? "}}" : "%}");
|
|
15966
16252
|
if (end < 0)
|
|
15967
|
-
throw new TemplateError(`Unclosed ${kind === "{" ? "expression" : "statement"} tag`, name,
|
|
16253
|
+
throw new TemplateError(`Unclosed ${kind === "{" ? "expression" : "statement"} tag`, name, lineAt2(start));
|
|
15968
16254
|
const rightStrip = src[end - 1] === "-" && end - 1 >= bodyStart;
|
|
15969
16255
|
const inner = src.slice(bodyStart, rightStrip ? end - 1 : end);
|
|
15970
16256
|
pos = end + 2;
|
|
@@ -15973,7 +16259,7 @@ function lex(src, name, lineAt) {
|
|
|
15973
16259
|
RAW_END.lastIndex = pos;
|
|
15974
16260
|
const m = RAW_END.exec(src);
|
|
15975
16261
|
if (!m)
|
|
15976
|
-
throw new TemplateError("Missing endraw", name,
|
|
16262
|
+
throw new TemplateError("Missing endraw", name, lineAt2(start));
|
|
15977
16263
|
let raw = src.slice(pos, m.index);
|
|
15978
16264
|
if (stripNext)
|
|
15979
16265
|
raw = raw.replace(/^\s+/, "");
|
|
@@ -15992,11 +16278,11 @@ function lex(src, name, lineAt) {
|
|
|
15992
16278
|
function parseTemplate(source, name = "<string>", options = {}) {
|
|
15993
16279
|
const normalized = source.replace(/\r\n?/g, "\n");
|
|
15994
16280
|
const src = !options.keepTrailingNewline && normalized.endsWith("\n") ? normalized.slice(0, -1) : normalized;
|
|
15995
|
-
const
|
|
15996
|
-
const tags = lex(src, name,
|
|
16281
|
+
const lineAt2 = lineIndex(src);
|
|
16282
|
+
const tags = lex(src, name, lineAt2);
|
|
15997
16283
|
let i = 0;
|
|
15998
16284
|
const fail4 = (message, pos) => {
|
|
15999
|
-
throw new TemplateError(message, name,
|
|
16285
|
+
throw new TemplateError(message, name, lineAt2(pos));
|
|
16000
16286
|
};
|
|
16001
16287
|
const withParser = (tag, f) => {
|
|
16002
16288
|
try {
|
|
@@ -16024,7 +16310,7 @@ function parseTemplate(source, name = "<string>", options = {}) {
|
|
|
16024
16310
|
p.expectEnd();
|
|
16025
16311
|
return e;
|
|
16026
16312
|
});
|
|
16027
|
-
nodes.push({ type: "output", expr, line:
|
|
16313
|
+
nodes.push({ type: "output", expr, line: lineAt2(tag.pos) });
|
|
16028
16314
|
i++;
|
|
16029
16315
|
continue;
|
|
16030
16316
|
}
|
|
@@ -16039,7 +16325,7 @@ function parseTemplate(source, name = "<string>", options = {}) {
|
|
|
16039
16325
|
return { nodes, end: "" };
|
|
16040
16326
|
}
|
|
16041
16327
|
function parseStatement(kw, tag) {
|
|
16042
|
-
const line =
|
|
16328
|
+
const line = lineAt2(tag.pos);
|
|
16043
16329
|
switch (kw) {
|
|
16044
16330
|
case "if": {
|
|
16045
16331
|
const branches = [];
|
|
@@ -16684,7 +16970,7 @@ var TemplatePageError = class extends Error {
|
|
|
16684
16970
|
}
|
|
16685
16971
|
};
|
|
16686
16972
|
var HASH_SENTINEL = " DBTPL_HASH_OPEN ";
|
|
16687
|
-
var ATTRIBUTE_BLOCK_OPEN = /\{#(?=[\p{L}\p{N}_
|
|
16973
|
+
var ATTRIBUTE_BLOCK_OPEN = /\{#(?=(?:[\p{L}\p{N}_]|-(?!\s))[^}\n]*\})(?![^}\n]*#\})/gu;
|
|
16688
16974
|
var mask = (s) => maskMinjaInCode(s).replace(ATTRIBUTE_BLOCK_OPEN, `{${HASH_SENTINEL}`);
|
|
16689
16975
|
var unmask = (s) => unmaskMinjaInCode(s).split(HASH_SENTINEL).join("#");
|
|
16690
16976
|
function declaresParams(fm) {
|
|
@@ -17642,6 +17928,17 @@ function renderInline2(nodes, ctx) {
|
|
|
17642
17928
|
out += inline(n, ctx);
|
|
17643
17929
|
return out;
|
|
17644
17930
|
}
|
|
17931
|
+
function withVariables(text4, ranges) {
|
|
17932
|
+
let out = "";
|
|
17933
|
+
let at = 0;
|
|
17934
|
+
for (const r of [...ranges].sort((a, b) => a.from - b.from)) {
|
|
17935
|
+
if (r.from < at || r.to > text4.length || r.to <= r.from)
|
|
17936
|
+
continue;
|
|
17937
|
+
out += esc(text4.slice(at, r.from)) + `<span data-var="${esc(r.name)}" data-var-index="${Number(r.index) | 0}">${esc(text4.slice(r.from, r.to))}</span>`;
|
|
17938
|
+
at = r.to;
|
|
17939
|
+
}
|
|
17940
|
+
return out + esc(text4.slice(at));
|
|
17941
|
+
}
|
|
17645
17942
|
function decorate(html, n) {
|
|
17646
17943
|
if (n.strikethrough)
|
|
17647
17944
|
html = `<del>${html}</del>`;
|
|
@@ -17656,7 +17953,7 @@ function inline(n, ctx) {
|
|
|
17656
17953
|
return inlineSegmentsToHtml(n.segments ?? []);
|
|
17657
17954
|
switch (n.type) {
|
|
17658
17955
|
case "text":
|
|
17659
|
-
return decorate(esc(n.text), n);
|
|
17956
|
+
return decorate(n.variables?.length ? withVariables(n.text, n.variables) : esc(n.text), n);
|
|
17660
17957
|
case "code":
|
|
17661
17958
|
return decorate(`<code>${esc(n.text)}</code>`, n);
|
|
17662
17959
|
case "link": {
|
|
@@ -21086,6 +21383,37 @@ function listedLocations(nav, slugs, opts = {}) {
|
|
|
21086
21383
|
return out;
|
|
21087
21384
|
}
|
|
21088
21385
|
|
|
21386
|
+
// node_modules/@dogsbay/site-files/dist/link-summary.js
|
|
21387
|
+
var ENTITIES = Object.assign(/* @__PURE__ */ Object.create(null), {
|
|
21388
|
+
amp: "&",
|
|
21389
|
+
lt: "<",
|
|
21390
|
+
gt: ">",
|
|
21391
|
+
quot: '"',
|
|
21392
|
+
apos: "'",
|
|
21393
|
+
nbsp: "\xA0",
|
|
21394
|
+
hellip: "\u2026",
|
|
21395
|
+
mdash: "\u2014",
|
|
21396
|
+
ndash: "\u2013",
|
|
21397
|
+
lsquo: "\u2018",
|
|
21398
|
+
rsquo: "\u2019",
|
|
21399
|
+
ldquo: "\u201C",
|
|
21400
|
+
rdquo: "\u201D",
|
|
21401
|
+
laquo: "\xAB",
|
|
21402
|
+
raquo: "\xBB",
|
|
21403
|
+
copy: "\xA9",
|
|
21404
|
+
reg: "\xAE",
|
|
21405
|
+
trade: "\u2122",
|
|
21406
|
+
middot: "\xB7",
|
|
21407
|
+
times: "\xD7",
|
|
21408
|
+
para: "\xB6",
|
|
21409
|
+
sect: "\xA7",
|
|
21410
|
+
deg: "\xB0",
|
|
21411
|
+
rarr: "\u2192",
|
|
21412
|
+
larr: "\u2190",
|
|
21413
|
+
bull: "\u2022",
|
|
21414
|
+
shy: ""
|
|
21415
|
+
});
|
|
21416
|
+
|
|
21089
21417
|
// src/core/yaml.ts
|
|
21090
21418
|
function loadYaml(text4) {
|
|
21091
21419
|
if (text4.split(/\r?\n/).every((l) => /^\s*(?:\.\.\.\s*)?(?:#.*)?$/.test(l))) return void 0;
|
|
@@ -21181,6 +21509,7 @@ function stringsOf(raw) {
|
|
|
21181
21509
|
var VERSION_FLAGS = ["eol", "prerelease", "hidden", "noindex", "sitemap", "badge"];
|
|
21182
21510
|
var FLAG_PATHS = [
|
|
21183
21511
|
"poweredBy",
|
|
21512
|
+
"linkPreviews",
|
|
21184
21513
|
"ssg.breadcrumbs",
|
|
21185
21514
|
"ssg.strictTemplates",
|
|
21186
21515
|
"ssg.math",
|
|
@@ -21226,6 +21555,11 @@ function refuseYaml11Flags(raw) {
|
|
|
21226
21555
|
if (e && typeof e === "object" && [IMAGE_ZOOM, "image-zoom", "dogsbay-plugin-image-zoom"].includes(e.name)) walk(e.options, ["excludeInsideLinks"], `plugins[${i}].options`);
|
|
21227
21556
|
}
|
|
21228
21557
|
}
|
|
21558
|
+
function linkPreviewsOf(v) {
|
|
21559
|
+
if (v === void 0) return false;
|
|
21560
|
+
if (typeof v === "boolean") return v;
|
|
21561
|
+
throw new ConfigError(`linkPreviews must be true or false, not ${JSON.stringify(v)}`);
|
|
21562
|
+
}
|
|
21229
21563
|
function htmlOf(v) {
|
|
21230
21564
|
if (v === void 0 || v === null) return void 0;
|
|
21231
21565
|
if (v === "keep" || v === "sanitize") return v;
|
|
@@ -21315,6 +21649,7 @@ function parseConfig(text4, overrides = {}) {
|
|
|
21315
21649
|
// An empty tagline falls back too, as DocsLayout's `siteTagline || "Documentation"`.
|
|
21316
21650
|
tagline: String(site.tagline || "Documentation"),
|
|
21317
21651
|
poweredBy: raw.poweredBy !== false,
|
|
21652
|
+
linkPreviews: linkPreviewsOf(raw.linkPreviews),
|
|
21318
21653
|
// Same defaults as the Astro pipeline: the mirror, llms.txt and page actions are on unless turned off.
|
|
21319
21654
|
mdMirror: agent.mdMirror !== false,
|
|
21320
21655
|
mdMirrorLinks: (() => {
|
|
@@ -22386,7 +22721,7 @@ function staleUnitFiles(previous, now2, written, assets) {
|
|
|
22386
22721
|
}
|
|
22387
22722
|
|
|
22388
22723
|
// src/generated/versions.ts
|
|
22389
|
-
var PARSER_VERSION = "@dogsbay/format-dogsbay-md@0.2.0-beta.
|
|
22724
|
+
var PARSER_VERSION = "@dogsbay/format-dogsbay-md@0.2.0-beta.177 @dogsbay/corpus@0.2.0-beta.177 @dogsbay/minja@0.2.0-beta.177 @dogsbay/serialize-core@0.2.0-beta.177 @dogsbay/types@0.2.0-beta.177 gray-matter@4.0.3 js-yaml@5.5.0 markdown-it@14.3.2 markdown-it-attrs@5.0.1 markdown-it-deflist@3.0.1 markdown-it-footnote@4.0.0 markdown-it-front-matter@0.2.4 pele@1.6.0";
|
|
22390
22725
|
|
|
22391
22726
|
// src/core/tree-cache.ts
|
|
22392
22727
|
var FORMAT = "p1";
|
|
@@ -22771,10 +23106,10 @@ function unitPages(cfg, unit, units, files, frontMatterOf, read, includeDrafts)
|
|
|
22771
23106
|
}
|
|
22772
23107
|
|
|
22773
23108
|
// src/generated/assets.ts
|
|
22774
|
-
var CLIENT_JS = '/*! dogsbay-ssg site client (Apache-2.0). Third-party notices: THIRD-PARTY-NOTICES.txt */\n"use strict";(()=>{var Lo=Object.defineProperty;var ko=(n,t,e)=>t in n?Lo(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var m=(n,t,e)=>ko(n,typeof t!="symbol"?t+"":t,e);var Y=class extends HTMLElement{constructor(){super(...arguments);m(this,"_initialized",!1);m(this,"_deferred",!1)}connectedCallback(){if(!this._initialized&&!this.firstElementChild&&typeof document<"u"&&document.readyState==="loading"){this._deferred||(this._deferred=!0,document.addEventListener("DOMContentLoaded",()=>{this._deferred=!1,this.isConnected&&this.connectedCallback()},{once:!0}));return}this._initialized||(this.setup(),this._initialized=!0),this.connect()}disconnectedCallback(){this.disconnect()}setup(){}connect(){}disconnect(){}},To={"db-tabs":"block","db-accordion":"block","db-collapsible":"block","db-details-sheet":"block","db-card":"block","db-steps":"block","db-code-block":"block","db-link-button":"inline-block","db-dialog":"contents","db-popover":"inline-block","db-tooltip":"inline-block","db-select":"inline-block","db-combobox":"block","db-nav-tree":"block","db-toc":"block","db-announcement":"block"},xn="dogsbay-elements-display";function G(){if(typeof document>"u"||document.getElementById(xn))return;let n=Object.entries(To).map(([e,i])=>`:where(${e}){display:${i}}`).join(""),t=document.createElement("style");t.id=xn,t.textContent=n,document.head.prepend(t)}function Oo(n){return n.hasAttribute("disabled")||n.getAttribute("aria-disabled")==="true"}function Ut(n,t,e){let i=t;do i+=e?-1:1;while(i>=0&&i<n.length&&Oo(n[i]));return i}var re=class{constructor(n,t,e={}){m(this,"container");m(this,"itemSelector");m(this,"opts");m(this,"keydownHandler",null);m(this,"active",!1);this.container=n,this.itemSelector=t,this.opts={orientation:e.orientation??"horizontal",loop:e.loop??!0,homeEnd:e.homeEnd??!0,onHighlightedIndexChange:e.onHighlightedIndexChange??(()=>{})}}getItems(){return Array.from(this.container.querySelectorAll(this.itemSelector))}isForwardKey(n,t){let{orientation:e}=this.opts;return(e==="horizontal"||e==="both")&&n===(t?"ArrowLeft":"ArrowRight")||(e==="vertical"||e==="both")&&n==="ArrowDown"}isBackwardKey(n,t){let{orientation:e}=this.opts;return(e==="horizontal"||e==="both")&&n===(t?"ArrowRight":"ArrowLeft")||(e==="vertical"||e==="both")&&n==="ArrowUp"}activate(){this.active||(this.active=!0,this.keydownHandler=n=>{let t=this.getItems();if(t.length===0||n.ctrlKey||n.altKey||n.metaKey)return;let e=getComputedStyle(this.container).direction==="rtl",i=t.indexOf(document.activeElement);if(i===-1)return;let o=null;this.isForwardKey(n.key,e)?(o=Ut(t,i,!1),o>=t.length&&(o=this.opts.loop?Ut(t,-1,!1):i)):this.isBackwardKey(n.key,e)?(o=Ut(t,i,!0),o<0&&(o=this.opts.loop?Ut(t,t.length,!0):i)):this.opts.homeEnd&&n.key==="Home"?o=Ut(t,-1,!1):this.opts.homeEnd&&n.key==="End"&&(o=Ut(t,t.length,!0)),o!==null&&(o<0||o>=t.length||o!==i&&(n.preventDefault(),t[i].setAttribute("tabindex","-1"),t[o].setAttribute("tabindex","0"),t[o].focus(),this.opts.onHighlightedIndexChange(o)))},this.container.addEventListener("keydown",this.keydownHandler))}deactivate(){this.active&&(this.active=!1,this.keydownHandler&&(this.container.removeEventListener("keydown",this.keydownHandler),this.keydownHandler=null))}setActiveIndex(n,t){n.forEach((e,i)=>{e.setAttribute("tabindex",i===t?"0":"-1")})}isActive(){return this.active}};var Do=0;function Sn(n){return`${n}-${++Do}`}var An=class extends Y{constructor(){super(...arguments);m(this,"list");m(this,"triggers",[]);m(this,"panels",[]);m(this,"nav",null);m(this,"value","");m(this,"syncKey",null);m(this,"orientation","horizontal");m(this,"handleClick",t=>{let e=t.target.closest("[data-part=\'trigger\']");if(!e||e.hasAttribute("disabled"))return;let i=e.dataset.value;i&&this.select(i)});m(this,"handleStorage",t=>{if(!this.syncKey||t.key!==`db-tabs-sync:${this.syncKey}`)return;let e=t.newValue;e&&this.value!==e&&this.has(e)&&this.select(e)});m(this,"handleSyncEvent",(t=>{let e=t.detail.value;e&&this.value!==e&&this.has(e)&&this.select(e)}));m(this,"handleHashChange",()=>{let t=this.valueForHash();t&&(this.select(t.value),t.target&&this.reveal(t.target))})}has(t){return this.triggers.some(e=>e.dataset.value===t)}own(t){return Array.from(this.querySelectorAll(t)).filter(e=>e.closest("db-tabs")===this)}setup(){var s;let t=this.own("[data-part=\'list\']")[0]??null;if(!t)return;this.list=t,this.triggers=this.own("[data-part=\'trigger\']"),this.panels=this.own("[data-part=\'content\']"),this.orientation=this.getAttribute("orientation")||"horizontal",this.syncKey=this.getAttribute("sync-key")||null,t.setAttribute("role","tablist"),t.setAttribute("aria-orientation",this.orientation),this.triggers.forEach(r=>{let a=r.dataset.value;r.setAttribute("role","tab");let l=r.id||Sn("db-tab");r.id=l;let c=this.panels.find(d=>d.dataset.value===a);if(c){c.setAttribute("role","tabpanel");let d=c.id||Sn("db-tabpanel");c.id=d,r.setAttribute("aria-controls",d),c.setAttribute("aria-labelledby",l)}}),this.nav=new re(t,"[data-part=\'trigger\']",{orientation:this.orientation,loop:!0,homeEnd:!0,onHighlightedIndexChange:()=>{var l;let r=document.activeElement,a=(l=r==null?void 0:r.dataset)==null?void 0:l.value;a&&this.select(a)}}),this.nav.activate();let i=this.getAttribute("default-value")||((s=this.triggers[0])==null?void 0:s.dataset.value)||"";if(this.syncKey){let r=localStorage.getItem(`db-tabs-sync:${this.syncKey}`);r&&this.triggers.some(a=>a.dataset.value===r)&&(i=r)}let o=this.valueForHash();o&&(i=o.value),this.select(i),o!=null&&o.target&&this.reveal(o.target)}valueForHash(){let t=window.location.hash.slice(1);if(!t)return;try{t=decodeURIComponent(t)}catch{}if(this.triggers.some(o=>o.dataset.value===t))return{value:t};let e=document.getElementById(t);if(!e)return;let i=this.panels.find(o=>o===e||o.contains(e));return i!=null&&i.dataset.value?{value:i.dataset.value,target:e}:void 0}reveal(t){requestAnimationFrame(()=>{var e;return(e=t.scrollIntoView)==null?void 0:e.call(t)})}connect(){var t;(t=this.list)==null||t.addEventListener("click",this.handleClick),window.addEventListener("hashchange",this.handleHashChange),this.syncKey&&(window.addEventListener("storage",this.handleStorage),document.addEventListener(`db-tabs-sync:${this.syncKey}`,this.handleSyncEvent))}disconnect(){var t;(t=this.list)==null||t.removeEventListener("click",this.handleClick),window.removeEventListener("hashchange",this.handleHashChange),this.syncKey&&(window.removeEventListener("storage",this.handleStorage),document.removeEventListener(`db-tabs-sync:${this.syncKey}`,this.handleSyncEvent))}select(t){this.value!==t&&(this.value=t,this.triggers.forEach(e=>{let i=e.dataset.value===t;e.setAttribute("aria-selected",String(i)),e.setAttribute("tabindex",i?"0":"-1"),i?e.setAttribute("data-state","active"):e.removeAttribute("data-state")}),this.panels.forEach(e=>{let i=e.dataset.value===t;e.hidden=!i,i?(e.setAttribute("data-state","active"),e.hasAttribute("tabindex")||e.setAttribute("tabindex","0")):e.removeAttribute("data-state")}),this.syncKey&&(localStorage.setItem(`db-tabs-sync:${this.syncKey}`,t),document.dispatchEvent(new CustomEvent(`db-tabs-sync:${this.syncKey}`,{detail:{value:t,source:this}}))),this.dispatchEvent(new CustomEvent("db-tabs:change",{detail:{value:t},bubbles:!0})))}};G();customElements.get("db-tabs")||customElements.define("db-tabs",An);var Ro=0;function Mo(n){return`${n}-${++Ro}`}var Cn=class{constructor(n,t,e={}){m(this,"trigger");m(this,"content");m(this,"_open",!1);m(this,"opts");this.trigger=n,this.content=t,this.opts=e;let i=Mo("base-collapsible");n.id||(n.id=`${i}-trigger`),t.id||(t.id=`${i}-content`),n.setAttribute("aria-controls",t.id),t.setAttribute("aria-labelledby",n.id),t.setAttribute("role","region"),n.setAttribute("aria-expanded","false"),n.addEventListener("click",()=>{n.hasAttribute("disabled")||n.getAttribute("aria-disabled")==="true"||this.toggle()})}get isOpen(){return this._open}toggle(){this._open?this.collapse():this.expand()}expand(){var n,t;this._open||(this._open=!0,this.trigger.setAttribute("aria-expanded","true"),this.content.hidden=!1,this.content.setAttribute("data-state","open"),(t=(n=this.opts).onToggle)==null||t.call(n,!0))}collapse(){var n,t;this._open&&(this._open=!1,this.trigger.setAttribute("aria-expanded","false"),this.content.hidden=!0,this.content.removeAttribute("data-state"),(t=(n=this.opts).onToggle)==null||t.call(n,!1))}};var Ln=class extends Y{constructor(){super(...arguments);m(this,"items",[]);m(this,"nav",null);m(this,"openValues",new Set);m(this,"type","single")}setup(){this.type=this.getAttribute("type")||"single";let t=this.getAttribute("default-value")||"",e=t?t.split(","):[],i=Array.from(this.querySelectorAll("[data-part=\'item\']"));this.items=i.map(o=>{let s=o.querySelector("[data-part=\'trigger\']"),r=o.querySelector("[data-part=\'content\']");if(!s||!r)return null;let a=o.dataset.value||"",l=o.hasAttribute("data-disabled");l&&(s.setAttribute("disabled",""),s.setAttribute("aria-disabled","true"));let c=new Cn(s,r,{onToggle:d=>{d?this.onItemExpanded(a):this.onItemCollapsed(a)}});return{el:o,value:a,collapsible:c,disabled:l}}).filter(Boolean),this.nav=new re(this,"[data-part=\'trigger\']",{orientation:"vertical",loop:!0,homeEnd:!0}),this.nav.activate(),this.items.forEach((o,s)=>{o.collapsible.trigger.setAttribute("tabindex",s===0?"0":"-1")}),e.forEach(o=>{let s=this.items.find(r=>r.value===o&&!r.disabled);s&&s.collapsible.expand()})}onItemExpanded(t){if(this.type==="single"){for(let i of this.openValues)if(i!==t){let o=this.items.find(s=>s.value===i);o&&o.collapsible.collapse()}}this.openValues.add(t);let e=this.items.find(i=>i.value===t);e&&e.el.setAttribute("data-state","open"),this.dispatchEvent(new CustomEvent("db-accordion:change",{detail:{value:t,open:!0,openValues:[...this.openValues]},bubbles:!0}))}onItemCollapsed(t){this.openValues.delete(t);let e=this.items.find(i=>i.value===t);e&&e.el.removeAttribute("data-state"),this.dispatchEvent(new CustomEvent("db-accordion:change",{detail:{value:t,open:!1,openValues:[...this.openValues]},bubbles:!0}))}};G();customElements.get("db-accordion")||customElements.define("db-accordion",Ln);var Io=0;function Q(n){return`${n}-${++Io}`}function vt(n,t){let e=n.localName;return Array.from(n.querySelectorAll(t)).filter(i=>i.closest(e)===n)}function Z(n,t){return vt(n,t)[0]??null}function Wt(n){if(!n||!n.hasAttribute("data-as-child"))return n;let t=n.firstElementChild;if(!t)return n;let e=n.getAttribute("data-part");return e&&t.setAttribute("data-part",e),t}function dt(n){return n.hasAttribute("disabled")||n.getAttribute("aria-disabled")==="true"||n.getAttribute("data-disabled")==="true"}function kn(){return typeof HTMLElement<"u"&&typeof HTMLElement.prototype.showPopover=="function"}function Yt(n){if(n.hidden=!1,!kn())return"inline";n.hasAttribute("popover")||n.setAttribute("popover","manual"),n.style.inset="auto",n.style.margin="0";try{n.matches(":popover-open")||n.showPopover()}catch{return"inline"}return"top-layer"}function Gt(n){if(kn())try{n.matches(":popover-open")&&n.hidePopover()}catch{}n.hidden=!0}var No=\'a[href], button:not([disabled]), input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"]), [contenteditable="true"]\';function Tn(n){return Array.from(n.querySelectorAll(No)).filter(t=>!t.closest("[hidden]")&&!dt(t))}function On(n,t){let e=typeof n.getAnimations=="function"?n.getAnimations():[];if(!e.length)return t();Promise.all(e.map(i=>i.finished)).then(t,t)}function Xt(n){try{return decodeURIComponent(n)}catch{return n}}var Rn=class extends Y{constructor(){super(...arguments);m(this,"details",null);m(this,"summary",null);m(this,"dialog",null);m(this,"body",null);m(this,"source",null);m(this,"moved",[]);m(this,"handledHash",null);m(this,"onSummaryClick",t=>{var i,o;let e=t.target;e&&e!==this.summary&&((o=(i=e.closest)==null?void 0:i.call(e,"a[href], button, input, select, textarea, label"))==null?void 0:o.closest("summary"))===this.summary||(t.preventDefault(),this.show())});m(this,"onDialogClick",t=>{let e=this.dialog;if(!e||t.target!==e)return;let i=e.getBoundingClientRect();!(t.clientX>=i.left&&t.clientX<=i.right&&t.clientY>=i.top&&t.clientY<=i.bottom)&&(t.clientX!==0||t.clientY!==0)&&e.close()});m(this,"onDialogClose",()=>this.restore());m(this,"onDocClick",t=>{var s,r;if(t.defaultPrevented||t.button!==0||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey)return;let e=(r=(s=t.target)==null?void 0:s.closest)==null?void 0:r.call(s,"a[href]");if(!e||!this.details||this.open||e.hasAttribute("download")||e.target&&e.target!=="_self")return;let i=new URL(e.href,location.href);if(!i.hash||i.hash!==location.hash||i.pathname!==location.pathname||i.search!==location.search)return;let o=document.getElementById(Xt(i.hash.slice(1)));if(!(!o||!this.details.contains(o))){for(let a of this.details.querySelectorAll("db-details-sheet"))a.handledHash=null;this.show(o)}});m(this,"onHash",()=>{this.handledHash=null,this.openForHash()})}get open(){var t;return!!((t=this.dialog)!=null&&t.open)}setup(){var d;let t=Array.from(this.children).find(u=>u.tagName==="DETAILS")??null,e=t?Array.from(t.children).find(u=>u.tagName==="SUMMARY")??null:null,i=typeof HTMLDialogElement<"u"&&typeof HTMLDialogElement.prototype.showModal=="function";if(!t||!e||!i)return;for(let u of Array.from(t.children))u.getAttribute("role")==="status"&&u.setAttribute("aria-live","off");this.details=t,this.summary=e,t.open=!1,Ho();let o=(((d=e.querySelector("[data-part=\'title\']"))==null?void 0:d.textContent)??e.textContent??"").trim(),s=document.createElement("dialog");s.className="db-sheet",s.id=Q("db-sheet");let r=document.createElement("h2");r.className="db-sheet-title",r.id=Q("db-sheet-title"),r.textContent=o,s.setAttribute("aria-labelledby",r.id);let a=document.createElement("button");a.type="button",a.className="db-sheet-close",a.setAttribute("aria-label",this.getAttribute("close-label")||"Close"),a.innerHTML=\'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M18 6 6 18"/><path d="m6 6 12 12"/></svg>\',a.addEventListener("click",()=>s.close());let l=document.createElement("div");l.className="db-sheet-header",l.append(r,a);let c=document.createElement("div");c.className="db-sheet-body",s.append(l,c),this.append(s),this.dialog=s,this.body=c,e.setAttribute("aria-haspopup","dialog"),e.setAttribute("aria-controls",s.id),e.setAttribute("aria-expanded","false"),this.setAttribute("data-state","closed")}connect(){this.dialog&&(this.summary.addEventListener("click",this.onSummaryClick),this.dialog.addEventListener("click",this.onDialogClick),this.dialog.addEventListener("close",this.onDialogClose),window.addEventListener("hashchange",this.onHash),document.addEventListener("click",this.onDocClick),queueMicrotask(()=>this.isConnected&&this.openForHash()))}disconnect(){this.dialog&&(this.dialog.open&&this.dialog.close(),this.restore(!1),this.summary.removeEventListener("click",this.onSummaryClick),this.dialog.removeEventListener("click",this.onDialogClick),this.dialog.removeEventListener("close",this.onDialogClose),window.removeEventListener("hashchange",this.onHash),document.removeEventListener("click",this.onDocClick))}show(t){var l;let{dialog:e,details:i,body:o}=this;if(!e||!i||!o||e.open)return;let s=Array.from(i.childNodes).filter(c=>c!==this.summary),r=s.filter(c=>c.nodeType===Node.ELEMENT_NODE),a=r.length===1&&s.every(c=>{var d;return c===r[0]||!((d=c.textContent)!=null&&d.trim())})?r[0]:null;this.source=a??i,this.moved=a?Array.from(a.childNodes):s,o.append(...this.moved),e.showModal(),this.summary.setAttribute("aria-expanded","true"),this.setAttribute("data-state","open"),t&&t!==i&&((l=t.scrollIntoView)==null||l.call(t,{block:"start"})),this.dispatchEvent(new CustomEvent("db-details-sheet:open",{bubbles:!0}))}close(){var t;(t=this.dialog)==null||t.close()}restore(t=!0){var e,i;this.source&&(this.source.append(...this.moved),this.source=null,this.moved=[],this.summary.setAttribute("aria-expanded","false"),this.setAttribute("data-state","closed"),t&&this.isConnected&&((i=(e=this.summary).checkVisibility)==null?void 0:i.call(e))!==!1&&this.summary.focus(),this.dispatchEvent(new CustomEvent("db-details-sheet:close",{bubbles:!0})))}openForHash(){let t=Xt(location.hash.slice(1));if(!t||!this.details||this.handledHash===location.hash||(this.handledHash=location.hash,this.open))return;let e=document.getElementById(t);e&&this.details.contains(e)&&this.show(e)}},Dn="dogsbay-details-sheet";function Ho(){if(document.getElementById(Dn))return;let n=document.createElement("style");n.id=Dn,n.textContent=["dialog.db-sheet{position:fixed;inset:0 0 0 auto;margin:0;height:100dvh;max-height:none;width:min(32rem,100vw);max-width:100vw;padding:0;border:0;border-left:1px solid var(--border);background:var(--background);color:var(--foreground);box-shadow:0 10px 15px -3px rgb(0 0 0/.1),0 4px 6px -4px rgb(0 0 0/.1);flex-direction:column}","dialog.db-sheet[open]{display:flex}","dialog.db-sheet::backdrop{background:rgb(0 0 0/.6)}",".db-sheet-header{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1rem 1.5rem;border-bottom:1px solid var(--border)}","dialog.db-sheet h2.db-sheet-title{margin:0;padding:0;border:0;font-size:1.125rem;line-height:1.75rem;font-weight:600;scroll-margin:0}",".db-sheet-close{display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;border:0;border-radius:.375rem;background:transparent;color:var(--muted-foreground);cursor:pointer}",".db-sheet-close:hover{background:var(--accent,var(--muted));color:var(--foreground)}",".db-sheet-close:focus-visible{outline:2px solid var(--ring);outline-offset:2px}",".db-sheet-body{flex:1;overflow-y:auto;padding:1.5rem;font-size:.875rem;line-height:1.625}","dialog.db-sheet .db-sheet-body>:first-child{margin-top:0}","html:has(dialog.db-sheet[open]){overflow:hidden}","db-details-sheet>details>summary>span:last-child{transform:rotate(-90deg)}","@media (prefers-reduced-motion:no-preference){dialog.db-sheet[open]{animation:db-sheet-in .2s ease-out}dialog.db-sheet[open]::backdrop{animation:db-sheet-fade .2s ease-out}}","@keyframes db-sheet-in{from{transform:translateX(100%)}}","@keyframes db-sheet-fade{from{opacity:0}}"].join(""),document.head.append(n)}G();customElements.get("db-details-sheet")||customElements.define("db-details-sheet",Rn);var Mn=class extends Y{constructor(){super(...arguments);m(this,"copyBtn",null);m(this,"copyIcon",null);m(this,"checkIcon",null);m(this,"liveRegion",null);m(this,"resetTimeout",null);m(this,"handleCopy",async()=>{let t=this.getCopyText();if(t)try{await navigator.clipboard.writeText(t),this.showCopiedFeedback(),this.dispatchEvent(new CustomEvent("db-code-block:copied",{detail:{text:t},bubbles:!0}))}catch{}})}setup(){this.copyBtn=this.querySelector("[data-part=\'copy\']"),this.copyIcon=this.querySelector("[data-part=\'copy-icon\']"),this.checkIcon=this.querySelector("[data-part=\'check-icon\']"),this.copyBtn&&!this.copyBtn.hasAttribute("aria-label")&&this.copyBtn.setAttribute("aria-label","Copy code"),this.liveRegion=document.createElement("span"),this.liveRegion.setAttribute("aria-live","polite"),this.liveRegion.setAttribute("role","status"),this.liveRegion.className="sr-only",this.liveRegion.style.position="absolute",this.liveRegion.style.width="1px",this.liveRegion.style.height="1px",this.liveRegion.style.overflow="hidden",this.liveRegion.style.clip="rect(0, 0, 0, 0)",this.liveRegion.style.whiteSpace="nowrap",this.appendChild(this.liveRegion)}connect(){var t;(t=this.copyBtn)==null||t.addEventListener("click",this.handleCopy)}disconnect(){var t;(t=this.copyBtn)==null||t.removeEventListener("click",this.handleCopy),this.clearResetTimeout()}getCopyText(){let t=this.getAttribute("data-copy-text");if(t)return t;let e=this.querySelector("[data-part=\'code\'] code");if(e)return e.textContent??"";let i=this.querySelector("[data-part=\'code\']");return(i==null?void 0:i.textContent)??""}showCopiedFeedback(){this.clearResetTimeout(),this.copyIcon&&(this.copyIcon.hidden=!0),this.checkIcon&&(this.checkIcon.hidden=!1),this.setAttribute("data-state","copied"),this.liveRegion&&(this.liveRegion.textContent="Copied!"),this.resetTimeout=setTimeout(()=>{this.copyIcon&&(this.copyIcon.hidden=!1),this.checkIcon&&(this.checkIcon.hidden=!0),this.removeAttribute("data-state"),this.liveRegion&&(this.liveRegion.textContent=""),this.resetTimeout=null},2e3)}clearResetTimeout(){this.resetTimeout!==null&&(clearTimeout(this.resetTimeout),this.resetTimeout=null)}};G();customElements.get("db-code-block")||customElements.define("db-code-block",Mn);var In=class extends Y{constructor(){super(...arguments);m(this,"navData",null);m(this,"onClick",t=>{let e=t.target.closest("[data-part=\'toggle\']");if(!e||e.closest("db-nav-tree")!==this)return;let i=e.closest("[data-part=\'item\']");i&&(this.ensurePrepared(i),this.toggle(i))});m(this,"onKey",t=>{var c,d;if(t.altKey||t.ctrlKey||t.metaKey||t.shiftKey)return;let e=document.activeElement;if(!e||!this.contains(e))return;let i=this.visibleRows(),o=e.closest("[data-part=\'row\']"),s=o?i.indexOf(o):-1;if(s<0)return;let r=o.closest("[data-part=\'item\']");this.ensurePrepared(r);let a=!!this.groupOf(r),l=u=>{var h;u&&(t.preventDefault(),(h=this.primary(u))==null||h.focus())};switch(t.key){case"ArrowDown":return l(i[s+1]);case"ArrowUp":return l(i[s-1]);case"Home":return l(i[0]);case"End":return l(i[i.length-1]);case"ArrowRight":if(!a)return;t.preventDefault(),this.isOpen(r)?l(this.visibleRows()[s+1]):this.setOpen(r,!0);return;case"ArrowLeft":{if(t.preventDefault(),a&&this.isOpen(r))return this.setOpen(r,!1);let u=(c=r.parentElement)==null?void 0:c.closest("[data-part=\'item\']");if(u&&this.contains(u)){let h=u.querySelector(":scope > [data-part=\'row\']");h&&((d=this.primary(h))==null||d.focus())}return}}})}setup(){for(let t of vt(this,"[data-part=\'item\']"))t.style.getPropertyValue("--db-level")||t.style.setProperty("--db-level",String(this.depthOf(t))),this.prepareItem(t)}depthOf(t){var i,o;let e=0;for(let s=(i=t.parentElement)==null?void 0:i.closest("[data-part=\'item\']");s&&this.contains(s);s=(o=s.parentElement)==null?void 0:o.closest("[data-part=\'item\']"))e++;return e}pathOf(t){var i,o;let e=[];for(let s=t;s&&this.contains(s);s=((i=s.parentElement)==null?void 0:i.closest("[data-part=\'item\']"))??null){let r=Array.from(((o=s.parentElement)==null?void 0:o.children)??[]).filter(a=>a.getAttribute("data-part")==="item");e.unshift(r.indexOf(s))}return e.join(".")}connect(){this.addEventListener("click",this.onClick),this.addEventListener("keydown",this.onKey);for(let t of vt(this,"[data-part=\'group\'][data-lazy]")){let e=t.closest("[data-part=\'item\']");e&&this.isOpen(e)&&this.fill(t)}!this.fillEmpty()&&this.emptyList()&&document.readyState!=="complete"&&addEventListener("load",()=>this.isConnected&&this.fillEmpty()&&this.afterFill(),{once:!0}),this.afterFill()}afterFill(){this.hasAttribute("scroll-current")&&requestAnimationFrame(()=>this.revealCurrent())}emptyList(){let t=vt(this,"[data-part=\'list\']")[0];return t&&!t.querySelector("[data-part=\'item\']")?t:null}fillEmpty(){let t=this.emptyList(),e=this.data();if(!t||!e)return!1;t.replaceChildren(...this.build(e,""));let i=t,o=this.serverPath();for(let s of o!=null?o.split(".").map(Number):this.currentPath(e)){let r=Array.from(i.children).filter(l=>l.getAttribute("data-part")==="item")[s],a=r&&this.groupOf(r);if(!r||!a)break;a.hasAttribute("data-lazy")&&this.fill(a),this.apply(r,!0),i=a}return!0}serverPath(){var s;let t=(s=this.getAttribute("current-path"))==null?void 0:s.trim(),e=this.data();if(!t||!e||!/^\\d+(?:\\.\\d+)*$/.test(t))return null;let i=t.split(".").map(Number),o=e;for(let r of i){let a=o==null?void 0:o[r];if(!a)return null;o=a[2]}return i.join(".")}currentPath(t){let e=location.href.split("#")[0],i=o=>{for(let s=0;s<o.length;s++){let[,r,a,l]=o[s],c=r!=null&&!l?this.linkOf(r):null;if(c&&new URL(c.href,document.baseURI).href.split("#")[0]===e)return[s];let d=a!=null&&a.length?i(a):null;if(d)return[s,...d]}return null};return i(t)??[]}linkOf(t){let e=t.replace(/[\\u0000-\\u0020]/g,"");if(/^[a-z][a-z0-9+.-]*:/i.test(e)&&!/^(?:https?|mailto):/i.test(e))return null;let i=/^[a-z][a-z0-9+.-]*:|^\\/\\//i.test(e);return{href:i?t:(this.getAttribute("base")??"")+t,external:i}}disconnect(){this.removeEventListener("click",this.onClick),this.removeEventListener("keydown",this.onKey)}prepareItem(t){let e=t.querySelector(":scope > [data-part=\'row\'] > [data-part=\'toggle\']");if(!e)return;let i=this.groupOf(t);i||(i=document.createElement("ul"),i.setAttribute("data-part","group"),i.dataset.lazy="",i.dataset.path=this.pathOf(t),i.hidden=!0,t.appendChild(i));let o=t.querySelector(":scope > [data-part=\'row\'] > [data-part=\'link\']");o&&!e.hasAttribute("aria-label")&&!e.querySelector("[data-part=\'label\']")&&e.setAttribute("aria-label",(this.getAttribute("toggle-label")??"Toggle {label}").replace("{label}",()=>(o.getAttribute("aria-label")??o.textContent??"").trim())),this.getAttribute("chevron")!=="css"&&!e.querySelector("[data-part=\'chevron\']")&&e.insertAdjacentHTML("beforeend",Fo),i.id||(i.id=Q("db-nav-group")),e.setAttribute("aria-controls",i.id),e instanceof HTMLButtonElement&&!e.hasAttribute("type")&&(e.type="button");let s=e.getAttribute("aria-expanded")==="true"||t.getAttribute("data-state")==="open";this.apply(t,s)}ensurePrepared(t){let e=this.toggleOf(t);e&&!e.hasAttribute("aria-controls")&&this.prepareItem(t)}groupOf(t){return t.querySelector(":scope > [data-part=\'group\']")}toggleOf(t){return t.querySelector(":scope > [data-part=\'row\'] > [data-part=\'toggle\']")}primary(t){return t.querySelector(":scope > [data-part=\'link\']")??t.querySelector(":scope > [data-part=\'toggle\']")}visibleRows(){return vt(this,"[data-part=\'row\']").filter(t=>!t.closest("[hidden]"))}isOpen(t){return t.getAttribute("data-state")==="open"}toggle(t){this.setOpen(t,!this.isOpen(t))}setOpen(t,e){let i=this.groupOf(t);!i||this.isOpen(t)===e||(e&&i.hasAttribute("data-lazy")&&this.fill(i),this.apply(t,e),this.dispatchEvent(new CustomEvent("db-nav-tree:toggle",{detail:{item:t,open:e},bubbles:!0})))}apply(t,e){let i=this.groupOf(t),o=this.toggleOf(t);i&&(i.hidden=!e),o==null||o.setAttribute("aria-expanded",String(e)),t.setAttribute("data-state",e?"open":"closed")}revealCurrent(){var s;let t=this.querySelector("[aria-current=\'page\']");if(!t)return;for(let r=t.closest("[data-part=\'item\']");r&&this.contains(r);r=((s=r.parentElement)==null?void 0:s.closest("[data-part=\'item\']"))??null)this.groupOf(r)&&!this.groupOf(r).contains(t)||this.groupOf(r)&&this.setOpen(r,!0);let e=Po(this);if(!e)return;let i=t.getBoundingClientRect(),o=e.getBoundingClientRect();(i.top<o.top||i.bottom>o.bottom)&&(e.scrollTop+=i.top-o.top-o.height/2+i.height/2)}data(){if(this.navData)return this.navData;let t=this.getAttribute("data-source"),e=t?globalThis[t]:void 0;return Array.isArray(e)?e:null}fill(t){let e=this.data(),i=t.dataset.path;if(!e||i==null)return;let o=e,s;for(let r of i.split(".").map(Number))s=o==null?void 0:o[r],o=s==null?void 0:s[2];s!=null&&s[2]&&(t.replaceChildren(...this.build(s[2],i)),t.removeAttribute("data-lazy"))}build(t,e){let i=this.getAttribute("toggle-label")??"Toggle {label}",o=location.href.split("#")[0],s=this.serverPath();return t.map(([r,a,l,c],d)=>{let u=e?`${e}.${d}`:String(d),h=document.createElement("li");h.setAttribute("data-part","item"),h.style.setProperty("--db-level",String(u.split(".").length-1));let p=document.createElement("div");p.setAttribute("data-part","row"),h.appendChild(p);let b=a!=null?this.linkOf(a):null;b||(a=null);let g=null;if(l!=null&&l.length)if(g=document.createElement("button"),g.type="button",g.setAttribute("data-part","toggle"),g.setAttribute("aria-expanded","false"),a!=null)g.setAttribute("aria-label",i.replace("{label}",()=>r));else{let f=document.createElement("span");f.setAttribute("data-part","label"),f.textContent=r,g.appendChild(f)}let w=this.getAttribute("toggle-position")==="end";if(g&&!w&&p.appendChild(g),a!=null){let f=document.createElement("a");f.setAttribute("data-part","link"),f.textContent=r,f.href=b.href,b.external&&(f.rel="noopener"),(s!=null?u===s:!c&&f.href.split("#")[0]===o)&&f.setAttribute("aria-current","page"),p.appendChild(f)}if(a==null&&!(l!=null&&l.length)){let f=document.createElement("span");f.setAttribute("data-part","label"),f.textContent=r,p.appendChild(f)}if(g&&w&&p.appendChild(g),l!=null&&l.length){let f=document.createElement("ul");f.setAttribute("data-part","group"),f.dataset.lazy="",f.dataset.path=u,f.hidden=!0,h.setAttribute("data-state","closed"),h.appendChild(f),this.prepareItem(h)}return h})}},Fo=\'<svg data-part="chevron" viewBox="0 0 24 24" width="16" height="16" aria-hidden="true" focusable="false"><path d="m9 18 6-6-6-6" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>\';function Po(n){for(let t=n.parentElement;t;t=t.parentElement){let e=getComputedStyle(t).overflowY;if((e==="auto"||e==="scroll")&&t.scrollHeight>t.clientHeight)return t}return null}G();customElements.get("db-nav-tree")||customElements.define("db-nav-tree",In);var Nn=class extends Y{constructor(){super(...arguments);m(this,"links",[]);m(this,"headings",[]);m(this,"observer",null);m(this,"active",null);m(this,"onScroll",()=>{let t=document.documentElement;window.innerHeight+window.scrollY>=t.scrollHeight-2&&this.headings.length&&this.setActive(this.headings[this.headings.length-1].id)});m(this,"onHash",()=>{let t=Xt(location.hash.slice(1));t&&this.headings.some(e=>e.id===t)&&this.setActive(t)})}slugOf(t){return t.getAttribute("data-toc-slug")??Xt(t.getAttribute("href").slice(1))}setup(){this.links=Array.from(this.querySelectorAll("a[href^=\'#\'], a[data-toc-link]"))}connect(){var e;if(this.headings=this.links.map(i=>document.getElementById(this.slugOf(i))).filter(i=>!!i),!this.headings.length)return;let t=Number(this.getAttribute("offset")??80);typeof IntersectionObserver<"u"&&(this.observer=new IntersectionObserver(i=>{var s;let o=i.find(r=>r.isIntersecting);if(o)return this.setActive(o.target.id);this.setActive(((s=this.lastAbove(t))==null?void 0:s.id)??null)},{rootMargin:`-${t}px 0px -70% 0px`,threshold:0}),this.headings.forEach(i=>this.observer.observe(i))),window.addEventListener("hashchange",this.onHash),window.addEventListener("scroll",this.onScroll,{passive:!0}),this.setActive(((e=this.lastAbove(t))==null?void 0:e.id)??this.headings[0].id)}disconnect(){var t;(t=this.observer)==null||t.disconnect(),this.observer=null,window.removeEventListener("hashchange",this.onHash),window.removeEventListener("scroll",this.onScroll)}lastAbove(t){let e=null;for(let i of this.headings)i.getBoundingClientRect().top<=t+20&&(e=i);return e}setActive(t){if(!(!t||t===this.active)){this.active=t;for(let e of this.links)this.slugOf(e)===t?(e.setAttribute("aria-current","location"),e.setAttribute("data-active","")):(e.removeAttribute("aria-current"),e.removeAttribute("data-active"));this.dispatchEvent(new CustomEvent("db-toc:change",{detail:{id:t},bubbles:!0}))}}};G();customElements.get("db-toc")||customElements.define("db-toc",Nn);var _o=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","area[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",\'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)\',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],Ve=_o.join(","),Pn=typeof Element>"u",ae=Pn?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,we=!Pn&&Element.prototype.getRootNode?function(n){var t;return n==null||(t=n.getRootNode)===null||t===void 0?void 0:t.call(n)}:function(n){return n==null?void 0:n.ownerDocument},Ee=function(t,e){var i;e===void 0&&(e=!0);var o=t==null||(i=t.getAttribute)===null||i===void 0?void 0:i.call(t,"inert"),s=o===""||o==="true",r=s||e&&t&&(typeof t.closest=="function"?t.closest("[inert]"):Ee(t.parentNode));return r},zo=function(t){var e,i=t==null||(e=t.getAttribute)===null||e===void 0?void 0:e.call(t,"contenteditable");return i===""||i==="true"},$o=function(t,e,i){if(Ee(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Ve));return e&&ae.call(t,Ve)&&o.unshift(t),o=o.filter(i),o},je=function(t,e,i){for(var o=[],s=Array.from(t);s.length;){var r=s.shift();if(!Ee(r,!1))if(r.tagName==="SLOT"){var a=r.assignedElements(),l=a.length?a:r.children,c=je(l,!0,i);i.flatten?o.push.apply(o,c):o.push({scopeParent:r,candidates:c})}else{var d=ae.call(r,Ve);d&&i.filter(r)&&(e||!t.includes(r))&&o.push(r);var u=r.shadowRoot||typeof i.getShadowRoot=="function"&&i.getShadowRoot(r),h=!Ee(u,!1)&&(!i.shadowRootFilter||i.shadowRootFilter(r));if(u&&h){var p=je(u===!0?r.children:u.children,!0,i);i.flatten?o.push.apply(o,p):o.push({scopeParent:r,candidates:p})}else s.unshift.apply(s,r.children)}}return o},_n=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},zn=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||zo(t))&&!_n(t)?0:t.tabIndex},Bo=function(t,e){var i=zn(t);return i<0&&e&&!_n(t)?0:i},qo=function(t,e){return t.tabIndex===e.tabIndex?t.documentOrder-e.documentOrder:t.tabIndex-e.tabIndex},$n=function(t){return t.tagName==="INPUT"},Ko=function(t){return $n(t)&&t.type==="hidden"},Vo=function(t){var e=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(i){return i.tagName==="SUMMARY"});return e},jo=function(t,e){for(var i=0;i<t.length;i++)if(t[i].checked&&t[i].form===e)return t[i]},Uo=function(t){if(!t.name)return!0;var e=t.form||we(t),i=function(a){return e.querySelectorAll(\'input[type="radio"][name="\'+a+\'"]\')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=i(window.CSS.escape(t.name));else try{o=i(t.name)}catch(r){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",r.message),!1}var s=jo(o,t.form);return!s||s===t},Wo=function(t){return $n(t)&&t.type==="radio"},Yo=function(t){return Wo(t)&&!Uo(t)},Go=function(t){var e,i=t&&we(t),o=(e=i)===null||e===void 0?void 0:e.host,s=!1;if(i&&i!==t){var r,a,l;for(s=!!((r=o)!==null&&r!==void 0&&(a=r.ownerDocument)!==null&&a!==void 0&&a.contains(o)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!s&&o;){var c,d,u;i=we(o),o=(c=i)===null||c===void 0?void 0:c.host,s=!!((d=o)!==null&&d!==void 0&&(u=d.ownerDocument)!==null&&u!==void 0&&u.contains(o))}}return s},Hn=function(t){var e=t.getBoundingClientRect(),i=e.width,o=e.height;return i===0&&o===0},Xo=function(t,e){var i=e.displayCheck,o=e.getShadowRoot;if(i==="full-native"&&"checkVisibility"in t){var s=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!s}var r=getComputedStyle(t),a=r.visibility;if(a==="hidden"||a==="collapse")return!0;var l=ae.call(t,"details>summary:first-of-type"),c=l?t.parentElement:t;if(ae.call(c,"details:not([open]) *"))return!0;if(!i||i==="full"||i==="full-native"||i==="legacy-full"){if(typeof o=="function"){for(var d=t;t;){var u=t.parentElement,h=we(t);if(u&&!u.shadowRoot&&o(u)===!0)return Hn(t);t.assignedSlot?t=t.assignedSlot:!u&&h!==t.ownerDocument?t=h.host:t=u}t=d}if(Go(t))return!t.getClientRects().length;if(i!=="legacy-full")return!0}else if(i==="non-zero-area")return Hn(t);return!1},Qo=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var e=t.parentElement;e;){if(e.tagName==="FIELDSET"&&e.disabled){for(var i=0;i<e.children.length;i++){var o=e.children.item(i);if(o.tagName==="LEGEND")return ae.call(e,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}e=e.parentElement}return!1},Zo=function(t,e){return!(e.disabled||Ko(e)||Xo(e,t)||Vo(e)||Qo(e))},Fn=function(t,e){return!(Yo(e)||zn(e)<0||!Zo(t,e))},Jo=function(t){var e=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(e)||e>=0)},Bn=function(t){var e=[],i=[];return t.forEach(function(o,s){var r=!!o.scopeParent,a=r?o.scopeParent:o,l=Bo(a,r),c=r?Bn(o.candidates):a;l===0?r?e.push.apply(e,c):e.push(a):i.push({documentOrder:s,tabIndex:l,item:o,isScope:r,content:c})}),i.sort(qo).reduce(function(o,s){return s.isScope?o.push.apply(o,s.content):o.push(s.content),o},[]).concat(e)},Ue=function(t,e){e=e||{};var i;return e.getShadowRoot?i=je([t],e.includeContainer,{filter:Fn.bind(null,e),flatten:!1,getShadowRoot:e.getShadowRoot,shadowRootFilter:Jo}):i=$o(t,e.includeContainer,Fn.bind(null,e)),Bn(i)};var We=class{constructor(n,t={}){m(this,"root");m(this,"opts");m(this,"previouslyFocused",null);m(this,"keydownHandler",null);m(this,"active",!1);this.root=n,this.opts={initialFocus:t.initialFocus??"first",returnFocus:t.returnFocus??!0}}activate(){this.active||(this.active=!0,this.previouslyFocused=document.activeElement,this.keydownHandler=n=>{if(n.key!=="Tab")return;let t=Ue(this.root);if(t.length===0){n.preventDefault();return}let e=t[0],i=t[t.length-1];n.shiftKey?document.activeElement===e&&(i.focus(),n.preventDefault()):document.activeElement===i&&(e.focus(),n.preventDefault())},document.addEventListener("keydown",this.keydownHandler),requestAnimationFrame(()=>{var t;if(!this.active)return;let n=Ue(this.root);this.opts.initialFocus instanceof HTMLElement&&this.root.contains(this.opts.initialFocus)?this.opts.initialFocus.focus():this.opts.initialFocus==="container"?(this.root.hasAttribute("tabindex")||this.root.setAttribute("tabindex","-1"),this.root.focus()):(t=n[0])==null||t.focus()}))}deactivate(){this.active&&(this.active=!1,this.keydownHandler&&(document.removeEventListener("keydown",this.keydownHandler),this.keydownHandler=null),this.opts.returnFocus&&this.previouslyFocused&&document.contains(this.previouslyFocused)&&this.previouslyFocused.focus(),this.previouslyFocused=null)}isActive(){return this.active}};var et,It=(et=class{static activate(){if(et.count++,et.count>1)return;let t=window.innerWidth-document.documentElement.clientWidth;et.originalStyles={overflow:document.body.style.overflow,paddingRight:document.body.style.paddingRight},document.body.style.overflow="hidden",t>0&&(document.body.style.paddingRight=`${t}px`)}static deactivate(){et.count=Math.max(0,et.count-1),!(et.count>0)&&et.originalStyles&&(document.body.style.overflow=et.originalStyles.overflow,document.body.style.paddingRight=et.originalStyles.paddingRight,et.originalStyles=null)}static reset(){et.count=0,et.originalStyles=null}},m(et,"count",0),m(et,"originalStyles",null),et);var yt=[];function ts(n){if(n.key!=="Escape"||yt.length===0)return;let t=yt[yt.length-1];t.escapePrevented||(n.preventDefault(),n.stopPropagation(),t.opts.onDismiss("escape-key"))}var qn=!1;function es(){qn||(qn=!0,document.addEventListener("keydown",ts))}var Nt=class{constructor(n,t){m(this,"root");m(this,"opts");m(this,"outsideHandler",null);m(this,"active",!1);m(this,"frameId",null);m(this,"escapePrevented",!1);this.root=n,this.opts={onDismiss:t.onDismiss,escapeKey:t.escapeKey??!0,outsidePress:t.outsidePress??!0}}activate(){this.active||(this.active=!0,this.opts.escapeKey&&(es(),yt.push(this)),this.opts.outsidePress&&(this.outsideHandler=n=>{if(yt.length>0&&yt[yt.length-1]!==this)return;let t=n.target;if(this.root.contains(t))return;let e=this.root.id;if(e){let o=document.querySelector(`[aria-controls="${e}"]`);if(o!=null&&o.contains(t))return}let i=this.root.getAttribute("aria-labelledby");if(i){let o=document.getElementById(i);if(o!=null&&o.contains(t))return}typeof this.opts.outsidePress=="function"&&!this.opts.outsidePress(n)||this.opts.onDismiss("outside-press")},this.frameId=requestAnimationFrame(()=>{this.frameId=null,this.outsideHandler&&document.addEventListener("pointerdown",this.outsideHandler)})))}deactivate(){if(!this.active)return;this.active=!1;let n=yt.indexOf(this);n!==-1&&yt.splice(n,1),this.frameId!==null&&(cancelAnimationFrame(this.frameId),this.frameId=null),this.outsideHandler&&(document.removeEventListener("pointerdown",this.outsideHandler),this.outsideHandler=null)}isActive(){return this.active}};function Ye(n){let t=[],e=n;for(;e&&e!==document.body;){let i=e.parentElement;if(!i)break;for(let o=0;o<i.children.length;o++){let s=i.children[o];if(s===e||s.contains(n))continue;let r=s.tagName;if(r==="SCRIPT"||r==="STYLE"||r==="LINK")continue;let a=s.getAttribute("aria-hidden");a!=="true"&&(t.push({el:s,prev:a}),s.setAttribute("aria-hidden","true"))}e=i}return()=>{for(let{el:i,prev:o}of t)o===null?i.removeAttribute("aria-hidden"):i.setAttribute("aria-hidden",o)}}var Kn=class extends Y{constructor(){super(...arguments);m(this,"content",null);m(this,"backdrop",null);m(this,"trigger",null);m(this,"native",!1);m(this,"_open",!1);m(this,"openedBy",null);m(this,"focusTrap",null);m(this,"dismiss",null);m(this,"cleanupInert",null);m(this,"onTriggerClick",t=>{t.preventDefault(),this.toggle(t.currentTarget)});m(this,"onHostClick",t=>{let e=t.target.closest("[data-part=\'close\']");e&&e.closest("db-dialog")===this&&this.close("close-press")});m(this,"onDocumentClick",t=>{var o,s,r;let e=(s=(o=t.target).closest)==null?void 0:s.call(o,"[data-dialog-for]");if(!e||e===this.trigger)return;let i=e.getAttribute("data-dialog-for");i&&(i===this.id||i===((r=this.content)==null?void 0:r.id))&&(t.preventDefault(),this.toggle(e))});m(this,"onCancel",t=>{t.preventDefault(),this.dismissible&&this.close("escape-key")});m(this,"onNativeClick",t=>{if(!this.dismissible||t.target!==this.content||!this.content)return;let e=this.content.getBoundingClientRect();!(t.clientX>=e.left&&t.clientX<=e.right&&t.clientY>=e.top&&t.clientY<=e.bottom)&&(t.clientX!==0||t.clientY!==0)&&this.close("outside-press")});m(this,"onNativeClose",()=>{this._open&&this.finishClose("close-press")})}get open(){return this._open}get dismissible(){return this.getAttribute("dismissible")!=="false"}setup(){if(this.content=Z(this,"[data-part=\'content\']"),!this.content)return;this.native=typeof HTMLDialogElement<"u"&&this.content instanceof HTMLDialogElement&&typeof this.content.showModal=="function",this.backdrop=Z(this,"[data-part=\'backdrop\']"),this.trigger=Wt(Z(this,"[data-part=\'trigger\']"));let t=this.content;t.id||(t.id=Q("db-dialog")),this.native||(t.setAttribute("role",t.getAttribute("role")||"dialog"),t.setAttribute("aria-modal","true"),t.hidden=!this.hasAttribute("open"),this.backdrop&&(this.backdrop.hidden=!0));let e=t.querySelector("[data-part=\'title\']");e&&!t.hasAttribute("aria-labelledby")&&!t.hasAttribute("aria-label")&&(e.id||(e.id=Q("db-dialog-title")),t.setAttribute("aria-labelledby",e.id));let i=t.querySelector("[data-part=\'description\']");i&&!t.hasAttribute("aria-describedby")&&(i.id||(i.id=Q("db-dialog-desc")),t.setAttribute("aria-describedby",i.id));for(let o of this.triggers())this.prepareTrigger(o);this.setState("closed"),this.native||(this.focusTrap=new We(t),this.dismiss=new Nt(t,{onDismiss:o=>this.dismissible&&this.close(o)}))}connect(){var t;this.content&&((t=this.trigger)==null||t.addEventListener("click",this.onTriggerClick),this.addEventListener("click",this.onHostClick),document.addEventListener("click",this.onDocumentClick),this.native&&(this.content.addEventListener("cancel",this.onCancel),this.content.addEventListener("click",this.onNativeClick),this.content.addEventListener("close",this.onNativeClose)),queueMicrotask(()=>{if(this.isConnected){for(let e of this.triggers())e.hasAttribute("aria-controls")||this.prepareTrigger(e);this.hasAttribute("open")&&!this._open&&this.show()}}))}disconnect(){var t;(t=this.trigger)==null||t.removeEventListener("click",this.onTriggerClick),this.removeEventListener("click",this.onHostClick),document.removeEventListener("click",this.onDocumentClick),this.content&&this.native&&(this.content.removeEventListener("cancel",this.onCancel),this.content.removeEventListener("click",this.onNativeClick),this.content.removeEventListener("close",this.onNativeClose)),this._open&&this.finishClose("api",!1)}triggers(){var i;let t=this.trigger?[this.trigger]:[],e=[this.id,(i=this.content)==null?void 0:i.id].filter(Boolean);for(let o of e)document.querySelectorAll(`[data-dialog-for="${CSS.escape(o)}"]`).forEach(s=>t.push(s));return t}prepareTrigger(t){t.hasAttribute("aria-haspopup")||t.setAttribute("aria-haspopup","dialog"),t.setAttribute("aria-controls",this.content.id),t.setAttribute("aria-expanded","false")}setState(t){var e,i;this.setAttribute("data-state",t),(e=this.content)==null||e.setAttribute("data-state",t),(i=this.backdrop)==null||i.setAttribute("data-state",t)}toggle(t){this._open?this.close("trigger-press"):this.show(t)}show(t){var i,o;let e=this.content;if(!(!e||this._open)){this._open=!0,this.openedBy=t??document.activeElement??this.trigger;for(let s of this.triggers())this.prepareTrigger(s),s.setAttribute("aria-expanded","true");if(It.activate(),this.native){let s=e;s.open||s.showModal()}else e.hidden=!1,this.backdrop&&(this.backdrop.hidden=!1),this.cleanupInert=Ye(e),(i=this.focusTrap)==null||i.activate(),(o=this.dismiss)==null||o.activate();this.setState("open"),this.dispatchEvent(new CustomEvent("db-dialog:open",{bubbles:!0}))}}close(t="api"){this._open&&this.finishClose(t)}finishClose(t,e=!0){var s,r,a;let i=this.content;this._open=!1,this.setState("closed");for(let l of this.triggers())l.setAttribute("aria-expanded","false");if(It.deactivate(),this.native){let l=i;l.open&&l.close()}else(s=this.dismiss)==null||s.deactivate(),(r=this.focusTrap)==null||r.deactivate(),(a=this.cleanupInert)==null||a.call(this),this.cleanupInert=null,On(i,()=>{this._open||(i.hidden=!0,this.backdrop&&(this.backdrop.hidden=!0))});let o=this.openedBy;this.openedBy=null,e&&o&&document.contains(o)&&o.focus(),this.dispatchEvent(new CustomEvent("db-dialog:close",{detail:{reason:t},bubbles:!0}))}};G();customElements.get("db-dialog")||customElements.define("db-dialog",Kn);var Vn=class extends Y{constructor(){super(...arguments);m(this,"input",null);m(this,"listbox",null);m(this,"empty",null);m(this,"_open",!1);m(this,"highlighted",null);m(this,"observer",null);m(this,"base",Q("db-combobox"));m(this,"optionSeq",0);m(this,"onInput",()=>{this.filtering?this.filter(this.input.value):this.show()});m(this,"onFocus",()=>{(this.hasAttribute("open-on-focus")||this.filtering&&this.input.value)&&(this.filtering?this.filter(this.input.value):this.show())});m(this,"onKey",t=>{let e=this.visible(),i=this.highlighted?e.indexOf(this.highlighted):-1;switch(t.key){case"ArrowDown":t.preventDefault(),this._open||this.show(),e.length&&this.highlight(e[i<0?0:Math.min(i+1,e.length-1)]);break;case"ArrowUp":t.preventDefault(),this._open||this.show(),e.length&&this.highlight(e[i<0?e.length-1:Math.max(i-1,0)]);break;case"Home":case"End":this._open&&this.highlighted&&e.length&&(t.preventDefault(),this.highlight(t.key==="Home"?e[0]:e[e.length-1]));break;case"Enter":this._open&&this.highlighted&&(t.preventDefault(),this.choose(this.highlighted));break;case"Escape":this._open&&!this.inline?(t.preventDefault(),t.stopPropagation(),this.hide()):this.input.value&&(t.preventDefault(),t.stopPropagation(),this.input.value="",this.input.dispatchEvent(new Event("input",{bubbles:!0})),this.hide());break;case"Tab":this.inline||this.hide();break}});m(this,"onListClick",t=>{let e=t.target.closest("[data-part=\'option\']");if(!e||e.closest("db-combobox")!==this||dt(e))return;let i=t.target.closest("a[href]");!this.choose(e,!i)&&i&&t.preventDefault()});m(this,"onListPointer",t=>{let e=t.target.closest("[data-part=\'option\']");e&&e.closest("db-combobox")===this&&!dt(e)&&!e.hidden&&this.highlight(e)});m(this,"onListDown",t=>t.preventDefault());m(this,"onDocDown",t=>{this._open&&!this.inline&&!this.contains(t.target)&&this.hide()})}get open(){return this._open}get inline(){return this.hasAttribute("inline")}get filtering(){return(this.getAttribute("filter")??"contains")!=="none"}options(){return this.listbox?Array.from(this.listbox.querySelectorAll("[data-part=\'option\']")).filter(t=>t.closest("db-combobox")===this):[]}visible(){return this.options().filter(t=>!t.hidden&&!dt(t))}setup(){if(this.input=Z(this,"[data-part=\'input\']"),this.listbox=Z(this,"[data-part=\'listbox\']"),this.empty=Z(this,"[data-part=\'empty\']"),!this.input||!this.listbox)return;let{input:t,listbox:e}=this;e.id||(e.id=`${this.base}-listbox`),e.setAttribute("role","listbox"),t.setAttribute("role","combobox"),t.setAttribute("aria-autocomplete","list"),t.setAttribute("aria-controls",e.id),t.setAttribute("autocomplete","off"),this.inline||(e.hidden=!0),this.prepareOptions(),this.syncExpanded()}prepareOptions(){this.options().forEach(t=>{t.id||(t.id=`${this.base}-option-${++this.optionSeq}`),t.setAttribute("role","option"),t.hasAttribute("aria-selected")||t.setAttribute("aria-selected","false"),t.matches("a[href], button")&&t.setAttribute("tabindex","-1"),t.querySelectorAll("a, button").forEach(e=>e.setAttribute("tabindex","-1")),t.parentElement&&t.parentElement!==this.listbox&&t.parentElement.localName==="li"&&!t.parentElement.hasAttribute("role")&&t.parentElement.setAttribute("role","none")})}connect(){let{input:t,listbox:e}=this;!t||!e||(t.addEventListener("input",this.onInput),t.addEventListener("focus",this.onFocus),t.addEventListener("keydown",this.onKey),e.addEventListener("click",this.onListClick),e.addEventListener("pointermove",this.onListPointer),e.addEventListener("mousedown",this.onListDown),document.addEventListener("pointerdown",this.onDocDown),typeof MutationObserver<"u"&&(this.observer=new MutationObserver(()=>this.onOptionsChanged()),this.observer.observe(e,{childList:!0,subtree:!0})))}disconnect(){var i;let{input:t,listbox:e}=this;t==null||t.removeEventListener("input",this.onInput),t==null||t.removeEventListener("focus",this.onFocus),t==null||t.removeEventListener("keydown",this.onKey),e==null||e.removeEventListener("click",this.onListClick),e==null||e.removeEventListener("pointermove",this.onListPointer),e==null||e.removeEventListener("mousedown",this.onListDown),document.removeEventListener("pointerdown",this.onDocDown),(i=this.observer)==null||i.disconnect(),this.observer=null}refresh(){this.onOptionsChanged()}onOptionsChanged(){this.prepareOptions(),this.highlighted&&!this.options().includes(this.highlighted)&&this.clearHighlight();let t=this.visible();this.filtering||(t.length||this.inline?this.show():this.hide(),t.length&&!this.highlighted&&!this.hasAttribute("no-autohighlight")&&this.highlight(t[0])),this.syncExpanded(),this.dispatchEvent(new CustomEvent("db-combobox:update",{detail:{count:t.length},bubbles:!0}))}filter(t){let e=t.toLowerCase().trim(),i=0;for(let s of this.options()){let r=!e||(s.textContent??"").toLowerCase().includes(e)||(s.dataset.value??"").toLowerCase().includes(e);s.hidden=!r,r&&i++}this.empty&&(this.empty.hidden=i>0||!e),this.clearHighlight(),i||e&&this.empty?this.show():this.hide();let o=this.visible();o.length&&!this.hasAttribute("no-autohighlight")&&this.highlight(o[0]),this.dispatchEvent(new CustomEvent("db-combobox:update",{detail:{count:i},bubbles:!0}))}syncExpanded(){if(!this.input)return;let t=this.inline?this.visible().length>0:this._open;this.input.setAttribute("aria-expanded",String(t)),this.setAttribute("data-state",t?"open":"closed")}show(){if(!this.listbox||this._open)return this.syncExpanded();this._open=!0,this.listbox.hidden=!1,this.syncExpanded()}hide(){if(this.listbox){if(this.clearHighlight(),!this._open)return this.syncExpanded();this._open=!1,this.inline||(this.listbox.hidden=!0),this.syncExpanded()}}highlight(t){var e,i,o;this.input&&((e=this.highlighted)==null||e.removeAttribute("data-highlighted"),(i=this.highlighted)==null||i.setAttribute("aria-selected","false"),this.highlighted=t,t.setAttribute("data-highlighted",""),t.setAttribute("aria-selected","true"),this.input.setAttribute("aria-activedescendant",t.id),(o=t.scrollIntoView)==null||o.call(t,{block:"nearest"}))}clearHighlight(){var t,e,i;(t=this.highlighted)==null||t.removeAttribute("data-highlighted"),(e=this.highlighted)==null||e.setAttribute("aria-selected","false"),this.highlighted=null,(i=this.input)==null||i.removeAttribute("aria-activedescendant")}choose(t,e=!0){var a;let i=t.dataset.value??"",o=((a=t.textContent)==null?void 0:a.trim())??i,s=new CustomEvent("db-combobox:select",{detail:{value:i,text:o,option:t},bubbles:!0,cancelable:!0});if(!this.dispatchEvent(s))return!1;let r=t.matches("a[href]")?t:t.querySelector("a[href]");return r?(e&&r.click(),!0):(this.input&&(this.input.value=t.getAttribute("data-label")??o),this.inline||this.hide(),this.dispatchEvent(new CustomEvent("db-combobox:change",{detail:{value:i,text:o},bubbles:!0})),!0)}};G();customElements.get("db-combobox")||customElements.define("db-combobox",Vn);var Ct=Math.min,ut=Math.max,ce=Math.round,de=Math.floor,mt=n=>({x:n,y:n}),ns={left:"right",right:"left",bottom:"top",top:"bottom"};function Wn(n,t,e){return ut(n,Ct(t,e))}function Qt(n,t){return typeof n=="function"?n(t):n}function Lt(n){return n.split("-")[0]}function Zt(n){return n.split("-")[1]}function Ge(n){return n==="x"?"y":"x"}function Xe(n){return n==="y"?"height":"width"}function pt(n){let t=n[0];return t==="t"||t==="b"?"y":"x"}function Qe(n){return Ge(pt(n))}function Yn(n,t,e){e===void 0&&(e=!1);let i=Zt(n),o=Qe(n),s=Xe(o),r=o==="x"?i===(e?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(r=le(r)),[r,le(r)]}function Gn(n){let t=le(n);return[xe(n),t,xe(t)]}function xe(n){return n.includes("start")?n.replace("start","end"):n.replace("end","start")}var jn=["left","right"],Un=["right","left"],is=["top","bottom"],os=["bottom","top"];function ss(n,t,e){switch(n){case"top":case"bottom":return e?t?Un:jn:t?jn:Un;case"left":case"right":return t?is:os;default:return[]}}function Xn(n,t,e,i){let o=Zt(n),s=ss(Lt(n),e==="start",i);return o&&(s=s.map(r=>r+"-"+o),t&&(s=s.concat(s.map(xe)))),s}function le(n){let t=Lt(n);return ns[t]+n.slice(t.length)}function rs(n){var t,e,i,o;return{top:(t=n.top)!=null?t:0,right:(e=n.right)!=null?e:0,bottom:(i=n.bottom)!=null?i:0,left:(o=n.left)!=null?o:0}}function Qn(n){return typeof n!="number"?rs(n):{top:n,right:n,bottom:n,left:n}}function Ht(n){let{x:t,y:e,width:i,height:o}=n;return{width:i,height:o,top:e,left:t,right:t+i,bottom:e+o,x:t,y:e}}function Zn(n,t,e){let{reference:i,floating:o}=n,s=pt(t),r=Qe(t),a=Xe(r),l=Lt(t),c=s==="y",d=i.x+i.width/2-o.width/2,u=i.y+i.height/2-o.height/2,h=i[a]/2-o[a]/2,p;switch(l){case"top":p={x:d,y:i.y-o.height};break;case"bottom":p={x:d,y:i.y+i.height};break;case"right":p={x:i.x+i.width,y:u};break;case"left":p={x:i.x-o.width,y:u};break;default:p={x:i.x,y:i.y}}let b=Zt(t);return b&&(p[r]+=h*(b==="end"?1:-1)*(e&&c?-1:1)),p}async function Jn(n,t){var e;t===void 0&&(t={});let{x:i,y:o,platform:s,rects:r,elements:a,strategy:l}=n,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:h=!1,padding:p=0}=Qt(t,n),b=Qn(p),w=a[h?u==="floating"?"reference":"floating":u],f=Ht(await s.getClippingRect({element:(e=await(s.isElement==null?void 0:s.isElement(w)))==null||e?w:w.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:l})),v=u==="floating"?{x:i,y:o,width:r.floating.width,height:r.floating.height}:r.reference,E=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),C=await(s.isElement==null?void 0:s.isElement(E))&&await(s.getScale==null?void 0:s.getScale(E))||{x:1,y:1},I=Ht(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:v,offsetParent:E,strategy:l}):v);return{top:(f.top-I.top+b.top)/C.y,bottom:(I.bottom-f.bottom+b.bottom)/C.y,left:(f.left-I.left+b.left)/C.x,right:(I.right-f.right+b.right)/C.x}}var as=50,ti=async(n,t,e)=>{let{placement:i="bottom",strategy:o="absolute",middleware:s=[],platform:r}=e,a=r.detectOverflow?r:{...r,detectOverflow:Jn},l=await(r.isRTL==null?void 0:r.isRTL(t)),c=await r.getElementRects({reference:n,floating:t,strategy:o}),{x:d,y:u}=Zn(c,i,l),h=i,p=0,b={};for(let g=0;g<s.length;g++){let w=s[g];if(!w)continue;let{name:f,fn:v}=w,{x:E,y:C,data:I,reset:L}=await v({x:d,y:u,initialPlacement:i,placement:h,strategy:o,middlewareData:b,rects:c,platform:a,elements:{reference:n,floating:t}});d=E??d,u=C??u,b[f]={...b[f],...I},L&&p<as&&(p++,typeof L=="object"&&(L.placement&&(h=L.placement),L.rects&&(c=L.rects===!0?await r.getElementRects({reference:n,floating:t,strategy:o}):L.rects),{x:d,y:u}=Zn(c,h,l)),g=-1)}return{x:d,y:u,placement:h,strategy:o,middlewareData:b}};var ei=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(t){var e,i;let{placement:o,middlewareData:s,rects:r,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:g=!0,...w}=Qt(n,t);if((e=s.arrow)!=null&&e.alignmentOffset)return{};let f=Lt(o),v=pt(a),E=Lt(a)===a,C=await(l.isRTL==null?void 0:l.isRTL(c.floating)),I=h||(E||!g?[le(a)]:Gn(a)),L=b!=="none";!h&&L&&I.push(...Xn(a,g,b,C));let x=[a,...I],y=await l.detectOverflow(t,w),X=[],z=((i=s.flip)==null?void 0:i.overflows)||[];if(d&&X.push(y[f]),u){let _=Yn(o,r,C);X.push(y[_[0]],y[_[1]])}if(z=[...z,{placement:o,overflows:X}],!X.every(_=>_<=0)){var U,S;let _=(((U=s.flip)==null?void 0:U.index)||0)+1,B=x[_];if(B&&(!(u==="alignment"?v!==pt(B):!1)||z.every(K=>pt(K.placement)===v?K.overflows[0]>0:!0)))return{data:{index:_,overflows:z},reset:{placement:B}};let F=(S=z.filter($=>$.overflows[0]<=0).sort(($,K)=>$.overflows[1]-K.overflows[1])[0])==null?void 0:S.placement;if(!F)switch(p){case"bestFit":{var O;let $=(O=z.filter(K=>{if(L){let J=pt(K.placement);return J===v||J==="y"}return!0}).map(K=>[K.placement,K.overflows.filter(J=>J>0).reduce((J,nt)=>J+nt,0)]).sort((K,J)=>K[1]-J[1])[0])==null?void 0:O[0];$&&(F=$);break}case"initialPlacement":F=a;break}if(o!==F)return{reset:{placement:F}}}return{}}}};var ls=new Set(["left","top"]);async function cs(n,t){let{placement:e,platform:i,elements:o}=n,s=await(i.isRTL==null?void 0:i.isRTL(o.floating)),r=Lt(e),a=Zt(e),l=pt(e)==="y",c=ls.has(r)?-1:1,d=s&&l?-1:1,u=Qt(t,n),{mainAxis:h,crossAxis:p,alignmentAxis:b}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return a&&typeof b=="number"&&(p=a==="end"?b*-1:b),l?{x:p*d,y:h*c}:{x:h*c,y:p*d}}var ni=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(t){var e,i;let{x:o,y:s,placement:r,middlewareData:a}=t,l=await cs(t,n);return r===((e=a.offset)==null?void 0:e.placement)&&(i=a.arrow)!=null&&i.alignmentOffset?{}:{x:o+l.x,y:s+l.y,data:{...l,placement:r}}}}},ii=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(t){let{x:e,y:i,placement:o,platform:s}=t,{mainAxis:r=!0,crossAxis:a=!1,limiter:l={fn:v=>{let{x:E,y:C}=v;return{x:E,y:C}}},...c}=Qt(n,t),d={x:e,y:i},u=await s.detectOverflow(t,c),h=pt(o),p=Ge(h),b=d[p],g=d[h],w=(v,E)=>Wn(E+u[v==="y"?"top":"left"],E,E-u[v==="y"?"bottom":"right"]);r&&(b=w(p,b)),a&&(g=w(h,g));let f=l.fn({...t,[p]:b,[h]:g});return{...f,data:{x:f.x-e,y:f.y-i,enabled:{[p]:r,[h]:a}}}}}};var oi=function(n){return n===void 0&&(n={}),{name:"size",options:n,async fn(t){let{placement:e,rects:i,platform:o,elements:s}=t,{apply:r=()=>{},...a}=Qt(n,t),l=await o.detectOverflow(t,a),c=Lt(e),d=Zt(e),u=pt(e)==="y",{width:h,height:p}=i.floating,b,g;c==="top"||c==="bottom"?(b=c,g=d===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?"start":"end")?"left":"right"):(g=c,b=d==="end"?"top":"bottom");let w=p-l.top-l.bottom,f=h-l.left-l.right,v=Ct(p-l[b],w),E=Ct(h-l[g],f),C=t.middlewareData.shift,I=!C,L=v,x=E;C!=null&&C.enabled.x&&(x=f),C!=null&&C.enabled.y&&(L=w),I&&!d&&(u?x=h-2*ut(l.left,l.right):L=p-2*ut(l.top,l.bottom)),await r({...t,availableWidth:x,availableHeight:L});let y=await o.getDimensions(s.floating);return h!==y.width||p!==y.height?{reset:{rects:!0}}:{}}}};function Se(){return typeof window<"u"}function Pt(n){return ri(n)?(n.nodeName||"").toLowerCase():"#document"}function st(n){var t;return(n==null||(t=n.ownerDocument)==null?void 0:t.defaultView)||window}function gt(n){var t;return(t=(ri(n)?n.ownerDocument:n.document)||window.document)==null?void 0:t.documentElement}function ri(n){return Se()?n instanceof Node||n instanceof st(n).Node:!1}function ht(n){return Se()?n instanceof Element||n instanceof st(n).Element:!1}function wt(n){return Se()?n instanceof HTMLElement||n instanceof st(n).HTMLElement:!1}function si(n){return!Se()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof st(n).ShadowRoot}function ue(n){let{overflow:t,overflowX:e,overflowY:i,display:o}=ft(n);return/auto|scroll|overlay|hidden|clip/.test(t+i+e)&&o!=="inline"&&o!=="contents"}function ai(n){return/^(table|td|th)$/.test(Pt(n))}function he(n){try{if(n.matches(":popover-open"))return!0}catch{}try{return n.matches(":modal")}catch{return!1}}var ds=/transform|translate|scale|rotate|perspective|filter/,us=/paint|layout|strict|content/,Ft=n=>!!n&&n!=="none",Ze;function Ae(n){let t=ht(n)?ft(n):n;return Ft(t.transform)||Ft(t.translate)||Ft(t.scale)||Ft(t.rotate)||Ft(t.perspective)||!Ce()&&(Ft(t.backdropFilter)||Ft(t.filter))||ds.test(t.willChange||"")||us.test(t.contain||"")}function li(n){let t=kt(n);for(;wt(t)&&!te(t);){if(Ae(t))return t;if(he(t))return null;t=kt(t)}return null}function Ce(){return Ze==null&&(Ze=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Ze}function te(n){return/^(html|body|#document)$/.test(Pt(n))}function ft(n){return st(n).getComputedStyle(n)}function fe(n){return ht(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function kt(n){if(Pt(n)==="html")return n;let t=n.assignedSlot||n.parentNode||si(n)&&n.host||gt(n);return si(t)?t.host:t}function ci(n){let t=kt(n);return te(t)?(n.ownerDocument||n).body:wt(t)&&ue(t)?t:ci(t)}function Jt(n,t,e){var i;t===void 0&&(t=[]),e===void 0&&(e=!0);let o=ci(n),s=o===((i=n.ownerDocument)==null?void 0:i.body),r=st(o);if(s){let a=Le(r);return t.concat(r,r.visualViewport||[],ue(o)?o:[],a&&e?Jt(a):[])}else return t.concat(o,Jt(o,[],e))}function Le(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function hi(n){let t=ft(n),e=parseFloat(t.width)||0,i=parseFloat(t.height)||0,o=wt(n),s=o?n.offsetWidth:e,r=o?n.offsetHeight:i,a=ce(e)!==s||ce(i)!==r;return a&&(e=s,i=r),{width:e,height:i,$:a}}function tn(n){return ht(n)?n:n.contextElement}function ee(n){let t=tn(n);if(!wt(t))return mt(1);let e=t.getBoundingClientRect(),{width:i,height:o,$:s}=hi(t),r=(s?ce(e.width):e.width)/i,a=(s?ce(e.height):e.height)/o;return(!r||!Number.isFinite(r))&&(r=1),(!a||!Number.isFinite(a))&&(a=1),{x:r,y:a}}var hs=mt(0);function fi(n){let t=st(n);return!Ce()||!t.visualViewport?hs:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function fs(n,t,e){return t===void 0&&(t=!1),!!e&&t&&e===st(n)}function _t(n,t,e,i){t===void 0&&(t=!1),e===void 0&&(e=!1);let o=n.getBoundingClientRect(),s=tn(n),r=mt(1);t&&(i?ht(i)&&(r=ee(i)):r=ee(n));let a=fs(s,e,i)?fi(s):mt(0),l=(o.left+a.x)/r.x,c=(o.top+a.y)/r.y,d=o.width/r.x,u=o.height/r.y;if(s&&i){let h=st(s),p=ht(i)?st(i):i,b=h,g=Le(b);for(;g&&p!==b;){let w=ee(g),f=g.getBoundingClientRect(),v=ft(g),E=f.left+(g.clientLeft+parseFloat(v.paddingLeft))*w.x,C=f.top+(g.clientTop+parseFloat(v.paddingTop))*w.y;l*=w.x,c*=w.y,d*=w.x,u*=w.y,l+=E,c+=C,b=st(g),g=Le(b)}}return Ht({width:d,height:u,x:l,y:c})}function ke(n,t){let e=fe(n).scrollLeft;return t?t.left+e:_t(gt(n)).left+e}function mi(n,t){let e=n.getBoundingClientRect(),i=e.left+t.scrollLeft-ke(n,e),o=e.top+t.scrollTop;return{x:i,y:o}}function ms(n){let{elements:t,rect:e,offsetParent:i,strategy:o}=n,s=o==="fixed",r=gt(i),a=t?he(t.floating):!1;if(i===r||a&&s)return e;let l={scrollLeft:0,scrollTop:0},c=mt(1),d=mt(0),u=wt(i);if((u||!s)&&((Pt(i)!=="body"||ue(r))&&(l=fe(i)),u)){let p=_t(i);c=ee(i),d.x=p.x+i.clientLeft,d.y=p.y+i.clientTop}let h=r&&!u&&!s?mi(r,l):mt(0);return{width:e.width*c.x,height:e.height*c.y,x:e.x*c.x-l.scrollLeft*c.x+d.x+h.x,y:e.y*c.y-l.scrollTop*c.y+d.y+h.y}}function ps(n){return n.getClientRects?Array.from(n.getClientRects()):[]}function gs(n){let t=fe(n),e=n.ownerDocument.body,i=ut(n.scrollWidth,n.clientWidth,e.scrollWidth,e.clientWidth),o=ut(n.scrollHeight,n.clientHeight,e.scrollHeight,e.clientHeight),s=-t.scrollLeft+ke(n),r=-t.scrollTop;return ft(e).direction==="rtl"&&(s+=ut(n.clientWidth,e.clientWidth)-i),{width:i,height:o,x:s,y:r}}var bs=25;function vs(n,t,e){e===void 0&&(e="viewport");let i=e==="layoutViewport",o=st(n),s=gt(n),r=o.visualViewport,a=s.clientWidth,l=s.clientHeight,c=0,d=0;if(r){let h=!Ce()||t==="fixed";i?h||(c=-r.offsetLeft,d=-r.offsetTop):(a=r.width,l=r.height,h&&(c=r.offsetLeft,d=r.offsetTop))}if(ke(s)<=0){let h=s.ownerDocument,p=h.body,b=getComputedStyle(p),g=h.compatMode==="CSS1Compat"&&parseFloat(b.marginLeft)+parseFloat(b.marginRight)||0,w=Math.abs(s.clientWidth-p.clientWidth-g),f=getComputedStyle(s).scrollbarGutter==="stable both-edges"?w/2:w;f<=bs&&(a-=f)}return{width:a,height:l,x:c,y:d}}function ys(n,t){let e=_t(n,!0,t==="fixed"),i=e.top+n.clientTop,o=e.left+n.clientLeft,s=ee(n),r=n.clientWidth*s.x,a=n.clientHeight*s.y,l=o*s.x,c=i*s.y;return{width:r,height:a,x:l,y:c}}function di(n,t,e){let i;if(t==="viewport"||t==="layoutViewport")i=vs(n,e,t);else if(t==="document")i=gs(gt(n));else if(ht(t))i=ys(t,e);else{let o=fi(n);i={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Ht(i)}function ws(n,t){let e=t.get(n);if(e)return e;let i=Jt(n,[],!1).filter(a=>ht(a)&&Pt(a)!=="body"),o=null,s=ft(n).position==="fixed",r=s?kt(n):n;for(;ht(r)&&!te(r);){let a=ft(r),l=Ae(r),c=o?o.position:s?"fixed":"";!l&&(c==="fixed"||c==="absolute"&&a.position==="static")?i=i.filter(u=>u!==r):o=a,r=kt(r)}return t.set(n,i),i}function Es(n){let{element:t,boundary:e,rootBoundary:i,strategy:o}=n,r=[...e==="clippingAncestors"?he(t)?[]:ws(t,this._c):[].concat(e),i],a=di(t,r[0],o),l=a.top,c=a.right,d=a.bottom,u=a.left;for(let h=1;h<r.length;h++){let p=di(t,r[h],o);l=ut(p.top,l),c=Ct(p.right,c),d=Ct(p.bottom,d),u=ut(p.left,u)}return{width:c-u,height:d-l,x:u,y:l}}function xs(n){let{width:t,height:e}=hi(n);return{width:t,height:e}}function Ss(n,t,e){let i=wt(t),o=gt(t),s=e==="fixed",r=_t(n,!0,s,t),a={scrollLeft:0,scrollTop:0},l=mt(0);if((i||!s)&&((Pt(t)!=="body"||ue(o))&&(a=fe(t)),i)){let h=_t(t,!0,s,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}!i&&o&&(l.x=ke(o));let c=o&&!i&&!s?mi(o,a):mt(0),d=r.left+a.scrollLeft-l.x-c.x,u=r.top+a.scrollTop-l.y-c.y;return{x:d,y:u,width:r.width,height:r.height}}function Je(n){return ft(n).position==="static"}function ui(n,t){if(!wt(n)||ft(n).position==="fixed")return null;if(t)return t(n);let e=n.offsetParent;return gt(n)===e&&(e=e.ownerDocument.body),e}function pi(n,t){let e=st(n);if(he(n))return e;if(!wt(n)){let o=kt(n);for(;o&&!te(o);){if(ht(o)&&!Je(o))return o;o=kt(o)}return e}let i=ui(n,t);for(;i&&ai(i)&&Je(i);)i=ui(i,t);return i&&te(i)&&Je(i)&&!Ae(i)?e:i||li(n)||e}var As=async function(n){let t=this.getOffsetParent||pi,e=this.getDimensions,i=await e(n.floating);return{reference:Ss(n.reference,await t(n.floating),n.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function Cs(n){return ft(n).direction==="rtl"}var Ls={convertOffsetParentRelativeRectToViewportRelativeRect:ms,getDocumentElement:gt,getClippingRect:Es,getOffsetParent:pi,getElementRects:As,getClientRects:ps,getDimensions:xs,getScale:ee,isElement:ht,isRTL:Cs};function gi(n,t){return n.x===t.x&&n.y===t.y&&n.width===t.width&&n.height===t.height}function ks(n,t,e){let i=null,o,s=gt(n);function r(){var d;clearTimeout(o),(d=i)==null||d.disconnect(),i=null}function a(d,u){d===void 0&&(d=!1),u===void 0&&(u=1),r();let h=n.getBoundingClientRect(),{left:p,top:b,width:g,height:w}=h;if(d||t(),!g||!w)return;let f=de(b),v=de(s.clientWidth-(p+g)),E=de(s.clientHeight-(b+w)),C=de(p),L={rootMargin:-f+"px "+-v+"px "+-E+"px "+-C+"px",threshold:ut(0,Ct(1,u))||1},x=!0;function y(X){let z=X[0].intersectionRatio;if(!gi(h,n.getBoundingClientRect()))return a();if(z!==u){if(!x)return a();z?a(!1,z):o=setTimeout(()=>{a(!1,1e-7)},1e3)}x=!1}try{i=new IntersectionObserver(y,{...L,root:s.ownerDocument})}catch{i=new IntersectionObserver(y,L)}i.observe(n)}let l=st(n),c=()=>a(e);return l.addEventListener("resize",c),a(!0),()=>{l.removeEventListener("resize",c),r()}}function bi(n,t,e,i){i===void 0&&(i={});let{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=i,c=tn(n),d=o||s?[...c?Jt(c):[],...t?Jt(t):[]]:[];d.forEach(f=>{o&&f.addEventListener("scroll",e),s&&f.addEventListener("resize",e)});let u=c&&a?ks(c,e,s):null,h=-1,p=null;r&&(p=new ResizeObserver(f=>{let[v]=f;v&&v.target===c&&p&&t&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var E;(E=p)==null||E.observe(t)})),e()}),c&&!l&&p.observe(c),t&&p.observe(t));let b,g=l?_t(n):null;l&&w();function w(){let f=_t(n);g&&!gi(g,f)&&e(),g=f,b=requestAnimationFrame(w)}return e(),()=>{var f;d.forEach(v=>{o&&v.removeEventListener("scroll",e),s&&v.removeEventListener("resize",e)}),u==null||u(),(f=p)==null||f.disconnect(),p=null,l&&cancelAnimationFrame(b)}}var vi=ni;var yi=ii,wi=ei,Ei=oi;var xi=(n,t,e)=>{let i=new Map,o=e??{},s={...Ls,...o.platform,_c:i};return ti(n,t,{...o,platform:s})};function zt(n,t,e={}){let{placement:i="bottom-start",strategy:o="absolute",offset:s=4,flip:r=!0,shift:a=!0,padding:l=8,matchWidth:c=!1}=e,d=[vi(s),...r?[wi({padding:l})]:[],...a?[yi({padding:l})]:[],...c?[Ei({apply({rects:h}){Object.assign(t.style,{width:`${h.reference.width}px`})}})]:[]];return t.style.position=o,bi(n,t,async()=>{let h=await xi(n,t,{placement:i,strategy:o,middleware:d});Object.assign(t.style,{left:`${h.x}px`,top:`${h.y}px`});let p=h.placement.split("-")[0];t.setAttribute("data-side",p)})}var en=class{constructor(n){m(this,"opts");m(this,"buffer","");m(this,"timerId",null);m(this,"timeout");this.opts=n,this.timeout=n.timeout??1e3}handle(n){if(n.length!==1)return!1;this.timerId!==null&&clearTimeout(this.timerId),this.buffer+=n.toLowerCase(),this.timerId=setTimeout(()=>{this.buffer="",this.timerId=null},this.timeout);let t=this.opts.getItemCount();for(let e=0;e<t;e++)if(this.opts.getItemText(e).toLowerCase().startsWith(this.buffer))return this.opts.onMatch(e),!0;return!0}reset(){this.buffer="",this.timerId!==null&&(clearTimeout(this.timerId),this.timerId=null)}};var Si=class extends Y{constructor(){super(...arguments);m(this,"trigger",null);m(this,"content",null);m(this,"valueEl",null);m(this,"items",[]);m(this,"nativeSelect",null);m(this,"hiddenInput",null);m(this,"labelEl",null);m(this,"onLabelClick",t=>{var e;t.target.closest("[data-part=\'trigger\']")||(t.preventDefault(),(e=this.trigger)==null||e.focus())});m(this,"dismiss",null);m(this,"typeahead",null);m(this,"cleanupFloating",null);m(this,"_open",!1);m(this,"_value","");m(this,"highlighted",-1);m(this,"syncing",!1);m(this,"onNativeChange",()=>{this.syncing||this.refresh()});m(this,"onFormReset",()=>setTimeout(()=>this.refresh()));m(this,"onTriggerClick",()=>{this.isDisabled||(this._open?this.close():this.show())});m(this,"onTriggerKeyUp",t=>{t.key===" "&&t.preventDefault()});m(this,"onTriggerKey",t=>{var s,r;if(this.isDisabled)return;let e=this.enabled();if(!this._open){if(t.key==="ArrowDown"||t.key==="ArrowUp"||t.key==="Enter"||t.key===" "||t.altKey&&t.key==="ArrowDown")t.preventDefault(),this.show(),t.key==="ArrowUp"&&e.length&&this.highlight(this.items.indexOf(e[e.length-1]));else if(t.key==="Home"||t.key==="End"){t.preventDefault(),this.show();let a=t.key==="Home"?e[0]:e[e.length-1];a&&this.highlight(this.items.indexOf(a))}else t.key.length===1&&!t.ctrlKey&&!t.metaKey&&!t.altKey&&((s=this.typeahead)==null||s.handle(t.key));return}if(!e.length)return;let i=this.highlighted>=0?e.indexOf(this.items[this.highlighted]):-1,o=a=>{t.preventDefault(),this.highlight(this.items.indexOf(e[a]))};switch(t.key){case"ArrowDown":return o(Math.min(i+1,e.length-1));case"ArrowUp":return t.altKey?(t.preventDefault(),this.highlighted>=0&&this.select(this.items[this.highlighted]),this.close()):o(Math.max(i-1,0));case"Home":return o(0);case"End":return o(e.length-1);case"PageDown":return o(Math.min(i+10,e.length-1));case"PageUp":return o(Math.max(i-10,0));case"Enter":case" ":return t.preventDefault(),this.highlighted>=0&&this.select(this.items[this.highlighted]),this.close();case"Tab":return this.highlighted>=0&&this.select(this.items[this.highlighted]),this.close(!1);default:t.key.length===1&&!t.ctrlKey&&!t.metaKey&&!t.altKey&&((r=this.typeahead)==null||r.handle(t.key))}});m(this,"onListClick",t=>{let e=t.target.closest("[data-part=\'item\']");!e||!this.items.includes(e)||dt(e)||(this.select(e),this.close())});m(this,"onListPointer",t=>{let e=t.target.closest("[data-part=\'item\']");e&&this.items.includes(e)&&!dt(e)&&this.highlight(this.items.indexOf(e))});m(this,"preventBlur",t=>t.preventDefault())}get open(){return this._open}get value(){return this._value}set value(t){let e=this.items.find(i=>i.dataset.value===t);e&&this.select(e,!1)}get isDisabled(){var t;return this.hasAttribute("disabled")||!!((t=this.nativeSelect)!=null&&t.disabled)}refresh(){var i;let t=this.nativeSelect;if(!t)return;let e=this.items.find(o=>o.dataset.value===t.value);e&&this.select(e,!1),(i=this.trigger)==null||i.setAttribute("aria-disabled",String(this.isDisabled))}enabled(){return this.items.filter(t=>!dt(t))}setup(){var a,l;if(this.nativeSelect=Z(this,"select"),this.nativeSelect&&!Z(this,"[data-part=\'trigger\']")&&this.buildFromNative(this.nativeSelect),this.trigger=Z(this,"[data-part=\'trigger\']"),this.content=Z(this,"[data-part=\'content\']"),this.valueEl=Z(this,"[data-part=\'value\']"),!this.trigger||!this.content)return;let{trigger:t,content:e}=this;this.items=vt(this,"[data-part=\'item\']");let i=Q("db-select");e.id||(e.id=`${i}-listbox`),e.setAttribute("role","listbox"),e.hidden=!0,t.setAttribute("role","combobox"),t.setAttribute("aria-haspopup","listbox"),t.setAttribute("aria-expanded","false"),t.setAttribute("aria-controls",e.id),t instanceof HTMLButtonElement&&!t.hasAttribute("type")&&(t.type="button"),this.isDisabled&&t.setAttribute("aria-disabled","true"),this.items.forEach((c,d)=>{c.id||(c.id=`${i}-item-${d}`),c.setAttribute("role","option"),c.setAttribute("aria-selected","false")}),vt(this,"[data-part=\'group\']").forEach(c=>{c.setAttribute("role","group");let d=c.querySelector("[data-part=\'label\']");d&&(d.id||(d.id=Q("db-select-label")),c.setAttribute("aria-labelledby",d.id))});let o=this.getAttribute("name");o&&!this.nativeSelect&&(this.hiddenInput=document.createElement("input"),this.hiddenInput.type="hidden",this.hiddenInput.name=o,this.hasAttribute("required")&&(this.hiddenInput.required=!0),this.appendChild(this.hiddenInput)),this.typeahead=new en({getItemCount:()=>this.enabled().length,getItemText:c=>{var d,u;return((u=(d=this.enabled()[c])==null?void 0:d.textContent)==null?void 0:u.trim())??""},onMatch:c=>{let d=this.enabled()[c];d&&(this._open?this.highlight(this.items.indexOf(d)):this.select(d))}}),this.dismiss=new Nt(e,{onDismiss:c=>this.close(c!=="outside-press")});let s=((a=this.nativeSelect)==null?void 0:a.value)??this.getAttribute("default-value")??"",r=this.items.find(c=>c.dataset.value===s);r&&dt(r)?this.valueEl&&(this.valueEl.textContent=((l=r.textContent)==null?void 0:l.trim())??"",this.valueEl.setAttribute("data-placeholder","")):r&&this.select(r,!1),this.setState("closed")}buildFromNative(t){let e=document.createElement("button");e.type="button",e.setAttribute("data-part","trigger"),e.className="db-select-trigger";let i=t.getAttribute("aria-label"),o=t.getAttribute("aria-labelledby"),s=!o&&t.id?document.querySelector(`label[for="${CSS.escape(t.id)}"]`):null;s&&(o=s.id||(s.id=Q("db-select-for"))),i&&e.setAttribute("aria-label",i),o&&e.setAttribute("aria-labelledby",o);let r=t.closest("label");if(r){if(this.labelEl=r,!i&&!o){let u=Array.from(r.childNodes).filter(h=>!(h instanceof Element&&(h===t||h.contains(t)||h.localName==="db-select"))).map(h=>h.textContent??"").join(" ").replace(/\\s+/g," ").trim();u&&e.setAttribute("aria-label",u)}}else s&&(this.labelEl=s);let a=document.createElement("span");a.setAttribute("data-part","value"),a.className="db-select-value";let l=document.createElementNS("http://www.w3.org/2000/svg","svg");l.setAttribute("viewBox","0 0 24 24"),l.setAttribute("aria-hidden","true"),l.setAttribute("class","db-select-chevron"),l.innerHTML=\'<path d="m6 9 6 6 6-6" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>\',e.append(a,l);let c=document.createElement("div");c.setAttribute("data-part","content"),c.className="db-select-content";let d=(u,h)=>{let p=document.createElement("div");p.setAttribute("data-part","item"),p.className="db-select-item",p.dataset.value=u.value;for(let[b,g]of Object.entries(u.dataset))g!=null&&(p.dataset[b]=g);u.disabled&&p.setAttribute("aria-disabled","true"),p.textContent=u.textContent??u.value,h.appendChild(p)};for(let u of Array.from(t.children))if(u instanceof HTMLOptGroupElement){let h=document.createElement("div");h.setAttribute("data-part","group");let p=document.createElement("div");p.setAttribute("data-part","label"),p.className="db-select-label",p.textContent=u.label,h.appendChild(p);for(let b of Array.from(u.children))b instanceof HTMLOptionElement&&d(b,h);c.appendChild(h)}else u instanceof HTMLOptionElement&&d(u,c);t.hidden=!0,t.tabIndex=-1,t.setAttribute("aria-hidden","true"),this.append(e,c)}connect(){var t,e,i,o,s,r,a,l,c,d;(t=this.trigger)==null||t.addEventListener("click",this.onTriggerClick),(e=this.trigger)==null||e.addEventListener("keydown",this.onTriggerKey),(i=this.trigger)==null||i.addEventListener("keyup",this.onTriggerKeyUp),(o=this.nativeSelect)==null||o.addEventListener("change",this.onNativeChange),(r=(s=this.nativeSelect)==null?void 0:s.form)==null||r.addEventListener("reset",this.onFormReset),(a=this.labelEl)==null||a.addEventListener("click",this.onLabelClick),(l=this.content)==null||l.addEventListener("click",this.onListClick),(c=this.content)==null||c.addEventListener("pointermove",this.onListPointer),(d=this.content)==null||d.addEventListener("mousedown",this.preventBlur)}disconnect(){var t,e,i,o,s,r,a,l,c,d;(t=this.trigger)==null||t.removeEventListener("click",this.onTriggerClick),(e=this.trigger)==null||e.removeEventListener("keydown",this.onTriggerKey),(i=this.trigger)==null||i.removeEventListener("keyup",this.onTriggerKeyUp),(o=this.nativeSelect)==null||o.removeEventListener("change",this.onNativeChange),(r=(s=this.nativeSelect)==null?void 0:s.form)==null||r.removeEventListener("reset",this.onFormReset),(a=this.labelEl)==null||a.removeEventListener("click",this.onLabelClick),(l=this.content)==null||l.removeEventListener("click",this.onListClick),(c=this.content)==null||c.removeEventListener("pointermove",this.onListPointer),(d=this.content)==null||d.removeEventListener("mousedown",this.preventBlur),this._open&&this.close(!1)}setState(t){var e;this.setAttribute("data-state",t),(e=this.content)==null||e.setAttribute("data-state",t)}show(){var r,a;let{trigger:t,content:e}=this;if(!t||!e||this._open)return;this._open=!0;let i=Yt(e);this.setState("open"),t.setAttribute("aria-expanded","true"),this.cleanupFloating=zt(t,e,{placement:"bottom-start",offset:4,matchWidth:!this.hasAttribute("auto-width"),strategy:i==="top-layer"?"fixed":"absolute"});let s=this.items.find(l=>l.dataset.value===this._value&&!dt(l))??this.enabled()[0];s&&this.highlight(this.items.indexOf(s)),(r=this.dismiss)==null||r.activate(),(a=this.typeahead)==null||a.reset(),t.focus()}close(t=!0){var o,s,r;let{trigger:e,content:i}=this;!e||!i||!this._open||(this._open=!1,(o=this.dismiss)==null||o.deactivate(),(s=this.cleanupFloating)==null||s.call(this),this.cleanupFloating=null,Gt(i),this.setState("closed"),e.setAttribute("aria-expanded","false"),e.removeAttribute("aria-activedescendant"),this.items.forEach(a=>a.removeAttribute("data-highlighted")),this.highlighted=-1,(r=this.typeahead)==null||r.reset(),t&&e.focus())}highlight(t){var r;let e=this.items[t],i=this.content;if(!e||!i||!this.trigger)return;this.highlighted>=0&&((r=this.items[this.highlighted])==null||r.removeAttribute("data-highlighted")),this.highlighted=t,e.setAttribute("data-highlighted",""),this.trigger.setAttribute("aria-activedescendant",e.id);let o=e.offsetTop,s=o+e.offsetHeight;o<i.scrollTop?i.scrollTop=o:s>i.scrollTop+i.clientHeight&&(i.scrollTop=s-i.clientHeight)}select(t,e=!0){var s;if(dt(t))return;let i=t.dataset.value??"",o=i!==this._value;this._value=i;for(let r of this.items){let a=r===t;r.setAttribute("aria-selected",String(a)),a?r.setAttribute("data-state","checked"):r.removeAttribute("data-state")}if(this.valueEl&&(this.valueEl.textContent=((s=t.textContent)==null?void 0:s.trim())??"",this.valueEl.removeAttribute("data-placeholder")),this.hiddenInput&&(this.hiddenInput.value=i),!e||!o){this.nativeSelect&&(this.nativeSelect.value=i);return}if(this.nativeSelect){this.nativeSelect.value=i,this.syncing=!0;try{this.nativeSelect.dispatchEvent(new Event("input",{bubbles:!0})),this.nativeSelect.dispatchEvent(new Event("change",{bubbles:!0}))}finally{this.syncing=!1}}this.dispatchEvent(new CustomEvent("db-select:change",{detail:{value:i},bubbles:!0}))}};G();customElements.get("db-select")||customElements.define("db-select",Si);var Ai=class extends Y{constructor(){super(...arguments);m(this,"trigger",null);m(this,"content",null);m(this,"dismiss",null);m(this,"cleanupFloating",null);m(this,"_open",!1);m(this,"onTriggerClick",()=>this.toggle());m(this,"onContentClick",t=>{let e=t.target.closest("[data-part=\'close\']");e&&e.closest("db-popover")===this&&this.close("close-press")})}get open(){return this._open}setup(){var e;if(this.trigger=Wt(Z(this,"[data-part=\'trigger\']")),this.content=Z(this,"[data-part=\'content\']"),!this.trigger||!this.content)return;let t=this.content;t.id||(t.id=Q("db-popover")),t.hasAttribute("role")||t.setAttribute("role","dialog"),!t.hasAttribute("aria-labelledby")&&!t.hasAttribute("aria-label")&&((e=this.trigger).id||(e.id=Q("db-popover-trigger")),t.setAttribute("aria-labelledby",this.trigger.id)),t.hidden=!0,this.trigger.setAttribute("aria-haspopup","dialog"),this.trigger.setAttribute("aria-controls",t.id),this.trigger.setAttribute("aria-expanded","false"),this.setState("closed"),this.dismiss=new Nt(t,{onDismiss:i=>this.close(i)})}connect(){var t,e;(t=this.trigger)==null||t.addEventListener("click",this.onTriggerClick),(e=this.content)==null||e.addEventListener("click",this.onContentClick)}disconnect(){var t,e;(t=this.trigger)==null||t.removeEventListener("click",this.onTriggerClick),(e=this.content)==null||e.removeEventListener("click",this.onContentClick),this._open&&this.close("api")}setState(t){var e;this.setAttribute("data-state",t),(e=this.content)==null||e.setAttribute("data-state",t)}placement(){var o,s;let t=this.getAttribute("placement");if(t)return t;let e=((o=this.content)==null?void 0:o.dataset.side)||"bottom",i=((s=this.content)==null?void 0:s.dataset.align)||"center";return`${e}${i!=="center"?`-${i}`:""}`}toggle(){this._open?this.close("trigger-press"):this.show()}show(){var o;let{trigger:t,content:e}=this;if(!t||!e||this._open)return;this._open=!0;let i=Yt(e);this.setState("open"),t.setAttribute("aria-expanded","true"),this.cleanupFloating=zt(t,e,{placement:this.placement(),offset:Number(this.getAttribute("offset")??8),strategy:i==="top-layer"?"fixed":"absolute"}),(o=this.dismiss)==null||o.activate(),this.hasAttribute("no-autofocus")||requestAnimationFrame(()=>{this._open&&(Tn(e)[0]??e).focus({preventScroll:!0})}),this.dispatchEvent(new CustomEvent("db-popover:open",{bubbles:!0}))}close(t="api"){var s,r;let{trigger:e,content:i}=this;if(!e||!i||!this._open)return;this._open=!1,(s=this.dismiss)==null||s.deactivate(),(r=this.cleanupFloating)==null||r.call(this),this.cleanupFloating=null;let o=i.contains(document.activeElement);Gt(i),this.setState("closed"),e.setAttribute("aria-expanded","false"),t!=="outside-press"&&(o||t==="escape-key"||t==="close-press")&&e.focus(),this.dispatchEvent(new CustomEvent("db-popover:close",{detail:{reason:t},bubbles:!0}))}};G();customElements.get("db-popover")||customElements.define("db-popover",Ai);var Ci="db-announcement-closed:";var Li=class extends Y{constructor(){super(...arguments);m(this,"closeButton",null);m(this,"onClose",()=>this.close())}setup(){var t;this.closeButton=[...this.querySelectorAll("[data-part=\'close\']")].find(e=>e.closest("db-announcement")===this)??null,this.closeButton&&!this.closeButton.hasAttribute("aria-label")&&!((t=this.closeButton.textContent)!=null&&t.trim())&&this.closeButton.setAttribute("aria-label","Close announcement")}connect(){var t;(t=this.closeButton)==null||t.addEventListener("click",this.onClose)}disconnect(){var t;(t=this.closeButton)==null||t.removeEventListener("click",this.onClose)}close(){var i;let t=this.getAttribute("announcement-id")??"";try{t&&localStorage.setItem(Ci+t,"1")}catch{}let e=this.contains(document.activeElement);if(document.documentElement.setAttribute("data-announcement-closed",""),this.hidden=!0,this.style.display="none",e){let o=document.querySelector("main, [role=\'main\']");o?(o.hasAttribute("tabindex")||o.setAttribute("tabindex","-1"),o.focus({preventScroll:!0})):(i=document.activeElement)==null||i.blur()}this.dispatchEvent(new CustomEvent("db-announcement:close",{bubbles:!0,detail:{id:t}}))}};G();customElements.get("db-announcement")||customElements.define("db-announcement",Li);var ki=class extends Y{constructor(){super(...arguments);m(this,"trigger",null);m(this,"content",null);m(this,"cleanupFloating",null);m(this,"showTimer",null);m(this,"hideTimer",null);m(this,"_open",!1);m(this,"onEnter",t=>{t.pointerType!=="touch"&&(this.clearTimers(),this._open||(this.showTimer=setTimeout(()=>this.show(),this.num("delay",200))))});m(this,"onLeave",t=>{t.pointerType!=="touch"&&(this.clearTimers(),this.hideTimer=setTimeout(()=>this.hide(),this.num("close-delay",100)))});m(this,"onContentEnter",()=>this.clearTimers());m(this,"onFocus",()=>{let t=!0;try{t=this.trigger.matches(":focus-visible")}catch{}t&&(this.clearTimers(),this.show())});m(this,"onBlur",()=>this.hide());m(this,"onPress",()=>this.hide());m(this,"onKey",t=>{t.key==="Escape"&&this._open&&(t.preventDefault(),t.stopImmediatePropagation(),this.hide())})}get open(){return this._open}num(t,e){let i=Number(this.getAttribute(t));return Number.isFinite(i)&&this.hasAttribute(t)?i:e}setup(){var e;if(this.trigger=Wt(Z(this,"[data-part=\'trigger\']")),this.content=Z(this,"[data-part=\'content\']"),!this.trigger||!this.content)return;(e=this.content).id||(e.id=Q("db-tooltip")),this.content.setAttribute("role","tooltip"),this.content.hidden=!0;let t=(this.trigger.getAttribute("aria-describedby")??"").split(/\\s+/).filter(Boolean);t.includes(this.content.id)||this.trigger.setAttribute("aria-describedby",[...t,this.content.id].join(" ")),this.setState("closed")}connect(){let{trigger:t,content:e}=this;!t||!e||(t.addEventListener("pointerenter",this.onEnter),t.addEventListener("pointerleave",this.onLeave),t.addEventListener("focus",this.onFocus),t.addEventListener("blur",this.onBlur),t.addEventListener("pointerdown",this.onPress),e.addEventListener("pointerenter",this.onContentEnter),e.addEventListener("pointerleave",this.onLeave))}disconnect(){let{trigger:t,content:e}=this;t==null||t.removeEventListener("pointerenter",this.onEnter),t==null||t.removeEventListener("pointerleave",this.onLeave),t==null||t.removeEventListener("focus",this.onFocus),t==null||t.removeEventListener("blur",this.onBlur),t==null||t.removeEventListener("pointerdown",this.onPress),e==null||e.removeEventListener("pointerenter",this.onContentEnter),e==null||e.removeEventListener("pointerleave",this.onLeave),this.hide()}clearTimers(){this.showTimer&&clearTimeout(this.showTimer),this.hideTimer&&clearTimeout(this.hideTimer),this.showTimer=this.hideTimer=null}setState(t){var e;this.setAttribute("data-state",t),(e=this.content)==null||e.setAttribute("data-state",t)}show(){let{trigger:t,content:e}=this;if(!t||!e||this._open)return;this._open=!0,this.clearTimers();let i=Yt(e);this.setState("open"),this.cleanupFloating=zt(t,e,{placement:this.getAttribute("placement")||e.dataset.side||"top",offset:8,strategy:i==="top-layer"?"fixed":"absolute"}),document.addEventListener("keydown",this.onKey,!0),this.dispatchEvent(new CustomEvent("db-tooltip:open",{bubbles:!0}))}hide(){var t;this.clearTimers(),!(!this._open||!this.content)&&(this._open=!1,document.removeEventListener("keydown",this.onKey,!0),(t=this.cleanupFloating)==null||t.call(this),this.cleanupFloating=null,Gt(this.content),this.setState("closed"),this.dispatchEvent(new CustomEvent("db-tooltip:close",{bubbles:!0})))}};G();customElements.get("db-tooltip")||customElements.define("db-tooltip",ki);var Ti="sidebar_state",Ts="b",Os=768,me=new WeakMap;function Ds(n){try{return localStorage.getItem(n)}catch{return null}}function Rs(n,t){try{localStorage.setItem(n,t)}catch{}}function sn(n){if(me.has(n))return;let t=n.querySelector("[data-component=\'sidebar\']");if(!t)return;let e=t.dataset.collapsible||"offcanvas",i=t.dataset.side||"left",o=t.dataset.defaultOpen!=="false",s=Ds(Ti),r=s!==null?s==="true":o,a=t.querySelector("[data-sidebar-desktop]"),l=t.querySelector("[data-sidebar-mobile]"),c=t.querySelector("[data-sidebar-mobile-backdrop]"),d=window.matchMedia(`(max-width: ${Os-1}px)`),u={provider:n,sidebar:t,desktopSidebar:a,mobileSidebar:l,mobileBackdrop:c,collapsible:e,side:i,open:r,openMobile:!1,isMobile:d.matches,mediaQuery:d};me.set(n,u),Oi(u);let h=g=>{u.isMobile=g.matches,!g.matches&&u.openMobile&&Tt(n)};d.addEventListener("change",h);let p=g=>{g.key===Ts&&(g.metaKey||g.ctrlKey)?(g.preventDefault(),nn(n)):g.key==="Escape"&&u.openMobile&&(g.preventDefault(),Tt(n))};document.addEventListener("keydown",p),Ms(n,u),c&&c.addEventListener("click",()=>{Tt(n)});let b=t.querySelector("[data-part=\'rail\']");b&&b.addEventListener("click",()=>{nn(n)})}function Ms(n,t){n.querySelectorAll("[data-part=\'sidebar-trigger\']").forEach(e=>{e.addEventListener("click",()=>{nn(n)})})}function nn(n){let t=me.get(n);t&&(t.isMobile?t.openMobile?Tt(n):Is(n):(t.open=!t.open,Oi(t),Rs(Ti,String(t.open))))}function Oi(n){let t=n.open?"expanded":"collapsed";n.provider.setAttribute("data-state",t),n.sidebar.setAttribute("data-state",t),n.desktopSidebar&&(n.desktopSidebar.setAttribute("data-state",t),n.open?n.desktopSidebar.setAttribute("data-collapsible",""):n.desktopSidebar.setAttribute("data-collapsible",n.collapsible))}function Is(n){var i;let t=me.get(n);if(!t||t.openMobile||!t.mobileSidebar)return;t.openMobile=!0;let e=(i=t.desktopSidebar)==null?void 0:i.querySelector("[data-sidebar=\'sidebar-inner\']");if(e)for(;e.firstChild;)t.mobileSidebar.appendChild(e.firstChild);t.mobileSidebar.hidden=!1,t.mobileSidebar.setAttribute("data-state","open"),t.mobileBackdrop&&(t.mobileBackdrop.hidden=!1),It.activate(),requestAnimationFrame(()=>{var s;let o=(s=t.mobileSidebar)==null?void 0:s.querySelector(\'a, button, [tabindex]:not([tabindex="-1"])\');o==null||o.focus()})}function Tt(n){var o;let t=me.get(n);if(!t||!t.openMobile||!t.mobileSidebar)return;t.openMobile=!1;let e=(o=t.desktopSidebar)==null?void 0:o.querySelector("[data-sidebar=\'sidebar-inner\']");if(e&&t.mobileSidebar)for(;t.mobileSidebar.firstChild;)e.appendChild(t.mobileSidebar.firstChild);t.mobileSidebar.setAttribute("data-state","closed"),t.mobileSidebar.hidden=!0,t.mobileBackdrop&&(t.mobileBackdrop.hidden=!0),It.deactivate();let i=t.provider.querySelector("[data-part=\'sidebar-trigger\']");i==null||i.focus()}function on(){document.querySelectorAll("[data-component=\'sidebar-provider\']").forEach(n=>{sn(n)})}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",on):on();document.addEventListener("astro:page-load",on);var Di=/^[a-z][a-z0-9_-]{0,63}$/,Te={docs:"docs.js",shard:n=>`t-${n}.js`,fragment:n=>`f-${n}.js`},Oe={docs:"docs",shard:n=>n,fragment:n=>`frag:${n}`};var Ns={ational:"ate",tional:"tion",enci:"ence",anci:"ance",izer:"ize",bli:"ble",alli:"al",entli:"ent",eli:"e",ousli:"ous",ization:"ize",ation:"ate",ator:"ate",alism:"al",iveness:"ive",fulness:"ful",ousness:"ous",aliti:"al",iviti:"ive",biliti:"ble",logi:"log"},Hs={icate:"ic",ative:"",alize:"al",iciti:"ic",ical:"ic",ful:"",ness:""},Fs="[^aeiou]",an="[aeiouy]",Ot="("+Fs+"[^aeiouy]*)",Re="("+an+"[aeiou]*)",rn=new RegExp("^"+Ot+"?"+Re+Ot),Ps=new RegExp("^"+Ot+"?"+Re+Ot+Re+"?$"),De=new RegExp("^"+Ot+"?("+Re+Ot+"){2,}"),Ri=new RegExp("^"+Ot+"?"+an),Mi=new RegExp("^"+Ot+an+"[^aeiouwxy]$"),_s=/ll$/,zs=/^(.+?)e$/,$s=/^(.+?)y$/,Bs=/^(.+?(s|t))(ion)$/,qs=/^(.+?)(ed|ing)$/,Ks=/(at|bl|iz)$/,Vs=/^(.+?)eed$/,js=/^.+?[^s]s$/,Us=/^.+?(ss|i)es$/,Ws=/([^aeiouylsz])\\1$/,Ys=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,Gs=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,Xs=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/;function Ii(n){let t=String(n).toLowerCase();if(t.length<3)return t;let e=!1;t.codePointAt(0)===121&&(e=!0,t="Y"+t.slice(1)),Us.test(t)?t=t.slice(0,-2):js.test(t)&&(t=t.slice(0,-1));let i;return(i=Vs.exec(t))?rn.test(i[1])&&(t=t.slice(0,-1)):(i=qs.exec(t))&&Ri.test(i[1])&&(t=i[1],Ks.test(t)?t+="e":Ws.test(t)?t=t.slice(0,-1):Mi.test(t)&&(t+="e")),(i=$s.exec(t))&&Ri.test(i[1])&&(t=i[1]+"i"),(i=Ys.exec(t))&&rn.test(i[1])&&(t=i[1]+Ns[i[2]]),(i=Gs.exec(t))&&rn.test(i[1])&&(t=i[1]+Hs[i[2]]),(i=Xs.exec(t))?De.test(i[1])&&(t=i[1]):(i=Bs.exec(t))&&De.test(i[1])&&(t=i[1]),(i=zs.exec(t))&&(De.test(i[1])||Ps.test(i[1])&&!Mi.test(i[1]))&&(t=i[1]),_s.test(t)&&De.test(t)&&(t=t.slice(0,-1)),e&&(t="y"+t.slice(1)),t}var Ni=new Set("a an and are as at be by for from has have in is it its of on or that the this to was were will with you your can not".split(" ")),Qs=/[\\p{Script=Han}\\p{Script=Hiragana}\\p{Script=Katakana}\\p{Script=Hangul}]/u,pe;function Zs(n){if(pe===void 0)try{pe=typeof Intl<"u"&&"Segmenter"in Intl?new Intl.Segmenter(void 0,{granularity:"word"}):null}catch{pe=null}if(pe)return[...pe.segment(n)].filter(i=>i.isWordLike).map(i=>i.segment);let t=[...n];if(t.length<2)return t;let e=[];for(let i=0;i<t.length-1;i++)e.push(t[i]+t[i+1]);return e}function $t(n){let t=[];for(let e of n.toLowerCase().normalize("NFKD").replace(/[\u0300-\u036F]/g,"").normalize("NFC").matchAll(/[\\p{L}\\p{N}][\\p{L}\\p{N}_.-]*[\\p{L}\\p{N}]|[\\p{L}\\p{N}]/gu)){let i=e[0],o=i.split(/[._-]+/).filter(Boolean);if(o.length>1&&t.push(i),o.length>1&&!/[._]/.test(i)){let s=o.join("");s.length>=3&&!Ni.has(s)&&t.push(s)}for(let s of o)Qs.test(s)?t.push(...Zs(s)):s.length>=2&&!Ni.has(s)&&t.push(s)}return t}function ln(n,t){let e="";for(let i of n.slice(0,t))e+=/[a-z0-9]/.test(i)?i:`_${i.codePointAt(0).toString(16)}_`;return e}function ge(n){if(!(!n||!/^en(-|$)/i.test(n)))return t=>/^[a-z]{3,}$/.test(t)?Ii(t):t}function Bt(n,t={}){var w,f;let e=[],i=[],o=[],s=!1,r={tag:[],section:[]},a={tag:[],section:[]},l=Object.create(null),c=Object.create(null),d=["tag","section",...new Set((t.facets??[]).filter(v=>Di.test(v)&&v!=="tag"&&v!=="section"))],u=new RegExp(`(?<!\\\\S)(-?)(${d.join("|")}):(?:"([^"]*)"?|(?!\\\\/\\\\/)(\\\\S*))|(-?)"([^"]*)"?|(\\\\S+)`,"gi"),h=[...n.matchAll(u)].map(v=>{var E;return{facetNeg:v[1]==="-",facet:(E=v[2])==null?void 0:E.toLowerCase(),value:v[3]??v[4],neg:v[5],phrase:v[6],word:v[7]}}),p=!1,b=!1;for(let[v,E]of h.entries()){if(E.facet){let O=hn(E.value??"");if(!O)continue;E.facet==="tag"||E.facet==="section"?(E.facetNeg?a:r)[E.facet].push(O):((w=E.facetNeg?c:l)[f=E.facet]??(w[f]=[])).push(O);continue}let C=E.word;if(C==="OR"){b=e.length>0,s=!0;continue}if(C==="NOT"){p=!0,s=!0;continue}if(C==="AND"){s=!0;continue}let I=E.phrase!==void 0,L=p||E.neg==="-"||(C==null?void 0:C.startsWith("-"))&&C.length>1;p=!1;let x=I?E.phrase:L&&(C!=null&&C.startsWith("-"))?C.slice(1):C,y=[...new Set($t(x))];if(!y.length){b=!1;continue}if(L){i.push(I?y:[y[0]]),s=!0,b=!1;continue}if(I){b=!1,s=!0,y.length>1&&o.push($t(x).join(" "));for(let O of y)e.push({terms:[O],prefix:!1,exact:!0});continue}let X=v===h.length-1&&!/\\s$/.test(n);if(b){e[e.length-1].terms.push(y[0]);for(let O of y.slice(1))e.push({terms:[O],prefix:!1});b=!1;continue}let z=y[0],U=/[._-]/.test(z),S=z.replace(/-/g,"");for(let[O,_]of y.entries())e.push({terms:[_],prefix:X&&_.length>=2&&(O===y.length-1||U&&(_===z||_===S))})}let g=[...new Set(e.flatMap(v=>v.terms))];return{groups:e,not:i,phrases:o,strict:s,highlight:g,filters:r,notFilters:a,...Object.keys(l).length?{facets:l}:{},...Object.keys(c).length?{notFacets:c}:{}}}async function Js(n,t){let e=await t.meta(),i=typeof n=="string"?Bt(n,{facets:fn([e])}):n,o=await zi(i,e,t),s=qi(i,e);if(!i.groups.length)return $i(e,o,s);let r=[];for(let l of i.groups)r.push(await nr(l,e,t));let a=dn(r,e,o,s,"and").sort(Me);return a.length||i.strict?a:dn(r,e,o,s,"or").sort(Me)}var Me=(n,t)=>t.score-n.score;async function zi(n,t,e){let i=new Set;for(let o of n.not){let s;for(let r of o){let[a]=Bi(r,t),l=a?await e.shard(a):void 0,c=l&&Object.hasOwn(l,r)?l[r]:[],d=new Set;for(let u=0;u<c.length;u+=2)(!s||s.has(c[u]))&&d.add(c[u]);s=d}for(let r of s??[])i.add(r)}return i}function $i(n,t,e){if(!e)return[];let i=[];return n.docs.forEach(([o,s,r],a)=>e(a)&&!t.has(a)&&i.push({id:a,title:o,url:s,section:n.sections[r]??"",score:1})),i}function dn(n,t,e,i,o){let s=new Map,r=new Map;for(let l of n)for(let[c,d]of l)s.set(c,(s.get(c)??0)+d),r.set(c,(r.get(c)??0)+1);let a=[];for(let[l,c]of s){if(e.has(l)||i&&!i(l)||o==="and"&&r.get(l)!==n.length)continue;let[d,u,h]=t.docs[l];a.push({id:l,title:d,url:u,section:t.sections[h]??"",score:c*(r.get(l)/n.length)})}return a}var Et={prefix:.6,stem:.4,titleAll:1.5,titleExact:2,headingAll:1.4,headingExact:1.8,phrase:1.5,typo:.3};function tr(n,t){if(n===t)return!1;if(n.length===t.length){let s=[];for(let r=0;r<n.length&&s.length<=2;r++)n[r]!==t[r]&&s.push(r);return s.length===1?!0:s.length===2&&s[1]===s[0]+1&&n[s[0]]===t[s[1]]&&n[s[1]]===t[s[0]]}let[e,i]=n.length<t.length?[n,t]:[t,n];if(i.length-e.length!==1)return!1;let o=0;for(;o<e.length&&e[o]===i[o];)o++;return e.slice(o)===i.slice(o+1)}function Bi(n,t,e=!1){let i=er(t);for(let s=Math.min(n.length,Hi);s>=1;s--){let r=ln(n,s);if(i.has(r))return!e||s<n.length?[r]:[r,...t.shards.filter(a=>a.length>r.length&&a.startsWith(r)).slice(0,10)]}let o=ln(n,Math.min(n.length,Hi));return e?t.shards.filter(s=>s.startsWith(o)).slice(0,10):[]}var Hi=3,Fi=new WeakMap;function er(n){let t=Fi.get(n);return t||Fi.set(n,t=new Set(n.shards)),t}function hn(n){return n.replace(/"/g,"").trim().toLowerCase()}function qi(n,t){let{tag:e,section:i}=n.filters,o=n.notFilters??{tag:[],section:[]},s=Object.entries(n.facets??{}).filter(([,f])=>f.length),r=Object.entries(n.notFacets??{}).filter(([,f])=>f.length);if(!e.length&&!i.length&&!o.tag.length&&!o.section.length&&!s.length&&!r.length)return;let a=(f,v)=>new Set(f.flatMap((E,C)=>v.includes(hn(E))?[C]:[])),l=a(t.sections,i),c=a(t.tags??[],e),d=a(t.sections,o.section),u=a(t.tags??[],o.tag),h=f=>(t.facets??[]).findIndex(v=>v.name===f),p=f=>f.map(([v,E])=>{let C=h(v);return[C,C<0?new Set:a(t.facets[C].values,E)]}),b=p(s),g=p(r).filter(([f])=>f>=0),w=(f,[v,E])=>{var C;return v>=0&&(((C=f[4])==null?void 0:C[v])??[]).some(I=>E.has(I))};return f=>{let v=t.docs[f],E=v[3]??[];if(i.length&&!l.has(v[2])||e.length&&!E.some(C=>c.has(C))||d.has(v[2])||E.some(C=>u.has(C)))return!1;for(let C of b)if(!w(v,C))return!1;for(let C of g)if(w(v,C))return!1;return!0}}function fn(n){return[...new Set(n.flatMap(t=>((t==null?void 0:t.facets)??[]).map(e=>e.name)))]}function Ki(n,t){let e=Object.create(null),i=new Map,o=(s,r)=>{let a=`${s}\\0${hn(r)}`,l=i.get(a);l===void 0&&i.set(a,l=r);let c=e[s]??(e[s]=Object.create(null));c[l]=(c[l]??0)+1};for(let s of n){let r=typeof t=="function"?t(s):t,a=r==null?void 0:r.docs[s.id];if(a){r.sections[a[2]]&&o("section",r.sections[a[2]]);for(let l of new Set(a[3]??[]))r.tags[l]!==void 0&&o("tag",r.tags[l]);(a[4]??[]).forEach((l,c)=>{var u;let d=(u=r.facets)==null?void 0:u[c];if(d)for(let h of new Set(l))d.values[h]!==void 0&&o(d.name,d.values[h])})}}return e}async function nr(n,t,e){let i=await ji(n,t,e,!0);return n.corrected=i.corrected.length?i.corrected:void 0,Vi(i,un(t.count,i.docs.size))}function un(n,t){return Math.log(1+(n-t+.5)/(t+.5))}function Vi(n,t){let e=new Map;for(let[i,o]of n.lists)for(let s=0;s<i.length;s+=2)e.set(i[s],Math.max(e.get(i[s])??0,i[s+1]*o*t));return e}async function ji(n,t,e,i){let o=ge(t.lang),s=new Map,r=new Map;for(let d of n.terms)for(let u of Bi(d,t,n.prefix)){let h=await e.shard(u);if(!h)continue;let p=(f,v)=>{v>(s.get(f)??0)&&(s.set(f,v),r.set(f,h))};Object.hasOwn(h,d)&&p(d,1);let b=o==null?void 0:o(d),g=b?b.slice(0,Math.max(3,b.length-1)):void 0,w=0;for(let f in h)f!==d&&(n.prefix&&f.startsWith(d)&&w++<200&&p(f,Et.prefix),b&&g&&f.startsWith(g)&&o(f)===b&&p(f,Et.stem));if(i&&!s.size&&!n.exact&&d.length>=4&&!/[._-]/.test(d))for(let f in h)Math.abs(f.length-d.length)<=1&&tr(d,f)&&p(f,Et.typo)}let a=[...s].filter(([,d])=>d===Et.typo).map(([d])=>d),l=[...s].map(([d,u])=>[r.get(d)[d],u]),c=new Set;for(let[d]of l)for(let u=0;u<d.length;u+=2)c.add(d[u]);return{lists:l,docs:c,corrected:a}}var Ui=n=>typeof n=="function"?n:()=>n;async function Wi(n,t){let e=Ui(t),i=new Map;for(let o of n){let s=e(o),r=i.get(s);r||i.set(s,r=[]),r.push(o)}await Promise.all([...i].map(async([o,s])=>{var c;let r=await o.meta(),a=[...new Set(s.map(d=>Math.floor(d.id/r.block)))],l=new Map;await Promise.all(a.map(async d=>{try{l.set(d,await o.fragment(d))}catch{l.set(d,void 0)}}));for(let d of s)d.fragment??(d.fragment=(c=l.get(Math.floor(d.id/r.block)))==null?void 0:c[d.id%r.block])}))}async function Yi(n){let t=Ui(n),e=new Map;return async i=>{let o=t(i),s=e.get(o);if(!s){let r=ge((await o.meta()).lang);s=(a,l)=>l.terms.some(c=>a===c||l.prefix&&a.startsWith(c)||r!==void 0&&r(a)===r(c))||(l.corrected??[]).includes(a),e.set(o,s)}return s}}async function Gi(n,t,e,i=10){let o=t.slice(0,i);await Wi(o,e);let s=n.groups,r=await Yi(e);for(let a of o){let l=await r(a),[c,d]=a.fragment??["",[]],u=$t(a.title),h=1;s.length&&s.every(b=>u.some(g=>l(g,b)))&&(h=Pi(u,s,l)?Et.titleExact:Et.titleAll);let p=[];for(let[b,g]of d){let w=$t(b);!s.length||!s.every(f=>w.some(v=>l(v,f)))||(p.push([b,g]),h=Math.max(h,Pi(w,s,l)?Et.headingExact:Et.headingAll))}if(a.sections=p.slice(0,3),n.phrases.length){let b=[a.title,c,...d.map(([g])=>g)].map(g=>$t(g).join(" ")).join(" \\0 ");n.phrases.every(g=>b.includes(g))&&(h*=Et.phrase)}a.score*=h}return o.sort((a,l)=>l.score-a.score),[...o,...t.slice(i)]}async function Xi(n,t,e){await Wi(t,e);let i=await Yi(e);for(let o of t){if(!o.fragment||o.sections)continue;let s=await i(o);o.sections=o.fragment[1].filter(([r])=>{let a=$t(r);return n.groups.length>0&&n.groups.every(l=>a.some(c=>s(c,l)))}).slice(0,3)}}function Pi(n,t,e){return n.every(i=>t.some(o=>e(i,o)))&&t.every(i=>n.some(o=>e(o,i)))}async function Qi(n,t,e=10){let i=await t.meta(),o=Bt(n,{facets:fn([i])}),s=ge(i.lang);s&&(o.highlight=[...new Set([...o.highlight,...o.highlight.map(s).filter(a=>a.length>=3)])]);let r=await Js(o,t);return o.highlight=[...new Set([...o.highlight,...o.groups.flatMap(a=>a.corrected??[])])],{parsed:o,results:await Gi(o,r,t,e),facets:Ki(r,i)}}async function ir(n){return Promise.all(n.map(t=>t.data.meta().then(e=>e&&e.format===5?e:void 0,()=>{})))}async function or(n,t,e,i){let o=e,s=new Set,r=[],a=async(L,x)=>{if(!s.has(L))try{return await x()}catch(y){s.add(L),r.push({source:L,error:y});return}},l=t.flatMap((L,x)=>e[x]?[x]:[]),c=[];await Promise.all(l.map(async L=>c[L]=await a(L,()=>zi(n,o[L],t[L].data))??new Set));let d=[],u=[],h=(L,x)=>Promise.all(l.map(y=>a(y,()=>ji(L,o[y],t[y].data,x)))),p=L=>L.every((x,y)=>!(x!=null&&x.docs.size)||s.has(l[y]));for(let L of n.groups){let x=await h(L,!1);u.push(p(x)),u[u.length-1]&&(x=await h(L,!0)),d.push(x)}for(let[L,x]of n.groups.entries())u[L]||!p(d[L])||(x.corrected=void 0,d[L]=await h(x,!0));if(l.length&&l.every(L=>s.has(L)))throw r[0].error;let b=l.filter(L=>!s.has(L)),g=[];for(let L of b)g[L]=qi(n,o[L]);let w=(L,x)=>L.map(y=>({...y,source:x,score:y.score*sr(t[x])})),f=L=>({results:rr(L,t),failed:[...s].sort((x,y)=>x-y),errors:r});if(!n.groups.length)return f(b.flatMap(L=>w($i(o[L],c[L],g[L]),L)).sort(Me));let v=t.map(()=>[]),E=b.reduce((L,x)=>L+o[x].count,0);n.groups.forEach((L,x)=>{let y=d[x],X=l.flatMap((S,O)=>s.has(S)?[]:[[S,y[O]]]),z=[...new Set(X.flatMap(([,S])=>S.corrected))];L.corrected=z.length?z:void 0;let U=X.reduce((S,[,O])=>S+O.docs.size,0);for(let[S,O]of X)v[S].push(Vi(O,i.stats==="own"?un(o[S].count,O.docs.size):un(E,U)))});let C=L=>b.flatMap(x=>w(dn(v[x],o[x],c[x],g[x],L),x)).sort(Me),I=C("and");return f(I.length||n.strict?I:C("or"))}function sr(n){return typeof n.boost=="number"&&Number.isFinite(n.boost)&&n.boost>=0?n.boost:1}function rr(n,t){let e=new Map,i=[];for(let o of n){let s=t[o.source].collapse;if(s===void 0){i.push(o);continue}let r=`${s}\\0${o.url}`,a=e.get(r);a?(a.others??(a.others=[])).push({source:o.source,id:o.id,url:o.url,score:o.score}):(e.set(r,o),i.push(o))}return i}async function Zi(n,t,e=10,i={}){let o=await ir(t),s=Bt(n,{facets:fn(o)}),r=t.flatMap((u,h)=>o[h]?[]:[h]);for(let u of new Set(o.flatMap(h=>h?[h.lang]:[]))){let h=ge(u);h&&(s.highlight=[...new Set([...s.highlight,...s.highlight.map(h).filter(p=>p.length>=3)])])}let{results:a,failed:l,errors:c}=await or(s,t,o,i);for(let u of l)r.includes(u)||r.push(u);r.sort((u,h)=>u-h),s.highlight=[...new Set([...s.highlight,...s.groups.flatMap(u=>u.corrected??[])])];let d=Ki(a,u=>o[u.source]);return{parsed:s,results:await Gi(s,a,u=>t[u.source].data,e),missing:r,facets:d,errors:c}}function mn(n,t,e=globalThis){var p,b;let i=((p=e.document)==null?void 0:p.baseURI)??((b=e.location)==null?void 0:b.href),o=_i(n,i),s=e.__DOGSBAY_SEARCH__??{q:[],load(){}},r=s.stores??(s.stores=new Map),a=r.get(o)??new Map;r.set(o,a);let l=(g,w,f)=>{let v;if(f){let E="",C=_i(f,i);for(let I of r.keys())C.startsWith(I)&&I.length>E.length&&(E=I);v=E?r.get(E):void 0}!v&&r.size===1&&(v=a),v?v.set(g,w):s.q.push([g,w,f])},c=s.q;s.q=[],s.load=l;for(let[g,w,f]of c)l(g,w,f);e.__DOGSBAY_SEARCH__=s;let d=async(g,w)=>(a.has(g)||await t(n+w),a.get(g)),u,h={meta:()=>u??(u=d(Oe.docs,Te.docs).then(g=>{if(!g||g.format!==5)throw new Error(`search index format ${(g==null?void 0:g.format)??"missing"}, expected ${5}: rebuild the site`);return g}).catch(g=>{throw u=void 0,g})),shard:async g=>(await h.meta()).shards.includes(g)?d(Oe.shard(g),Te.shard(g)):void 0,fragment:g=>d(Oe.fragment(g),Te.fragment(g))};return h}function _i(n,t){try{return new URL(n,t).href}catch{return n}}function Ji(n){let t,e=new URL(n||"./",location.href).pathname;return async i=>{t??(t=import(new URL(`${n}pagefind/pagefind.js`,location.href).href).catch(u=>{throw t=void 0,u}));let o=i.replace(new RegExp(\'(?<!\\\\S)-?(tag|section):("[^"]*"?|\\\\S*)\',"gi")," ").trim(),s=o?await(await t).search(o):null,r=(s==null?void 0:s.results)??[],a=async(u,h)=>{let p=await u.data(),b=p.url.startsWith(e)?p.url.slice(e.length):p.url.replace(/^\\/+/,""),g=(p.sub_results??[]).map(w=>[w.title,w.url.split("#")[1]??""]).filter(([,w])=>w);return{id:h,title:p.meta.title??b,url:b,section:"",score:r.length-h,fragment:[ar(p.excerpt),g],sections:g.slice(0,3)}},l=await Promise.all(r.slice(0,10).map(a)),c=Promise.all(r.slice(10,30).map((u,h)=>a(u,h+10)));return c.catch(()=>{}),{results:l,more:c,later:(u,h)=>Promise.all(r.slice(u,u+h).map((p,b)=>a(p,u+b))),total:r.length,highlight:Bt(i).highlight}}}function ar(n){return new DOMParser().parseFromString(n,"text/html").body.textContent??""}function to(n,t){let e=(n==null?void 0:n.units)??[],i=e.find(f=>f.prefix===t);if(!i)return{};let o=f=>f.product??"",s=f=>{var v;return((v=n==null?void 0:n.products)==null?void 0:v[f])??{versions:n==null?void 0:n.versions,defaultVersion:n==null?void 0:n.defaultVersion}},r=f=>{var v;return(v=s(o(f)).versions)==null?void 0:v.find(E=>E.id===f.version)},a=f=>{var v,E;return((E=(v=n==null?void 0:n.products)==null?void 0:v[f])==null?void 0:E.label)??(f||(n==null?void 0:n.name)||"")},l=f=>{var v;return[o(f)!==o(i)?a(o(f)):"",f.version!==void 0?((v=r(f))==null?void 0:v.label)??f.version:""].filter(Boolean).join(" \\xB7 ")},c=f=>({prefix:f.prefix,product:o(f),label:l(f),own:f===i,versioned:f.version!==void 0}),d=e.filter(f=>f.locale===i.locale),u=s(o(i)),h=(u.versions??[]).map(f=>f.id),p=f=>{var v;return f===i?-2:f.version===u.defaultVersion?-1:(v=r(f))!=null&&v.prerelease?h.length+h.indexOf(f.version):h.indexOf(f.version)},b=d.filter(f=>{var v;return o(f)===o(i)&&f.version!==void 0&&(f===i||!((v=r(f))!=null&&v.hidden))}).sort((f,v)=>p(f)-p(v)),g=[];for(let f of d){let v=o(f);if(g.some(I=>o(I)===v))continue;if(v===o(i)){g.push(i);continue}let E=d.filter(I=>o(I)===v),C=s(v).defaultVersion;g.push(E.find(I=>I.version===C)??E.find(I=>{var L;return!((L=r(I))!=null&&L.hidden)})??E[0])}let w={};return b.length>1&&(w.versions=b.map(c)),g.length>1&&(w.products=g.map(c)),(w.versions||w.products)&&(w.version=[c(i)]),w}var eo=1.5;function no(n,t){var s,r;let e={},i=(s=n.docs[t])==null?void 0:s[3];i!=null&&i.length&&(e.tag=i.map(a=>n.tags[a]).filter(a=>typeof a=="string"));let o=(r=n.docs[t])==null?void 0:r[4];return!o||!n.facets||n.facets.forEach((a,l)=>{let c=o[l];c!=null&&c.length&&(e[a.name]=c.map(d=>a.values[d]).filter(d=>typeof d=="string"))}),e}var xt=n=>n.trim().toLowerCase();function io(n,t,e){for(let[i,o]of Object.entries(t)){if(i===e||!o.length)continue;let s=new Set((n[i]??[]).map(xt));if(!o.some(r=>s.has(xt(r))))return!1}return!0}function oo(n,t,e){return n.filter(i=>io(t(i),e))}function so(n,t,e,i){var s;let o={};for(let r of i){let a={},l=new Map;for(let c of n){let d=t(c);if(!((s=d[r])!=null&&s.length)||!io(d,e,r))continue;let u=new Set;for(let h of d[r]){if(u.has(xt(h)))continue;u.add(xt(h));let p=l.get(xt(h))??(l.set(xt(h),h),h);a[p]=(a[p]??0)+1}}for(let c of e[r]??[])l.has(xt(c))||(a[c]=0);Object.keys(a).length&&(o[r]=a)}return o}function ro(n,t){let e={};for(let i of n.getAll("filter")){let o=i.indexOf(":");if(o<=0)continue;let s=i.slice(0,o),r=i.slice(o+1);!t.includes(s)||!r||(e[s]??(e[s]=[])).some(a=>xt(a)===xt(r))||e[s].push(r)}return e}function lr(n,t,e){var s;if(n.length===0)return"";let i=n.join("/"),o=e==null?void 0:e[i];if(o&&o.length>0)return o;if(n.length===1){let r=(s=t==null?void 0:t[n[0]])==null?void 0:s.label;if(r&&r.length>0)return r}return n[n.length-1]}function ao(n){if(!n)return{};let t={};for(let[e,i]of Object.entries(n)){let o=cr(Object.entries(i).map(([s,r])=>({value:s,count:r})));o.length>0&&(t[e]=o)}return t}function cr(n){return[...n].sort((t,e)=>t.count!==e.count?e.count-t.count:t.value.localeCompare(e.value))}function ne(n,t,e){let i=e==null?void 0:e[n],o=t.split("/").filter(s=>s.length>0);return lr(o,i==null?void 0:i.prefixes,i==null?void 0:i.labels)}function lo(n,t){let e=i=>{var s;let o=(s=t==null?void 0:t[i])==null?void 0:s.order;return typeof o=="number"?o:void 0};return[...n].sort((i,o)=>{let s=e(i),r=e(o);return s!==void 0&&r!==void 0?s!==r?s-r:i.localeCompare(o):s!==void 0?-1:r!==void 0?1:i.localeCompare(o)})}function co(n,t,e){let i={...n},o=i[t]??[];if(o.includes(e)){let s=o.filter(r=>r!==e);s.length===0?delete i[t]:i[t]=s}else i[t]=[...o,e];return i}function uo(n){let t=0;for(let e of Object.values(n))t+=e.length;return t}function ho(n,t,e={}){if(t.length===0)return[];if(t.some(o=>o.value.includes("/"))){let o=e.nav?ur(e.nav,new Set(t.map(s=>s.value))):void 0;return dr(n,t,e.display,o)}return hr(n,t,e.nav,e.display)}function dr(n,t,e,i){let o=new Map,s=[];for(let c of t){let d=c.value.split("/").filter(p=>p.length>0);if(d.length===0)continue;let u="",h=null;for(let p=0;p<d.length;p++){u=u?`${u}/${d[p]}`:d[p];let b=o.get(u);b||(b={value:u,label:ne(n,u,e),count:0,depth:p,hasValue:!1,children:[]},o.set(u,b),h?h.children.push(b):s.push(u)),p===d.length-1&&(b.count=c.count,b.hasValue=!0),h=b}}let r=(c,d)=>{if(i){let u=i.get(c.value),h=i.get(d.value);if(u!==void 0&&h!==void 0&&u!==h)return u-h;if(u!==void 0&&h===void 0)return-1;if(u===void 0&&h!==void 0)return 1}return c.count!==d.count?d.count-c.count:c.value.localeCompare(d.value)},a=c=>{if(c.children.length!==0){c.children.sort(r);for(let d of c.children)a(d)}},l=s.map(c=>o.get(c));l.sort(r);for(let c of l)a(c);return l}function ur(n,t){let e=new Map,i=0,o=s=>{for(let r of s){if(r.href){let a=fo(r.href);for(let l=0;l<a.length;l++){let c=a[l];if(!t.has(c))continue;let d="";for(let u=l;u<a.length;u++)d=d?`${d}/${a[u]}`:a[u],t.has(d)&&!e.has(d)&&e.set(d,i++);break}}r.children&&r.children.length>0&&o(r.children)}};return o(n),e}function hr(n,t,e,i){let o=new Map;for(let h of t)o.set(h.value,h);if(!e||e.length===0)return t.map(h=>({value:h.value,label:ne(n,h.value,i),count:h.count,depth:0,hasValue:!0,children:[]}));let s=new Set,r=[],a=new Map,l=h=>{if(h.length===0)return;let p=r,b=a;for(let g=0;g<h.length;g++){let w=h[g],f=b.get(w);if(!f){let E=o.get(w);f={value:w,label:ne(n,w,i),count:E?E.count:0,depth:g,hasValue:E!==void 0,children:[]},p.push(f),b.set(w,f),E&&s.add(w)}let v=c.get(f);v||(v=new Map,c.set(f,v)),p=f.children,b=v}},c=new Map,d=h=>{for(let p of h){if(p.href){let b=fo(p.href);l(b)}p.children&&p.children.length>0&&d(p.children)}};d(e);let u=[];for(let h of t)s.has(h.value)||u.push({value:h.value,label:ne(n,h.value,i),count:h.count,depth:0,hasValue:!0,children:[]});return u.sort((h,p)=>h.value.localeCompare(p.value)),[...r,...u]}function fo(n){let t=n;try{/^[a-z]+:\\/\\//i.test(n)&&(t=new URL(n).pathname)}catch{}t=t.split("#")[0].split("?")[0];let e=t.split("/").filter(i=>i.length>0);return e.length<2?[]:e.slice(0,-1)}var fr=6e4,mr=30,Ie=20,pr=["version","versions","products"];function po(n){let{signal:t}=n,e=document.getElementById("db-search");if(!e)return;let i=e.querySelector("[data-db-search-input]"),o=e.querySelector("[data-part=\'listbox\']"),s=e.querySelector("[data-db-search-status]"),r=bo(n,{input:i,list:o,status:s,page:!1});e.addEventListener("db-dialog:open",()=>{i.focus(),i.select(),r.activate()},{signal:t}),document.addEventListener("keydown",a=>{let l=a.target.closest("input, textarea, select, [contenteditable]");if(a.key==="/"&&!l||a.key.toLowerCase()==="k"&&(a.metaKey||a.ctrlKey)){a.preventDefault();let c=document.querySelector("[data-db-search-page] [data-db-search-input]");c&&!e.open?c.focus():e.open?i.focus():e.show()}},{signal:t}),e.addEventListener("click",a=>{a.target.closest("a")&&e.close("api")},{signal:t})}function go(n){var d;let t=document.querySelector("[data-db-search-page]");if(!t)return;let e=t.querySelector("[data-db-search-input]"),i=t.querySelector("[data-db-search-list]"),o=t.querySelector("[data-db-search-status]"),s=gr(),r=s.get("p")||void 0,a=s.get("v")||void 0,l=s.get("scope")??(s.get("q")?"version":void 0),c=bo(n,{input:e,list:i,status:o,page:!0,params:s,scope:l,forward:r!==void 0||a!==void 0?{product:r,version:a}:void 0});(d=t.querySelector("form"))==null||d.addEventListener("submit",u=>u.preventDefault(),{signal:n.signal}),e.value=s.get("q")??"",c.activate(),e.value.trim()&&c.run()}function gr(){let n=new URLSearchParams(location.search);if(location.hash.includes("="))for(let[t,e]of new URLSearchParams(location.hash.slice(1)))n.has(t)||n.set(t,e);return n}var mo=()=>!location.search&&location.hash.includes("=");function bo(n,{input:t,list:e,status:i,page:o,scope:s,forward:r,params:a}){var En;let{signal:l}=n,c=i.textContent??"",d=mn(`${n.unitRoot}_dogsbay/search/`,n.loadScript,window),u=document.body.dataset.search??"builtin",h=location.protocol!=="file:",p=u==="pagefind"||u==="both"&&h?Ji(n.unitRoot):void 0,b=u==="pagefind"&&!h,g=n.siteRoot??"",w=n.prefix??"",f={},v="version",E,C=`db-search-scope:${new URL(g||"./",location.href).pathname}`,I=()=>{let A=window.__DOGSBAY_SITE__;if(r&&A&&L(A)||(r=void 0,p))return;f=to(A,w);let T=s??pn(()=>sessionStorage.getItem(C)),k=v;T&&Object.prototype.hasOwnProperty.call(f,T)&&(v=T),Dt(),v!==k&&t.value.trim()&&Vt(++$)},L=A=>{var V,W;let T=A.units??[],k=T.find(q=>q.prefix===w);if(!k)return!1;let N=r.product??k.product??"",M=T.filter(q=>q.locale===k.locale&&(q.product??"")===N),D=((W=(V=A.products)==null?void 0:V[N])==null?void 0:W.defaultVersion)??A.defaultVersion,H=r.version!==void 0?M.find(q=>q.version===r.version||q.prefix&&q.prefix.split("/").pop()===r.version):M.find(q=>q===k)??M.find(q=>q.version===D)??M[0];if(!H||H.prefix===w||!H.search)return!1;let P=new URLSearchParams(a);P.delete("p"),P.delete("v");let R=P.toString();return location.replace(`${y(H.prefix)}${H.search}${R?mo()?`#${R}`:`?${R}`:""}`),!0},x=()=>E??(E=n.loadScript(`${g}_dogsbay/site.js`).then(I,I)),y=A=>`${g}${A?`${A}/`:""}`,X=new Map([[w,d]]),z=A=>{let T=X.get(A);return T||X.set(A,T=mn(`${y(A)}_dogsbay/search/`,n.loadScript,window)),T},U=new Map,S=((En=o?e.closest("[data-db-search-page]"):e.closest("dialog"))==null?void 0:En.querySelector("[data-db-search-facets]"))??void 0,O=(()=>{try{return JSON.parse(e.dataset.facets??"{}")}catch{return{}}})(),_=S?Object.keys(O):[],B=o&&a?ro(a,_):{},F=()=>{r&&x(),b?i.textContent=e.dataset.needsServer??"":p||(d.meta().catch(()=>i.textContent="Search index could not be loaded."),x())},$=0,K,J;t.addEventListener("input",()=>{clearTimeout(J),J=setTimeout(()=>void Vt(++$),80)},{signal:l});let nt=new Map,it=typeof IntersectionObserver=="function"?new IntersectionObserver(A=>{var T;for(let k of A)k.isIntersecting&&((T=nt.get(k.target))==null||T(),nt.delete(k.target),it.unobserve(k.target))}):void 0,Kt=A=>{if(!o||r)return;let T=new URLSearchParams;A&&T.set("q",A),v!=="version"&&T.set("scope",v);for(let[M,D]of Object.entries(B))for(let H of D)T.append("filter",`${M}:${H}`);let k=T.toString(),N=mo();pn(()=>history.replaceState(history.state,"",`${location.pathname}${k?N?`${location.search}#${k}`:`?${k}`:""}`))},Vt=async A=>{let T=t.value.trim();if(Kt(T),!T){it==null||it.disconnect(),nt.clear(),rt.hidden=!0,S&&(S.hidden=!0),Rt=void 0,e.replaceChildren(),lt.hidden=at.hidden=!0,i.textContent=c;return}if(!b){Rt=void 0;try{if(p){let k=await p(T);if(A!==$)return;if(o){let N=await k.more;if(A!==$)return;ye(T,[...k.results,...N].slice(0,Ie),k.highlight,k.total,k.later)}else{ye(T,k.results,k.highlight,k.total);let N=await k.more;A===$&&N.length&&Ao(T,N,k.highlight)}}else if(v!=="version"&&f[v]){let k=Date.now(),N=f[v],M=N.filter(R=>R.own||k-(U.get(R.prefix)??-1/0)>fr),D=await Zi(T,M.map(R=>({data:z(R.prefix),boost:R.own?eo:1,collapse:R.product})));for(let R of D.missing)U.set(M[R].prefix,Date.now());if(A!==$)return;K=D.parsed;let H=D.results.map(R=>{var W;let V=M[R.source];return Object.assign(R,{base:y(V.prefix),from:V.own?void 0:V.label,also:(W=R.others)==null?void 0:W.map(q=>M[q.source].label).filter(Boolean),data:z(V.prefix)})}),P=D.missing.length+N.length-M.length;await ve(A,T,H,D.parsed.highlight,P?` \\xB7 ${(e.dataset.unavailable??"{n}").replace("{n}",String(P))}`:"")}else{let k=await Qi(T,d);if(A!==$)return;K=k.parsed,await ve(A,T,k.results,k.parsed.highlight,"")}}catch{if(A!==$)return;i.textContent="Search index could not be loaded.",S&&(S.hidden=!0)}}},rt=document.createElement("div");rt.setAttribute("role","group"),rt.setAttribute("aria-label",e.dataset.filterSection??"Filter by section"),rt.className=o?"flex flex-wrap gap-1 pb-3":"flex flex-wrap gap-1 px-3 pb-2",rt.hidden=!0,e.before(rt);let ot=document.createElement("div");ot.setAttribute("role","group"),ot.setAttribute("aria-label",e.dataset.scope??"Search in"),ot.className=o?"flex flex-wrap items-center gap-1 pb-3":"flex flex-wrap items-center gap-1 px-3 pb-2",ot.hidden=!0,rt.before(ot);let at=document.createElement("a");at.className="mx-3 mb-2 mt-1 block rounded-md px-3 py-2 text-center text-sm font-medium hover:bg-accent",at.dataset.dbSearchSeeAll="",at.hidden=!0;let lt=document.createElement("button");lt.type="button",lt.className="mt-4 rounded-md border px-3 py-1.5 text-sm hover:bg-accent",lt.textContent=e.dataset.more??"More results",lt.hidden=!0,e.after(o?lt:at);let Dt=()=>{var k,N;let A=pr.filter(M=>f[M]),T={version:((N=(k=f.version)==null?void 0:k[0])==null?void 0:N.versioned)===!1?e.dataset.scopeProduct:e.dataset.scopeVersion,versions:e.dataset.scopeVersions,products:e.dataset.scopeProducts};ot.replaceChildren(...A.map(M=>{let D=document.createElement("button");return D.type="button",D.dataset.scope=M,D.setAttribute("aria-pressed",String(M===v)),D.className="rounded-md border px-2.5 py-0.5 text-xs hover:bg-accent aria-pressed:bg-primary aria-pressed:text-primary-foreground",D.textContent=T[M]??M,D.addEventListener("click",()=>{var H;v!==M&&(v=M,pn(()=>sessionStorage.setItem(C,M)),Dt(),(H=ot.querySelector(`[data-scope="${M}"]`))==null||H.focus(),t.value.trim()?Vt(++$):Kt(""))},{signal:l}),D})),ot.hidden=A.length<2};l==null||l.addEventListener("abort",()=>{clearTimeout(J),$++,it==null||it.disconnect(),nt.clear(),rt.remove(),ot.remove(),at.remove(),lt.remove()});let jt=A=>A.replace(/"/g,""),$e=A=>`section:"${jt(A)}"`,St,se=(A,T)=>{let k=new Map;for(let H of T)H.section&&k.set(H.section,(k.get(H.section)??0)+1);let N=[...A.matchAll(/section:"([^"]*)"/gi)].map(H=>H[1].toLowerCase()),M=H=>N.includes(jt(H).toLowerCase()),D=[...k].sort((H,P)=>P[1]-H[1]).slice(0,6).map(([H])=>H);for(let H of N)D.some(P=>jt(P).toLowerCase()===H)||D.push(H);rt.replaceChildren(...D.length>1||N.length?D.map(H=>{let P=document.createElement("button");P.type="button";let R=M(H);return P.setAttribute("aria-pressed",String(R)),P.className="rounded-full border px-2.5 py-0.5 text-xs hover:bg-accent aria-pressed:bg-primary aria-pressed:text-primary-foreground",P.textContent=H,P.addEventListener("click",()=>{let V=$e(H),W=t.value.replace(new RegExp(`\\\\s*section:"${jt(H).replace(/[.*+?^${}()|[\\]\\\\]/g,"\\\\$&")}"`,"i"),"").trim();t.value=R?W:`${W} ${V}`.trim(),St=H,t.dispatchEvent(new Event("input",{bubbles:!0}))},{signal:l}),P}):[]),rt.hidden=!rt.childElementCount,St!==void 0&&(([...rt.querySelectorAll("button")].find(P=>P.textContent===St)??t).focus(),St=void 0)},Rt,ve=async(A,T,k,N,M)=>{if(!_.length){ye(T,k,N,k.length),i.textContent+=M;return}let D=new Map;for(let P of k){let R=P.data??d;D.has(R)||D.set(R,await R.meta())}if(A!==$)return;let H=new Map(k.map(P=>[P,no(D.get(P.data??d),P.id)]));Rt={q:T,results:k,terms:N,note:M,valuesOf:P=>H.get(P)??{}},Mt()},Mt=()=>{if(!Rt)return;let{q:A,results:T,terms:k,note:N,valuesOf:M}=Rt,D=oo(T,M,B);Be(so(T,M,B,_)),ye(A,D,k,D.length),i.textContent+=N},At,Be=A=>{var H,P;if(!S)return;let T=lo(Object.keys(A),O);if(S.hidden=!T.length,!T.length)return S.replaceChildren();let k=(R,V,W,q)=>{let j=document.createElement("label");j.className="flex cursor-pointer items-center gap-2 rounded-md px-2 py-1 hover:bg-accent";let tt=document.createElement("input");tt.type="checkbox",tt.dataset.facetName=R,tt.dataset.facetValue=V,tt.checked=(B[R]??[]).some(Co=>Co.toLowerCase()===V.toLowerCase()),tt.className="size-3.5 rounded border-border accent-primary";let bt=document.createElement("span");bt.className="flex-1 truncate",bt.textContent=W;let Ke=document.createElement("span");return Ke.className="text-xs text-muted-foreground",Ke.textContent=String(q),j.append(tt,bt,Ke),j},N=(R,V)=>{let W=document.createElement("ul");W.className="space-y-0.5";for(let q of V){let j=document.createElement("li");if(q.hasValue)j.append(k(R,q.value,q.label,q.count));else{let tt=document.createElement("span");tt.className="block px-2 py-1 text-muted-foreground",tt.textContent=q.label,j.append(tt)}if(q.children.length){let tt=N(R,q.children);tt.classList.add("ml-4"),j.append(tt)}W.append(j)}return W},M=[],D=uo(B);if(D){let R=document.createElement("button");R.type="button",R.dataset.clearFilters="",R.className="mb-3 w-full rounded-md border border-border px-2 py-1 text-xs text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",R.textContent=(e.dataset.facetsClear??"Clear all ({n})").replace("{n}",String(D)),M.push(R)}for(let R of T){let V=ao({[R]:A[R]})[R]??[],W=document.createElement("fieldset");W.className="mb-3";let q=document.createElement("legend");if(q.className="mb-1 text-xs font-semibold uppercase tracking-wide text-muted-foreground",q.textContent=((H=O[R])==null?void 0:H.title)??R,W.append(q),(P=O[R])!=null&&P.hierarchical||V.some(j=>j.value.includes("/")))W.append(N(R,ho(R,V,{display:O})));else{let j=document.createElement("ul");j.className="space-y-0.5";for(let tt of V){let bt=document.createElement("li");bt.append(k(R,tt.value,ne(R,tt.value,O),tt.count)),j.append(bt)}W.append(j)}M.push(W)}S.replaceChildren(...M),At!==void 0&&(((At?[...S.querySelectorAll("input[data-facet-name]")].find(V=>`${V.dataset.facetName}\\0${V.dataset.facetValue}`===At):S.querySelector("[data-clear-filters]"))??t).focus(),At=void 0)};S==null||S.addEventListener("change",A=>{let T=A.target;if(!T.dataset.facetName)return;let k=T.dataset.facetName,N=T.dataset.facetValue,M=(B[k]??[]).find(D=>D.toLowerCase()===N.toLowerCase());B=co(B,k,M??N),At=`${k}\\0${N}`,Kt(t.value.trim()),Mt()},{signal:l}),S==null||S.addEventListener("click",A=>{A.target.closest("[data-clear-filters]")&&(B={},At="",Kt(t.value.trim()),Mt())},{signal:l});let ct,ye=(A,T,k,N,M)=>{it==null||it.disconnect(),nt.clear(),se(A,T);let D=T.slice(0,o?Ie:mr);if(ct={q:A,results:T,terms:k,shown:D.length,total:N,later:M},e.replaceChildren(...qe(A,D,k)),i.textContent=N?`${N} result${N===1?"":"s"}`:`${e.dataset.noResults} \\u201C${A}\\u201D`,lt.hidden=!o||!yn(),at.hidden=o||!N||!e.dataset.searchPage,!at.hidden){let H=new URLSearchParams({q:A});v!=="version"&&H.set("scope",v);for(let[P,R]of Object.entries(B))for(let V of R)H.append("filter",`${P}:${V}`);at.href=`${e.dataset.searchPage}?${H}`,at.textContent=(e.dataset.seeAll??"See all {n} results").replace("{n}",String(N))}},Ao=(A,T,k)=>e.append(...qe(A,T,k)),yn=()=>!!ct&&(ct.results.length>ct.shown||!!ct.later&&ct.shown<ct.total);lt.addEventListener("click",async()=>{var N,M;let A=ct;if(!A)return;let T=A.results.slice(A.shown,A.shown+Ie);if(!T.length&&A.later){if(T=await A.later(A.shown,Ie).catch(()=>[]),A!==ct)return;A.results.push(...T)}let k=qe(A.q,T,A.terms);e.append(...k),A.shown+=T.length,lt.hidden=!T.length||!yn(),(M=(N=k[0])==null?void 0:N.querySelector("a"))==null||M.focus()},{signal:l});let qe=(A,T,k)=>{var M;let N=[];for(let D of T){let H=D.base??n.unitRoot,P=wn(H,D.url,k,"block rounded-md p-3 hover:bg-accent"),R=document.createElement("div");R.className="font-medium",R.append(...gn(D.title,k)),P.a.appendChild(R);let V=[D.from,D.section].filter(Boolean).join(" \\xB7 ");if(V){let j=document.createElement("div");j.className="text-xs text-muted-foreground",j.textContent=V,P.a.appendChild(j)}let W=document.createElement("div");if(W.className="mt-1 line-clamp-2 text-xs text-muted-foreground",P.a.appendChild(W),(M=D.also)!=null&&M.length){let j=document.createElement("div");j.className="mt-1 text-xs text-muted-foreground",j.textContent=`${e.dataset.alsoIn??"Also in"} ${D.also.join(", ")}`,P.a.appendChild(j)}N.push(P.li);let q=()=>D.fragment?(D.fragment[0]&&W.replaceChildren(...gn(D.fragment[0],k)),(D.sections??[]).map(([j,tt])=>{let bt=wn(H,`${D.url}#${tt}`,k,"ml-4 block rounded-md border-l px-3 py-1.5 text-sm hover:bg-accent");return bt.a.append(...gn(j,k)),bt.li})):[];if(D.fragment)N.push(...q());else if(it){let j=K??Bt(A);nt.set(P.li,()=>void Xi(j,[D],D.data??d).then(()=>P.li.after(...q()),()=>{})),it.observe(P.li)}}return N},wn=(A,T,k,N)=>{let M=document.createElement("li");o||M.setAttribute("role","none"),M.className="mb-1";let D=document.createElement("a");return o||(D.setAttribute("data-part","option"),D.dataset.value=T,D.tabIndex=-1),D.href=br(A+T,k),D.className=N,M.appendChild(D),{li:M,a:D}};return{activate:F,run:()=>void Vt(++$)}}function pn(n){try{return n()}catch{return}}function br(n,t){if(!t.length)return n;let e=n.indexOf("#"),[i,o]=e<0?[n,""]:[n.slice(0,e),n.slice(e)];return`${i}${i.includes("?")?"&":"?"}h=${encodeURIComponent(t.join(" "))}${o}`}function gn(n,t){if(!t.length)return[document.createTextNode(n)];let e=new RegExp(`(${t.map(i=>i.replace(/[.*+?^${}()|[\\]\\\\]/g,"\\\\$&")).join("|")})`,"gi");return n.split(e).map((i,o)=>{if(o%2===0)return document.createTextNode(i);let s=document.createElement("mark");return s.textContent=i,s})}var vo=/[\\p{Script=Han}\\p{Script=Hiragana}\\p{Script=Katakana}\\p{Script=Hangul}]/u;function yo(n){var g;let t;try{t=(new URLSearchParams(location.search).get("h")??"").split(/\\s+/).filter(w=>w.length>0)}catch{return}let e=document.querySelector("#db-content article")??document.querySelector("#db-content");if(!t.length||!e)return;let i=w=>w.replace(/[.*+?^${}()|[\\]\\\\]/g,"\\\\$&"),o=[...t].sort((w,f)=>f.length-w.length),s=o.filter(w=>vo.test(w)).map(i),r=o.filter(w=>!vo.test(w)).map(i),a=[r.length?`(?<![\\\\p{L}\\\\p{N}])(?:${r.join("|")})`:"",s.length?`(?:${s.join("|")})`:""].filter(Boolean),l=new RegExp(`(${a.join("|")})`,"giu"),c=[],d=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,{acceptNode:w=>{var f;return(f=w.parentElement)!=null&&f.closest("script, style, mark, button, [aria-hidden=\'true\']")?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}}),u=[];for(let w=d.nextNode();w;w=d.nextNode())u.push(w);for(let w of u){if(c.length>=500)break;let f=w.data;if(l.lastIndex=0,!l.test(f))continue;l.lastIndex=0;let v=document.createDocumentFragment(),E=0;for(let C of f.matchAll(l)){v.append(f.slice(E,C.index));let I=document.createElement("mark");I.className="db-search-hl",I.textContent=C[0],v.append(I),c.push(I),E=C.index+C[0].length}v.append(f.slice(E)),w.replaceWith(v)}if(vr(),!c.length)return;let h=((g=document.querySelector("[data-clear-highlights]"))==null?void 0:g.dataset.clearHighlights)??"Clear highlights",p=document.createElement("div");p.className="not-prose mb-4";let b=document.createElement("button");b.type="button",b.className="inline-flex h-8 items-center rounded-md border px-3 text-sm hover:bg-accent",b.textContent=h,b.addEventListener("click",()=>{var w;for(let f of c)f.replaceWith(document.createTextNode(f.textContent??""));e.normalize(),p.remove(),(w=document.getElementById("db-content"))==null||w.focus({preventScroll:!0})},{signal:n}),p.append(b),e.prepend(p),location.hash||c[0].scrollIntoView({block:"center"})}function vr(){try{let n=new URL(location.href);n.searchParams.delete("h"),history.replaceState(history.state,"",n.toString())}catch{}}var qt=Object.assign||function(n){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i])}return n},Ne=function(t){return t.tagName==="IMG"},yr=function(t){return NodeList.prototype.isPrototypeOf(t)},He=function(t){return t&&t.nodeType===1},wo=function(t){var e=t.currentSrc||t.src;return e.substr(-4).toLowerCase()===".svg"},Eo=function(t){try{return Array.isArray(t)?t.filter(Ne):yr(t)?[].slice.call(t).filter(Ne):He(t)?[t].filter(Ne):typeof t=="string"?[].slice.call(document.querySelectorAll(t)).filter(Ne):[]}catch{throw new TypeError(`The provided selector is invalid.\nExpects a CSS selector, a Node element, a NodeList or an array.\nSee: https://github.com/francoischalifour/medium-zoom`)}},wr=function(t){var e=document.createElement("div");return e.classList.add("medium-zoom-overlay"),e.style.background=t,e},Er=function(t){var e=t.getBoundingClientRect(),i=e.top,o=e.left,s=e.width,r=e.height,a=t.cloneNode(),l=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,c=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0;return a.removeAttribute("id"),a.style.position="absolute",a.style.top=i+l+"px",a.style.left=o+c+"px",a.style.width=s+"px",a.style.height=r+"px",a.style.transform="",a},ie=function(t,e){var i=qt({bubbles:!1,cancelable:!1,detail:void 0},e);if(typeof window.CustomEvent=="function")return new CustomEvent(t,i);var o=document.createEvent("CustomEvent");return o.initCustomEvent(t,i.bubbles,i.cancelable,i.detail),o},xr=function n(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=window.Promise||function(S){function O(){}S(O,O)},o=function(S){var O=S.target;if(O===X){b();return}E.indexOf(O)!==-1&&g({target:O})},s=function(){if(!(I||!y.original)){var S=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0;Math.abs(L-S)>x.scrollOffset&&setTimeout(b,150)}},r=function(S){var O=S.key||S.keyCode;(O==="Escape"||O==="Esc"||O===27)&&b()},a=function(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},O=S;if(S.background&&(X.style.background=S.background),S.container&&S.container instanceof Object&&(O.container=qt({},x.container,S.container)),S.template){var _=He(S.template)?S.template:document.querySelector(S.template);O.template=_}return x=qt({},x,O),E.forEach(function(B){B.dispatchEvent(ie("medium-zoom:update",{detail:{zoom:z}}))}),z},l=function(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return n(qt({},x,S))},c=function(){for(var S=arguments.length,O=Array(S),_=0;_<S;_++)O[_]=arguments[_];var B=O.reduce(function(F,$){return[].concat(F,Eo($))},[]);return B.filter(function(F){return E.indexOf(F)===-1}).forEach(function(F){E.push(F),F.classList.add("medium-zoom-image")}),C.forEach(function(F){var $=F.type,K=F.listener,J=F.options;B.forEach(function(nt){nt.addEventListener($,K,J)})}),z},d=function(){for(var S=arguments.length,O=Array(S),_=0;_<S;_++)O[_]=arguments[_];y.zoomed&&b();var B=O.length>0?O.reduce(function(F,$){return[].concat(F,Eo($))},[]):E;return B.forEach(function(F){F.classList.remove("medium-zoom-image"),F.dispatchEvent(ie("medium-zoom:detach",{detail:{zoom:z}}))}),E=E.filter(function(F){return B.indexOf(F)===-1}),z},u=function(S,O){var _=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return E.forEach(function(B){B.addEventListener("medium-zoom:"+S,O,_)}),C.push({type:"medium-zoom:"+S,listener:O,options:_}),z},h=function(S,O){var _=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return E.forEach(function(B){B.removeEventListener("medium-zoom:"+S,O,_)}),C=C.filter(function(B){return!(B.type==="medium-zoom:"+S&&B.listener.toString()===O.toString())}),z},p=function(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},O=S.target,_=function(){var F={width:document.documentElement.clientWidth,height:document.documentElement.clientHeight,left:0,top:0,right:0,bottom:0},$=void 0,K=void 0;if(x.container)if(x.container instanceof Object)F=qt({},F,x.container),$=F.width-F.left-F.right-x.margin*2,K=F.height-F.top-F.bottom-x.margin*2;else{var J=He(x.container)?x.container:document.querySelector(x.container),nt=J.getBoundingClientRect(),it=nt.width,Kt=nt.height,Vt=nt.left,rt=nt.top;F=qt({},F,{width:it,height:Kt,left:Vt,top:rt})}$=$||F.width-x.margin*2,K=K||F.height-x.margin*2;var ot=y.zoomedHd||y.original,at=wo(ot)?$:ot.naturalWidth||$,lt=wo(ot)?K:ot.naturalHeight||K,Dt=ot.getBoundingClientRect(),jt=Dt.top,$e=Dt.left,St=Dt.width,se=Dt.height,Rt=Math.min(Math.max(St,at),$)/St,ve=Math.min(Math.max(se,lt),K)/se,Mt=Math.min(Rt,ve),At=(-$e+($-St)/2+x.margin+F.left)/Mt,Be=(-jt+(K-se)/2+x.margin+F.top)/Mt,ct="scale("+Mt+") translate3d("+At+"px, "+Be+"px, 0)";y.zoomed.style.transform=ct,y.zoomedHd&&(y.zoomedHd.style.transform=ct)};return new i(function(B){if(O&&E.indexOf(O)===-1){B(z);return}var F=function it(){I=!1,y.zoomed.removeEventListener("transitionend",it),y.original.dispatchEvent(ie("medium-zoom:opened",{detail:{zoom:z}})),B(z)};if(y.zoomed){B(z);return}if(O)y.original=O;else if(E.length>0){var $=E;y.original=$[0]}else{B(z);return}if(y.original.dispatchEvent(ie("medium-zoom:open",{detail:{zoom:z}})),L=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,I=!0,y.zoomed=Er(y.original),document.body.appendChild(X),x.template){var K=He(x.template)?x.template:document.querySelector(x.template);y.template=document.createElement("div"),y.template.appendChild(K.content.cloneNode(!0)),document.body.appendChild(y.template)}if(y.original.parentElement&&y.original.parentElement.tagName==="PICTURE"&&y.original.currentSrc&&(y.zoomed.src=y.original.currentSrc),document.body.appendChild(y.zoomed),window.requestAnimationFrame(function(){document.body.classList.add("medium-zoom--opened")}),y.original.classList.add("medium-zoom-image--hidden"),y.zoomed.classList.add("medium-zoom-image--opened"),y.zoomed.addEventListener("click",b),y.zoomed.addEventListener("transitionend",F),y.original.getAttribute("data-zoom-src")){y.zoomedHd=y.zoomed.cloneNode(),y.zoomedHd.removeAttribute("srcset"),y.zoomedHd.removeAttribute("sizes"),y.zoomedHd.removeAttribute("loading"),y.zoomedHd.src=y.zoomed.getAttribute("data-zoom-src"),y.zoomedHd.onerror=function(){clearInterval(J),console.warn("Unable to reach the zoom image target "+y.zoomedHd.src),y.zoomedHd=null,_()};var J=setInterval(function(){y.zoomedHd.complete&&(clearInterval(J),y.zoomedHd.classList.add("medium-zoom-image--opened"),y.zoomedHd.addEventListener("click",b),document.body.appendChild(y.zoomedHd),_())},10)}else if(y.original.hasAttribute("srcset")){y.zoomedHd=y.zoomed.cloneNode(),y.zoomedHd.removeAttribute("sizes"),y.zoomedHd.removeAttribute("loading");var nt=y.zoomedHd.addEventListener("load",function(){y.zoomedHd.removeEventListener("load",nt),y.zoomedHd.classList.add("medium-zoom-image--opened"),y.zoomedHd.addEventListener("click",b),document.body.appendChild(y.zoomedHd),_()})}else _()})},b=function(){return new i(function(S){if(I||!y.original){S(z);return}var O=function _(){y.original.classList.remove("medium-zoom-image--hidden"),document.body.removeChild(y.zoomed),y.zoomedHd&&document.body.removeChild(y.zoomedHd),document.body.removeChild(X),y.zoomed.classList.remove("medium-zoom-image--opened"),y.template&&document.body.removeChild(y.template),I=!1,y.zoomed.removeEventListener("transitionend",_),y.original.dispatchEvent(ie("medium-zoom:closed",{detail:{zoom:z}})),y.original=null,y.zoomed=null,y.zoomedHd=null,y.template=null,S(z)};I=!0,document.body.classList.remove("medium-zoom--opened"),y.zoomed.style.transform="",y.zoomedHd&&(y.zoomedHd.style.transform=""),y.template&&(y.template.style.transition="opacity 150ms",y.template.style.opacity=0),y.original.dispatchEvent(ie("medium-zoom:close",{detail:{zoom:z}})),y.zoomed.addEventListener("transitionend",O)})},g=function(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},O=S.target;return y.original?b():p({target:O})},w=function(){return x},f=function(){return E},v=function(){return y.original},E=[],C=[],I=!1,L=0,x=e,y={original:null,zoomed:null,zoomedHd:null,template:null};Object.prototype.toString.call(t)==="[object Object]"?x=t:(t||typeof t=="string")&&c(t),x=qt({margin:0,background:"#fff",scrollOffset:40,container:null,template:null},x);var X=wr(x.background);document.addEventListener("click",o),document.addEventListener("keyup",r),document.addEventListener("scroll",s),window.addEventListener("resize",b);var z={open:p,close:b,toggle:g,update:a,clone:l,attach:c,detach:d,on:u,off:h,getOptions:w,getImages:f,getZoomedImage:v};return z};function Sr(n,t){t===void 0&&(t={});var e=t.insertAt;if(!(!n||typeof document>"u")){var i=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",e==="top"&&i.firstChild?i.insertBefore(o,i.firstChild):i.appendChild(o),o.styleSheet?o.styleSheet.cssText=n:o.appendChild(document.createTextNode(n))}}var Ar=".medium-zoom-overlay{position:fixed;top:0;right:0;bottom:0;left:0;opacity:0;transition:opacity .3s;will-change:opacity}.medium-zoom--opened .medium-zoom-overlay{cursor:pointer;cursor:zoom-out;opacity:1}.medium-zoom-image{cursor:pointer;cursor:zoom-in;transition:transform .3s cubic-bezier(.2,0,.2,1)!important}.medium-zoom-image--hidden{visibility:hidden}.medium-zoom-image--opened{position:relative;cursor:pointer;cursor:zoom-out;will-change:transform}";Sr(Ar);var xo=xr;var Cr;function So(n){let t=document.body.dataset.imageZoom;if(!t)return;let e;try{e=JSON.parse(t)}catch{return}let i=[...document.querySelectorAll(\'img[data-zoomable="true"]\')];if(!i.length)return;let o=Cr??(Cr=xo());o.update(e),o.attach(...i),n==null||n.addEventListener("abort",()=>{o.close(),o.detach(...i)});let s={signal:n},r=!1,a=l=>l.key==="Enter"||l.key===" ";for(let l of i)l.alt&&(l.tabIndex=0,l.addEventListener("keydown",c=>{a(c)&&(c.preventDefault(),r=!0,o.open({target:l}))},s),l.addEventListener("medium-zoom:opened",()=>{let c=document.querySelector(".medium-zoom-image--opened");!r||!c||(c.tabIndex=-1,c.addEventListener("keydown",d=>{a(d)&&(d.preventDefault(),o.close())}),c.focus())},s),l.addEventListener("medium-zoom:closed",()=>{r&&l.focus(),r=!1},s))}function Fe(n){return!/^[\\x00-\\x20]*([a-z][a-z0-9+.-]*:|[\\\\/])/i.test(n.replace(/[\\t\\n\\r]/g,""))}var Pe=new Map,Lr=15e3;function bn(n){let t=Pe.get(n);if(!t){let e=new Promise((i,o)=>{let s=document.createElement("script");s.src=n;let r=setTimeout(()=>a(),Lr),a=()=>{clearTimeout(r),s.onload=s.onerror=null,Pe.get(n)===e&&Pe.delete(n),o(new Error(`could not load ${n}`))};s.onload=()=>{clearTimeout(r),i()},s.onerror=a,document.head.appendChild(s)});Pe.set(n,t=e)}return t}function kr(n){document.querySelectorAll("[data-component=\'theme-toggle\']").forEach(t=>{let e=()=>t.setAttribute("aria-pressed",String(document.documentElement.classList.contains("dark")));e(),t.addEventListener("click",()=>{let i=!document.documentElement.classList.contains("dark");document.documentElement.classList.toggle("dark",i);try{localStorage.setItem("theme",i?"dark":"light")}catch{}e()},{signal:n})})}function Tr(n){document.addEventListener("click",async t=>{var o,s,r,a;let e=t.target.closest("[data-copy-markdown]");if(!e)return;let i=(((o=document.getElementById("db-page-markdown"))==null?void 0:o.textContent)??"").replace(/<\\\\\\/(script)/gi,"</$1").replace(/<\\\\!--/g,"<!--");try{await navigator.clipboard.writeText(i);let l=(s=e.dataset).label??(s.label=e.textContent??"");e.textContent="Copied",clearTimeout(Number(e.dataset.timer)),e.dataset.timer=String(setTimeout(()=>e.textContent=l,1500))}catch{}(a=(r=e.closest("db-popover"))==null?void 0:r.close)==null||a.call(r,"close-press")},{signal:n})}function Or(n,t){let e=document.body.dataset.page??"index.html";document.querySelectorAll("select[data-db-switch]").forEach(i=>{i.addEventListener("change",async()=>{var a;let o=i.selectedOptions[0];if(!o||o.disabled||!o.hasAttribute("value"))return;let s=o.dataset.prefix??"",r=i.value;if(o.hasAttribute("data-link")){(Fe(r)||/^https?:\\/\\//i.test(r))&&(location.href=r);return}if(!(!Fe(r)||!Fe(s))){if(i.dataset.dbSwitch==="product"){location.href=r;return}try{let l=s?`${n}${s}/`:n;await bn(`${l}_dogsbay/pages.js`);let c=(a=window.__DOGSBAY_PAGES__)==null?void 0:a[s];location.href=c&&!c.includes(e)?`${l}index.html`:r}catch{location.href=r}}},{signal:t})})}function Dr(n){document.addEventListener("click",t=>{var i;let e=t.target.closest("a.db-anchor");!e||location.protocol==="file:"||(i=navigator.clipboard)==null||i.writeText(e.href).catch(()=>{})},{signal:n})}var be=new Map,ze=new Set;function _e(){for(let[n,t]of be)n.isConnected||(Tt(n),t.abort(),be.delete(n));for(let n of ze)n.isConnected||Tt(n)}function Rr(n,t){let e=EventTarget.prototype,i=e.addEventListener,o=0;e.addEventListener=function(s,r,a){o++;let l=typeof a=="object"?a.signal:void 0;i.call(this,s,r,typeof a=="object"?{...a,signal:l?AbortSignal.any([l,n]):n}:{capture:a===!0,signal:n})};try{t()}finally{e.addEventListener=i}return o}function Mr(){_e(),document.querySelectorAll("[data-component=\'sidebar-provider\']").forEach(n=>{if(be.has(n)||ze.has(n))return;let t=new AbortController;Rr(t.signal,()=>sn(n))?be.set(n,t):n.querySelector("[data-component=\'sidebar\']")&&ze.add(n)}),document.removeEventListener("keydown",_e),document.addEventListener("keydown",_e)}var oe;function vn(n={}){var a;oe==null||oe.unmount();let t=new AbortController,{signal:e}=t,i=document.body,o=i.dataset.unitRoot??"",s=i.dataset.siteRoot??"";if(n.nav!==void 0){window.__DOGSBAY_NAV__=n.nav;for(let l of document.querySelectorAll("db-nav-tree")){let c=l.querySelector(":scope > [data-part=\'list\']");c&&!c.querySelector("[data-part=\'item\']")&&((a=l.parentNode)==null||a.insertBefore(l,l.nextSibling))}}Mr(),n.theme!==!1&&kr(e),Tr(e),n.switchers!==!1&&Or(s,e),Dr(e),n.search!==!1&&(po({unitRoot:o,siteRoot:s,prefix:i.dataset.prefix??"",loadScript:bn,signal:e}),go({unitRoot:o,siteRoot:s,prefix:i.dataset.prefix??"",loadScript:bn,signal:e})),yo(e),So(e);let r={unmount(){if(!e.aborted){t.abort();for(let l of[...be.keys(),...ze])Tt(l);_e(),oe===r&&(oe=void 0)}}};return oe=r}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>vn()):vn();})();\n';
|
|
22775
|
-
var CLIENT_FILE = "dogsbay-
|
|
22776
|
-
var SSG_VERSION = "0.2.0-beta.
|
|
22777
|
-
var THEME_TEMPLATES = { "layouts/blank.html": '{# A page without the sidebar or table of contents: landing pages, splash pages, 404. -#}\n<!doctype html>\n<html lang="{{ page.lang }}" dir="{{ page.dir }}"{% if site.colorMode == "dark" %} class="dark"{% endif %}{% if has.crowdedHeader %} data-header="crowded"{% endif %}>\n<head>\n{% include "partials/head.html" %}\n</head>\n<body class="bg-background text-foreground antialiased" data-unit-root="{{ paths.unit }}" data-site-root="{{ paths.site }}" data-prefix="{{ page.prefix }}" data-page="{{ page.out }}"{{ bodyAttrs }}>\n{{ skipLink }}\n<div class="relative flex min-h-svh w-full flex-col bg-background">\n{{ announcementBar }}\n{% include "partials/header.html" %}\n<main id="db-content" class="min-w-0 flex-1 px-6 py-8 outline-none lg:px-12" tabindex="-1">\n<div class="mx-auto {{ widthClass }}">\n{{ banner }}{{ versionBadge }}{{ h1 }}{{ byline }}{{ lede }}{{ hero }}{{ metaStrip }}{{ tocTop }}\n<article class="docs-prose">\n{{ content }}\n</article>\n{% include "partials/footer.html" %}\n</div>\n</main>\n</div>\n{{ searchDialog }}\n{{ scripts }}\n</body>\n</html>\n', "layouts/docs.html": '{# The docs layout: a port of @dogsbay/docs-layout DocsLayout.astro. -#}\n<!doctype html>\n<html lang="{{ page.lang }}" dir="{{ page.dir }}"{% if site.colorMode == "dark" %} class="dark"{% endif %}{% if has.crowdedHeader %} data-header="crowded"{% endif %}>\n<head>\n{% include "partials/head.html" %}\n</head>\n<body class="bg-background text-foreground antialiased" data-unit-root="{{ paths.unit }}" data-site-root="{{ paths.site }}" data-prefix="{{ page.prefix }}" data-page="{{ page.out }}"{{ bodyAttrs }}>\n{{ skipLink }}\n<div class="group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar" data-component="sidebar-provider" style="--sidebar-width: 16rem; --sidebar-width-icon: 3rem;">\n{{ sidebar }}\n<div class="relative flex w-full min-w-0 flex-1 flex-col bg-background">\n{{ announcementBar }}\n{% include "partials/header.html" %}\n<div class="flex min-w-0">\n<main id="db-content" class="min-w-0 flex-1 px-6 py-8 outline-none lg:px-12" tabindex="-1">\n<div class="mx-auto {{ widthClass }}">\n{{ banner }}{{ breadcrumb }}{{ pageActionsInline }}{{ versionBadge }}{{ h1 }}{{ byline }}{{ lede }}{{ hero }}{{ metaStrip }}{{ tocTop }}\n<article class="docs-prose">\n{{ content }}\n</article>\n{% include "partials/footer.html" %}\n</div>\n</main>\n{{ tocRail }}\n</div>\n</div>\n</div>\n{{ searchDialog }}\n{{ scripts }}\n</body>\n</html>\n', "partials/announcement.html": `{#- The site's announcement bar (site.announcement), as DocsLayout's AnnouncementBar.astro: a band above the
|
|
23109
|
+
var CLIENT_JS = '/*! dogsbay-ssg site client (Apache-2.0). Third-party notices: THIRD-PARTY-NOTICES.txt */\n"use strict";(()=>{var Ko=Object.defineProperty;var Vo=(n,t,e)=>t in n?Ko(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var m=(n,t,e)=>Vo(n,typeof t!="symbol"?t+"":t,e);var tt=class extends HTMLElement{constructor(){super(...arguments);m(this,"_initialized",!1);m(this,"_deferred",!1)}connectedCallback(){if(!this._initialized&&!this.firstElementChild&&typeof document<"u"&&document.readyState==="loading"){this._deferred||(this._deferred=!0,document.addEventListener("DOMContentLoaded",()=>{this._deferred=!1,this.isConnected&&this.connectedCallback()},{once:!0}));return}this._initialized||(this.setup(),this._initialized=!0),this.connect()}disconnectedCallback(){this.disconnect()}setup(){}connect(){}disconnect(){}},Uo={"db-tabs":"block","db-accordion":"block","db-collapsible":"block","db-details-sheet":"block","db-card":"block","db-steps":"block","db-code-block":"block","db-link-button":"inline-block","db-dialog":"contents","db-popover":"inline-block","db-tooltip":"inline-block","db-select":"inline-block","db-combobox":"block","db-nav-tree":"block","db-toc":"block","db-announcement":"block"},In="dogsbay-elements-display";function et(){if(typeof document>"u"||document.getElementById(In))return;let n=Object.entries(Uo).map(([e,i])=>`:where(${e}){display:${i}}`).join(""),t=document.createElement("style");t.id=In,t.textContent=n,document.head.prepend(t)}function Wo(n){return n.hasAttribute("disabled")||n.getAttribute("aria-disabled")==="true"}function Wt(n,t,e){let i=t;do i+=e?-1:1;while(i>=0&&i<n.length&&Wo(n[i]));return i}var le=class{constructor(n,t,e={}){m(this,"container");m(this,"itemSelector");m(this,"opts");m(this,"keydownHandler",null);m(this,"active",!1);this.container=n,this.itemSelector=t,this.opts={orientation:e.orientation??"horizontal",loop:e.loop??!0,homeEnd:e.homeEnd??!0,onHighlightedIndexChange:e.onHighlightedIndexChange??(()=>{})}}getItems(){return Array.from(this.container.querySelectorAll(this.itemSelector))}isForwardKey(n,t){let{orientation:e}=this.opts;return(e==="horizontal"||e==="both")&&n===(t?"ArrowLeft":"ArrowRight")||(e==="vertical"||e==="both")&&n==="ArrowDown"}isBackwardKey(n,t){let{orientation:e}=this.opts;return(e==="horizontal"||e==="both")&&n===(t?"ArrowRight":"ArrowLeft")||(e==="vertical"||e==="both")&&n==="ArrowUp"}activate(){this.active||(this.active=!0,this.keydownHandler=n=>{let t=this.getItems();if(t.length===0||n.ctrlKey||n.altKey||n.metaKey)return;let e=getComputedStyle(this.container).direction==="rtl",i=t.indexOf(document.activeElement);if(i===-1)return;let o=null;this.isForwardKey(n.key,e)?(o=Wt(t,i,!1),o>=t.length&&(o=this.opts.loop?Wt(t,-1,!1):i)):this.isBackwardKey(n.key,e)?(o=Wt(t,i,!0),o<0&&(o=this.opts.loop?Wt(t,t.length,!0):i)):this.opts.homeEnd&&n.key==="Home"?o=Wt(t,-1,!1):this.opts.homeEnd&&n.key==="End"&&(o=Wt(t,t.length,!0)),o!==null&&(o<0||o>=t.length||o!==i&&(n.preventDefault(),t[i].setAttribute("tabindex","-1"),t[o].setAttribute("tabindex","0"),t[o].focus(),this.opts.onHighlightedIndexChange(o)))},this.container.addEventListener("keydown",this.keydownHandler))}deactivate(){this.active&&(this.active=!1,this.keydownHandler&&(this.container.removeEventListener("keydown",this.keydownHandler),this.keydownHandler=null))}setActiveIndex(n,t){n.forEach((e,i)=>{e.setAttribute("tabindex",i===t?"0":"-1")})}isActive(){return this.active}};var Yo=0;function Nn(n){return`${n}-${++Yo}`}var Hn=class extends tt{constructor(){super(...arguments);m(this,"list");m(this,"triggers",[]);m(this,"panels",[]);m(this,"nav",null);m(this,"value","");m(this,"syncKey",null);m(this,"orientation","horizontal");m(this,"handleClick",t=>{let e=t.target.closest("[data-part=\'trigger\']");if(!e||e.hasAttribute("disabled"))return;let i=e.dataset.value;i&&this.select(i)});m(this,"handleStorage",t=>{if(!this.syncKey||t.key!==`db-tabs-sync:${this.syncKey}`)return;let e=t.newValue;e&&this.value!==e&&this.has(e)&&this.select(e)});m(this,"handleSyncEvent",(t=>{let e=t.detail.value;e&&this.value!==e&&this.has(e)&&this.select(e)}));m(this,"handleHashChange",()=>{let t=this.valueForHash();t&&(this.select(t.value),t.target&&this.reveal(t.target))})}has(t){return this.triggers.some(e=>e.dataset.value===t)}own(t){return Array.from(this.querySelectorAll(t)).filter(e=>e.closest("db-tabs")===this)}setup(){var s;let t=this.own("[data-part=\'list\']")[0]??null;if(!t)return;this.list=t,this.triggers=this.own("[data-part=\'trigger\']"),this.panels=this.own("[data-part=\'content\']"),this.orientation=this.getAttribute("orientation")||"horizontal",this.syncKey=this.getAttribute("sync-key")||null,t.setAttribute("role","tablist"),t.setAttribute("aria-orientation",this.orientation),this.triggers.forEach(r=>{let a=r.dataset.value;r.setAttribute("role","tab");let c=r.id||Nn("db-tab");r.id=c;let l=this.panels.find(d=>d.dataset.value===a);if(l){l.setAttribute("role","tabpanel");let d=l.id||Nn("db-tabpanel");l.id=d,r.setAttribute("aria-controls",d),l.setAttribute("aria-labelledby",c)}}),this.nav=new le(t,"[data-part=\'trigger\']",{orientation:this.orientation,loop:!0,homeEnd:!0,onHighlightedIndexChange:()=>{var c;let r=document.activeElement,a=(c=r==null?void 0:r.dataset)==null?void 0:c.value;a&&this.select(a)}}),this.nav.activate();let i=this.getAttribute("default-value")||((s=this.triggers[0])==null?void 0:s.dataset.value)||"";if(this.syncKey){let r=localStorage.getItem(`db-tabs-sync:${this.syncKey}`);r&&this.triggers.some(a=>a.dataset.value===r)&&(i=r)}let o=this.valueForHash();o&&(i=o.value),this.select(i),o!=null&&o.target&&this.reveal(o.target)}valueForHash(){let t=window.location.hash.slice(1);if(!t)return;try{t=decodeURIComponent(t)}catch{}if(this.triggers.some(o=>o.dataset.value===t))return{value:t};let e=document.getElementById(t);if(!e)return;let i=this.panels.find(o=>o===e||o.contains(e));return i!=null&&i.dataset.value?{value:i.dataset.value,target:e}:void 0}reveal(t){requestAnimationFrame(()=>{var e;return(e=t.scrollIntoView)==null?void 0:e.call(t)})}connect(){var t;(t=this.list)==null||t.addEventListener("click",this.handleClick),window.addEventListener("hashchange",this.handleHashChange),this.syncKey&&(window.addEventListener("storage",this.handleStorage),document.addEventListener(`db-tabs-sync:${this.syncKey}`,this.handleSyncEvent))}disconnect(){var t;(t=this.list)==null||t.removeEventListener("click",this.handleClick),window.removeEventListener("hashchange",this.handleHashChange),this.syncKey&&(window.removeEventListener("storage",this.handleStorage),document.removeEventListener(`db-tabs-sync:${this.syncKey}`,this.handleSyncEvent))}select(t){this.value!==t&&(this.value=t,this.triggers.forEach(e=>{let i=e.dataset.value===t;e.setAttribute("aria-selected",String(i)),e.setAttribute("tabindex",i?"0":"-1"),i?e.setAttribute("data-state","active"):e.removeAttribute("data-state")}),this.panels.forEach(e=>{let i=e.dataset.value===t;e.hidden=!i,i?(e.setAttribute("data-state","active"),e.hasAttribute("tabindex")||e.setAttribute("tabindex","0")):e.removeAttribute("data-state")}),this.syncKey&&(localStorage.setItem(`db-tabs-sync:${this.syncKey}`,t),document.dispatchEvent(new CustomEvent(`db-tabs-sync:${this.syncKey}`,{detail:{value:t,source:this}}))),this.dispatchEvent(new CustomEvent("db-tabs:change",{detail:{value:t},bubbles:!0})))}};et();customElements.get("db-tabs")||customElements.define("db-tabs",Hn);var Xo=0;function Go(n){return`${n}-${++Xo}`}var Pn=class{constructor(n,t,e={}){m(this,"trigger");m(this,"content");m(this,"_open",!1);m(this,"opts");this.trigger=n,this.content=t,this.opts=e;let i=Go("base-collapsible");n.id||(n.id=`${i}-trigger`),t.id||(t.id=`${i}-content`),n.setAttribute("aria-controls",t.id),t.setAttribute("aria-labelledby",n.id),t.setAttribute("role","region"),n.setAttribute("aria-expanded","false"),n.addEventListener("click",()=>{n.hasAttribute("disabled")||n.getAttribute("aria-disabled")==="true"||this.toggle()})}get isOpen(){return this._open}toggle(){this._open?this.collapse():this.expand()}expand(){var n,t;this._open||(this._open=!0,this.trigger.setAttribute("aria-expanded","true"),this.content.hidden=!1,this.content.setAttribute("data-state","open"),(t=(n=this.opts).onToggle)==null||t.call(n,!0))}collapse(){var n,t;this._open&&(this._open=!1,this.trigger.setAttribute("aria-expanded","false"),this.content.hidden=!0,this.content.removeAttribute("data-state"),(t=(n=this.opts).onToggle)==null||t.call(n,!1))}};var Fn=class extends tt{constructor(){super(...arguments);m(this,"items",[]);m(this,"nav",null);m(this,"openValues",new Set);m(this,"type","single")}setup(){this.type=this.getAttribute("type")||"single";let t=this.getAttribute("default-value")||"",e=t?t.split(","):[],i=Array.from(this.querySelectorAll("[data-part=\'item\']"));this.items=i.map(o=>{let s=o.querySelector("[data-part=\'trigger\']"),r=o.querySelector("[data-part=\'content\']");if(!s||!r)return null;let a=o.dataset.value||"",c=o.hasAttribute("data-disabled");c&&(s.setAttribute("disabled",""),s.setAttribute("aria-disabled","true"));let l=new Pn(s,r,{onToggle:d=>{d?this.onItemExpanded(a):this.onItemCollapsed(a)}});return{el:o,value:a,collapsible:l,disabled:c}}).filter(Boolean),this.nav=new le(this,"[data-part=\'trigger\']",{orientation:"vertical",loop:!0,homeEnd:!0}),this.nav.activate(),this.items.forEach((o,s)=>{o.collapsible.trigger.setAttribute("tabindex",s===0?"0":"-1")}),e.forEach(o=>{let s=this.items.find(r=>r.value===o&&!r.disabled);s&&s.collapsible.expand()})}onItemExpanded(t){if(this.type==="single"){for(let i of this.openValues)if(i!==t){let o=this.items.find(s=>s.value===i);o&&o.collapsible.collapse()}}this.openValues.add(t);let e=this.items.find(i=>i.value===t);e&&e.el.setAttribute("data-state","open"),this.dispatchEvent(new CustomEvent("db-accordion:change",{detail:{value:t,open:!0,openValues:[...this.openValues]},bubbles:!0}))}onItemCollapsed(t){this.openValues.delete(t);let e=this.items.find(i=>i.value===t);e&&e.el.removeAttribute("data-state"),this.dispatchEvent(new CustomEvent("db-accordion:change",{detail:{value:t,open:!1,openValues:[...this.openValues]},bubbles:!0}))}};et();customElements.get("db-accordion")||customElements.define("db-accordion",Fn);var Zo=0;function ot(n){return`${n}-${++Zo}`}function xt(n,t){let e=n.localName;return Array.from(n.querySelectorAll(t)).filter(i=>i.closest(e)===n)}function st(n,t){return xt(n,t)[0]??null}function Yt(n){if(!n||!n.hasAttribute("data-as-child"))return n;let t=n.firstElementChild;if(!t)return n;let e=n.getAttribute("data-part");return e&&t.setAttribute("data-part",e),t}function ht(n){return n.hasAttribute("disabled")||n.getAttribute("aria-disabled")==="true"||n.getAttribute("data-disabled")==="true"}function _n(){return typeof HTMLElement<"u"&&typeof HTMLElement.prototype.showPopover=="function"}function Xt(n){if(n.hidden=!1,!_n())return"inline";n.hasAttribute("popover")||n.setAttribute("popover","manual"),n.style.inset="auto",n.style.margin="0";try{n.matches(":popover-open")||n.showPopover()}catch{return"inline"}return"top-layer"}function Gt(n){if(_n())try{n.matches(":popover-open")&&n.hidePopover()}catch{}n.hidden=!0}var Qo=\'a[href], button:not([disabled]), input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"]), [contenteditable="true"]\';function zn(n){return Array.from(n.querySelectorAll(Qo)).filter(t=>!t.closest("[hidden]")&&!ht(t))}function $n(n,t){let e=typeof n.getAnimations=="function"?n.getAnimations():[];if(!e.length)return t();Promise.all(e.map(i=>i.finished)).then(t,t)}function Zt(n){try{return decodeURIComponent(n)}catch{return n}}var Bn=class extends tt{constructor(){super(...arguments);m(this,"details",null);m(this,"summary",null);m(this,"dialog",null);m(this,"body",null);m(this,"source",null);m(this,"moved",[]);m(this,"handledHash",null);m(this,"onSummaryClick",t=>{var i,o;let e=t.target;e&&e!==this.summary&&((o=(i=e.closest)==null?void 0:i.call(e,"a[href], button, input, select, textarea, label"))==null?void 0:o.closest("summary"))===this.summary||(t.preventDefault(),this.show())});m(this,"onDialogClick",t=>{let e=this.dialog;if(!e||t.target!==e)return;let i=e.getBoundingClientRect();!(t.clientX>=i.left&&t.clientX<=i.right&&t.clientY>=i.top&&t.clientY<=i.bottom)&&(t.clientX!==0||t.clientY!==0)&&e.close()});m(this,"onDialogClose",()=>this.restore());m(this,"onDocClick",t=>{var s,r;if(t.defaultPrevented||t.button!==0||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey)return;let e=(r=(s=t.target)==null?void 0:s.closest)==null?void 0:r.call(s,"a[href]");if(!e||!this.details||this.open||e.hasAttribute("download")||e.target&&e.target!=="_self")return;let i=new URL(e.href,location.href);if(!i.hash||i.hash!==location.hash||i.pathname!==location.pathname||i.search!==location.search)return;let o=document.getElementById(Zt(i.hash.slice(1)));if(!(!o||!this.details.contains(o))){for(let a of this.details.querySelectorAll("db-details-sheet"))a.handledHash=null;this.show(o)}});m(this,"onHash",()=>{this.handledHash=null,this.openForHash()})}get open(){var t;return!!((t=this.dialog)!=null&&t.open)}setup(){var d;let t=Array.from(this.children).find(u=>u.tagName==="DETAILS")??null,e=t?Array.from(t.children).find(u=>u.tagName==="SUMMARY")??null:null,i=typeof HTMLDialogElement<"u"&&typeof HTMLDialogElement.prototype.showModal=="function";if(!t||!e||!i)return;for(let u of Array.from(t.children))u.getAttribute("role")==="status"&&u.setAttribute("aria-live","off");this.details=t,this.summary=e,t.open=!1,Jo();let o=(((d=e.querySelector("[data-part=\'title\']"))==null?void 0:d.textContent)??e.textContent??"").trim(),s=document.createElement("dialog");s.className="db-sheet",s.id=ot("db-sheet");let r=document.createElement("h2");r.className="db-sheet-title",r.id=ot("db-sheet-title"),r.textContent=o,s.setAttribute("aria-labelledby",r.id);let a=document.createElement("button");a.type="button",a.className="db-sheet-close",a.setAttribute("aria-label",this.getAttribute("close-label")||"Close"),a.innerHTML=\'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M18 6 6 18"/><path d="m6 6 12 12"/></svg>\',a.addEventListener("click",()=>s.close());let c=document.createElement("div");c.className="db-sheet-header",c.append(r,a);let l=document.createElement("div");l.className="db-sheet-body",s.append(c,l),this.append(s),this.dialog=s,this.body=l,e.setAttribute("aria-haspopup","dialog"),e.setAttribute("aria-controls",s.id),e.setAttribute("aria-expanded","false"),this.setAttribute("data-state","closed")}connect(){this.dialog&&(this.summary.addEventListener("click",this.onSummaryClick),this.dialog.addEventListener("click",this.onDialogClick),this.dialog.addEventListener("close",this.onDialogClose),window.addEventListener("hashchange",this.onHash),document.addEventListener("click",this.onDocClick),queueMicrotask(()=>this.isConnected&&this.openForHash()))}disconnect(){this.dialog&&(this.dialog.open&&this.dialog.close(),this.restore(!1),this.summary.removeEventListener("click",this.onSummaryClick),this.dialog.removeEventListener("click",this.onDialogClick),this.dialog.removeEventListener("close",this.onDialogClose),window.removeEventListener("hashchange",this.onHash),document.removeEventListener("click",this.onDocClick))}show(t){var c;let{dialog:e,details:i,body:o}=this;if(!e||!i||!o||e.open)return;let s=Array.from(i.childNodes).filter(l=>l!==this.summary),r=s.filter(l=>l.nodeType===Node.ELEMENT_NODE),a=r.length===1&&s.every(l=>{var d;return l===r[0]||!((d=l.textContent)!=null&&d.trim())})?r[0]:null;this.source=a??i,this.moved=a?Array.from(a.childNodes):s,o.append(...this.moved),e.showModal(),this.summary.setAttribute("aria-expanded","true"),this.setAttribute("data-state","open"),t&&t!==i&&((c=t.scrollIntoView)==null||c.call(t,{block:"start"})),this.dispatchEvent(new CustomEvent("db-details-sheet:open",{bubbles:!0}))}close(){var t;(t=this.dialog)==null||t.close()}restore(t=!0){var e,i;this.source&&(this.source.append(...this.moved),this.source=null,this.moved=[],this.summary.setAttribute("aria-expanded","false"),this.setAttribute("data-state","closed"),t&&this.isConnected&&((i=(e=this.summary).checkVisibility)==null?void 0:i.call(e))!==!1&&this.summary.focus(),this.dispatchEvent(new CustomEvent("db-details-sheet:close",{bubbles:!0})))}openForHash(){let t=Zt(location.hash.slice(1));if(!t||!this.details||this.handledHash===location.hash||(this.handledHash=location.hash,this.open))return;let e=document.getElementById(t);e&&this.details.contains(e)&&this.show(e)}},qn="dogsbay-details-sheet";function Jo(){if(document.getElementById(qn))return;let n=document.createElement("style");n.id=qn,n.textContent=["dialog.db-sheet{position:fixed;inset:0 0 0 auto;margin:0;height:100dvh;max-height:none;width:min(32rem,100vw);max-width:100vw;padding:0;border:0;border-left:1px solid var(--border);background:var(--background);color:var(--foreground);box-shadow:0 10px 15px -3px rgb(0 0 0/.1),0 4px 6px -4px rgb(0 0 0/.1);flex-direction:column}","dialog.db-sheet[open]{display:flex}","dialog.db-sheet::backdrop{background:rgb(0 0 0/.6)}",".db-sheet-header{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1rem 1.5rem;border-bottom:1px solid var(--border)}","dialog.db-sheet h2.db-sheet-title{margin:0;padding:0;border:0;font-size:1.125rem;line-height:1.75rem;font-weight:600;scroll-margin:0}",".db-sheet-close{display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;border:0;border-radius:.375rem;background:transparent;color:var(--muted-foreground);cursor:pointer}",".db-sheet-close:hover{background:var(--accent,var(--muted));color:var(--foreground)}",".db-sheet-close:focus-visible{outline:2px solid var(--ring);outline-offset:2px}",".db-sheet-body{flex:1;overflow-y:auto;padding:1.5rem;font-size:.875rem;line-height:1.625}","dialog.db-sheet .db-sheet-body>:first-child{margin-top:0}","html:has(dialog.db-sheet[open]){overflow:hidden}","db-details-sheet>details>summary>span:last-child{transform:rotate(-90deg)}","@media (prefers-reduced-motion:no-preference){dialog.db-sheet[open]{animation:db-sheet-in .2s ease-out}dialog.db-sheet[open]::backdrop{animation:db-sheet-fade .2s ease-out}}","@keyframes db-sheet-in{from{transform:translateX(100%)}}","@keyframes db-sheet-fade{from{opacity:0}}"].join(""),document.head.append(n)}et();customElements.get("db-details-sheet")||customElements.define("db-details-sheet",Bn);var jn=class extends tt{constructor(){super(...arguments);m(this,"copyBtn",null);m(this,"copyIcon",null);m(this,"checkIcon",null);m(this,"liveRegion",null);m(this,"resetTimeout",null);m(this,"handleCopy",async()=>{let t=this.getCopyText();if(t)try{await navigator.clipboard.writeText(t),this.showCopiedFeedback(),this.dispatchEvent(new CustomEvent("db-code-block:copied",{detail:{text:t},bubbles:!0}))}catch{}})}setup(){this.copyBtn=this.querySelector("[data-part=\'copy\']"),this.copyIcon=this.querySelector("[data-part=\'copy-icon\']"),this.checkIcon=this.querySelector("[data-part=\'check-icon\']"),this.copyBtn&&!this.copyBtn.hasAttribute("aria-label")&&this.copyBtn.setAttribute("aria-label","Copy code"),this.liveRegion=document.createElement("span"),this.liveRegion.setAttribute("aria-live","polite"),this.liveRegion.setAttribute("role","status"),this.liveRegion.className="sr-only",this.liveRegion.style.position="absolute",this.liveRegion.style.width="1px",this.liveRegion.style.height="1px",this.liveRegion.style.overflow="hidden",this.liveRegion.style.clip="rect(0, 0, 0, 0)",this.liveRegion.style.whiteSpace="nowrap",this.appendChild(this.liveRegion)}connect(){var t;(t=this.copyBtn)==null||t.addEventListener("click",this.handleCopy)}disconnect(){var t;(t=this.copyBtn)==null||t.removeEventListener("click",this.handleCopy),this.clearResetTimeout()}getCopyText(){let t=this.getAttribute("data-copy-text");if(t)return t;let e=this.querySelector("[data-part=\'code\'] code");if(e)return e.textContent??"";let i=this.querySelector("[data-part=\'code\']");return(i==null?void 0:i.textContent)??""}showCopiedFeedback(){this.clearResetTimeout(),this.copyIcon&&(this.copyIcon.hidden=!0),this.checkIcon&&(this.checkIcon.hidden=!1),this.setAttribute("data-state","copied"),this.liveRegion&&(this.liveRegion.textContent="Copied!"),this.resetTimeout=setTimeout(()=>{this.copyIcon&&(this.copyIcon.hidden=!1),this.checkIcon&&(this.checkIcon.hidden=!0),this.removeAttribute("data-state"),this.liveRegion&&(this.liveRegion.textContent=""),this.resetTimeout=null},2e3)}clearResetTimeout(){this.resetTimeout!==null&&(clearTimeout(this.resetTimeout),this.resetTimeout=null)}};et();customElements.get("db-code-block")||customElements.define("db-code-block",jn);var Kn=class extends tt{constructor(){super(...arguments);m(this,"navData",null);m(this,"onClick",t=>{let e=t.target.closest("[data-part=\'toggle\']");if(!e||e.closest("db-nav-tree")!==this)return;let i=e.closest("[data-part=\'item\']");i&&(this.ensurePrepared(i),this.toggle(i))});m(this,"onKey",t=>{var l,d;if(t.altKey||t.ctrlKey||t.metaKey||t.shiftKey)return;let e=document.activeElement;if(!e||!this.contains(e))return;let i=this.visibleRows(),o=e.closest("[data-part=\'row\']"),s=o?i.indexOf(o):-1;if(s<0)return;let r=o.closest("[data-part=\'item\']");this.ensurePrepared(r);let a=!!this.groupOf(r),c=u=>{var h;u&&(t.preventDefault(),(h=this.primary(u))==null||h.focus())};switch(t.key){case"ArrowDown":return c(i[s+1]);case"ArrowUp":return c(i[s-1]);case"Home":return c(i[0]);case"End":return c(i[i.length-1]);case"ArrowRight":if(!a)return;t.preventDefault(),this.isOpen(r)?c(this.visibleRows()[s+1]):this.setOpen(r,!0);return;case"ArrowLeft":{if(t.preventDefault(),a&&this.isOpen(r))return this.setOpen(r,!1);let u=(l=r.parentElement)==null?void 0:l.closest("[data-part=\'item\']");if(u&&this.contains(u)){let h=u.querySelector(":scope > [data-part=\'row\']");h&&((d=this.primary(h))==null||d.focus())}return}}})}setup(){for(let t of xt(this,"[data-part=\'item\']"))t.style.getPropertyValue("--db-level")||t.style.setProperty("--db-level",String(this.depthOf(t))),this.prepareItem(t)}depthOf(t){var i,o;let e=0;for(let s=(i=t.parentElement)==null?void 0:i.closest("[data-part=\'item\']");s&&this.contains(s);s=(o=s.parentElement)==null?void 0:o.closest("[data-part=\'item\']"))e++;return e}pathOf(t){var i,o;let e=[];for(let s=t;s&&this.contains(s);s=((i=s.parentElement)==null?void 0:i.closest("[data-part=\'item\']"))??null){let r=Array.from(((o=s.parentElement)==null?void 0:o.children)??[]).filter(a=>a.getAttribute("data-part")==="item");e.unshift(r.indexOf(s))}return e.join(".")}connect(){this.addEventListener("click",this.onClick),this.addEventListener("keydown",this.onKey);for(let t of xt(this,"[data-part=\'group\'][data-lazy]")){let e=t.closest("[data-part=\'item\']");e&&this.isOpen(e)&&this.fill(t)}!this.fillEmpty()&&this.emptyList()&&document.readyState!=="complete"&&addEventListener("load",()=>this.isConnected&&this.fillEmpty()&&this.afterFill(),{once:!0}),this.afterFill()}afterFill(){this.hasAttribute("scroll-current")&&requestAnimationFrame(()=>this.revealCurrent())}emptyList(){let t=xt(this,"[data-part=\'list\']")[0];return t&&!t.querySelector("[data-part=\'item\']")?t:null}fillEmpty(){let t=this.emptyList(),e=this.data();if(!t||!e)return!1;t.replaceChildren(...this.build(e,""));let i=t,o=this.serverPath();for(let s of o!=null?o.split(".").map(Number):this.currentPath(e)){let r=Array.from(i.children).filter(c=>c.getAttribute("data-part")==="item")[s],a=r&&this.groupOf(r);if(!r||!a)break;a.hasAttribute("data-lazy")&&this.fill(a),this.apply(r,!0),i=a}return!0}serverPath(){var s;let t=(s=this.getAttribute("current-path"))==null?void 0:s.trim(),e=this.data();if(!t||!e||!/^\\d+(?:\\.\\d+)*$/.test(t))return null;let i=t.split(".").map(Number),o=e;for(let r of i){let a=o==null?void 0:o[r];if(!a)return null;o=a[2]}return i.join(".")}currentPath(t){let e=location.href.split("#")[0],i=o=>{for(let s=0;s<o.length;s++){let[,r,a,c]=o[s],l=r!=null&&!c?this.linkOf(r):null;if(l&&new URL(l.href,document.baseURI).href.split("#")[0]===e)return[s];let d=a!=null&&a.length?i(a):null;if(d)return[s,...d]}return null};return i(t)??[]}linkOf(t){let e=t.replace(/[\\u0000-\\u0020]/g,"");if(/^[a-z][a-z0-9+.-]*:/i.test(e)&&!/^(?:https?|mailto):/i.test(e))return null;let i=/^[a-z][a-z0-9+.-]*:|^\\/\\//i.test(e);return{href:i?t:(this.getAttribute("base")??"")+t,external:i}}disconnect(){this.removeEventListener("click",this.onClick),this.removeEventListener("keydown",this.onKey)}prepareItem(t){let e=t.querySelector(":scope > [data-part=\'row\'] > [data-part=\'toggle\']");if(!e)return;let i=this.groupOf(t);i||(i=document.createElement("ul"),i.setAttribute("data-part","group"),i.dataset.lazy="",i.dataset.path=this.pathOf(t),i.hidden=!0,t.appendChild(i));let o=t.querySelector(":scope > [data-part=\'row\'] > [data-part=\'link\']");o&&!e.hasAttribute("aria-label")&&!e.querySelector("[data-part=\'label\']")&&e.setAttribute("aria-label",(this.getAttribute("toggle-label")??"Toggle {label}").replace("{label}",()=>(o.getAttribute("aria-label")??o.textContent??"").trim())),this.getAttribute("chevron")!=="css"&&!e.querySelector("[data-part=\'chevron\']")&&e.insertAdjacentHTML("beforeend",ts),i.id||(i.id=ot("db-nav-group")),e.setAttribute("aria-controls",i.id),e instanceof HTMLButtonElement&&!e.hasAttribute("type")&&(e.type="button");let s=e.getAttribute("aria-expanded")==="true"||t.getAttribute("data-state")==="open";this.apply(t,s)}ensurePrepared(t){let e=this.toggleOf(t);e&&!e.hasAttribute("aria-controls")&&this.prepareItem(t)}groupOf(t){return t.querySelector(":scope > [data-part=\'group\']")}toggleOf(t){return t.querySelector(":scope > [data-part=\'row\'] > [data-part=\'toggle\']")}primary(t){return t.querySelector(":scope > [data-part=\'link\']")??t.querySelector(":scope > [data-part=\'toggle\']")}visibleRows(){return xt(this,"[data-part=\'row\']").filter(t=>!t.closest("[hidden]"))}isOpen(t){return t.getAttribute("data-state")==="open"}toggle(t){this.setOpen(t,!this.isOpen(t))}setOpen(t,e){let i=this.groupOf(t);!i||this.isOpen(t)===e||(e&&i.hasAttribute("data-lazy")&&this.fill(i),this.apply(t,e),this.dispatchEvent(new CustomEvent("db-nav-tree:toggle",{detail:{item:t,open:e},bubbles:!0})))}apply(t,e){let i=this.groupOf(t),o=this.toggleOf(t);i&&(i.hidden=!e),o==null||o.setAttribute("aria-expanded",String(e)),t.setAttribute("data-state",e?"open":"closed")}revealCurrent(){var s;let t=this.querySelector("[aria-current=\'page\']");if(!t)return;for(let r=t.closest("[data-part=\'item\']");r&&this.contains(r);r=((s=r.parentElement)==null?void 0:s.closest("[data-part=\'item\']"))??null)this.groupOf(r)&&!this.groupOf(r).contains(t)||this.groupOf(r)&&this.setOpen(r,!0);let e=es(this);if(!e)return;let i=t.getBoundingClientRect(),o=e.getBoundingClientRect();(i.top<o.top||i.bottom>o.bottom)&&(e.scrollTop+=i.top-o.top-o.height/2+i.height/2)}data(){if(this.navData)return this.navData;let t=this.getAttribute("data-source"),e=t?globalThis[t]:void 0;return Array.isArray(e)?e:null}fill(t){let e=this.data(),i=t.dataset.path;if(!e||i==null)return;let o=e,s;for(let r of i.split(".").map(Number))s=o==null?void 0:o[r],o=s==null?void 0:s[2];s!=null&&s[2]&&(t.replaceChildren(...this.build(s[2],i)),t.removeAttribute("data-lazy"))}build(t,e){let i=this.getAttribute("toggle-label")??"Toggle {label}",o=location.href.split("#")[0],s=this.serverPath();return t.map(([r,a,c,l],d)=>{let u=e?`${e}.${d}`:String(d),h=document.createElement("li");h.setAttribute("data-part","item"),h.style.setProperty("--db-level",String(u.split(".").length-1));let g=document.createElement("div");g.setAttribute("data-part","row"),h.appendChild(g);let f=a!=null?this.linkOf(a):null;f||(a=null);let b=null;if(c!=null&&c.length)if(b=document.createElement("button"),b.type="button",b.setAttribute("data-part","toggle"),b.setAttribute("aria-expanded","false"),a!=null)b.setAttribute("aria-label",i.replace("{label}",()=>r));else{let p=document.createElement("span");p.setAttribute("data-part","label"),p.textContent=r,b.appendChild(p)}let y=this.getAttribute("toggle-position")==="end";if(b&&!y&&g.appendChild(b),a!=null){let p=document.createElement("a");p.setAttribute("data-part","link"),p.textContent=r,p.href=f.href,f.external&&(p.rel="noopener"),(s!=null?u===s:!l&&p.href.split("#")[0]===o)&&p.setAttribute("aria-current","page"),g.appendChild(p)}if(a==null&&!(c!=null&&c.length)){let p=document.createElement("span");p.setAttribute("data-part","label"),p.textContent=r,g.appendChild(p)}if(b&&y&&g.appendChild(b),c!=null&&c.length){let p=document.createElement("ul");p.setAttribute("data-part","group"),p.dataset.lazy="",p.dataset.path=u,p.hidden=!0,h.setAttribute("data-state","closed"),h.appendChild(p),this.prepareItem(h)}return h})}},ts=\'<svg data-part="chevron" viewBox="0 0 24 24" width="16" height="16" aria-hidden="true" focusable="false"><path d="m9 18 6-6-6-6" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>\';function es(n){for(let t=n.parentElement;t;t=t.parentElement){let e=getComputedStyle(t).overflowY;if((e==="auto"||e==="scroll")&&t.scrollHeight>t.clientHeight)return t}return null}et();customElements.get("db-nav-tree")||customElements.define("db-nav-tree",Kn);var Vn=class extends tt{constructor(){super(...arguments);m(this,"links",[]);m(this,"headings",[]);m(this,"observer",null);m(this,"active",null);m(this,"onScroll",()=>{let t=document.documentElement;window.innerHeight+window.scrollY>=t.scrollHeight-2&&this.headings.length&&this.setActive(this.headings[this.headings.length-1].id)});m(this,"onHash",()=>{let t=Zt(location.hash.slice(1));t&&this.headings.some(e=>e.id===t)&&this.setActive(t)})}slugOf(t){return t.getAttribute("data-toc-slug")??Zt(t.getAttribute("href").slice(1))}setup(){this.links=Array.from(this.querySelectorAll("a[href^=\'#\'], a[data-toc-link]"))}connect(){var e;if(this.headings=this.links.map(i=>document.getElementById(this.slugOf(i))).filter(i=>!!i),!this.headings.length)return;let t=Number(this.getAttribute("offset")??80);typeof IntersectionObserver<"u"&&(this.observer=new IntersectionObserver(i=>{var s;let o=i.find(r=>r.isIntersecting);if(o)return this.setActive(o.target.id);this.setActive(((s=this.lastAbove(t))==null?void 0:s.id)??null)},{rootMargin:`-${t}px 0px -70% 0px`,threshold:0}),this.headings.forEach(i=>this.observer.observe(i))),window.addEventListener("hashchange",this.onHash),window.addEventListener("scroll",this.onScroll,{passive:!0}),this.setActive(((e=this.lastAbove(t))==null?void 0:e.id)??this.headings[0].id)}disconnect(){var t;(t=this.observer)==null||t.disconnect(),this.observer=null,window.removeEventListener("hashchange",this.onHash),window.removeEventListener("scroll",this.onScroll)}lastAbove(t){let e=null;for(let i of this.headings)i.getBoundingClientRect().top<=t+20&&(e=i);return e}setActive(t){if(!(!t||t===this.active)){this.active=t;for(let e of this.links)this.slugOf(e)===t?(e.setAttribute("aria-current","location"),e.setAttribute("data-active","")):(e.removeAttribute("aria-current"),e.removeAttribute("data-active"));this.dispatchEvent(new CustomEvent("db-toc:change",{detail:{id:t},bubbles:!0}))}}};et();customElements.get("db-toc")||customElements.define("db-toc",Vn);var ns=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","area[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",\'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)\',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],Ze=ns.join(","),Yn=typeof Element>"u",de=Yn?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ce=!Yn&&Element.prototype.getRootNode?function(n){var t;return n==null||(t=n.getRootNode)===null||t===void 0?void 0:t.call(n)}:function(n){return n==null?void 0:n.ownerDocument},Le=function(t,e){var i;e===void 0&&(e=!0);var o=t==null||(i=t.getAttribute)===null||i===void 0?void 0:i.call(t,"inert"),s=o===""||o==="true",r=s||e&&t&&(typeof t.closest=="function"?t.closest("[inert]"):Le(t.parentNode));return r},is=function(t){var e,i=t==null||(e=t.getAttribute)===null||e===void 0?void 0:e.call(t,"contenteditable");return i===""||i==="true"},os=function(t,e,i){if(Le(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Ze));return e&&de.call(t,Ze)&&o.unshift(t),o=o.filter(i),o},Qe=function(t,e,i){for(var o=[],s=Array.from(t);s.length;){var r=s.shift();if(!Le(r,!1))if(r.tagName==="SLOT"){var a=r.assignedElements(),c=a.length?a:r.children,l=Qe(c,!0,i);i.flatten?o.push.apply(o,l):o.push({scopeParent:r,candidates:l})}else{var d=de.call(r,Ze);d&&i.filter(r)&&(e||!t.includes(r))&&o.push(r);var u=r.shadowRoot||typeof i.getShadowRoot=="function"&&i.getShadowRoot(r),h=!Le(u,!1)&&(!i.shadowRootFilter||i.shadowRootFilter(r));if(u&&h){var g=Qe(u===!0?r.children:u.children,!0,i);i.flatten?o.push.apply(o,g):o.push({scopeParent:r,candidates:g})}else s.unshift.apply(s,r.children)}}return o},Xn=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Gn=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||is(t))&&!Xn(t)?0:t.tabIndex},ss=function(t,e){var i=Gn(t);return i<0&&e&&!Xn(t)?0:i},rs=function(t,e){return t.tabIndex===e.tabIndex?t.documentOrder-e.documentOrder:t.tabIndex-e.tabIndex},Zn=function(t){return t.tagName==="INPUT"},as=function(t){return Zn(t)&&t.type==="hidden"},cs=function(t){var e=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(i){return i.tagName==="SUMMARY"});return e},ls=function(t,e){for(var i=0;i<t.length;i++)if(t[i].checked&&t[i].form===e)return t[i]},ds=function(t){if(!t.name)return!0;var e=t.form||Ce(t),i=function(a){return e.querySelectorAll(\'input[type="radio"][name="\'+a+\'"]\')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=i(window.CSS.escape(t.name));else try{o=i(t.name)}catch(r){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",r.message),!1}var s=ls(o,t.form);return!s||s===t},us=function(t){return Zn(t)&&t.type==="radio"},hs=function(t){return us(t)&&!ds(t)},fs=function(t){var e,i=t&&Ce(t),o=(e=i)===null||e===void 0?void 0:e.host,s=!1;if(i&&i!==t){var r,a,c;for(s=!!((r=o)!==null&&r!==void 0&&(a=r.ownerDocument)!==null&&a!==void 0&&a.contains(o)||t!=null&&(c=t.ownerDocument)!==null&&c!==void 0&&c.contains(t));!s&&o;){var l,d,u;i=Ce(o),o=(l=i)===null||l===void 0?void 0:l.host,s=!!((d=o)!==null&&d!==void 0&&(u=d.ownerDocument)!==null&&u!==void 0&&u.contains(o))}}return s},Un=function(t){var e=t.getBoundingClientRect(),i=e.width,o=e.height;return i===0&&o===0},ps=function(t,e){var i=e.displayCheck,o=e.getShadowRoot;if(i==="full-native"&&"checkVisibility"in t){var s=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!s}var r=getComputedStyle(t),a=r.visibility;if(a==="hidden"||a==="collapse")return!0;var c=de.call(t,"details>summary:first-of-type"),l=c?t.parentElement:t;if(de.call(l,"details:not([open]) *"))return!0;if(!i||i==="full"||i==="full-native"||i==="legacy-full"){if(typeof o=="function"){for(var d=t;t;){var u=t.parentElement,h=Ce(t);if(u&&!u.shadowRoot&&o(u)===!0)return Un(t);t.assignedSlot?t=t.assignedSlot:!u&&h!==t.ownerDocument?t=h.host:t=u}t=d}if(fs(t))return!t.getClientRects().length;if(i!=="legacy-full")return!0}else if(i==="non-zero-area")return Un(t);return!1},ms=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var e=t.parentElement;e;){if(e.tagName==="FIELDSET"&&e.disabled){for(var i=0;i<e.children.length;i++){var o=e.children.item(i);if(o.tagName==="LEGEND")return de.call(e,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}e=e.parentElement}return!1},gs=function(t,e){return!(e.disabled||as(e)||ps(e,t)||cs(e)||ms(e))},Wn=function(t,e){return!(hs(e)||Gn(e)<0||!gs(t,e))},bs=function(t){var e=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(e)||e>=0)},Qn=function(t){var e=[],i=[];return t.forEach(function(o,s){var r=!!o.scopeParent,a=r?o.scopeParent:o,c=ss(a,r),l=r?Qn(o.candidates):a;c===0?r?e.push.apply(e,l):e.push(a):i.push({documentOrder:s,tabIndex:c,item:o,isScope:r,content:l})}),i.sort(rs).reduce(function(o,s){return s.isScope?o.push.apply(o,s.content):o.push(s.content),o},[]).concat(e)},Je=function(t,e){e=e||{};var i;return e.getShadowRoot?i=Qe([t],e.includeContainer,{filter:Wn.bind(null,e),flatten:!1,getShadowRoot:e.getShadowRoot,shadowRootFilter:bs}):i=os(t,e.includeContainer,Wn.bind(null,e)),Qn(i)};var tn=class{constructor(n,t={}){m(this,"root");m(this,"opts");m(this,"previouslyFocused",null);m(this,"keydownHandler",null);m(this,"active",!1);this.root=n,this.opts={initialFocus:t.initialFocus??"first",returnFocus:t.returnFocus??!0}}activate(){this.active||(this.active=!0,this.previouslyFocused=document.activeElement,this.keydownHandler=n=>{if(n.key!=="Tab")return;let t=Je(this.root);if(t.length===0){n.preventDefault();return}let e=t[0],i=t[t.length-1];n.shiftKey?document.activeElement===e&&(i.focus(),n.preventDefault()):document.activeElement===i&&(e.focus(),n.preventDefault())},document.addEventListener("keydown",this.keydownHandler),requestAnimationFrame(()=>{var t;if(!this.active)return;let n=Je(this.root);this.opts.initialFocus instanceof HTMLElement&&this.root.contains(this.opts.initialFocus)?this.opts.initialFocus.focus():this.opts.initialFocus==="container"?(this.root.hasAttribute("tabindex")||this.root.setAttribute("tabindex","-1"),this.root.focus()):(t=n[0])==null||t.focus()}))}deactivate(){this.active&&(this.active=!1,this.keydownHandler&&(document.removeEventListener("keydown",this.keydownHandler),this.keydownHandler=null),this.opts.returnFocus&&this.previouslyFocused&&document.contains(this.previouslyFocused)&&this.previouslyFocused.focus(),this.previouslyFocused=null)}isActive(){return this.active}};var at,Ht=(at=class{static activate(){if(at.count++,at.count>1)return;let t=window.innerWidth-document.documentElement.clientWidth;at.originalStyles={overflow:document.body.style.overflow,paddingRight:document.body.style.paddingRight},document.body.style.overflow="hidden",t>0&&(document.body.style.paddingRight=`${t}px`)}static deactivate(){at.count=Math.max(0,at.count-1),!(at.count>0)&&at.originalStyles&&(document.body.style.overflow=at.originalStyles.overflow,document.body.style.paddingRight=at.originalStyles.paddingRight,at.originalStyles=null)}static reset(){at.count=0,at.originalStyles=null}},m(at,"count",0),m(at,"originalStyles",null),at);var Et=[];function vs(n){if(n.key!=="Escape"||Et.length===0)return;let t=Et[Et.length-1];t.escapePrevented||(n.preventDefault(),n.stopPropagation(),t.opts.onDismiss("escape-key"))}var Jn=!1;function ys(){Jn||(Jn=!0,document.addEventListener("keydown",vs))}var Pt=class{constructor(n,t){m(this,"root");m(this,"opts");m(this,"outsideHandler",null);m(this,"active",!1);m(this,"frameId",null);m(this,"escapePrevented",!1);this.root=n,this.opts={onDismiss:t.onDismiss,escapeKey:t.escapeKey??!0,outsidePress:t.outsidePress??!0}}activate(){this.active||(this.active=!0,this.opts.escapeKey&&(ys(),Et.push(this)),this.opts.outsidePress&&(this.outsideHandler=n=>{if(Et.length>0&&Et[Et.length-1]!==this)return;let t=n.target;if(this.root.contains(t))return;let e=this.root.id;if(e){let o=document.querySelector(`[aria-controls="${e}"]`);if(o!=null&&o.contains(t))return}let i=this.root.getAttribute("aria-labelledby");if(i){let o=document.getElementById(i);if(o!=null&&o.contains(t))return}typeof this.opts.outsidePress=="function"&&!this.opts.outsidePress(n)||this.opts.onDismiss("outside-press")},this.frameId=requestAnimationFrame(()=>{this.frameId=null,this.outsideHandler&&document.addEventListener("pointerdown",this.outsideHandler)})))}deactivate(){if(!this.active)return;this.active=!1;let n=Et.indexOf(this);n!==-1&&Et.splice(n,1),this.frameId!==null&&(cancelAnimationFrame(this.frameId),this.frameId=null),this.outsideHandler&&(document.removeEventListener("pointerdown",this.outsideHandler),this.outsideHandler=null)}isActive(){return this.active}};function en(n){let t=[],e=n;for(;e&&e!==document.body;){let i=e.parentElement;if(!i)break;for(let o=0;o<i.children.length;o++){let s=i.children[o];if(s===e||s.contains(n))continue;let r=s.tagName;if(r==="SCRIPT"||r==="STYLE"||r==="LINK")continue;let a=s.getAttribute("aria-hidden");a!=="true"&&(t.push({el:s,prev:a}),s.setAttribute("aria-hidden","true"))}e=i}return()=>{for(let{el:i,prev:o}of t)o===null?i.removeAttribute("aria-hidden"):i.setAttribute("aria-hidden",o)}}var ti=class extends tt{constructor(){super(...arguments);m(this,"content",null);m(this,"backdrop",null);m(this,"trigger",null);m(this,"native",!1);m(this,"_open",!1);m(this,"openedBy",null);m(this,"focusTrap",null);m(this,"dismiss",null);m(this,"cleanupInert",null);m(this,"onTriggerClick",t=>{t.preventDefault(),this.toggle(t.currentTarget)});m(this,"onHostClick",t=>{let e=t.target.closest("[data-part=\'close\']");e&&e.closest("db-dialog")===this&&this.close("close-press")});m(this,"onDocumentClick",t=>{var o,s,r;let e=(s=(o=t.target).closest)==null?void 0:s.call(o,"[data-dialog-for]");if(!e||e===this.trigger)return;let i=e.getAttribute("data-dialog-for");i&&(i===this.id||i===((r=this.content)==null?void 0:r.id))&&(t.preventDefault(),this.toggle(e))});m(this,"onCancel",t=>{t.preventDefault(),this.dismissible&&this.close("escape-key")});m(this,"onNativeClick",t=>{if(!this.dismissible||t.target!==this.content||!this.content)return;let e=this.content.getBoundingClientRect();!(t.clientX>=e.left&&t.clientX<=e.right&&t.clientY>=e.top&&t.clientY<=e.bottom)&&(t.clientX!==0||t.clientY!==0)&&this.close("outside-press")});m(this,"onNativeClose",()=>{this._open&&this.finishClose("close-press")})}get open(){return this._open}get dismissible(){return this.getAttribute("dismissible")!=="false"}setup(){if(this.content=st(this,"[data-part=\'content\']"),!this.content)return;this.native=typeof HTMLDialogElement<"u"&&this.content instanceof HTMLDialogElement&&typeof this.content.showModal=="function",this.backdrop=st(this,"[data-part=\'backdrop\']"),this.trigger=Yt(st(this,"[data-part=\'trigger\']"));let t=this.content;t.id||(t.id=ot("db-dialog")),this.native||(t.setAttribute("role",t.getAttribute("role")||"dialog"),t.setAttribute("aria-modal","true"),t.hidden=!this.hasAttribute("open"),this.backdrop&&(this.backdrop.hidden=!0));let e=t.querySelector("[data-part=\'title\']");e&&!t.hasAttribute("aria-labelledby")&&!t.hasAttribute("aria-label")&&(e.id||(e.id=ot("db-dialog-title")),t.setAttribute("aria-labelledby",e.id));let i=t.querySelector("[data-part=\'description\']");i&&!t.hasAttribute("aria-describedby")&&(i.id||(i.id=ot("db-dialog-desc")),t.setAttribute("aria-describedby",i.id));for(let o of this.triggers())this.prepareTrigger(o);this.setState("closed"),this.native||(this.focusTrap=new tn(t),this.dismiss=new Pt(t,{onDismiss:o=>this.dismissible&&this.close(o)}))}connect(){var t;this.content&&((t=this.trigger)==null||t.addEventListener("click",this.onTriggerClick),this.addEventListener("click",this.onHostClick),document.addEventListener("click",this.onDocumentClick),this.native&&(this.content.addEventListener("cancel",this.onCancel),this.content.addEventListener("click",this.onNativeClick),this.content.addEventListener("close",this.onNativeClose)),queueMicrotask(()=>{if(this.isConnected){for(let e of this.triggers())e.hasAttribute("aria-controls")||this.prepareTrigger(e);this.hasAttribute("open")&&!this._open&&this.show()}}))}disconnect(){var t;(t=this.trigger)==null||t.removeEventListener("click",this.onTriggerClick),this.removeEventListener("click",this.onHostClick),document.removeEventListener("click",this.onDocumentClick),this.content&&this.native&&(this.content.removeEventListener("cancel",this.onCancel),this.content.removeEventListener("click",this.onNativeClick),this.content.removeEventListener("close",this.onNativeClose)),this._open&&this.finishClose("api",!1)}triggers(){var i;let t=this.trigger?[this.trigger]:[],e=[this.id,(i=this.content)==null?void 0:i.id].filter(Boolean);for(let o of e)document.querySelectorAll(`[data-dialog-for="${CSS.escape(o)}"]`).forEach(s=>t.push(s));return t}prepareTrigger(t){t.hasAttribute("aria-haspopup")||t.setAttribute("aria-haspopup","dialog"),t.setAttribute("aria-controls",this.content.id),t.setAttribute("aria-expanded","false")}setState(t){var e,i;this.setAttribute("data-state",t),(e=this.content)==null||e.setAttribute("data-state",t),(i=this.backdrop)==null||i.setAttribute("data-state",t)}toggle(t){this._open?this.close("trigger-press"):this.show(t)}show(t){var i,o;let e=this.content;if(!(!e||this._open)){this._open=!0,this.openedBy=t??document.activeElement??this.trigger;for(let s of this.triggers())this.prepareTrigger(s),s.setAttribute("aria-expanded","true");if(Ht.activate(),this.native){let s=e;s.open||s.showModal()}else e.hidden=!1,this.backdrop&&(this.backdrop.hidden=!1),this.cleanupInert=en(e),(i=this.focusTrap)==null||i.activate(),(o=this.dismiss)==null||o.activate();this.setState("open"),this.dispatchEvent(new CustomEvent("db-dialog:open",{bubbles:!0}))}}close(t="api"){this._open&&this.finishClose(t)}finishClose(t,e=!0){var s,r,a;let i=this.content;this._open=!1,this.setState("closed");for(let c of this.triggers())c.setAttribute("aria-expanded","false");if(Ht.deactivate(),this.native){let c=i;c.open&&c.close()}else(s=this.dismiss)==null||s.deactivate(),(r=this.focusTrap)==null||r.deactivate(),(a=this.cleanupInert)==null||a.call(this),this.cleanupInert=null,$n(i,()=>{this._open||(i.hidden=!0,this.backdrop&&(this.backdrop.hidden=!0))});let o=this.openedBy;this.openedBy=null,e&&o&&document.contains(o)&&o.focus(),this.dispatchEvent(new CustomEvent("db-dialog:close",{detail:{reason:t},bubbles:!0}))}};et();customElements.get("db-dialog")||customElements.define("db-dialog",ti);var ei=class extends tt{constructor(){super(...arguments);m(this,"input",null);m(this,"listbox",null);m(this,"empty",null);m(this,"_open",!1);m(this,"highlighted",null);m(this,"observer",null);m(this,"base",ot("db-combobox"));m(this,"optionSeq",0);m(this,"onInput",()=>{this.filtering?this.filter(this.input.value):this.show()});m(this,"onFocus",()=>{(this.hasAttribute("open-on-focus")||this.filtering&&this.input.value)&&(this.filtering?this.filter(this.input.value):this.show())});m(this,"onKey",t=>{let e=this.visible(),i=this.highlighted?e.indexOf(this.highlighted):-1;switch(t.key){case"ArrowDown":t.preventDefault(),this._open||this.show(),e.length&&this.highlight(e[i<0?0:Math.min(i+1,e.length-1)]);break;case"ArrowUp":t.preventDefault(),this._open||this.show(),e.length&&this.highlight(e[i<0?e.length-1:Math.max(i-1,0)]);break;case"Home":case"End":this._open&&this.highlighted&&e.length&&(t.preventDefault(),this.highlight(t.key==="Home"?e[0]:e[e.length-1]));break;case"Enter":this._open&&this.highlighted&&(t.preventDefault(),this.choose(this.highlighted));break;case"Escape":this._open&&!this.inline?(t.preventDefault(),t.stopPropagation(),this.hide()):this.input.value&&(t.preventDefault(),t.stopPropagation(),this.input.value="",this.input.dispatchEvent(new Event("input",{bubbles:!0})),this.hide());break;case"Tab":this.inline||this.hide();break}});m(this,"onListClick",t=>{let e=t.target.closest("[data-part=\'option\']");if(!e||e.closest("db-combobox")!==this||ht(e))return;let i=t.target.closest("a[href]");!this.choose(e,!i)&&i&&t.preventDefault()});m(this,"onListPointer",t=>{let e=t.target.closest("[data-part=\'option\']");e&&e.closest("db-combobox")===this&&!ht(e)&&!e.hidden&&this.highlight(e)});m(this,"onListDown",t=>t.preventDefault());m(this,"onDocDown",t=>{this._open&&!this.inline&&!this.contains(t.target)&&this.hide()})}get open(){return this._open}get inline(){return this.hasAttribute("inline")}get filtering(){return(this.getAttribute("filter")??"contains")!=="none"}options(){return this.listbox?Array.from(this.listbox.querySelectorAll("[data-part=\'option\']")).filter(t=>t.closest("db-combobox")===this):[]}visible(){return this.options().filter(t=>!t.hidden&&!ht(t))}setup(){if(this.input=st(this,"[data-part=\'input\']"),this.listbox=st(this,"[data-part=\'listbox\']"),this.empty=st(this,"[data-part=\'empty\']"),!this.input||!this.listbox)return;let{input:t,listbox:e}=this;e.id||(e.id=`${this.base}-listbox`),e.setAttribute("role","listbox"),t.setAttribute("role","combobox"),t.setAttribute("aria-autocomplete","list"),t.setAttribute("aria-controls",e.id),t.setAttribute("autocomplete","off"),this.inline||(e.hidden=!0),this.prepareOptions(),this.syncExpanded()}prepareOptions(){this.options().forEach(t=>{t.id||(t.id=`${this.base}-option-${++this.optionSeq}`),t.setAttribute("role","option"),t.hasAttribute("aria-selected")||t.setAttribute("aria-selected","false"),t.matches("a[href], button")&&t.setAttribute("tabindex","-1"),t.querySelectorAll("a, button").forEach(e=>e.setAttribute("tabindex","-1")),t.parentElement&&t.parentElement!==this.listbox&&t.parentElement.localName==="li"&&!t.parentElement.hasAttribute("role")&&t.parentElement.setAttribute("role","none")})}connect(){let{input:t,listbox:e}=this;!t||!e||(t.addEventListener("input",this.onInput),t.addEventListener("focus",this.onFocus),t.addEventListener("keydown",this.onKey),e.addEventListener("click",this.onListClick),e.addEventListener("pointermove",this.onListPointer),e.addEventListener("mousedown",this.onListDown),document.addEventListener("pointerdown",this.onDocDown),typeof MutationObserver<"u"&&(this.observer=new MutationObserver(()=>this.onOptionsChanged()),this.observer.observe(e,{childList:!0,subtree:!0})))}disconnect(){var i;let{input:t,listbox:e}=this;t==null||t.removeEventListener("input",this.onInput),t==null||t.removeEventListener("focus",this.onFocus),t==null||t.removeEventListener("keydown",this.onKey),e==null||e.removeEventListener("click",this.onListClick),e==null||e.removeEventListener("pointermove",this.onListPointer),e==null||e.removeEventListener("mousedown",this.onListDown),document.removeEventListener("pointerdown",this.onDocDown),(i=this.observer)==null||i.disconnect(),this.observer=null}refresh(){this.onOptionsChanged()}onOptionsChanged(){this.prepareOptions(),this.highlighted&&!this.options().includes(this.highlighted)&&this.clearHighlight();let t=this.visible();this.filtering||(t.length||this.inline?this.show():this.hide(),t.length&&!this.highlighted&&!this.hasAttribute("no-autohighlight")&&this.highlight(t[0])),this.syncExpanded(),this.dispatchEvent(new CustomEvent("db-combobox:update",{detail:{count:t.length},bubbles:!0}))}filter(t){let e=t.toLowerCase().trim(),i=0;for(let s of this.options()){let r=!e||(s.textContent??"").toLowerCase().includes(e)||(s.dataset.value??"").toLowerCase().includes(e);s.hidden=!r,r&&i++}this.empty&&(this.empty.hidden=i>0||!e),this.clearHighlight(),i||e&&this.empty?this.show():this.hide();let o=this.visible();o.length&&!this.hasAttribute("no-autohighlight")&&this.highlight(o[0]),this.dispatchEvent(new CustomEvent("db-combobox:update",{detail:{count:i},bubbles:!0}))}syncExpanded(){if(!this.input)return;let t=this.inline?this.visible().length>0:this._open;this.input.setAttribute("aria-expanded",String(t)),this.setAttribute("data-state",t?"open":"closed")}show(){if(!this.listbox||this._open)return this.syncExpanded();this._open=!0,this.listbox.hidden=!1,this.syncExpanded()}hide(){if(this.listbox){if(this.clearHighlight(),!this._open)return this.syncExpanded();this._open=!1,this.inline||(this.listbox.hidden=!0),this.syncExpanded()}}highlight(t){var e,i,o;this.input&&((e=this.highlighted)==null||e.removeAttribute("data-highlighted"),(i=this.highlighted)==null||i.setAttribute("aria-selected","false"),this.highlighted=t,t.setAttribute("data-highlighted",""),t.setAttribute("aria-selected","true"),this.input.setAttribute("aria-activedescendant",t.id),(o=t.scrollIntoView)==null||o.call(t,{block:"nearest"}))}clearHighlight(){var t,e,i;(t=this.highlighted)==null||t.removeAttribute("data-highlighted"),(e=this.highlighted)==null||e.setAttribute("aria-selected","false"),this.highlighted=null,(i=this.input)==null||i.removeAttribute("aria-activedescendant")}choose(t,e=!0){var a;let i=t.dataset.value??"",o=((a=t.textContent)==null?void 0:a.trim())??i,s=new CustomEvent("db-combobox:select",{detail:{value:i,text:o,option:t},bubbles:!0,cancelable:!0});if(!this.dispatchEvent(s))return!1;let r=t.matches("a[href]")?t:t.querySelector("a[href]");return r?(e&&r.click(),!0):(this.input&&(this.input.value=t.getAttribute("data-label")??o),this.inline||this.hide(),this.dispatchEvent(new CustomEvent("db-combobox:change",{detail:{value:i,text:o},bubbles:!0})),!0)}};et();customElements.get("db-combobox")||customElements.define("db-combobox",ei);var Tt=Math.min,ft=Math.max,he=Math.round,fe=Math.floor,bt=n=>({x:n,y:n}),ws={left:"right",right:"left",bottom:"top",top:"bottom"};function oi(n,t,e){return ft(n,Tt(t,e))}function Qt(n,t){return typeof n=="function"?n(t):n}function Ot(n){return n.split("-")[0]}function Jt(n){return n.split("-")[1]}function nn(n){return n==="x"?"y":"x"}function on(n){return n==="y"?"height":"width"}function vt(n){let t=n[0];return t==="t"||t==="b"?"y":"x"}function sn(n){return nn(vt(n))}function si(n,t,e){e===void 0&&(e=!1);let i=Jt(n),o=sn(n),s=on(o),r=o==="x"?i===(e?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(r=ue(r)),[r,ue(r)]}function ri(n){let t=ue(n);return[ke(n),t,ke(t)]}function ke(n){return n.includes("start")?n.replace("start","end"):n.replace("end","start")}var ni=["left","right"],ii=["right","left"],xs=["top","bottom"],Es=["bottom","top"];function Ss(n,t,e){switch(n){case"top":case"bottom":return e?t?ii:ni:t?ni:ii;case"left":case"right":return t?xs:Es;default:return[]}}function ai(n,t,e,i){let o=Jt(n),s=Ss(Ot(n),e==="start",i);return o&&(s=s.map(r=>r+"-"+o),t&&(s=s.concat(s.map(ke)))),s}function ue(n){let t=Ot(n);return ws[t]+n.slice(t.length)}function As(n){var t,e,i,o;return{top:(t=n.top)!=null?t:0,right:(e=n.right)!=null?e:0,bottom:(i=n.bottom)!=null?i:0,left:(o=n.left)!=null?o:0}}function ci(n){return typeof n!="number"?As(n):{top:n,right:n,bottom:n,left:n}}function Ft(n){let{x:t,y:e,width:i,height:o}=n;return{width:i,height:o,top:e,left:t,right:t+i,bottom:e+o,x:t,y:e}}function li(n,t,e){let{reference:i,floating:o}=n,s=vt(t),r=sn(t),a=on(r),c=Ot(t),l=s==="y",d=i.x+i.width/2-o.width/2,u=i.y+i.height/2-o.height/2,h=i[a]/2-o[a]/2,g;switch(c){case"top":g={x:d,y:i.y-o.height};break;case"bottom":g={x:d,y:i.y+i.height};break;case"right":g={x:i.x+i.width,y:u};break;case"left":g={x:i.x-o.width,y:u};break;default:g={x:i.x,y:i.y}}let f=Jt(t);return f&&(g[r]+=h*(f==="end"?1:-1)*(e&&l?-1:1)),g}async function di(n,t){var e;t===void 0&&(t={});let{x:i,y:o,platform:s,rects:r,elements:a,strategy:c}=n,{boundary:l="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:h=!1,padding:g=0}=Qt(t,n),f=ci(g),y=a[h?u==="floating"?"reference":"floating":u],p=Ft(await s.getClippingRect({element:(e=await(s.isElement==null?void 0:s.isElement(y)))==null||e?y:y.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:l,rootBoundary:d,strategy:c})),v=u==="floating"?{x:i,y:o,width:r.floating.width,height:r.floating.height}:r.reference,x=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),E=await(s.isElement==null?void 0:s.isElement(x))&&await(s.getScale==null?void 0:s.getScale(x))||{x:1,y:1},M=Ft(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:v,offsetParent:x,strategy:c}):v);return{top:(p.top-M.top+f.top)/E.y,bottom:(M.bottom-p.bottom+f.bottom)/E.y,left:(p.left-M.left+f.left)/E.x,right:(M.right-p.right+f.right)/E.x}}var Cs=50,ui=async(n,t,e)=>{let{placement:i="bottom",strategy:o="absolute",middleware:s=[],platform:r}=e,a=r.detectOverflow?r:{...r,detectOverflow:di},c=await(r.isRTL==null?void 0:r.isRTL(t)),l=await r.getElementRects({reference:n,floating:t,strategy:o}),{x:d,y:u}=li(l,i,c),h=i,g=0,f={};for(let b=0;b<s.length;b++){let y=s[b];if(!y)continue;let{name:p,fn:v}=y,{x,y:E,data:M,reset:A}=await v({x:d,y:u,initialPlacement:i,placement:h,strategy:o,middlewareData:f,rects:l,platform:a,elements:{reference:n,floating:t}});d=x??d,u=E??u,f[p]={...f[p],...M},A&&g<Cs&&(g++,typeof A=="object"&&(A.placement&&(h=A.placement),A.rects&&(l=A.rects===!0?await r.getElementRects({reference:n,floating:t,strategy:o}):A.rects),{x:d,y:u}=li(l,h,c)),b=-1)}return{x:d,y:u,placement:h,strategy:o,middlewareData:f}};var hi=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(t){var e,i;let{placement:o,middlewareData:s,rects:r,initialPlacement:a,platform:c,elements:l}=t,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:h,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:b=!0,...y}=Qt(n,t);if((e=s.arrow)!=null&&e.alignmentOffset)return{};let p=Ot(o),v=vt(a),x=Ot(a)===a,E=await(c.isRTL==null?void 0:c.isRTL(l.floating)),M=h||(x||!b?[ue(a)]:ri(a)),A=f!=="none";!h&&A&&M.push(...ai(a,b,f,E));let S=[a,...M],w=await c.detectOverflow(t,y),Y=[],$=((i=s.flip)==null?void 0:i.overflows)||[];if(d&&Y.push(w[p]),u){let q=si(o,r,E);Y.push(w[q[0]],w[q[1]])}if($=[...$,{placement:o,overflows:Y}],!Y.every(q=>q<=0)){var X,C;let q=(((X=s.flip)==null?void 0:X.index)||0)+1,V=S[q];if(V&&(!(u==="alignment"?v!==vt(V):!1)||$.every(U=>vt(U.placement)===v?U.overflows[0]>0:!0)))return{data:{index:q,overflows:$},reset:{placement:V}};let z=(C=$.filter(j=>j.overflows[0]<=0).sort((j,U)=>j.overflows[1]-U.overflows[1])[0])==null?void 0:C.placement;if(!z)switch(g){case"bestFit":{var R;let j=(R=$.filter(U=>{if(A){let T=vt(U.placement);return T===v||T==="y"}return!0}).map(U=>[U.placement,U.overflows.filter(T=>T>0).reduce((T,I)=>T+I,0)]).sort((U,T)=>U[1]-T[1])[0])==null?void 0:R[0];j&&(z=j);break}case"initialPlacement":z=a;break}if(o!==z)return{reset:{placement:z}}}return{}}}};var Ls=new Set(["left","top"]);async function ks(n,t){let{placement:e,platform:i,elements:o}=n,s=await(i.isRTL==null?void 0:i.isRTL(o.floating)),r=Ot(e),a=Jt(e),c=vt(e)==="y",l=Ls.has(r)?-1:1,d=s&&c?-1:1,u=Qt(t,n),{mainAxis:h,crossAxis:g,alignmentAxis:f}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return a&&typeof f=="number"&&(g=a==="end"?f*-1:f),c?{x:g*d,y:h*l}:{x:h*l,y:g*d}}var fi=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(t){var e,i;let{x:o,y:s,placement:r,middlewareData:a}=t,c=await ks(t,n);return r===((e=a.offset)==null?void 0:e.placement)&&(i=a.arrow)!=null&&i.alignmentOffset?{}:{x:o+c.x,y:s+c.y,data:{...c,placement:r}}}}},pi=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(t){let{x:e,y:i,placement:o,platform:s}=t,{mainAxis:r=!0,crossAxis:a=!1,limiter:c={fn:v=>{let{x,y:E}=v;return{x,y:E}}},...l}=Qt(n,t),d={x:e,y:i},u=await s.detectOverflow(t,l),h=vt(o),g=nn(h),f=d[g],b=d[h],y=(v,x)=>oi(x+u[v==="y"?"top":"left"],x,x-u[v==="y"?"bottom":"right"]);r&&(f=y(g,f)),a&&(b=y(h,b));let p=c.fn({...t,[g]:f,[h]:b});return{...p,data:{x:p.x-e,y:p.y-i,enabled:{[g]:r,[h]:a}}}}}};var mi=function(n){return n===void 0&&(n={}),{name:"size",options:n,async fn(t){let{placement:e,rects:i,platform:o,elements:s}=t,{apply:r=()=>{},...a}=Qt(n,t),c=await o.detectOverflow(t,a),l=Ot(e),d=Jt(e),u=vt(e)==="y",{width:h,height:g}=i.floating,f,b;l==="top"||l==="bottom"?(f=l,b=d===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?"start":"end")?"left":"right"):(b=l,f=d==="end"?"top":"bottom");let y=g-c.top-c.bottom,p=h-c.left-c.right,v=Tt(g-c[f],y),x=Tt(h-c[b],p),E=t.middlewareData.shift,M=!E,A=v,S=x;E!=null&&E.enabled.x&&(S=p),E!=null&&E.enabled.y&&(A=y),M&&!d&&(u?S=h-2*ft(c.left,c.right):A=g-2*ft(c.top,c.bottom)),await r({...t,availableWidth:S,availableHeight:A});let w=await o.getDimensions(s.floating);return h!==w.width||g!==w.height?{reset:{rects:!0}}:{}}}};function Te(){return typeof window<"u"}function zt(n){return bi(n)?(n.nodeName||"").toLowerCase():"#document"}function ct(n){var t;return(n==null||(t=n.ownerDocument)==null?void 0:t.defaultView)||window}function yt(n){var t;return(t=(bi(n)?n.ownerDocument:n.document)||window.document)==null?void 0:t.documentElement}function bi(n){return Te()?n instanceof Node||n instanceof ct(n).Node:!1}function pt(n){return Te()?n instanceof Element||n instanceof ct(n).Element:!1}function St(n){return Te()?n instanceof HTMLElement||n instanceof ct(n).HTMLElement:!1}function gi(n){return!Te()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof ct(n).ShadowRoot}function pe(n){let{overflow:t,overflowX:e,overflowY:i,display:o}=mt(n);return/auto|scroll|overlay|hidden|clip/.test(t+i+e)&&o!=="inline"&&o!=="contents"}function vi(n){return/^(table|td|th)$/.test(zt(n))}function me(n){try{if(n.matches(":popover-open"))return!0}catch{}try{return n.matches(":modal")}catch{return!1}}var Ts=/transform|translate|scale|rotate|perspective|filter/,Os=/paint|layout|strict|content/,_t=n=>!!n&&n!=="none",rn;function Oe(n){let t=pt(n)?mt(n):n;return _t(t.transform)||_t(t.translate)||_t(t.scale)||_t(t.rotate)||_t(t.perspective)||!Re()&&(_t(t.backdropFilter)||_t(t.filter))||Ts.test(t.willChange||"")||Os.test(t.contain||"")}function yi(n){let t=Rt(n);for(;St(t)&&!ee(t);){if(Oe(t))return t;if(me(t))return null;t=Rt(t)}return null}function Re(){return rn==null&&(rn=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),rn}function ee(n){return/^(html|body|#document)$/.test(zt(n))}function mt(n){return ct(n).getComputedStyle(n)}function ge(n){return pt(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function Rt(n){if(zt(n)==="html")return n;let t=n.assignedSlot||n.parentNode||gi(n)&&n.host||yt(n);return gi(t)?t.host:t}function wi(n){let t=Rt(n);return ee(t)?(n.ownerDocument||n).body:St(t)&&pe(t)?t:wi(t)}function te(n,t,e){var i;t===void 0&&(t=[]),e===void 0&&(e=!0);let o=wi(n),s=o===((i=n.ownerDocument)==null?void 0:i.body),r=ct(o);if(s){let a=De(r);return t.concat(r,r.visualViewport||[],pe(o)?o:[],a&&e?te(a):[])}else return t.concat(o,te(o,[],e))}function De(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function Si(n){let t=mt(n),e=parseFloat(t.width)||0,i=parseFloat(t.height)||0,o=St(n),s=o?n.offsetWidth:e,r=o?n.offsetHeight:i,a=he(e)!==s||he(i)!==r;return a&&(e=s,i=r),{width:e,height:i,$:a}}function cn(n){return pt(n)?n:n.contextElement}function ne(n){let t=cn(n);if(!St(t))return bt(1);let e=t.getBoundingClientRect(),{width:i,height:o,$:s}=Si(t),r=(s?he(e.width):e.width)/i,a=(s?he(e.height):e.height)/o;return(!r||!Number.isFinite(r))&&(r=1),(!a||!Number.isFinite(a))&&(a=1),{x:r,y:a}}var Rs=bt(0);function Ai(n){let t=ct(n);return!Re()||!t.visualViewport?Rs:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ds(n,t,e){return t===void 0&&(t=!1),!!e&&t&&e===ct(n)}function $t(n,t,e,i){t===void 0&&(t=!1),e===void 0&&(e=!1);let o=n.getBoundingClientRect(),s=cn(n),r=bt(1);t&&(i?pt(i)&&(r=ne(i)):r=ne(n));let a=Ds(s,e,i)?Ai(s):bt(0),c=(o.left+a.x)/r.x,l=(o.top+a.y)/r.y,d=o.width/r.x,u=o.height/r.y;if(s&&i){let h=ct(s),g=pt(i)?ct(i):i,f=h,b=De(f);for(;b&&g!==f;){let y=ne(b),p=b.getBoundingClientRect(),v=mt(b),x=p.left+(b.clientLeft+parseFloat(v.paddingLeft))*y.x,E=p.top+(b.clientTop+parseFloat(v.paddingTop))*y.y;c*=y.x,l*=y.y,d*=y.x,u*=y.y,c+=x,l+=E,f=ct(b),b=De(f)}}return Ft({width:d,height:u,x:c,y:l})}function Me(n,t){let e=ge(n).scrollLeft;return t?t.left+e:$t(yt(n)).left+e}function Ci(n,t){let e=n.getBoundingClientRect(),i=e.left+t.scrollLeft-Me(n,e),o=e.top+t.scrollTop;return{x:i,y:o}}function Ms(n){let{elements:t,rect:e,offsetParent:i,strategy:o}=n,s=o==="fixed",r=yt(i),a=t?me(t.floating):!1;if(i===r||a&&s)return e;let c={scrollLeft:0,scrollTop:0},l=bt(1),d=bt(0),u=St(i);if((u||!s)&&((zt(i)!=="body"||pe(r))&&(c=ge(i)),u)){let g=$t(i);l=ne(i),d.x=g.x+i.clientLeft,d.y=g.y+i.clientTop}let h=r&&!u&&!s?Ci(r,c):bt(0);return{width:e.width*l.x,height:e.height*l.y,x:e.x*l.x-c.scrollLeft*l.x+d.x+h.x,y:e.y*l.y-c.scrollTop*l.y+d.y+h.y}}function Is(n){return n.getClientRects?Array.from(n.getClientRects()):[]}function Ns(n){let t=ge(n),e=n.ownerDocument.body,i=ft(n.scrollWidth,n.clientWidth,e.scrollWidth,e.clientWidth),o=ft(n.scrollHeight,n.clientHeight,e.scrollHeight,e.clientHeight),s=-t.scrollLeft+Me(n),r=-t.scrollTop;return mt(e).direction==="rtl"&&(s+=ft(n.clientWidth,e.clientWidth)-i),{width:i,height:o,x:s,y:r}}var Hs=25;function Ps(n,t,e){e===void 0&&(e="viewport");let i=e==="layoutViewport",o=ct(n),s=yt(n),r=o.visualViewport,a=s.clientWidth,c=s.clientHeight,l=0,d=0;if(r){let h=!Re()||t==="fixed";i?h||(l=-r.offsetLeft,d=-r.offsetTop):(a=r.width,c=r.height,h&&(l=r.offsetLeft,d=r.offsetTop))}if(Me(s)<=0){let h=s.ownerDocument,g=h.body,f=getComputedStyle(g),b=h.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,y=Math.abs(s.clientWidth-g.clientWidth-b),p=getComputedStyle(s).scrollbarGutter==="stable both-edges"?y/2:y;p<=Hs&&(a-=p)}return{width:a,height:c,x:l,y:d}}function Fs(n,t){let e=$t(n,!0,t==="fixed"),i=e.top+n.clientTop,o=e.left+n.clientLeft,s=ne(n),r=n.clientWidth*s.x,a=n.clientHeight*s.y,c=o*s.x,l=i*s.y;return{width:r,height:a,x:c,y:l}}function xi(n,t,e){let i;if(t==="viewport"||t==="layoutViewport")i=Ps(n,e,t);else if(t==="document")i=Ns(yt(n));else if(pt(t))i=Fs(t,e);else{let o=Ai(n);i={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Ft(i)}function _s(n,t){let e=t.get(n);if(e)return e;let i=te(n,[],!1).filter(a=>pt(a)&&zt(a)!=="body"),o=null,s=mt(n).position==="fixed",r=s?Rt(n):n;for(;pt(r)&&!ee(r);){let a=mt(r),c=Oe(r),l=o?o.position:s?"fixed":"";!c&&(l==="fixed"||l==="absolute"&&a.position==="static")?i=i.filter(u=>u!==r):o=a,r=Rt(r)}return t.set(n,i),i}function zs(n){let{element:t,boundary:e,rootBoundary:i,strategy:o}=n,r=[...e==="clippingAncestors"?me(t)?[]:_s(t,this._c):[].concat(e),i],a=xi(t,r[0],o),c=a.top,l=a.right,d=a.bottom,u=a.left;for(let h=1;h<r.length;h++){let g=xi(t,r[h],o);c=ft(g.top,c),l=Tt(g.right,l),d=Tt(g.bottom,d),u=ft(g.left,u)}return{width:l-u,height:d-c,x:u,y:c}}function $s(n){let{width:t,height:e}=Si(n);return{width:t,height:e}}function qs(n,t,e){let i=St(t),o=yt(t),s=e==="fixed",r=$t(n,!0,s,t),a={scrollLeft:0,scrollTop:0},c=bt(0);if((i||!s)&&((zt(t)!=="body"||pe(o))&&(a=ge(t)),i)){let h=$t(t,!0,s,t);c.x=h.x+t.clientLeft,c.y=h.y+t.clientTop}!i&&o&&(c.x=Me(o));let l=o&&!i&&!s?Ci(o,a):bt(0),d=r.left+a.scrollLeft-c.x-l.x,u=r.top+a.scrollTop-c.y-l.y;return{x:d,y:u,width:r.width,height:r.height}}function an(n){return mt(n).position==="static"}function Ei(n,t){if(!St(n)||mt(n).position==="fixed")return null;if(t)return t(n);let e=n.offsetParent;return yt(n)===e&&(e=e.ownerDocument.body),e}function Li(n,t){let e=ct(n);if(me(n))return e;if(!St(n)){let o=Rt(n);for(;o&&!ee(o);){if(pt(o)&&!an(o))return o;o=Rt(o)}return e}let i=Ei(n,t);for(;i&&vi(i)&&an(i);)i=Ei(i,t);return i&&ee(i)&&an(i)&&!Oe(i)?e:i||yi(n)||e}var Bs=async function(n){let t=this.getOffsetParent||Li,e=this.getDimensions,i=await e(n.floating);return{reference:qs(n.reference,await t(n.floating),n.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function js(n){return mt(n).direction==="rtl"}var Ks={convertOffsetParentRelativeRectToViewportRelativeRect:Ms,getDocumentElement:yt,getClippingRect:zs,getOffsetParent:Li,getElementRects:Bs,getClientRects:Is,getDimensions:$s,getScale:ne,isElement:pt,isRTL:js};function ki(n,t){return n.x===t.x&&n.y===t.y&&n.width===t.width&&n.height===t.height}function Vs(n,t,e){let i=null,o,s=yt(n);function r(){var d;clearTimeout(o),(d=i)==null||d.disconnect(),i=null}function a(d,u){d===void 0&&(d=!1),u===void 0&&(u=1),r();let h=n.getBoundingClientRect(),{left:g,top:f,width:b,height:y}=h;if(d||t(),!b||!y)return;let p=fe(f),v=fe(s.clientWidth-(g+b)),x=fe(s.clientHeight-(f+y)),E=fe(g),A={rootMargin:-p+"px "+-v+"px "+-x+"px "+-E+"px",threshold:ft(0,Tt(1,u))||1},S=!0;function w(Y){let $=Y[0].intersectionRatio;if(!ki(h,n.getBoundingClientRect()))return a();if($!==u){if(!S)return a();$?a(!1,$):o=setTimeout(()=>{a(!1,1e-7)},1e3)}S=!1}try{i=new IntersectionObserver(w,{...A,root:s.ownerDocument})}catch{i=new IntersectionObserver(w,A)}i.observe(n)}let c=ct(n),l=()=>a(e);return c.addEventListener("resize",l),a(!0),()=>{c.removeEventListener("resize",l),r()}}function Ti(n,t,e,i){i===void 0&&(i={});let{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=i,l=cn(n),d=o||s?[...l?te(l):[],...t?te(t):[]]:[];d.forEach(p=>{o&&p.addEventListener("scroll",e),s&&p.addEventListener("resize",e)});let u=l&&a?Vs(l,e,s):null,h=-1,g=null;r&&(g=new ResizeObserver(p=>{let[v]=p;v&&v.target===l&&g&&t&&(g.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var x;(x=g)==null||x.observe(t)})),e()}),l&&!c&&g.observe(l),t&&g.observe(t));let f,b=c?$t(n):null;c&&y();function y(){let p=$t(n);b&&!ki(b,p)&&e(),b=p,f=requestAnimationFrame(y)}return e(),()=>{var p;d.forEach(v=>{o&&v.removeEventListener("scroll",e),s&&v.removeEventListener("resize",e)}),u==null||u(),(p=g)==null||p.disconnect(),g=null,c&&cancelAnimationFrame(f)}}var Oi=fi;var Ri=pi,Di=hi,Mi=mi;var Ii=(n,t,e)=>{let i=new Map,o=e??{},s={...Ks,...o.platform,_c:i};return ui(n,t,{...o,platform:s})};function qt(n,t,e={}){let{placement:i="bottom-start",strategy:o="absolute",offset:s=4,flip:r=!0,shift:a=!0,padding:c=8,matchWidth:l=!1}=e,d=[Oi(s),...r?[Di({padding:c})]:[],...a?[Ri({padding:c})]:[],...l?[Mi({apply({rects:h}){Object.assign(t.style,{width:`${h.reference.width}px`})}})]:[]];return t.style.position=o,Ti(n,t,async()=>{let h=await Ii(n,t,{placement:i,strategy:o,middleware:d});Object.assign(t.style,{left:`${h.x}px`,top:`${h.y}px`});let g=h.placement.split("-")[0];t.setAttribute("data-side",g)})}var ln=class{constructor(n){m(this,"opts");m(this,"buffer","");m(this,"timerId",null);m(this,"timeout");this.opts=n,this.timeout=n.timeout??1e3}handle(n){if(n.length!==1)return!1;this.timerId!==null&&clearTimeout(this.timerId),this.buffer+=n.toLowerCase(),this.timerId=setTimeout(()=>{this.buffer="",this.timerId=null},this.timeout);let t=this.opts.getItemCount();for(let e=0;e<t;e++)if(this.opts.getItemText(e).toLowerCase().startsWith(this.buffer))return this.opts.onMatch(e),!0;return!0}reset(){this.buffer="",this.timerId!==null&&(clearTimeout(this.timerId),this.timerId=null)}};var Ni=class extends tt{constructor(){super(...arguments);m(this,"trigger",null);m(this,"content",null);m(this,"valueEl",null);m(this,"items",[]);m(this,"nativeSelect",null);m(this,"hiddenInput",null);m(this,"labelEl",null);m(this,"onLabelClick",t=>{var e;t.target.closest("[data-part=\'trigger\']")||(t.preventDefault(),(e=this.trigger)==null||e.focus())});m(this,"dismiss",null);m(this,"typeahead",null);m(this,"cleanupFloating",null);m(this,"_open",!1);m(this,"_value","");m(this,"highlighted",-1);m(this,"syncing",!1);m(this,"onNativeChange",()=>{this.syncing||this.refresh()});m(this,"onFormReset",()=>setTimeout(()=>this.refresh()));m(this,"onTriggerClick",()=>{this.isDisabled||(this._open?this.close():this.show())});m(this,"onTriggerKeyUp",t=>{t.key===" "&&t.preventDefault()});m(this,"onTriggerKey",t=>{var s,r;if(this.isDisabled)return;let e=this.enabled();if(!this._open){if(t.key==="ArrowDown"||t.key==="ArrowUp"||t.key==="Enter"||t.key===" "||t.altKey&&t.key==="ArrowDown")t.preventDefault(),this.show(),t.key==="ArrowUp"&&e.length&&this.highlight(this.items.indexOf(e[e.length-1]));else if(t.key==="Home"||t.key==="End"){t.preventDefault(),this.show();let a=t.key==="Home"?e[0]:e[e.length-1];a&&this.highlight(this.items.indexOf(a))}else t.key.length===1&&!t.ctrlKey&&!t.metaKey&&!t.altKey&&((s=this.typeahead)==null||s.handle(t.key));return}if(!e.length)return;let i=this.highlighted>=0?e.indexOf(this.items[this.highlighted]):-1,o=a=>{t.preventDefault(),this.highlight(this.items.indexOf(e[a]))};switch(t.key){case"ArrowDown":return o(Math.min(i+1,e.length-1));case"ArrowUp":return t.altKey?(t.preventDefault(),this.highlighted>=0&&this.select(this.items[this.highlighted]),this.close()):o(Math.max(i-1,0));case"Home":return o(0);case"End":return o(e.length-1);case"PageDown":return o(Math.min(i+10,e.length-1));case"PageUp":return o(Math.max(i-10,0));case"Enter":case" ":return t.preventDefault(),this.highlighted>=0&&this.select(this.items[this.highlighted]),this.close();case"Tab":return this.highlighted>=0&&this.select(this.items[this.highlighted]),this.close(!1);default:t.key.length===1&&!t.ctrlKey&&!t.metaKey&&!t.altKey&&((r=this.typeahead)==null||r.handle(t.key))}});m(this,"onListClick",t=>{let e=t.target.closest("[data-part=\'item\']");!e||!this.items.includes(e)||ht(e)||(this.select(e),this.close())});m(this,"onListPointer",t=>{let e=t.target.closest("[data-part=\'item\']");e&&this.items.includes(e)&&!ht(e)&&this.highlight(this.items.indexOf(e))});m(this,"preventBlur",t=>t.preventDefault())}get open(){return this._open}get value(){return this._value}set value(t){let e=this.items.find(i=>i.dataset.value===t);e&&this.select(e,!1)}get isDisabled(){var t;return this.hasAttribute("disabled")||!!((t=this.nativeSelect)!=null&&t.disabled)}refresh(){var i;let t=this.nativeSelect;if(!t)return;let e=this.items.find(o=>o.dataset.value===t.value);e&&this.select(e,!1),(i=this.trigger)==null||i.setAttribute("aria-disabled",String(this.isDisabled))}enabled(){return this.items.filter(t=>!ht(t))}setup(){var a,c;if(this.nativeSelect=st(this,"select"),this.nativeSelect&&!st(this,"[data-part=\'trigger\']")&&this.buildFromNative(this.nativeSelect),this.trigger=st(this,"[data-part=\'trigger\']"),this.content=st(this,"[data-part=\'content\']"),this.valueEl=st(this,"[data-part=\'value\']"),!this.trigger||!this.content)return;let{trigger:t,content:e}=this;this.items=xt(this,"[data-part=\'item\']");let i=ot("db-select");e.id||(e.id=`${i}-listbox`),e.setAttribute("role","listbox"),e.hidden=!0,t.setAttribute("role","combobox"),t.setAttribute("aria-haspopup","listbox"),t.setAttribute("aria-expanded","false"),t.setAttribute("aria-controls",e.id),t instanceof HTMLButtonElement&&!t.hasAttribute("type")&&(t.type="button"),this.isDisabled&&t.setAttribute("aria-disabled","true"),this.items.forEach((l,d)=>{l.id||(l.id=`${i}-item-${d}`),l.setAttribute("role","option"),l.setAttribute("aria-selected","false")}),xt(this,"[data-part=\'group\']").forEach(l=>{l.setAttribute("role","group");let d=l.querySelector("[data-part=\'label\']");d&&(d.id||(d.id=ot("db-select-label")),l.setAttribute("aria-labelledby",d.id))});let o=this.getAttribute("name");o&&!this.nativeSelect&&(this.hiddenInput=document.createElement("input"),this.hiddenInput.type="hidden",this.hiddenInput.name=o,this.hasAttribute("required")&&(this.hiddenInput.required=!0),this.appendChild(this.hiddenInput)),this.typeahead=new ln({getItemCount:()=>this.enabled().length,getItemText:l=>{var d,u;return((u=(d=this.enabled()[l])==null?void 0:d.textContent)==null?void 0:u.trim())??""},onMatch:l=>{let d=this.enabled()[l];d&&(this._open?this.highlight(this.items.indexOf(d)):this.select(d))}}),this.dismiss=new Pt(e,{onDismiss:l=>this.close(l!=="outside-press")});let s=((a=this.nativeSelect)==null?void 0:a.value)??this.getAttribute("default-value")??"",r=this.items.find(l=>l.dataset.value===s);r&&ht(r)?this.valueEl&&(this.valueEl.textContent=((c=r.textContent)==null?void 0:c.trim())??"",this.valueEl.setAttribute("data-placeholder","")):r&&this.select(r,!1),this.setState("closed")}buildFromNative(t){let e=document.createElement("button");e.type="button",e.setAttribute("data-part","trigger"),e.className="db-select-trigger";let i=t.getAttribute("aria-label"),o=t.getAttribute("aria-labelledby"),s=!o&&t.id?document.querySelector(`label[for="${CSS.escape(t.id)}"]`):null;s&&(o=s.id||(s.id=ot("db-select-for"))),i&&e.setAttribute("aria-label",i),o&&e.setAttribute("aria-labelledby",o);let r=t.closest("label");if(r){if(this.labelEl=r,!i&&!o){let u=Array.from(r.childNodes).filter(h=>!(h instanceof Element&&(h===t||h.contains(t)||h.localName==="db-select"))).map(h=>h.textContent??"").join(" ").replace(/\\s+/g," ").trim();u&&e.setAttribute("aria-label",u)}}else s&&(this.labelEl=s);let a=document.createElement("span");a.setAttribute("data-part","value"),a.className="db-select-value";let c=document.createElementNS("http://www.w3.org/2000/svg","svg");c.setAttribute("viewBox","0 0 24 24"),c.setAttribute("aria-hidden","true"),c.setAttribute("class","db-select-chevron"),c.innerHTML=\'<path d="m6 9 6 6 6-6" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>\',e.append(a,c);let l=document.createElement("div");l.setAttribute("data-part","content"),l.className="db-select-content";let d=(u,h)=>{let g=document.createElement("div");g.setAttribute("data-part","item"),g.className="db-select-item",g.dataset.value=u.value;for(let[f,b]of Object.entries(u.dataset))b!=null&&(g.dataset[f]=b);u.disabled&&g.setAttribute("aria-disabled","true"),g.textContent=u.textContent??u.value,h.appendChild(g)};for(let u of Array.from(t.children))if(u instanceof HTMLOptGroupElement){let h=document.createElement("div");h.setAttribute("data-part","group");let g=document.createElement("div");g.setAttribute("data-part","label"),g.className="db-select-label",g.textContent=u.label,h.appendChild(g);for(let f of Array.from(u.children))f instanceof HTMLOptionElement&&d(f,h);l.appendChild(h)}else u instanceof HTMLOptionElement&&d(u,l);t.hidden=!0,t.tabIndex=-1,t.setAttribute("aria-hidden","true"),this.append(e,l)}connect(){var t,e,i,o,s,r,a,c,l,d;(t=this.trigger)==null||t.addEventListener("click",this.onTriggerClick),(e=this.trigger)==null||e.addEventListener("keydown",this.onTriggerKey),(i=this.trigger)==null||i.addEventListener("keyup",this.onTriggerKeyUp),(o=this.nativeSelect)==null||o.addEventListener("change",this.onNativeChange),(r=(s=this.nativeSelect)==null?void 0:s.form)==null||r.addEventListener("reset",this.onFormReset),(a=this.labelEl)==null||a.addEventListener("click",this.onLabelClick),(c=this.content)==null||c.addEventListener("click",this.onListClick),(l=this.content)==null||l.addEventListener("pointermove",this.onListPointer),(d=this.content)==null||d.addEventListener("mousedown",this.preventBlur)}disconnect(){var t,e,i,o,s,r,a,c,l,d;(t=this.trigger)==null||t.removeEventListener("click",this.onTriggerClick),(e=this.trigger)==null||e.removeEventListener("keydown",this.onTriggerKey),(i=this.trigger)==null||i.removeEventListener("keyup",this.onTriggerKeyUp),(o=this.nativeSelect)==null||o.removeEventListener("change",this.onNativeChange),(r=(s=this.nativeSelect)==null?void 0:s.form)==null||r.removeEventListener("reset",this.onFormReset),(a=this.labelEl)==null||a.removeEventListener("click",this.onLabelClick),(c=this.content)==null||c.removeEventListener("click",this.onListClick),(l=this.content)==null||l.removeEventListener("pointermove",this.onListPointer),(d=this.content)==null||d.removeEventListener("mousedown",this.preventBlur),this._open&&this.close(!1)}setState(t){var e;this.setAttribute("data-state",t),(e=this.content)==null||e.setAttribute("data-state",t)}show(){var r,a;let{trigger:t,content:e}=this;if(!t||!e||this._open)return;this._open=!0;let i=Xt(e);this.setState("open"),t.setAttribute("aria-expanded","true"),this.cleanupFloating=qt(t,e,{placement:"bottom-start",offset:4,matchWidth:!this.hasAttribute("auto-width"),strategy:i==="top-layer"?"fixed":"absolute"});let s=this.items.find(c=>c.dataset.value===this._value&&!ht(c))??this.enabled()[0];s&&this.highlight(this.items.indexOf(s)),(r=this.dismiss)==null||r.activate(),(a=this.typeahead)==null||a.reset(),t.focus()}close(t=!0){var o,s,r;let{trigger:e,content:i}=this;!e||!i||!this._open||(this._open=!1,(o=this.dismiss)==null||o.deactivate(),(s=this.cleanupFloating)==null||s.call(this),this.cleanupFloating=null,Gt(i),this.setState("closed"),e.setAttribute("aria-expanded","false"),e.removeAttribute("aria-activedescendant"),this.items.forEach(a=>a.removeAttribute("data-highlighted")),this.highlighted=-1,(r=this.typeahead)==null||r.reset(),t&&e.focus())}highlight(t){var r;let e=this.items[t],i=this.content;if(!e||!i||!this.trigger)return;this.highlighted>=0&&((r=this.items[this.highlighted])==null||r.removeAttribute("data-highlighted")),this.highlighted=t,e.setAttribute("data-highlighted",""),this.trigger.setAttribute("aria-activedescendant",e.id);let o=e.offsetTop,s=o+e.offsetHeight;o<i.scrollTop?i.scrollTop=o:s>i.scrollTop+i.clientHeight&&(i.scrollTop=s-i.clientHeight)}select(t,e=!0){var s;if(ht(t))return;let i=t.dataset.value??"",o=i!==this._value;this._value=i;for(let r of this.items){let a=r===t;r.setAttribute("aria-selected",String(a)),a?r.setAttribute("data-state","checked"):r.removeAttribute("data-state")}if(this.valueEl&&(this.valueEl.textContent=((s=t.textContent)==null?void 0:s.trim())??"",this.valueEl.removeAttribute("data-placeholder")),this.hiddenInput&&(this.hiddenInput.value=i),!e||!o){this.nativeSelect&&(this.nativeSelect.value=i);return}if(this.nativeSelect){this.nativeSelect.value=i,this.syncing=!0;try{this.nativeSelect.dispatchEvent(new Event("input",{bubbles:!0})),this.nativeSelect.dispatchEvent(new Event("change",{bubbles:!0}))}finally{this.syncing=!1}}this.dispatchEvent(new CustomEvent("db-select:change",{detail:{value:i},bubbles:!0}))}};et();customElements.get("db-select")||customElements.define("db-select",Ni);var Hi=class extends tt{constructor(){super(...arguments);m(this,"trigger",null);m(this,"content",null);m(this,"dismiss",null);m(this,"cleanupFloating",null);m(this,"_open",!1);m(this,"onTriggerClick",()=>this.toggle());m(this,"onContentClick",t=>{let e=t.target.closest("[data-part=\'close\']");e&&e.closest("db-popover")===this&&this.close("close-press")})}get open(){return this._open}setup(){var e;if(this.trigger=Yt(st(this,"[data-part=\'trigger\']")),this.content=st(this,"[data-part=\'content\']"),!this.trigger||!this.content)return;let t=this.content;t.id||(t.id=ot("db-popover")),t.hasAttribute("role")||t.setAttribute("role","dialog"),!t.hasAttribute("aria-labelledby")&&!t.hasAttribute("aria-label")&&((e=this.trigger).id||(e.id=ot("db-popover-trigger")),t.setAttribute("aria-labelledby",this.trigger.id)),t.hidden=!0,this.trigger.setAttribute("aria-haspopup","dialog"),this.trigger.setAttribute("aria-controls",t.id),this.trigger.setAttribute("aria-expanded","false"),this.setState("closed"),this.dismiss=new Pt(t,{onDismiss:i=>this.close(i)})}connect(){var t,e;(t=this.trigger)==null||t.addEventListener("click",this.onTriggerClick),(e=this.content)==null||e.addEventListener("click",this.onContentClick)}disconnect(){var t,e;(t=this.trigger)==null||t.removeEventListener("click",this.onTriggerClick),(e=this.content)==null||e.removeEventListener("click",this.onContentClick),this._open&&this.close("api")}setState(t){var e;this.setAttribute("data-state",t),(e=this.content)==null||e.setAttribute("data-state",t)}placement(){var o,s;let t=this.getAttribute("placement");if(t)return t;let e=((o=this.content)==null?void 0:o.dataset.side)||"bottom",i=((s=this.content)==null?void 0:s.dataset.align)||"center";return`${e}${i!=="center"?`-${i}`:""}`}toggle(){this._open?this.close("trigger-press"):this.show()}show(){var o;let{trigger:t,content:e}=this;if(!t||!e||this._open)return;this._open=!0;let i=Xt(e);this.setState("open"),t.setAttribute("aria-expanded","true"),this.cleanupFloating=qt(t,e,{placement:this.placement(),offset:Number(this.getAttribute("offset")??8),strategy:i==="top-layer"?"fixed":"absolute"}),(o=this.dismiss)==null||o.activate(),this.hasAttribute("no-autofocus")||requestAnimationFrame(()=>{this._open&&(zn(e)[0]??e).focus({preventScroll:!0})}),this.dispatchEvent(new CustomEvent("db-popover:open",{bubbles:!0}))}close(t="api"){var s,r;let{trigger:e,content:i}=this;if(!e||!i||!this._open)return;this._open=!1,(s=this.dismiss)==null||s.deactivate(),(r=this.cleanupFloating)==null||r.call(this),this.cleanupFloating=null;let o=i.contains(document.activeElement);Gt(i),this.setState("closed"),e.setAttribute("aria-expanded","false"),t!=="outside-press"&&(o||t==="escape-key"||t==="close-press")&&e.focus(),this.dispatchEvent(new CustomEvent("db-popover:close",{detail:{reason:t},bubbles:!0}))}};et();customElements.get("db-popover")||customElements.define("db-popover",Hi);var Pi="db-announcement-closed:";var Fi=class extends tt{constructor(){super(...arguments);m(this,"closeButton",null);m(this,"onClose",()=>this.close())}setup(){var t;this.closeButton=[...this.querySelectorAll("[data-part=\'close\']")].find(e=>e.closest("db-announcement")===this)??null,this.closeButton&&!this.closeButton.hasAttribute("aria-label")&&!((t=this.closeButton.textContent)!=null&&t.trim())&&this.closeButton.setAttribute("aria-label","Close announcement")}connect(){var t;(t=this.closeButton)==null||t.addEventListener("click",this.onClose)}disconnect(){var t;(t=this.closeButton)==null||t.removeEventListener("click",this.onClose)}close(){var i;let t=this.getAttribute("announcement-id")??"";try{t&&localStorage.setItem(Pi+t,"1")}catch{}let e=this.contains(document.activeElement);if(document.documentElement.setAttribute("data-announcement-closed",""),this.hidden=!0,this.style.display="none",e){let o=document.querySelector("main, [role=\'main\']");o?(o.hasAttribute("tabindex")||o.setAttribute("tabindex","-1"),o.focus({preventScroll:!0})):(i=document.activeElement)==null||i.blur()}this.dispatchEvent(new CustomEvent("db-announcement:close",{bubbles:!0,detail:{id:t}}))}};et();customElements.get("db-announcement")||customElements.define("db-announcement",Fi);var _i=class extends tt{constructor(){super(...arguments);m(this,"trigger",null);m(this,"content",null);m(this,"cleanupFloating",null);m(this,"showTimer",null);m(this,"hideTimer",null);m(this,"_open",!1);m(this,"onEnter",t=>{t.pointerType!=="touch"&&(this.clearTimers(),this._open||(this.showTimer=setTimeout(()=>this.show(),this.num("delay",200))))});m(this,"onLeave",t=>{t.pointerType!=="touch"&&(this.clearTimers(),this.hideTimer=setTimeout(()=>this.hide(),this.num("close-delay",100)))});m(this,"onContentEnter",()=>this.clearTimers());m(this,"onFocus",()=>{let t=!0;try{t=this.trigger.matches(":focus-visible")}catch{}t&&(this.clearTimers(),this.show())});m(this,"onBlur",()=>this.hide());m(this,"onPress",()=>this.hide());m(this,"onKey",t=>{t.key==="Escape"&&this._open&&(t.preventDefault(),t.stopImmediatePropagation(),this.hide())})}get open(){return this._open}num(t,e){let i=Number(this.getAttribute(t));return Number.isFinite(i)&&this.hasAttribute(t)?i:e}setup(){var e;if(this.trigger=Yt(st(this,"[data-part=\'trigger\']")),this.content=st(this,"[data-part=\'content\']"),!this.trigger||!this.content)return;(e=this.content).id||(e.id=ot("db-tooltip")),this.content.setAttribute("role","tooltip"),this.content.hidden=!0;let t=(this.trigger.getAttribute("aria-describedby")??"").split(/\\s+/).filter(Boolean);t.includes(this.content.id)||this.trigger.setAttribute("aria-describedby",[...t,this.content.id].join(" ")),this.setState("closed")}connect(){let{trigger:t,content:e}=this;!t||!e||(t.addEventListener("pointerenter",this.onEnter),t.addEventListener("pointerleave",this.onLeave),t.addEventListener("focus",this.onFocus),t.addEventListener("blur",this.onBlur),t.addEventListener("pointerdown",this.onPress),e.addEventListener("pointerenter",this.onContentEnter),e.addEventListener("pointerleave",this.onLeave))}disconnect(){let{trigger:t,content:e}=this;t==null||t.removeEventListener("pointerenter",this.onEnter),t==null||t.removeEventListener("pointerleave",this.onLeave),t==null||t.removeEventListener("focus",this.onFocus),t==null||t.removeEventListener("blur",this.onBlur),t==null||t.removeEventListener("pointerdown",this.onPress),e==null||e.removeEventListener("pointerenter",this.onContentEnter),e==null||e.removeEventListener("pointerleave",this.onLeave),this.hide()}clearTimers(){this.showTimer&&clearTimeout(this.showTimer),this.hideTimer&&clearTimeout(this.hideTimer),this.showTimer=this.hideTimer=null}setState(t){var e;this.setAttribute("data-state",t),(e=this.content)==null||e.setAttribute("data-state",t)}show(){let{trigger:t,content:e}=this;if(!t||!e||this._open)return;this._open=!0,this.clearTimers();let i=Xt(e);this.setState("open"),this.cleanupFloating=qt(t,e,{placement:this.getAttribute("placement")||e.dataset.side||"top",offset:8,strategy:i==="top-layer"?"fixed":"absolute"}),document.addEventListener("keydown",this.onKey,!0),this.dispatchEvent(new CustomEvent("db-tooltip:open",{bubbles:!0}))}hide(){var t;this.clearTimers(),!(!this._open||!this.content)&&(this._open=!1,document.removeEventListener("keydown",this.onKey,!0),(t=this.cleanupFloating)==null||t.call(this),this.cleanupFloating=null,Gt(this.content),this.setState("closed"),this.dispatchEvent(new CustomEvent("db-tooltip:close",{bubbles:!0})))}};et();customElements.get("db-tooltip")||customElements.define("db-tooltip",_i);var zi="sidebar_state",Us="b",Ws=768,be=new WeakMap;function Ys(n){try{return localStorage.getItem(n)}catch{return null}}function Xs(n,t){try{localStorage.setItem(n,t)}catch{}}function hn(n){if(be.has(n))return;let t=n.querySelector("[data-component=\'sidebar\']");if(!t)return;let e=t.dataset.collapsible||"offcanvas",i=t.dataset.side||"left",o=t.dataset.defaultOpen!=="false",s=Ys(zi),r=s!==null?s==="true":o,a=t.querySelector("[data-sidebar-desktop]"),c=t.querySelector("[data-sidebar-mobile]"),l=t.querySelector("[data-sidebar-mobile-backdrop]"),d=window.matchMedia(`(max-width: ${Ws-1}px)`),u={provider:n,sidebar:t,desktopSidebar:a,mobileSidebar:c,mobileBackdrop:l,collapsible:e,side:i,open:r,openMobile:!1,isMobile:d.matches,mediaQuery:d};be.set(n,u),$i(u);let h=b=>{u.isMobile=b.matches,!b.matches&&u.openMobile&&Dt(n)};d.addEventListener("change",h);let g=b=>{b.key===Us&&(b.metaKey||b.ctrlKey)?(b.preventDefault(),dn(n)):b.key==="Escape"&&u.openMobile&&(b.preventDefault(),Dt(n))};document.addEventListener("keydown",g),Gs(n,u),l&&l.addEventListener("click",()=>{Dt(n)});let f=t.querySelector("[data-part=\'rail\']");f&&f.addEventListener("click",()=>{dn(n)})}function Gs(n,t){n.querySelectorAll("[data-part=\'sidebar-trigger\']").forEach(e=>{e.addEventListener("click",()=>{dn(n)})})}function dn(n){let t=be.get(n);t&&(t.isMobile?t.openMobile?Dt(n):Zs(n):(t.open=!t.open,$i(t),Xs(zi,String(t.open))))}function $i(n){let t=n.open?"expanded":"collapsed";n.provider.setAttribute("data-state",t),n.sidebar.setAttribute("data-state",t),n.desktopSidebar&&(n.desktopSidebar.setAttribute("data-state",t),n.open?n.desktopSidebar.setAttribute("data-collapsible",""):n.desktopSidebar.setAttribute("data-collapsible",n.collapsible))}function Zs(n){var i;let t=be.get(n);if(!t||t.openMobile||!t.mobileSidebar)return;t.openMobile=!0;let e=(i=t.desktopSidebar)==null?void 0:i.querySelector("[data-sidebar=\'sidebar-inner\']");if(e)for(;e.firstChild;)t.mobileSidebar.appendChild(e.firstChild);t.mobileSidebar.hidden=!1,t.mobileSidebar.setAttribute("data-state","open"),t.mobileBackdrop&&(t.mobileBackdrop.hidden=!1),Ht.activate(),requestAnimationFrame(()=>{var s;let o=(s=t.mobileSidebar)==null?void 0:s.querySelector(\'a, button, [tabindex]:not([tabindex="-1"])\');o==null||o.focus()})}function Dt(n){var o;let t=be.get(n);if(!t||!t.openMobile||!t.mobileSidebar)return;t.openMobile=!1;let e=(o=t.desktopSidebar)==null?void 0:o.querySelector("[data-sidebar=\'sidebar-inner\']");if(e&&t.mobileSidebar)for(;t.mobileSidebar.firstChild;)e.appendChild(t.mobileSidebar.firstChild);t.mobileSidebar.setAttribute("data-state","closed"),t.mobileSidebar.hidden=!0,t.mobileBackdrop&&(t.mobileBackdrop.hidden=!0),Ht.deactivate();let i=t.provider.querySelector("[data-part=\'sidebar-trigger\']");i==null||i.focus()}function un(){document.querySelectorAll("[data-component=\'sidebar-provider\']").forEach(n=>{hn(n)})}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",un):un();document.addEventListener("astro:page-load",un);var qi=/^[a-z][a-z0-9_-]{0,63}$/,Ie={docs:"docs.js",shard:n=>`t-${n}.js`,fragment:n=>`f-${n}.js`},Ne={docs:"docs",shard:n=>n,fragment:n=>`frag:${n}`};var Qs={ational:"ate",tional:"tion",enci:"ence",anci:"ance",izer:"ize",bli:"ble",alli:"al",entli:"ent",eli:"e",ousli:"ous",ization:"ize",ation:"ate",ator:"ate",alism:"al",iveness:"ive",fulness:"ful",ousness:"ous",aliti:"al",iviti:"ive",biliti:"ble",logi:"log"},Js={icate:"ic",ative:"",alize:"al",iciti:"ic",ical:"ic",ful:"",ness:""},tr="[^aeiou]",pn="[aeiouy]",Mt="("+tr+"[^aeiouy]*)",Pe="("+pn+"[aeiou]*)",fn=new RegExp("^"+Mt+"?"+Pe+Mt),er=new RegExp("^"+Mt+"?"+Pe+Mt+Pe+"?$"),He=new RegExp("^"+Mt+"?("+Pe+Mt+"){2,}"),Bi=new RegExp("^"+Mt+"?"+pn),ji=new RegExp("^"+Mt+pn+"[^aeiouwxy]$"),nr=/ll$/,ir=/^(.+?)e$/,or=/^(.+?)y$/,sr=/^(.+?(s|t))(ion)$/,rr=/^(.+?)(ed|ing)$/,ar=/(at|bl|iz)$/,cr=/^(.+?)eed$/,lr=/^.+?[^s]s$/,dr=/^.+?(ss|i)es$/,ur=/([^aeiouylsz])\\1$/,hr=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,fr=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,pr=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/;function Ki(n){let t=String(n).toLowerCase();if(t.length<3)return t;let e=!1;t.codePointAt(0)===121&&(e=!0,t="Y"+t.slice(1)),dr.test(t)?t=t.slice(0,-2):lr.test(t)&&(t=t.slice(0,-1));let i;return(i=cr.exec(t))?fn.test(i[1])&&(t=t.slice(0,-1)):(i=rr.exec(t))&&Bi.test(i[1])&&(t=i[1],ar.test(t)?t+="e":ur.test(t)?t=t.slice(0,-1):ji.test(t)&&(t+="e")),(i=or.exec(t))&&Bi.test(i[1])&&(t=i[1]+"i"),(i=hr.exec(t))&&fn.test(i[1])&&(t=i[1]+Qs[i[2]]),(i=fr.exec(t))&&fn.test(i[1])&&(t=i[1]+Js[i[2]]),(i=pr.exec(t))?He.test(i[1])&&(t=i[1]):(i=sr.exec(t))&&He.test(i[1])&&(t=i[1]),(i=ir.exec(t))&&(He.test(i[1])||er.test(i[1])&&!ji.test(i[1]))&&(t=i[1]),nr.test(t)&&He.test(t)&&(t=t.slice(0,-1)),e&&(t="y"+t.slice(1)),t}var Vi=new Set("a an and are as at be by for from has have in is it its of on or that the this to was were will with you your can not".split(" ")),mr=/[\\p{Script=Han}\\p{Script=Hiragana}\\p{Script=Katakana}\\p{Script=Hangul}]/u,ve;function gr(n){if(ve===void 0)try{ve=typeof Intl<"u"&&"Segmenter"in Intl?new Intl.Segmenter(void 0,{granularity:"word"}):null}catch{ve=null}if(ve)return[...ve.segment(n)].filter(i=>i.isWordLike).map(i=>i.segment);let t=[...n];if(t.length<2)return t;let e=[];for(let i=0;i<t.length-1;i++)e.push(t[i]+t[i+1]);return e}function Bt(n){let t=[];for(let e of n.toLowerCase().normalize("NFKD").replace(/[\u0300-\u036F]/g,"").normalize("NFC").matchAll(/[\\p{L}\\p{N}][\\p{L}\\p{N}_.-]*[\\p{L}\\p{N}]|[\\p{L}\\p{N}]/gu)){let i=e[0],o=i.split(/[._-]+/).filter(Boolean);if(o.length>1&&t.push(i),o.length>1&&!/[._]/.test(i)){let s=o.join("");s.length>=3&&!Vi.has(s)&&t.push(s)}for(let s of o)mr.test(s)?t.push(...gr(s)):s.length>=2&&!Vi.has(s)&&t.push(s)}return t}function mn(n,t){let e="";for(let i of n.slice(0,t))e+=/[a-z0-9]/.test(i)?i:`_${i.codePointAt(0).toString(16)}_`;return e}function ye(n){if(!(!n||!/^en(-|$)/i.test(n)))return t=>/^[a-z]{3,}$/.test(t)?Ki(t):t}function jt(n,t={}){var y,p;let e=[],i=[],o=[],s=!1,r={tag:[],section:[]},a={tag:[],section:[]},c=Object.create(null),l=Object.create(null),d=["tag","section",...new Set((t.facets??[]).filter(v=>qi.test(v)&&v!=="tag"&&v!=="section"))],u=new RegExp(`(?<!\\\\S)(-?)(${d.join("|")}):(?:"([^"]*)"?|(?!\\\\/\\\\/)(\\\\S*))|(-?)"([^"]*)"?|(\\\\S+)`,"gi"),h=[...n.matchAll(u)].map(v=>{var x;return{facetNeg:v[1]==="-",facet:(x=v[2])==null?void 0:x.toLowerCase(),value:v[3]??v[4],neg:v[5],phrase:v[6],word:v[7]}}),g=!1,f=!1;for(let[v,x]of h.entries()){if(x.facet){let R=yn(x.value??"");if(!R)continue;x.facet==="tag"||x.facet==="section"?(x.facetNeg?a:r)[x.facet].push(R):((y=x.facetNeg?l:c)[p=x.facet]??(y[p]=[])).push(R);continue}let E=x.word;if(E==="OR"){f=e.length>0,s=!0;continue}if(E==="NOT"){g=!0,s=!0;continue}if(E==="AND"){s=!0;continue}let M=x.phrase!==void 0,A=g||x.neg==="-"||(E==null?void 0:E.startsWith("-"))&&E.length>1;g=!1;let S=M?x.phrase:A&&(E!=null&&E.startsWith("-"))?E.slice(1):E,w=[...new Set(Bt(S))];if(!w.length){f=!1;continue}if(A){i.push(M?w:[w[0]]),s=!0,f=!1;continue}if(M){f=!1,s=!0,w.length>1&&o.push(Bt(S).join(" "));for(let R of w)e.push({terms:[R],prefix:!1,exact:!0});continue}let Y=v===h.length-1&&!/\\s$/.test(n);if(f){e[e.length-1].terms.push(w[0]);for(let R of w.slice(1))e.push({terms:[R],prefix:!1});f=!1;continue}let $=w[0],X=/[._-]/.test($),C=$.replace(/-/g,"");for(let[R,q]of w.entries())e.push({terms:[q],prefix:Y&&q.length>=2&&(R===w.length-1||X&&(q===$||q===C))})}let b=[...new Set(e.flatMap(v=>v.terms))];return{groups:e,not:i,phrases:o,strict:s,highlight:b,filters:r,notFilters:a,...Object.keys(c).length?{facets:c}:{},...Object.keys(l).length?{notFacets:l}:{}}}async function br(n,t){let e=await t.meta(),i=typeof n=="string"?jt(n,{facets:wn([e])}):n,o=await Gi(i,e,t),s=Ji(i,e);if(!i.groups.length)return Zi(e,o,s);let r=[];for(let c of i.groups)r.push(await wr(c,e,t));let a=bn(r,e,o,s,"and").sort(Fe);return a.length||i.strict?a:bn(r,e,o,s,"or").sort(Fe)}var Fe=(n,t)=>t.score-n.score;async function Gi(n,t,e){let i=new Set;for(let o of n.not){let s;for(let r of o){let[a]=Qi(r,t),c=a?await e.shard(a):void 0,l=c&&Object.hasOwn(c,r)?c[r]:[],d=new Set;for(let u=0;u<l.length;u+=2)(!s||s.has(l[u]))&&d.add(l[u]);s=d}for(let r of s??[])i.add(r)}return i}function Zi(n,t,e){if(!e)return[];let i=[];return n.docs.forEach(([o,s,r],a)=>e(a)&&!t.has(a)&&i.push({id:a,title:o,url:s,section:n.sections[r]??"",score:1})),i}function bn(n,t,e,i,o){let s=new Map,r=new Map;for(let c of n)for(let[l,d]of c)s.set(l,(s.get(l)??0)+d),r.set(l,(r.get(l)??0)+1);let a=[];for(let[c,l]of s){if(e.has(c)||i&&!i(c)||o==="and"&&r.get(c)!==n.length)continue;let[d,u,h]=t.docs[c];a.push({id:c,title:d,url:u,section:t.sections[h]??"",score:l*(r.get(c)/n.length)})}return a}var At={prefix:.6,stem:.4,titleAll:1.5,titleExact:2,headingAll:1.4,headingExact:1.8,phrase:1.5,typo:.3};function vr(n,t){if(n===t)return!1;if(n.length===t.length){let s=[];for(let r=0;r<n.length&&s.length<=2;r++)n[r]!==t[r]&&s.push(r);return s.length===1?!0:s.length===2&&s[1]===s[0]+1&&n[s[0]]===t[s[1]]&&n[s[1]]===t[s[0]]}let[e,i]=n.length<t.length?[n,t]:[t,n];if(i.length-e.length!==1)return!1;let o=0;for(;o<e.length&&e[o]===i[o];)o++;return e.slice(o)===i.slice(o+1)}function Qi(n,t,e=!1){let i=yr(t);for(let s=Math.min(n.length,Ui);s>=1;s--){let r=mn(n,s);if(i.has(r))return!e||s<n.length?[r]:[r,...t.shards.filter(a=>a.length>r.length&&a.startsWith(r)).slice(0,10)]}let o=mn(n,Math.min(n.length,Ui));return e?t.shards.filter(s=>s.startsWith(o)).slice(0,10):[]}var Ui=3,Wi=new WeakMap;function yr(n){let t=Wi.get(n);return t||Wi.set(n,t=new Set(n.shards)),t}function yn(n){return n.replace(/"/g,"").trim().toLowerCase()}function Ji(n,t){let{tag:e,section:i}=n.filters,o=n.notFilters??{tag:[],section:[]},s=Object.entries(n.facets??{}).filter(([,p])=>p.length),r=Object.entries(n.notFacets??{}).filter(([,p])=>p.length);if(!e.length&&!i.length&&!o.tag.length&&!o.section.length&&!s.length&&!r.length)return;let a=(p,v)=>new Set(p.flatMap((x,E)=>v.includes(yn(x))?[E]:[])),c=a(t.sections,i),l=a(t.tags??[],e),d=a(t.sections,o.section),u=a(t.tags??[],o.tag),h=p=>(t.facets??[]).findIndex(v=>v.name===p),g=p=>p.map(([v,x])=>{let E=h(v);return[E,E<0?new Set:a(t.facets[E].values,x)]}),f=g(s),b=g(r).filter(([p])=>p>=0),y=(p,[v,x])=>{var E;return v>=0&&(((E=p[4])==null?void 0:E[v])??[]).some(M=>x.has(M))};return p=>{let v=t.docs[p],x=v[3]??[];if(i.length&&!c.has(v[2])||e.length&&!x.some(E=>l.has(E))||d.has(v[2])||x.some(E=>u.has(E)))return!1;for(let E of f)if(!y(v,E))return!1;for(let E of b)if(y(v,E))return!1;return!0}}function wn(n){return[...new Set(n.flatMap(t=>((t==null?void 0:t.facets)??[]).map(e=>e.name)))]}function to(n,t){let e=Object.create(null),i=new Map,o=(s,r)=>{let a=`${s}\\0${yn(r)}`,c=i.get(a);c===void 0&&i.set(a,c=r);let l=e[s]??(e[s]=Object.create(null));l[c]=(l[c]??0)+1};for(let s of n){let r=typeof t=="function"?t(s):t,a=r==null?void 0:r.docs[s.id];if(a){r.sections[a[2]]&&o("section",r.sections[a[2]]);for(let c of new Set(a[3]??[]))r.tags[c]!==void 0&&o("tag",r.tags[c]);(a[4]??[]).forEach((c,l)=>{var u;let d=(u=r.facets)==null?void 0:u[l];if(d)for(let h of new Set(c))d.values[h]!==void 0&&o(d.name,d.values[h])})}}return e}async function wr(n,t,e){let i=await no(n,t,e,!0);return n.corrected=i.corrected.length?i.corrected:void 0,eo(i,vn(t.count,i.docs.size))}function vn(n,t){return Math.log(1+(n-t+.5)/(t+.5))}function eo(n,t){let e=new Map;for(let[i,o]of n.lists)for(let s=0;s<i.length;s+=2)e.set(i[s],Math.max(e.get(i[s])??0,i[s+1]*o*t));return e}async function no(n,t,e,i){let o=ye(t.lang),s=new Map,r=new Map;for(let d of n.terms)for(let u of Qi(d,t,n.prefix)){let h=await e.shard(u);if(!h)continue;let g=(p,v)=>{v>(s.get(p)??0)&&(s.set(p,v),r.set(p,h))};Object.hasOwn(h,d)&&g(d,1);let f=o==null?void 0:o(d),b=f?f.slice(0,Math.max(3,f.length-1)):void 0,y=0;for(let p in h)p!==d&&(n.prefix&&p.startsWith(d)&&y++<200&&g(p,At.prefix),f&&b&&p.startsWith(b)&&o(p)===f&&g(p,At.stem));if(i&&!s.size&&!n.exact&&d.length>=4&&!/[._-]/.test(d))for(let p in h)Math.abs(p.length-d.length)<=1&&vr(d,p)&&g(p,At.typo)}let a=[...s].filter(([,d])=>d===At.typo).map(([d])=>d),c=[...s].map(([d,u])=>[r.get(d)[d],u]),l=new Set;for(let[d]of c)for(let u=0;u<d.length;u+=2)l.add(d[u]);return{lists:c,docs:l,corrected:a}}var io=n=>typeof n=="function"?n:()=>n;async function oo(n,t){let e=io(t),i=new Map;for(let o of n){let s=e(o),r=i.get(s);r||i.set(s,r=[]),r.push(o)}await Promise.all([...i].map(async([o,s])=>{var l;let r=await o.meta(),a=[...new Set(s.map(d=>Math.floor(d.id/r.block)))],c=new Map;await Promise.all(a.map(async d=>{try{c.set(d,await o.fragment(d))}catch{c.set(d,void 0)}}));for(let d of s)d.fragment??(d.fragment=(l=c.get(Math.floor(d.id/r.block)))==null?void 0:l[d.id%r.block])}))}async function so(n){let t=io(n),e=new Map;return async i=>{let o=t(i),s=e.get(o);if(!s){let r=ye((await o.meta()).lang);s=(a,c)=>c.terms.some(l=>a===l||c.prefix&&a.startsWith(l)||r!==void 0&&r(a)===r(l))||(c.corrected??[]).includes(a),e.set(o,s)}return s}}async function ro(n,t,e,i=10){let o=t.slice(0,i);await oo(o,e);let s=n.groups,r=await so(e);for(let a of o){let c=await r(a),[l,d]=a.fragment??["",[]],u=Bt(a.title),h=1;s.length&&s.every(f=>u.some(b=>c(b,f)))&&(h=Yi(u,s,c)?At.titleExact:At.titleAll);let g=[];for(let[f,b]of d){let y=Bt(f);!s.length||!s.every(p=>y.some(v=>c(v,p)))||(g.push([f,b]),h=Math.max(h,Yi(y,s,c)?At.headingExact:At.headingAll))}if(a.sections=g.slice(0,3),n.phrases.length){let f=[a.title,l,...d.map(([b])=>b)].map(b=>Bt(b).join(" ")).join(" \\0 ");n.phrases.every(b=>f.includes(b))&&(h*=At.phrase)}a.score*=h}return o.sort((a,c)=>c.score-a.score),[...o,...t.slice(i)]}async function ao(n,t,e){await oo(t,e);let i=await so(e);for(let o of t){if(!o.fragment||o.sections)continue;let s=await i(o);o.sections=o.fragment[1].filter(([r])=>{let a=Bt(r);return n.groups.length>0&&n.groups.every(c=>a.some(l=>s(l,c)))}).slice(0,3)}}function Yi(n,t,e){return n.every(i=>t.some(o=>e(i,o)))&&t.every(i=>n.some(o=>e(o,i)))}async function co(n,t,e=10){let i=await t.meta(),o=jt(n,{facets:wn([i])}),s=ye(i.lang);s&&(o.highlight=[...new Set([...o.highlight,...o.highlight.map(s).filter(a=>a.length>=3)])]);let r=await br(o,t);return o.highlight=[...new Set([...o.highlight,...o.groups.flatMap(a=>a.corrected??[])])],{parsed:o,results:await ro(o,r,t,e),facets:to(r,i)}}async function xr(n){return Promise.all(n.map(t=>t.data.meta().then(e=>e&&e.format===5?e:void 0,()=>{})))}async function Er(n,t,e,i){let o=e,s=new Set,r=[],a=async(A,S)=>{if(!s.has(A))try{return await S()}catch(w){s.add(A),r.push({source:A,error:w});return}},c=t.flatMap((A,S)=>e[S]?[S]:[]),l=[];await Promise.all(c.map(async A=>l[A]=await a(A,()=>Gi(n,o[A],t[A].data))??new Set));let d=[],u=[],h=(A,S)=>Promise.all(c.map(w=>a(w,()=>no(A,o[w],t[w].data,S)))),g=A=>A.every((S,w)=>!(S!=null&&S.docs.size)||s.has(c[w]));for(let A of n.groups){let S=await h(A,!1);u.push(g(S)),u[u.length-1]&&(S=await h(A,!0)),d.push(S)}for(let[A,S]of n.groups.entries())u[A]||!g(d[A])||(S.corrected=void 0,d[A]=await h(S,!0));if(c.length&&c.every(A=>s.has(A)))throw r[0].error;let f=c.filter(A=>!s.has(A)),b=[];for(let A of f)b[A]=Ji(n,o[A]);let y=(A,S)=>A.map(w=>({...w,source:S,score:w.score*Sr(t[S])})),p=A=>({results:Ar(A,t),failed:[...s].sort((S,w)=>S-w),errors:r});if(!n.groups.length)return p(f.flatMap(A=>y(Zi(o[A],l[A],b[A]),A)).sort(Fe));let v=t.map(()=>[]),x=f.reduce((A,S)=>A+o[S].count,0);n.groups.forEach((A,S)=>{let w=d[S],Y=c.flatMap((C,R)=>s.has(C)?[]:[[C,w[R]]]),$=[...new Set(Y.flatMap(([,C])=>C.corrected))];A.corrected=$.length?$:void 0;let X=Y.reduce((C,[,R])=>C+R.docs.size,0);for(let[C,R]of Y)v[C].push(eo(R,i.stats==="own"?vn(o[C].count,R.docs.size):vn(x,X)))});let E=A=>f.flatMap(S=>y(bn(v[S],o[S],l[S],b[S],A),S)).sort(Fe),M=E("and");return p(M.length||n.strict?M:E("or"))}function Sr(n){return typeof n.boost=="number"&&Number.isFinite(n.boost)&&n.boost>=0?n.boost:1}function Ar(n,t){let e=new Map,i=[];for(let o of n){let s=t[o.source].collapse;if(s===void 0){i.push(o);continue}let r=`${s}\\0${o.url}`,a=e.get(r);a?(a.others??(a.others=[])).push({source:o.source,id:o.id,url:o.url,score:o.score}):(e.set(r,o),i.push(o))}return i}async function lo(n,t,e=10,i={}){let o=await xr(t),s=jt(n,{facets:wn(o)}),r=t.flatMap((u,h)=>o[h]?[]:[h]);for(let u of new Set(o.flatMap(h=>h?[h.lang]:[]))){let h=ye(u);h&&(s.highlight=[...new Set([...s.highlight,...s.highlight.map(h).filter(g=>g.length>=3)])])}let{results:a,failed:c,errors:l}=await Er(s,t,o,i);for(let u of c)r.includes(u)||r.push(u);r.sort((u,h)=>u-h),s.highlight=[...new Set([...s.highlight,...s.groups.flatMap(u=>u.corrected??[])])];let d=to(a,u=>o[u.source]);return{parsed:s,results:await ro(s,a,u=>t[u.source].data,e),missing:r,facets:d,errors:l}}function xn(n,t,e=globalThis){var g,f;let i=((g=e.document)==null?void 0:g.baseURI)??((f=e.location)==null?void 0:f.href),o=Xi(n,i),s=e.__DOGSBAY_SEARCH__??{q:[],load(){}},r=s.stores??(s.stores=new Map),a=r.get(o)??new Map;r.set(o,a);let c=(b,y,p)=>{let v;if(p){let x="",E=Xi(p,i);for(let M of r.keys())E.startsWith(M)&&M.length>x.length&&(x=M);v=x?r.get(x):void 0}!v&&r.size===1&&(v=a),v?v.set(b,y):s.q.push([b,y,p])},l=s.q;s.q=[],s.load=c;for(let[b,y,p]of l)c(b,y,p);e.__DOGSBAY_SEARCH__=s;let d=async(b,y)=>(a.has(b)||await t(n+y),a.get(b)),u,h={meta:()=>u??(u=d(Ne.docs,Ie.docs).then(b=>{if(!b||b.format!==5)throw new Error(`search index format ${(b==null?void 0:b.format)??"missing"}, expected ${5}: rebuild the site`);return b}).catch(b=>{throw u=void 0,b})),shard:async b=>(await h.meta()).shards.includes(b)?d(Ne.shard(b),Ie.shard(b)):void 0,fragment:b=>d(Ne.fragment(b),Ie.fragment(b))};return h}function Xi(n,t){try{return new URL(n,t).href}catch{return n}}function uo(n){let t,e=new URL(n||"./",location.href).pathname;return async i=>{t??(t=import(new URL(`${n}pagefind/pagefind.js`,location.href).href).catch(u=>{throw t=void 0,u}));let o=i.replace(new RegExp(\'(?<!\\\\S)-?(tag|section):("[^"]*"?|\\\\S*)\',"gi")," ").trim(),s=o?await(await t).search(o):null,r=(s==null?void 0:s.results)??[],a=async(u,h)=>{let g=await u.data(),f=g.url.startsWith(e)?g.url.slice(e.length):g.url.replace(/^\\/+/,""),b=(g.sub_results??[]).map(y=>[y.title,y.url.split("#")[1]??""]).filter(([,y])=>y);return{id:h,title:g.meta.title??f,url:f,section:"",score:r.length-h,fragment:[Cr(g.excerpt),b],sections:b.slice(0,3)}},c=await Promise.all(r.slice(0,10).map(a)),l=Promise.all(r.slice(10,30).map((u,h)=>a(u,h+10)));return l.catch(()=>{}),{results:c,more:l,later:(u,h)=>Promise.all(r.slice(u,u+h).map((g,f)=>a(g,u+f))),total:r.length,highlight:jt(i).highlight}}}function Cr(n){return new DOMParser().parseFromString(n,"text/html").body.textContent??""}function ho(n,t){let e=(n==null?void 0:n.units)??[],i=e.find(p=>p.prefix===t);if(!i)return{};let o=p=>p.product??"",s=p=>{var v;return((v=n==null?void 0:n.products)==null?void 0:v[p])??{versions:n==null?void 0:n.versions,defaultVersion:n==null?void 0:n.defaultVersion}},r=p=>{var v;return(v=s(o(p)).versions)==null?void 0:v.find(x=>x.id===p.version)},a=p=>{var v,x;return((x=(v=n==null?void 0:n.products)==null?void 0:v[p])==null?void 0:x.label)??(p||(n==null?void 0:n.name)||"")},c=p=>{var v;return[o(p)!==o(i)?a(o(p)):"",p.version!==void 0?((v=r(p))==null?void 0:v.label)??p.version:""].filter(Boolean).join(" \\xB7 ")},l=p=>({prefix:p.prefix,product:o(p),label:c(p),own:p===i,versioned:p.version!==void 0}),d=e.filter(p=>p.locale===i.locale),u=s(o(i)),h=(u.versions??[]).map(p=>p.id),g=p=>{var v;return p===i?-2:p.version===u.defaultVersion?-1:(v=r(p))!=null&&v.prerelease?h.length+h.indexOf(p.version):h.indexOf(p.version)},f=d.filter(p=>{var v;return o(p)===o(i)&&p.version!==void 0&&(p===i||!((v=r(p))!=null&&v.hidden))}).sort((p,v)=>g(p)-g(v)),b=[];for(let p of d){let v=o(p);if(b.some(M=>o(M)===v))continue;if(v===o(i)){b.push(i);continue}let x=d.filter(M=>o(M)===v),E=s(v).defaultVersion;b.push(x.find(M=>M.version===E)??x.find(M=>{var A;return!((A=r(M))!=null&&A.hidden)})??x[0])}let y={};return f.length>1&&(y.versions=f.map(l)),b.length>1&&(y.products=b.map(l)),(y.versions||y.products)&&(y.version=[l(i)]),y}var fo=1.5;function po(n,t){var s,r;let e={},i=(s=n.docs[t])==null?void 0:s[3];i!=null&&i.length&&(e.tag=i.map(a=>n.tags[a]).filter(a=>typeof a=="string"));let o=(r=n.docs[t])==null?void 0:r[4];return!o||!n.facets||n.facets.forEach((a,c)=>{let l=o[c];l!=null&&l.length&&(e[a.name]=l.map(d=>a.values[d]).filter(d=>typeof d=="string"))}),e}var Ct=n=>n.trim().toLowerCase();function mo(n,t,e){for(let[i,o]of Object.entries(t)){if(i===e||!o.length)continue;let s=new Set((n[i]??[]).map(Ct));if(!o.some(r=>s.has(Ct(r))))return!1}return!0}function go(n,t,e){return n.filter(i=>mo(t(i),e))}function bo(n,t,e,i){var s;let o={};for(let r of i){let a={},c=new Map;for(let l of n){let d=t(l);if(!((s=d[r])!=null&&s.length)||!mo(d,e,r))continue;let u=new Set;for(let h of d[r]){if(u.has(Ct(h)))continue;u.add(Ct(h));let g=c.get(Ct(h))??(c.set(Ct(h),h),h);a[g]=(a[g]??0)+1}}for(let l of e[r]??[])c.has(Ct(l))||(a[l]=0);Object.keys(a).length&&(o[r]=a)}return o}function vo(n,t){let e={};for(let i of n.getAll("filter")){let o=i.indexOf(":");if(o<=0)continue;let s=i.slice(0,o),r=i.slice(o+1);!t.includes(s)||!r||(e[s]??(e[s]=[])).some(a=>Ct(a)===Ct(r))||e[s].push(r)}return e}function Lr(n,t,e){var s;if(n.length===0)return"";let i=n.join("/"),o=e==null?void 0:e[i];if(o&&o.length>0)return o;if(n.length===1){let r=(s=t==null?void 0:t[n[0]])==null?void 0:s.label;if(r&&r.length>0)return r}return n[n.length-1]}function yo(n){if(!n)return{};let t={};for(let[e,i]of Object.entries(n)){let o=kr(Object.entries(i).map(([s,r])=>({value:s,count:r})));o.length>0&&(t[e]=o)}return t}function kr(n){return[...n].sort((t,e)=>t.count!==e.count?e.count-t.count:t.value.localeCompare(e.value))}function ie(n,t,e){let i=e==null?void 0:e[n],o=t.split("/").filter(s=>s.length>0);return Lr(o,i==null?void 0:i.prefixes,i==null?void 0:i.labels)}function wo(n,t){let e=i=>{var s;let o=(s=t==null?void 0:t[i])==null?void 0:s.order;return typeof o=="number"?o:void 0};return[...n].sort((i,o)=>{let s=e(i),r=e(o);return s!==void 0&&r!==void 0?s!==r?s-r:i.localeCompare(o):s!==void 0?-1:r!==void 0?1:i.localeCompare(o)})}function xo(n,t,e){let i={...n},o=i[t]??[];if(o.includes(e)){let s=o.filter(r=>r!==e);s.length===0?delete i[t]:i[t]=s}else i[t]=[...o,e];return i}function Eo(n){let t=0;for(let e of Object.values(n))t+=e.length;return t}function So(n,t,e={}){if(t.length===0)return[];if(t.some(o=>o.value.includes("/"))){let o=e.nav?Or(e.nav,new Set(t.map(s=>s.value))):void 0;return Tr(n,t,e.display,o)}return Rr(n,t,e.nav,e.display)}function Tr(n,t,e,i){let o=new Map,s=[];for(let l of t){let d=l.value.split("/").filter(g=>g.length>0);if(d.length===0)continue;let u="",h=null;for(let g=0;g<d.length;g++){u=u?`${u}/${d[g]}`:d[g];let f=o.get(u);f||(f={value:u,label:ie(n,u,e),count:0,depth:g,hasValue:!1,children:[]},o.set(u,f),h?h.children.push(f):s.push(u)),g===d.length-1&&(f.count=l.count,f.hasValue=!0),h=f}}let r=(l,d)=>{if(i){let u=i.get(l.value),h=i.get(d.value);if(u!==void 0&&h!==void 0&&u!==h)return u-h;if(u!==void 0&&h===void 0)return-1;if(u===void 0&&h!==void 0)return 1}return l.count!==d.count?d.count-l.count:l.value.localeCompare(d.value)},a=l=>{if(l.children.length!==0){l.children.sort(r);for(let d of l.children)a(d)}},c=s.map(l=>o.get(l));c.sort(r);for(let l of c)a(l);return c}function Or(n,t){let e=new Map,i=0,o=s=>{for(let r of s){if(r.href){let a=Ao(r.href);for(let c=0;c<a.length;c++){let l=a[c];if(!t.has(l))continue;let d="";for(let u=c;u<a.length;u++)d=d?`${d}/${a[u]}`:a[u],t.has(d)&&!e.has(d)&&e.set(d,i++);break}}r.children&&r.children.length>0&&o(r.children)}};return o(n),e}function Rr(n,t,e,i){let o=new Map;for(let h of t)o.set(h.value,h);if(!e||e.length===0)return t.map(h=>({value:h.value,label:ie(n,h.value,i),count:h.count,depth:0,hasValue:!0,children:[]}));let s=new Set,r=[],a=new Map,c=h=>{if(h.length===0)return;let g=r,f=a;for(let b=0;b<h.length;b++){let y=h[b],p=f.get(y);if(!p){let x=o.get(y);p={value:y,label:ie(n,y,i),count:x?x.count:0,depth:b,hasValue:x!==void 0,children:[]},g.push(p),f.set(y,p),x&&s.add(y)}let v=l.get(p);v||(v=new Map,l.set(p,v)),g=p.children,f=v}},l=new Map,d=h=>{for(let g of h){if(g.href){let f=Ao(g.href);c(f)}g.children&&g.children.length>0&&d(g.children)}};d(e);let u=[];for(let h of t)s.has(h.value)||u.push({value:h.value,label:ie(n,h.value,i),count:h.count,depth:0,hasValue:!0,children:[]});return u.sort((h,g)=>h.value.localeCompare(g.value)),[...r,...u]}function Ao(n){let t=n;try{/^[a-z]+:\\/\\//i.test(n)&&(t=new URL(n).pathname)}catch{}t=t.split("#")[0].split("?")[0];let e=t.split("/").filter(i=>i.length>0);return e.length<2?[]:e.slice(0,-1)}var Dr=6e4,Mr=30,_e=20,Ir=["version","versions","products"];function Lo(n){let{signal:t}=n,e=document.getElementById("db-search");if(!e)return;let i=e.querySelector("[data-db-search-input]"),o=e.querySelector("[data-part=\'listbox\']"),s=e.querySelector("[data-db-search-status]"),r=To(n,{input:i,list:o,status:s,page:!1});e.addEventListener("db-dialog:open",()=>{i.focus(),i.select(),r.activate()},{signal:t}),document.addEventListener("keydown",a=>{let c=a.target.closest("input, textarea, select, [contenteditable]");if(a.key==="/"&&!c||a.key.toLowerCase()==="k"&&(a.metaKey||a.ctrlKey)){a.preventDefault();let l=document.querySelector("[data-db-search-page] [data-db-search-input]");l&&!e.open?l.focus():e.open?i.focus():e.show()}},{signal:t}),e.addEventListener("click",a=>{a.target.closest("a")&&e.close("api")},{signal:t})}function ko(n){var d;let t=document.querySelector("[data-db-search-page]");if(!t)return;let e=t.querySelector("[data-db-search-input]"),i=t.querySelector("[data-db-search-list]"),o=t.querySelector("[data-db-search-status]"),s=Nr(),r=s.get("p")||void 0,a=s.get("v")||void 0,c=s.get("scope")??(s.get("q")?"version":void 0),l=To(n,{input:e,list:i,status:o,page:!0,params:s,scope:c,forward:r!==void 0||a!==void 0?{product:r,version:a}:void 0});(d=t.querySelector("form"))==null||d.addEventListener("submit",u=>u.preventDefault(),{signal:n.signal}),e.value=s.get("q")??"",l.activate(),e.value.trim()&&l.run()}function Nr(){let n=new URLSearchParams(location.search);if(location.hash.includes("="))for(let[t,e]of new URLSearchParams(location.hash.slice(1)))n.has(t)||n.set(t,e);return n}var Co=()=>!location.search&&location.hash.includes("=");function To(n,{input:t,list:e,status:i,page:o,scope:s,forward:r,params:a}){var Mn;let{signal:c}=n,l=i.textContent??"",d=xn(`${n.unitRoot}_dogsbay/search/`,n.loadScript,window),u=document.body.dataset.search??"builtin",h=location.protocol!=="file:",g=u==="pagefind"||u==="both"&&h?uo(n.unitRoot):void 0,f=u==="pagefind"&&!h,b=n.siteRoot??"",y=n.prefix??"",p={},v="version",x,E=`db-search-scope:${new URL(b||"./",location.href).pathname}`,M=()=>{let L=window.__DOGSBAY_SITE__;if(r&&L&&A(L)||(r=void 0,g))return;p=ho(L,y);let O=s??En(()=>sessionStorage.getItem(E)),k=v;O&&Object.prototype.hasOwnProperty.call(p,O)&&(v=O),gt(),v!==k&&t.value.trim()&&it(++j)},A=L=>{var G,J;let O=L.units??[],k=O.find(W=>W.prefix===y);if(!k)return!1;let P=r.product??k.product??"",H=O.filter(W=>W.locale===k.locale&&(W.product??"")===P),D=((J=(G=L.products)==null?void 0:G[P])==null?void 0:J.defaultVersion)??L.defaultVersion,F=r.version!==void 0?H.find(W=>W.version===r.version||W.prefix&&W.prefix.split("/").pop()===r.version):H.find(W=>W===k)??H.find(W=>W.version===D)??H[0];if(!F||F.prefix===y||!F.search)return!1;let B=new URLSearchParams(a);B.delete("p"),B.delete("v");let N=B.toString();return location.replace(`${w(F.prefix)}${F.search}${N?Co()?`#${N}`:`?${N}`:""}`),!0},S=()=>x??(x=n.loadScript(`${b}_dogsbay/site.js`).then(M,M)),w=L=>`${b}${L?`${L}/`:""}`,Y=new Map([[y,d]]),$=L=>{let O=Y.get(L);return O||Y.set(L,O=xn(`${w(L)}_dogsbay/search/`,n.loadScript,window)),O},X=new Map,C=((Mn=o?e.closest("[data-db-search-page]"):e.closest("dialog"))==null?void 0:Mn.querySelector("[data-db-search-facets]"))??void 0,R=(()=>{try{return JSON.parse(e.dataset.facets??"{}")}catch{return{}}})(),q=C?Object.keys(R):[],V=o&&a?vo(a,q):{},z=()=>{r&&S(),f?i.textContent=e.dataset.needsServer??"":g||(d.meta().catch(()=>i.textContent="Search index could not be loaded."),S())},j=0,U,T;t.addEventListener("input",()=>{clearTimeout(T),T=setTimeout(()=>void it(++j),80)},{signal:c});let I=new Map,_=typeof IntersectionObserver=="function"?new IntersectionObserver(L=>{var O;for(let k of L)k.isIntersecting&&((O=I.get(k.target))==null||O(),I.delete(k.target),_.unobserve(k.target))}):void 0,Q=L=>{if(!o||r)return;let O=new URLSearchParams;L&&O.set("q",L),v!=="version"&&O.set("scope",v);for(let[H,D]of Object.entries(V))for(let F of D)O.append("filter",`${H}:${F}`);let k=O.toString(),P=Co();En(()=>history.replaceState(history.state,"",`${location.pathname}${k?P?`${location.search}#${k}`:`?${k}`:""}`))},it=async L=>{let O=t.value.trim();if(Q(O),!O){_==null||_.disconnect(),I.clear(),K.hidden=!0,C&&(C.hidden=!0),It=void 0,e.replaceChildren(),dt.hidden=lt.hidden=!0,i.textContent=l;return}if(!f){It=void 0;try{if(g){let k=await g(O);if(L!==j)return;if(o){let P=await k.more;if(L!==j)return;Ae(O,[...k.results,...P].slice(0,_e),k.highlight,k.total,k.later)}else{Ae(O,k.results,k.highlight,k.total);let P=await k.more;L===j&&P.length&&Bo(O,P,k.highlight)}}else if(v!=="version"&&p[v]){let k=Date.now(),P=p[v],H=P.filter(N=>N.own||k-(X.get(N.prefix)??-1/0)>Dr),D=await lo(O,H.map(N=>({data:$(N.prefix),boost:N.own?fo:1,collapse:N.product})));for(let N of D.missing)X.set(H[N].prefix,Date.now());if(L!==j)return;U=D.parsed;let F=D.results.map(N=>{var J;let G=H[N.source];return Object.assign(N,{base:w(G.prefix),from:G.own?void 0:G.label,also:(J=N.others)==null?void 0:J.map(W=>H[W.source].label).filter(Boolean),data:$(G.prefix)})}),B=D.missing.length+P.length-H.length;await Se(L,O,F,D.parsed.highlight,B?` \\xB7 ${(e.dataset.unavailable??"{n}").replace("{n}",String(B))}`:"")}else{let k=await co(O,d);if(L!==j)return;U=k.parsed,await Se(L,O,k.results,k.parsed.highlight,"")}}catch{if(L!==j)return;i.textContent="Search index could not be loaded.",C&&(C.hidden=!0)}}},K=document.createElement("div");K.setAttribute("role","group"),K.setAttribute("aria-label",e.dataset.filterSection??"Filter by section"),K.className=o?"flex flex-wrap gap-1 pb-3":"flex flex-wrap gap-1 px-3 pb-2",K.hidden=!0,e.before(K);let nt=document.createElement("div");nt.setAttribute("role","group"),nt.setAttribute("aria-label",e.dataset.scope??"Search in"),nt.className=o?"flex flex-wrap items-center gap-1 pb-3":"flex flex-wrap items-center gap-1 px-3 pb-2",nt.hidden=!0,K.before(nt);let lt=document.createElement("a");lt.className="mx-3 mb-2 mt-1 block rounded-md px-3 py-2 text-center text-sm font-medium hover:bg-accent",lt.dataset.dbSearchSeeAll="",lt.hidden=!0;let dt=document.createElement("button");dt.type="button",dt.className="mt-4 rounded-md border px-3 py-1.5 text-sm hover:bg-accent",dt.textContent=e.dataset.more??"More results",dt.hidden=!0,e.after(o?dt:lt);let gt=()=>{var k,P;let L=Ir.filter(H=>p[H]),O={version:((P=(k=p.version)==null?void 0:k[0])==null?void 0:P.versioned)===!1?e.dataset.scopeProduct:e.dataset.scopeVersion,versions:e.dataset.scopeVersions,products:e.dataset.scopeProducts};nt.replaceChildren(...L.map(H=>{let D=document.createElement("button");return D.type="button",D.dataset.scope=H,D.setAttribute("aria-pressed",String(H===v)),D.className="rounded-md border px-2.5 py-0.5 text-xs hover:bg-accent aria-pressed:bg-primary aria-pressed:text-primary-foreground",D.textContent=O[H]??H,D.addEventListener("click",()=>{var F;v!==H&&(v=H,En(()=>sessionStorage.setItem(E,H)),gt(),(F=nt.querySelector(`[data-scope="${H}"]`))==null||F.focus(),t.value.trim()?it(++j):Q(""))},{signal:c}),D})),nt.hidden=L.length<2};c==null||c.addEventListener("abort",()=>{clearTimeout(T),j++,_==null||_.disconnect(),I.clear(),K.remove(),nt.remove(),lt.remove(),dt.remove()});let Ut=L=>L.replace(/"/g,""),We=L=>`section:"${Ut(L)}"`,Lt,ce=(L,O)=>{let k=new Map;for(let F of O)F.section&&k.set(F.section,(k.get(F.section)??0)+1);let P=[...L.matchAll(/section:"([^"]*)"/gi)].map(F=>F[1].toLowerCase()),H=F=>P.includes(Ut(F).toLowerCase()),D=[...k].sort((F,B)=>B[1]-F[1]).slice(0,6).map(([F])=>F);for(let F of P)D.some(B=>Ut(B).toLowerCase()===F)||D.push(F);K.replaceChildren(...D.length>1||P.length?D.map(F=>{let B=document.createElement("button");B.type="button";let N=H(F);return B.setAttribute("aria-pressed",String(N)),B.className="rounded-full border px-2.5 py-0.5 text-xs hover:bg-accent aria-pressed:bg-primary aria-pressed:text-primary-foreground",B.textContent=F,B.addEventListener("click",()=>{let G=We(F),J=t.value.replace(new RegExp(`\\\\s*section:"${Ut(F).replace(/[.*+?^${}()|[\\]\\\\]/g,"\\\\$&")}"`,"i"),"").trim();t.value=N?J:`${J} ${G}`.trim(),Lt=F,t.dispatchEvent(new Event("input",{bubbles:!0}))},{signal:c}),B}):[]),K.hidden=!K.childElementCount,Lt!==void 0&&(([...K.querySelectorAll("button")].find(B=>B.textContent===Lt)??t).focus(),Lt=void 0)},It,Se=async(L,O,k,P,H)=>{if(!q.length){Ae(O,k,P,k.length),i.textContent+=H;return}let D=new Map;for(let B of k){let N=B.data??d;D.has(N)||D.set(N,await N.meta())}if(L!==j)return;let F=new Map(k.map(B=>[B,po(D.get(B.data??d),B.id)]));It={q:O,results:k,terms:P,note:H,valuesOf:B=>F.get(B)??{}},Nt()},Nt=()=>{if(!It)return;let{q:L,results:O,terms:k,note:P,valuesOf:H}=It,D=go(O,H,V);Ye(bo(O,H,V,q)),Ae(L,D,k,D.length),i.textContent+=P},kt,Ye=L=>{var F,B;if(!C)return;let O=wo(Object.keys(L),R);if(C.hidden=!O.length,!O.length)return C.replaceChildren();let k=(N,G,J,W)=>{let Z=document.createElement("label");Z.className="flex cursor-pointer items-center gap-2 rounded-md px-2 py-1 hover:bg-accent";let rt=document.createElement("input");rt.type="checkbox",rt.dataset.facetName=N,rt.dataset.facetValue=G,rt.checked=(V[N]??[]).some(jo=>jo.toLowerCase()===G.toLowerCase()),rt.className="size-3.5 rounded border-border accent-primary";let wt=document.createElement("span");wt.className="flex-1 truncate",wt.textContent=J;let Ge=document.createElement("span");return Ge.className="text-xs text-muted-foreground",Ge.textContent=String(W),Z.append(rt,wt,Ge),Z},P=(N,G)=>{let J=document.createElement("ul");J.className="space-y-0.5";for(let W of G){let Z=document.createElement("li");if(W.hasValue)Z.append(k(N,W.value,W.label,W.count));else{let rt=document.createElement("span");rt.className="block px-2 py-1 text-muted-foreground",rt.textContent=W.label,Z.append(rt)}if(W.children.length){let rt=P(N,W.children);rt.classList.add("ml-4"),Z.append(rt)}J.append(Z)}return J},H=[],D=Eo(V);if(D){let N=document.createElement("button");N.type="button",N.dataset.clearFilters="",N.className="mb-3 w-full rounded-md border border-border px-2 py-1 text-xs text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",N.textContent=(e.dataset.facetsClear??"Clear all ({n})").replace("{n}",String(D)),H.push(N)}for(let N of O){let G=yo({[N]:L[N]})[N]??[],J=document.createElement("fieldset");J.className="mb-3";let W=document.createElement("legend");if(W.className="mb-1 text-xs font-semibold uppercase tracking-wide text-muted-foreground",W.textContent=((F=R[N])==null?void 0:F.title)??N,J.append(W),(B=R[N])!=null&&B.hierarchical||G.some(Z=>Z.value.includes("/")))J.append(P(N,So(N,G,{display:R})));else{let Z=document.createElement("ul");Z.className="space-y-0.5";for(let rt of G){let wt=document.createElement("li");wt.append(k(N,rt.value,ie(N,rt.value,R),rt.count)),Z.append(wt)}J.append(Z)}H.push(J)}C.replaceChildren(...H),kt!==void 0&&(((kt?[...C.querySelectorAll("input[data-facet-name]")].find(G=>`${G.dataset.facetName}\\0${G.dataset.facetValue}`===kt):C.querySelector("[data-clear-filters]"))??t).focus(),kt=void 0)};C==null||C.addEventListener("change",L=>{let O=L.target;if(!O.dataset.facetName)return;let k=O.dataset.facetName,P=O.dataset.facetValue,H=(V[k]??[]).find(D=>D.toLowerCase()===P.toLowerCase());V=xo(V,k,H??P),kt=`${k}\\0${P}`,Q(t.value.trim()),Nt()},{signal:c}),C==null||C.addEventListener("click",L=>{L.target.closest("[data-clear-filters]")&&(V={},kt="",Q(t.value.trim()),Nt())},{signal:c});let ut,Ae=(L,O,k,P,H)=>{_==null||_.disconnect(),I.clear(),ce(L,O);let D=O.slice(0,o?_e:Mr);if(ut={q:L,results:O,terms:k,shown:D.length,total:P,later:H},e.replaceChildren(...Xe(L,D,k)),i.textContent=P?`${P} result${P===1?"":"s"}`:`${e.dataset.noResults} \\u201C${L}\\u201D`,dt.hidden=!o||!Rn(),lt.hidden=o||!P||!e.dataset.searchPage,!lt.hidden){let F=new URLSearchParams({q:L});v!=="version"&&F.set("scope",v);for(let[B,N]of Object.entries(V))for(let G of N)F.append("filter",`${B}:${G}`);lt.href=`${e.dataset.searchPage}?${F}`,lt.textContent=(e.dataset.seeAll??"See all {n} results").replace("{n}",String(P))}},Bo=(L,O,k)=>e.append(...Xe(L,O,k)),Rn=()=>!!ut&&(ut.results.length>ut.shown||!!ut.later&&ut.shown<ut.total);dt.addEventListener("click",async()=>{var P,H;let L=ut;if(!L)return;let O=L.results.slice(L.shown,L.shown+_e);if(!O.length&&L.later){if(O=await L.later(L.shown,_e).catch(()=>[]),L!==ut)return;L.results.push(...O)}let k=Xe(L.q,O,L.terms);e.append(...k),L.shown+=O.length,dt.hidden=!O.length||!Rn(),(H=(P=k[0])==null?void 0:P.querySelector("a"))==null||H.focus()},{signal:c});let Xe=(L,O,k)=>{var H;let P=[];for(let D of O){let F=D.base??n.unitRoot,B=Dn(F,D.url,k,"block rounded-md p-3 hover:bg-accent"),N=document.createElement("div");N.className="font-medium",N.append(...Sn(D.title,k)),B.a.appendChild(N);let G=[D.from,D.section].filter(Boolean).join(" \\xB7 ");if(G){let Z=document.createElement("div");Z.className="text-xs text-muted-foreground",Z.textContent=G,B.a.appendChild(Z)}let J=document.createElement("div");if(J.className="mt-1 line-clamp-2 text-xs text-muted-foreground",B.a.appendChild(J),(H=D.also)!=null&&H.length){let Z=document.createElement("div");Z.className="mt-1 text-xs text-muted-foreground",Z.textContent=`${e.dataset.alsoIn??"Also in"} ${D.also.join(", ")}`,B.a.appendChild(Z)}P.push(B.li);let W=()=>D.fragment?(D.fragment[0]&&J.replaceChildren(...Sn(D.fragment[0],k)),(D.sections??[]).map(([Z,rt])=>{let wt=Dn(F,`${D.url}#${rt}`,k,"ml-4 block rounded-md border-l px-3 py-1.5 text-sm hover:bg-accent");return wt.a.append(...Sn(Z,k)),wt.li})):[];if(D.fragment)P.push(...W());else if(_){let Z=U??jt(L);I.set(B.li,()=>void ao(Z,[D],D.data??d).then(()=>B.li.after(...W()),()=>{})),_.observe(B.li)}}return P},Dn=(L,O,k,P)=>{let H=document.createElement("li");o||H.setAttribute("role","none"),H.className="mb-1";let D=document.createElement("a");return o||(D.setAttribute("data-part","option"),D.dataset.value=O,D.tabIndex=-1),D.href=Hr(L+O,k),D.className=P,H.appendChild(D),{li:H,a:D}};return{activate:z,run:()=>void it(++j)}}function En(n){try{return n()}catch{return}}function Hr(n,t){if(!t.length)return n;let e=n.indexOf("#"),[i,o]=e<0?[n,""]:[n.slice(0,e),n.slice(e)];return`${i}${i.includes("?")?"&":"?"}h=${encodeURIComponent(t.join(" "))}${o}`}function Sn(n,t){if(!t.length)return[document.createTextNode(n)];let e=new RegExp(`(${t.map(i=>i.replace(/[.*+?^${}()|[\\]\\\\]/g,"\\\\$&")).join("|")})`,"gi");return n.split(e).map((i,o)=>{if(o%2===0)return document.createTextNode(i);let s=document.createElement("mark");return s.textContent=i,s})}var Oo=/[\\p{Script=Han}\\p{Script=Hiragana}\\p{Script=Katakana}\\p{Script=Hangul}]/u;function Ro(n){var b;let t;try{t=(new URLSearchParams(location.search).get("h")??"").split(/\\s+/).filter(y=>y.length>0)}catch{return}let e=document.querySelector("#db-content article")??document.querySelector("#db-content");if(!t.length||!e)return;let i=y=>y.replace(/[.*+?^${}()|[\\]\\\\]/g,"\\\\$&"),o=[...t].sort((y,p)=>p.length-y.length),s=o.filter(y=>Oo.test(y)).map(i),r=o.filter(y=>!Oo.test(y)).map(i),a=[r.length?`(?<![\\\\p{L}\\\\p{N}])(?:${r.join("|")})`:"",s.length?`(?:${s.join("|")})`:""].filter(Boolean),c=new RegExp(`(${a.join("|")})`,"giu"),l=[],d=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,{acceptNode:y=>{var p;return(p=y.parentElement)!=null&&p.closest("script, style, mark, button, [aria-hidden=\'true\']")?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}}),u=[];for(let y=d.nextNode();y;y=d.nextNode())u.push(y);for(let y of u){if(l.length>=500)break;let p=y.data;if(c.lastIndex=0,!c.test(p))continue;c.lastIndex=0;let v=document.createDocumentFragment(),x=0;for(let E of p.matchAll(c)){v.append(p.slice(x,E.index));let M=document.createElement("mark");M.className="db-search-hl",M.textContent=E[0],v.append(M),l.push(M),x=E.index+E[0].length}v.append(p.slice(x)),y.replaceWith(v)}if(Pr(),!l.length)return;let h=((b=document.querySelector("[data-clear-highlights]"))==null?void 0:b.dataset.clearHighlights)??"Clear highlights",g=document.createElement("div");g.className="not-prose mb-4";let f=document.createElement("button");f.type="button",f.className="inline-flex h-8 items-center rounded-md border px-3 text-sm hover:bg-accent",f.textContent=h,f.addEventListener("click",()=>{var y;for(let p of l)p.replaceWith(document.createTextNode(p.textContent??""));e.normalize(),g.remove(),(y=document.getElementById("db-content"))==null||y.focus({preventScroll:!0})},{signal:n}),g.append(f),e.prepend(g),location.hash||l[0].scrollIntoView({block:"center"})}function Pr(){try{let n=new URL(location.href);n.searchParams.delete("h"),history.replaceState(history.state,"",n.toString())}catch{}}var Kt=Object.assign||function(n){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i])}return n},ze=function(t){return t.tagName==="IMG"},Fr=function(t){return NodeList.prototype.isPrototypeOf(t)},$e=function(t){return t&&t.nodeType===1},Do=function(t){var e=t.currentSrc||t.src;return e.substr(-4).toLowerCase()===".svg"},Mo=function(t){try{return Array.isArray(t)?t.filter(ze):Fr(t)?[].slice.call(t).filter(ze):$e(t)?[t].filter(ze):typeof t=="string"?[].slice.call(document.querySelectorAll(t)).filter(ze):[]}catch{throw new TypeError(`The provided selector is invalid.\nExpects a CSS selector, a Node element, a NodeList or an array.\nSee: https://github.com/francoischalifour/medium-zoom`)}},_r=function(t){var e=document.createElement("div");return e.classList.add("medium-zoom-overlay"),e.style.background=t,e},zr=function(t){var e=t.getBoundingClientRect(),i=e.top,o=e.left,s=e.width,r=e.height,a=t.cloneNode(),c=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,l=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0;return a.removeAttribute("id"),a.style.position="absolute",a.style.top=i+c+"px",a.style.left=o+l+"px",a.style.width=s+"px",a.style.height=r+"px",a.style.transform="",a},oe=function(t,e){var i=Kt({bubbles:!1,cancelable:!1,detail:void 0},e);if(typeof window.CustomEvent=="function")return new CustomEvent(t,i);var o=document.createEvent("CustomEvent");return o.initCustomEvent(t,i.bubbles,i.cancelable,i.detail),o},$r=function n(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=window.Promise||function(C){function R(){}C(R,R)},o=function(C){var R=C.target;if(R===Y){f();return}x.indexOf(R)!==-1&&b({target:R})},s=function(){if(!(M||!w.original)){var C=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0;Math.abs(A-C)>S.scrollOffset&&setTimeout(f,150)}},r=function(C){var R=C.key||C.keyCode;(R==="Escape"||R==="Esc"||R===27)&&f()},a=function(){var C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},R=C;if(C.background&&(Y.style.background=C.background),C.container&&C.container instanceof Object&&(R.container=Kt({},S.container,C.container)),C.template){var q=$e(C.template)?C.template:document.querySelector(C.template);R.template=q}return S=Kt({},S,R),x.forEach(function(V){V.dispatchEvent(oe("medium-zoom:update",{detail:{zoom:$}}))}),$},c=function(){var C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return n(Kt({},S,C))},l=function(){for(var C=arguments.length,R=Array(C),q=0;q<C;q++)R[q]=arguments[q];var V=R.reduce(function(z,j){return[].concat(z,Mo(j))},[]);return V.filter(function(z){return x.indexOf(z)===-1}).forEach(function(z){x.push(z),z.classList.add("medium-zoom-image")}),E.forEach(function(z){var j=z.type,U=z.listener,T=z.options;V.forEach(function(I){I.addEventListener(j,U,T)})}),$},d=function(){for(var C=arguments.length,R=Array(C),q=0;q<C;q++)R[q]=arguments[q];w.zoomed&&f();var V=R.length>0?R.reduce(function(z,j){return[].concat(z,Mo(j))},[]):x;return V.forEach(function(z){z.classList.remove("medium-zoom-image"),z.dispatchEvent(oe("medium-zoom:detach",{detail:{zoom:$}}))}),x=x.filter(function(z){return V.indexOf(z)===-1}),$},u=function(C,R){var q=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return x.forEach(function(V){V.addEventListener("medium-zoom:"+C,R,q)}),E.push({type:"medium-zoom:"+C,listener:R,options:q}),$},h=function(C,R){var q=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return x.forEach(function(V){V.removeEventListener("medium-zoom:"+C,R,q)}),E=E.filter(function(V){return!(V.type==="medium-zoom:"+C&&V.listener.toString()===R.toString())}),$},g=function(){var C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},R=C.target,q=function(){var z={width:document.documentElement.clientWidth,height:document.documentElement.clientHeight,left:0,top:0,right:0,bottom:0},j=void 0,U=void 0;if(S.container)if(S.container instanceof Object)z=Kt({},z,S.container),j=z.width-z.left-z.right-S.margin*2,U=z.height-z.top-z.bottom-S.margin*2;else{var T=$e(S.container)?S.container:document.querySelector(S.container),I=T.getBoundingClientRect(),_=I.width,Q=I.height,it=I.left,K=I.top;z=Kt({},z,{width:_,height:Q,left:it,top:K})}j=j||z.width-S.margin*2,U=U||z.height-S.margin*2;var nt=w.zoomedHd||w.original,lt=Do(nt)?j:nt.naturalWidth||j,dt=Do(nt)?U:nt.naturalHeight||U,gt=nt.getBoundingClientRect(),Ut=gt.top,We=gt.left,Lt=gt.width,ce=gt.height,It=Math.min(Math.max(Lt,lt),j)/Lt,Se=Math.min(Math.max(ce,dt),U)/ce,Nt=Math.min(It,Se),kt=(-We+(j-Lt)/2+S.margin+z.left)/Nt,Ye=(-Ut+(U-ce)/2+S.margin+z.top)/Nt,ut="scale("+Nt+") translate3d("+kt+"px, "+Ye+"px, 0)";w.zoomed.style.transform=ut,w.zoomedHd&&(w.zoomedHd.style.transform=ut)};return new i(function(V){if(R&&x.indexOf(R)===-1){V($);return}var z=function _(){M=!1,w.zoomed.removeEventListener("transitionend",_),w.original.dispatchEvent(oe("medium-zoom:opened",{detail:{zoom:$}})),V($)};if(w.zoomed){V($);return}if(R)w.original=R;else if(x.length>0){var j=x;w.original=j[0]}else{V($);return}if(w.original.dispatchEvent(oe("medium-zoom:open",{detail:{zoom:$}})),A=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,M=!0,w.zoomed=zr(w.original),document.body.appendChild(Y),S.template){var U=$e(S.template)?S.template:document.querySelector(S.template);w.template=document.createElement("div"),w.template.appendChild(U.content.cloneNode(!0)),document.body.appendChild(w.template)}if(w.original.parentElement&&w.original.parentElement.tagName==="PICTURE"&&w.original.currentSrc&&(w.zoomed.src=w.original.currentSrc),document.body.appendChild(w.zoomed),window.requestAnimationFrame(function(){document.body.classList.add("medium-zoom--opened")}),w.original.classList.add("medium-zoom-image--hidden"),w.zoomed.classList.add("medium-zoom-image--opened"),w.zoomed.addEventListener("click",f),w.zoomed.addEventListener("transitionend",z),w.original.getAttribute("data-zoom-src")){w.zoomedHd=w.zoomed.cloneNode(),w.zoomedHd.removeAttribute("srcset"),w.zoomedHd.removeAttribute("sizes"),w.zoomedHd.removeAttribute("loading"),w.zoomedHd.src=w.zoomed.getAttribute("data-zoom-src"),w.zoomedHd.onerror=function(){clearInterval(T),console.warn("Unable to reach the zoom image target "+w.zoomedHd.src),w.zoomedHd=null,q()};var T=setInterval(function(){w.zoomedHd.complete&&(clearInterval(T),w.zoomedHd.classList.add("medium-zoom-image--opened"),w.zoomedHd.addEventListener("click",f),document.body.appendChild(w.zoomedHd),q())},10)}else if(w.original.hasAttribute("srcset")){w.zoomedHd=w.zoomed.cloneNode(),w.zoomedHd.removeAttribute("sizes"),w.zoomedHd.removeAttribute("loading");var I=w.zoomedHd.addEventListener("load",function(){w.zoomedHd.removeEventListener("load",I),w.zoomedHd.classList.add("medium-zoom-image--opened"),w.zoomedHd.addEventListener("click",f),document.body.appendChild(w.zoomedHd),q()})}else q()})},f=function(){return new i(function(C){if(M||!w.original){C($);return}var R=function q(){w.original.classList.remove("medium-zoom-image--hidden"),document.body.removeChild(w.zoomed),w.zoomedHd&&document.body.removeChild(w.zoomedHd),document.body.removeChild(Y),w.zoomed.classList.remove("medium-zoom-image--opened"),w.template&&document.body.removeChild(w.template),M=!1,w.zoomed.removeEventListener("transitionend",q),w.original.dispatchEvent(oe("medium-zoom:closed",{detail:{zoom:$}})),w.original=null,w.zoomed=null,w.zoomedHd=null,w.template=null,C($)};M=!0,document.body.classList.remove("medium-zoom--opened"),w.zoomed.style.transform="",w.zoomedHd&&(w.zoomedHd.style.transform=""),w.template&&(w.template.style.transition="opacity 150ms",w.template.style.opacity=0),w.original.dispatchEvent(oe("medium-zoom:close",{detail:{zoom:$}})),w.zoomed.addEventListener("transitionend",R)})},b=function(){var C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},R=C.target;return w.original?f():g({target:R})},y=function(){return S},p=function(){return x},v=function(){return w.original},x=[],E=[],M=!1,A=0,S=e,w={original:null,zoomed:null,zoomedHd:null,template:null};Object.prototype.toString.call(t)==="[object Object]"?S=t:(t||typeof t=="string")&&l(t),S=Kt({margin:0,background:"#fff",scrollOffset:40,container:null,template:null},S);var Y=_r(S.background);document.addEventListener("click",o),document.addEventListener("keyup",r),document.addEventListener("scroll",s),window.addEventListener("resize",f);var $={open:g,close:f,toggle:b,update:a,clone:c,attach:l,detach:d,on:u,off:h,getOptions:y,getImages:p,getZoomedImage:v};return $};function qr(n,t){t===void 0&&(t={});var e=t.insertAt;if(!(!n||typeof document>"u")){var i=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",e==="top"&&i.firstChild?i.insertBefore(o,i.firstChild):i.appendChild(o),o.styleSheet?o.styleSheet.cssText=n:o.appendChild(document.createTextNode(n))}}var Br=".medium-zoom-overlay{position:fixed;top:0;right:0;bottom:0;left:0;opacity:0;transition:opacity .3s;will-change:opacity}.medium-zoom--opened .medium-zoom-overlay{cursor:pointer;cursor:zoom-out;opacity:1}.medium-zoom-image{cursor:pointer;cursor:zoom-in;transition:transform .3s cubic-bezier(.2,0,.2,1)!important}.medium-zoom-image--hidden{visibility:hidden}.medium-zoom-image--opened{position:relative;cursor:pointer;cursor:zoom-out;will-change:transform}";qr(Br);var Io=$r;var jr;function No(n){let t=document.body.dataset.imageZoom;if(!t)return;let e;try{e=JSON.parse(t)}catch{return}let i=[...document.querySelectorAll(\'img[data-zoomable="true"]\')];if(!i.length)return;let o=jr??(jr=Io());o.update(e),o.attach(...i),n==null||n.addEventListener("abort",()=>{o.close(),o.detach(...i)});let s={signal:n},r=!1,a=c=>c.key==="Enter"||c.key===" ";for(let c of i)c.alt&&(c.tabIndex=0,c.addEventListener("keydown",l=>{a(l)&&(l.preventDefault(),r=!0,o.open({target:c}))},s),c.addEventListener("medium-zoom:opened",()=>{let l=document.querySelector(".medium-zoom-image--opened");!r||!l||(l.tabIndex=-1,l.addEventListener("keydown",d=>{a(d)&&(d.preventDefault(),o.close())}),l.focus())},s),c.addEventListener("medium-zoom:closed",()=>{r&&c.focus(),r=!1},s))}var Kr=new Set(["area","base","br","col","embed","hr","img","input","link","meta","source","track","wbr"]),Vr=new Set(["script","style","textarea","title","noscript","template","xmp"]),Ur=new Set(["address","article","aside","blockquote","details","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hr","main","nav","ol","p","pre","section","table","ul"]),Wr=new Set(["nav","aside","header","footer","figure","table","details","blockquote","form","button","svg","math","dialog"]),Yr=new Set(["svg","math","button","select","img"]),Ho=Object.assign(Object.create(null),{amp:"&",lt:"<",gt:">",quot:\'"\',apos:"\'",nbsp:"\\xA0",hellip:"\\u2026",mdash:"\\u2014",ndash:"\\u2013",lsquo:"\\u2018",rsquo:"\\u2019",ldquo:"\\u201C",rdquo:"\\u201D",laquo:"\\xAB",raquo:"\\xBB",copy:"\\xA9",reg:"\\xAE",trade:"\\u2122",middot:"\\xB7",times:"\\xD7",para:"\\xB6",sect:"\\xA7",deg:"\\xB0",rarr:"\\u2192",larr:"\\u2190",bull:"\\u2022",shy:""});function Fo(n){return n.includes("&")?n.replace(/&(#[xX][0-9a-fA-F]{1,6}|#\\d{1,7}|[a-zA-Z]{2,8});/g,(t,e)=>{if(e[0]!=="#")return Ho[e]??Ho[e.toLowerCase()]??t;let i=e[1]==="x"||e[1]==="X"?Number.parseInt(e.slice(2),16):Number.parseInt(e.slice(1),10);return i>0&&i<=1114111&&!(i>=55296&&i<=57343)?String.fromCodePoint(i):"\\uFFFD"}):n}var Po=n=>n>" "&&n!==">"&&n!=="/"&&n!=="="&&n!==\'"\'&&n!=="\'";function Xr(n){let t={tag:"#root",attrs:{},children:[],start:0,end:0},e=n.toLowerCase(),i=t,o=0,s=0,r=1,a=new Map,c=u=>{u>s&&i.children.push(n.slice(s,u))},l=()=>{i.end=r,a.set(i.tag,a.get(i.tag)-1),i=i.parent},d=u=>{if(a.get(u))for(;i!==t;){let h=i.tag===u;if(l(),h)return}};for(;o<n.length;){let u=n.indexOf("<",o);if(u<0)break;let h=n[u+1]??"";if(n.startsWith("<!--",u)){c(u);let E=n.startsWith("<!-->",u)?5:n.startsWith("<!--->",u)?6:0,M=E?u:n.indexOf("-->",u+4);o=s=E?u+E:M<0?n.length:M+3;continue}if(h==="!"||h==="?"){c(u);let E=n.indexOf(">",u);o=s=E<0?n.length:E+1;continue}let g=h==="/",f=u+(g?2:1);if(!/[a-zA-Z]/.test(n[f]??"")){o=u+1;continue}let b=f;for(;f<n.length&&Po(n[f]);)f++;let y=e.slice(b,f),p={},v=!1;for(;f<n.length&&n[f]!==">";){let E=n[f];if(E==="/"){v=!0,f++;continue}if(E<=" "){f++;continue}v=!1;let M=f;for(;f<n.length&&(Po(n[f])||n[f]===\'"\'||n[f]==="\'")&&n[f]!=="=";)f++;let A=e.slice(M,f);for(;f<n.length&&n[f]<=" ";)f++;let S="";if(n[f]==="="){for(f++;f<n.length&&n[f]<=" ";)f++;let w=n[f];if(w===\'"\'||w==="\'"){let Y=n.indexOf(w,f+1);S=n.slice(f+1,Y<0?n.length:Y),f=Y<0?n.length:Y+1}else{let Y=f;for(;f<n.length&&n[f]>" "&&n[f]!==">";)f++;S=n.slice(Y,f)}}A&&!(A in p)&&(p[A]=Fo(S)),f===M&&f++}if(f>=n.length){c(u),s=n.length;break}if(c(u),o=s=f+1,g){d(y);continue}Ur.has(y)&&d("p");let x={tag:y,attrs:p,children:[],parent:i,start:r++,end:0};if(x.excl=Wr.has(y)||Ln(x)||"data-pagefind-ignore"in p?x:i.excl,i.children.push(x),Vr.has(y)){let E=e.indexOf(`</${y}`,o),M=E<0?n.length:E;y==="title"&&x.children.push(n.slice(o,M));let A=E<0?-1:n.indexOf(">",E);o=s=A<0?n.length:A+1,x.end=r;continue}!Kr.has(y)&&!v?(i=x,a.set(y,(a.get(y)??0)+1)):x.end=r}for(c(n.length);i!==t;)l();return t.end=r,t}function*we(n){let t=[...n.children].reverse();for(;t.length;){let e=t.pop();if(typeof e!="string"){yield e;for(let i=e.children.length-1;i>=0;i--)t.push(e.children[i])}}}var Ln=n=>n.attrs["aria-hidden"]==="true"||"hidden"in n.attrs||n.tag==="template";function se(n){let t="",e=[n];for(;e.length;){let i=e.pop();if(typeof i=="string"){t+=Fo(i);continue}if(!(i!==n&&(Ln(i)||Yr.has(i.tag)||i.tag==="script"||i.tag==="style"))){i.tag==="br"&&(t+=" ");for(let o=i.children.length-1;o>=0;o--)e.push(i.children[o])}}return t.replace(/[\\s\xA0]+/g," ").trim()}var An=(n,t)=>n.start<=t.start&&t.end<=n.end;function Gr(n,t){var i;let e=(i=n.parent)==null?void 0:i.excl;return!e||An(e,t)}var Cn=/^h([1-6])$/,Zr=120;function kn(n,t=200){if(n.length<=t)return n;let e=n.slice(0,t),i=e.lastIndexOf(" ");return`${(i>t*.6?e.slice(0,i):e).replace(/[\\s,;:.\u2013\u2014-]+$/,"")}\\u2026`}var Be=n=>kn(n,Zr),Qr=new Set(["p","li","dd","dt","td","th","blockquote","figcaption","caption","summary","pre"]);function qe(n,t,e){for(let i of n){if(e!=null&&e(i))break;if(i.tag!=="p"||!Gr(i,t)||Ln(i))continue;let o=se(i);if(o)return kn(o)}return""}function Vt(n,t){for(let e of we(n))if(t(e))return e}function Jr(n){let t=n.attrs["data-title"]??n.attrs["aria-label"]??n.attrs.title;if(t!=null&&t.trim())return Be(t.replace(/\\s+/g," ").trim());let e=Vt(n,i=>i.tag==="figcaption"||i.tag==="caption"||i.tag==="summary"||"data-card-title"in i.attrs||"data-title"in i.attrs||Cn.test(i.tag));return e?Be(se(e)):""}var ta=n=>{var t;return n.tag==="meta"&&((t=n.attrs["http-equiv"])==null?void 0:t.trim().toLowerCase())==="refresh"&&/[;,]\\s*url\\s*=/i.test(n.attrs.content??"")};function _o(n,t){var g;let e=Xr(n);if(Vt(e,ta))return;let i=Vt(e,f=>f.tag==="main")??e,o=Vt(i,f=>f.tag==="article"&&/(?:^|\\s)docs-prose(?:\\s|$)/.test(f.attrs.class??""))??i,s=Vt(i,f=>f.tag==="h1"),r=Vt(e,f=>f.tag==="title"),a=Be(s&&se(s)||(r?se(r).split(" | ")[0].trim():"")),c=t==null?void 0:t.replace(/^#/,"");if(!c||c==="top"){let f=[...we(o)],b=s?f.indexOf(s)+1:0;return{title:a,excerpt:qe(f.slice(Math.max(0,b)),o),kind:"page"}}let l=Vt(e,f=>f.attrs.id===c);if(!l)return;let d=(g=Cn.exec(l.tag))==null?void 0:g[1];if(d==="1")return{title:a,excerpt:qe(we(o),o),kind:"page"};if(d){let f=l.parent??e,b=[...we(f)],y=b.slice(b.indexOf(l)+1).filter(v=>!An(l,v)),p=An(o,l)?o:i;return{title:a,label:Be(se(l)),excerpt:qe(y,p,v=>{let x=Cn.exec(v.tag);return!!x&&Number(x[1])<=Number(d)}),kind:"heading"}}let u=qe(we(l),l),h=!u&&Qr.has(l.tag)?kn(se(l)):"";return{title:a,label:Jr(l),excerpt:u||h,kind:"target"}}var ea="dogsbay:link-preview-load",zo=[".db-link-preview{position:fixed;z-index:60;box-sizing:border-box;max-width:min(22rem,calc(100vw - 16px));max-height:min(16rem,calc(100vh - 16px));overflow:hidden;padding:.75rem .875rem;","border:1px solid var(--border,#e4e4e7);border-radius:var(--radius,.5rem);background:var(--popover,#fff);color:var(--popover-foreground,#18181b);","box-shadow:0 8px 24px rgb(0 0 0/.14);font-size:.875rem;line-height:1.45;text-align:start}",".db-link-preview[hidden]{display:none}",".db-link-preview-title{margin:0;font-weight:600}",".db-link-preview-label{font-weight:500}",".db-link-preview-excerpt{margin:.375rem 0 0;color:var(--muted-foreground,#52525b)}","@media (prefers-reduced-motion:no-preference){.db-link-preview:not([hidden]){animation:db-link-preview-in .12s ease-out}}","@keyframes db-link-preview-in{from{opacity:0;transform:translateY(2px)}}"].join(""),xe="db-link-preview",na="nav:not(.related-resources), aside, header, footer, h1, h2, h3, h4, h5, h6, [data-no-link-preview], [data-card], db-card, db-link-button",ia="div, p, h1, h2, h3, h4, h5, h6, img, svg, picture, figure, ul, ol, table",oa=/\\.(?:pdf|zip|gz|tgz|tar|bz2|xz|7z|rar|png|jpe?g|gif|svg|webp|avif|ico|bmp|tiff?|mp[34]|m4a|webm|ogg|wav|mov|avi|json|xml|csv|tsv|txt|ya?ml|md|epub|docx?|xlsx?|pptx?|odt|ods|exe|msi|dmg|pkg|deb|rpm|apk|iso|bin|wasm|js|mjs|css|map|woff2?|ttf|otf)$/i,sa=8e6,re;async function $o(n){let t=await fetch(n,{credentials:"same-origin",redirect:"manual",headers:{Accept:"text/html"}});if(t.type==="opaqueredirect"||t.status>=300&&t.status<400){let[e,i=""]=n.split("?");return e.endsWith("/")?void 0:$o(`${e}/${i?`?${i}`:""}`)}if(!(!t.ok||!/html/i.test(t.headers.get("content-type")??"text/html")))return t.text()}function ra(n,t="article.docs-prose",e=location){if(!n.closest(t)||n.closest(na)||n.hasAttribute("download")||n.getAttribute("aria-hidden")==="true"||n.hasAttribute("data-variant")||n.querySelector(ia))return;let i=n.getAttribute("href");if(!i)return;let o;try{o=new URL(i,e.href)}catch{return}if(o.origin!==e.origin||o.protocol!=="http:"&&o.protocol!=="https:"||oa.test(o.pathname))return;let s;try{s=o.hash?decodeURIComponent(o.hash.slice(1)):void 0}catch{s=o.hash.slice(1)}if(!(o.pathname===e.pathname&&o.search===e.search&&(!s||s==="top")))return o.hash="",{url:o,...s?{id:s}:{}}}function aa(){if(document.getElementById(`${xe}-style`)||document.dbLinkPreviewSheet)return;try{let t=new CSSStyleSheet;t.replaceSync(zo),document.adoptedStyleSheets=[...document.adoptedStyleSheets,t],document.dbLinkPreviewSheet=!0;return}catch{}let n=document.createElement("style");n.id=`${xe}-style`,n.textContent=zo,document.head.append(n)}var ca=n=>!!n&&typeof n=="object"&&typeof n.title=="string";function qo(n={}){re==null||re();let t=n.content??"article.docs-prose",e=n.delay??500;n.style!==!1&&aa();let i=new Map,o=new Map,s=0,r=new Map,a,c,l=0,d,u,h=null,g,f,b,y=document.createElement("div");y.id=xe,y.className="db-link-preview",y.setAttribute("role","tooltip"),y.hidden=!0;let p=document.createElement("p");p.className="db-link-preview-title";let v=document.createElement("p");v.className="db-link-preview-excerpt",y.append(p,v);let x=T=>{let I=T.href,_=i.get(I);return _?(i.delete(I),i.set(I,_)):(_=(async()=>{if(n.load)return n.load(T);let Q=!1,it,K=new CustomEvent(ea,{cancelable:!0,detail:{url:I,respond(nt){Q=!0,it=nt}}});return document.dispatchEvent(K),Q||K.defaultPrevented?it:T.href===location.href.split("#")[0]?document.documentElement.outerHTML:$o(T.pathname+T.search)})().then(Q=>{let it=typeof Q=="string"?Q.length:0;o.set(I,it),s+=it;for(let[K]of i){if(s<=sa||K===I)break;s-=o.get(K)??0,o.delete(K),i.delete(K);for(let nt of r.keys())nt.startsWith(K)&&r.delete(nt)}return Q},()=>{i.delete(I)}),i.set(I,_)),_},E=()=>{clearTimeout(g),clearTimeout(f),a=void 0,c=void 0,d==null||d.disconnect(),d=void 0,u&&(h===null?u.removeAttribute("aria-describedby"):u.setAttribute("aria-describedby",h),u=void 0,y.hidden=!0)},M=T=>{let I=[...T.getClientRects()],_=(b&&I.find(gt=>b.y>=gt.top&&b.y<=gt.bottom))??I[0]??T.getBoundingClientRect(),Q=y.offsetWidth,it=y.offsetHeight,K=8,nt=_.bottom+K,lt=nt+it<=window.innerHeight-K||_.top-K-it<K?nt:_.top-K-it,dt=Math.max(K,Math.min(_.left,window.innerWidth-Q-K));y.style.top=`${Math.round(lt)}px`,y.style.left=`${Math.round(dt)}px`},A=(T,I)=>{if(!(a!==T||!T.isConnected)){if(p.textContent="",p.append(I.title||I.label||""),I.label&&I.title){let _=document.createElement("span");_.className="db-link-preview-label",_.textContent=` \\u203A ${I.label}`,p.append(_)}v.textContent=I.excerpt,v.hidden=!I.excerpt,!(!p.textContent&&!I.excerpt)&&(y.isConnected||document.body.append(y),u!==T&&(h=T.getAttribute("aria-describedby"),T.setAttribute("aria-describedby",h?`${h} ${xe}`:xe),u=T),y.hidden=!1,M(T),d??(d=new MutationObserver(()=>{u&&!u.isConnected&&E()})),d.observe(document.body,{childList:!0,subtree:!0}))}},S=(T,I)=>{if(a===T)return;let _=ra(T,t);_&&(E(),a=T,c=I,g=setTimeout(async()=>{let Q=await x(_.url);if(a!==T)return;let it=`${_.url.href}#${_.id??""}`,K=r.get(it);K===void 0&&!r.has(it)&&(K=ca(Q)?Q:typeof Q=="string"?_o(Q,_.id):void 0,typeof Q=="string"&&r.set(it,K)),K&&A(T,K)},e))},w=T=>T instanceof Element?T.closest("a[href]"):null,Y=T=>{if(b={x:T.clientX,y:T.clientY},T.pointerType==="touch")return;if(y.contains(T.target)){clearTimeout(f);return}let I=w(T.target);I&&!(c==="focus"&&I===a)&&(clearTimeout(f),S(I,"pointer"))},$=T=>{if(T.pointerType==="touch"||!a||c!=="pointer")return;let I=T.relatedTarget;I&&(a.contains(I)||y.contains(I))||(clearTimeout(f),f=setTimeout(E,u?200:0))},j=[[document,"pointerover",Y],[document,"pointerout",$],[y,"pointerleave",(T=>$(T))],[document,"focusin",T=>{let I=w(T.target);if(!I)return;let _=!0;try{_=I.matches(":focus-visible")}catch{}_&&(b=void 0,l=performance.now(),S(I,"focus"))}],[document,"focusout",T=>{a&&(T.target===a||a.contains(T.target))&&E()}],[document,"keydown",T=>{T.key==="Escape"&&(a||u)&&E()}],[document,"pointerdown",T=>{y.contains(T.target)||E()},{capture:!0}],[document,"touchstart",()=>E(),{passive:!0,capture:!0}],[window,"scroll",()=>{if(c==="focus"&&a){u===a&&M(a);return}performance.now()-l<100||E()},{passive:!0,capture:!0}],[window,"resize",E,{passive:!0}],[window,"pagehide",E],[document,"astro:before-swap",E]];for(let[T,I,_,Q]of j)T.addEventListener(I,_,Q);let U=()=>{E();for(let[T,I,_,Q]of j)T.removeEventListener(I,_,Q);y.remove(),re===U&&(re=void 0)};return re=U,U}function je(n){return!/^[\\x00-\\x20]*([a-z][a-z0-9+.-]*:|[\\\\/])/i.test(n.replace(/[\\t\\n\\r]/g,""))}var Ke=new Map,la=15e3;function Tn(n){let t=Ke.get(n);if(!t){let e=new Promise((i,o)=>{let s=document.createElement("script");s.src=n;let r=setTimeout(()=>a(),la),a=()=>{clearTimeout(r),s.onload=s.onerror=null,Ke.get(n)===e&&Ke.delete(n),o(new Error(`could not load ${n}`))};s.onload=()=>{clearTimeout(r),i()},s.onerror=a,document.head.appendChild(s)});Ke.set(n,t=e)}return t}function da(n){document.querySelectorAll("[data-component=\'theme-toggle\']").forEach(t=>{let e=()=>t.setAttribute("aria-pressed",String(document.documentElement.classList.contains("dark")));e(),t.addEventListener("click",()=>{let i=!document.documentElement.classList.contains("dark");document.documentElement.classList.toggle("dark",i);try{localStorage.setItem("theme",i?"dark":"light")}catch{}e()},{signal:n})})}function ua(n){document.addEventListener("click",async t=>{var o,s,r,a;let e=t.target.closest("[data-copy-markdown]");if(!e)return;let i=(((o=document.getElementById("db-page-markdown"))==null?void 0:o.textContent)??"").replace(/<\\\\\\/(script)/gi,"</$1").replace(/<\\\\!--/g,"<!--");try{await navigator.clipboard.writeText(i);let c=(s=e.dataset).label??(s.label=e.textContent??"");e.textContent="Copied",clearTimeout(Number(e.dataset.timer)),e.dataset.timer=String(setTimeout(()=>e.textContent=c,1500))}catch{}(a=(r=e.closest("db-popover"))==null?void 0:r.close)==null||a.call(r,"close-press")},{signal:n})}function ha(n,t){let e=document.body.dataset.page??"index.html";document.querySelectorAll("select[data-db-switch]").forEach(i=>{i.addEventListener("change",async()=>{var a;let o=i.selectedOptions[0];if(!o||o.disabled||!o.hasAttribute("value"))return;let s=o.dataset.prefix??"",r=i.value;if(o.hasAttribute("data-link")){(je(r)||/^https?:\\/\\//i.test(r))&&(location.href=r);return}if(!(!je(r)||!je(s))){if(i.dataset.dbSwitch==="product"){location.href=r;return}try{let c=s?`${n}${s}/`:n;await Tn(`${c}_dogsbay/pages.js`);let l=(a=window.__DOGSBAY_PAGES__)==null?void 0:a[s];location.href=l&&!l.includes(e)?`${c}index.html`:r}catch{location.href=r}}},{signal:t})})}function fa(n){document.addEventListener("click",t=>{var i;let e=t.target.closest("a.db-anchor");!e||location.protocol==="file:"||(i=navigator.clipboard)==null||i.writeText(e.href).catch(()=>{})},{signal:n})}var Ee=new Map,Ue=new Set;function Ve(){for(let[n,t]of Ee)n.isConnected||(Dt(n),t.abort(),Ee.delete(n));for(let n of Ue)n.isConnected||Dt(n)}function pa(n,t){let e=EventTarget.prototype,i=e.addEventListener,o=0;e.addEventListener=function(s,r,a){o++;let c=typeof a=="object"?a.signal:void 0;i.call(this,s,r,typeof a=="object"?{...a,signal:c?AbortSignal.any([c,n]):n}:{capture:a===!0,signal:n})};try{t()}finally{e.addEventListener=i}return o}function ma(){Ve(),document.querySelectorAll("[data-component=\'sidebar-provider\']").forEach(n=>{if(Ee.has(n)||Ue.has(n))return;let t=new AbortController;pa(t.signal,()=>hn(n))?Ee.set(n,t):n.querySelector("[data-component=\'sidebar\']")&&Ue.add(n)}),document.removeEventListener("keydown",Ve),document.addEventListener("keydown",Ve)}var ae;function ga(n){return n===!1||!document.querySelector("main[data-link-previews]")||location.protocol==="file:"?void 0:qo({delay:(typeof n=="object"?n:{}).delay,content:"main[data-link-previews] article.docs-prose"})}function On(n={}){var c;ae==null||ae.unmount();let t=new AbortController,{signal:e}=t,i=document.body,o=i.dataset.unitRoot??"",s=i.dataset.siteRoot??"";if(n.nav!==void 0){window.__DOGSBAY_NAV__=n.nav;for(let l of document.querySelectorAll("db-nav-tree")){let d=l.querySelector(":scope > [data-part=\'list\']");d&&!d.querySelector("[data-part=\'item\']")&&((c=l.parentNode)==null||c.insertBefore(l,l.nextSibling))}}ma(),n.theme!==!1&&da(e),ua(e),n.switchers!==!1&&ha(s,e),fa(e),n.search!==!1&&(Lo({unitRoot:o,siteRoot:s,prefix:i.dataset.prefix??"",loadScript:Tn,signal:e}),ko({unitRoot:o,siteRoot:s,prefix:i.dataset.prefix??"",loadScript:Tn,signal:e})),Ro(e),No(e);let r=ga(n.linkPreviews);r&&e.addEventListener("abort",r,{once:!0});let a={unmount(){if(!e.aborted){t.abort();for(let l of[...Ee.keys(),...Ue])Dt(l);Ve(),ae===a&&(ae=void 0)}}};return ae=a}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>On()):On();})();\n';
|
|
23110
|
+
var CLIENT_FILE = "dogsbay-eac32d9bcf.js";
|
|
23111
|
+
var SSG_VERSION = "0.2.0-beta.177";
|
|
23112
|
+
var THEME_TEMPLATES = { "layouts/blank.html": '{# A page without the sidebar or table of contents: landing pages, splash pages, 404. -#}\n<!doctype html>\n<html lang="{{ page.lang }}" dir="{{ page.dir }}"{% if site.colorMode == "dark" %} class="dark"{% endif %}{% if has.crowdedHeader %} data-header="crowded"{% endif %}>\n<head>\n{% include "partials/head.html" %}\n</head>\n<body class="bg-background text-foreground antialiased" data-unit-root="{{ paths.unit }}" data-site-root="{{ paths.site }}" data-prefix="{{ page.prefix }}" data-page="{{ page.out }}"{{ bodyAttrs }}>\n{{ skipLink }}\n<div class="relative flex min-h-svh w-full flex-col bg-background">\n{{ announcementBar }}\n{% include "partials/header.html" %}\n<main id="db-content" class="min-w-0 flex-1 px-6 py-8 outline-none lg:px-12" tabindex="-1"{% if linkPreviews %} data-link-previews{% endif %}>\n<div class="mx-auto {{ widthClass }}">\n{{ banner }}{{ versionBadge }}{{ h1 }}{{ byline }}{{ lede }}{{ hero }}{{ metaStrip }}{{ tocTop }}\n<article class="docs-prose">\n{{ content }}\n</article>\n{% include "partials/footer.html" %}\n</div>\n</main>\n</div>\n{{ searchDialog }}\n{{ scripts }}\n</body>\n</html>\n', "layouts/docs.html": '{# The docs layout: a port of @dogsbay/docs-layout DocsLayout.astro. -#}\n<!doctype html>\n<html lang="{{ page.lang }}" dir="{{ page.dir }}"{% if site.colorMode == "dark" %} class="dark"{% endif %}{% if has.crowdedHeader %} data-header="crowded"{% endif %}>\n<head>\n{% include "partials/head.html" %}\n</head>\n<body class="bg-background text-foreground antialiased" data-unit-root="{{ paths.unit }}" data-site-root="{{ paths.site }}" data-prefix="{{ page.prefix }}" data-page="{{ page.out }}"{{ bodyAttrs }}>\n{{ skipLink }}\n<div class="group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar" data-component="sidebar-provider" style="--sidebar-width: 16rem; --sidebar-width-icon: 3rem;">\n{{ sidebar }}\n<div class="relative flex w-full min-w-0 flex-1 flex-col bg-background">\n{{ announcementBar }}\n{% include "partials/header.html" %}\n<div class="flex min-w-0">\n<main id="db-content" class="min-w-0 flex-1 px-6 py-8 outline-none lg:px-12" tabindex="-1"{% if linkPreviews %} data-link-previews{% endif %}>\n<div class="mx-auto {{ widthClass }}">\n{{ banner }}{{ breadcrumb }}{{ pageActionsInline }}{{ versionBadge }}{{ h1 }}{{ byline }}{{ lede }}{{ hero }}{{ metaStrip }}{{ tocTop }}\n<article class="docs-prose">\n{{ content }}\n</article>\n{% include "partials/footer.html" %}\n</div>\n</main>\n{{ tocRail }}\n</div>\n</div>\n</div>\n{{ searchDialog }}\n{{ scripts }}\n</body>\n</html>\n', "partials/announcement.html": `{#- The site's announcement bar (site.announcement), as DocsLayout's AnnouncementBar.astro: a band above the
|
|
22778
23113
|
header in the callout colours of its tone. A closeable one is closed and remembered by <db-announcement>,
|
|
22779
23114
|
and the head script hides a closed one before first paint. Context: announcement = {id, key (what a close is
|
|
22780
23115
|
stored under, as the head meta), html (inline Markdown, rendered), toneClass, closeable} or "". -#}
|
|
@@ -23003,35 +23338,41 @@ var THEME_TEMPLATES = { "layouts/blank.html": '{# A page without the sidebar or
|
|
|
23003
23338
|
{%- endif %}
|
|
23004
23339
|
</section>
|
|
23005
23340
|
`, "partials/toc-popover.html": '{#- Table of contents in a header popover. -#}\n{%- set toc_label = t("toc") -%}\n{%- set toc_title = "" -%}\n<details class="dba-toc-popover relative" data-toc-popover><summary class="cursor-pointer list-none rounded-md px-2 py-1.5 text-sm text-muted-foreground hover:bg-accent hover:text-foreground">{{ toc_label }}</summary><div class="absolute right-0 z-50 mt-1 max-h-[70vh] w-64 overflow-y-auto rounded-md border bg-background p-3 shadow-md">\n{%- include "partials/toc.html" -%}\n</div></details>\n', "partials/toc-rail.html": '{#- Table of contents in a right-hand rail, with a visible title. -#}\n{%- set toc_label = t("toc") -%}\n{%- set toc_title = toc_label -%}\n<div class="sticky top-12 hidden h-[calc(100vh-3rem)] w-56 shrink-0 overflow-y-auto border-l p-4 lg:block">\n{%- include "partials/toc.html" -%}\n</div>\n', "partials/toc-top.html": '{#- Table of contents above the content, collapsed. -#}\n{%- set toc_label = t("toc") -%}\n{%- set toc_title = "" -%}\n<details class="dba-toc-top not-prose mb-6 rounded-md border" data-toc-top><summary class="cursor-pointer list-none px-3 py-2 text-sm font-medium text-muted-foreground">{{ toc_label }}</summary><div class="border-t px-3 py-2">\n{%- include "partials/toc.html" -%}\n</div></details>\n', "partials/toc.html": '{#- The table-of-contents link list (DocsToc.astro), shared by toc-top, toc-rail and toc-popover.\n Context: headings = [{depth, id, text}], toc_label (aria-label), toc_title (visible heading, may be empty). -#}\n<db-toc offset="64"><nav class="text-sm" aria-label="{{ toc_label }}">\n{%- if toc_title %}<div class="text-xs font-semibold uppercase text-muted-foreground" aria-hidden="true">{{ toc_title }}</div>{% endif -%}\n<ul class="mt-2 space-y-1">\n{%- for h in headings -%}\n<li><a href="#{{ h.id }}" data-toc-link data-toc-slug="{{ h.id }}" class="block py-0.5 text-muted-foreground transition-colors hover:text-foreground data-[active]:font-medium data-[active]:text-foreground" style="padding-left:{{ (h.depth - 2) * 0.75 }}rem">{{ h.text }}</a></li>\n{%- endfor -%}\n</ul></nav></db-toc>\n{#- An included partial keeps its final newline (keepTrailingNewline); this strips it, since toc-top/rail/popover place the list inline. -#}\n', "partials/version-badge.html": '{#- The version badge above the title (Docusaurus\'s DocVersionBadge), on versions with `badge: true`.\n Context: versionBadge = "Version: 3.33" (the text, worded and filled in), or empty. -#}\n{%- if versionBadge -%}\n<div class="not-prose mb-3" data-version-badge><span class="inline-flex items-center rounded-md border border-border px-2 py-0.5 text-xs font-medium text-muted-foreground">{{ versionBadge }}</span></div>\n{%- endif -%}\n' };
|
|
23006
|
-
var CLIENT_CANDIDATES = ['""', '""}', '"&"', '")}', '"./",', '"Also', '"\\\\$&")).join("|")})', '"\\\\$&")}"', '"s"}', '"{n}").replace("{n}",', "#db-content", "#q=", "([^", "(hashed", "(here", "(inFragment()", "(index.ts)", "(the", "({n})", "./", "./elements.js", "./highlight.js", "./image-zoom.js", "./mount.js", "./pagefind.js", "./search-facets.js", "./search-scope.js", "./search.js", "./targets.js", ".medium-zoom-image--opened", "/g,", "1.0", "1.x", ":scope", "<!--", "</", "</$1", "<\\/", "<db-combobox", "<db-dialog", "<script>", "===", "=>", "??", "?h=<terms>", "?q=", "?|\\S*)/gi,", "@dogsbay/elements/db-accordion", "@dogsbay/elements/db-announcement", "@dogsbay/elements/db-code-block", "@dogsbay/elements/db-combobox", "@dogsbay/elements/db-details-sheet", "@dogsbay/elements/db-dialog", "@dogsbay/elements/db-nav-tree", "@dogsbay/elements/db-popover", "@dogsbay/elements/db-select", "@dogsbay/elements/db-tabs", "@dogsbay/elements/db-toc", "@dogsbay/elements/db-tooltip", "@dogsbay/search/facets", "@dogsbay/search/format", "@dogsbay/search/query", "@dogsbay/ssg/client", "@dogsbay/ui/sidebar/sidebar.ts", "All", "Also", "Clear", "Copied", "DOMContentLoaded", "Enter", "Filter", "Gizmo", "More", "No", "Platform", "Product", "Search", "See", "String(missing))}", "This", "URL(siteRoot", "[^", "[aria-hidden='true']", "[contenteditable]", "[data-clear-filters]", "[data-clear-highlights]", "[data-component='sidebar']", "[data-component='sidebar-provider']", "[data-component='theme-toggle']", "[data-copy-markdown]", "[data-db-search-facets]", "[data-db-search-input]", "[data-db-search-list]", "[data-db-search-page]", "[data-db-search-status]", "[data-part='item']", "[data-part='list']", "[data-part='listbox']", "\\\\$&", "_dogsbay", "_dogsbay/nav.js", "_dogsbay/site.js", "a-b", "a.db-anchor", "abort", "accent-primary", "all", "alone.", "and", "api", "applies", "are", "aria-label", "aria-pressed", "aria-pressed:bg-primary", "aria-pressed:text-primary-foreground", "arrive", "article", "be", "before", "block", "border", "border-border", "border-l", "both", "build.navMode:", "builtin", "button", "button,", "by", "category", "center", "change", "checkbox", "click", "client", "close-press", "config", "could", "cursor-pointer", "dark", "data", "data-facets", "data-link", "data-part", "db-content", "db-dialog:open", "db-nav-tree", "db-page-markdown", "db-popover", "db-search", "db-search-hl", "default,", "dialog", "disabled", "display,", "div", "docs.js", "each", "else", "except", "facet", "facets", "fieldset", "file:", "filter", 'filter="none"', "filter=name:value", "flex", "flex-1", "flex-wrap", "fn", "folder", "font-medium", "font-semibold", "for", "form", "from", "fullNavLimit", "function", "gap-1", "gap-2", "gi", "giu", "group", "h-8", "hidden", "highlights", "host", "hover:bg-accent", "hover:text-foreground", "https:", 'id="db-search">', 'img[data-zoomable="true"]', "in", 'in"}', "index", "index.html", "inline-flex", "inline>", "input", "input,", "input[data-facet-name]", "inst", "install", "install/aws", "installing", "items-center", "its", "javascript:", "keydown", "label", "last", "later", "legend", "li", "light", "line-clamp-2", "list", "load", "loaded.", "loading", "loads.", "location.href).pathname}", "mark", "mark,", "mb-1", "mb-2", "mb-3", "mb-4", "medium-zoom", "medium-zoom:closed", "medium-zoom:opened", "ml-4", "mount()", "mounts", "mt-1", "mt-4", "mx-3", "name\\0value", "names", "none", "not", "not-prose", "object", "once", "only", "option", "others", "own", "own,", "p-3", "p=", "page", "page,", "page.html#id", "page.html?h=terms#id", "pagefind", "parameters:", "pb-2", "pb-3", "platform", "product", "product,", "product.", "product;", "products", "products:", "puts", "px-2", "px-2.5", "px-3", "py-0.5", "py-1", "py-1.5", "py-2", "query", "query:", "readDataScript:", "reader", "results", "results,", "role", "rounded", "rounded-full", "rounded-md", "scope", "scope;", "scope=", "script", "script,", "search", "search.html", "searched", "section", "select,", "select[data-db-switch]", "signal", "site", "size-3.5", "space-y-0.5", "span", "ssg.search:", "string", "style,", "submit", "tag", "taxonomies", "text-center", "text-muted-foreground", "text-sm", "text-xs", "text/html", "textarea,", "that", "the", "them,", "theme", "they", "this", "to", "tracking-wide", "transition-colors", "true", "truncate", "ul", "unit", "unmount()", "uppercase", "v:", "v=", "value", "values", "version", "versions", "w-full", "way", "when", "window.__DOGSBAY_NAV__", "with", "{n}", "{}", "||"];
|
|
23341
|
+
var CLIENT_CANDIDATES = ['""', '""}', '"&"', '")}', '"./",', '"Also', '"\\\\$&")).join("|")})', '"\\\\$&")}"', '"s"}', '"{n}").replace("{n}",', "#db-content", "#q=", "([^", "(hashed", "(here", "(inFragment()", "(index.ts)", "(the", "({n})", "./", "./elements.js", "./highlight.js", "./image-zoom.js", "./mount.js", "./pagefind.js", "./search-facets.js", "./search-scope.js", "./search.js", "./targets.js", ".medium-zoom-image--opened", "/g,", "1.0", "1.x", ":scope", "<!--", "</", "</$1", "<\\/", "<db-combobox", "<db-dialog", "<main", "<main>", "<script>", "===", "=>", "??", "?h=<terms>", "?q=", "?|\\S*)/gi,", "@dogsbay/elements/db-accordion", "@dogsbay/elements/db-announcement", "@dogsbay/elements/db-code-block", "@dogsbay/elements/db-combobox", "@dogsbay/elements/db-details-sheet", "@dogsbay/elements/db-dialog", "@dogsbay/elements/db-nav-tree", "@dogsbay/elements/db-popover", "@dogsbay/elements/db-select", "@dogsbay/elements/db-tabs", "@dogsbay/elements/db-toc", "@dogsbay/elements/db-tooltip", "@dogsbay/elements/link-previews", "@dogsbay/search/facets", "@dogsbay/search/format", "@dogsbay/search/query", "@dogsbay/ssg/client", "@dogsbay/ui/sidebar/sidebar.ts", "All", "Also", "Clear", "Copied", "DOMContentLoaded", "Enter", "Filter", "Gizmo", "More", "No", "Platform", "Product", "Search", "See", "String(missing))}", "This", "URL(siteRoot", "[^", "[aria-hidden='true']", "[contenteditable]", "[data-clear-filters]", "[data-clear-highlights]", "[data-component='sidebar']", "[data-component='sidebar-provider']", "[data-component='theme-toggle']", "[data-copy-markdown]", "[data-db-search-facets]", "[data-db-search-input]", "[data-db-search-list]", "[data-db-search-page]", "[data-db-search-status]", "[data-part='item']", "[data-part='list']", "[data-part='listbox']", "\\\\$&", "_dogsbay", "_dogsbay/nav.js", "_dogsbay/site.js", "a-b", "a.db-anchor", "abort", "accent-primary", "all", "alone.", "and", "api", "applies", "are", "aria-label", "aria-pressed", "aria-pressed:bg-primary", "aria-pressed:text-primary-foreground", "arrive", "article", "article.docs-prose", "as", "be", "before", "block", "border", "border-border", "border-l", "both", "build.navMode:", "builtin", "button", "button,", "by", "category", "center", "change", "checkbox", "click", "client", "close-press", "config", "could", "cursor-pointer", "dark", "data", "data-facets", "data-link", "data-link-previews", "data-link-previews>", "data-part", "db-content", "db-dialog:open", "db-nav-tree", "db-page-markdown", "db-popover", "db-search", "db-search-hl", "default,", "delay", "dialog", "disabled", "display,", "div", "docs.js", "each", "else", "except", "facet", "facets", "false", "fieldset", "file:", "filter", 'filter="none"', "filter=name:value", "flex", "flex-1", "flex-wrap", "fn", "folder", "font-medium", "font-semibold", "for", "form", "frame", "from", "fullNavLimit", "function", "gap-1", "gap-2", "gi", "giu", "group", "h-8", "hidden", "highlights", "host", "hover:bg-accent", "hover:text-foreground", "http(s)", "https:", 'id="db-search">', 'img[data-zoomable="true"]', "in", 'in"}', "index", "index.html", "inline-flex", "inline>", "input", "input,", "input[data-facet-name]", "inst", "install", "install/aws", "installing", "items-center", "its", "javascript:", "keydown", "label", "last", "later", "legend", "li", "light", "line-clamp-2", "linkPreviews", "linkPreviews:", "list", "load", "loaded.", "loading", "loads.", "location.href).pathname}", "main[data-link-previews]", "mark", "mark,", "mb-1", "mb-2", "mb-3", "mb-4", "medium-zoom", "medium-zoom:closed", "medium-zoom:opened", "ml-4", "mount()", "mounts", "mt-1", "mt-4", "mx-3", "name\\0value", "names", "no", "none", "not", "not-prose", "object", "once", "only", "option", "origin,", "others", "own", "own,", "p-3", "p=", "page", "page,", "page.html#id", "page.html?h=terms#id", "pagefind", "parameters:", "pb-2", "pb-3", "platform", "playground", "product", "product,", "product.", "product;", "products", "products:", "puts", "px-2", "px-2.5", "px-3", "py-0.5", "py-1", "py-1.5", "py-2", "query", "query:", "readDataScript:", "reader", "results", "results,", "role", "rounded", "rounded-full", "rounded-md", "scope", "scope;", "scope=", "script", "script,", "search", "search.html", "searched", "section", "select,", "select[data-db-switch]", "signal", "site", "size-3.5", "so", "space-y-0.5", "span", "ssg.search:", "string", "style,", "submit", "such", "tag", "taxonomies", "text-center", "text-muted-foreground", "text-sm", "text-xs", "text/html", "textarea,", "that", "the", "them,", "theme", "they", "this", "to", "tracking-wide", "transition-colors", "true", "truncate", "ul", "unit", "unmount()", "uppercase", "v:", "v=", "value", "values", "version", "versions", "w-full", "way", "when", "window.__DOGSBAY_NAV__", "with", "{n}", "{}", "||"];
|
|
23007
23342
|
var SITE_NOTICES = `Third-party software in this site's _dogsbay/ files (dogsbay.js, site.css) and pages
|
|
23008
23343
|
|
|
23009
23344
|
========================================================================
|
|
23010
|
-
@dogsbay/elements@0.2.0-beta.
|
|
23345
|
+
@dogsbay/elements@0.2.0-beta.177 (MIT)
|
|
23346
|
+
https://github.com/dogsbay/dogsbay.git
|
|
23347
|
+
|
|
23348
|
+
Licensed under MIT; the package ships no licence file.
|
|
23349
|
+
|
|
23350
|
+
========================================================================
|
|
23351
|
+
@dogsbay/primitives@0.2.0-beta.177 (MIT)
|
|
23011
23352
|
https://github.com/dogsbay/dogsbay.git
|
|
23012
23353
|
|
|
23013
23354
|
Licensed under MIT; the package ships no licence file.
|
|
23014
23355
|
|
|
23015
23356
|
========================================================================
|
|
23016
|
-
@dogsbay/
|
|
23357
|
+
@dogsbay/render-html@0.2.0-beta.177 (MIT)
|
|
23017
23358
|
https://github.com/dogsbay/dogsbay.git
|
|
23018
23359
|
|
|
23019
23360
|
Licensed under MIT; the package ships no licence file.
|
|
23020
23361
|
|
|
23021
23362
|
========================================================================
|
|
23022
|
-
@dogsbay/
|
|
23363
|
+
@dogsbay/search@0.2.0-beta.177 (MIT)
|
|
23023
23364
|
https://github.com/dogsbay/dogsbay.git
|
|
23024
23365
|
|
|
23025
23366
|
Licensed under MIT; the package ships no licence file.
|
|
23026
23367
|
|
|
23027
23368
|
========================================================================
|
|
23028
|
-
@dogsbay/
|
|
23369
|
+
@dogsbay/site-files@0.2.0-beta.177 (MIT)
|
|
23029
23370
|
https://github.com/dogsbay/dogsbay.git
|
|
23030
23371
|
|
|
23031
23372
|
Licensed under MIT; the package ships no licence file.
|
|
23032
23373
|
|
|
23033
23374
|
========================================================================
|
|
23034
|
-
@dogsbay/ui@0.2.0-beta.
|
|
23375
|
+
@dogsbay/ui@0.2.0-beta.177 (MIT)
|
|
23035
23376
|
https://github.com/dogsbay/dogsbay.git
|
|
23036
23377
|
|
|
23037
23378
|
Licensed under MIT; the package ships no licence file.
|
|
@@ -27831,6 +28172,7 @@ async function composePage(p, cfg, templates) {
|
|
|
27831
28172
|
// As the Astro pipeline: turning page actions off also drops the footer link.
|
|
27832
28173
|
llmsHref: cfg.llmsTxt && cfg.pageActions.enabled && cfg.pageActions.footerLink && !p.generated ? `${p.unitRoot}llms.txt` : void 0,
|
|
27833
28174
|
poweredBy: cfg.poweredBy,
|
|
28175
|
+
linkPreviews: cfg.linkPreviews,
|
|
27834
28176
|
icons: ICONS2,
|
|
27835
28177
|
// The site chrome (plans/site-chrome.md): headerLinks, headerSocial, footerColumns, footerSocial, announcement, siteLogo, copyrightHtml.
|
|
27836
28178
|
...chromeData(p, cfg, t)
|
|
@@ -28110,6 +28452,65 @@ function applyUnlisted(nav, pages) {
|
|
|
28110
28452
|
return { slugs: marked.slugs, listed: fromItems(listedNav(marked.nav, marked.slugs, { slugOf }), marked.slugs), locate: locate3, outsideNav: marked.outsideNav, warnings: marked.warnings };
|
|
28111
28453
|
}
|
|
28112
28454
|
|
|
28455
|
+
// src/core/variable-places.ts
|
|
28456
|
+
function lineStarts2(text4) {
|
|
28457
|
+
const starts = [0];
|
|
28458
|
+
for (let i = text4.indexOf("\n"); i >= 0; i = text4.indexOf("\n", i + 1)) starts.push(i + 1);
|
|
28459
|
+
starts.push(text4.length + 1);
|
|
28460
|
+
return starts;
|
|
28461
|
+
}
|
|
28462
|
+
function lineOf(starts, at) {
|
|
28463
|
+
let lo = 0;
|
|
28464
|
+
let hi = starts.length - 2;
|
|
28465
|
+
while (lo < hi) {
|
|
28466
|
+
const mid = lo + hi + 1 >> 1;
|
|
28467
|
+
if (starts[mid] <= at) lo = mid;
|
|
28468
|
+
else hi = mid - 1;
|
|
28469
|
+
}
|
|
28470
|
+
return lo;
|
|
28471
|
+
}
|
|
28472
|
+
var lineText = (text4, starts, i) => text4.slice(starts[i], starts[i + 1] - 1);
|
|
28473
|
+
function carryVariables(variables, before, after, map) {
|
|
28474
|
+
if (before === after) return [...variables];
|
|
28475
|
+
const bs = lineStarts2(before);
|
|
28476
|
+
const as = lineStarts2(after);
|
|
28477
|
+
const to = /* @__PURE__ */ new Map();
|
|
28478
|
+
let out = 0;
|
|
28479
|
+
for (const s of map.segments) {
|
|
28480
|
+
if (s.kind === "copy") {
|
|
28481
|
+
for (let k = 0; k < s.lines; k++) if (!to.has(s.from - 1 + k)) to.set(s.from - 1 + k, { line: out + k, same: true });
|
|
28482
|
+
} else if (s.kind === "expr" && s.to - s.from + 1 === s.lines) {
|
|
28483
|
+
for (let k = 0; k < s.lines; k++) if (!to.has(s.from - 1 + k)) to.set(s.from - 1 + k, { line: out + k, same: false });
|
|
28484
|
+
}
|
|
28485
|
+
out += s.lines;
|
|
28486
|
+
}
|
|
28487
|
+
return variables.map((v) => {
|
|
28488
|
+
if (v.from === void 0 || v.to === void 0) return v;
|
|
28489
|
+
const { from: _f, to: _t, ...unplaced } = v;
|
|
28490
|
+
const line = lineOf(bs, v.from);
|
|
28491
|
+
const target = to.get(line);
|
|
28492
|
+
if (!target || target.line >= as.length - 1 || v.to > bs[line + 1] - 1) return unplaced;
|
|
28493
|
+
const col = v.from - bs[line];
|
|
28494
|
+
const len = v.to - v.from;
|
|
28495
|
+
const was = lineText(before, bs, line);
|
|
28496
|
+
const now2 = lineText(after, as, target.line);
|
|
28497
|
+
let at;
|
|
28498
|
+
if (target.same || was === now2) at = col;
|
|
28499
|
+
else {
|
|
28500
|
+
let p = 0;
|
|
28501
|
+
while (p < was.length && p < now2.length && was[p] === now2[p]) p++;
|
|
28502
|
+
let q = 0;
|
|
28503
|
+
while (q < was.length - p && q < now2.length - p && was[was.length - 1 - q] === now2[now2.length - 1 - q]) q++;
|
|
28504
|
+
if (col + len <= p) at = col;
|
|
28505
|
+
else if (col >= was.length - q) at = col + now2.length - was.length;
|
|
28506
|
+
}
|
|
28507
|
+
if (at === void 0) return unplaced;
|
|
28508
|
+
const from = as[target.line] + at;
|
|
28509
|
+
if (after.slice(from, from + len) !== v.value) return unplaced;
|
|
28510
|
+
return { ...v, from, to: from + len };
|
|
28511
|
+
});
|
|
28512
|
+
}
|
|
28513
|
+
|
|
28113
28514
|
// src/core/preprocess.ts
|
|
28114
28515
|
var HASH_SENTINEL2 = " DBMINJA_HASH_OPEN ";
|
|
28115
28516
|
var mask2 = (s) => maskMinjaInCode(s).replace(/\{#/g, `{${HASH_SENTINEL2}`);
|
|
@@ -28223,7 +28624,7 @@ async function preprocess(text4, path, attributes, files, undefinedRefs = "prese
|
|
|
28223
28624
|
warnings.push({ tag: w.tag, line: w.line, ...w.include ? { include: w.include } : {}, ...w.variable ? { variable: w.variable } : {} });
|
|
28224
28625
|
}
|
|
28225
28626
|
};
|
|
28226
|
-
const traced = loaded ? await renderWithSourceMap(mask2(text4), options) : { output: await render(mask2(text4), options), map: void 0 };
|
|
28627
|
+
const traced = loaded ? await renderWithSourceMap(mask2(text4), { ...options, markVariables: true }) : { output: await render(mask2(text4), options), map: void 0, variables: void 0 };
|
|
28227
28628
|
const unmasked = unmask2(traced.output);
|
|
28228
28629
|
const out = stripFenceMinjaMarkers(stripInlineMinjaMarkers(unmasked));
|
|
28229
28630
|
let map;
|
|
@@ -28232,7 +28633,9 @@ async function preprocess(text4, path, attributes, files, undefinedRefs = "prese
|
|
|
28232
28633
|
map = renameIncludes(inFile2, (f) => loaded.get(f)?.file ?? f);
|
|
28233
28634
|
if (out !== unmasked) map = composeTextMaps(map, diffTextMap(unmasked, out));
|
|
28234
28635
|
}
|
|
28235
|
-
|
|
28636
|
+
const printed = traced.variables?.length ? traced.variables : void 0;
|
|
28637
|
+
const variables = printed && (traced.output === out ? printed : carryVariables(printed, traced.output, out, lineForLine(traced.output, out)));
|
|
28638
|
+
return { text: out, ...warnings.length ? { warnings } : {}, ...map ? { map } : {}, ...variables?.length ? { variables } : {} };
|
|
28236
28639
|
} catch (err) {
|
|
28237
28640
|
if (budget && timeout < budget.renderMs && err instanceof RenderLimitError && budget.next() <= 0) return skip();
|
|
28238
28641
|
return { text: text4, error: err instanceof Error ? err.message : String(err) };
|
|
@@ -28240,6 +28643,12 @@ async function preprocess(text4, path, attributes, files, undefinedRefs = "prese
|
|
|
28240
28643
|
budget?.end();
|
|
28241
28644
|
}
|
|
28242
28645
|
}
|
|
28646
|
+
function lineForLine(before, after) {
|
|
28647
|
+
const a = before.split("\n");
|
|
28648
|
+
const b = after.split("\n");
|
|
28649
|
+
if (a.length !== b.length) return diffTextMap(before, after);
|
|
28650
|
+
return textMapOfLines(b.map((l, i) => l === a[i] ? i + 1 : { kind: "expr", from: i + 1, to: i + 1 }));
|
|
28651
|
+
}
|
|
28243
28652
|
function renameIncludes(map, name) {
|
|
28244
28653
|
const seg = (s) => s.kind === "include" ? { ...s, file: name(s.file), ...s.map ? { map: renameIncludes(s.map, name) } : {} } : s;
|
|
28245
28654
|
return { segments: map.segments.map(seg) };
|
|
@@ -30498,7 +30907,7 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, reads),
|
|
|
30498
30907
|
topicMaps.set(path, kept);
|
|
30499
30908
|
continue;
|
|
30500
30909
|
}
|
|
30501
|
-
const { topicMapError, topicMapNav } = await import("./topicmap-
|
|
30910
|
+
const { topicMapError, topicMapNav } = await import("./topicmap-IGUURUBF.mjs");
|
|
30502
30911
|
const reads = /* @__PURE__ */ new Map();
|
|
30503
30912
|
const projectText = async (p) => {
|
|
30504
30913
|
const c = input.files.get(p);
|
|
@@ -30925,8 +31334,8 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, reads),
|
|
|
30925
31334
|
const unlisted = applyUnlisted(nav, infos.values());
|
|
30926
31335
|
for (const w of unlisted.warnings) warn("unlisted", w.message);
|
|
30927
31336
|
const isUnlisted = (s) => unlisted.slugs.has(s);
|
|
30928
|
-
const
|
|
30929
|
-
const listedIndex =
|
|
31337
|
+
const drawn2 = unlisted.listed;
|
|
31338
|
+
const listedIndex = drawn2 === nav ? void 0 : indexNav(drawn2, { skipAliases: true });
|
|
30930
31339
|
const listedTrail = listedIndex?.trail ?? trail;
|
|
30931
31340
|
const blogIndex = cfg.blog?.path;
|
|
30932
31341
|
const replaced = blogIndex === "" ? "" : void 0;
|
|
@@ -30952,8 +31361,8 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, reads),
|
|
|
30952
31361
|
const table2 = { pages: linkTargets(pageRefs), assets: assetPaths, basePath: cfg.basePath, linkStyle: cfg.linkStyle, unitHomes: new Set(allUnits.filter((u) => u.prefix).map((u) => `${u.prefix}/index.html`)), stripPrefixes: cfg.linkPrefixes, staticFile: state.staticFile, unitPrefix: unit.prefix, localeAxes, siteFile: state.siteFile && Object.defineProperty((t2, from) => state.siteFile(t2, from), "forwards", { get: () => state.siteFile?.forwards }) };
|
|
30953
31362
|
const readingOrder = (listedIndex?.order ?? order2).filter((s) => infos.has(s) && !isUnlisted(s));
|
|
30954
31363
|
const clientNav = cfg.navMode === "client";
|
|
30955
|
-
const fullNav = cfg.navMode === "ssr-full" ? true : cfg.navMode === "client" || cfg.navMode === "hybrid" ? false : navSize(
|
|
30956
|
-
const scoper = cfg.navScope === "section" ? navScoper(
|
|
31364
|
+
const fullNav = cfg.navMode === "ssr-full" ? true : cfg.navMode === "client" || cfg.navMode === "hybrid" ? false : navSize(drawn2) <= (input.fullNavLimit ?? cfg.fullNavLimit);
|
|
31365
|
+
const scoper = cfg.navScope === "section" ? navScoper(drawn2) : void 0;
|
|
30957
31366
|
const scopeFull = /* @__PURE__ */ new Map();
|
|
30958
31367
|
const scopeOrder2 = /* @__PURE__ */ new Map();
|
|
30959
31368
|
const fullFor = (s) => {
|
|
@@ -30984,7 +31393,7 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, reads),
|
|
|
30984
31393
|
const chain = hidden ? slug === void 0 ? [] : listedTrail.get(slug) ?? [] : pageChain;
|
|
30985
31394
|
const scope = scoper?.forPage(slug);
|
|
30986
31395
|
const opts = { current: hidden ? "\0" : slug ?? "\0", href: hrefTo, client: clientNav, cache: state.navCache, ...hidden ? { markCurrent: false } : {} };
|
|
30987
|
-
if (!scope) return { nav:
|
|
31396
|
+
if (!scope) return { nav: drawn2, navOptions: { ...opts, trail: new Set(chain), full: fullNav, cacheKey: `${unit.prefix}\0${dirname(from)}` } };
|
|
30988
31397
|
return {
|
|
30989
31398
|
nav: scope.nodes,
|
|
30990
31399
|
navOptions: { ...opts, trail: new Set(slug === void 0 ? [] : scopedTrail(scope, chain, slug)), full: fullFor(scope), cacheKey: `${unit.prefix}\0${scope.key}\0${dirname(from)}` },
|
|
@@ -31144,6 +31553,7 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, reads),
|
|
|
31144
31553
|
pageLine = (l) => before(examplePageLine(r.expansions, l));
|
|
31145
31554
|
}
|
|
31146
31555
|
then(r.map);
|
|
31556
|
+
if ("variables" in pre && pre.variables) pre.variables = carryVariables(pre.variables, pre.text, r.text, r.map);
|
|
31147
31557
|
pre.text = r.text;
|
|
31148
31558
|
}
|
|
31149
31559
|
dataUnresolved.delete(info.source);
|
|
@@ -31161,6 +31571,7 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, reads),
|
|
|
31161
31571
|
if (mode.diagnostics) (diagnostics ??= []).push({ code: "data", message: detach(shown), ...line ? { line } : {} });
|
|
31162
31572
|
}
|
|
31163
31573
|
then(r.map);
|
|
31574
|
+
if ("variables" in pre && pre.variables) pre.variables = carryVariables(pre.variables, pre.text, r.text, r.map);
|
|
31164
31575
|
pre.text = r.text;
|
|
31165
31576
|
}
|
|
31166
31577
|
if (reads.size) dataReads.set(info.source, reads);
|
|
@@ -31169,13 +31580,14 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, reads),
|
|
|
31169
31580
|
t2 = now();
|
|
31170
31581
|
let tree;
|
|
31171
31582
|
let parsedOk = true;
|
|
31583
|
+
const printed = mode.dataLines && "variables" in pre ? pre.variables : void 0;
|
|
31172
31584
|
try {
|
|
31173
|
-
const parsed = trees ? { tree: await trees.tree(info.source, pre.text), diagnostics: void 0 } : dogsbayMdToTree(pre.text, mode.diagnostics || mode.dataLines ? { ...mode.diagnostics ? { diagnostics: true } : {}, ...mode.dataLines ? { sourceLines: true, sourceMap: map } : {} } : void 0);
|
|
31585
|
+
const parsed = trees ? { tree: await trees.tree(info.source, pre.text), diagnostics: void 0 } : dogsbayMdToTree(pre.text, mode.diagnostics || mode.dataLines ? { ...mode.diagnostics ? { diagnostics: true } : {}, ...mode.dataLines ? { sourceLines: true, sourceMap: map, ...printed ? { variablePlaces: printed } : {} } : {} } : void 0);
|
|
31174
31586
|
tree = parsed.tree;
|
|
31175
31587
|
if (mode.dataLines) {
|
|
31176
31588
|
assignBlockIds(tree);
|
|
31177
31589
|
const page = prefix + info.out;
|
|
31178
|
-
blockRecords.set(page, JSON.parse(JSON.stringify(await pageRecord(tree, { page, source: abs(info.source), bytes: bytesOf, hashes }))));
|
|
31590
|
+
blockRecords.set(page, JSON.parse(JSON.stringify(await pageRecord(tree, { page, source: abs(info.source), bytes: bytesOf, hashes, ...printed ? { variables: printed } : {} }))));
|
|
31179
31591
|
pageLinesOf(tree);
|
|
31180
31592
|
}
|
|
31181
31593
|
if (mode.diagnostics) (diagnostics ??= []).push(...linedDiagnostics(parsed.diagnostics ?? [], raw, bodySrc, pre.text, templated === bodySrc ? "of the page with its examples and data directives drawn" : void 0));
|
|
@@ -31314,7 +31726,7 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, reads),
|
|
|
31314
31726
|
if (hasChildLinks(tree)) {
|
|
31315
31727
|
const own2 = isUnlisted(info.slug);
|
|
31316
31728
|
const dirs = own2 ? childLinkAllDirs ??= directoryChildren([...infos.values()], (slug) => `/${slug}`) : childLinkDirs ??= directoryChildren([...infos.values()].filter((i) => !isUnlisted(i.slug)), (slug) => `/${slug}`);
|
|
31317
|
-
const items3 = own2 ? childLinkAllItems ??= childLinkNav(nav) : childLinkItems ??= childLinkNav(
|
|
31729
|
+
const items3 = own2 ? childLinkAllItems ??= childLinkNav(nav) : childLinkItems ??= childLinkNav(drawn2);
|
|
31318
31730
|
const unitPrefix = unit.prefix ? `${unit.prefix.replace(/^\/+|\/+$/g, "")}/` : "";
|
|
31319
31731
|
const r = realizeChildLinks(tree, {
|
|
31320
31732
|
nav: items3,
|
|
@@ -31574,7 +31986,7 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, reads),
|
|
|
31574
31986
|
const out = pageRefs.get(slug)?.out ?? staticNav.get(slug);
|
|
31575
31987
|
return out === void 0 ? void 0 : hrefFrom("index.html", out, cfg.linkStyle);
|
|
31576
31988
|
};
|
|
31577
|
-
await emit(prefix + "_dogsbay/nav.js", `window.__DOGSBAY_NAV__=${JSON.stringify(compactNav(
|
|
31989
|
+
await emit(prefix + "_dogsbay/nav.js", `window.__DOGSBAY_NAV__=${JSON.stringify(compactNav(drawn2, unitHref)).replace(/<\//g, "<\\/")};
|
|
31578
31990
|
`);
|
|
31579
31991
|
if (scoper) for (const sc of scoper.all()) await emit(`${prefix}_dogsbay/nav/${sc.key}.js`, `window.__DOGSBAY_NAV__=${JSON.stringify(compactNav(sc.nodes, unitHref)).replace(/<\//g, "<\\/")};
|
|
31580
31992
|
`);
|
|
@@ -31596,7 +32008,7 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, reads),
|
|
|
31596
32008
|
const llmsNav2 = (
|
|
31597
32009
|
// The order the nav sorts by (navOrder: a number, else none), not the raw keys: `order: "1"` neither
|
|
31598
32010
|
// orders the nav nor stops newest first.
|
|
31599
|
-
posts.length && postsInDateOrder({ blog: true, navFromFile: navFiles.length > 0, frontmatters: posts.map((p) => ({ order: infos.get(p.slug)?.order })) }) ? postsNewestFirst(
|
|
32011
|
+
posts.length && postsInDateOrder({ blog: true, navFromFile: navFiles.length > 0, frontmatters: posts.map((p) => ({ order: infos.get(p.slug)?.order })) }) ? postsNewestFirst(drawn2, (n) => n.slug == null ? void 0 : rank.get(n.slug)) : drawn2
|
|
31600
32012
|
);
|
|
31601
32013
|
await emit(prefix + "llms.txt", buildLlmsTxt2(cfg.name, cfg.description, llmsNav2, records, { file: "llms.txt", urls, whenToUse: cfg.llmsWhenToUse, aggregates: cfg.aggregates }));
|
|
31602
32014
|
for (const group of llmsNav2) {
|
|
@@ -32404,7 +32816,7 @@ async function readTopicMaps(root, cfg, files, exclude = []) {
|
|
|
32404
32816
|
const skip = exclude.map((p) => resolve(p));
|
|
32405
32817
|
for (const s of cfg.sources) {
|
|
32406
32818
|
if (!s.nav || !TOPIC_MAP.test(s.nav)) continue;
|
|
32407
|
-
const { topicMapNav } = await import("./topicmap-
|
|
32819
|
+
const { topicMapNav } = await import("./topicmap-IGUURUBF.mjs");
|
|
32408
32820
|
const read = async (p) => {
|
|
32409
32821
|
let c = files.get(p);
|
|
32410
32822
|
if (c === void 0) {
|