@dogsbay/ssg-cli 0.2.0-beta.175 → 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-OZUI7HDD.mjs → build-command-OG5RROLI.mjs} +3 -2
- package/chunks/{check-command-N5YTXGQD.mjs → check-command-VTCIWCWK.mjs} +4 -3
- package/chunks/{chunk-F6VRYHSY.mjs → chunk-5APY2GH6.mjs} +91 -17
- package/chunks/{chunk-5DQVEOPN.mjs → chunk-7KLVHGAF.mjs} +1166 -560
- package/chunks/chunk-KFYMG4VB.mjs +45 -0
- package/chunks/{chunk-XATDIWM5.mjs → chunk-SAXT3272.mjs} +1 -1
- package/chunks/{css-build-HPTUWTOJ.mjs → css-build-VKKTSP6P.mjs} +53 -0
- package/chunks/{dev-D3LUBY52.mjs → dev-PNLHC36G.mjs} +3 -2
- package/chunks/{publish-command-L5IGXA6G.mjs → publish-command-NAFJ7475.mjs} +3 -2
- package/chunks/{release-diff-X52KPOR4.mjs → release-diff-C4DQAUQE.mjs} +4 -3
- package/chunks/{serve-66FDB2G5.mjs → serve-WGWRM7JQ.mjs} +10 -5
- package/chunks/{topicmap-V7FYXTVQ.mjs → topicmap-IGUURUBF.mjs} +1 -1
- package/cli.mjs +11 -10
- package/package.json +2 -2
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire as __cr } from 'node:module'; const require = __cr(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
ANNOUNCEMENT_HEAD_SCRIPT,
|
|
5
|
+
COLOR_MODE_HEAD_SCRIPTS,
|
|
6
|
+
FORWARD_SCRIPT
|
|
7
|
+
} from "./chunk-KFYMG4VB.mjs";
|
|
3
8
|
import {
|
|
4
9
|
CORE_SCHEMA,
|
|
5
10
|
DEFAULT_PARSE_CACHE_BYTES,
|
|
@@ -21,7 +26,7 @@ import {
|
|
|
21
26
|
rootPrefix,
|
|
22
27
|
splitHref,
|
|
23
28
|
variableRe
|
|
24
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-5APY2GH6.mjs";
|
|
25
30
|
import {
|
|
26
31
|
collapseLines,
|
|
27
32
|
parseLineRanges,
|
|
@@ -635,76 +640,76 @@ var require_decode = __commonJS({
|
|
|
635
640
|
this.excess = 1;
|
|
636
641
|
this.consumed = 1;
|
|
637
642
|
};
|
|
638
|
-
EntityDecoder4.prototype.write = function(
|
|
643
|
+
EntityDecoder4.prototype.write = function(str8, offset) {
|
|
639
644
|
switch (this.state) {
|
|
640
645
|
case EntityDecoderState3.EntityStart: {
|
|
641
|
-
if (
|
|
646
|
+
if (str8.charCodeAt(offset) === CharCodes4.NUM) {
|
|
642
647
|
this.state = EntityDecoderState3.NumericStart;
|
|
643
648
|
this.consumed += 1;
|
|
644
|
-
return this.stateNumericStart(
|
|
649
|
+
return this.stateNumericStart(str8, offset + 1);
|
|
645
650
|
}
|
|
646
651
|
this.state = EntityDecoderState3.NamedEntity;
|
|
647
|
-
return this.stateNamedEntity(
|
|
652
|
+
return this.stateNamedEntity(str8, offset);
|
|
648
653
|
}
|
|
649
654
|
case EntityDecoderState3.NumericStart: {
|
|
650
|
-
return this.stateNumericStart(
|
|
655
|
+
return this.stateNumericStart(str8, offset);
|
|
651
656
|
}
|
|
652
657
|
case EntityDecoderState3.NumericDecimal: {
|
|
653
|
-
return this.stateNumericDecimal(
|
|
658
|
+
return this.stateNumericDecimal(str8, offset);
|
|
654
659
|
}
|
|
655
660
|
case EntityDecoderState3.NumericHex: {
|
|
656
|
-
return this.stateNumericHex(
|
|
661
|
+
return this.stateNumericHex(str8, offset);
|
|
657
662
|
}
|
|
658
663
|
case EntityDecoderState3.NamedEntity: {
|
|
659
|
-
return this.stateNamedEntity(
|
|
664
|
+
return this.stateNamedEntity(str8, offset);
|
|
660
665
|
}
|
|
661
666
|
}
|
|
662
667
|
};
|
|
663
|
-
EntityDecoder4.prototype.stateNumericStart = function(
|
|
664
|
-
if (offset >=
|
|
668
|
+
EntityDecoder4.prototype.stateNumericStart = function(str8, offset) {
|
|
669
|
+
if (offset >= str8.length) {
|
|
665
670
|
return -1;
|
|
666
671
|
}
|
|
667
|
-
if ((
|
|
672
|
+
if ((str8.charCodeAt(offset) | TO_LOWER_BIT3) === CharCodes4.LOWER_X) {
|
|
668
673
|
this.state = EntityDecoderState3.NumericHex;
|
|
669
674
|
this.consumed += 1;
|
|
670
|
-
return this.stateNumericHex(
|
|
675
|
+
return this.stateNumericHex(str8, offset + 1);
|
|
671
676
|
}
|
|
672
677
|
this.state = EntityDecoderState3.NumericDecimal;
|
|
673
|
-
return this.stateNumericDecimal(
|
|
678
|
+
return this.stateNumericDecimal(str8, offset);
|
|
674
679
|
};
|
|
675
|
-
EntityDecoder4.prototype.addToNumericResult = function(
|
|
680
|
+
EntityDecoder4.prototype.addToNumericResult = function(str8, start, end, base) {
|
|
676
681
|
if (start !== end) {
|
|
677
682
|
var digitCount = end - start;
|
|
678
|
-
this.result = this.result * Math.pow(base, digitCount) + parseInt(
|
|
683
|
+
this.result = this.result * Math.pow(base, digitCount) + parseInt(str8.substr(start, digitCount), base);
|
|
679
684
|
this.consumed += digitCount;
|
|
680
685
|
}
|
|
681
686
|
};
|
|
682
|
-
EntityDecoder4.prototype.stateNumericHex = function(
|
|
687
|
+
EntityDecoder4.prototype.stateNumericHex = function(str8, offset) {
|
|
683
688
|
var startIdx = offset;
|
|
684
|
-
while (offset <
|
|
685
|
-
var char =
|
|
689
|
+
while (offset < str8.length) {
|
|
690
|
+
var char = str8.charCodeAt(offset);
|
|
686
691
|
if (isNumber3(char) || isHexadecimalCharacter3(char)) {
|
|
687
692
|
offset += 1;
|
|
688
693
|
} else {
|
|
689
|
-
this.addToNumericResult(
|
|
694
|
+
this.addToNumericResult(str8, startIdx, offset, 16);
|
|
690
695
|
return this.emitNumericEntity(char, 3);
|
|
691
696
|
}
|
|
692
697
|
}
|
|
693
|
-
this.addToNumericResult(
|
|
698
|
+
this.addToNumericResult(str8, startIdx, offset, 16);
|
|
694
699
|
return -1;
|
|
695
700
|
};
|
|
696
|
-
EntityDecoder4.prototype.stateNumericDecimal = function(
|
|
701
|
+
EntityDecoder4.prototype.stateNumericDecimal = function(str8, offset) {
|
|
697
702
|
var startIdx = offset;
|
|
698
|
-
while (offset <
|
|
699
|
-
var char =
|
|
703
|
+
while (offset < str8.length) {
|
|
704
|
+
var char = str8.charCodeAt(offset);
|
|
700
705
|
if (isNumber3(char)) {
|
|
701
706
|
offset += 1;
|
|
702
707
|
} else {
|
|
703
|
-
this.addToNumericResult(
|
|
708
|
+
this.addToNumericResult(str8, startIdx, offset, 10);
|
|
704
709
|
return this.emitNumericEntity(char, 2);
|
|
705
710
|
}
|
|
706
711
|
}
|
|
707
|
-
this.addToNumericResult(
|
|
712
|
+
this.addToNumericResult(str8, startIdx, offset, 10);
|
|
708
713
|
return -1;
|
|
709
714
|
};
|
|
710
715
|
EntityDecoder4.prototype.emitNumericEntity = function(lastCp, expectedLength) {
|
|
@@ -727,12 +732,12 @@ var require_decode = __commonJS({
|
|
|
727
732
|
}
|
|
728
733
|
return this.consumed;
|
|
729
734
|
};
|
|
730
|
-
EntityDecoder4.prototype.stateNamedEntity = function(
|
|
735
|
+
EntityDecoder4.prototype.stateNamedEntity = function(str8, offset) {
|
|
731
736
|
var decodeTree = this.decodeTree;
|
|
732
737
|
var current = decodeTree[this.treeIndex];
|
|
733
738
|
var valueLength = (current & BinTrieFlags3.VALUE_LENGTH) >> 14;
|
|
734
|
-
for (; offset <
|
|
735
|
-
var char =
|
|
739
|
+
for (; offset < str8.length; offset++, this.excess++) {
|
|
740
|
+
var char = str8.charCodeAt(offset);
|
|
736
741
|
this.treeIndex = determineBranch3(decodeTree, current, this.treeIndex + Math.max(1, valueLength), char);
|
|
737
742
|
if (this.treeIndex < 0) {
|
|
738
743
|
return this.result === 0 || // If we are parsing an attribute
|
|
@@ -799,17 +804,17 @@ var require_decode = __commonJS({
|
|
|
799
804
|
exports.EntityDecoder = EntityDecoder3;
|
|
800
805
|
function getDecoder2(decodeTree) {
|
|
801
806
|
var ret = "";
|
|
802
|
-
var decoder2 = new EntityDecoder3(decodeTree, function(
|
|
803
|
-
return ret += (0, decode_codepoint_js_1.fromCodePoint)(
|
|
807
|
+
var decoder2 = new EntityDecoder3(decodeTree, function(str8) {
|
|
808
|
+
return ret += (0, decode_codepoint_js_1.fromCodePoint)(str8);
|
|
804
809
|
});
|
|
805
|
-
return function decodeWithTrie(
|
|
810
|
+
return function decodeWithTrie(str8, decodeMode) {
|
|
806
811
|
var lastIndex = 0;
|
|
807
812
|
var offset = 0;
|
|
808
|
-
while ((offset =
|
|
809
|
-
ret +=
|
|
813
|
+
while ((offset = str8.indexOf("&", offset)) >= 0) {
|
|
814
|
+
ret += str8.slice(lastIndex, offset);
|
|
810
815
|
decoder2.startEntity(decodeMode);
|
|
811
816
|
var len = decoder2.write(
|
|
812
|
-
|
|
817
|
+
str8,
|
|
813
818
|
// Skip the "&"
|
|
814
819
|
offset + 1
|
|
815
820
|
);
|
|
@@ -820,7 +825,7 @@ var require_decode = __commonJS({
|
|
|
820
825
|
lastIndex = offset + len;
|
|
821
826
|
offset = len === 0 ? lastIndex + 1 : lastIndex;
|
|
822
827
|
}
|
|
823
|
-
var result = ret +
|
|
828
|
+
var result = ret + str8.slice(lastIndex);
|
|
824
829
|
ret = "";
|
|
825
830
|
return result;
|
|
826
831
|
};
|
|
@@ -853,23 +858,23 @@ var require_decode = __commonJS({
|
|
|
853
858
|
exports.determineBranch = determineBranch3;
|
|
854
859
|
var htmlDecoder2 = getDecoder2(decode_data_html_js_1.default);
|
|
855
860
|
var xmlDecoder2 = getDecoder2(decode_data_xml_js_1.default);
|
|
856
|
-
function decodeHTML2(
|
|
861
|
+
function decodeHTML2(str8, mode) {
|
|
857
862
|
if (mode === void 0) {
|
|
858
863
|
mode = DecodingMode3.Legacy;
|
|
859
864
|
}
|
|
860
|
-
return htmlDecoder2(
|
|
865
|
+
return htmlDecoder2(str8, mode);
|
|
861
866
|
}
|
|
862
867
|
exports.decodeHTML = decodeHTML2;
|
|
863
|
-
function decodeHTMLAttribute2(
|
|
864
|
-
return htmlDecoder2(
|
|
868
|
+
function decodeHTMLAttribute2(str8) {
|
|
869
|
+
return htmlDecoder2(str8, DecodingMode3.Attribute);
|
|
865
870
|
}
|
|
866
871
|
exports.decodeHTMLAttribute = decodeHTMLAttribute2;
|
|
867
|
-
function decodeHTMLStrict2(
|
|
868
|
-
return htmlDecoder2(
|
|
872
|
+
function decodeHTMLStrict2(str8) {
|
|
873
|
+
return htmlDecoder2(str8, DecodingMode3.Strict);
|
|
869
874
|
}
|
|
870
875
|
exports.decodeHTMLStrict = decodeHTMLStrict2;
|
|
871
|
-
function decodeXML2(
|
|
872
|
-
return xmlDecoder2(
|
|
876
|
+
function decodeXML2(str8) {
|
|
877
|
+
return xmlDecoder2(str8, DecodingMode3.Strict);
|
|
873
878
|
}
|
|
874
879
|
exports.decodeXML = decodeXML2;
|
|
875
880
|
}
|
|
@@ -905,31 +910,31 @@ var require_escape = __commonJS({
|
|
|
905
910
|
[62, ">"]
|
|
906
911
|
]);
|
|
907
912
|
exports.getCodePoint = // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
908
|
-
String.prototype.codePointAt != null ? function(
|
|
909
|
-
return
|
|
913
|
+
String.prototype.codePointAt != null ? function(str8, index) {
|
|
914
|
+
return str8.codePointAt(index);
|
|
910
915
|
} : (
|
|
911
916
|
// http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae
|
|
912
917
|
function(c, index) {
|
|
913
918
|
return (c.charCodeAt(index) & 64512) === 55296 ? (c.charCodeAt(index) - 55296) * 1024 + c.charCodeAt(index + 1) - 56320 + 65536 : c.charCodeAt(index);
|
|
914
919
|
}
|
|
915
920
|
);
|
|
916
|
-
function encodeXML2(
|
|
921
|
+
function encodeXML2(str8) {
|
|
917
922
|
var ret = "";
|
|
918
923
|
var lastIdx = 0;
|
|
919
924
|
var match;
|
|
920
|
-
while ((match = exports.xmlReplacer.exec(
|
|
925
|
+
while ((match = exports.xmlReplacer.exec(str8)) !== null) {
|
|
921
926
|
var i = match.index;
|
|
922
|
-
var char =
|
|
927
|
+
var char = str8.charCodeAt(i);
|
|
923
928
|
var next = xmlCodeMap2.get(char);
|
|
924
929
|
if (next !== void 0) {
|
|
925
|
-
ret +=
|
|
930
|
+
ret += str8.substring(lastIdx, i) + next;
|
|
926
931
|
lastIdx = i + 1;
|
|
927
932
|
} else {
|
|
928
|
-
ret += "".concat(
|
|
933
|
+
ret += "".concat(str8.substring(lastIdx, i), "&#x").concat((0, exports.getCodePoint)(str8, i).toString(16), ";");
|
|
929
934
|
lastIdx = exports.xmlReplacer.lastIndex += Number((char & 64512) === 55296);
|
|
930
935
|
}
|
|
931
936
|
}
|
|
932
|
-
return ret +
|
|
937
|
+
return ret + str8.substr(lastIdx);
|
|
933
938
|
}
|
|
934
939
|
exports.encodeXML = encodeXML2;
|
|
935
940
|
exports.escape = encodeXML2;
|
|
@@ -983,18 +988,18 @@ var require_encode = __commonJS({
|
|
|
983
988
|
return encodeHTMLTrieRe(escape_js_1.xmlReplacer, data);
|
|
984
989
|
}
|
|
985
990
|
exports.encodeNonAsciiHTML = encodeNonAsciiHTML2;
|
|
986
|
-
function encodeHTMLTrieRe(regExp,
|
|
991
|
+
function encodeHTMLTrieRe(regExp, str8) {
|
|
987
992
|
var ret = "";
|
|
988
993
|
var lastIdx = 0;
|
|
989
994
|
var match;
|
|
990
|
-
while ((match = regExp.exec(
|
|
995
|
+
while ((match = regExp.exec(str8)) !== null) {
|
|
991
996
|
var i = match.index;
|
|
992
|
-
ret +=
|
|
993
|
-
var char =
|
|
997
|
+
ret += str8.substring(lastIdx, i);
|
|
998
|
+
var char = str8.charCodeAt(i);
|
|
994
999
|
var next = encode_html_js_1.default.get(char);
|
|
995
1000
|
if (typeof next === "object") {
|
|
996
|
-
if (i + 1 <
|
|
997
|
-
var nextChar =
|
|
1001
|
+
if (i + 1 < str8.length) {
|
|
1002
|
+
var nextChar = str8.charCodeAt(i + 1);
|
|
998
1003
|
var value = typeof next.n === "number" ? next.n === nextChar ? next.o : void 0 : next.n.get(nextChar);
|
|
999
1004
|
if (value !== void 0) {
|
|
1000
1005
|
ret += value;
|
|
@@ -1008,12 +1013,12 @@ var require_encode = __commonJS({
|
|
|
1008
1013
|
ret += next;
|
|
1009
1014
|
lastIdx = i + 1;
|
|
1010
1015
|
} else {
|
|
1011
|
-
var cp = (0, escape_js_1.getCodePoint)(
|
|
1016
|
+
var cp = (0, escape_js_1.getCodePoint)(str8, i);
|
|
1012
1017
|
ret += "&#x".concat(cp.toString(16), ";");
|
|
1013
1018
|
lastIdx = regExp.lastIndex += Number(cp !== char);
|
|
1014
1019
|
}
|
|
1015
1020
|
}
|
|
1016
|
-
return ret +
|
|
1021
|
+
return ret + str8.substr(lastIdx);
|
|
1017
1022
|
}
|
|
1018
1023
|
}
|
|
1019
1024
|
});
|
|
@@ -1220,8 +1225,8 @@ var require_index_cjs3 = __commonJS({
|
|
|
1220
1225
|
function isFunction(obj) {
|
|
1221
1226
|
return _class(obj) === "[object Function]";
|
|
1222
1227
|
}
|
|
1223
|
-
function escapeRE(
|
|
1224
|
-
return
|
|
1228
|
+
function escapeRE(str8) {
|
|
1229
|
+
return str8.replace(/[.?*+^$[\]\\(){}|-]/g, "\\$&");
|
|
1225
1230
|
}
|
|
1226
1231
|
var defaultOptions = {
|
|
1227
1232
|
fuzzyLink: true,
|
|
@@ -1698,13 +1703,13 @@ var require_index_cjs4 = __commonJS({
|
|
|
1698
1703
|
if (decoded !== match) return decoded;
|
|
1699
1704
|
return match;
|
|
1700
1705
|
}
|
|
1701
|
-
function unescapeMd(
|
|
1702
|
-
if (
|
|
1703
|
-
return
|
|
1706
|
+
function unescapeMd(str8) {
|
|
1707
|
+
if (str8.indexOf("\\") < 0) return str8;
|
|
1708
|
+
return str8.replace(UNESCAPE_MD_RE, "$1");
|
|
1704
1709
|
}
|
|
1705
|
-
function unescapeAll(
|
|
1706
|
-
if (
|
|
1707
|
-
return
|
|
1710
|
+
function unescapeAll(str8) {
|
|
1711
|
+
if (str8.indexOf("\\") < 0 && str8.indexOf("&") < 0) return str8;
|
|
1712
|
+
return str8.replace(UNESCAPE_ALL_RE, function(match, escaped, entity2) {
|
|
1708
1713
|
if (escaped) return escaped;
|
|
1709
1714
|
return replaceEntityPattern(match, entity2);
|
|
1710
1715
|
});
|
|
@@ -1720,13 +1725,13 @@ var require_index_cjs4 = __commonJS({
|
|
|
1720
1725
|
function replaceUnsafeChar(ch) {
|
|
1721
1726
|
return HTML_REPLACEMENTS[ch];
|
|
1722
1727
|
}
|
|
1723
|
-
function escapeHtml3(
|
|
1724
|
-
if (HTML_ESCAPE_TEST_RE.test(
|
|
1725
|
-
return
|
|
1728
|
+
function escapeHtml3(str8) {
|
|
1729
|
+
if (HTML_ESCAPE_TEST_RE.test(str8)) return str8.replace(HTML_ESCAPE_REPLACE_RE, replaceUnsafeChar);
|
|
1730
|
+
return str8;
|
|
1726
1731
|
}
|
|
1727
1732
|
var REGEXP_ESCAPE_RE = /[.?*+^$[\]\\(){}|-]/g;
|
|
1728
|
-
function escapeRE(
|
|
1729
|
-
return
|
|
1733
|
+
function escapeRE(str8) {
|
|
1734
|
+
return str8.replace(REGEXP_ESCAPE_RE, "\\$&");
|
|
1730
1735
|
}
|
|
1731
1736
|
function isSpace(code2) {
|
|
1732
1737
|
switch (code2) {
|
|
@@ -1799,21 +1804,21 @@ var require_index_cjs4 = __commonJS({
|
|
|
1799
1804
|
return false;
|
|
1800
1805
|
}
|
|
1801
1806
|
}
|
|
1802
|
-
function normalizeReference(
|
|
1803
|
-
|
|
1807
|
+
function normalizeReference(str8) {
|
|
1808
|
+
str8 = str8.trim().replace(/\s+/g, " ");
|
|
1804
1809
|
if ("\u1E9E".toLowerCase() === "\u1E7E")
|
|
1805
|
-
|
|
1806
|
-
return
|
|
1810
|
+
str8 = str8.replace(/ẞ/g, "\xDF");
|
|
1811
|
+
return str8.toLowerCase().toUpperCase();
|
|
1807
1812
|
}
|
|
1808
1813
|
function isAsciiTrimmable(c) {
|
|
1809
1814
|
return c === 32 || c === 9 || c === 10 || c === 13;
|
|
1810
1815
|
}
|
|
1811
|
-
function asciiTrim(
|
|
1816
|
+
function asciiTrim(str8) {
|
|
1812
1817
|
let start = 0;
|
|
1813
|
-
for (; start <
|
|
1814
|
-
let end =
|
|
1815
|
-
for (; end >= start; end--) if (!isAsciiTrimmable(
|
|
1816
|
-
return
|
|
1818
|
+
for (; start < str8.length; start++) if (!isAsciiTrimmable(str8.charCodeAt(start))) break;
|
|
1819
|
+
let end = str8.length - 1;
|
|
1820
|
+
for (; end >= start; end--) if (!isAsciiTrimmable(str8.charCodeAt(end))) break;
|
|
1821
|
+
return str8.slice(start, end + 1);
|
|
1817
1822
|
}
|
|
1818
1823
|
var lib = {
|
|
1819
1824
|
mdurl,
|
|
@@ -1849,7 +1854,7 @@ var require_index_cjs4 = __commonJS({
|
|
|
1849
1854
|
state.pos = oldPos;
|
|
1850
1855
|
return labelEnd;
|
|
1851
1856
|
}
|
|
1852
|
-
function parseLinkDestination(
|
|
1857
|
+
function parseLinkDestination(str8, start, max) {
|
|
1853
1858
|
let code2;
|
|
1854
1859
|
let pos = start;
|
|
1855
1860
|
const result = {
|
|
@@ -1857,15 +1862,15 @@ var require_index_cjs4 = __commonJS({
|
|
|
1857
1862
|
pos: 0,
|
|
1858
1863
|
str: ""
|
|
1859
1864
|
};
|
|
1860
|
-
if (
|
|
1865
|
+
if (str8.charCodeAt(pos) === 60) {
|
|
1861
1866
|
pos++;
|
|
1862
1867
|
while (pos < max) {
|
|
1863
|
-
code2 =
|
|
1868
|
+
code2 = str8.charCodeAt(pos);
|
|
1864
1869
|
if (code2 === 10) return result;
|
|
1865
1870
|
if (code2 === 60) return result;
|
|
1866
1871
|
if (code2 === 62) {
|
|
1867
1872
|
result.pos = pos + 1;
|
|
1868
|
-
result.str = unescapeAll(
|
|
1873
|
+
result.str = unescapeAll(str8.slice(start + 1, pos));
|
|
1869
1874
|
result.ok = true;
|
|
1870
1875
|
return result;
|
|
1871
1876
|
}
|
|
@@ -1879,11 +1884,11 @@ var require_index_cjs4 = __commonJS({
|
|
|
1879
1884
|
}
|
|
1880
1885
|
let level = 0;
|
|
1881
1886
|
while (pos < max) {
|
|
1882
|
-
code2 =
|
|
1887
|
+
code2 = str8.charCodeAt(pos);
|
|
1883
1888
|
if (code2 === 32) break;
|
|
1884
1889
|
if (code2 < 32 || code2 === 127) break;
|
|
1885
1890
|
if (code2 === 92 && pos + 1 < max) {
|
|
1886
|
-
if (
|
|
1891
|
+
if (str8.charCodeAt(pos + 1) === 32) {
|
|
1887
1892
|
pos++;
|
|
1888
1893
|
continue;
|
|
1889
1894
|
}
|
|
@@ -1902,12 +1907,12 @@ var require_index_cjs4 = __commonJS({
|
|
|
1902
1907
|
}
|
|
1903
1908
|
if (start === pos) return result;
|
|
1904
1909
|
if (level !== 0) return result;
|
|
1905
|
-
result.str = unescapeAll(
|
|
1910
|
+
result.str = unescapeAll(str8.slice(start, pos));
|
|
1906
1911
|
result.pos = pos;
|
|
1907
1912
|
result.ok = true;
|
|
1908
1913
|
return result;
|
|
1909
1914
|
}
|
|
1910
|
-
function parseLinkTitle(
|
|
1915
|
+
function parseLinkTitle(str8, start, max, prev_state) {
|
|
1911
1916
|
let code2;
|
|
1912
1917
|
let pos = start;
|
|
1913
1918
|
const state = {
|
|
@@ -1922,7 +1927,7 @@ var require_index_cjs4 = __commonJS({
|
|
|
1922
1927
|
state.marker = prev_state.marker;
|
|
1923
1928
|
} else {
|
|
1924
1929
|
if (pos >= max) return state;
|
|
1925
|
-
let marker =
|
|
1930
|
+
let marker = str8.charCodeAt(pos);
|
|
1926
1931
|
if (marker !== 34 && marker !== 39 && marker !== 40) return state;
|
|
1927
1932
|
start++;
|
|
1928
1933
|
pos++;
|
|
@@ -1930,10 +1935,10 @@ var require_index_cjs4 = __commonJS({
|
|
|
1930
1935
|
state.marker = marker;
|
|
1931
1936
|
}
|
|
1932
1937
|
while (pos < max) {
|
|
1933
|
-
code2 =
|
|
1938
|
+
code2 = str8.charCodeAt(pos);
|
|
1934
1939
|
if (code2 === state.marker) {
|
|
1935
1940
|
state.pos = pos + 1;
|
|
1936
|
-
state.str += unescapeAll(
|
|
1941
|
+
state.str += unescapeAll(str8.slice(start, pos));
|
|
1937
1942
|
state.ok = true;
|
|
1938
1943
|
return state;
|
|
1939
1944
|
} else if (code2 === 40 && state.marker === 41) return state;
|
|
@@ -1941,7 +1946,7 @@ var require_index_cjs4 = __commonJS({
|
|
|
1941
1946
|
pos++;
|
|
1942
1947
|
}
|
|
1943
1948
|
state.can_continue = true;
|
|
1944
|
-
state.str += unescapeAll(
|
|
1949
|
+
state.str += unescapeAll(str8.slice(start, pos));
|
|
1945
1950
|
return state;
|
|
1946
1951
|
}
|
|
1947
1952
|
var helpers_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -2244,10 +2249,10 @@ var require_index_cjs4 = __commonJS({
|
|
|
2244
2249
|
var NEWLINES_RE = /\r\n?|\n/g;
|
|
2245
2250
|
var NULL_RE = /\0/g;
|
|
2246
2251
|
function normalize3(state) {
|
|
2247
|
-
let
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
state.src =
|
|
2252
|
+
let str8;
|
|
2253
|
+
str8 = state.src.replace(NEWLINES_RE, "\n");
|
|
2254
|
+
str8 = str8.replace(NULL_RE, "\uFFFD");
|
|
2255
|
+
state.src = str8;
|
|
2251
2256
|
}
|
|
2252
2257
|
function block2(state) {
|
|
2253
2258
|
let token;
|
|
@@ -2266,11 +2271,11 @@ var require_index_cjs4 = __commonJS({
|
|
|
2266
2271
|
if (tok.type === "inline") state.md.inline.parse(tok.content, state.md, state.env, tok.children);
|
|
2267
2272
|
}
|
|
2268
2273
|
}
|
|
2269
|
-
function isLinkOpen$1(
|
|
2270
|
-
return /^<a[>\s]/i.test(
|
|
2274
|
+
function isLinkOpen$1(str8) {
|
|
2275
|
+
return /^<a[>\s]/i.test(str8);
|
|
2271
2276
|
}
|
|
2272
|
-
function isLinkClose$1(
|
|
2273
|
-
return /^<\/a\s*>/i.test(
|
|
2277
|
+
function isLinkClose$1(str8) {
|
|
2278
|
+
return /^<\/a\s*>/i.test(str8);
|
|
2274
2279
|
}
|
|
2275
2280
|
function linkify$1(state) {
|
|
2276
2281
|
const blockTokens = state.tokens;
|
|
@@ -2419,16 +2424,16 @@ var require_index_cjs4 = __commonJS({
|
|
|
2419
2424
|
ch
|
|
2420
2425
|
});
|
|
2421
2426
|
}
|
|
2422
|
-
function applyReplacements(
|
|
2427
|
+
function applyReplacements(str8, replacements) {
|
|
2423
2428
|
let result = "";
|
|
2424
2429
|
let lastPos = 0;
|
|
2425
2430
|
replacements.sort((a, b) => a.pos - b.pos);
|
|
2426
2431
|
for (let i = 0; i < replacements.length; i++) {
|
|
2427
2432
|
const replacement = replacements[i];
|
|
2428
|
-
result +=
|
|
2433
|
+
result += str8.slice(lastPos, replacement.pos) + replacement.ch;
|
|
2429
2434
|
lastPos = replacement.pos + 1;
|
|
2430
2435
|
}
|
|
2431
|
-
return result +
|
|
2436
|
+
return result + str8.slice(lastPos);
|
|
2432
2437
|
}
|
|
2433
2438
|
function process_inlines(tokens, state) {
|
|
2434
2439
|
let j;
|
|
@@ -2684,28 +2689,28 @@ var require_index_cjs4 = __commonJS({
|
|
|
2684
2689
|
const max = state.eMarks[line];
|
|
2685
2690
|
return state.src.slice(pos, max);
|
|
2686
2691
|
}
|
|
2687
|
-
function escapedSplit(
|
|
2692
|
+
function escapedSplit(str8) {
|
|
2688
2693
|
const result = [];
|
|
2689
|
-
const max =
|
|
2694
|
+
const max = str8.length;
|
|
2690
2695
|
let pos = 0;
|
|
2691
|
-
let ch =
|
|
2696
|
+
let ch = str8.charCodeAt(pos);
|
|
2692
2697
|
let isEscaped = false;
|
|
2693
2698
|
let lastPos = 0;
|
|
2694
2699
|
let current = "";
|
|
2695
2700
|
while (pos < max) {
|
|
2696
2701
|
if (ch === 124) if (!isEscaped) {
|
|
2697
|
-
result.push(current +
|
|
2702
|
+
result.push(current + str8.substring(lastPos, pos));
|
|
2698
2703
|
current = "";
|
|
2699
2704
|
lastPos = pos + 1;
|
|
2700
2705
|
} else {
|
|
2701
|
-
current +=
|
|
2706
|
+
current += str8.substring(lastPos, pos - 1);
|
|
2702
2707
|
lastPos = pos;
|
|
2703
2708
|
}
|
|
2704
2709
|
isEscaped = ch === 92;
|
|
2705
2710
|
pos++;
|
|
2706
|
-
ch =
|
|
2711
|
+
ch = str8.charCodeAt(pos);
|
|
2707
2712
|
}
|
|
2708
|
-
result.push(current +
|
|
2713
|
+
result.push(current + str8.substring(lastPos));
|
|
2709
2714
|
return result;
|
|
2710
2715
|
}
|
|
2711
2716
|
function table2(state, startLine, endLine, silent) {
|
|
@@ -2726,8 +2731,8 @@ var require_index_cjs4 = __commonJS({
|
|
|
2726
2731
|
if (ch !== 124 && ch !== 45 && ch !== 58 && !isSpace(ch)) return false;
|
|
2727
2732
|
pos++;
|
|
2728
2733
|
}
|
|
2729
|
-
let
|
|
2730
|
-
let columns =
|
|
2734
|
+
let lineText2 = getLine(state, startLine + 1);
|
|
2735
|
+
let columns = lineText2.split("|");
|
|
2731
2736
|
const aligns = [];
|
|
2732
2737
|
for (let i = 0; i < columns.length; i++) {
|
|
2733
2738
|
const t = columns[i].trim();
|
|
@@ -2738,10 +2743,10 @@ var require_index_cjs4 = __commonJS({
|
|
|
2738
2743
|
else if (t.charCodeAt(0) === 58) aligns.push("left");
|
|
2739
2744
|
else aligns.push("");
|
|
2740
2745
|
}
|
|
2741
|
-
|
|
2742
|
-
if (
|
|
2746
|
+
lineText2 = getLine(state, startLine).trim();
|
|
2747
|
+
if (lineText2.indexOf("|") === -1) return false;
|
|
2743
2748
|
if (state.sCount[startLine] - state.blkIndent >= 4) return false;
|
|
2744
|
-
columns = escapedSplit(
|
|
2749
|
+
columns = escapedSplit(lineText2);
|
|
2745
2750
|
if (columns.length && columns[0] === "") columns.shift();
|
|
2746
2751
|
if (columns.length && columns[columns.length - 1] === "") columns.pop();
|
|
2747
2752
|
const columnCount = columns.length;
|
|
@@ -2777,10 +2782,10 @@ var require_index_cjs4 = __commonJS({
|
|
|
2777
2782
|
break;
|
|
2778
2783
|
}
|
|
2779
2784
|
if (terminate) break;
|
|
2780
|
-
|
|
2781
|
-
if (!
|
|
2785
|
+
lineText2 = getLine(state, nextLine).trim();
|
|
2786
|
+
if (!lineText2) break;
|
|
2782
2787
|
if (state.sCount[nextLine] - state.blkIndent >= 4) break;
|
|
2783
|
-
columns = escapedSplit(
|
|
2788
|
+
columns = escapedSplit(lineText2);
|
|
2784
2789
|
if (columns.length && columns[0] === "") columns.shift();
|
|
2785
2790
|
if (columns.length && columns[columns.length - 1] === "") columns.pop();
|
|
2786
2791
|
autocompletedCells += columnCount - columns.length;
|
|
@@ -3176,11 +3181,11 @@ var require_index_cjs4 = __commonJS({
|
|
|
3176
3181
|
const max2 = state.eMarks[nextLine2];
|
|
3177
3182
|
return state.src.slice(pos2, max2 + 1);
|
|
3178
3183
|
}
|
|
3179
|
-
let
|
|
3180
|
-
max =
|
|
3184
|
+
let str8 = state.src.slice(pos, max + 1);
|
|
3185
|
+
max = str8.length;
|
|
3181
3186
|
let labelEnd = -1;
|
|
3182
3187
|
for (pos = 1; pos < max; pos++) {
|
|
3183
|
-
const ch =
|
|
3188
|
+
const ch = str8.charCodeAt(pos);
|
|
3184
3189
|
if (ch === 91) return false;
|
|
3185
3190
|
else if (ch === 93) {
|
|
3186
3191
|
labelEnd = pos;
|
|
@@ -3188,36 +3193,36 @@ var require_index_cjs4 = __commonJS({
|
|
|
3188
3193
|
} else if (ch === 10) {
|
|
3189
3194
|
const lineContent = getNextLine(nextLine);
|
|
3190
3195
|
if (lineContent !== null) {
|
|
3191
|
-
|
|
3192
|
-
max =
|
|
3196
|
+
str8 += lineContent;
|
|
3197
|
+
max = str8.length;
|
|
3193
3198
|
nextLine++;
|
|
3194
3199
|
}
|
|
3195
3200
|
} else if (ch === 92) {
|
|
3196
3201
|
pos++;
|
|
3197
|
-
if (pos < max &&
|
|
3202
|
+
if (pos < max && str8.charCodeAt(pos) === 10) {
|
|
3198
3203
|
const lineContent = getNextLine(nextLine);
|
|
3199
3204
|
if (lineContent !== null) {
|
|
3200
|
-
|
|
3201
|
-
max =
|
|
3205
|
+
str8 += lineContent;
|
|
3206
|
+
max = str8.length;
|
|
3202
3207
|
nextLine++;
|
|
3203
3208
|
}
|
|
3204
3209
|
}
|
|
3205
3210
|
}
|
|
3206
3211
|
}
|
|
3207
|
-
if (labelEnd < 0 ||
|
|
3212
|
+
if (labelEnd < 0 || str8.charCodeAt(labelEnd + 1) !== 58) return false;
|
|
3208
3213
|
for (pos = labelEnd + 2; pos < max; pos++) {
|
|
3209
|
-
const ch =
|
|
3214
|
+
const ch = str8.charCodeAt(pos);
|
|
3210
3215
|
if (ch === 10) {
|
|
3211
3216
|
const lineContent = getNextLine(nextLine);
|
|
3212
3217
|
if (lineContent !== null) {
|
|
3213
|
-
|
|
3214
|
-
max =
|
|
3218
|
+
str8 += lineContent;
|
|
3219
|
+
max = str8.length;
|
|
3215
3220
|
nextLine++;
|
|
3216
3221
|
}
|
|
3217
3222
|
} else if (isSpace(ch)) {
|
|
3218
3223
|
} else break;
|
|
3219
3224
|
}
|
|
3220
|
-
const destRes = state.md.helpers.parseLinkDestination(
|
|
3225
|
+
const destRes = state.md.helpers.parseLinkDestination(str8, pos, max);
|
|
3221
3226
|
if (!destRes.ok) return false;
|
|
3222
3227
|
const href = state.md.normalizeLink(destRes.str);
|
|
3223
3228
|
if (!state.md.validateLink(href)) return false;
|
|
@@ -3226,26 +3231,26 @@ var require_index_cjs4 = __commonJS({
|
|
|
3226
3231
|
const destEndLineNo = nextLine;
|
|
3227
3232
|
const start = pos;
|
|
3228
3233
|
for (; pos < max; pos++) {
|
|
3229
|
-
const ch =
|
|
3234
|
+
const ch = str8.charCodeAt(pos);
|
|
3230
3235
|
if (ch === 10) {
|
|
3231
3236
|
const lineContent = getNextLine(nextLine);
|
|
3232
3237
|
if (lineContent !== null) {
|
|
3233
|
-
|
|
3234
|
-
max =
|
|
3238
|
+
str8 += lineContent;
|
|
3239
|
+
max = str8.length;
|
|
3235
3240
|
nextLine++;
|
|
3236
3241
|
}
|
|
3237
3242
|
} else if (isSpace(ch)) {
|
|
3238
3243
|
} else break;
|
|
3239
3244
|
}
|
|
3240
|
-
let titleRes = state.md.helpers.parseLinkTitle(
|
|
3245
|
+
let titleRes = state.md.helpers.parseLinkTitle(str8, pos, max);
|
|
3241
3246
|
while (titleRes.can_continue) {
|
|
3242
3247
|
const lineContent = getNextLine(nextLine);
|
|
3243
3248
|
if (lineContent === null) break;
|
|
3244
|
-
|
|
3249
|
+
str8 += lineContent;
|
|
3245
3250
|
pos = max;
|
|
3246
|
-
max =
|
|
3251
|
+
max = str8.length;
|
|
3247
3252
|
nextLine++;
|
|
3248
|
-
titleRes = state.md.helpers.parseLinkTitle(
|
|
3253
|
+
titleRes = state.md.helpers.parseLinkTitle(str8, pos, max, titleRes);
|
|
3249
3254
|
}
|
|
3250
3255
|
let title;
|
|
3251
3256
|
if (pos < max && start !== pos && titleRes.ok) {
|
|
@@ -3257,22 +3262,22 @@ var require_index_cjs4 = __commonJS({
|
|
|
3257
3262
|
nextLine = destEndLineNo;
|
|
3258
3263
|
}
|
|
3259
3264
|
while (pos < max) {
|
|
3260
|
-
if (!isSpace(
|
|
3265
|
+
if (!isSpace(str8.charCodeAt(pos))) break;
|
|
3261
3266
|
pos++;
|
|
3262
3267
|
}
|
|
3263
|
-
if (pos < max &&
|
|
3268
|
+
if (pos < max && str8.charCodeAt(pos) !== 10) {
|
|
3264
3269
|
if (title) {
|
|
3265
3270
|
title = "";
|
|
3266
3271
|
pos = destEndPos;
|
|
3267
3272
|
nextLine = destEndLineNo;
|
|
3268
3273
|
while (pos < max) {
|
|
3269
|
-
if (!isSpace(
|
|
3274
|
+
if (!isSpace(str8.charCodeAt(pos))) break;
|
|
3270
3275
|
pos++;
|
|
3271
3276
|
}
|
|
3272
3277
|
}
|
|
3273
3278
|
}
|
|
3274
|
-
if (pos < max &&
|
|
3275
|
-
const label = normalizeReference(
|
|
3279
|
+
if (pos < max && str8.charCodeAt(pos) !== 10) return false;
|
|
3280
|
+
const label = normalizeReference(str8.slice(1, labelEnd));
|
|
3276
3281
|
if (!label) return false;
|
|
3277
3282
|
if (silent) return true;
|
|
3278
3283
|
if (typeof state.env.references === "undefined") state.env.references = {};
|
|
@@ -3392,22 +3397,22 @@ var require_index_cjs4 = __commonJS({
|
|
|
3392
3397
|
if (state.sCount[startLine] - state.blkIndent >= 4) return false;
|
|
3393
3398
|
if (!state.md.options.html) return false;
|
|
3394
3399
|
if (state.src.charCodeAt(pos) !== 60) return false;
|
|
3395
|
-
let
|
|
3400
|
+
let lineText2 = state.src.slice(pos, max);
|
|
3396
3401
|
let i = 0;
|
|
3397
|
-
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;
|
|
3398
3403
|
if (i === HTML_SEQUENCES.length) return false;
|
|
3399
3404
|
if (silent) return HTML_SEQUENCES[i][2];
|
|
3400
3405
|
let nextLine = startLine + 1;
|
|
3401
3406
|
const endsOnBlankLine = HTML_SEQUENCES[i][1].test("");
|
|
3402
|
-
if (!HTML_SEQUENCES[i][1].test(
|
|
3407
|
+
if (!HTML_SEQUENCES[i][1].test(lineText2)) for (; nextLine < endLine; nextLine++) {
|
|
3403
3408
|
if (state.sCount[nextLine] < state.blkIndent) {
|
|
3404
3409
|
if (endsOnBlankLine || !state.isEmpty(nextLine)) break;
|
|
3405
3410
|
}
|
|
3406
3411
|
pos = state.bMarks[nextLine] + state.tShift[nextLine];
|
|
3407
3412
|
max = state.eMarks[nextLine];
|
|
3408
|
-
|
|
3409
|
-
if (HTML_SEQUENCES[i][1].test(
|
|
3410
|
-
if (
|
|
3413
|
+
lineText2 = state.src.slice(pos, max);
|
|
3414
|
+
if (HTML_SEQUENCES[i][1].test(lineText2)) {
|
|
3415
|
+
if (lineText2.length !== 0) nextLine++;
|
|
3411
3416
|
break;
|
|
3412
3417
|
}
|
|
3413
3418
|
}
|
|
@@ -4246,11 +4251,11 @@ var require_index_cjs4 = __commonJS({
|
|
|
4246
4251
|
}
|
|
4247
4252
|
return false;
|
|
4248
4253
|
}
|
|
4249
|
-
function isLinkOpen(
|
|
4250
|
-
return /^<a[>\s]/i.test(
|
|
4254
|
+
function isLinkOpen(str8) {
|
|
4255
|
+
return /^<a[>\s]/i.test(str8);
|
|
4251
4256
|
}
|
|
4252
|
-
function isLinkClose(
|
|
4253
|
-
return /^<\/a\s*>/i.test(
|
|
4257
|
+
function isLinkClose(str8) {
|
|
4258
|
+
return /^<\/a\s*>/i.test(str8);
|
|
4254
4259
|
}
|
|
4255
4260
|
function isLetter(ch) {
|
|
4256
4261
|
const lc = ch | 32;
|
|
@@ -4459,8 +4464,8 @@ var require_index_cjs4 = __commonJS({
|
|
|
4459
4464
|
}
|
|
4460
4465
|
if (state.pending) state.pushPending();
|
|
4461
4466
|
};
|
|
4462
|
-
ParserInline.prototype.parse = function(
|
|
4463
|
-
const state = new this.State(
|
|
4467
|
+
ParserInline.prototype.parse = function(str8, md2, env, outTokens) {
|
|
4468
|
+
const state = new this.State(str8, md2, env, outTokens);
|
|
4464
4469
|
this.tokenize(state);
|
|
4465
4470
|
const rules = this.ruler2.getRules("");
|
|
4466
4471
|
const len = rules.length;
|
|
@@ -4568,8 +4573,8 @@ var require_index_cjs4 = __commonJS({
|
|
|
4568
4573
|
var BAD_PROTO_RE = /^(vbscript|javascript|file|data):/;
|
|
4569
4574
|
var GOOD_DATA_RE = /^data:image\/(gif|png|jpeg|webp);/;
|
|
4570
4575
|
function validateLink(url) {
|
|
4571
|
-
const
|
|
4572
|
-
return BAD_PROTO_RE.test(
|
|
4576
|
+
const str8 = url.trim().toLowerCase();
|
|
4577
|
+
return BAD_PROTO_RE.test(str8) ? GOOD_DATA_RE.test(str8) : true;
|
|
4573
4578
|
}
|
|
4574
4579
|
var RECODE_HOSTNAME_FOR = [
|
|
4575
4580
|
"http:",
|
|
@@ -4703,7 +4708,7 @@ var require_index_cjs4 = __commonJS({
|
|
|
4703
4708
|
// node_modules/markdown-it-attrs/utils.js
|
|
4704
4709
|
var require_utils = __commonJS({
|
|
4705
4710
|
"node_modules/markdown-it-attrs/utils.js"(exports) {
|
|
4706
|
-
exports.getAttrs = function(
|
|
4711
|
+
exports.getAttrs = function(str8, start, options) {
|
|
4707
4712
|
const allowedKeyChars = /[^\t\n\f />"'=]/;
|
|
4708
4713
|
const pairSeparator = " ";
|
|
4709
4714
|
const keySeparator = "=";
|
|
@@ -4714,20 +4719,20 @@ var require_utils = __commonJS({
|
|
|
4714
4719
|
let value = "";
|
|
4715
4720
|
let parsingKey = true;
|
|
4716
4721
|
let valueInsideQuotes = false;
|
|
4717
|
-
for (let i = start + options.leftDelimiter.length; i <
|
|
4718
|
-
if (!valueInsideQuotes &&
|
|
4722
|
+
for (let i = start + options.leftDelimiter.length; i < str8.length; i++) {
|
|
4723
|
+
if (!valueInsideQuotes && str8.slice(i, i + options.rightDelimiter.length) === options.rightDelimiter) {
|
|
4719
4724
|
if (key2 !== "") {
|
|
4720
4725
|
attrs2.push([key2, value]);
|
|
4721
4726
|
}
|
|
4722
4727
|
break;
|
|
4723
4728
|
}
|
|
4724
|
-
const char_ =
|
|
4729
|
+
const char_ = str8.charAt(i);
|
|
4725
4730
|
if (char_ === keySeparator && parsingKey) {
|
|
4726
4731
|
parsingKey = false;
|
|
4727
4732
|
continue;
|
|
4728
4733
|
}
|
|
4729
4734
|
if (char_ === classChar && key2 === "") {
|
|
4730
|
-
if (
|
|
4735
|
+
if (str8.charAt(i + 1) === classChar) {
|
|
4731
4736
|
key2 = "css-module";
|
|
4732
4737
|
i += 1;
|
|
4733
4738
|
} else {
|
|
@@ -4741,11 +4746,11 @@ var require_utils = __commonJS({
|
|
|
4741
4746
|
parsingKey = false;
|
|
4742
4747
|
continue;
|
|
4743
4748
|
}
|
|
4744
|
-
if (isUnescapedDoubleQuote(
|
|
4749
|
+
if (isUnescapedDoubleQuote(str8, i) && value === "" && !valueInsideQuotes) {
|
|
4745
4750
|
valueInsideQuotes = true;
|
|
4746
4751
|
continue;
|
|
4747
4752
|
}
|
|
4748
|
-
if (isUnescapedDoubleQuote(
|
|
4753
|
+
if (isUnescapedDoubleQuote(str8, i) && valueInsideQuotes) {
|
|
4749
4754
|
valueInsideQuotes = false;
|
|
4750
4755
|
continue;
|
|
4751
4756
|
}
|
|
@@ -4812,9 +4817,9 @@ var require_utils = __commonJS({
|
|
|
4812
4817
|
if (!where) {
|
|
4813
4818
|
throw new Error('Parameter `where` not passed. Should be "start", "end" or "only".');
|
|
4814
4819
|
}
|
|
4815
|
-
return function(
|
|
4820
|
+
return function(str8) {
|
|
4816
4821
|
const minCurlyLength = options.leftDelimiter.length + 1 + options.rightDelimiter.length;
|
|
4817
|
-
if (!
|
|
4822
|
+
if (!str8 || typeof str8 !== "string" || str8.length < minCurlyLength) {
|
|
4818
4823
|
return false;
|
|
4819
4824
|
}
|
|
4820
4825
|
function validCurlyLength(curly) {
|
|
@@ -4826,41 +4831,41 @@ var require_utils = __commonJS({
|
|
|
4826
4831
|
const rightDelimiterMinimumShift = minCurlyLength - options.rightDelimiter.length;
|
|
4827
4832
|
switch (where) {
|
|
4828
4833
|
case "start":
|
|
4829
|
-
slice =
|
|
4834
|
+
slice = str8.slice(0, options.leftDelimiter.length);
|
|
4830
4835
|
start = slice === options.leftDelimiter ? 0 : -1;
|
|
4831
|
-
end = start === -1 ? -1 : findRightDelimiter(
|
|
4832
|
-
nextChar =
|
|
4836
|
+
end = start === -1 ? -1 : findRightDelimiter(str8, rightDelimiterMinimumShift, options);
|
|
4837
|
+
nextChar = str8.charAt(end + options.rightDelimiter.length);
|
|
4833
4838
|
if (nextChar && options.rightDelimiter.indexOf(nextChar) !== -1) {
|
|
4834
4839
|
end = -1;
|
|
4835
4840
|
}
|
|
4836
4841
|
break;
|
|
4837
4842
|
case "end":
|
|
4838
|
-
start = findLeftDelimiter(
|
|
4839
|
-
end = start === -1 ? -1 : findRightDelimiter(
|
|
4840
|
-
end = end ===
|
|
4843
|
+
start = findLeftDelimiter(str8, options);
|
|
4844
|
+
end = start === -1 ? -1 : findRightDelimiter(str8, start + rightDelimiterMinimumShift, options);
|
|
4845
|
+
end = end === str8.length - options.rightDelimiter.length ? end : -1;
|
|
4841
4846
|
break;
|
|
4842
4847
|
case "only":
|
|
4843
|
-
slice =
|
|
4848
|
+
slice = str8.slice(0, options.leftDelimiter.length);
|
|
4844
4849
|
start = slice === options.leftDelimiter ? 0 : -1;
|
|
4845
|
-
slice =
|
|
4846
|
-
end = slice === options.rightDelimiter ?
|
|
4850
|
+
slice = str8.slice(str8.length - options.rightDelimiter.length);
|
|
4851
|
+
end = slice === options.rightDelimiter ? str8.length - options.rightDelimiter.length : -1;
|
|
4847
4852
|
break;
|
|
4848
4853
|
default:
|
|
4849
4854
|
throw new Error(`Unexpected case ${where}, expected 'start', 'end' or 'only'`);
|
|
4850
4855
|
}
|
|
4851
|
-
return start !== -1 && end !== -1 && validCurlyLength(
|
|
4856
|
+
return start !== -1 && end !== -1 && validCurlyLength(str8.substring(start, end + options.rightDelimiter.length));
|
|
4852
4857
|
};
|
|
4853
4858
|
};
|
|
4854
|
-
exports.removeDelimiter = function(
|
|
4855
|
-
const start = findLeftDelimiter(
|
|
4859
|
+
exports.removeDelimiter = function(str8, options) {
|
|
4860
|
+
const start = findLeftDelimiter(str8, options);
|
|
4856
4861
|
if (start === -1) {
|
|
4857
|
-
return
|
|
4862
|
+
return str8;
|
|
4858
4863
|
}
|
|
4859
|
-
const end = findRightDelimiter(
|
|
4860
|
-
if (end !==
|
|
4861
|
-
return
|
|
4864
|
+
const end = findRightDelimiter(str8, start + options.leftDelimiter.length, options);
|
|
4865
|
+
if (end !== str8.length - options.rightDelimiter.length) {
|
|
4866
|
+
return str8;
|
|
4862
4867
|
}
|
|
4863
|
-
const prefix =
|
|
4868
|
+
const prefix = str8.slice(0, start);
|
|
4864
4869
|
return /[ \n]$/.test(prefix) ? prefix.slice(0, -1) : prefix;
|
|
4865
4870
|
};
|
|
4866
4871
|
function escapeRegExp(s) {
|
|
@@ -4894,46 +4899,46 @@ var require_utils = __commonJS({
|
|
|
4894
4899
|
function replaceUnsafeChar(ch) {
|
|
4895
4900
|
return HTML_REPLACEMENTS[ch];
|
|
4896
4901
|
}
|
|
4897
|
-
exports.escapeHtml = function(
|
|
4898
|
-
if (HTML_ESCAPE_TEST_RE.test(
|
|
4899
|
-
return
|
|
4902
|
+
exports.escapeHtml = function(str8) {
|
|
4903
|
+
if (HTML_ESCAPE_TEST_RE.test(str8)) {
|
|
4904
|
+
return str8.replace(HTML_ESCAPE_REPLACE_RE, replaceUnsafeChar);
|
|
4900
4905
|
}
|
|
4901
|
-
return
|
|
4906
|
+
return str8;
|
|
4902
4907
|
};
|
|
4903
|
-
function findRightDelimiter(
|
|
4908
|
+
function findRightDelimiter(str8, start, options) {
|
|
4904
4909
|
let valueInsideQuotes = false;
|
|
4905
|
-
for (let i = start; i <
|
|
4906
|
-
if (isUnescapedDoubleQuote(
|
|
4910
|
+
for (let i = start; i < str8.length; i++) {
|
|
4911
|
+
if (isUnescapedDoubleQuote(str8, i)) {
|
|
4907
4912
|
valueInsideQuotes = !valueInsideQuotes;
|
|
4908
4913
|
continue;
|
|
4909
4914
|
}
|
|
4910
|
-
if (!valueInsideQuotes &&
|
|
4915
|
+
if (!valueInsideQuotes && str8.slice(i, i + options.rightDelimiter.length) === options.rightDelimiter) {
|
|
4911
4916
|
return i;
|
|
4912
4917
|
}
|
|
4913
4918
|
}
|
|
4914
4919
|
return -1;
|
|
4915
4920
|
}
|
|
4916
|
-
function findLeftDelimiter(
|
|
4921
|
+
function findLeftDelimiter(str8, options) {
|
|
4917
4922
|
let start = -1;
|
|
4918
4923
|
let valueInsideQuotes = false;
|
|
4919
|
-
for (let i = 0; i <
|
|
4920
|
-
if (isUnescapedDoubleQuote(
|
|
4924
|
+
for (let i = 0; i < str8.length; i++) {
|
|
4925
|
+
if (isUnescapedDoubleQuote(str8, i)) {
|
|
4921
4926
|
valueInsideQuotes = !valueInsideQuotes;
|
|
4922
4927
|
continue;
|
|
4923
4928
|
}
|
|
4924
|
-
if (!valueInsideQuotes &&
|
|
4929
|
+
if (!valueInsideQuotes && str8.slice(i, i + options.leftDelimiter.length) === options.leftDelimiter) {
|
|
4925
4930
|
start = i;
|
|
4926
4931
|
}
|
|
4927
4932
|
}
|
|
4928
4933
|
return start;
|
|
4929
4934
|
}
|
|
4930
4935
|
exports.findLeftDelimiter = findLeftDelimiter;
|
|
4931
|
-
function isUnescapedDoubleQuote(
|
|
4932
|
-
if (
|
|
4936
|
+
function isUnescapedDoubleQuote(str8, i) {
|
|
4937
|
+
if (str8.charAt(i) !== '"') {
|
|
4933
4938
|
return false;
|
|
4934
4939
|
}
|
|
4935
4940
|
let slashCount = 0;
|
|
4936
|
-
for (let n = i - 1; n >= 0 &&
|
|
4941
|
+
for (let n = i - 1; n >= 0 && str8.charAt(n) === "\\"; n--) {
|
|
4937
4942
|
slashCount++;
|
|
4938
4943
|
}
|
|
4939
4944
|
return slashCount % 2 === 0;
|
|
@@ -4987,7 +4992,7 @@ var require_patterns = __commonJS({
|
|
|
4987
4992
|
children: [
|
|
4988
4993
|
{
|
|
4989
4994
|
shift: -1,
|
|
4990
|
-
type: (
|
|
4995
|
+
type: (str8) => str8 === "image" || str8 === "code_inline"
|
|
4991
4996
|
},
|
|
4992
4997
|
{
|
|
4993
4998
|
shift: 0,
|
|
@@ -5268,7 +5273,7 @@ var require_patterns = __commonJS({
|
|
|
5268
5273
|
// let this token be i = 0 so that we can erase
|
|
5269
5274
|
// the <p>{.a}</p> tokens below
|
|
5270
5275
|
shift: 0,
|
|
5271
|
-
type: (
|
|
5276
|
+
type: (str8) => str8 === "bullet_list_close" || str8 === "ordered_list_close"
|
|
5272
5277
|
},
|
|
5273
5278
|
{
|
|
5274
5279
|
shift: 1,
|
|
@@ -5380,7 +5385,7 @@ var require_patterns = __commonJS({
|
|
|
5380
5385
|
shift: 1,
|
|
5381
5386
|
type: "inline",
|
|
5382
5387
|
children: (arr) => arr.length === 1,
|
|
5383
|
-
content: (
|
|
5388
|
+
content: (str8) => str8.match(__hr) !== null
|
|
5384
5389
|
},
|
|
5385
5390
|
{
|
|
5386
5391
|
shift: 2,
|
|
@@ -5659,6 +5664,13 @@ function leafHtml(node) {
|
|
|
5659
5664
|
}
|
|
5660
5665
|
return void 0;
|
|
5661
5666
|
}
|
|
5667
|
+
function slugifyHeadingText(text4) {
|
|
5668
|
+
return text4.toLowerCase().replace(/[^\w\s-]/g, "").trim().replace(/\s+/g, "-");
|
|
5669
|
+
}
|
|
5670
|
+
var RESERVED_ID = /^(db-|tab-\d|tabpanel-\d|acc-\d|accpanel-\d|fn-|fnref-)/;
|
|
5671
|
+
function pageId(id) {
|
|
5672
|
+
return RESERVED_ID.test(id) ? `h-${id}` : id;
|
|
5673
|
+
}
|
|
5662
5674
|
function stepTitle(node) {
|
|
5663
5675
|
const title = typeof node.props?.title === "string" ? node.props.title.trim() : "";
|
|
5664
5676
|
if (!title)
|
|
@@ -7073,41 +7085,41 @@ var STATUS_VALUES = [
|
|
|
7073
7085
|
];
|
|
7074
7086
|
function parseMeta(frontmatter, options = {}) {
|
|
7075
7087
|
const fm = frontmatter ?? {};
|
|
7076
|
-
const
|
|
7088
|
+
const meta2 = {};
|
|
7077
7089
|
const tags = coerceStringArray(fm.tags);
|
|
7078
7090
|
if (tags)
|
|
7079
|
-
|
|
7091
|
+
meta2.tags = tags;
|
|
7080
7092
|
const category = coerceStringArray(fm.category) ?? deriveCategoryFromSlug(options.slug);
|
|
7081
7093
|
if (category)
|
|
7082
|
-
|
|
7094
|
+
meta2.category = category;
|
|
7083
7095
|
if (typeof fm.type === "string" && fm.type.length > 0) {
|
|
7084
|
-
|
|
7096
|
+
meta2.type = fm.type;
|
|
7085
7097
|
}
|
|
7086
7098
|
if (typeof fm.status === "string" && STATUS_VALUES.includes(fm.status)) {
|
|
7087
|
-
|
|
7099
|
+
meta2.status = fm.status;
|
|
7088
7100
|
}
|
|
7089
7101
|
const audience = coerceStringArray(fm.audience);
|
|
7090
7102
|
if (audience)
|
|
7091
|
-
|
|
7103
|
+
meta2.audience = audience;
|
|
7092
7104
|
const updated = coerceIsoDate(fm.updated);
|
|
7093
7105
|
if (updated)
|
|
7094
|
-
|
|
7106
|
+
meta2.updated = updated;
|
|
7095
7107
|
const created = coerceIsoDate(fm.created);
|
|
7096
7108
|
if (created)
|
|
7097
|
-
|
|
7109
|
+
meta2.created = created;
|
|
7098
7110
|
const author = coerceStringArray(fm.author);
|
|
7099
7111
|
if (author)
|
|
7100
|
-
|
|
7112
|
+
meta2.author = author;
|
|
7101
7113
|
if (typeof fm.weight === "number" && Number.isFinite(fm.weight)) {
|
|
7102
|
-
|
|
7114
|
+
meta2.weight = fm.weight;
|
|
7103
7115
|
}
|
|
7104
7116
|
if (isPlainObject(fm.props)) {
|
|
7105
|
-
|
|
7117
|
+
meta2.props = { ...fm.props };
|
|
7106
7118
|
}
|
|
7107
7119
|
const taxonomies = collectTaxonomies(fm, options.taxonomyNames);
|
|
7108
7120
|
if (taxonomies)
|
|
7109
|
-
|
|
7110
|
-
return
|
|
7121
|
+
meta2.taxonomies = taxonomies;
|
|
7122
|
+
return meta2;
|
|
7111
7123
|
}
|
|
7112
7124
|
function deriveCategoryFromSlug(slug) {
|
|
7113
7125
|
if (!slug)
|
|
@@ -8038,7 +8050,8 @@ var DIRECTIVE_PROPS = {
|
|
|
8038
8050
|
"pdf-keep-together": [],
|
|
8039
8051
|
"pdf-only": [],
|
|
8040
8052
|
"web-only": [],
|
|
8041
|
-
"pdf-page-break": []
|
|
8053
|
+
"pdf-page-break": [],
|
|
8054
|
+
"key-value": ["layout"]
|
|
8042
8055
|
};
|
|
8043
8056
|
function unknownProps(name, props) {
|
|
8044
8057
|
const known = DIRECTIVE_PROPS[name];
|
|
@@ -8611,9 +8624,11 @@ var KNOWN_BLOCK_DIRECTIVES = [
|
|
|
8611
8624
|
"columns",
|
|
8612
8625
|
"pdf-keep-together",
|
|
8613
8626
|
"pdf-only",
|
|
8614
|
-
"web-only"
|
|
8627
|
+
"web-only",
|
|
8628
|
+
// Labels and their values, around a definition list (NAMED_CONTAINERS)
|
|
8629
|
+
"key-value"
|
|
8615
8630
|
];
|
|
8616
|
-
var NAMED_CONTAINERS = ["columns", "pdf-keep-together", "pdf-only", "web-only", "pdf-page-break"];
|
|
8631
|
+
var NAMED_CONTAINERS = ["columns", "pdf-keep-together", "pdf-only", "web-only", "pdf-page-break", "key-value"];
|
|
8617
8632
|
var LEAF_ONLY_DIRECTIVES = ["youtube", "avatar", "child-links", "data-table", "data-cards", "pdf-page-break"];
|
|
8618
8633
|
var BLOCK_LEAF_DIRECTIVES = [...KNOWN_BLOCK_DIRECTIVES, ...LEAF_ONLY_DIRECTIVES.filter((n) => !KNOWN_BLOCK_DIRECTIVES.includes(n))];
|
|
8619
8634
|
var GENERIC_CONTAINER = "dogsbay_generic";
|
|
@@ -9140,9 +9155,9 @@ function markPlugin(md2) {
|
|
|
9140
9155
|
md2.inline.ruler.before("emphasis", "mark", tokenize);
|
|
9141
9156
|
md2.inline.ruler2.before("emphasis", "mark", (state) => {
|
|
9142
9157
|
postProcess(state, state.delimiters);
|
|
9143
|
-
for (const
|
|
9144
|
-
if (
|
|
9145
|
-
postProcess(state,
|
|
9158
|
+
for (const meta2 of state.tokens_meta)
|
|
9159
|
+
if (meta2?.delimiters)
|
|
9160
|
+
postProcess(state, meta2.delimiters);
|
|
9146
9161
|
return false;
|
|
9147
9162
|
});
|
|
9148
9163
|
}
|
|
@@ -9328,6 +9343,203 @@ function splitFrontmatter(source) {
|
|
|
9328
9343
|
};
|
|
9329
9344
|
}
|
|
9330
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
|
+
|
|
9331
9543
|
// node_modules/@dogsbay/format-dogsbay-md/dist/directive-preserve.js
|
|
9332
9544
|
var OPEN2 = "\uE000";
|
|
9333
9545
|
var CLOSE2 = "\uE001";
|
|
@@ -9715,7 +9927,7 @@ function attributeProblem(block2) {
|
|
|
9715
9927
|
return `has an unterminated ${quote === '"' ? "double" : "single"} quote`;
|
|
9716
9928
|
return void 0;
|
|
9717
9929
|
}
|
|
9718
|
-
function youtubeAsBlock(map, closed, lines, around,
|
|
9930
|
+
function youtubeAsBlock(map, closed, lines, around, lineOf2) {
|
|
9719
9931
|
if (!closed)
|
|
9720
9932
|
return "is never closed, so it takes in everything after it";
|
|
9721
9933
|
if (lines.slice(map[0] + 1, map[1]).some((l) => l.replace(/^[\s>]*/, "") !== "")) {
|
|
@@ -9725,7 +9937,7 @@ function youtubeAsBlock(map, closed, lines, around, lineOf) {
|
|
|
9725
9937
|
if (around.some((a) => a.map[1] === map[1]))
|
|
9726
9938
|
return `has no closer of its own: it ends with the :::${parent?.name ?? "block"} around it`;
|
|
9727
9939
|
if (parent && !parent.closed)
|
|
9728
|
-
return `takes the closer on line ${
|
|
9940
|
+
return `takes the closer on line ${lineOf2(map[1]) ?? "?"}, which leaves :::${parent.name} open`;
|
|
9729
9941
|
return void 0;
|
|
9730
9942
|
}
|
|
9731
9943
|
var clip = (line) => {
|
|
@@ -9745,11 +9957,11 @@ function propKeysOfAttrs(props) {
|
|
|
9745
9957
|
}
|
|
9746
9958
|
return keys;
|
|
9747
9959
|
}
|
|
9748
|
-
function collectDiagnostics(tokens, lines,
|
|
9960
|
+
function collectDiagnostics(tokens, lines, lineOf2, sourceLine2) {
|
|
9749
9961
|
const out = [];
|
|
9750
9962
|
const cursor = /* @__PURE__ */ new Map();
|
|
9751
9963
|
const add = (line0, code2, message, name, span) => {
|
|
9752
|
-
const line = line0 === void 0 ? void 0 :
|
|
9964
|
+
const line = line0 === void 0 ? void 0 : lineOf2(line0);
|
|
9753
9965
|
if (line === void 0)
|
|
9754
9966
|
return;
|
|
9755
9967
|
const text4 = span && sourceLine2?.(line);
|
|
@@ -9786,13 +9998,13 @@ function collectDiagnostics(tokens, lines, lineOf, sourceLine2) {
|
|
|
9786
9998
|
const closed = closesContainer(lines[tok.map[1]], colons);
|
|
9787
9999
|
const skipped = tok.meta?.skippedCloser;
|
|
9788
10000
|
const legacy = tok.meta?.legacyCloser;
|
|
9789
|
-
const leafAsBlock = name === "youtube" ? youtubeAsBlock(tok.map, closed, lines, around,
|
|
10001
|
+
const leafAsBlock = name === "youtube" ? youtubeAsBlock(tok.map, closed, lines, around, lineOf2) : void 0;
|
|
9790
10002
|
if (leafAsBlock) {
|
|
9791
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));
|
|
9792
10004
|
} else if (!closed && legacy !== void 0 && !generic) {
|
|
9793
|
-
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));
|
|
9794
10006
|
} else if (!closed && skipped !== void 0) {
|
|
9795
|
-
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));
|
|
9796
10008
|
} else if (!closed) {
|
|
9797
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));
|
|
9798
10010
|
} else if (generic) {
|
|
@@ -9810,7 +10022,7 @@ function collectDiagnostics(tokens, lines, lineOf, sourceLine2) {
|
|
|
9810
10022
|
if (closed) {
|
|
9811
10023
|
const label = closerLabel((lines[tok.map[1]] ?? "").replace(/^[\s>]*:+/, ""));
|
|
9812
10024
|
if (label && label !== name) {
|
|
9813
|
-
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]*?-->/);
|
|
9814
10026
|
}
|
|
9815
10027
|
}
|
|
9816
10028
|
const rest = info.slice(name.length).trim();
|
|
@@ -10493,7 +10705,7 @@ function renderHeading(node) {
|
|
|
10493
10705
|
const hashes = "#".repeat(level);
|
|
10494
10706
|
const text4 = inlineToDogsbayMd(oneLine(node.inline)) || (node.html ?? "") || (typeof node.props?.text === "string" ? node.props.text : "");
|
|
10495
10707
|
const attrs2 = splitProps(node.props, ["level", "slug", "text"]);
|
|
10496
|
-
const slug = node.props?.slug;
|
|
10708
|
+
const slug = node.meta?.idGenerated === true ? void 0 : node.props?.slug;
|
|
10497
10709
|
if (slug && !attrs2.id) {
|
|
10498
10710
|
attrs2.id = slug;
|
|
10499
10711
|
}
|
|
@@ -10519,6 +10731,9 @@ function renderParagraph(node, ctx) {
|
|
|
10519
10731
|
function renderCode(node) {
|
|
10520
10732
|
const content = node.html ?? node.props?.code ?? "";
|
|
10521
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
|
+
}
|
|
10522
10737
|
const fence = pickCodeFence2(content);
|
|
10523
10738
|
const attrKeys = [
|
|
10524
10739
|
"title",
|
|
@@ -10570,8 +10785,11 @@ function renderList(node, ctx, ordered) {
|
|
|
10570
10785
|
const start = ordered ? Number.isFinite(Number(node.props?.start ?? 1)) ? Number(node.props?.start ?? 1) : 1 : 0;
|
|
10571
10786
|
const same3 = ordered && (ctx.listNumbers === "same" || ctx.listNumbers === "source" && node.meta?.sameNumbers === true);
|
|
10572
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 === ")" ? ")" : ".";
|
|
10573
10791
|
return items3.map((item, idx) => {
|
|
10574
|
-
const marker = ordered ? `${same3 ? start : start + idx}
|
|
10792
|
+
const marker = ordered ? `${same3 ? start : start + idx}${delimiter}` : bullet;
|
|
10575
10793
|
const body = renderListItem(item, ctx, loose);
|
|
10576
10794
|
const [first, ...rest] = body.split("\n");
|
|
10577
10795
|
const aligned = ctx.listIndent === "aligned" && /^\S/.test(first);
|
|
@@ -10586,7 +10804,7 @@ function startsWithText(item) {
|
|
|
10586
10804
|
const first = item.inline && item.inline.length > 0 ? "text" : item.children?.[0]?.type;
|
|
10587
10805
|
if (first !== "text" && first !== "paragraph" && first !== "prose")
|
|
10588
10806
|
return false;
|
|
10589
|
-
return !holdsHtml(item) && !holdsCodeBreak(item);
|
|
10807
|
+
return !holdsHtml(item) && !holdsCodeBreak(item) && !(item.children ?? []).some((c) => c.type === "code" && c.meta?.indented === true);
|
|
10590
10808
|
}
|
|
10591
10809
|
function joinCodeBreaks(node) {
|
|
10592
10810
|
if (!holdsCodeBreak(node, true))
|
|
@@ -10626,7 +10844,9 @@ var TIGHT_NEXT = /* @__PURE__ */ new Set(["unordered-list", "ordered-list", "cod
|
|
|
10626
10844
|
var OPEN_ENDED = /* @__PURE__ */ new Set(["table", "paragraph", "html", "prose"]);
|
|
10627
10845
|
function renderListItem(node, ctx, loose = true) {
|
|
10628
10846
|
const box = typeof node.props?.checked === "boolean" ? node.props.checked ? "[x] " : "[ ] " : "";
|
|
10629
|
-
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);
|
|
10630
10850
|
const parts = [];
|
|
10631
10851
|
if (inline3)
|
|
10632
10852
|
parts.push({ type: "paragraph", md: inline3 });
|
|
@@ -11272,7 +11492,7 @@ function parseTree(source, options) {
|
|
|
11272
11492
|
}
|
|
11273
11493
|
const yamlLifted = preprocessYamlBodies(content);
|
|
11274
11494
|
content = yamlLifted.source;
|
|
11275
|
-
const
|
|
11495
|
+
const lineOf2 = lineMap ? (line0) => {
|
|
11276
11496
|
const protectedLine = yamlLifted.lineMap[line0];
|
|
11277
11497
|
const input = protectedLine === void 0 ? void 0 : lineMap[protectedLine];
|
|
11278
11498
|
return input === void 0 ? void 0 : bodyStart + input + 1;
|
|
@@ -11292,10 +11512,10 @@ function parseTree(source, options) {
|
|
|
11292
11512
|
markUnclosedGenericContainers(tokens, content);
|
|
11293
11513
|
keepListItemBraces(tokens, content);
|
|
11294
11514
|
attachTableAttrsRow(tokens, content);
|
|
11295
|
-
let diagnostics = options?.diagnostics ? collectDiagnostics(tokens, content.split(/\r\n|\n/),
|
|
11296
|
-
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) {
|
|
11297
11517
|
for (const bad of yamlLifted.badProps) {
|
|
11298
|
-
const line =
|
|
11518
|
+
const line = lineOf2(bad.line0 + bad.offset);
|
|
11299
11519
|
if (line === void 0)
|
|
11300
11520
|
continue;
|
|
11301
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` });
|
|
@@ -11309,17 +11529,21 @@ function parseTree(source, options) {
|
|
|
11309
11529
|
return protectedLine === void 0 ? void 0 : protectedLines[protectedLine];
|
|
11310
11530
|
}
|
|
11311
11531
|
};
|
|
11312
|
-
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));
|
|
11313
11533
|
if (directiveTable) {
|
|
11314
11534
|
tree = restoreDirectives(tree, directiveTable, {
|
|
11315
11535
|
nodesFor: preserveMode ? "all" : "include"
|
|
11316
11536
|
});
|
|
11317
11537
|
}
|
|
11318
|
-
if (options?.sourceLines &&
|
|
11538
|
+
if (options?.sourceLines && lineOf2) {
|
|
11319
11539
|
endLines(tree);
|
|
11320
11540
|
if (options.sourceMap)
|
|
11321
11541
|
addSourceOrigins(tree, textLineOrigins(options.sourceMap));
|
|
11322
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
|
+
}
|
|
11323
11547
|
return { tree, frontmatter, ...diagnostics ? { diagnostics } : {} };
|
|
11324
11548
|
}
|
|
11325
11549
|
var RELATED_ROLE_CLASSES = /* @__PURE__ */ new Set(["_additional-resources"]);
|
|
@@ -11600,9 +11824,9 @@ function markUnclosedGenericContainers(tokens, src) {
|
|
|
11600
11824
|
tok.meta = { ...tok.meta ?? {}, unclosed: true };
|
|
11601
11825
|
}
|
|
11602
11826
|
}
|
|
11603
|
-
function tokensToTree(tokens,
|
|
11827
|
+
function tokensToTree(tokens, lineOf2, lines, written, endOf) {
|
|
11604
11828
|
const nodes = [];
|
|
11605
|
-
const ctx = { tokens, i: 0, ...
|
|
11829
|
+
const ctx = { tokens, i: 0, ...lineOf2 ? { lineOf: lineOf2 } : {}, ...endOf ? { endOf } : {}, ...lines ? { lines } : {}, ...written ? { written } : {} };
|
|
11606
11830
|
while (ctx.i < ctx.tokens.length) {
|
|
11607
11831
|
const node = consumeBlock(ctx);
|
|
11608
11832
|
if (node) {
|
|
@@ -11729,8 +11953,8 @@ function consumeFootnoteBlock(ctx) {
|
|
|
11729
11953
|
}
|
|
11730
11954
|
function consumeFootnoteDef(ctx) {
|
|
11731
11955
|
const open = ctx.tokens[ctx.i];
|
|
11732
|
-
const
|
|
11733
|
-
const label =
|
|
11956
|
+
const meta2 = open.meta ?? {};
|
|
11957
|
+
const label = meta2.label ?? String((meta2.id ?? 0) + 1);
|
|
11734
11958
|
ctx.i++;
|
|
11735
11959
|
let close = ctx.i;
|
|
11736
11960
|
while (close < ctx.tokens.length && ctx.tokens[close].type !== "footnote_close")
|
|
@@ -11876,6 +12100,11 @@ function consumeList(ctx, ordered) {
|
|
|
11876
12100
|
};
|
|
11877
12101
|
if (looseList(ctx.tokens, openAt))
|
|
11878
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
|
+
}
|
|
11879
12108
|
if (ordered) {
|
|
11880
12109
|
const startAttr = open.attrs?.find(([k]) => k === "start");
|
|
11881
12110
|
if (startAttr) {
|
|
@@ -12052,7 +12281,9 @@ function consumeCode(ctx) {
|
|
|
12052
12281
|
return {
|
|
12053
12282
|
type: "code",
|
|
12054
12283
|
props,
|
|
12055
|
-
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 } } : {}
|
|
12056
12287
|
};
|
|
12057
12288
|
}
|
|
12058
12289
|
function consumeHtmlBlock(ctx) {
|
|
@@ -12809,11 +13040,11 @@ function tokensToInline(tokens, inheritedFmt = []) {
|
|
|
12809
13040
|
}
|
|
12810
13041
|
const labelInline = tokensToInline(labelTokens);
|
|
12811
13042
|
const labelText = inlineText(labelInline);
|
|
12812
|
-
const
|
|
12813
|
-
const labelless =
|
|
12814
|
-
let node =
|
|
12815
|
-
if (labelless &&
|
|
12816
|
-
node = { type: "text", text:
|
|
13043
|
+
const meta2 = tok.meta;
|
|
13044
|
+
const labelless = meta2?.labelless === true;
|
|
13045
|
+
let node = meta2?.literal && meta2.source ? { type: "text", text: meta2.source } : inlineDirectiveToNode(name, labelText, labelInline, attrs2, labelless);
|
|
13046
|
+
if (labelless && meta2?.source && (node?.type === "html-inline" && node.html.startsWith(`:${name}[]`) || node?.type === "text" && node.text.startsWith(`:${name}{`)))
|
|
13047
|
+
node = { type: "text", text: meta2.source };
|
|
12817
13048
|
if (node)
|
|
12818
13049
|
result.push(node);
|
|
12819
13050
|
break;
|
|
@@ -13011,6 +13242,7 @@ var DIRECTIVE_DESCRIPTIONS = {
|
|
|
13011
13242
|
avatar: "Avatar image with a fallback: `src`, `alt`, `fallback`, `size`",
|
|
13012
13243
|
"child-links": "Links to this page's children in the menu; `depth`",
|
|
13013
13244
|
columns: "Text that flows through columns; `count` (1 to 6), `gap`",
|
|
13245
|
+
"key-value": "Labels and values, from a definition list; `layout`: `rows` or `across` (pairs side by side)",
|
|
13014
13246
|
"pdf-page-break": "What follows starts a page of the PDF; nothing on the web",
|
|
13015
13247
|
"pdf-keep-together": "Content not split across pages of the PDF",
|
|
13016
13248
|
"pdf-only": "Content shown in the PDF only",
|
|
@@ -13061,6 +13293,182 @@ function stripFenceMinjaMarkers(text4) {
|
|
|
13061
13293
|
});
|
|
13062
13294
|
}
|
|
13063
13295
|
|
|
13296
|
+
// node_modules/@dogsbay/format-dogsbay-md/dist/anchors.js
|
|
13297
|
+
var NOT_ANCHORS = /* @__PURE__ */ new Set(["youtube", "footnote-def"]);
|
|
13298
|
+
function authoredAnchor(node) {
|
|
13299
|
+
if (NOT_ANCHORS.has(node.type))
|
|
13300
|
+
return void 0;
|
|
13301
|
+
if (node.meta?.idGenerated === true)
|
|
13302
|
+
return void 0;
|
|
13303
|
+
const props = node.props;
|
|
13304
|
+
const id = node.type === "heading" ? props?.slug : props?.id;
|
|
13305
|
+
return typeof id === "string" && id ? id : void 0;
|
|
13306
|
+
}
|
|
13307
|
+
function authoredInlineAnchor(node) {
|
|
13308
|
+
const id = node.attrs?.id;
|
|
13309
|
+
return typeof id === "string" && id ? id : void 0;
|
|
13310
|
+
}
|
|
13311
|
+
|
|
13312
|
+
// node_modules/@dogsbay/format-dogsbay-md/dist/headings.js
|
|
13313
|
+
function collectInlineText(nodes) {
|
|
13314
|
+
let out = "";
|
|
13315
|
+
for (const n of nodes) {
|
|
13316
|
+
if (!n || typeof n !== "object")
|
|
13317
|
+
continue;
|
|
13318
|
+
const node = n;
|
|
13319
|
+
if (typeof node.text === "string")
|
|
13320
|
+
out += node.text;
|
|
13321
|
+
else if (typeof node.alt === "string")
|
|
13322
|
+
out += node.alt;
|
|
13323
|
+
if (Array.isArray(node.children))
|
|
13324
|
+
out += collectInlineText(node.children);
|
|
13325
|
+
}
|
|
13326
|
+
return out;
|
|
13327
|
+
}
|
|
13328
|
+
function pageLevel(tree) {
|
|
13329
|
+
return tree.flatMap((n) => n.type === "theme" ? pageLevel(n.children ?? []) : [n]);
|
|
13330
|
+
}
|
|
13331
|
+
var meta = (node) => node.meta;
|
|
13332
|
+
var str = (v) => typeof v === "string" && v ? v : void 0;
|
|
13333
|
+
var earlierId = (node) => {
|
|
13334
|
+
if (meta(node)?.idGenerated !== true)
|
|
13335
|
+
return void 0;
|
|
13336
|
+
return node.type === "heading" ? typeof node.props?.slug === "string" ? node.props.slug : void 0 : str(node.props?.id);
|
|
13337
|
+
};
|
|
13338
|
+
var authoredHeadingId = (node) => str(node.props?.id) ?? (meta(node)?.idGenerated === true ? void 0 : str(node.props?.slug));
|
|
13339
|
+
var HTML_ID = /(?:^|[\s<])id\s*=\s*(["'])([^"']*)\1/gi;
|
|
13340
|
+
function slugPass(tree, options) {
|
|
13341
|
+
const top = new Set(pageLevel(tree));
|
|
13342
|
+
const slots = [];
|
|
13343
|
+
const taken = new Set(options.reserved ?? []);
|
|
13344
|
+
const reserveInline = (nodes) => {
|
|
13345
|
+
for (const n of nodes ?? []) {
|
|
13346
|
+
const id = authoredInlineAnchor(n);
|
|
13347
|
+
if (id)
|
|
13348
|
+
taken.add(id);
|
|
13349
|
+
const html = n.html;
|
|
13350
|
+
if (typeof html === "string") {
|
|
13351
|
+
for (const m of html.matchAll(HTML_ID))
|
|
13352
|
+
if (m[2])
|
|
13353
|
+
taken.add(m[2]);
|
|
13354
|
+
}
|
|
13355
|
+
const kids = n.children;
|
|
13356
|
+
if (Array.isArray(kids))
|
|
13357
|
+
reserveInline(kids);
|
|
13358
|
+
}
|
|
13359
|
+
};
|
|
13360
|
+
const sheetNodes = [];
|
|
13361
|
+
const visit = (nodes) => {
|
|
13362
|
+
for (const node of nodes ?? []) {
|
|
13363
|
+
if (node.type !== "heading") {
|
|
13364
|
+
const authored = authoredAnchor(node);
|
|
13365
|
+
if (authored)
|
|
13366
|
+
taken.add(authored);
|
|
13367
|
+
}
|
|
13368
|
+
const again = earlierId(node);
|
|
13369
|
+
if (again)
|
|
13370
|
+
taken.add(again);
|
|
13371
|
+
if ((node.type === "html" || node.type === "html-container") && typeof node.html === "string") {
|
|
13372
|
+
for (const m of node.html.matchAll(HTML_ID))
|
|
13373
|
+
if (m[2])
|
|
13374
|
+
taken.add(m[2]);
|
|
13375
|
+
}
|
|
13376
|
+
reserveInline(node.inline);
|
|
13377
|
+
if (node.type === "details" && isDetailsSheet(node.props) && (!node.props?.id || again))
|
|
13378
|
+
sheetNodes.push(node);
|
|
13379
|
+
if (node.type === "heading" && node.inline) {
|
|
13380
|
+
const text4 = node.inline.map((n) => n.type === "text" ? n.text : "").join("").trim();
|
|
13381
|
+
const fallback = !slugifyHeadingText(text4);
|
|
13382
|
+
slots.push({
|
|
13383
|
+
node,
|
|
13384
|
+
// Upgrade the TEXT here, before any slug is assigned. Doing it inside
|
|
13385
|
+
// pass 2 skipped every heading that already had a slug from an explicit
|
|
13386
|
+
// `{#id}` — so `## \`demo.run(opts)\` {#run}` anchored correctly and
|
|
13387
|
+
// still showed a BLANK row in the table of contents.
|
|
13388
|
+
text: fallback ? collectInlineText(node.inline).trim() || text4 : text4,
|
|
13389
|
+
fallback,
|
|
13390
|
+
top: top.has(node),
|
|
13391
|
+
generated: false
|
|
13392
|
+
});
|
|
13393
|
+
}
|
|
13394
|
+
visit(node.children);
|
|
13395
|
+
}
|
|
13396
|
+
};
|
|
13397
|
+
visit(tree);
|
|
13398
|
+
for (const slot of slots) {
|
|
13399
|
+
const again = earlierId(slot.node);
|
|
13400
|
+
if (again !== void 0) {
|
|
13401
|
+
slot.id = again;
|
|
13402
|
+
slot.generated = true;
|
|
13403
|
+
continue;
|
|
13404
|
+
}
|
|
13405
|
+
const explicit = authoredHeadingId(slot.node);
|
|
13406
|
+
if (!explicit)
|
|
13407
|
+
continue;
|
|
13408
|
+
const base = pageId(explicit);
|
|
13409
|
+
let id = base;
|
|
13410
|
+
for (let n = 2; taken.has(id); n++)
|
|
13411
|
+
id = `${base}-${n}`;
|
|
13412
|
+
slot.id = id;
|
|
13413
|
+
taken.add(id);
|
|
13414
|
+
}
|
|
13415
|
+
const seen = /* @__PURE__ */ new Map();
|
|
13416
|
+
const assign = (slot, base) => {
|
|
13417
|
+
let n = seen.get(base) ?? 0;
|
|
13418
|
+
let id = n === 0 ? base : `${base}-${n}`;
|
|
13419
|
+
while (taken.has(id)) {
|
|
13420
|
+
n += 1;
|
|
13421
|
+
id = `${base}-${n}`;
|
|
13422
|
+
}
|
|
13423
|
+
seen.set(base, n + 1);
|
|
13424
|
+
slot.id = id;
|
|
13425
|
+
slot.generated = true;
|
|
13426
|
+
taken.add(id);
|
|
13427
|
+
};
|
|
13428
|
+
for (const slot of slots) {
|
|
13429
|
+
if (slot.id !== void 0 || slot.fallback)
|
|
13430
|
+
continue;
|
|
13431
|
+
assign(slot, pageId(slugifyHeadingText(slot.text)));
|
|
13432
|
+
}
|
|
13433
|
+
for (const slot of slots) {
|
|
13434
|
+
if (slot.id !== void 0)
|
|
13435
|
+
continue;
|
|
13436
|
+
const base = slugifyHeadingText(slot.text);
|
|
13437
|
+
if (!base) {
|
|
13438
|
+
slot.id = "";
|
|
13439
|
+
slot.generated = true;
|
|
13440
|
+
continue;
|
|
13441
|
+
}
|
|
13442
|
+
assign(slot, pageId(base));
|
|
13443
|
+
}
|
|
13444
|
+
const sheets = /* @__PURE__ */ new Map();
|
|
13445
|
+
for (const n of sheetNodes) {
|
|
13446
|
+
const again = earlierId(n);
|
|
13447
|
+
if (again) {
|
|
13448
|
+
sheets.set(n, again);
|
|
13449
|
+
continue;
|
|
13450
|
+
}
|
|
13451
|
+
const base = pageId(slugifyHeadingText(String(n.props?.title ?? n.props?.summary ?? "")));
|
|
13452
|
+
if (!base || base === "h-")
|
|
13453
|
+
continue;
|
|
13454
|
+
let id = base;
|
|
13455
|
+
for (let k = 1; taken.has(id); k++)
|
|
13456
|
+
id = `${base}-${k}`;
|
|
13457
|
+
taken.add(id);
|
|
13458
|
+
sheets.set(n, id);
|
|
13459
|
+
}
|
|
13460
|
+
return { slots, sheets };
|
|
13461
|
+
}
|
|
13462
|
+
function headingIds(tree, options = {}) {
|
|
13463
|
+
const { slots, sheets } = slugPass(tree, options);
|
|
13464
|
+
const out = /* @__PURE__ */ new Map();
|
|
13465
|
+
for (const slot of slots)
|
|
13466
|
+
out.set(slot.node, { id: slot.id ?? "", generated: slot.generated });
|
|
13467
|
+
for (const [node, id] of sheets)
|
|
13468
|
+
out.set(node, { id, generated: true });
|
|
13469
|
+
return out;
|
|
13470
|
+
}
|
|
13471
|
+
|
|
13064
13472
|
// node_modules/@dogsbay/format-dogsbay-md/dist/data-files.js
|
|
13065
13473
|
var YAML_SCHEMA = JSON_SCHEMA.withTags(mergeTag);
|
|
13066
13474
|
var DataFileError = class extends Error {
|
|
@@ -13629,18 +14037,91 @@ async function sha256Hex(bytes) {
|
|
|
13629
14037
|
const digest = await globalThis.crypto.subtle.digest("SHA-256", bytes);
|
|
13630
14038
|
return Array.from(new Uint8Array(digest), (b) => b.toString(16).padStart(2, "0")).join("");
|
|
13631
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
|
+
}
|
|
13632
14070
|
async function pageRecord(tree, options) {
|
|
13633
14071
|
const blocks = [];
|
|
14072
|
+
const printed = /* @__PURE__ */ new Map();
|
|
14073
|
+
const drawnIn = /* @__PURE__ */ new Map();
|
|
13634
14074
|
const walk = (nodes) => {
|
|
13635
14075
|
for (const n of nodes) {
|
|
13636
|
-
const
|
|
13637
|
-
if (
|
|
13638
|
-
|
|
14076
|
+
const meta2 = n.meta;
|
|
14077
|
+
if (meta2 && typeof meta2.block === "string" && typeof meta2.line === "number" && meta2.source) {
|
|
14078
|
+
const record = blockRecord(n.type, meta2.block, meta2.line, typeof meta2.endLine === "number" ? meta2.endLine : meta2.line, meta2.source, options.source);
|
|
14079
|
+
const anchor = authoredAnchor(n);
|
|
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
|
+
}
|
|
14086
|
+
}
|
|
13639
14087
|
if (n.children)
|
|
13640
14088
|
walk(n.children);
|
|
13641
14089
|
}
|
|
13642
14090
|
};
|
|
13643
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
|
+
}
|
|
13644
14125
|
const files = {};
|
|
13645
14126
|
const names = /* @__PURE__ */ new Set([options.source]);
|
|
13646
14127
|
for (const b of blocks) {
|
|
@@ -14424,7 +14905,7 @@ function callable(fn) {
|
|
|
14424
14905
|
}
|
|
14425
14906
|
|
|
14426
14907
|
// node_modules/@dogsbay/minja/dist/template/methods.js
|
|
14427
|
-
var
|
|
14908
|
+
var str2 = (name, v, what = "argument") => {
|
|
14428
14909
|
if (v instanceof SafeString)
|
|
14429
14910
|
return v.value;
|
|
14430
14911
|
if (typeof v !== "string")
|
|
@@ -14465,7 +14946,7 @@ function split(s, sep2, maxsplit, fromRight, name) {
|
|
|
14465
14946
|
const rest = s.trimEnd().replace(new RegExp(`(?:\\s+\\S+){${max}}$`), "");
|
|
14466
14947
|
return [rest, ...tail];
|
|
14467
14948
|
}
|
|
14468
|
-
const by =
|
|
14949
|
+
const by = str2(name, sep2, "separator");
|
|
14469
14950
|
if (by === "")
|
|
14470
14951
|
throw new TemplateRuntimeError(`${name}(): empty separator`);
|
|
14471
14952
|
const parts = s.split(by);
|
|
@@ -14474,7 +14955,7 @@ function split(s, sep2, maxsplit, fromRight, name) {
|
|
|
14474
14955
|
return fromRight ? [parts.slice(0, parts.length - max).join(by), ...parts.slice(parts.length - max)] : [...parts.slice(0, max), parts.slice(max).join(by)];
|
|
14475
14956
|
}
|
|
14476
14957
|
function strip(s, chars, left, right, name) {
|
|
14477
|
-
const set = chars === void 0 || chars === null ? void 0 : new Set(
|
|
14958
|
+
const set = chars === void 0 || chars === null ? void 0 : new Set(str2(name, chars));
|
|
14478
14959
|
const drop = (c) => set ? set.has(c) : /\s/.test(c);
|
|
14479
14960
|
let a = 0;
|
|
14480
14961
|
let b = s.length;
|
|
@@ -14487,7 +14968,7 @@ function strip(s, chars, left, right, name) {
|
|
|
14487
14968
|
return s.slice(a, b);
|
|
14488
14969
|
}
|
|
14489
14970
|
function affixes(name, v) {
|
|
14490
|
-
return [
|
|
14971
|
+
return [str2(name, v)];
|
|
14491
14972
|
}
|
|
14492
14973
|
var STRING = {
|
|
14493
14974
|
split: (s, args, kwargs) => split(s, ...params("split", ["sep", "maxsplit"], args, kwargs), false, "split"),
|
|
@@ -14509,8 +14990,8 @@ var STRING = {
|
|
|
14509
14990
|
capitalize: (s, args, kwargs) => (params("capitalize", [], args, kwargs), s.charAt(0).toUpperCase() + s.slice(1).toLowerCase()),
|
|
14510
14991
|
replace: (s, args, kwargs, state) => {
|
|
14511
14992
|
const [from, to, count] = params("replace", ["old", "new", "count"], args, kwargs);
|
|
14512
|
-
const a =
|
|
14513
|
-
const b =
|
|
14993
|
+
const a = str2("replace", from);
|
|
14994
|
+
const b = str2("replace", to);
|
|
14514
14995
|
const n = count === void 0 || count === null ? -1 : int("replace", count);
|
|
14515
14996
|
const pieces = a === "" ? ["", ...s, ""] : s.split(a);
|
|
14516
14997
|
const joins = pieces.length - 1;
|
|
@@ -14520,9 +15001,9 @@ var STRING = {
|
|
|
14520
15001
|
return pieces.slice(1, -1).reduce((out, c, i) => out + (i < replaced ? b : "") + c, "") + (replaced > s.length ? b : "");
|
|
14521
15002
|
return pieces.slice(0, replaced + 1).join(b) + (replaced < joins ? a + pieces.slice(replaced + 1).join(a) : "");
|
|
14522
15003
|
},
|
|
14523
|
-
find: (s, args, kwargs) => s.indexOf(
|
|
15004
|
+
find: (s, args, kwargs) => s.indexOf(str2("find", params("find", ["sub"], args, kwargs)[0])),
|
|
14524
15005
|
count: (s, args, kwargs) => {
|
|
14525
|
-
const sub =
|
|
15006
|
+
const sub = str2("count", params("count", ["sub"], args, kwargs)[0]);
|
|
14526
15007
|
return sub === "" ? s.length + 1 : s.split(sub).length - 1;
|
|
14527
15008
|
},
|
|
14528
15009
|
join: (s, args, kwargs, state) => {
|
|
@@ -14531,7 +15012,7 @@ var STRING = {
|
|
|
14531
15012
|
if (!xs)
|
|
14532
15013
|
throw new TemplateRuntimeError(`join() needs a list, not ${typeName(items3)}`);
|
|
14533
15014
|
state.budget.spend(xs.length * s.length);
|
|
14534
|
-
return xs.map((x, i) =>
|
|
15015
|
+
return xs.map((x, i) => str2("join", x, `item ${i}`)).join(s);
|
|
14535
15016
|
},
|
|
14536
15017
|
zfill: (s, args, kwargs, state) => {
|
|
14537
15018
|
const width = int("zfill", params("zfill", ["width"], args, kwargs)[0]);
|
|
@@ -15370,7 +15851,7 @@ var MORE_TESTS = {
|
|
|
15370
15851
|
};
|
|
15371
15852
|
|
|
15372
15853
|
// node_modules/@dogsbay/minja/dist/template/filters.js
|
|
15373
|
-
function
|
|
15854
|
+
function str3(v) {
|
|
15374
15855
|
return toText(v);
|
|
15375
15856
|
}
|
|
15376
15857
|
function items2(v) {
|
|
@@ -15402,7 +15883,7 @@ function bind2(filter2, params2, args, kwargs, defaults = []) {
|
|
|
15402
15883
|
return out;
|
|
15403
15884
|
}
|
|
15404
15885
|
function mapText(v, f) {
|
|
15405
|
-
return v instanceof SafeString ? new SafeString(f(v.value)) : f(
|
|
15886
|
+
return v instanceof SafeString ? new SafeString(f(v.value)) : f(str3(v));
|
|
15406
15887
|
}
|
|
15407
15888
|
function htmlSafeJson(root) {
|
|
15408
15889
|
const seen = /* @__PURE__ */ new Set();
|
|
@@ -15446,9 +15927,9 @@ function htmlSafeJson(root) {
|
|
|
15446
15927
|
}
|
|
15447
15928
|
function urlencode(v) {
|
|
15448
15929
|
if (isMapping(v)) {
|
|
15449
|
-
return Object.keys(v).filter((k) => v[k] !== void 0 && v[k] !== null).map((k) => `${encodeURIComponent(k)}=${encodeURIComponent(
|
|
15930
|
+
return Object.keys(v).filter((k) => v[k] !== void 0 && v[k] !== null).map((k) => `${encodeURIComponent(k)}=${encodeURIComponent(str3(v[k]))}`).join("&");
|
|
15450
15931
|
}
|
|
15451
|
-
return encodeURIComponent(
|
|
15932
|
+
return encodeURIComponent(str3(v)).replace(/%2F/g, "/");
|
|
15452
15933
|
}
|
|
15453
15934
|
function replaceText(src, from, to, count) {
|
|
15454
15935
|
if (typeof count !== "number")
|
|
@@ -15553,7 +16034,7 @@ var BUILTIN_FILTERS = {
|
|
|
15553
16034
|
e: escapeFilter,
|
|
15554
16035
|
safe: (v, args, kwargs) => {
|
|
15555
16036
|
bind2("safe", [], args, kwargs);
|
|
15556
|
-
return v instanceof SafeString ? v : new SafeString(
|
|
16037
|
+
return v instanceof SafeString ? v : new SafeString(str3(v));
|
|
15557
16038
|
},
|
|
15558
16039
|
length: lengthFilter,
|
|
15559
16040
|
count: lengthFilter,
|
|
@@ -15571,10 +16052,10 @@ var BUILTIN_FILTERS = {
|
|
|
15571
16052
|
const xs = attr === void 0 || attr === null ? items2(v) : items2(v).map((x) => mapAttribute(x, attr, state));
|
|
15572
16053
|
state.budget.spend(xs.length);
|
|
15573
16054
|
if (state.autoescape && (sep2 instanceof SafeString || xs.some((x) => x instanceof SafeString))) {
|
|
15574
|
-
const s = sep2 instanceof SafeString ? sep2.value : escapeHtml2(
|
|
16055
|
+
const s = sep2 instanceof SafeString ? sep2.value : escapeHtml2(str3(sep2));
|
|
15575
16056
|
return new SafeString(xs.map((x) => escapeValue(x).value).join(s));
|
|
15576
16057
|
}
|
|
15577
|
-
return xs.map(
|
|
16058
|
+
return xs.map(str3).join(str3(sep2));
|
|
15578
16059
|
},
|
|
15579
16060
|
replace: (v, args, kwargs, state) => {
|
|
15580
16061
|
const [from, to, count] = bind2("replace", ["old", "new", "count"], args, kwargs);
|
|
@@ -15582,7 +16063,7 @@ var BUILTIN_FILTERS = {
|
|
|
15582
16063
|
const h = (x) => escapeValue(x).value;
|
|
15583
16064
|
return new SafeString(replaceText(h(v), h(from), h(to), count));
|
|
15584
16065
|
}
|
|
15585
|
-
return replaceText(
|
|
16066
|
+
return replaceText(str3(v), str3(from), str3(to), count);
|
|
15586
16067
|
},
|
|
15587
16068
|
items: (v, args, kwargs, state) => {
|
|
15588
16069
|
bind2("items", [], args, kwargs);
|
|
@@ -15733,7 +16214,7 @@ function lineIndex(src) {
|
|
|
15733
16214
|
return lo + 1;
|
|
15734
16215
|
};
|
|
15735
16216
|
}
|
|
15736
|
-
function lex(src, name,
|
|
16217
|
+
function lex(src, name, lineAt2) {
|
|
15737
16218
|
const tags = [];
|
|
15738
16219
|
let pos = 0;
|
|
15739
16220
|
let stripNext = false;
|
|
@@ -15762,14 +16243,14 @@ function lex(src, name, lineAt) {
|
|
|
15762
16243
|
if (kind === "#") {
|
|
15763
16244
|
const end2 = src.indexOf("#}", bodyStart);
|
|
15764
16245
|
if (end2 < 0)
|
|
15765
|
-
throw new TemplateError("Unclosed comment", name,
|
|
16246
|
+
throw new TemplateError("Unclosed comment", name, lineAt2(start));
|
|
15766
16247
|
stripNext = src[end2 - 1] === "-" && end2 - 1 >= bodyStart;
|
|
15767
16248
|
pos = end2 + 2;
|
|
15768
16249
|
continue;
|
|
15769
16250
|
}
|
|
15770
16251
|
const end = findClose(src, bodyStart, kind === "{" ? "}}" : "%}");
|
|
15771
16252
|
if (end < 0)
|
|
15772
|
-
throw new TemplateError(`Unclosed ${kind === "{" ? "expression" : "statement"} tag`, name,
|
|
16253
|
+
throw new TemplateError(`Unclosed ${kind === "{" ? "expression" : "statement"} tag`, name, lineAt2(start));
|
|
15773
16254
|
const rightStrip = src[end - 1] === "-" && end - 1 >= bodyStart;
|
|
15774
16255
|
const inner = src.slice(bodyStart, rightStrip ? end - 1 : end);
|
|
15775
16256
|
pos = end + 2;
|
|
@@ -15778,7 +16259,7 @@ function lex(src, name, lineAt) {
|
|
|
15778
16259
|
RAW_END.lastIndex = pos;
|
|
15779
16260
|
const m = RAW_END.exec(src);
|
|
15780
16261
|
if (!m)
|
|
15781
|
-
throw new TemplateError("Missing endraw", name,
|
|
16262
|
+
throw new TemplateError("Missing endraw", name, lineAt2(start));
|
|
15782
16263
|
let raw = src.slice(pos, m.index);
|
|
15783
16264
|
if (stripNext)
|
|
15784
16265
|
raw = raw.replace(/^\s+/, "");
|
|
@@ -15797,11 +16278,11 @@ function lex(src, name, lineAt) {
|
|
|
15797
16278
|
function parseTemplate(source, name = "<string>", options = {}) {
|
|
15798
16279
|
const normalized = source.replace(/\r\n?/g, "\n");
|
|
15799
16280
|
const src = !options.keepTrailingNewline && normalized.endsWith("\n") ? normalized.slice(0, -1) : normalized;
|
|
15800
|
-
const
|
|
15801
|
-
const tags = lex(src, name,
|
|
16281
|
+
const lineAt2 = lineIndex(src);
|
|
16282
|
+
const tags = lex(src, name, lineAt2);
|
|
15802
16283
|
let i = 0;
|
|
15803
16284
|
const fail4 = (message, pos) => {
|
|
15804
|
-
throw new TemplateError(message, name,
|
|
16285
|
+
throw new TemplateError(message, name, lineAt2(pos));
|
|
15805
16286
|
};
|
|
15806
16287
|
const withParser = (tag, f) => {
|
|
15807
16288
|
try {
|
|
@@ -15829,7 +16310,7 @@ function parseTemplate(source, name = "<string>", options = {}) {
|
|
|
15829
16310
|
p.expectEnd();
|
|
15830
16311
|
return e;
|
|
15831
16312
|
});
|
|
15832
|
-
nodes.push({ type: "output", expr, line:
|
|
16313
|
+
nodes.push({ type: "output", expr, line: lineAt2(tag.pos) });
|
|
15833
16314
|
i++;
|
|
15834
16315
|
continue;
|
|
15835
16316
|
}
|
|
@@ -15844,7 +16325,7 @@ function parseTemplate(source, name = "<string>", options = {}) {
|
|
|
15844
16325
|
return { nodes, end: "" };
|
|
15845
16326
|
}
|
|
15846
16327
|
function parseStatement(kw, tag) {
|
|
15847
|
-
const line =
|
|
16328
|
+
const line = lineAt2(tag.pos);
|
|
15848
16329
|
switch (kw) {
|
|
15849
16330
|
case "if": {
|
|
15850
16331
|
const branches = [];
|
|
@@ -16489,7 +16970,7 @@ var TemplatePageError = class extends Error {
|
|
|
16489
16970
|
}
|
|
16490
16971
|
};
|
|
16491
16972
|
var HASH_SENTINEL = " DBTPL_HASH_OPEN ";
|
|
16492
|
-
var ATTRIBUTE_BLOCK_OPEN = /\{#(?=[\p{L}\p{N}_
|
|
16973
|
+
var ATTRIBUTE_BLOCK_OPEN = /\{#(?=(?:[\p{L}\p{N}_]|-(?!\s))[^}\n]*\})(?![^}\n]*#\})/gu;
|
|
16493
16974
|
var mask = (s) => maskMinjaInCode(s).replace(ATTRIBUTE_BLOCK_OPEN, `{${HASH_SENTINEL}`);
|
|
16494
16975
|
var unmask = (s) => unmaskMinjaInCode(s).split(HASH_SENTINEL).join("#");
|
|
16495
16976
|
function declaresParams(fm) {
|
|
@@ -16598,16 +17079,16 @@ var TemplatePages = class {
|
|
|
16598
17079
|
* TemplatePageError. `firstLine` is the body's first line in the FILE, so
|
|
16599
17080
|
* errors name the line an author sees (the front matter is not rendered).
|
|
16600
17081
|
*/
|
|
16601
|
-
async render(body, path,
|
|
17082
|
+
async render(body, path, meta2, options = {}) {
|
|
16602
17083
|
const pad = Math.max(0, (options.firstLine ?? 1) - 1);
|
|
16603
|
-
let out = await this.run("\n".repeat(pad) + body, path,
|
|
17084
|
+
let out = await this.run("\n".repeat(pad) + body, path, meta2, options.onDataRead);
|
|
16604
17085
|
if (pad)
|
|
16605
17086
|
out = out.replace(new RegExp(`^\\n{0,${pad}}`), "");
|
|
16606
17087
|
return joinEmptiedMarkers(stripFenceMinjaMarkers(stripInlineMinjaMarkers(out)));
|
|
16607
17088
|
}
|
|
16608
17089
|
/** Render a front-matter field (a title, a description) strictly. Throws TemplatePageError. */
|
|
16609
|
-
async renderField(text4, path,
|
|
16610
|
-
return this.run(text4, path,
|
|
17090
|
+
async renderField(text4, path, meta2) {
|
|
17091
|
+
return this.run(text4, path, meta2);
|
|
16611
17092
|
}
|
|
16612
17093
|
/**
|
|
16613
17094
|
* Load the data files a template names. A name with no file is left out (`data.x` may be
|
|
@@ -16672,13 +17153,13 @@ var TemplatePages = class {
|
|
|
16672
17153
|
ownKeys: (t) => (paths.forEach((p) => onRead(p)), Reflect.ownKeys(t))
|
|
16673
17154
|
});
|
|
16674
17155
|
}
|
|
16675
|
-
async run(text4, path,
|
|
17156
|
+
async run(text4, path, meta2, onDataRead) {
|
|
16676
17157
|
if (this.loaded > (this.options.maxCachedTemplates ?? 1e3)) {
|
|
16677
17158
|
this.env.invalidate();
|
|
16678
17159
|
this.loaded = 0;
|
|
16679
17160
|
}
|
|
16680
17161
|
await this.preloadData(text4);
|
|
16681
|
-
const context = { ...withUnderscoreAliases(this.options.attributes ?? {}), page: { meta, path } };
|
|
17162
|
+
const context = { ...withUnderscoreAliases(this.options.attributes ?? {}), page: { meta: meta2, path } };
|
|
16682
17163
|
if (this.options.data) {
|
|
16683
17164
|
if (!Object.prototype.hasOwnProperty.call(context, "data"))
|
|
16684
17165
|
context.data = this.dataFor(onDataRead);
|
|
@@ -17135,7 +17616,7 @@ function apiPropertiesHtml(list5) {
|
|
|
17135
17616
|
}
|
|
17136
17617
|
|
|
17137
17618
|
// node_modules/@dogsbay/render-html/dist/api.js
|
|
17138
|
-
var
|
|
17619
|
+
var str4 = (v) => v == null || v === "" ? void 0 : String(v);
|
|
17139
17620
|
var list3 = (v) => Array.isArray(v) ? v.filter((x) => x && typeof x === "object") : [];
|
|
17140
17621
|
var API_NODE_TYPES = /* @__PURE__ */ new Set(["api-class", "api-member", "api-doc", "api-params", "api-source", "endpoint"]);
|
|
17141
17622
|
function renderApiNode2(n, ctx) {
|
|
@@ -17144,7 +17625,7 @@ function renderApiNode2(n, ctx) {
|
|
|
17144
17625
|
case "api-member":
|
|
17145
17626
|
return apiSymbol(n, ctx);
|
|
17146
17627
|
case "api-doc":
|
|
17147
|
-
return docSegments(
|
|
17628
|
+
return docSegments(str4(n.props?.html) ?? "", "[&>p:first-child]:mt-0 [&>p:last-child]:mb-2", ctx);
|
|
17148
17629
|
case "api-params":
|
|
17149
17630
|
return apiParams(n, ctx);
|
|
17150
17631
|
case "api-source":
|
|
@@ -17157,9 +17638,9 @@ function renderApiNode2(n, ctx) {
|
|
|
17157
17638
|
}
|
|
17158
17639
|
function apiSymbol(n, ctx) {
|
|
17159
17640
|
const p = n.props ?? {};
|
|
17160
|
-
const name =
|
|
17161
|
-
const kind =
|
|
17162
|
-
const signature =
|
|
17641
|
+
const name = str4(p.name) ?? "";
|
|
17642
|
+
const kind = str4(p.kind) ?? "func";
|
|
17643
|
+
const signature = str4(p.signature);
|
|
17163
17644
|
const bases = Array.isArray(p.bases) ? p.bases.map(String) : [];
|
|
17164
17645
|
const level = Math.min(6, (ctx.apiParentLevel ?? ctx.lastHeadingLevel ?? 1) + 1);
|
|
17165
17646
|
const badgeKind = kind === "method" ? "meth" : kind;
|
|
@@ -17198,9 +17679,9 @@ function docSegments(html, edges, ctx) {
|
|
|
17198
17679
|
}
|
|
17199
17680
|
function apiParams(n, ctx) {
|
|
17200
17681
|
const rows = list3(n.props?.params).map((p) => {
|
|
17201
|
-
const type =
|
|
17202
|
-
const dflt =
|
|
17203
|
-
return `<tr class="border-b border-border/50"><td class="py-3 px-4 align-top"><code class="text-sm font-medium">${esc(
|
|
17682
|
+
const type = str4(p.type);
|
|
17683
|
+
const dflt = str4(p.default);
|
|
17684
|
+
return `<tr class="border-b border-border/50"><td class="py-3 px-4 align-top"><code class="text-sm font-medium">${esc(str4(p.name) ?? "")}</code></td><td class="py-3 px-4 align-top">${docSegments(str4(p.docHtml) ?? "", "[&>p:first-child]:mt-0 [&>p:last-child]:mb-0", ctx)}<div class="flex items-center gap-4 mt-2 text-xs text-muted-foreground">` + (type ? `<span><strong>TYPE:</strong> <code class="text-xs">${esc(type)}</code></span>` : "") + (dflt ? `<span class="ml-auto"><strong>DEFAULT:</strong> <code class="text-xs">${esc(dflt)}</code></span>` : "") + `</div></td></tr>`;
|
|
17204
17685
|
}).join("");
|
|
17205
17686
|
const th = "py-3 px-4 text-left font-semibold text-muted-foreground uppercase tracking-wider text-xs";
|
|
17206
17687
|
return `<table class="api-params w-full text-sm border-collapse"><thead><tr class="border-b border-border"><th class="${th} w-[140px]">Parameter</th><th class="${th}">Description</th></tr></thead><tbody>${rows}</tbody></table>
|
|
@@ -17208,10 +17689,10 @@ function apiParams(n, ctx) {
|
|
|
17208
17689
|
}
|
|
17209
17690
|
function apiSource(n, ctx) {
|
|
17210
17691
|
const p = n.props ?? {};
|
|
17211
|
-
const file2 =
|
|
17692
|
+
const file2 = str4(p.file);
|
|
17212
17693
|
const line = Number(p.line) || void 0;
|
|
17213
17694
|
const label = file2 ? `Source code in ${file2}${line ? `, line ${line}` : ""}` : "Source code";
|
|
17214
|
-
return `<details class="api-source"><summary>${esc(label)}</summary>${codeHtml(
|
|
17695
|
+
return `<details class="api-source"><summary>${esc(label)}</summary>${codeHtml(str4(p.code) ?? "", "python", ctx)}</details>
|
|
17215
17696
|
`;
|
|
17216
17697
|
}
|
|
17217
17698
|
var METHODS = ["get", "post", "put", "patch", "delete", "head"];
|
|
@@ -17241,10 +17722,10 @@ var TYPE_TINT = {
|
|
|
17241
17722
|
null: "bg-muted/20 text-muted-foreground"
|
|
17242
17723
|
};
|
|
17243
17724
|
function propertyItem(p, level, ctx) {
|
|
17244
|
-
const name = esc(
|
|
17245
|
-
const type =
|
|
17246
|
-
const format =
|
|
17247
|
-
const description =
|
|
17725
|
+
const name = esc(str4(p.name) ?? "");
|
|
17726
|
+
const type = str4(p.type) ?? "";
|
|
17727
|
+
const format = str4(p.format);
|
|
17728
|
+
const description = str4(p.description);
|
|
17248
17729
|
const children = list3(p.properties).length ? list3(p.properties) : list3(p.items);
|
|
17249
17730
|
const indent2 = level * 16;
|
|
17250
17731
|
const badge = `<span class="rounded px-1.5 py-0.5 text-[10px] font-medium ${Object.hasOwn(TYPE_TINT, type) ? TYPE_TINT[type] : TYPE_TINT.string}">${esc(type)}${format ? esc(` <${format}>`) : ""}</span>` + (p.nullable === true ? '<span class="text-muted-foreground text-[10px]">nullable</span>' : "");
|
|
@@ -17290,7 +17771,7 @@ function responseTabs(responses, ctx) {
|
|
|
17290
17771
|
const values = distinct(responses.map((r) => String(r.status ?? "")));
|
|
17291
17772
|
return tabGroup(responses.map((r, i) => {
|
|
17292
17773
|
const status = String(r.status ?? "");
|
|
17293
|
-
const description =
|
|
17774
|
+
const description = str4(r.description);
|
|
17294
17775
|
return {
|
|
17295
17776
|
value: values[i],
|
|
17296
17777
|
label: `<span class="rounded px-1.5 py-0.5 text-xs font-mono font-bold ${statusTint(status)}">${esc(status)}</span>`,
|
|
@@ -17312,13 +17793,13 @@ var SAMPLE_LABELS = {
|
|
|
17312
17793
|
};
|
|
17313
17794
|
var sampleLang = (language) => language === "curl" ? "bash" : language;
|
|
17314
17795
|
function codeSamples(samples, ctx) {
|
|
17315
|
-
const values = distinct(samples.map((s) =>
|
|
17796
|
+
const values = distinct(samples.map((s) => str4(s.language) ?? ""));
|
|
17316
17797
|
return tabGroup(samples.map((s, i) => {
|
|
17317
|
-
const language =
|
|
17798
|
+
const language = str4(s.language) ?? "";
|
|
17318
17799
|
return {
|
|
17319
17800
|
value: values[i],
|
|
17320
|
-
label: esc(
|
|
17321
|
-
body: () => codeHtml(
|
|
17801
|
+
label: esc(str4(s.label) ?? SAMPLE_LABELS[language] ?? language),
|
|
17802
|
+
body: () => codeHtml(str4(s.code) ?? "", sampleLang(language), ctx)
|
|
17322
17803
|
};
|
|
17323
17804
|
}), ctx, TABS_ROOT);
|
|
17324
17805
|
}
|
|
@@ -17360,16 +17841,16 @@ function codePanels(p) {
|
|
|
17360
17841
|
for (const r of list3(p.responses)) {
|
|
17361
17842
|
if (r.example === void 0)
|
|
17362
17843
|
continue;
|
|
17363
|
-
out.push({ title: `Response ${String(r.status ?? "")}`, code: JSON.stringify(r.example, null, 2), lang: exampleLang(
|
|
17844
|
+
out.push({ title: `Response ${String(r.status ?? "")}`, code: JSON.stringify(r.example, null, 2), lang: exampleLang(str4(r.contentType)) });
|
|
17364
17845
|
}
|
|
17365
17846
|
return out;
|
|
17366
17847
|
}
|
|
17367
17848
|
function endpoint(n, ctx) {
|
|
17368
17849
|
const p = n.props ?? {};
|
|
17369
|
-
const method = (
|
|
17370
|
-
const path =
|
|
17371
|
-
const baseUrl =
|
|
17372
|
-
const summary =
|
|
17850
|
+
const method = (str4(p.method) ?? "get").toLowerCase();
|
|
17851
|
+
const path = str4(p.path) ?? "";
|
|
17852
|
+
const baseUrl = str4(p.baseUrl) ?? "";
|
|
17853
|
+
const summary = str4(p.summary);
|
|
17373
17854
|
const description = typeof p.description === "string" && p.description && p.description !== p.summary ? apiBlockHtml(p.description) : void 0;
|
|
17374
17855
|
const deprecated = p.deprecated === true;
|
|
17375
17856
|
const parameters = list3(apiPropertiesHtml(p.parameters));
|
|
@@ -17388,15 +17869,15 @@ function apiCodeInputs(n) {
|
|
|
17388
17869
|
switch (n.type) {
|
|
17389
17870
|
case "api-class":
|
|
17390
17871
|
case "api-member":
|
|
17391
|
-
return
|
|
17872
|
+
return str4(p.signature) ? [{ lang: "python", code: String(p.signature) }] : [];
|
|
17392
17873
|
case "api-source":
|
|
17393
|
-
return [{ lang: "python", code:
|
|
17874
|
+
return [{ lang: "python", code: str4(p.code) ?? "" }];
|
|
17394
17875
|
case "api-doc":
|
|
17395
|
-
return fromHtml(
|
|
17876
|
+
return fromHtml(str4(p.html));
|
|
17396
17877
|
case "api-params":
|
|
17397
|
-
return list3(p.params).flatMap((x) => fromHtml(
|
|
17878
|
+
return list3(p.params).flatMap((x) => fromHtml(str4(x.docHtml)));
|
|
17398
17879
|
case "endpoint":
|
|
17399
|
-
return codePanels(p).flatMap((c) => c.samples ? c.samples.map((s) => ({ lang: sampleLang(
|
|
17880
|
+
return codePanels(p).flatMap((c) => c.samples ? c.samples.map((s) => ({ lang: sampleLang(str4(s.language) ?? ""), code: str4(s.code) ?? "" })) : [{ lang: c.lang, code: c.code }]);
|
|
17400
17881
|
default:
|
|
17401
17882
|
return [];
|
|
17402
17883
|
}
|
|
@@ -17430,10 +17911,8 @@ function renderMath(latex, display, ctx) {
|
|
|
17430
17911
|
return `<code class="text-destructive">${esc(latex)}</code>`;
|
|
17431
17912
|
}
|
|
17432
17913
|
}
|
|
17433
|
-
var RESERVED_ID = /^(db-|tab-\d|tabpanel-\d|acc-\d|accpanel-\d|fn-|fnref-)/;
|
|
17434
17914
|
function uniqueId(ctx, base) {
|
|
17435
|
-
|
|
17436
|
-
base = `h-${base}`;
|
|
17915
|
+
base = pageId(base);
|
|
17437
17916
|
let id = base || "section";
|
|
17438
17917
|
let n = 1;
|
|
17439
17918
|
while (ctx.ids.has(id))
|
|
@@ -17449,6 +17928,17 @@ function renderInline2(nodes, ctx) {
|
|
|
17449
17928
|
out += inline(n, ctx);
|
|
17450
17929
|
return out;
|
|
17451
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
|
+
}
|
|
17452
17942
|
function decorate(html, n) {
|
|
17453
17943
|
if (n.strikethrough)
|
|
17454
17944
|
html = `<del>${html}</del>`;
|
|
@@ -17463,7 +17953,7 @@ function inline(n, ctx) {
|
|
|
17463
17953
|
return inlineSegmentsToHtml(n.segments ?? []);
|
|
17464
17954
|
switch (n.type) {
|
|
17465
17955
|
case "text":
|
|
17466
|
-
return decorate(esc(n.text), n);
|
|
17956
|
+
return decorate(n.variables?.length ? withVariables(n.text, n.variables) : esc(n.text), n);
|
|
17467
17957
|
case "code":
|
|
17468
17958
|
return decorate(`<code>${esc(n.text)}</code>`, n);
|
|
17469
17959
|
case "link": {
|
|
@@ -17614,21 +18104,12 @@ function proseHeadings(html, ctx) {
|
|
|
17614
18104
|
return `<h${lvl}${at.replace(idm[0], ` id="${esc(id)}"`)}>${inner}</h${lvl}>`;
|
|
17615
18105
|
});
|
|
17616
18106
|
}
|
|
17617
|
-
var
|
|
17618
|
-
function planHeadingIds(nodes, out) {
|
|
17619
|
-
for (const n of nodes) {
|
|
17620
|
-
if (n.type === "heading")
|
|
17621
|
-
out.add(str4(n.props?.id) ?? str4(n.props?.slug) ?? slugify(inlineText2(n.inline)));
|
|
17622
|
-
if (n.children)
|
|
17623
|
-
planHeadingIds(n.children, out);
|
|
17624
|
-
}
|
|
17625
|
-
return out;
|
|
17626
|
-
}
|
|
18107
|
+
var pageIds = /* @__PURE__ */ new WeakMap();
|
|
17627
18108
|
function renderBlocks(nodes, ctx) {
|
|
17628
18109
|
if (!nodes)
|
|
17629
18110
|
return "";
|
|
17630
|
-
if (!
|
|
17631
|
-
|
|
18111
|
+
if (!pageIds.has(ctx))
|
|
18112
|
+
pageIds.set(ctx, headingIds(nodes, { reserved: ctx.ids }));
|
|
17632
18113
|
let out = "";
|
|
17633
18114
|
for (const n of nodes) {
|
|
17634
18115
|
const html = markedBlock(n, ctx);
|
|
@@ -17724,8 +18205,20 @@ function withSourceAttrs(html, n, ctx) {
|
|
|
17724
18205
|
const { kept, end } = dropAttrs(html, m[0].length, new Set(added.map(([name]) => name)));
|
|
17725
18206
|
return `${m[0]}${added.map(([name, value]) => ` ${name}="${value}"`).join("")}${kept}${html.slice(end)}`;
|
|
17726
18207
|
}
|
|
18208
|
+
function keyValueList(list5, ctx) {
|
|
18209
|
+
const parts = (list5.children ?? []).map((c) => {
|
|
18210
|
+
if (c.type === "dt")
|
|
18211
|
+
return `<dt data-part="label">${renderInline2(c.inline, ctx)}</dt>`;
|
|
18212
|
+
if (c.type === "dd")
|
|
18213
|
+
return `<dd data-part="value">${itemBody(c, ctx)}</dd>`;
|
|
18214
|
+
return renderBlocks([c], ctx);
|
|
18215
|
+
}).join("");
|
|
18216
|
+
const html = `<dl${attrs({ ...passthrough(list5.props ?? {}), "data-part": "list" })}>${parts}</dl>
|
|
18217
|
+
`;
|
|
18218
|
+
return ctx.dataLines || ctx.blockIds ? withSourceAttrs(html, list5, ctx) : html;
|
|
18219
|
+
}
|
|
17727
18220
|
var COLUMNS_STYLE = "columns:var(--db-columns) 14rem;column-gap:var(--db-column-gap)";
|
|
17728
|
-
var
|
|
18221
|
+
var str5 = (v) => v == null || v === "" ? void 0 : String(v);
|
|
17729
18222
|
function itemBody(n, ctx) {
|
|
17730
18223
|
const lead = n.inline && n.inline.length ? `<p>${renderInline2(n.inline, ctx)}</p>` : "";
|
|
17731
18224
|
return lead + renderBlocks(n.children, ctx);
|
|
@@ -17765,7 +18258,8 @@ function block(n, ctx) {
|
|
|
17765
18258
|
case "heading": {
|
|
17766
18259
|
const level = Math.min(6, Math.max(1, Number(p.level) || 2));
|
|
17767
18260
|
const text4 = inlineText2(n.inline);
|
|
17768
|
-
const
|
|
18261
|
+
const given = pageIds.get(ctx)?.get(n)?.id || str5(n.meta?.pageId);
|
|
18262
|
+
const id = given && !ctx.ids.has(given) ? (ctx.ids.add(given), given) : uniqueId(ctx, given ?? str5(p.id) ?? str5(p.slug) ?? slugify(text4));
|
|
17769
18263
|
if (level === 2 || level === 3)
|
|
17770
18264
|
ctx.headings.push({ depth: level, id, text: text4 });
|
|
17771
18265
|
if (ctx.apiParentLevel === void 0)
|
|
@@ -17805,7 +18299,7 @@ function block(n, ctx) {
|
|
|
17805
18299
|
return `<tr${attrs(passthrough(p, "border-b transition-colors hover:bg-muted/50"))}>${renderBlocks(n.children, ctx)}</tr>`;
|
|
17806
18300
|
case "th":
|
|
17807
18301
|
case "td": {
|
|
17808
|
-
const align = /^(left|center|right)$/i.test(
|
|
18302
|
+
const align = /^(left|center|right)$/i.test(str5(p.align) ?? "") ? str5(p.align).toLowerCase() : void 0;
|
|
17809
18303
|
const cls = n.type === "th" ? "px-2 py-2 text-left align-bottom font-semibold text-muted-foreground" : "p-2 align-top";
|
|
17810
18304
|
const body = `${renderInline2(n.inline, ctx)}${renderBlocks(n.children, ctx)}`;
|
|
17811
18305
|
const tag = n.type === "th" && !body.trim() ? "td" : n.type;
|
|
@@ -17822,7 +18316,7 @@ function block(n, ctx) {
|
|
|
17822
18316
|
return `<section class="footnotes mt-12 border-t pt-6 text-sm text-muted-foreground" role="doc-endnotes" aria-label="Footnotes"><ol>${renderBlocks(n.children, ctx)}</ol></section>
|
|
17823
18317
|
`;
|
|
17824
18318
|
case "footnote-def": {
|
|
17825
|
-
const label = esc(
|
|
18319
|
+
const label = esc(str5(p.label) ?? "");
|
|
17826
18320
|
const body = n.inline?.length ? `<p>${renderInline2(n.inline, ctx)} <a href="#fnref-${label}" class="text-primary no-underline" role="doc-backlink" aria-label="${esc(ctx.t("backToContent"))}">\u21A9</a></p>` : "";
|
|
17827
18321
|
return `<li id="fn-${label}">${body}${renderBlocks(n.children, ctx)}</li>`;
|
|
17828
18322
|
}
|
|
@@ -17844,8 +18338,8 @@ function block(n, ctx) {
|
|
|
17844
18338
|
case "accordion":
|
|
17845
18339
|
return renderAroundGroup(n, "accordion-item", (g) => accordion(g, ctx), (c) => renderBlocks([c], ctx), "");
|
|
17846
18340
|
case "accordion-item": {
|
|
17847
|
-
const { line: _line, block: _block, ...
|
|
17848
|
-
return accordion({ type: "accordion", children: [{ ...n, meta }] }, ctx);
|
|
18341
|
+
const { line: _line, block: _block, ...meta2 } = n.meta ?? {};
|
|
18342
|
+
return accordion({ type: "accordion", children: [{ ...n, meta: meta2 }] }, ctx);
|
|
17849
18343
|
}
|
|
17850
18344
|
case "details":
|
|
17851
18345
|
return details(n, ctx);
|
|
@@ -17864,7 +18358,7 @@ function block(n, ctx) {
|
|
|
17864
18358
|
case "example":
|
|
17865
18359
|
return example(n, ctx);
|
|
17866
18360
|
case "cards": {
|
|
17867
|
-
const tone =
|
|
18361
|
+
const tone = str5(p.tone);
|
|
17868
18362
|
const kids = tone ? (n.children ?? []).map((c) => c.type === "card" && !c.props?.tone ? { ...c, props: { ...c.props, tone } } : c) : n.children;
|
|
17869
18363
|
const cols = Math.min(6, Math.max(1, Math.round(Number(String(p.cols ?? "").replace(/[[\]\s]/g, "").split(",").pop()) || 2)));
|
|
17870
18364
|
return `<div${attrs(passthrough(p, `my-4 grid grid-cols-1 gap-4 ${GRID_COLS[cols]}`))}>${renderBlocks(kids, ctx)}</div>
|
|
@@ -17872,12 +18366,12 @@ function block(n, ctx) {
|
|
|
17872
18366
|
}
|
|
17873
18367
|
// A scoped theme: `.dark` re-declares the tokens for its subtree (THEME_SCOPES)
|
|
17874
18368
|
case "theme": {
|
|
17875
|
-
const scope = lookup(THEME_SCOPES,
|
|
18369
|
+
const scope = lookup(THEME_SCOPES, str5(p.name));
|
|
17876
18370
|
if (!scope) {
|
|
17877
|
-
ctx.unknown.add(`theme "${
|
|
18371
|
+
ctx.unknown.add(`theme "${str5(p.name) ?? ""}"`);
|
|
17878
18372
|
return renderBlocks(n.children, ctx);
|
|
17879
18373
|
}
|
|
17880
|
-
return `<div${attrs({ ...passthrough(p, scope), "data-theme":
|
|
18374
|
+
return `<div${attrs({ ...passthrough(p, scope), "data-theme": str5(p.name) })}>${renderBlocks(n.children, ctx)}</div>
|
|
17881
18375
|
`;
|
|
17882
18376
|
}
|
|
17883
18377
|
case "card":
|
|
@@ -17893,24 +18387,31 @@ function block(n, ctx) {
|
|
|
17893
18387
|
const span = Number(p.span) || 0;
|
|
17894
18388
|
const rows = Number(p.rowSpan) || 0;
|
|
17895
18389
|
const style = [span > 1 && `grid-column:span ${span} / span ${span}`, rows > 1 && `grid-row:span ${rows} / span ${rows}`].filter(Boolean).join(";") || void 0;
|
|
17896
|
-
const label =
|
|
17897
|
-
const inner = label !== void 0 ? `<div class="flex h-full min-h-16 items-center justify-center rounded-lg font-mono text-sm font-medium ${lookup(TONE_CLASSES,
|
|
18390
|
+
const label = str5(p.label);
|
|
18391
|
+
const inner = label !== void 0 ? `<div class="flex h-full min-h-16 items-center justify-center rounded-lg font-mono text-sm font-medium ${lookup(TONE_CLASSES, str5(p.tone)) ?? TONE_CLASSES["primary-light"]}">${esc(label)}</div>` : renderBlocks(n.children, ctx);
|
|
17898
18392
|
const { label: _l, tone: _t, rowSpan: _r, ...rest } = p;
|
|
17899
18393
|
const pass = passthrough(rest);
|
|
17900
|
-
const merged = [style,
|
|
18394
|
+
const merged = [style, str5(pass.style)].filter(Boolean).join(";") || void 0;
|
|
17901
18395
|
return `<div${attrs({ ...pass, style: merged })}>${inner}</div>`;
|
|
17902
18396
|
}
|
|
17903
18397
|
case "files":
|
|
17904
|
-
return (n.children ?? []).map((c) => c.type === "unordered-list" || c.type === "ordered-list" ? fileTreeHtml(fileTreeItems(c, ctx),
|
|
18398
|
+
return (n.children ?? []).map((c) => c.type === "unordered-list" || c.type === "ordered-list" ? fileTreeHtml(fileTreeItems(c, ctx), str5(p.class) ?? "") + "\n" : renderBlocks([c], ctx)).join("");
|
|
17905
18399
|
case "container": {
|
|
17906
18400
|
const name = typeof n.meta?.name === "string" ? n.meta.name : "container";
|
|
17907
18401
|
if (name === "columns") {
|
|
17908
18402
|
const count = Math.min(6, Math.max(1, Math.round(Number(p.count)) || 2));
|
|
17909
|
-
const gap = /^(?:0|\d+(?:\.\d+)?(?:px|rem|em|pt|mm|cm|in|ch|%))$/.test(
|
|
18403
|
+
const gap = /^(?:0|\d+(?:\.\d+)?(?:px|rem|em|pt|mm|cm|in|ch|%))$/.test(str5(p.gap) ?? "") ? str5(p.gap) : "1.5rem";
|
|
17910
18404
|
const { count: _c, gap: _g, ...rest } = p;
|
|
17911
18405
|
const pass = passthrough(rest, "my-4");
|
|
17912
|
-
const style = [`--db-columns:${count}`, `--db-column-gap:${gap}`, COLUMNS_STYLE,
|
|
18406
|
+
const style = [`--db-columns:${count}`, `--db-column-gap:${gap}`, COLUMNS_STYLE, str5(pass.style)].filter(Boolean).join(";");
|
|
17913
18407
|
return `<div${attrs({ ...pass, "data-directive": "columns", "data-columns": String(count), style })}>${renderBlocks(n.children, ctx)}</div>
|
|
18408
|
+
`;
|
|
18409
|
+
}
|
|
18410
|
+
if (name === "key-value") {
|
|
18411
|
+
const layout = str5(p.layout) === "across" ? "across" : "rows";
|
|
18412
|
+
const { layout: _l, ...rest } = p;
|
|
18413
|
+
const inner = (n.children ?? []).map((c) => c.type === "deflist" ? keyValueList(c, ctx) : renderBlocks([c], ctx)).join("");
|
|
18414
|
+
return `<div${attrs({ ...passthrough(rest, "my-4"), "data-directive": "key-value", "data-layout": layout })}>${inner}</div>
|
|
17914
18415
|
`;
|
|
17915
18416
|
}
|
|
17916
18417
|
if (name === "pdf-page-break" && !n.children?.length)
|
|
@@ -17936,29 +18437,29 @@ function block(n, ctx) {
|
|
|
17936
18437
|
`;
|
|
17937
18438
|
}
|
|
17938
18439
|
case "link-button": {
|
|
17939
|
-
const href =
|
|
17940
|
-
const variant = buttonVariant(
|
|
18440
|
+
const href = str5(p.href);
|
|
18441
|
+
const variant = buttonVariant(str5(p.variant), ctx);
|
|
17941
18442
|
const label = insideLink(true, ctx, () => n.children?.length === 1 && n.children[0].type === "paragraph" ? renderInline2(n.children[0].inline, ctx) : renderBlocks(n.children, ctx));
|
|
17942
18443
|
return `<p><a${attrs({ ...passthrough(p, `${BUTTON_BASE} ${lookup(BUTTON_VARIANTS, variant) ?? BUTTON_VARIANTS.default} h-10 px-4 py-2 no-underline`), "data-variant": variant, "data-size": "default", href: href ? linkUrl(href, ctx) : void 0 })}>${label}</a></p>
|
|
17943
18444
|
`;
|
|
17944
18445
|
}
|
|
17945
18446
|
case "youtube": {
|
|
17946
|
-
const id =
|
|
17947
|
-
const title =
|
|
18447
|
+
const id = str5(p.id) ?? "";
|
|
18448
|
+
const title = str5(p.title) ?? "YouTube video";
|
|
17948
18449
|
const { id: _vid, ...ytRest } = p;
|
|
17949
|
-
const poster =
|
|
18450
|
+
const poster = str5(p.poster);
|
|
17950
18451
|
const play = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="20" height="20" fill="currentColor" aria-hidden="true" focusable="false"><path d="M8 5v14l11-7z"/></svg>';
|
|
17951
18452
|
return `<a${attrs({ ...passthrough(ytRest, "not-prose group my-4 flex items-center gap-4 rounded-lg border bg-card p-3 text-card-foreground no-underline shadow-sm transition-colors hover:bg-accent/50"), href: `https://www.youtube.com/watch?v=${encodeURIComponent(id)}`, rel: "noopener", "data-component": "youtube" })}>` + (poster ? `<img src="${esc(assetUrl(poster, ctx))}" alt="" class="h-16 w-28 shrink-0 rounded object-cover" loading="lazy">` : "") + `<span class="flex size-10 shrink-0 items-center justify-center rounded-full bg-red-600 text-white">${play}</span><span class="min-w-0"><span class="block font-semibold group-hover:underline">${esc(title)}</span><span class="block text-xs text-muted-foreground">YouTube</span></span></a>
|
|
17952
18453
|
`;
|
|
17953
18454
|
}
|
|
17954
18455
|
case "diagram": {
|
|
17955
|
-
const lang =
|
|
17956
|
-
const code =
|
|
17957
|
-
const svg4 =
|
|
17958
|
-
return svg4 ? diagramFigure(lang, svg4,
|
|
18456
|
+
const lang = str5(p.lang) ?? "mermaid";
|
|
18457
|
+
const code = str5(p.code) ?? "";
|
|
18458
|
+
const svg4 = str5(p.svg) ?? ctx.diagram?.(lang, code);
|
|
18459
|
+
return svg4 ? diagramFigure(lang, svg4, str5(p.title), p) : codeBlock({ type: "code", props: { ...p, language: lang }, html: code }, ctx);
|
|
17959
18460
|
}
|
|
17960
18461
|
case "math-block": {
|
|
17961
|
-
const latex =
|
|
18462
|
+
const latex = str5(p.latex) ?? "";
|
|
17962
18463
|
const html = renderMath(latex, true, ctx);
|
|
17963
18464
|
return html != null ? `<div class="my-4 overflow-x-auto">${html}</div>
|
|
17964
18465
|
` : `<pre class="my-4 overflow-x-auto rounded-md border bg-muted p-4 text-sm"><code class="math-display">${esc(latex)}</code></pre>
|
|
@@ -17980,7 +18481,7 @@ function block(n, ctx) {
|
|
|
17980
18481
|
case "endpoint":
|
|
17981
18482
|
return renderApiNode2(n, ctx);
|
|
17982
18483
|
case "include": {
|
|
17983
|
-
const target =
|
|
18484
|
+
const target = str5(p.path) ?? str5(p.src) ?? str5(p.file) ?? "";
|
|
17984
18485
|
const remote = /https?:\/\/\S+/.exec(target)?.[0];
|
|
17985
18486
|
if (remote) {
|
|
17986
18487
|
ctx.unknown.add("include of a remote file (not fetched)");
|
|
@@ -18059,7 +18560,7 @@ function diagramFigure(lang, svg4, title, p) {
|
|
|
18059
18560
|
function codeRequest(n) {
|
|
18060
18561
|
const p = n.props ?? {};
|
|
18061
18562
|
const code = n.html ?? String(p.code ?? "");
|
|
18062
|
-
const rawLang =
|
|
18563
|
+
const rawLang = str5(p.language) ?? str5(p.lang);
|
|
18063
18564
|
const lang = rawLang === "terminal" ? "bash" : rawLang;
|
|
18064
18565
|
const highlights = [...parseLineRanges(p.highlights ?? p.highlight ?? p.hl_lines), ...parseLineRanges(p.mark)];
|
|
18065
18566
|
const diffAdd = [...parseLineRanges(p.diffAdd), ...parseLineRanges(p.ins)];
|
|
@@ -18080,7 +18581,7 @@ function highlightInputs(tree) {
|
|
|
18080
18581
|
out.push({ lang, code });
|
|
18081
18582
|
} else if (n.type === "diagram") {
|
|
18082
18583
|
const p = n.props ?? {};
|
|
18083
|
-
const { lang, code } = codeRequest({ type: "code", props: { ...p, language:
|
|
18584
|
+
const { lang, code } = codeRequest({ type: "code", props: { ...p, language: str5(p.lang) ?? "mermaid" }, html: str5(p.code) ?? "" });
|
|
18084
18585
|
out.push({ lang, code });
|
|
18085
18586
|
} else if (API_NODE_TYPES.has(n.type)) {
|
|
18086
18587
|
out.push(...apiCodeInputs(n));
|
|
@@ -18101,12 +18602,12 @@ function codeHtml(code, lang, ctx) {
|
|
|
18101
18602
|
}
|
|
18102
18603
|
function codeBlock(n, ctx) {
|
|
18103
18604
|
const p = n.props ?? {};
|
|
18104
|
-
const rawLang =
|
|
18605
|
+
const rawLang = str5(p.language) ?? str5(p.lang);
|
|
18105
18606
|
const { code, lang, opts } = codeRequest(n);
|
|
18106
18607
|
const svg4 = rawLang && ctx.diagram ? ctx.diagram(rawLang, code) : void 0;
|
|
18107
18608
|
if (svg4)
|
|
18108
|
-
return diagramFigure(rawLang, svg4,
|
|
18109
|
-
const title =
|
|
18609
|
+
return diagramFigure(rawLang, svg4, str5(p.title) ?? str5(p.filename), p);
|
|
18610
|
+
const title = str5(p.title) ?? str5(p.filename);
|
|
18110
18611
|
const { highlights, lineNumbers, diffAdd, diffRemove } = opts;
|
|
18111
18612
|
const hl = ctx.highlighter ?? plainHighlighter;
|
|
18112
18613
|
const collapse2 = parseLineRanges(p.collapse);
|
|
@@ -18137,13 +18638,13 @@ function codeBlock(n, ctx) {
|
|
|
18137
18638
|
"data-line-numbers": lineNumbers || void 0,
|
|
18138
18639
|
// With a gutter or [!code …] markers the text on the page is not the code: copy the source, markers removed.
|
|
18139
18640
|
// An `ansi` block: the text as shown, without its escape codes.
|
|
18140
|
-
"data-copy-text":
|
|
18641
|
+
"data-copy-text": str5(p.copyText) ?? (lineNumbers || diffs || collapse2.length > 0 || code.includes("[!code") ? stripMarkersForCopy(shown) : ansi ? shown : void 0)
|
|
18141
18642
|
})}>` + header2 + floating + `<div data-part="code" class="${rich ? "code-rich-body " : ""}relative overflow-x-auto [&_pre]:!m-0 [&_pre]:!rounded-none [&_pre]:!border-0 [&_pre]:px-4 [&_pre]:py-3">${pre}</div></db-code-block>
|
|
18142
18643
|
`;
|
|
18143
18644
|
}
|
|
18144
18645
|
function table(n, ctx) {
|
|
18145
18646
|
const p = n.props ?? {};
|
|
18146
|
-
const caption =
|
|
18647
|
+
const caption = str5(p.caption);
|
|
18147
18648
|
const cap = caption ? `<caption class="mb-2 text-left text-sm font-medium text-foreground">${titleMarkup(caption, ctx)}</caption>` : "";
|
|
18148
18649
|
return `<div class="relative w-full overflow-x-auto" tabindex="0"><table${attrs(passthrough(p, "my-4 w-full caption-top text-sm"))}>${cap}${renderBlocks(n.children, ctx)}</table></div>
|
|
18149
18650
|
`;
|
|
@@ -18154,9 +18655,9 @@ function calloutLabel(type, ctx) {
|
|
|
18154
18655
|
}
|
|
18155
18656
|
function callout(n, ctx) {
|
|
18156
18657
|
const p = n.props ?? {};
|
|
18157
|
-
const type = (
|
|
18658
|
+
const type = (str5(p.variant) ?? str5(p.type) ?? "note").toLowerCase();
|
|
18158
18659
|
const variant = ALERT_VARIANT[VARIANT_ALIAS[type] ?? type] ? VARIANT_ALIAS[type] ?? type : "note";
|
|
18159
|
-
const title =
|
|
18660
|
+
const title = str5(p.title);
|
|
18160
18661
|
const titleHtml = title ? titleMarkup(title, ctx) : esc(calloutLabel(type, ctx));
|
|
18161
18662
|
const body = renderBlocks(n.children, ctx);
|
|
18162
18663
|
if (flagOn(p.collapsible) || p.collapsed != null) {
|
|
@@ -18197,7 +18698,7 @@ function flagOn(v) {
|
|
|
18197
18698
|
return v !== void 0 && v !== null && v !== false && v !== "false";
|
|
18198
18699
|
}
|
|
18199
18700
|
function alertIcon(variant, p, ctx) {
|
|
18200
|
-
const name =
|
|
18701
|
+
const name = str5(p.icon);
|
|
18201
18702
|
const custom = name ? resolveIconMarkup(name, ctx) : void 0;
|
|
18202
18703
|
if (name && custom === void 0)
|
|
18203
18704
|
(ctx.missingIcons ??= /* @__PURE__ */ new Set()).add(name);
|
|
@@ -18211,22 +18712,23 @@ function collapsibleAlert(variant, titleHtml, body, open, p, ctx) {
|
|
|
18211
18712
|
`;
|
|
18212
18713
|
}
|
|
18213
18714
|
var AVATAR = "relative inline-flex h-10 w-10 shrink-0 items-center justify-center overflow-hidden rounded-full bg-muted";
|
|
18715
|
+
var AVATAR_IMAGE = "absolute inset-0 aspect-square h-full w-full object-cover before:absolute before:inset-0 before:flex before:items-center before:justify-center before:rounded-full before:bg-muted before:text-sm before:font-semibold before:text-muted-foreground before:content-[attr(data-initials)]";
|
|
18214
18716
|
var AVATAR_FALLBACK = "flex h-full w-full items-center justify-center rounded-full bg-muted text-sm font-semibold text-muted-foreground";
|
|
18215
18717
|
function avatar(p, ctx) {
|
|
18216
|
-
const src =
|
|
18217
|
-
const alt =
|
|
18218
|
-
const initials =
|
|
18718
|
+
const src = str5(p.src);
|
|
18719
|
+
const alt = str5(p.alt) ?? "";
|
|
18720
|
+
const initials = str5(p.fallback) || alt.split(" ").map((w) => w[0] ?? "").join("").slice(0, 2).toUpperCase();
|
|
18219
18721
|
const { src: _s, alt: _a3, fallback: _f, ...rest } = p;
|
|
18220
|
-
const inner = src ? `<
|
|
18221
|
-
const label = alt ? { role: "img", "aria-label":
|
|
18722
|
+
const inner = src ? `<span class="${AVATAR_FALLBACK}" aria-hidden="true">${esc(initials)}</span><img class="${AVATAR_IMAGE}" src="${esc(assetUrl(src, ctx))}" alt="" width="40" height="40" data-initials="${esc(initials)}">` : `<span class="${AVATAR_FALLBACK}" aria-hidden="true">${esc(initials)}</span>`;
|
|
18723
|
+
const label = alt ? { role: "img", "aria-label": str5(rest["aria-label"]) ?? alt } : {};
|
|
18222
18724
|
const { "aria-label": _l, ...own2 } = passthrough(rest, AVATAR);
|
|
18223
18725
|
return `<span${attrs({ ...alt ? own2 : { ...own2, "aria-label": _l }, ...label })}>${inner}</span>`;
|
|
18224
18726
|
}
|
|
18225
18727
|
var CHEVRON = '<svg class="h-3 w-3 transition-transform group-open:rotate-90" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="9 18 15 12 9 6"></polyline></svg>';
|
|
18226
18728
|
function example(n, ctx) {
|
|
18227
18729
|
const p = n.props ?? {};
|
|
18228
|
-
const title =
|
|
18229
|
-
const src =
|
|
18730
|
+
const title = str5(p.title);
|
|
18731
|
+
const src = str5(p.src);
|
|
18230
18732
|
if (src && !n.children?.length) {
|
|
18231
18733
|
return `<p class="my-4 rounded-lg border border-dashed border-border px-4 py-3 text-sm text-muted-foreground">Example <code>${esc(src)}</code>${title ? `: ${esc(title)}` : ""}, shown when the site is built.</p>
|
|
18232
18734
|
`;
|
|
@@ -18251,17 +18753,17 @@ function tabs(n, ctx) {
|
|
|
18251
18753
|
return renderBlocks(n.children, ctx);
|
|
18252
18754
|
const used = /* @__PURE__ */ new Set();
|
|
18253
18755
|
const items3 = kids.map((k, i) => {
|
|
18254
|
-
const name =
|
|
18756
|
+
const name = str5(k.props?.label) ?? str5(k.props?.title) ?? str5(k.props?.value);
|
|
18255
18757
|
let v = (name ?? `Tab ${i + 1}`).trim();
|
|
18256
18758
|
while (used.has(v))
|
|
18257
18759
|
v += ` (${i + 1})`;
|
|
18258
18760
|
used.add(v);
|
|
18259
18761
|
const signal = tabDiffSignal(k);
|
|
18260
18762
|
const mark = signal ? `<span class="db-tab-mark" data-diff-tab="${esc(signal)}"><span aria-hidden="true">${TAB_GLYPH[signal] ?? "\u2022"}</span><span class="sr-only">${esc(signal)} in this comparison</span></span>` : "";
|
|
18261
|
-
return { value: v, label: esc(name ?? `Tab ${i + 1}`) + mark, body: () => renderBlocks(k.children, ctx), panelAttrs: sourceAttrText(k, ctx) };
|
|
18763
|
+
return { value: v, label: esc(name ?? `Tab ${i + 1}`) + mark, body: () => renderBlocks(k.children, ctx), panelAttrs: sourceAttrText(k, ctx), id: str5(k.props?.id) };
|
|
18262
18764
|
});
|
|
18263
|
-
const syncKey =
|
|
18264
|
-
return tabGroup(items3, ctx, passthrough(p, "my-4 w-full overflow-hidden rounded-lg border border-border"), syncKey,
|
|
18765
|
+
const syncKey = str5(p.syncKey) ?? str5(p["sync-key"]) ?? str5(p.group);
|
|
18766
|
+
return tabGroup(items3, ctx, passthrough(p, "my-4 w-full overflow-hidden rounded-lg border border-border"), syncKey, str5(p.variant));
|
|
18265
18767
|
}
|
|
18266
18768
|
function tabGroup(items3, ctx, rootAttrs, syncKey, variant) {
|
|
18267
18769
|
const v = lookup(TAB_VARIANTS, variant);
|
|
@@ -18270,7 +18772,7 @@ function tabGroup(items3, ctx, rootAttrs, syncKey, variant) {
|
|
|
18270
18772
|
let panels = "";
|
|
18271
18773
|
items3.forEach((it, i) => {
|
|
18272
18774
|
const tid = `tab-${group}-${i + 1}`;
|
|
18273
|
-
const pid = `tabpanel-${group}-${i + 1}`;
|
|
18775
|
+
const pid = it.id ?? `tabpanel-${group}-${i + 1}`;
|
|
18274
18776
|
const sel = i === 0;
|
|
18275
18777
|
list5 += `<button data-part="trigger" data-value="${esc(it.value)}" role="tab" type="button" id="${tid}" aria-controls="${pid}" aria-selected="${sel}" tabindex="${sel ? 0 : -1}"${sel ? ' data-state="active"' : ""} class="${v?.trigger ?? TAB_TRIGGER}">${it.label}</button>`;
|
|
18276
18778
|
panels += `<div data-part="content" data-value="${esc(it.value)}" role="tabpanel" id="${pid}" aria-labelledby="${tid}" tabindex="0"${sel ? ' data-state="active"' : " hidden"} class="${TAB_CONTENT}"${it.panelAttrs ?? ""}>${it.body()}</div>`;
|
|
@@ -18284,32 +18786,27 @@ function accordion(n, ctx) {
|
|
|
18284
18786
|
const items3 = (n.children ?? []).filter((c) => c.type === "accordion-item");
|
|
18285
18787
|
const chevron = '<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" class="shrink-0 transition-transform duration-200" aria-hidden="true" focusable="false"><path d="m6 9 6 6 6-6"/></svg>';
|
|
18286
18788
|
const html = items3.map((it, i) => {
|
|
18287
|
-
const label =
|
|
18288
|
-
const value =
|
|
18789
|
+
const label = str5(it.props?.label) ?? str5(it.props?.title) ?? `Item ${i + 1}`;
|
|
18790
|
+
const value = str5(it.props?.value) ?? `${slugify(label)}-${i + 1}`;
|
|
18289
18791
|
const tid = `acc-${group}-${i + 1}`;
|
|
18290
18792
|
const cid = `accpanel-${group}-${i + 1}`;
|
|
18291
18793
|
return `<div data-part="item" data-value="${esc(value)}" class="border-b"${sourceAttrText(it, ctx)}><button data-part="trigger" type="button" id="${tid}" aria-controls="${cid}" aria-expanded="false" class="flex w-full items-center justify-between border-0 bg-transparent py-4 text-left font-medium text-foreground transition-all hover:underline disabled:pointer-events-none disabled:opacity-50 [&[aria-expanded=true]>svg]:rotate-180"><span>${esc(label)}</span>${chevron}</button><div data-part="content" id="${cid}" role="region" aria-labelledby="${tid}" hidden class="overflow-hidden pb-4 text-sm transition-all">${renderBlocks(it.children, ctx)}</div></div>`;
|
|
18292
18794
|
}).join("");
|
|
18293
18795
|
const dv = p.defaultValue;
|
|
18294
|
-
const defaultValue = Array.isArray(dv) ? dv.map(String).join(",") :
|
|
18796
|
+
const defaultValue = Array.isArray(dv) ? dv.map(String).join(",") : str5(dv);
|
|
18295
18797
|
const { defaultValue: _d, ...rest } = p;
|
|
18296
|
-
return `<db-accordion${attrs({ ...passthrough(rest, "my-4 w-full"), type:
|
|
18798
|
+
return `<db-accordion${attrs({ ...passthrough(rest, "my-4 w-full"), type: str5(p.type) ?? "single", "default-value": defaultValue })}>${html}</db-accordion>
|
|
18297
18799
|
`;
|
|
18298
18800
|
}
|
|
18299
18801
|
function details(n, ctx) {
|
|
18300
18802
|
let p = n.props ?? {};
|
|
18301
|
-
|
|
18302
|
-
|
|
18303
|
-
|
|
18304
|
-
|
|
18305
|
-
|
|
18306
|
-
|
|
18307
|
-
|
|
18308
|
-
p = { ...p, id: uniqueId(ctx, id) };
|
|
18309
|
-
}
|
|
18310
|
-
}
|
|
18311
|
-
const title = str4(p.title) ?? str4(p.summary) ?? ctx.t("details");
|
|
18312
|
-
const type = (str4(p.variant) ?? str4(p.type) ?? "").toLowerCase();
|
|
18803
|
+
const sheetId = !str5(p.id) && isDetailsSheet(p) ? pageIds.get(ctx)?.get(n)?.id : void 0;
|
|
18804
|
+
if (sheetId) {
|
|
18805
|
+
ctx.ids.add(sheetId);
|
|
18806
|
+
p = { ...p, id: sheetId };
|
|
18807
|
+
}
|
|
18808
|
+
const title = str5(p.title) ?? str5(p.summary) ?? ctx.t("details");
|
|
18809
|
+
const type = (str5(p.variant) ?? str5(p.type) ?? "").toLowerCase();
|
|
18313
18810
|
const variant = ALERT_VARIANT[VARIANT_ALIAS[type] ?? type] ? VARIANT_ALIAS[type] ?? type : "note";
|
|
18314
18811
|
const html = collapsibleAlert(variant, titleMarkup(title, ctx), renderBlocks(n.children, ctx), flagOn(p.open), p, ctx);
|
|
18315
18812
|
if (!isDetailsSheet(p))
|
|
@@ -18319,7 +18816,7 @@ function details(n, ctx) {
|
|
|
18319
18816
|
}
|
|
18320
18817
|
function figure(n, ctx) {
|
|
18321
18818
|
const p = n.props ?? {};
|
|
18322
|
-
const caption =
|
|
18819
|
+
const caption = str5(p.caption);
|
|
18323
18820
|
const kids = n.children ?? [];
|
|
18324
18821
|
const body = kids.length === 1 && kids[0].type === "paragraph" && kids[0].inline?.every((i) => i.type === "image" || i.type === "text" && !i.text.trim()) ? renderInline2(kids[0].inline, ctx) : renderBlocks(kids, ctx);
|
|
18325
18822
|
return `<figure${attrs(passthrough(p, "my-4"))}>${body}${caption ? `<figcaption class="mt-2 text-center text-sm text-muted-foreground">${titleMarkup(caption, ctx)}</figcaption>` : ""}</figure>
|
|
@@ -18363,30 +18860,34 @@ function fileTreeItems(list5, ctx) {
|
|
|
18363
18860
|
}
|
|
18364
18861
|
function card(n, ctx) {
|
|
18365
18862
|
const p = n.props ?? {};
|
|
18366
|
-
const title =
|
|
18367
|
-
const href =
|
|
18368
|
-
const desc =
|
|
18369
|
-
const ic =
|
|
18863
|
+
const title = str5(p.title);
|
|
18864
|
+
const href = str5(p.href);
|
|
18865
|
+
const desc = str5(p.description);
|
|
18866
|
+
const ic = str5(p.icon);
|
|
18370
18867
|
const iconHtml = !ic ? "" : /\.(svg|png|jpe?g|webp|avif)$/i.test(ic) ? `<img src="${esc(assetUrl(ic, ctx))}" alt="" class="size-5 mb-2" loading="lazy">` : namedIcon(ic, "mb-2 size-5 text-muted-foreground", ctx);
|
|
18371
18868
|
const before = ctx.lastHeadingLevel;
|
|
18372
18869
|
const whole = !!href && (!title || !cardBodyHasLink(n.children));
|
|
18373
18870
|
const titleText = title && href && !whole ? `<a href="${esc(linkUrl(href, ctx))}">${esc(title)}</a>` : esc(title ?? "");
|
|
18374
|
-
const inner = insideLink(whole, ctx, () => iconHtml +
|
|
18375
|
-
|
|
18871
|
+
const inner = insideLink(whole, ctx, () => iconHtml + // The parts are named (`data-part`), and the card and its tone below (`data-component`,
|
|
18872
|
+
// `data-tone`): what a print theme may rely on, where the classes are the site's own business
|
|
18873
|
+
// (docs/pdf-directives.md, "What a print theme can rely on"). `data-card-title` is the older name.
|
|
18874
|
+
(title ? `<div class="not-prose m-0 border-0 p-0 text-base font-semibold" data-part="title" data-card-title>${titleText}</div>` : "") + (desc ? `<p class="m-0 mt-1 text-sm text-muted-foreground [text-decoration:none]" data-part="description">${esc(desc)}</p>` : "") + // Body blocks in the same description wrapper as the Astro pipeline's card (a <div>: they carry their own <p>).
|
|
18875
|
+
(n.children?.length ? `<div class="text-sm text-muted-foreground mt-1 [text-decoration:none]" data-part="body">${renderBlocks(n.children, ctx)}</div>` : ""));
|
|
18376
18876
|
ctx.lastHeadingLevel = before;
|
|
18377
|
-
const toned = lookup(CARD_TONE_CLASSES,
|
|
18877
|
+
const toned = lookup(CARD_TONE_CLASSES, str5(p.tone));
|
|
18378
18878
|
const cls = `rounded-lg border ${toned ?? "bg-card"} p-4 text-card-foreground shadow-sm${whole ? ` transition-colors ${toned ? "hover:shadow-md" : "hover:border-foreground/20"}` : ""}`;
|
|
18379
|
-
|
|
18879
|
+
const root = { ...passthrough(p, cls), "data-component": "card", "data-tone": toned ? str5(p.tone) : void 0 };
|
|
18880
|
+
return whole ? `<div${attrs(root)}><div class="p-0"><a href="${esc(linkUrl(href, ctx))}" data-variant="card" class="block text-foreground [text-decoration:none]">${inner}</a></div></div>` : `<div${attrs(root)}><div class="p-0">${inner}</div></div>`;
|
|
18380
18881
|
}
|
|
18381
18882
|
function linkCard(n, ctx) {
|
|
18382
18883
|
if (n.children?.length)
|
|
18383
18884
|
return card(n, ctx);
|
|
18384
18885
|
const p = n.props ?? {};
|
|
18385
|
-
const title =
|
|
18386
|
-
const href =
|
|
18387
|
-
const desc =
|
|
18886
|
+
const title = str5(p.title) ?? "";
|
|
18887
|
+
const href = str5(p.href) ?? "#";
|
|
18888
|
+
const desc = str5(p.description);
|
|
18388
18889
|
const chevron = '<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" class="size-4 shrink-0 text-muted-foreground transition-transform group-hover:translate-x-0.5" aria-hidden="true" focusable="false"><path d="m9 18 6-6-6-6"/></svg>';
|
|
18389
|
-
const ic =
|
|
18890
|
+
const ic = str5(p.icon);
|
|
18390
18891
|
const iconHtml = ic ? namedIcon(ic, "size-4 shrink-0 text-muted-foreground", ctx) : "";
|
|
18391
18892
|
return `<a${attrs({ ...passthrough(p, "group not-prose my-4 flex flex-col gap-1 rounded-lg border bg-card p-4 text-card-foreground no-underline shadow-sm transition-colors hover:bg-accent/50"), href: linkUrl(href, ctx) })}><div class="flex items-center justify-between"><span class="flex min-w-0 items-center gap-2">${iconHtml}<span class="text-sm font-semibold group-hover:underline">${esc(title)}</span></span>${chevron}</div>${desc ? `<p class="m-0 text-sm text-muted-foreground">${esc(desc)}</p>` : ""}</a>`;
|
|
18392
18893
|
}
|
|
@@ -20596,7 +21097,7 @@ function segments(value) {
|
|
|
20596
21097
|
const segs = value.split("/");
|
|
20597
21098
|
return segs.every((s) => s !== "" && s !== "." && s !== "..") ? segs : void 0;
|
|
20598
21099
|
}
|
|
20599
|
-
function pageFacets(
|
|
21100
|
+
function pageFacets(meta2, options = {}) {
|
|
20600
21101
|
const out = /* @__PURE__ */ Object.create(null);
|
|
20601
21102
|
const nested2 = new Set(options.hierarchical ?? []);
|
|
20602
21103
|
const add = (name, value, hierarchical) => {
|
|
@@ -20613,7 +21114,7 @@ function pageFacets(meta, options = {}) {
|
|
|
20613
21114
|
};
|
|
20614
21115
|
const list5 = (v) => Array.isArray(v) ? v : [];
|
|
20615
21116
|
const tagsNested = nested2.has("tags");
|
|
20616
|
-
for (const tag of list5(
|
|
21117
|
+
for (const tag of list5(meta2?.tags)) {
|
|
20617
21118
|
if (typeof tag !== "string")
|
|
20618
21119
|
continue;
|
|
20619
21120
|
const slash = tag.indexOf("/");
|
|
@@ -20624,19 +21125,19 @@ function pageFacets(meta, options = {}) {
|
|
|
20624
21125
|
add("tag", tag, tagsNested);
|
|
20625
21126
|
}
|
|
20626
21127
|
}
|
|
20627
|
-
for (const v of list5(
|
|
21128
|
+
for (const v of list5(meta2?.audience))
|
|
20628
21129
|
add("audience", v, nested2.has("audience"));
|
|
20629
|
-
for (const v of list5(
|
|
21130
|
+
for (const v of list5(meta2?.category))
|
|
20630
21131
|
add("category", v, nested2.has("category"));
|
|
20631
|
-
add("status",
|
|
20632
|
-
for (const v of list5(
|
|
21132
|
+
add("status", meta2?.status, nested2.has("status"));
|
|
21133
|
+
for (const v of list5(meta2?.taxonomies?.status))
|
|
20633
21134
|
add("status", v, nested2.has("status"));
|
|
20634
|
-
add("type",
|
|
20635
|
-
for (const v of list5(
|
|
21135
|
+
add("type", meta2?.type, nested2.has("type"));
|
|
21136
|
+
for (const v of list5(meta2?.taxonomies?.type))
|
|
20636
21137
|
add("type", v, nested2.has("type"));
|
|
20637
21138
|
add("product", options.unit?.product, false);
|
|
20638
21139
|
add("version", options.unit?.version, false);
|
|
20639
|
-
for (const [name, values] of Object.entries(
|
|
21140
|
+
for (const [name, values] of Object.entries(meta2?.taxonomies ?? {})) {
|
|
20640
21141
|
if (BUILT_IN.has(name))
|
|
20641
21142
|
continue;
|
|
20642
21143
|
for (const v of list5(values))
|
|
@@ -20882,6 +21383,37 @@ function listedLocations(nav, slugs, opts = {}) {
|
|
|
20882
21383
|
return out;
|
|
20883
21384
|
}
|
|
20884
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
|
+
|
|
20885
21417
|
// src/core/yaml.ts
|
|
20886
21418
|
function loadYaml(text4) {
|
|
20887
21419
|
if (text4.split(/\r?\n/).every((l) => /^\s*(?:\.\.\.\s*)?(?:#.*)?$/.test(l))) return void 0;
|
|
@@ -20977,6 +21509,7 @@ function stringsOf(raw) {
|
|
|
20977
21509
|
var VERSION_FLAGS = ["eol", "prerelease", "hidden", "noindex", "sitemap", "badge"];
|
|
20978
21510
|
var FLAG_PATHS = [
|
|
20979
21511
|
"poweredBy",
|
|
21512
|
+
"linkPreviews",
|
|
20980
21513
|
"ssg.breadcrumbs",
|
|
20981
21514
|
"ssg.strictTemplates",
|
|
20982
21515
|
"ssg.math",
|
|
@@ -21022,6 +21555,11 @@ function refuseYaml11Flags(raw) {
|
|
|
21022
21555
|
if (e && typeof e === "object" && [IMAGE_ZOOM, "image-zoom", "dogsbay-plugin-image-zoom"].includes(e.name)) walk(e.options, ["excludeInsideLinks"], `plugins[${i}].options`);
|
|
21023
21556
|
}
|
|
21024
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
|
+
}
|
|
21025
21563
|
function htmlOf(v) {
|
|
21026
21564
|
if (v === void 0 || v === null) return void 0;
|
|
21027
21565
|
if (v === "keep" || v === "sanitize") return v;
|
|
@@ -21111,6 +21649,7 @@ function parseConfig(text4, overrides = {}) {
|
|
|
21111
21649
|
// An empty tagline falls back too, as DocsLayout's `siteTagline || "Documentation"`.
|
|
21112
21650
|
tagline: String(site.tagline || "Documentation"),
|
|
21113
21651
|
poweredBy: raw.poweredBy !== false,
|
|
21652
|
+
linkPreviews: linkPreviewsOf(raw.linkPreviews),
|
|
21114
21653
|
// Same defaults as the Astro pipeline: the mirror, llms.txt and page actions are on unless turned off.
|
|
21115
21654
|
mdMirror: agent.mdMirror !== false,
|
|
21116
21655
|
mdMirrorLinks: (() => {
|
|
@@ -21768,7 +22307,7 @@ function hasPlaceholder(nodes, types) {
|
|
|
21768
22307
|
async function resolvePlaceholders(tree, resolvers, ctx) {
|
|
21769
22308
|
const byType = new Map(resolvers.map((r) => [r.type, r]));
|
|
21770
22309
|
if (!hasPlaceholder(tree, new Set(byType.keys()))) return void 0;
|
|
21771
|
-
const usedIds =
|
|
22310
|
+
const usedIds = pageIds2(tree);
|
|
21772
22311
|
const warnings = [];
|
|
21773
22312
|
const walk = async (nodes) => {
|
|
21774
22313
|
for (let i = 0; i < nodes.length; i++) {
|
|
@@ -21789,7 +22328,7 @@ async function resolvePlaceholders(tree, resolvers, ctx) {
|
|
|
21789
22328
|
i--;
|
|
21790
22329
|
continue;
|
|
21791
22330
|
}
|
|
21792
|
-
|
|
22331
|
+
pageIds2(got.nodes, usedIds);
|
|
21793
22332
|
nodes.splice(i, 1, ...got.nodes);
|
|
21794
22333
|
i += got.nodes.length - 1;
|
|
21795
22334
|
}
|
|
@@ -21797,28 +22336,31 @@ async function resolvePlaceholders(tree, resolvers, ctx) {
|
|
|
21797
22336
|
await walk(tree);
|
|
21798
22337
|
return warnings;
|
|
21799
22338
|
}
|
|
21800
|
-
function
|
|
21801
|
-
const
|
|
21802
|
-
|
|
21803
|
-
|
|
21804
|
-
|
|
21805
|
-
|
|
22339
|
+
function pageIds2(nodes, ids = /* @__PURE__ */ new Set()) {
|
|
22340
|
+
for (const { id } of headingIds(nodes).values()) ids.add(id);
|
|
22341
|
+
const fromHtml = (html) => {
|
|
22342
|
+
for (const m of html.matchAll(/\sid\s*=\s*["']([^"']+)["']/gi)) ids.add(m[1]);
|
|
22343
|
+
};
|
|
22344
|
+
const inline3 = (list5) => {
|
|
22345
|
+
for (const x of list5) {
|
|
22346
|
+
const a = authoredInlineAnchor(x);
|
|
22347
|
+
if (a) ids.add(a);
|
|
22348
|
+
if (x.type === "html-inline") fromHtml(x.html);
|
|
22349
|
+
if ("children" in x && Array.isArray(x.children)) inline3(x.children);
|
|
22350
|
+
}
|
|
21806
22351
|
};
|
|
21807
22352
|
const walk = (list5) => {
|
|
21808
22353
|
for (const n of list5) {
|
|
21809
|
-
|
|
21810
|
-
|
|
21811
|
-
|
|
21812
|
-
|
|
21813
|
-
for (const m of n.html.matchAll(/<h[1-6]\b[^>]*\sid="([^"]*)"/gi)) take(m[1]);
|
|
21814
|
-
}
|
|
22354
|
+
const p = n.props ?? {};
|
|
22355
|
+
if (n.type !== "heading" && typeof p.id === "string" && p.id) ids.add(p.id);
|
|
22356
|
+
if (typeof n.html === "string" && /^(?:prose|html|html-container)$/.test(n.type)) fromHtml(n.html);
|
|
22357
|
+
if (n.inline) inline3(n.inline);
|
|
21815
22358
|
if (n.children) walk(n.children);
|
|
21816
22359
|
}
|
|
21817
22360
|
};
|
|
21818
22361
|
walk(nodes);
|
|
21819
22362
|
return ids;
|
|
21820
22363
|
}
|
|
21821
|
-
var RESERVED_ID2 = /^(db-|tab-\d|tabpanel-\d|acc-\d|accpanel-\d|fn-|fnref-)/;
|
|
21822
22364
|
var autodocUnresolved = {
|
|
21823
22365
|
type: "autodoc-ref",
|
|
21824
22366
|
async resolve(node) {
|
|
@@ -22179,7 +22721,7 @@ function staleUnitFiles(previous, now2, written, assets) {
|
|
|
22179
22721
|
}
|
|
22180
22722
|
|
|
22181
22723
|
// src/generated/versions.ts
|
|
22182
|
-
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";
|
|
22183
22725
|
|
|
22184
22726
|
// src/core/tree-cache.ts
|
|
22185
22727
|
var FORMAT = "p1";
|
|
@@ -22564,10 +23106,10 @@ function unitPages(cfg, unit, units, files, frontMatterOf, read, includeDrafts)
|
|
|
22564
23106
|
}
|
|
22565
23107
|
|
|
22566
23108
|
// src/generated/assets.ts
|
|
22567
|
-
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 p=(n,t,e)=>ko(n,typeof t!="symbol"?t+"":t,e);var Y=class extends HTMLElement{constructor(){super(...arguments);p(this,"_initialized",!1);p(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={}){p(this,"container");p(this,"itemSelector");p(this,"opts");p(this,"keydownHandler",null);p(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);p(this,"list");p(this,"triggers",[]);p(this,"panels",[]);p(this,"nav",null);p(this,"value","");p(this,"syncKey",null);p(this,"orientation","horizontal");p(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)});p(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)});p(this,"handleSyncEvent",(t=>{let e=t.detail.value;e&&this.value!==e&&this.has(e)&&this.select(e)}))}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=window.location.hash.slice(1);o&&this.triggers.some(r=>r.dataset.value===o)&&(i=o),this.select(i)}connect(){var t;(t=this.list)==null||t.addEventListener("click",this.handleClick),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),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={}){p(this,"trigger");p(this,"content");p(this,"_open",!1);p(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);p(this,"items",[]);p(this,"nav",null);p(this,"openValues",new Set);p(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 Z(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 Q(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);p(this,"details",null);p(this,"summary",null);p(this,"dialog",null);p(this,"body",null);p(this,"source",null);p(this,"moved",[]);p(this,"handledHash",null);p(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())});p(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()});p(this,"onDialogClose",()=>this.restore());p(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)}});p(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=Z("db-sheet");let r=document.createElement("h2");r.className="db-sheet-title",r.id=Z("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);p(this,"copyBtn",null);p(this,"copyIcon",null);p(this,"checkIcon",null);p(this,"liveRegion",null);p(this,"resetTimeout",null);p(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);p(this,"navData",null);p(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))});p(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=Z("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 m=document.createElement("div");m.setAttribute("data-part","row"),h.appendChild(m);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&&m.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"),m.appendChild(f)}if(a==null&&!(l!=null&&l.length)){let f=document.createElement("span");f.setAttribute("data-part","label"),f.textContent=r,m.appendChild(f)}if(g&&w&&m.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);p(this,"links",[]);p(this,"headings",[]);p(this,"observer",null);p(this,"active",null);p(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)});p(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] *)"],je=_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(je));return e&&ae.call(t,je)&&o.unshift(t),o=o.filter(i),o},Ve=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=Ve(l,!0,i);i.flatten?o.push.apply(o,c):o.push({scopeParent:r,candidates:c})}else{var d=ae.call(r,je);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 m=Ve(u===!0?r.children:u.children,!0,i);i.flatten?o.push.apply(o,m):o.push({scopeParent:r,candidates:m})}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"},jo=function(t){var e=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(i){return i.tagName==="SUMMARY"});return e},Vo=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=Vo(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},Zo=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},Qo=function(t,e){return!(e.disabled||Ko(e)||Xo(e,t)||jo(e)||Zo(e))},Fn=function(t,e){return!(Yo(e)||zn(e)<0||!Qo(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=Ve([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={}){p(this,"root");p(this,"opts");p(this,"previouslyFocused",null);p(this,"keydownHandler",null);p(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}},p(et,"count",0),p(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){p(this,"root");p(this,"opts");p(this,"outsideHandler",null);p(this,"active",!1);p(this,"frameId",null);p(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);p(this,"content",null);p(this,"backdrop",null);p(this,"trigger",null);p(this,"native",!1);p(this,"_open",!1);p(this,"openedBy",null);p(this,"focusTrap",null);p(this,"dismiss",null);p(this,"cleanupInert",null);p(this,"onTriggerClick",t=>{t.preventDefault(),this.toggle(t.currentTarget)});p(this,"onHostClick",t=>{let e=t.target.closest("[data-part=\'close\']");e&&e.closest("db-dialog")===this&&this.close("close-press")});p(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))});p(this,"onCancel",t=>{t.preventDefault(),this.dismissible&&this.close("escape-key")});p(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")});p(this,"onNativeClose",()=>{this._open&&this.finishClose("close-press")})}get open(){return this._open}get dismissible(){return this.getAttribute("dismissible")!=="false"}setup(){if(this.content=Q(this,"[data-part=\'content\']"),!this.content)return;this.native=typeof HTMLDialogElement<"u"&&this.content instanceof HTMLDialogElement&&typeof this.content.showModal=="function",this.backdrop=Q(this,"[data-part=\'backdrop\']"),this.trigger=Wt(Q(this,"[data-part=\'trigger\']"));let t=this.content;t.id||(t.id=Z("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=Z("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=Z("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 jn=class extends Y{constructor(){super(...arguments);p(this,"input",null);p(this,"listbox",null);p(this,"empty",null);p(this,"_open",!1);p(this,"highlighted",null);p(this,"observer",null);p(this,"base",Z("db-combobox"));p(this,"optionSeq",0);p(this,"onInput",()=>{this.filtering?this.filter(this.input.value):this.show()});p(this,"onFocus",()=>{(this.hasAttribute("open-on-focus")||this.filtering&&this.input.value)&&(this.filtering?this.filter(this.input.value):this.show())});p(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}});p(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()});p(this,"onListPointer",t=>{let e=t.target.closest("[data-part=\'option\']");e&&e.closest("db-combobox")===this&&!dt(e)&&!e.hidden&&this.highlight(e)});p(this,"onListDown",t=>t.preventDefault());p(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=Q(this,"[data-part=\'input\']"),this.listbox=Q(this,"[data-part=\'listbox\']"),this.empty=Q(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",jn);var Ct=Math.min,ut=Math.max,ce=Math.round,de=Math.floor,pt=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 Zt(n,t){return typeof n=="function"?n(t):n}function Lt(n){return n.split("-")[0]}function Qt(n){return n.split("-")[1]}function Ge(n){return n==="x"?"y":"x"}function Xe(n){return n==="y"?"height":"width"}function mt(n){let t=n[0];return t==="t"||t==="b"?"y":"x"}function Ze(n){return Ge(mt(n))}function Yn(n,t,e){e===void 0&&(e=!1);let i=Qt(n),o=Ze(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 Vn=["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:Vn:t?Vn:Un;case"left":case"right":return t?is:os;default:return[]}}function Xn(n,t,e,i){let o=Qt(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 Zn(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 Qn(n,t,e){let{reference:i,floating:o}=n,s=mt(t),r=Ze(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,m;switch(l){case"top":m={x:d,y:i.y-o.height};break;case"bottom":m={x:d,y:i.y+i.height};break;case"right":m={x:i.x+i.width,y:u};break;case"left":m={x:i.x-o.width,y:u};break;default:m={x:i.x,y:i.y}}let b=Qt(t);return b&&(m[r]+=h*(b==="end"?1:-1)*(e&&c?-1:1)),m}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:m=0}=Zt(t,n),b=Zn(m),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}=Qn(c,i,l),h=i,m=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&&m<as&&(m++,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}=Qn(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:m="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:g=!0,...w}=Zt(n,t);if((e=s.arrow)!=null&&e.alignmentOffset)return{};let f=Lt(o),v=mt(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!==mt(B):!1)||z.every(K=>mt(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(m){case"bestFit":{var O;let $=(O=z.filter(K=>{if(L){let J=mt(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=Qt(e),l=mt(e)==="y",c=ls.has(r)?-1:1,d=s&&l?-1:1,u=Zt(t,n),{mainAxis:h,crossAxis:m,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"&&(m=a==="end"?b*-1:b),l?{x:m*d,y:h*c}:{x:h*c,y:m*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}=Zt(n,t),d={x:e,y:i},u=await s.detectOverflow(t,c),h=mt(o),m=Ge(h),b=d[m],g=d[h],w=(v,E)=>Wn(E+u[v==="y"?"top":"left"],E,E-u[v==="y"?"bottom":"right"]);r&&(b=w(m,b)),a&&(g=w(h,g));let f=l.fn({...t,[m]:b,[h]:g});return{...f,data:{x:f.x-e,y:f.y-i,enabled:{[m]: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}=Zt(n,t),l=await o.detectOverflow(t,a),c=Lt(e),d=Qt(e),u=mt(e)==="y",{width:h,height:m}=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=m-l.top-l.bottom,f=h-l.left-l.right,v=Ct(m-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=m-2*ut(l.top,l.bottom)),await r({...t,availableWidth:x,availableHeight:L});let y=await o.getDimensions(s.floating);return h!==y.width||m!==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",Qe;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 Qe==null&&(Qe=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Qe}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 pt(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=pt(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=pt(1);t&&(i?ht(i)&&(r=ee(i)):r=ee(n));let a=fs(s,e,i)?fi(s):pt(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),m=ht(i)?st(i):i,b=h,g=Le(b);for(;g&&m!==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 pi(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 ps(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=pt(1),d=pt(0),u=wt(i);if((u||!s)&&((Pt(i)!=="body"||ue(r))&&(l=fe(i)),u)){let m=_t(i);c=ee(i),d.x=m.x+i.clientLeft,d.y=m.y+i.clientTop}let h=r&&!u&&!s?pi(r,l):pt(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 ms(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,m=h.body,b=getComputedStyle(m),g=h.compatMode==="CSS1Compat"&&parseFloat(b.marginLeft)+parseFloat(b.marginRight)||0,w=Math.abs(s.clientWidth-m.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 m=di(t,r[h],o);l=ut(m.top,l),c=Ct(m.right,c),d=Ct(m.bottom,d),u=ut(m.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=pt(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?pi(o,a):pt(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 mi(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||mi,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:ps,getDocumentElement:gt,getClippingRect:Es,getOffsetParent:mi,getElementRects:As,getClientRects:ms,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:m,top:b,width:g,height:w}=h;if(d||t(),!g||!w)return;let f=de(b),v=de(s.clientWidth-(m+g)),E=de(s.clientHeight-(b+w)),C=de(m),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,m=null;r&&(m=new ResizeObserver(f=>{let[v]=f;v&&v.target===c&&m&&t&&(m.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var E;(E=m)==null||E.observe(t)})),e()}),c&&!l&&m.observe(c),t&&m.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=m)==null||f.disconnect(),m=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 m=h.placement.split("-")[0];t.setAttribute("data-side",m)})}var en=class{constructor(n){p(this,"opts");p(this,"buffer","");p(this,"timerId",null);p(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);p(this,"trigger",null);p(this,"content",null);p(this,"valueEl",null);p(this,"items",[]);p(this,"nativeSelect",null);p(this,"hiddenInput",null);p(this,"labelEl",null);p(this,"onLabelClick",t=>{var e;t.target.closest("[data-part=\'trigger\']")||(t.preventDefault(),(e=this.trigger)==null||e.focus())});p(this,"dismiss",null);p(this,"typeahead",null);p(this,"cleanupFloating",null);p(this,"_open",!1);p(this,"_value","");p(this,"highlighted",-1);p(this,"syncing",!1);p(this,"onNativeChange",()=>{this.syncing||this.refresh()});p(this,"onFormReset",()=>setTimeout(()=>this.refresh()));p(this,"onTriggerClick",()=>{this.isDisabled||(this._open?this.close():this.show())});p(this,"onTriggerKeyUp",t=>{t.key===" "&&t.preventDefault()});p(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))}});p(this,"onListClick",t=>{let e=t.target.closest("[data-part=\'item\']");!e||!this.items.includes(e)||dt(e)||(this.select(e),this.close())});p(this,"onListPointer",t=>{let e=t.target.closest("[data-part=\'item\']");e&&this.items.includes(e)&&!dt(e)&&this.highlight(this.items.indexOf(e))});p(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=Q(this,"select"),this.nativeSelect&&!Q(this,"[data-part=\'trigger\']")&&this.buildFromNative(this.nativeSelect),this.trigger=Q(this,"[data-part=\'trigger\']"),this.content=Q(this,"[data-part=\'content\']"),this.valueEl=Q(this,"[data-part=\'value\']"),!this.trigger||!this.content)return;let{trigger:t,content:e}=this;this.items=vt(this,"[data-part=\'item\']");let i=Z("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=Z("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=Z("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 m=document.createElement("div");m.setAttribute("data-part","item"),m.className="db-select-item",m.dataset.value=u.value;for(let[b,g]of Object.entries(u.dataset))g!=null&&(m.dataset[b]=g);u.disabled&&m.setAttribute("aria-disabled","true"),m.textContent=u.textContent??u.value,h.appendChild(m)};for(let u of Array.from(t.children))if(u instanceof HTMLOptGroupElement){let h=document.createElement("div");h.setAttribute("data-part","group");let m=document.createElement("div");m.setAttribute("data-part","label"),m.className="db-select-label",m.textContent=u.label,h.appendChild(m);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);p(this,"trigger",null);p(this,"content",null);p(this,"dismiss",null);p(this,"cleanupFloating",null);p(this,"_open",!1);p(this,"onTriggerClick",()=>this.toggle());p(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(Q(this,"[data-part=\'trigger\']")),this.content=Q(this,"[data-part=\'content\']"),!this.trigger||!this.content)return;let t=this.content;t.id||(t.id=Z("db-popover")),t.hasAttribute("role")||t.setAttribute("role","dialog"),!t.hasAttribute("aria-labelledby")&&!t.hasAttribute("aria-label")&&((e=this.trigger).id||(e.id=Z("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);p(this,"closeButton",null);p(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);p(this,"trigger",null);p(this,"content",null);p(this,"cleanupFloating",null);p(this,"showTimer",null);p(this,"hideTimer",null);p(this,"_open",!1);p(this,"onEnter",t=>{t.pointerType!=="touch"&&(this.clearTimers(),this._open||(this.showTimer=setTimeout(()=>this.show(),this.num("delay",200))))});p(this,"onLeave",t=>{t.pointerType!=="touch"&&(this.clearTimers(),this.hideTimer=setTimeout(()=>this.hide(),this.num("close-delay",100)))});p(this,"onContentEnter",()=>this.clearTimers());p(this,"onFocus",()=>{let t=!0;try{t=this.trigger.matches(":focus-visible")}catch{}t&&(this.clearTimers(),this.show())});p(this,"onBlur",()=>this.hide());p(this,"onPress",()=>this.hide());p(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(Q(this,"[data-part=\'trigger\']")),this.content=Q(this,"[data-part=\'content\']"),!this.trigger||!this.content)return;(e=this.content).id||(e.id=Z("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,pe=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(pe.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};pe.set(n,u),Oi(u);let h=g=>{u.isMobile=g.matches,!g.matches&&u.openMobile&&Tt(n)};d.addEventListener("change",h);let m=g=>{g.key===Ts&&(g.metaKey||g.ctrlKey)?(g.preventDefault(),nn(n)):g.key==="Escape"&&u.openMobile&&(g.preventDefault(),Tt(n))};document.addEventListener("keydown",m),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=pe.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=pe.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=pe.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)$/,js=/^(.+?)eed$/,Vs=/^.+?[^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):Vs.test(t)&&(t=t.slice(0,-1));let i;return(i=js.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(" ")),Zs=/[\\p{Script=Han}\\p{Script=Hiragana}\\p{Script=Katakana}\\p{Script=Hangul}]/u,me;function Qs(n){if(me===void 0)try{me=typeof Intl<"u"&&"Segmenter"in Intl?new Intl.Segmenter(void 0,{granularity:"word"}):null}catch{me=null}if(me)return[...me.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)Zs.test(s)?t.push(...Qs(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]}}),m=!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"){m=!0,s=!0;continue}if(C==="AND"){s=!0;continue}let I=E.phrase!==void 0,L=m||E.neg==="-"||(C==null?void 0:C.startsWith("-"))&&C.length>1;m=!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),m=f=>f.map(([v,E])=>{let C=h(v);return[C,C<0?new Set:a(t.facets[C].values,E)]}),b=m(s),g=m(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 Vi(n,t,e,!0);return n.corrected=i.corrected.length?i.corrected:void 0,ji(i,un(t.count,i.docs.size))}function un(n,t){return Math.log(1+(n-t+.5)/(t+.5))}function ji(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 Vi(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 m=(f,v)=>{v>(s.get(f)??0)&&(s.set(f,v),r.set(f,h))};Object.hasOwn(h,d)&&m(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&&m(f,Et.prefix),b&&g&&f.startsWith(g)&&o(f)===b&&m(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)&&m(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 m=[];for(let[b,g]of d){let w=$t(b);!s.length||!s.every(f=>w.some(v=>l(v,f)))||(m.push([b,g]),h=Math.max(h,Pi(w,s,l)?Et.headingExact:Et.headingAll))}if(a.sections=m.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 Zi(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,()=>Vi(L,o[y],t[y].data,x)))),m=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(m(x)),u[u.length-1]&&(x=await h(L,!0)),d.push(x)}for(let[L,x]of n.groups.entries())u[L]||!m(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(ji(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 Qi(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(m=>m.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 pn(n,t,e=globalThis){var m,b;let i=((m=e.document)==null?void 0:m.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 m=await u.data(),b=m.url.startsWith(e)?m.url.slice(e.length):m.url.replace(/^\\/+/,""),g=(m.sub_results??[]).map(w=>[w.title,w.url.split("#")[1]??""]).filter(([,w])=>w);return{id:h,title:m.meta.title??b,url:b,section:"",score:r.length-h,fragment:[ar(m.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((m,b)=>a(m,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),m=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)=>m(f)-m(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 m=l.get(xt(h))??(l.set(xt(h),h),h);a[m]=(a[m]??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(m=>m.length>0);if(d.length===0)continue;let u="",h=null;for(let m=0;m<d.length;m++){u=u?`${u}/${d[m]}`:d[m];let b=o.get(u);b||(b={value:u,label:ne(n,u,e),count:0,depth:m,hasValue:!1,children:[]},o.set(u,b),h?h.children.push(b):s.push(u)),m===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 m=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:[]},m.push(f),b.set(w,f),E&&s.add(w)}let v=c.get(f);v||(v=new Map,c.set(f,v)),m=f.children,b=v}},c=new Map,d=h=>{for(let m of h){if(m.href){let b=fo(m.href);l(b)}m.children&&m.children.length>0&&d(m.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,m)=>h.value.localeCompare(m.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,pr=30,Ie=20,mr=["version","versions","products"];function mo(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 po=()=>!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=pn(`${n.unitRoot}_dogsbay/search/`,n.loadScript,window),u=document.body.dataset.search??"builtin",h=location.protocol!=="file:",m=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,m))return;f=to(A,w);let T=s??mn(()=>sessionStorage.getItem(C)),k=v;T&&Object.prototype.hasOwnProperty.call(f,T)&&(v=T),Dt(),v!==k&&t.value.trim()&&jt(++$)},L=A=>{var j,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=(j=A.products)==null?void 0:j[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?po()?`#${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=pn(`${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??"":m||(d.meta().catch(()=>i.textContent="Search index could not be loaded."),x())},$=0,K,J;t.addEventListener("input",()=>{clearTimeout(J),J=setTimeout(()=>void jt(++$),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=po();mn(()=>history.replaceState(history.state,"",`${location.pathname}${k?N?`${location.search}#${k}`:`?${k}`:""}`))},jt=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(m){let k=await m(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 Qi(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 j=M[R.source];return Object.assign(R,{base:y(j.prefix),from:j.own?void 0:j.label,also:(W=R.others)==null?void 0:W.map(q=>M[q.source].label).filter(Boolean),data:z(j.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 Zi(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=mr.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,mn(()=>sessionStorage.setItem(C,M)),Dt(),(H=ot.querySelector(`[data-scope="${M}"]`))==null||H.focus(),t.value.trim()?jt(++$):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 Vt=A=>A.replace(/"/g,""),$e=A=>`section:"${Vt(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(Vt(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=>Vt(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 j=$e(H),W=t.value.replace(new RegExp(`\\\\s*section:"${Vt(H).replace(/[.*+?^${}()|[\\]\\\\]/g,"\\\\$&")}"`,"i"),"").trim();t.value=R?W:`${W} ${j}`.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,j,W,q)=>{let V=document.createElement("label");V.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=j,tt.checked=(B[R]??[]).some(Co=>Co.toLowerCase()===j.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),V.append(tt,bt,Ke),V},N=(R,j)=>{let W=document.createElement("ul");W.className="space-y-0.5";for(let q of j){let V=document.createElement("li");if(q.hasValue)V.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,V.append(tt)}if(q.children.length){let tt=N(R,q.children);tt.classList.add("ml-4"),V.append(tt)}W.append(V)}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 j=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||j.some(V=>V.value.includes("/")))W.append(N(R,ho(R,j,{display:O})));else{let V=document.createElement("ul");V.className="space-y-0.5";for(let tt of j){let bt=document.createElement("li");bt.append(k(R,tt.value,ne(R,tt.value,O),tt.count)),V.append(bt)}W.append(V)}M.push(W)}S.replaceChildren(...M),At!==void 0&&(((At?[...S.querySelectorAll("input[data-facet-name]")].find(j=>`${j.dataset.facetName}\\0${j.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:pr);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 j of R)H.append("filter",`${P}:${j}`);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 j=[D.from,D.section].filter(Boolean).join(" \\xB7 ");if(j){let V=document.createElement("div");V.className="text-xs text-muted-foreground",V.textContent=j,P.a.appendChild(V)}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 V=document.createElement("div");V.className="mt-1 text-xs text-muted-foreground",V.textContent=`${e.dataset.alsoIn??"Also in"} ${D.also.join(", ")}`,P.a.appendChild(V)}N.push(P.li);let q=()=>D.fragment?(D.fragment[0]&&W.replaceChildren(...gn(D.fragment[0],k)),(D.sections??[]).map(([V,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(V,k)),bt.li})):[];if(D.fragment)N.push(...q());else if(it){let V=K??Bt(A);nt.set(P.li,()=>void Xi(V,[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 jt(++$)}}function mn(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",m=document.createElement("div");m.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(),m.remove(),(w=document.getElementById("db-content"))==null||w.focus({preventScroll:!0})},{signal:n}),m.append(b),e.prepend(m),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},m=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,jt=nt.left,rt=nt.top;F=qt({},F,{width:it,height:Kt,left:jt,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(),Vt=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=(-Vt+(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():m({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:m,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&&(mo({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';
|
|
22568
|
-
var CLIENT_FILE = "dogsbay-
|
|
22569
|
-
var SSG_VERSION = "0.2.0-beta.
|
|
22570
|
-
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
|
|
22571
23113
|
header in the callout colours of its tone. A closeable one is closed and remembered by <db-announcement>,
|
|
22572
23114
|
and the head script hides a closed one before first paint. Context: announcement = {id, key (what a close is
|
|
22573
23115
|
stored under, as the head meta), html (inline Markdown, rendered), toneClass, closeable} or "". -#}
|
|
@@ -22796,35 +23338,41 @@ var THEME_TEMPLATES = { "layouts/blank.html": '{# A page without the sidebar or
|
|
|
22796
23338
|
{%- endif %}
|
|
22797
23339
|
</section>
|
|
22798
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' };
|
|
22799
|
-
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}", "{}", "||"];
|
|
22800
23342
|
var SITE_NOTICES = `Third-party software in this site's _dogsbay/ files (dogsbay.js, site.css) and pages
|
|
22801
23343
|
|
|
22802
23344
|
========================================================================
|
|
22803
|
-
@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)
|
|
22804
23352
|
https://github.com/dogsbay/dogsbay.git
|
|
22805
23353
|
|
|
22806
23354
|
Licensed under MIT; the package ships no licence file.
|
|
22807
23355
|
|
|
22808
23356
|
========================================================================
|
|
22809
|
-
@dogsbay/
|
|
23357
|
+
@dogsbay/render-html@0.2.0-beta.177 (MIT)
|
|
22810
23358
|
https://github.com/dogsbay/dogsbay.git
|
|
22811
23359
|
|
|
22812
23360
|
Licensed under MIT; the package ships no licence file.
|
|
22813
23361
|
|
|
22814
23362
|
========================================================================
|
|
22815
|
-
@dogsbay/
|
|
23363
|
+
@dogsbay/search@0.2.0-beta.177 (MIT)
|
|
22816
23364
|
https://github.com/dogsbay/dogsbay.git
|
|
22817
23365
|
|
|
22818
23366
|
Licensed under MIT; the package ships no licence file.
|
|
22819
23367
|
|
|
22820
23368
|
========================================================================
|
|
22821
|
-
@dogsbay/
|
|
23369
|
+
@dogsbay/site-files@0.2.0-beta.177 (MIT)
|
|
22822
23370
|
https://github.com/dogsbay/dogsbay.git
|
|
22823
23371
|
|
|
22824
23372
|
Licensed under MIT; the package ships no licence file.
|
|
22825
23373
|
|
|
22826
23374
|
========================================================================
|
|
22827
|
-
@dogsbay/ui@0.2.0-beta.
|
|
23375
|
+
@dogsbay/ui@0.2.0-beta.177 (MIT)
|
|
22828
23376
|
https://github.com/dogsbay/dogsbay.git
|
|
22829
23377
|
|
|
22830
23378
|
Licensed under MIT; the package ships no licence file.
|
|
@@ -25516,28 +26064,28 @@ var EntityDecoder2 = class {
|
|
|
25516
26064
|
* @param offset The offset at which the entity begins. Should be 0 if this is not the first call.
|
|
25517
26065
|
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
|
|
25518
26066
|
*/
|
|
25519
|
-
write(
|
|
26067
|
+
write(str8, offset) {
|
|
25520
26068
|
switch (this.state) {
|
|
25521
26069
|
case EntityDecoderState2.EntityStart: {
|
|
25522
|
-
if (
|
|
26070
|
+
if (str8.charCodeAt(offset) === CharCodes3.NUM) {
|
|
25523
26071
|
this.state = EntityDecoderState2.NumericStart;
|
|
25524
26072
|
this.consumed += 1;
|
|
25525
|
-
return this.stateNumericStart(
|
|
26073
|
+
return this.stateNumericStart(str8, offset + 1);
|
|
25526
26074
|
}
|
|
25527
26075
|
this.state = EntityDecoderState2.NamedEntity;
|
|
25528
|
-
return this.stateNamedEntity(
|
|
26076
|
+
return this.stateNamedEntity(str8, offset);
|
|
25529
26077
|
}
|
|
25530
26078
|
case EntityDecoderState2.NumericStart: {
|
|
25531
|
-
return this.stateNumericStart(
|
|
26079
|
+
return this.stateNumericStart(str8, offset);
|
|
25532
26080
|
}
|
|
25533
26081
|
case EntityDecoderState2.NumericDecimal: {
|
|
25534
|
-
return this.stateNumericDecimal(
|
|
26082
|
+
return this.stateNumericDecimal(str8, offset);
|
|
25535
26083
|
}
|
|
25536
26084
|
case EntityDecoderState2.NumericHex: {
|
|
25537
|
-
return this.stateNumericHex(
|
|
26085
|
+
return this.stateNumericHex(str8, offset);
|
|
25538
26086
|
}
|
|
25539
26087
|
case EntityDecoderState2.NamedEntity: {
|
|
25540
|
-
return this.stateNamedEntity(
|
|
26088
|
+
return this.stateNamedEntity(str8, offset);
|
|
25541
26089
|
}
|
|
25542
26090
|
}
|
|
25543
26091
|
}
|
|
@@ -25550,22 +26098,22 @@ var EntityDecoder2 = class {
|
|
|
25550
26098
|
* @param offset The current offset.
|
|
25551
26099
|
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
|
|
25552
26100
|
*/
|
|
25553
|
-
stateNumericStart(
|
|
25554
|
-
if (offset >=
|
|
26101
|
+
stateNumericStart(str8, offset) {
|
|
26102
|
+
if (offset >= str8.length) {
|
|
25555
26103
|
return -1;
|
|
25556
26104
|
}
|
|
25557
|
-
if ((
|
|
26105
|
+
if ((str8.charCodeAt(offset) | TO_LOWER_BIT2) === CharCodes3.LOWER_X) {
|
|
25558
26106
|
this.state = EntityDecoderState2.NumericHex;
|
|
25559
26107
|
this.consumed += 1;
|
|
25560
|
-
return this.stateNumericHex(
|
|
26108
|
+
return this.stateNumericHex(str8, offset + 1);
|
|
25561
26109
|
}
|
|
25562
26110
|
this.state = EntityDecoderState2.NumericDecimal;
|
|
25563
|
-
return this.stateNumericDecimal(
|
|
26111
|
+
return this.stateNumericDecimal(str8, offset);
|
|
25564
26112
|
}
|
|
25565
|
-
addToNumericResult(
|
|
26113
|
+
addToNumericResult(str8, start, end, base) {
|
|
25566
26114
|
if (start !== end) {
|
|
25567
26115
|
const digitCount = end - start;
|
|
25568
|
-
this.result = this.result * Math.pow(base, digitCount) + parseInt(
|
|
26116
|
+
this.result = this.result * Math.pow(base, digitCount) + parseInt(str8.substr(start, digitCount), base);
|
|
25569
26117
|
this.consumed += digitCount;
|
|
25570
26118
|
}
|
|
25571
26119
|
}
|
|
@@ -25578,18 +26126,18 @@ var EntityDecoder2 = class {
|
|
|
25578
26126
|
* @param offset The current offset.
|
|
25579
26127
|
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
|
|
25580
26128
|
*/
|
|
25581
|
-
stateNumericHex(
|
|
26129
|
+
stateNumericHex(str8, offset) {
|
|
25582
26130
|
const startIdx = offset;
|
|
25583
|
-
while (offset <
|
|
25584
|
-
const char =
|
|
26131
|
+
while (offset < str8.length) {
|
|
26132
|
+
const char = str8.charCodeAt(offset);
|
|
25585
26133
|
if (isNumber2(char) || isHexadecimalCharacter2(char)) {
|
|
25586
26134
|
offset += 1;
|
|
25587
26135
|
} else {
|
|
25588
|
-
this.addToNumericResult(
|
|
26136
|
+
this.addToNumericResult(str8, startIdx, offset, 16);
|
|
25589
26137
|
return this.emitNumericEntity(char, 3);
|
|
25590
26138
|
}
|
|
25591
26139
|
}
|
|
25592
|
-
this.addToNumericResult(
|
|
26140
|
+
this.addToNumericResult(str8, startIdx, offset, 16);
|
|
25593
26141
|
return -1;
|
|
25594
26142
|
}
|
|
25595
26143
|
/**
|
|
@@ -25601,18 +26149,18 @@ var EntityDecoder2 = class {
|
|
|
25601
26149
|
* @param offset The current offset.
|
|
25602
26150
|
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
|
|
25603
26151
|
*/
|
|
25604
|
-
stateNumericDecimal(
|
|
26152
|
+
stateNumericDecimal(str8, offset) {
|
|
25605
26153
|
const startIdx = offset;
|
|
25606
|
-
while (offset <
|
|
25607
|
-
const char =
|
|
26154
|
+
while (offset < str8.length) {
|
|
26155
|
+
const char = str8.charCodeAt(offset);
|
|
25608
26156
|
if (isNumber2(char)) {
|
|
25609
26157
|
offset += 1;
|
|
25610
26158
|
} else {
|
|
25611
|
-
this.addToNumericResult(
|
|
26159
|
+
this.addToNumericResult(str8, startIdx, offset, 10);
|
|
25612
26160
|
return this.emitNumericEntity(char, 2);
|
|
25613
26161
|
}
|
|
25614
26162
|
}
|
|
25615
|
-
this.addToNumericResult(
|
|
26163
|
+
this.addToNumericResult(str8, startIdx, offset, 10);
|
|
25616
26164
|
return -1;
|
|
25617
26165
|
}
|
|
25618
26166
|
/**
|
|
@@ -25657,12 +26205,12 @@ var EntityDecoder2 = class {
|
|
|
25657
26205
|
* @param offset The current offset.
|
|
25658
26206
|
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
|
|
25659
26207
|
*/
|
|
25660
|
-
stateNamedEntity(
|
|
26208
|
+
stateNamedEntity(str8, offset) {
|
|
25661
26209
|
const { decodeTree } = this;
|
|
25662
26210
|
let current = decodeTree[this.treeIndex];
|
|
25663
26211
|
let valueLength = (current & BinTrieFlags2.VALUE_LENGTH) >> 14;
|
|
25664
|
-
for (; offset <
|
|
25665
|
-
const char =
|
|
26212
|
+
for (; offset < str8.length; offset++, this.excess++) {
|
|
26213
|
+
const char = str8.charCodeAt(offset);
|
|
25666
26214
|
this.treeIndex = determineBranch2(decodeTree, current, this.treeIndex + Math.max(1, valueLength), char);
|
|
25667
26215
|
if (this.treeIndex < 0) {
|
|
25668
26216
|
return this.result === 0 || // If we are parsing an attribute
|
|
@@ -25747,15 +26295,15 @@ var EntityDecoder2 = class {
|
|
|
25747
26295
|
};
|
|
25748
26296
|
function getDecoder(decodeTree) {
|
|
25749
26297
|
let ret = "";
|
|
25750
|
-
const decoder2 = new EntityDecoder2(decodeTree, (
|
|
25751
|
-
return function decodeWithTrie(
|
|
26298
|
+
const decoder2 = new EntityDecoder2(decodeTree, (str8) => ret += fromCodePoint2(str8));
|
|
26299
|
+
return function decodeWithTrie(str8, decodeMode) {
|
|
25752
26300
|
let lastIndex = 0;
|
|
25753
26301
|
let offset = 0;
|
|
25754
|
-
while ((offset =
|
|
25755
|
-
ret +=
|
|
26302
|
+
while ((offset = str8.indexOf("&", offset)) >= 0) {
|
|
26303
|
+
ret += str8.slice(lastIndex, offset);
|
|
25756
26304
|
decoder2.startEntity(decodeMode);
|
|
25757
26305
|
const len = decoder2.write(
|
|
25758
|
-
|
|
26306
|
+
str8,
|
|
25759
26307
|
// Skip the "&"
|
|
25760
26308
|
offset + 1
|
|
25761
26309
|
);
|
|
@@ -25766,7 +26314,7 @@ function getDecoder(decodeTree) {
|
|
|
25766
26314
|
lastIndex = offset + len;
|
|
25767
26315
|
offset = len === 0 ? lastIndex + 1 : lastIndex;
|
|
25768
26316
|
}
|
|
25769
|
-
const result = ret +
|
|
26317
|
+
const result = ret + str8.slice(lastIndex);
|
|
25770
26318
|
ret = "";
|
|
25771
26319
|
return result;
|
|
25772
26320
|
};
|
|
@@ -25819,28 +26367,28 @@ var xmlCodeMap = /* @__PURE__ */ new Map([
|
|
|
25819
26367
|
]);
|
|
25820
26368
|
var getCodePoint = (
|
|
25821
26369
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
25822
|
-
String.prototype.codePointAt != null ? (
|
|
26370
|
+
String.prototype.codePointAt != null ? (str8, index) => str8.codePointAt(index) : (
|
|
25823
26371
|
// http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae
|
|
25824
26372
|
(c, index) => (c.charCodeAt(index) & 64512) === 55296 ? (c.charCodeAt(index) - 55296) * 1024 + c.charCodeAt(index + 1) - 56320 + 65536 : c.charCodeAt(index)
|
|
25825
26373
|
)
|
|
25826
26374
|
);
|
|
25827
|
-
function encodeXML(
|
|
26375
|
+
function encodeXML(str8) {
|
|
25828
26376
|
let ret = "";
|
|
25829
26377
|
let lastIdx = 0;
|
|
25830
26378
|
let match;
|
|
25831
|
-
while ((match = xmlReplacer.exec(
|
|
26379
|
+
while ((match = xmlReplacer.exec(str8)) !== null) {
|
|
25832
26380
|
const i = match.index;
|
|
25833
|
-
const char =
|
|
26381
|
+
const char = str8.charCodeAt(i);
|
|
25834
26382
|
const next = xmlCodeMap.get(char);
|
|
25835
26383
|
if (next !== void 0) {
|
|
25836
|
-
ret +=
|
|
26384
|
+
ret += str8.substring(lastIdx, i) + next;
|
|
25837
26385
|
lastIdx = i + 1;
|
|
25838
26386
|
} else {
|
|
25839
|
-
ret += `${
|
|
26387
|
+
ret += `${str8.substring(lastIdx, i)}&#x${getCodePoint(str8, i).toString(16)};`;
|
|
25840
26388
|
lastIdx = xmlReplacer.lastIndex += Number((char & 64512) === 55296);
|
|
25841
26389
|
}
|
|
25842
26390
|
}
|
|
25843
|
-
return ret +
|
|
26391
|
+
return ret + str8.substr(lastIdx);
|
|
25844
26392
|
}
|
|
25845
26393
|
function getEscaper(regex, map) {
|
|
25846
26394
|
return function escape2(data) {
|
|
@@ -26744,7 +27292,6 @@ var TEXT_HTML_TYPES = /* @__PURE__ */ new Set(["code", "math", "math-block", "di
|
|
|
26744
27292
|
var URL_PROPS = /* @__PURE__ */ new Set(["href", "src", "url", "link", "poster", "image", "logo"]);
|
|
26745
27293
|
var escAttr3 = (s) => s.replace(/&/g, "&").replace(/"/g, """).replace(/'/g, "'").replace(/</g, "<").replace(/>/g, ">");
|
|
26746
27294
|
var escText2 = (s) => s.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
26747
|
-
var RESERVED_ID3 = /^(db-|tab-\d|tabpanel-\d|acc-\d|accpanel-\d|fn-|fnref-)/;
|
|
26748
27295
|
function safeUrl(raw, kind) {
|
|
26749
27296
|
const v = raw.replace(/[\u0000- \u007f-\u009f]/g, "").toLowerCase();
|
|
26750
27297
|
const scheme = /^([a-z][a-z0-9+.-]*):/.exec(v)?.[1];
|
|
@@ -26788,7 +27335,7 @@ function sanitizeHtml(html, warn) {
|
|
|
26788
27335
|
dropped.add(`${name}[${key2}]`);
|
|
26789
27336
|
continue;
|
|
26790
27337
|
}
|
|
26791
|
-
if (key2 === "id" &&
|
|
27338
|
+
if (key2 === "id" && RESERVED_ID.test(v)) {
|
|
26792
27339
|
dropped.add(`${name}[id=${v.slice(0, 40)}]`);
|
|
26793
27340
|
continue;
|
|
26794
27341
|
}
|
|
@@ -26831,7 +27378,7 @@ function cleanProps(props, where, warn) {
|
|
|
26831
27378
|
warn("attribute-dropped", `${where}: dropped the "${k}" attribute (not allowed in a sanitized page)`);
|
|
26832
27379
|
continue;
|
|
26833
27380
|
}
|
|
26834
|
-
if (k === "id" && typeof v === "string" &&
|
|
27381
|
+
if (k === "id" && typeof v === "string" && RESERVED_ID.test(v) && !where.startsWith("footnote")) {
|
|
26835
27382
|
warn("attribute-dropped", `${where}: dropped id="${v.slice(0, 40)}" (reserved for the page's own components)`);
|
|
26836
27383
|
continue;
|
|
26837
27384
|
}
|
|
@@ -26939,11 +27486,11 @@ function safeSegment(s) {
|
|
|
26939
27486
|
}
|
|
26940
27487
|
var ARRAY_FIELDS = /* @__PURE__ */ new Set(["tags", "category", "audience"]);
|
|
26941
27488
|
var SCALAR_FIELDS = /* @__PURE__ */ new Set(["type", "status"]);
|
|
26942
|
-
function pageTerms(
|
|
26943
|
-
const m =
|
|
27489
|
+
function pageTerms(meta2, name) {
|
|
27490
|
+
const m = meta2;
|
|
26944
27491
|
if (ARRAY_FIELDS.has(name)) return Array.isArray(m[name]) ? m[name].filter((v) => typeof v === "string") : [];
|
|
26945
27492
|
if (SCALAR_FIELDS.has(name)) return typeof m[name] === "string" ? [m[name]] : [];
|
|
26946
|
-
return
|
|
27493
|
+
return meta2.taxonomies?.[name] ?? [];
|
|
26947
27494
|
}
|
|
26948
27495
|
function expandTerm(term, hierarchical) {
|
|
26949
27496
|
const segs = term.split("/").filter(Boolean);
|
|
@@ -26952,12 +27499,12 @@ function expandTerm(term, hierarchical) {
|
|
|
26952
27499
|
return segs.map((_, i) => segs.slice(0, i + 1));
|
|
26953
27500
|
}
|
|
26954
27501
|
function searchFilters(defs, fm, slug, unit) {
|
|
26955
|
-
const
|
|
26956
|
-
if (
|
|
26957
|
-
const { tag: _t, section: _s, ...rest } =
|
|
26958
|
-
|
|
27502
|
+
const meta2 = parseMeta(fm, { slug, taxonomyNames: defs.map((d) => d.name) });
|
|
27503
|
+
if (meta2.taxonomies && (Object.hasOwn(meta2.taxonomies, "tag") || Object.hasOwn(meta2.taxonomies, "section"))) {
|
|
27504
|
+
const { tag: _t, section: _s, ...rest } = meta2.taxonomies;
|
|
27505
|
+
meta2.taxonomies = rest;
|
|
26959
27506
|
}
|
|
26960
|
-
const all = pageFacets(
|
|
27507
|
+
const all = pageFacets(meta2, {
|
|
26961
27508
|
tagPrefixes: searchTagPrefixes(defs),
|
|
26962
27509
|
hierarchical: defs.filter((d) => d.hierarchical).map((d) => d.name),
|
|
26963
27510
|
unit
|
|
@@ -26987,10 +27534,10 @@ var TaxonomyCollector = class {
|
|
|
26987
27534
|
/** Record a page's terms from its front matter. */
|
|
26988
27535
|
add(slug, fm) {
|
|
26989
27536
|
if (!this.defs.length) return;
|
|
26990
|
-
const
|
|
27537
|
+
const meta2 = parseMeta(fm, { slug, taxonomyNames: this.names });
|
|
26991
27538
|
for (const def of this.defs) {
|
|
26992
27539
|
const terms = this.byName.get(def.name);
|
|
26993
|
-
for (const value of pageTerms(
|
|
27540
|
+
for (const value of pageTerms(meta2, def.name)) {
|
|
26994
27541
|
for (const path of expandTerm(value, def.hierarchical)) {
|
|
26995
27542
|
const key2 = path.join("/");
|
|
26996
27543
|
let t = terms.get(key2);
|
|
@@ -27492,17 +28039,6 @@ function socialIconSvg(name, size = 20) {
|
|
|
27492
28039
|
}
|
|
27493
28040
|
var SOCIAL_ICONS = Object.keys(SOCIAL_ICON_BODIES);
|
|
27494
28041
|
|
|
27495
|
-
// node_modules/@dogsbay/elements/dist/chunk-MNO3RAM2.js
|
|
27496
|
-
var ANNOUNCEMENT_HEAD_SCRIPT = `(function(){try{var m=document.querySelector('meta[name="db-announcement"]');if(m&&m.content&&localStorage.getItem("db-announcement-closed:"+m.content))document.documentElement.setAttribute("data-announcement-closed","")}catch(e){}})();`;
|
|
27497
|
-
|
|
27498
|
-
// node_modules/@dogsbay/elements/dist/chunk-QDB537UE.js
|
|
27499
|
-
var script = (fallback) => `(function(){var s=null;try{s=localStorage.getItem("theme")}catch(e){}var d=s==="dark"||(s!=="light"&&${fallback});document.documentElement.classList.toggle("dark",d)})();`;
|
|
27500
|
-
var COLOR_MODE_HEAD_SCRIPTS = Object.freeze({
|
|
27501
|
-
system: script('window.matchMedia("(prefers-color-scheme: dark)").matches'),
|
|
27502
|
-
light: script("false"),
|
|
27503
|
-
dark: script("true")
|
|
27504
|
-
});
|
|
27505
|
-
|
|
27506
28042
|
// src/theme/compose.ts
|
|
27507
28043
|
var LINKS_LIST_HIDDEN = { lg: "lg:hidden", xl: "xl:hidden", "2xl": "2xl:hidden", never: "" };
|
|
27508
28044
|
var LINKS_BAR = { lg: "hidden lg:flex", xl: "hidden xl:flex", "2xl": "hidden 2xl:flex", never: "hidden" };
|
|
@@ -27636,6 +28172,7 @@ async function composePage(p, cfg, templates) {
|
|
|
27636
28172
|
// As the Astro pipeline: turning page actions off also drops the footer link.
|
|
27637
28173
|
llmsHref: cfg.llmsTxt && cfg.pageActions.enabled && cfg.pageActions.footerLink && !p.generated ? `${p.unitRoot}llms.txt` : void 0,
|
|
27638
28174
|
poweredBy: cfg.poweredBy,
|
|
28175
|
+
linkPreviews: cfg.linkPreviews,
|
|
27639
28176
|
icons: ICONS2,
|
|
27640
28177
|
// The site chrome (plans/site-chrome.md): headerLinks, headerSocial, footerColumns, footerSocial, announcement, siteLogo, copyrightHtml.
|
|
27641
28178
|
...chromeData(p, cfg, t)
|
|
@@ -27915,6 +28452,65 @@ function applyUnlisted(nav, pages) {
|
|
|
27915
28452
|
return { slugs: marked.slugs, listed: fromItems(listedNav(marked.nav, marked.slugs, { slugOf }), marked.slugs), locate: locate3, outsideNav: marked.outsideNav, warnings: marked.warnings };
|
|
27916
28453
|
}
|
|
27917
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
|
+
|
|
27918
28514
|
// src/core/preprocess.ts
|
|
27919
28515
|
var HASH_SENTINEL2 = " DBMINJA_HASH_OPEN ";
|
|
27920
28516
|
var mask2 = (s) => maskMinjaInCode(s).replace(/\{#/g, `{${HASH_SENTINEL2}`);
|
|
@@ -28028,7 +28624,7 @@ async function preprocess(text4, path, attributes, files, undefinedRefs = "prese
|
|
|
28028
28624
|
warnings.push({ tag: w.tag, line: w.line, ...w.include ? { include: w.include } : {}, ...w.variable ? { variable: w.variable } : {} });
|
|
28029
28625
|
}
|
|
28030
28626
|
};
|
|
28031
|
-
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 };
|
|
28032
28628
|
const unmasked = unmask2(traced.output);
|
|
28033
28629
|
const out = stripFenceMinjaMarkers(stripInlineMinjaMarkers(unmasked));
|
|
28034
28630
|
let map;
|
|
@@ -28037,7 +28633,9 @@ async function preprocess(text4, path, attributes, files, undefinedRefs = "prese
|
|
|
28037
28633
|
map = renameIncludes(inFile2, (f) => loaded.get(f)?.file ?? f);
|
|
28038
28634
|
if (out !== unmasked) map = composeTextMaps(map, diffTextMap(unmasked, out));
|
|
28039
28635
|
}
|
|
28040
|
-
|
|
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 } : {} };
|
|
28041
28639
|
} catch (err) {
|
|
28042
28640
|
if (budget && timeout < budget.renderMs && err instanceof RenderLimitError && budget.next() <= 0) return skip();
|
|
28043
28641
|
return { text: text4, error: err instanceof Error ? err.message : String(err) };
|
|
@@ -28045,6 +28643,12 @@ async function preprocess(text4, path, attributes, files, undefinedRefs = "prese
|
|
|
28045
28643
|
budget?.end();
|
|
28046
28644
|
}
|
|
28047
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
|
+
}
|
|
28048
28652
|
function renameIncludes(map, name) {
|
|
28049
28653
|
const seg = (s) => s.kind === "include" ? { ...s, file: name(s.file), ...s.map ? { map: renameIncludes(s.map, name) } : {} } : s;
|
|
28050
28654
|
return { segments: map.segments.map(seg) };
|
|
@@ -28403,8 +29007,8 @@ var SearchIndexBuilder = class {
|
|
|
28403
29007
|
if (f.length) return [d.title, d.url, i, t, f];
|
|
28404
29008
|
return t.length ? [d.title, d.url, i, t] : [d.title, d.url, i];
|
|
28405
29009
|
});
|
|
28406
|
-
const
|
|
28407
|
-
yield [file.docs, wrap(key.docs,
|
|
29010
|
+
const meta2 = { format: FORMAT2, depth, count: this.docs.length, shards: [...byShard.keys()].sort(), sections: sections2, tags, ...facets.length ? { facets } : {}, block: BLOCK, lang: this.opts.lang, docs };
|
|
29011
|
+
yield [file.docs, wrap(key.docs, meta2)];
|
|
28408
29012
|
for (let b = this.fragmentsOut; b * BLOCK < this.docs.length; b++) yield this.fragmentFile(b);
|
|
28409
29013
|
if (!this.grouped) {
|
|
28410
29014
|
const n = this.termIds.size;
|
|
@@ -28447,7 +29051,7 @@ var SearchIndexBuilder = class {
|
|
|
28447
29051
|
this.grouped = void 0;
|
|
28448
29052
|
}
|
|
28449
29053
|
};
|
|
28450
|
-
var
|
|
29054
|
+
var str6 = (v) => typeof v === "string" ? v : "";
|
|
28451
29055
|
var objects = (v) => Array.isArray(v) ? v.filter((x) => !!x && typeof x === "object") : [];
|
|
28452
29056
|
var INLINE_TAGS = new Set("a abbr b bdi bdo cite code data del dfn em i ins kbd mark q s samp small span strong sub sup time u var wbr".split(" "));
|
|
28453
29057
|
var ENTITY3 = { lt: "<", gt: ">", quot: '"', "#39": "'", "#x27": "'", apos: "'", nbsp: " ", amp: "&" };
|
|
@@ -28533,13 +29137,13 @@ function htmlText(html) {
|
|
|
28533
29137
|
}
|
|
28534
29138
|
function propertyText(list5, depth = 0) {
|
|
28535
29139
|
if (depth > 10) return [];
|
|
28536
|
-
return objects(list5).flatMap((p) => [
|
|
29140
|
+
return objects(list5).flatMap((p) => [str6(p.name), specText(p.description), ...propertyText(p.properties, depth + 1), ...propertyText(p.items, depth + 1)]);
|
|
28537
29141
|
}
|
|
28538
29142
|
var SPEC_MARKUP = /* @__PURE__ */ new Set(
|
|
28539
29143
|
[...INLINE_TAGS, ..."br p div ul ol li dl dt dd table thead tbody tfoot tr td th caption h1 h2 h3 h4 h5 h6 blockquote hr img pre section".split(" ")]
|
|
28540
29144
|
);
|
|
28541
29145
|
function specText(v) {
|
|
28542
|
-
const s =
|
|
29146
|
+
const s = str6(v);
|
|
28543
29147
|
if (!s.includes("<") && !s.includes("&")) return s;
|
|
28544
29148
|
return s.split(/(`+[^`]*`+)/).map(
|
|
28545
29149
|
(part, i) => i % 2 ? part : decode2(part.replace(/<\/?([a-z][a-z0-9]*)\b[^<>]*>/gi, (m, name) => SPEC_MARKUP.has(name.toLowerCase()) ? INLINE_TAGS.has(name.toLowerCase()) ? "" : " " : m))
|
|
@@ -28569,7 +29173,7 @@ function extractText2(tree) {
|
|
|
28569
29173
|
switch (n.type) {
|
|
28570
29174
|
case "endpoint":
|
|
28571
29175
|
body.push(
|
|
28572
|
-
`${
|
|
29176
|
+
`${str6(ap.method).toUpperCase()} ${str6(ap.path)}`,
|
|
28573
29177
|
specText(ap.summary),
|
|
28574
29178
|
specText(ap.description),
|
|
28575
29179
|
...propertyText(ap.parameters),
|
|
@@ -28579,15 +29183,15 @@ function extractText2(tree) {
|
|
|
28579
29183
|
continue;
|
|
28580
29184
|
case "api-class":
|
|
28581
29185
|
case "api-member":
|
|
28582
|
-
headings.push(
|
|
29186
|
+
headings.push(str6(ap.name));
|
|
28583
29187
|
walk(n.children);
|
|
28584
29188
|
continue;
|
|
28585
29189
|
case "api-doc":
|
|
28586
|
-
body.push(htmlText(
|
|
29190
|
+
body.push(htmlText(str6(ap.html)));
|
|
28587
29191
|
walk(n.children);
|
|
28588
29192
|
continue;
|
|
28589
29193
|
case "api-params":
|
|
28590
|
-
for (const p2 of objects(ap.params)) body.push(
|
|
29194
|
+
for (const p2 of objects(ap.params)) body.push(str6(p2.name), htmlText(str6(p2.docHtml)) || str6(p2.doc) || str6(p2.description));
|
|
28591
29195
|
continue;
|
|
28592
29196
|
case "prose":
|
|
28593
29197
|
if (!n.inline && typeof n.html === "string") {
|
|
@@ -29121,16 +29725,16 @@ var BlogCollector = class {
|
|
|
29121
29725
|
}
|
|
29122
29726
|
posts = /* @__PURE__ */ new Map();
|
|
29123
29727
|
add(slug, title, fm) {
|
|
29124
|
-
const
|
|
29125
|
-
const date =
|
|
29126
|
-
const updated =
|
|
29728
|
+
const meta2 = parseMeta(fm);
|
|
29729
|
+
const date = meta2[this.def.dateField];
|
|
29730
|
+
const updated = meta2.updated;
|
|
29127
29731
|
const d = (s) => s === void 0 ? void 0 : detach(s);
|
|
29128
29732
|
this.posts.set(slug, {
|
|
29129
29733
|
slug,
|
|
29130
29734
|
title,
|
|
29131
29735
|
date: d(date),
|
|
29132
29736
|
updated: updated && updated !== date ? d(updated) : void 0,
|
|
29133
|
-
authors:
|
|
29737
|
+
authors: meta2.author?.map(detach),
|
|
29134
29738
|
heroImage: typeof fm.heroImage === "string" && fm.heroImage ? d(fm.heroImage) : void 0
|
|
29135
29739
|
});
|
|
29136
29740
|
}
|
|
@@ -29461,7 +30065,7 @@ function diagramStore(input, cfg) {
|
|
|
29461
30065
|
return renderer ? new DiagramStore(renderer, input.diagramCacheChars, input.diagramPinChars) : void 0;
|
|
29462
30066
|
}
|
|
29463
30067
|
async function siteCssBuilder(input) {
|
|
29464
|
-
return input.css ?? (await import("./css-build-
|
|
30068
|
+
return input.css ?? (await import("./css-build-VKKTSP6P.mjs")).buildSiteCss;
|
|
29465
30069
|
}
|
|
29466
30070
|
var SITE_FILES = /* @__PURE__ */ new Set(["robots.txt", "sitemap-index.xml"]);
|
|
29467
30071
|
var SEARCH_PAGE = "search.html";
|
|
@@ -29504,14 +30108,14 @@ function pageLinesOf(tree) {
|
|
|
29504
30108
|
return;
|
|
29505
30109
|
}
|
|
29506
30110
|
if (!node || typeof node !== "object") return;
|
|
29507
|
-
const
|
|
29508
|
-
if (
|
|
29509
|
-
const o =
|
|
30111
|
+
const meta2 = node.meta;
|
|
30112
|
+
if (meta2 && typeof meta2.line === "number") {
|
|
30113
|
+
const o = meta2.source;
|
|
29510
30114
|
const to = !o ? void 0 : o.file === void 0 ? o.from ?? o.line : o.via.find((v) => v.file === void 0)?.from;
|
|
29511
|
-
if (to === void 0) delete
|
|
29512
|
-
else
|
|
30115
|
+
if (to === void 0) delete meta2.line;
|
|
30116
|
+
else meta2.line = to;
|
|
29513
30117
|
}
|
|
29514
|
-
for (const v of Object.values(node)) if (v && typeof v === "object" && v !==
|
|
30118
|
+
for (const v of Object.values(node)) if (v && typeof v === "object" && v !== meta2) walk(v);
|
|
29515
30119
|
};
|
|
29516
30120
|
walk(tree);
|
|
29517
30121
|
}
|
|
@@ -30303,7 +30907,7 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, reads),
|
|
|
30303
30907
|
topicMaps.set(path, kept);
|
|
30304
30908
|
continue;
|
|
30305
30909
|
}
|
|
30306
|
-
const { topicMapError, topicMapNav } = await import("./topicmap-
|
|
30910
|
+
const { topicMapError, topicMapNav } = await import("./topicmap-IGUURUBF.mjs");
|
|
30307
30911
|
const reads = /* @__PURE__ */ new Map();
|
|
30308
30912
|
const projectText = async (p) => {
|
|
30309
30913
|
const c = input.files.get(p);
|
|
@@ -30443,7 +31047,7 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, reads),
|
|
|
30443
31047
|
state.redirects.push({ from: inUnit(slug), to: target(fm.redirect), suffix: suffix || void 0, status: 301, origin: "frontmatter", declaredBy: `${label}:${p}`, stub: prefix + outFileFor(slug, isIndexFile, cfg.linkStyle) });
|
|
30444
31048
|
{
|
|
30445
31049
|
const hash = isExternal(fm.redirect) ? "" : splitSuffix(fm.redirect.trim()).suffix.replace(/^\?[^#]*/, "");
|
|
30446
|
-
const own2 = { title:
|
|
31050
|
+
const own2 = { title: str7(fm.title) && detach(str7(fm.title)), description: typeof fm.description === "string" ? detach(fm.description) : void 0 };
|
|
30447
31051
|
stubTargets.set(slug, { to: target(fm.redirect), ...hash.length > 1 ? { fragment: hash } : {}, ...own2 });
|
|
30448
31052
|
}
|
|
30449
31053
|
continue;
|
|
@@ -30479,11 +31083,11 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, reads),
|
|
|
30479
31083
|
}
|
|
30480
31084
|
} else {
|
|
30481
31085
|
const keep = memo2 && !templatesOf(p).isTemplatePage(fm);
|
|
30482
|
-
const titled = `${
|
|
31086
|
+
const titled = `${str7(fm.title) ?? ""} ${fm.description ?? ""}`;
|
|
30483
31087
|
if (templatesOf(p).isTemplatePage(fm) && /\{[{%]/.test(titled) && /\bdata\s*(\.[A-Za-z_]|\[)/.test(titled)) dataInTitles = true;
|
|
30484
31088
|
const reads = keep ? (f) => state.scan.read(abs(p), f) : void 0;
|
|
30485
31089
|
const skippedBefore = state.templateBudget.skipped.titles;
|
|
30486
|
-
title = detach(await resolveTitle(
|
|
31090
|
+
title = detach(await resolveTitle(str7(fm.title) ?? firstH1(await source()) ?? humanize2(slug.split("/").pop() || cfg.name), await source(), p, fm, reads));
|
|
30487
31091
|
description = fm.description != null ? detach(await resolveTitle(String(fm.description), await source(), p, fm, reads)) : void 0;
|
|
30488
31092
|
if (keep && state.templateBudget.skipped.titles === skippedBefore) Object.assign(memo2, { title, description, resolvedWith });
|
|
30489
31093
|
}
|
|
@@ -30730,8 +31334,8 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, reads),
|
|
|
30730
31334
|
const unlisted = applyUnlisted(nav, infos.values());
|
|
30731
31335
|
for (const w of unlisted.warnings) warn("unlisted", w.message);
|
|
30732
31336
|
const isUnlisted = (s) => unlisted.slugs.has(s);
|
|
30733
|
-
const
|
|
30734
|
-
const listedIndex =
|
|
31337
|
+
const drawn2 = unlisted.listed;
|
|
31338
|
+
const listedIndex = drawn2 === nav ? void 0 : indexNav(drawn2, { skipAliases: true });
|
|
30735
31339
|
const listedTrail = listedIndex?.trail ?? trail;
|
|
30736
31340
|
const blogIndex = cfg.blog?.path;
|
|
30737
31341
|
const replaced = blogIndex === "" ? "" : void 0;
|
|
@@ -30757,8 +31361,8 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, reads),
|
|
|
30757
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 }) };
|
|
30758
31362
|
const readingOrder = (listedIndex?.order ?? order2).filter((s) => infos.has(s) && !isUnlisted(s));
|
|
30759
31363
|
const clientNav = cfg.navMode === "client";
|
|
30760
|
-
const fullNav = cfg.navMode === "ssr-full" ? true : cfg.navMode === "client" || cfg.navMode === "hybrid" ? false : navSize(
|
|
30761
|
-
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;
|
|
30762
31366
|
const scopeFull = /* @__PURE__ */ new Map();
|
|
30763
31367
|
const scopeOrder2 = /* @__PURE__ */ new Map();
|
|
30764
31368
|
const fullFor = (s) => {
|
|
@@ -30789,7 +31393,7 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, reads),
|
|
|
30789
31393
|
const chain = hidden ? slug === void 0 ? [] : listedTrail.get(slug) ?? [] : pageChain;
|
|
30790
31394
|
const scope = scoper?.forPage(slug);
|
|
30791
31395
|
const opts = { current: hidden ? "\0" : slug ?? "\0", href: hrefTo, client: clientNav, cache: state.navCache, ...hidden ? { markCurrent: false } : {} };
|
|
30792
|
-
if (!scope) return { nav:
|
|
31396
|
+
if (!scope) return { nav: drawn2, navOptions: { ...opts, trail: new Set(chain), full: fullNav, cacheKey: `${unit.prefix}\0${dirname(from)}` } };
|
|
30793
31397
|
return {
|
|
30794
31398
|
nav: scope.nodes,
|
|
30795
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)}` },
|
|
@@ -30949,6 +31553,7 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, reads),
|
|
|
30949
31553
|
pageLine = (l) => before(examplePageLine(r.expansions, l));
|
|
30950
31554
|
}
|
|
30951
31555
|
then(r.map);
|
|
31556
|
+
if ("variables" in pre && pre.variables) pre.variables = carryVariables(pre.variables, pre.text, r.text, r.map);
|
|
30952
31557
|
pre.text = r.text;
|
|
30953
31558
|
}
|
|
30954
31559
|
dataUnresolved.delete(info.source);
|
|
@@ -30966,6 +31571,7 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, reads),
|
|
|
30966
31571
|
if (mode.diagnostics) (diagnostics ??= []).push({ code: "data", message: detach(shown), ...line ? { line } : {} });
|
|
30967
31572
|
}
|
|
30968
31573
|
then(r.map);
|
|
31574
|
+
if ("variables" in pre && pre.variables) pre.variables = carryVariables(pre.variables, pre.text, r.text, r.map);
|
|
30969
31575
|
pre.text = r.text;
|
|
30970
31576
|
}
|
|
30971
31577
|
if (reads.size) dataReads.set(info.source, reads);
|
|
@@ -30974,13 +31580,14 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, reads),
|
|
|
30974
31580
|
t2 = now();
|
|
30975
31581
|
let tree;
|
|
30976
31582
|
let parsedOk = true;
|
|
31583
|
+
const printed = mode.dataLines && "variables" in pre ? pre.variables : void 0;
|
|
30977
31584
|
try {
|
|
30978
|
-
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);
|
|
30979
31586
|
tree = parsed.tree;
|
|
30980
31587
|
if (mode.dataLines) {
|
|
30981
31588
|
assignBlockIds(tree);
|
|
30982
31589
|
const page = prefix + info.out;
|
|
30983
|
-
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 } : {} }))));
|
|
30984
31591
|
pageLinesOf(tree);
|
|
30985
31592
|
}
|
|
30986
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));
|
|
@@ -31119,7 +31726,7 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, reads),
|
|
|
31119
31726
|
if (hasChildLinks(tree)) {
|
|
31120
31727
|
const own2 = isUnlisted(info.slug);
|
|
31121
31728
|
const dirs = own2 ? childLinkAllDirs ??= directoryChildren([...infos.values()], (slug) => `/${slug}`) : childLinkDirs ??= directoryChildren([...infos.values()].filter((i) => !isUnlisted(i.slug)), (slug) => `/${slug}`);
|
|
31122
|
-
const items3 = own2 ? childLinkAllItems ??= childLinkNav(nav) : childLinkItems ??= childLinkNav(
|
|
31729
|
+
const items3 = own2 ? childLinkAllItems ??= childLinkNav(nav) : childLinkItems ??= childLinkNav(drawn2);
|
|
31123
31730
|
const unitPrefix = unit.prefix ? `${unit.prefix.replace(/^\/+|\/+$/g, "")}/` : "";
|
|
31124
31731
|
const r = realizeChildLinks(tree, {
|
|
31125
31732
|
nav: items3,
|
|
@@ -31180,8 +31787,8 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, reads),
|
|
|
31180
31787
|
let hasH1 = tree[0]?.type === "heading" && Number(tree[0].props?.level) === 1;
|
|
31181
31788
|
const post = postNeighbours.has(info.slug) ? blog.get(info.slug) : void 0;
|
|
31182
31789
|
const h1Text = hasH1 ? inlineText2(tree[0].inline) : void 0;
|
|
31183
|
-
const title = isTemplated(
|
|
31184
|
-
const description = isTemplated(
|
|
31790
|
+
const title = isTemplated(str7(fm.title) ?? "") ? h1Text && !isTemplated(h1Text) ? h1Text : info.title : str7(fm.title) ?? h1Text ?? info.title;
|
|
31791
|
+
const description = isTemplated(str7(fm.description) ?? "") ? info.description : str7(fm.description);
|
|
31185
31792
|
input.onPageBuilt?.({ slug: [unit.prefix, info.slug].filter(Boolean).join("/"), unit: unit.prefix, source: srcOf(info), contentPath: info.source, text: raw, title, frontmatter: fm, tree });
|
|
31186
31793
|
if (isReplaced) return;
|
|
31187
31794
|
if (post && hasH1) {
|
|
@@ -31198,7 +31805,7 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, reads),
|
|
|
31198
31805
|
const pageTrail = hidden ? trail : listedTrail;
|
|
31199
31806
|
const navNode = pageTrail.get(info.slug)?.at(-1);
|
|
31200
31807
|
if (navNode?.children.length && !hasProse(tree)) body += childLinks2(navNode.children, (s) => pageRefs.get(s), info.out, cfg.linkStyle, infos);
|
|
31201
|
-
const layoutName =
|
|
31808
|
+
const layoutName = str7(fm.layout) ?? (post ? "blank" : cfg.layout);
|
|
31202
31809
|
const tocMode = fm.toc === false ? "off" : ["top", "popover", "rail", "off"].includes(fm.toc) ? fm.toc : cfg.toc;
|
|
31203
31810
|
for (const u of ctx.unknown) if (!(DATA_DIRECTIVE_NODES.has(u) && dataUnresolved.has(info.source))) warnPage(info, "unsupported-node", `unsupported node "${u}" rendered as a plain container`);
|
|
31204
31811
|
for (const v of ctx.unknownVariants ?? []) warnPage(info, "button-variant", `button variant "${v}" drawn as the default button`);
|
|
@@ -31289,8 +31896,8 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, reads),
|
|
|
31289
31896
|
const ref = n.slug != null && !n.fragment ? pageRefs.get(n.slug) : void 0;
|
|
31290
31897
|
return { name: n.label, url: ref ? absoluteUrl(cfg, unit.prefix, servedPath(ref.out, cfg.linkStyle)) : void 0 };
|
|
31291
31898
|
}) : void 0,
|
|
31292
|
-
image:
|
|
31293
|
-
pageType:
|
|
31899
|
+
image: str7(fm.ogImage) ?? cfg.ogImage,
|
|
31900
|
+
pageType: str7(fm.type),
|
|
31294
31901
|
noindex: cfg.noindex || fm.noindex === true || fm.draft === true || canon.noindex || hidden,
|
|
31295
31902
|
nofollow: cfg.nofollow || fm.nofollow === true,
|
|
31296
31903
|
twitterHandle: cfg.twitterHandle,
|
|
@@ -31379,7 +31986,7 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, reads),
|
|
|
31379
31986
|
const out = pageRefs.get(slug)?.out ?? staticNav.get(slug);
|
|
31380
31987
|
return out === void 0 ? void 0 : hrefFrom("index.html", out, cfg.linkStyle);
|
|
31381
31988
|
};
|
|
31382
|
-
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, "<\\/")};
|
|
31383
31990
|
`);
|
|
31384
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, "<\\/")};
|
|
31385
31992
|
`);
|
|
@@ -31401,7 +32008,7 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, reads),
|
|
|
31401
32008
|
const llmsNav2 = (
|
|
31402
32009
|
// The order the nav sorts by (navOrder: a number, else none), not the raw keys: `order: "1"` neither
|
|
31403
32010
|
// orders the nav nor stops newest first.
|
|
31404
|
-
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
|
|
31405
32012
|
);
|
|
31406
32013
|
await emit(prefix + "llms.txt", buildLlmsTxt2(cfg.name, cfg.description, llmsNav2, records, { file: "llms.txt", urls, whenToUse: cfg.llmsWhenToUse, aggregates: cfg.aggregates }));
|
|
31407
32014
|
for (const group of llmsNav2) {
|
|
@@ -31781,20 +32388,20 @@ var STATUS_BADGE = {
|
|
|
31781
32388
|
};
|
|
31782
32389
|
var BADGE_LINK = "transition-colors hover:opacity-80";
|
|
31783
32390
|
function fieldBadges(fm, cfg, href) {
|
|
31784
|
-
const
|
|
32391
|
+
const meta2 = parseMeta(fm);
|
|
31785
32392
|
const link2 = (field, value) => {
|
|
31786
32393
|
const def = cfg.taxonomies.find((x) => x.name === field);
|
|
31787
32394
|
return def && value.split("/").filter(Boolean).every(safeSegment) ? href(generatedOut(`${def.path}/${value.split("/").filter(Boolean).join("/")}`, cfg)) : void 0;
|
|
31788
32395
|
};
|
|
31789
32396
|
const out = [];
|
|
31790
|
-
if (
|
|
31791
|
-
const h = link2("type",
|
|
31792
|
-
out.push({ label:
|
|
32397
|
+
if (meta2.type) {
|
|
32398
|
+
const h = link2("type", meta2.type);
|
|
32399
|
+
out.push({ label: meta2.type.replace(/[-_]/g, " "), cls: [TYPE_BADGE_BASE, h ? BADGE_LINK : "", TYPE_BADGE_STYLE[meta2.type] ?? "border-border bg-muted text-muted-foreground"].filter(Boolean).join(" "), href: h, attr: "data-page-type", value: meta2.type });
|
|
31793
32400
|
}
|
|
31794
|
-
const s =
|
|
32401
|
+
const s = meta2.status && STATUS_BADGE[meta2.status];
|
|
31795
32402
|
if (s) {
|
|
31796
|
-
const h = link2("status",
|
|
31797
|
-
out.push({ label: s[0], cls: [STATUS_BADGE_BASE, h ? BADGE_LINK : "", s[1]].filter(Boolean).join(" "), href: h, attr: "data-status", value:
|
|
32403
|
+
const h = link2("status", meta2.status);
|
|
32404
|
+
out.push({ label: s[0], cls: [STATUS_BADGE_BASE, h ? BADGE_LINK : "", s[1]].filter(Boolean).join(" "), href: h, attr: "data-status", value: meta2.status });
|
|
31798
32405
|
}
|
|
31799
32406
|
return out;
|
|
31800
32407
|
}
|
|
@@ -32060,7 +32667,6 @@ function relativeHome(from, to) {
|
|
|
32060
32667
|
if (to.startsWith(from)) return to.slice(from.length);
|
|
32061
32668
|
return "../".repeat(from.split("/").filter(Boolean).length) + to.slice(1);
|
|
32062
32669
|
}
|
|
32063
|
-
var FORWARD_SCRIPT = "location.replace(document.documentElement.dataset.to+location.search+location.hash)";
|
|
32064
32670
|
function forwardKeepingQuery(target, name) {
|
|
32065
32671
|
const u = esc(target);
|
|
32066
32672
|
return `<!doctype html><html data-to="${u}"><head><meta charset="utf-8"><title>${esc(name)}</title><meta name="robots" content="noindex"><script>${FORWARD_SCRIPT}</script><meta http-equiv="refresh" content="0; url=${u}"><link rel="icon" href="data:,"></head><body><p><a href="${u}">${esc(name)}</a></p></body></html>
|
|
@@ -32081,7 +32687,7 @@ async function optionalText(files, p) {
|
|
|
32081
32687
|
const c = files.get(p);
|
|
32082
32688
|
return c == null ? void 0 : readText(c);
|
|
32083
32689
|
}
|
|
32084
|
-
function
|
|
32690
|
+
function str7(v) {
|
|
32085
32691
|
return v == null || v === "" ? void 0 : String(v);
|
|
32086
32692
|
}
|
|
32087
32693
|
function firstH1(src) {
|
|
@@ -32210,7 +32816,7 @@ async function readTopicMaps(root, cfg, files, exclude = []) {
|
|
|
32210
32816
|
const skip = exclude.map((p) => resolve(p));
|
|
32211
32817
|
for (const s of cfg.sources) {
|
|
32212
32818
|
if (!s.nav || !TOPIC_MAP.test(s.nav)) continue;
|
|
32213
|
-
const { topicMapNav } = await import("./topicmap-
|
|
32819
|
+
const { topicMapNav } = await import("./topicmap-IGUURUBF.mjs");
|
|
32214
32820
|
const read = async (p) => {
|
|
32215
32821
|
let c = files.get(p);
|
|
32216
32822
|
if (c === void 0) {
|