@dogsbay/ssg 0.2.0-beta.146 → 0.2.0-beta.149
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/package/THIRD-PARTY-NOTICES.txt +5 -5
- package/dist/package/browser.mjs +289 -52
- package/dist/package/chunks/{prebuilt-css-default-GJIN3VOR.mjs → prebuilt-css-default-XHQGPWFR.mjs} +8 -1
- package/dist/package/chunks/{prebuilt-css-mintlify-SKWKD2KB.mjs → prebuilt-css-mintlify-ZOM7VGVT.mjs} +8 -1
- package/dist/package/client.mjs +10 -1
- package/dist/package/css.mjs +1 -0
- package/dist/package/types/core/build.d.ts +23 -6
- package/dist/package/types/core/config.d.ts +35 -1
- package/dist/package/types/core/links.d.ts +7 -0
- package/dist/package/types/theme/compose.d.ts +4 -0
- package/dist/package/types/theme/regions.d.ts +4 -0
- package/package.json +29 -29
package/dist/package/browser.mjs
CHANGED
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
|
|
19
19
|
// src/core/build.ts
|
|
20
20
|
import { dogsbayMdToTree, splitFrontmatter as splitFrontmatter2, treeToDogsbayMd } from "@dogsbay/format-dogsbay-md/browser";
|
|
21
|
-
import { mergeHeaders, mergeRedirects, productRootRedirects, siteFiles, siteRootTarget, toScript, unitOf } from "@dogsbay/site-files";
|
|
21
|
+
import { isPassiveStaticFile, limitVersionRows, mergeHeaders, staticFolderPlan, staticRobotsWarnings, mergeRedirects, PASSIVE_SVG_MAX_BYTES, passiveSvgBytes, productRootRedirects, productSwitcher, siteFiles, siteRootTarget, toScript, unitOf } from "@dogsbay/site-files";
|
|
22
22
|
import { buildHreflangLinks, isMountRoot, missingTranslations, mountRefs, mountRootNote, namespaceNavGroup, namespacePrefixes, placeMountedNav, prefixSlug as prefixSlug2, rewriteContentRefs } from "@dogsbay/site-files";
|
|
23
23
|
|
|
24
24
|
// src/core/canonical.ts
|
|
@@ -27,7 +27,7 @@ import { declaresParams, splitFrontmatter } from "@dogsbay/format-dogsbay-md/bro
|
|
|
27
27
|
|
|
28
28
|
// src/core/config.ts
|
|
29
29
|
import { scriptUrl } from "@dogsbay/render-html";
|
|
30
|
-
import { assertLeafSitemap, checkVersionSeo, isNamespaceAxisActive, namespaceSegments, parseMount, ProductConfigError, productModel, productOf, sourceNamespace, sourceUnit, unitSegments } from "@dogsbay/site-files";
|
|
30
|
+
import { readVersionBadge, readVersionMenu, assertLeafSitemap, checkVersionSeo, isNamespaceAxisActive, namespaceSegments, parseMount, ProductConfigError, productModel, productOf, sourceNamespace, sourceUnit, unitSegments } from "@dogsbay/site-files";
|
|
31
31
|
|
|
32
32
|
// src/core/yaml.ts
|
|
33
33
|
import { load } from "js-yaml";
|
|
@@ -46,7 +46,7 @@ function shared(f) {
|
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
function versionsOf(cfg, product) {
|
|
49
|
-
return cfg.productVersions?.get(product ?? "") ?? { versions: cfg.versions, defaultVersion: cfg.defaultVersion };
|
|
49
|
+
return cfg.productVersions?.get(product ?? "") ?? { versions: cfg.versions, defaultVersion: cfg.defaultVersion, ...cfg.versionMenu ? { menu: cfg.versionMenu } : {} };
|
|
50
50
|
}
|
|
51
51
|
var ConfigError = class extends Error {
|
|
52
52
|
};
|
|
@@ -92,7 +92,27 @@ function sourceFrom(v, path) {
|
|
|
92
92
|
throw new ConfigError(`content.sources[${path}].from must be "dogsbay-md" or "openapi"; got ${JSON.stringify(v)}`);
|
|
93
93
|
}
|
|
94
94
|
var strOrUndef = (v) => v == null ? void 0 : String(v);
|
|
95
|
-
|
|
95
|
+
function versionMenuOf(raw, where) {
|
|
96
|
+
return raw == null ? void 0 : shared(() => readVersionMenu(raw, where));
|
|
97
|
+
}
|
|
98
|
+
function stringsOf(raw) {
|
|
99
|
+
const out = { all: {}, byLocale: {} };
|
|
100
|
+
if (raw == null) return out;
|
|
101
|
+
if (typeof raw !== "object" || Array.isArray(raw)) throw new ConfigError("ssg.strings: expected a mapping of string keys to text");
|
|
102
|
+
for (const [k, v] of Object.entries(raw)) {
|
|
103
|
+
if (typeof v === "string") out.all[k] = v;
|
|
104
|
+
else if (v && typeof v === "object" && !Array.isArray(v)) {
|
|
105
|
+
out.byLocale[k.toLowerCase()] = Object.fromEntries(
|
|
106
|
+
Object.entries(v).map(([key, text]) => {
|
|
107
|
+
if (typeof text !== "string") throw new ConfigError(`ssg.strings.${k}.${key}: expected text`);
|
|
108
|
+
return [key, text];
|
|
109
|
+
})
|
|
110
|
+
);
|
|
111
|
+
} else throw new ConfigError(`ssg.strings.${k}: expected text, or a mapping of keys to text for that language`);
|
|
112
|
+
}
|
|
113
|
+
return out;
|
|
114
|
+
}
|
|
115
|
+
var VERSION_FLAGS = ["eol", "prerelease", "hidden", "noindex", "sitemap", "badge"];
|
|
96
116
|
var FLAG_PATHS = [
|
|
97
117
|
"poweredBy",
|
|
98
118
|
"ssg.breadcrumbs",
|
|
@@ -110,6 +130,8 @@ var FLAG_PATHS = [
|
|
|
110
130
|
"content.codeBlockTitle",
|
|
111
131
|
"content.linkIcons",
|
|
112
132
|
...VERSION_FLAGS.flatMap((k) => [`versions.*.${k}`, `content.versions.*.${k}`]),
|
|
133
|
+
// Checked again by site-files' model; here first, for the YAML 1.2 hint (`badge: yes`).
|
|
134
|
+
"content.products.*.versions.*.badge",
|
|
113
135
|
"taxonomies.*.hierarchical",
|
|
114
136
|
"taxonomies.*.autoColor",
|
|
115
137
|
"blog",
|
|
@@ -176,6 +198,7 @@ function parseConfig(text, overrides = {}) {
|
|
|
176
198
|
prerelease: v.prerelease || void 0,
|
|
177
199
|
hidden: v.hidden || void 0,
|
|
178
200
|
removed: removedOf(v.removed, String(v.id)),
|
|
201
|
+
...shared(() => readVersionBadge(v.badge, `versions: "${String(v.id)}"`)) ? { badge: true } : {},
|
|
179
202
|
...versionSeoOf(v, String(v.id)),
|
|
180
203
|
...versionPathOf(v, String(v.id), productsBlock)
|
|
181
204
|
}));
|
|
@@ -215,6 +238,8 @@ function parseConfig(text, overrides = {}) {
|
|
|
215
238
|
themeDir: checked("ssg.themeDir", String(ssg.themeDir ?? "theme")).replace(/^\.\/|\/+$/g, ""),
|
|
216
239
|
css: Array.isArray(ssg.css) ? ssg.css.map((c) => checked("ssg.css", String(c))) : [],
|
|
217
240
|
breadcrumbs: ssg.breadcrumbs === true,
|
|
241
|
+
strings: stringsOf(ssg.strings),
|
|
242
|
+
versionMenu: versionMenuOf(content.versionMenu, "content.versionMenu"),
|
|
218
243
|
strictTemplates: ssg.strictTemplates === true,
|
|
219
244
|
// An empty tagline falls back too, as DocsLayout's `siteTagline || "Documentation"`.
|
|
220
245
|
tagline: String(site.tagline || "Documentation"),
|
|
@@ -268,6 +293,7 @@ function parseConfig(text, overrides = {}) {
|
|
|
268
293
|
html: htmlOf(content.html),
|
|
269
294
|
dataDir: content.data != null ? dataFolder("content.data", content.data) : "data",
|
|
270
295
|
dataDirSet: content.data != null,
|
|
296
|
+
...content.static != null ? { staticDir: staticFolder(content.static) } : {},
|
|
271
297
|
plausible: typeof raw.analytics?.plausible?.domain === "string" ? { domain: raw.analytics.plausible.domain, scriptUrl: strOrUndef(raw.analytics.plausible.scriptUrl) } : void 0,
|
|
272
298
|
...overrides
|
|
273
299
|
};
|
|
@@ -281,6 +307,20 @@ function parseConfig(text, overrides = {}) {
|
|
|
281
307
|
if (dv.noindex) throw new ConfigError(`versions: "${dv.id}" is the defaultVersion and has noindex: true; older versions' pages name it as their canonical`);
|
|
282
308
|
}
|
|
283
309
|
if (productsBlock) Object.assign(cfg, productsOf(content, raw, cfg));
|
|
310
|
+
if (cfg.staticDir) {
|
|
311
|
+
const st = cfg.staticDir;
|
|
312
|
+
const clash = cfg.sources.find((x) => {
|
|
313
|
+
const xp = x.path.replace(/^(\.\/)+/, "").replace(/\/+$/, "");
|
|
314
|
+
return x.from !== "openapi" && (xp === "." || xp === "" || xp === st || xp.startsWith(st + "/") || st.startsWith(xp + "/"));
|
|
315
|
+
});
|
|
316
|
+
if (clash) throw new ConfigError(`content.static (${st}) and the source "${clash.path}" overlap: the static folder is served as it is, so it must be a folder of its own, beside the sources`);
|
|
317
|
+
const input = [["content.data", cfg.dataDir], ...cfg.sources.flatMap((x) => x.data ? [[`content.sources (${x.path}) data`, x.data]] : []), ["ssg.themeDir", cfg.themeDir], ...cfg.css.map((f) => ["ssg.css", f])];
|
|
318
|
+
const inside = input.find(([, p]) => {
|
|
319
|
+
const q = p.replace(/^(\.\/)+/, "").replace(/\/+$/, "");
|
|
320
|
+
return q === st || q.startsWith(st + "/");
|
|
321
|
+
});
|
|
322
|
+
if (inside) throw new ConfigError(`${inside[0]} (${inside[1]}) is inside content.static (${st}), whose files are served as they are: move it out of the folder`);
|
|
323
|
+
}
|
|
284
324
|
return cfg;
|
|
285
325
|
}
|
|
286
326
|
var TAG_COLORS = /* @__PURE__ */ new Set(["blue", "amber", "emerald", "violet", "rose", "slate"]);
|
|
@@ -416,7 +456,8 @@ function productsOf(content, raw, cfg) {
|
|
|
416
456
|
const siteVersions = content.versions ?? raw.versions;
|
|
417
457
|
const written = (Array.isArray(content.sources) ? content.sources : []).filter((s) => typeof s?.path === "string");
|
|
418
458
|
const sources = written.length ? written : [{ path: "content" }];
|
|
419
|
-
const
|
|
459
|
+
const products = content.products && typeof content.products === "object" && !Array.isArray(content.products) ? Object.fromEntries(Object.entries(content.products).map(([k, p]) => [k, p && typeof p === "object" && p.versionMenu === null ? (({ versionMenu: _, ...rest }) => rest)(p) : p])) : content.products;
|
|
460
|
+
const model = shared(() => productModel({ products, sources, versions: siteVersions, defaultVersion: content.defaultVersion ?? raw.defaultVersion, versionMenu: content.versionMenu ?? void 0, locales: cfg.locales, defaultLocale: cfg.defaultLocale }));
|
|
420
461
|
if (!model) return {};
|
|
421
462
|
const productVersions = /* @__PURE__ */ new Map();
|
|
422
463
|
for (const p of model.products) {
|
|
@@ -434,10 +475,11 @@ function productsOf(content, raw, cfg) {
|
|
|
434
475
|
...v.noindex !== void 0 ? { noindex: v.noindex } : {},
|
|
435
476
|
...v.sitemap !== void 0 ? { sitemap: v.sitemap } : {},
|
|
436
477
|
...v.path !== v.id ? { path: v.path } : {},
|
|
437
|
-
...v.banner ? { banner: v.banner } : {}
|
|
478
|
+
...v.banner ? { banner: v.banner } : {},
|
|
479
|
+
...v.badge ? { badge: true } : {}
|
|
438
480
|
};
|
|
439
481
|
});
|
|
440
|
-
productVersions.set(p.name ?? "", { versions, ...p.defaultVersion ? { defaultVersion: p.defaultVersion } : {} });
|
|
482
|
+
productVersions.set(p.name ?? "", { versions, ...p.defaultVersion ? { defaultVersion: p.defaultVersion } : {}, ...p.versionMenu ? { menu: p.versionMenu } : {} });
|
|
441
483
|
}
|
|
442
484
|
return { products: model, productVersions };
|
|
443
485
|
}
|
|
@@ -586,7 +628,7 @@ function projectRoots(cfg) {
|
|
|
586
628
|
if (roots.includes("")) return [""];
|
|
587
629
|
const navDirs = cfg.sources.flatMap((s) => s.nav ? [s.nav.includes("/") ? s.nav.slice(0, s.nav.lastIndexOf("/")) : s.nav] : []);
|
|
588
630
|
const dataDirs = [cfg.dataDir, ...cfg.sources.flatMap((s) => s.data ? [s.data] : [])];
|
|
589
|
-
return [.../* @__PURE__ */ new Set([...roots, cfg.themeDir, ...cfg.css, ...navDirs, ...dataDirs])].filter(Boolean);
|
|
631
|
+
return [.../* @__PURE__ */ new Set([...roots, cfg.themeDir, ...cfg.css, ...navDirs, ...dataDirs, ...cfg.staticDir ? [cfg.staticDir] : []])].filter(Boolean);
|
|
590
632
|
}
|
|
591
633
|
function dataFolder(what, v) {
|
|
592
634
|
if (typeof v !== "string" || !v.trim()) throw new ConfigError(`${what} must be a folder inside the project, such as ./data; got ${JSON.stringify(v)}`);
|
|
@@ -594,6 +636,12 @@ function dataFolder(what, v) {
|
|
|
594
636
|
if (!p || p === ".") throw new ConfigError(`${what} must be a folder inside the project, not the project itself (every file would be a data file)`);
|
|
595
637
|
return p;
|
|
596
638
|
}
|
|
639
|
+
function staticFolder(v) {
|
|
640
|
+
if (typeof v !== "string" || !v.trim()) throw new ConfigError(`content.static must be a folder inside the project, such as ./static; got ${JSON.stringify(v)}`);
|
|
641
|
+
const p = insideProject("content.static", v.trim()).replace(/^(\.\/)+/, "").replace(/\/+$/, "");
|
|
642
|
+
if (!p || p === ".") throw new ConfigError("content.static must be a folder inside the project, not the project itself (every file would be served as it is)");
|
|
643
|
+
return p;
|
|
644
|
+
}
|
|
597
645
|
function dataDirOf(cfg, s) {
|
|
598
646
|
return s.data ?? cfg.dataDir;
|
|
599
647
|
}
|
|
@@ -639,6 +687,12 @@ function createResolver(table, page) {
|
|
|
639
687
|
const broken = [];
|
|
640
688
|
const srcDir = dirname(page.source);
|
|
641
689
|
const target = (path) => resolveLinkPath(path, srcDir, table.basePath);
|
|
690
|
+
const staticHref = (path, t) => {
|
|
691
|
+
if (!path.startsWith("/") || !table.staticFile) return void 0;
|
|
692
|
+
const f = table.staticFile(t);
|
|
693
|
+
if (f === void 0) return void 0;
|
|
694
|
+
return encodePath(relative(dirname([table.unitPrefix, page.out].filter(Boolean).join("/")), f));
|
|
695
|
+
};
|
|
642
696
|
const findPage = (t) => {
|
|
643
697
|
for (const c of pageKeyCandidates(t)) {
|
|
644
698
|
const hit = table.pages.get(c);
|
|
@@ -661,6 +715,8 @@ function createResolver(table, page) {
|
|
|
661
715
|
return url + suffix;
|
|
662
716
|
}
|
|
663
717
|
if (table.assets.has(t)) return encodePath(relative(dirname(page.out), t)) + suffix;
|
|
718
|
+
const st = staticHref(path, t);
|
|
719
|
+
if (st !== void 0) return st + suffix;
|
|
664
720
|
broken.push(href);
|
|
665
721
|
return href;
|
|
666
722
|
},
|
|
@@ -669,6 +725,8 @@ function createResolver(table, page) {
|
|
|
669
725
|
const { path, suffix } = splitHref(src);
|
|
670
726
|
const t = target(path);
|
|
671
727
|
if (table.assets.has(t)) return encodePath(relative(dirname(page.out), t)) + suffix;
|
|
728
|
+
const st = staticHref(path, t);
|
|
729
|
+
if (st !== void 0) return st + suffix;
|
|
672
730
|
broken.push(src);
|
|
673
731
|
return src;
|
|
674
732
|
}
|
|
@@ -1285,8 +1343,8 @@ import { parseMeta as parseMeta3 } from "@dogsbay/types";
|
|
|
1285
1343
|
import { directoryChildren, hasChildLinks, navKey, realizeChildLinks } from "@dogsbay/serialize-core";
|
|
1286
1344
|
|
|
1287
1345
|
// src/generated/assets.ts
|
|
1288
|
-
var CLIENT_JS = '/*! dogsbay-ssg site client (Apache-2.0). Third-party notices: THIRD-PARTY-NOTICES.txt */\n"use strict";(()=>{var vn=Object.defineProperty;var yn=(i,t,e)=>t in i?vn(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e;var h=(i,t,e)=>yn(i,typeof t!="symbol"?t+"":t,e);var z=class extends HTMLElement{constructor(){super(...arguments);h(this,"_initialized",!1);h(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(){}},wn={"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"},Ie="dogsbay-elements-display";function N(){if(typeof document>"u"||document.getElementById(Ie))return;let i=Object.entries(wn).map(([e,n])=>`:where(${e}){display:${n}}`).join(""),t=document.createElement("style");t.id=Ie,t.textContent=i,document.head.prepend(t)}function En(i){return i.hasAttribute("disabled")||i.getAttribute("aria-disabled")==="true"}function gt(i,t,e){let n=t;do n+=e?-1:1;while(n>=0&&n<i.length&&En(i[n]));return n}var Dt=class{constructor(i,t,e={}){h(this,"container");h(this,"itemSelector");h(this,"opts");h(this,"keydownHandler",null);h(this,"active",!1);this.container=i,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(i,t){let{orientation:e}=this.opts;return(e==="horizontal"||e==="both")&&i===(t?"ArrowLeft":"ArrowRight")||(e==="vertical"||e==="both")&&i==="ArrowDown"}isBackwardKey(i,t){let{orientation:e}=this.opts;return(e==="horizontal"||e==="both")&&i===(t?"ArrowRight":"ArrowLeft")||(e==="vertical"||e==="both")&&i==="ArrowUp"}activate(){this.active||(this.active=!0,this.keydownHandler=i=>{let t=this.getItems();if(t.length===0||i.ctrlKey||i.altKey||i.metaKey)return;let e=getComputedStyle(this.container).direction==="rtl",n=t.indexOf(document.activeElement);if(n===-1)return;let s=null;this.isForwardKey(i.key,e)?(s=gt(t,n,!1),s>=t.length&&(s=this.opts.loop?gt(t,-1,!1):n)):this.isBackwardKey(i.key,e)?(s=gt(t,n,!0),s<0&&(s=this.opts.loop?gt(t,t.length,!0):n)):this.opts.homeEnd&&i.key==="Home"?s=gt(t,-1,!1):this.opts.homeEnd&&i.key==="End"&&(s=gt(t,t.length,!0)),s!==null&&(s<0||s>=t.length||s!==n&&(i.preventDefault(),t[n].setAttribute("tabindex","-1"),t[s].setAttribute("tabindex","0"),t[s].focus(),this.opts.onHighlightedIndexChange(s)))},this.container.addEventListener("keydown",this.keydownHandler))}deactivate(){this.active&&(this.active=!1,this.keydownHandler&&(this.container.removeEventListener("keydown",this.keydownHandler),this.keydownHandler=null))}setActiveIndex(i,t){i.forEach((e,n)=>{e.setAttribute("tabindex",n===t?"0":"-1")})}isActive(){return this.active}};var xn=0;function Me(i){return`${i}-${++xn}`}var He=class extends z{constructor(){super(...arguments);h(this,"list");h(this,"triggers",[]);h(this,"panels",[]);h(this,"nav",null);h(this,"value","");h(this,"syncKey",null);h(this,"orientation","horizontal");h(this,"handleClick",t=>{let e=t.target.closest("[data-part=\'trigger\']");if(!e||e.hasAttribute("disabled"))return;let n=e.dataset.value;n&&this.select(n)});h(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)});h(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 o;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||Me("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||Me("db-tabpanel");c.id=d,r.setAttribute("aria-controls",d),c.setAttribute("aria-labelledby",l)}}),this.nav=new Dt(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 n=this.getAttribute("default-value")||((o=this.triggers[0])==null?void 0:o.dataset.value)||"";if(this.syncKey){let r=localStorage.getItem(`db-tabs-sync:${this.syncKey}`);r&&this.triggers.some(a=>a.dataset.value===r)&&(n=r)}let s=window.location.hash.slice(1);s&&this.triggers.some(r=>r.dataset.value===s)&&(n=s),this.select(n)}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 n=e.dataset.value===t;e.setAttribute("aria-selected",String(n)),e.setAttribute("tabindex",n?"0":"-1"),n?e.setAttribute("data-state","active"):e.removeAttribute("data-state")}),this.panels.forEach(e=>{let n=e.dataset.value===t;e.hidden=!n,n?(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})))}};N();customElements.get("db-tabs")||customElements.define("db-tabs",He);var An=0;function Sn(i){return`${i}-${++An}`}var ze=class{constructor(i,t,e={}){h(this,"trigger");h(this,"content");h(this,"_open",!1);h(this,"opts");this.trigger=i,this.content=t,this.opts=e;let n=Sn("base-collapsible");i.id||(i.id=`${n}-trigger`),t.id||(t.id=`${n}-content`),i.setAttribute("aria-controls",t.id),t.setAttribute("aria-labelledby",i.id),t.setAttribute("role","region"),i.setAttribute("aria-expanded","false"),i.addEventListener("click",()=>{i.hasAttribute("disabled")||i.getAttribute("aria-disabled")==="true"||this.toggle()})}get isOpen(){return this._open}toggle(){this._open?this.collapse():this.expand()}expand(){var i,t;this._open||(this._open=!0,this.trigger.setAttribute("aria-expanded","true"),this.content.hidden=!1,this.content.setAttribute("data-state","open"),(t=(i=this.opts).onToggle)==null||t.call(i,!0))}collapse(){var i,t;this._open&&(this._open=!1,this.trigger.setAttribute("aria-expanded","false"),this.content.hidden=!0,this.content.removeAttribute("data-state"),(t=(i=this.opts).onToggle)==null||t.call(i,!1))}};var Ne=class extends z{constructor(){super(...arguments);h(this,"items",[]);h(this,"nav",null);h(this,"openValues",new Set);h(this,"type","single")}setup(){this.type=this.getAttribute("type")||"single";let t=this.getAttribute("default-value")||"",e=t?t.split(","):[],n=Array.from(this.querySelectorAll("[data-part=\'item\']"));this.items=n.map(s=>{let o=s.querySelector("[data-part=\'trigger\']"),r=s.querySelector("[data-part=\'content\']");if(!o||!r)return null;let a=s.dataset.value||"",l=s.hasAttribute("data-disabled");l&&(o.setAttribute("disabled",""),o.setAttribute("aria-disabled","true"));let c=new ze(o,r,{onToggle:d=>{d?this.onItemExpanded(a):this.onItemCollapsed(a)}});return{el:s,value:a,collapsible:c,disabled:l}}).filter(Boolean),this.nav=new Dt(this,"[data-part=\'trigger\']",{orientation:"vertical",loop:!0,homeEnd:!0}),this.nav.activate(),this.items.forEach((s,o)=>{s.collapsible.trigger.setAttribute("tabindex",o===0?"0":"-1")}),e.forEach(s=>{let o=this.items.find(r=>r.value===s&&!r.disabled);o&&o.collapsible.expand()})}onItemExpanded(t){if(this.type==="single"){for(let n of this.openValues)if(n!==t){let s=this.items.find(o=>o.value===n);s&&s.collapsible.collapse()}}this.openValues.add(t);let e=this.items.find(n=>n.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(n=>n.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}))}};N();customElements.get("db-accordion")||customElements.define("db-accordion",Ne);var Cn=0;function F(i){return`${i}-${++Cn}`}function et(i,t){let e=i.localName;return Array.from(i.querySelectorAll(t)).filter(n=>n.closest(e)===i)}function $(i,t){return et(i,t)[0]??null}function bt(i){if(!i||!i.hasAttribute("data-as-child"))return i;let t=i.firstElementChild;if(!t)return i;let e=i.getAttribute("data-part");return e&&t.setAttribute("data-part",e),t}function W(i){return i.hasAttribute("disabled")||i.getAttribute("aria-disabled")==="true"||i.getAttribute("data-disabled")==="true"}function _e(){return typeof HTMLElement<"u"&&typeof HTMLElement.prototype.showPopover=="function"}function vt(i){if(i.hidden=!1,!_e())return"inline";i.hasAttribute("popover")||i.setAttribute("popover","manual"),i.style.inset="auto",i.style.margin="0";try{i.matches(":popover-open")||i.showPopover()}catch{return"inline"}return"top-layer"}function yt(i){if(_e())try{i.matches(":popover-open")&&i.hidePopover()}catch{}i.hidden=!0}var Ln=\'a[href], button:not([disabled]), input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"]), [contenteditable="true"]\';function Pe(i){return Array.from(i.querySelectorAll(Ln)).filter(t=>!t.closest("[hidden]")&&!W(t))}function Fe(i,t){let e=typeof i.getAnimations=="function"?i.getAnimations():[];if(!e.length)return t();Promise.all(e.map(n=>n.finished)).then(t,t)}function wt(i){try{return decodeURIComponent(i)}catch{return i}}var Be=class extends z{constructor(){super(...arguments);h(this,"details",null);h(this,"summary",null);h(this,"dialog",null);h(this,"body",null);h(this,"source",null);h(this,"moved",[]);h(this,"handledHash",null);h(this,"onSummaryClick",t=>{var n,s;let e=t.target;e&&e!==this.summary&&((s=(n=e.closest)==null?void 0:n.call(e,"a[href], button, input, select, textarea, label"))==null?void 0:s.closest("summary"))===this.summary||(t.preventDefault(),this.show())});h(this,"onDialogClick",t=>{let e=this.dialog;if(!e||t.target!==e)return;let n=e.getBoundingClientRect();!(t.clientX>=n.left&&t.clientX<=n.right&&t.clientY>=n.top&&t.clientY<=n.bottom)&&(t.clientX!==0||t.clientY!==0)&&e.close()});h(this,"onDialogClose",()=>this.restore());h(this,"onDocClick",t=>{var o,r;if(t.defaultPrevented||t.button!==0||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey)return;let e=(r=(o=t.target)==null?void 0:o.closest)==null?void 0:r.call(o,"a[href]");if(!e||!this.details||this.open||e.hasAttribute("download")||e.target&&e.target!=="_self")return;let n=new URL(e.href,location.href);if(!n.hash||n.hash!==location.hash||n.pathname!==location.pathname||n.search!==location.search)return;let s=document.getElementById(wt(n.hash.slice(1)));if(!(!s||!this.details.contains(s))){for(let a of this.details.querySelectorAll("db-details-sheet"))a.handledHash=null;this.show(s)}});h(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,n=typeof HTMLDialogElement<"u"&&typeof HTMLDialogElement.prototype.showModal=="function";if(!t||!e||!n)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,kn();let s=(((d=e.querySelector("[data-part=\'title\']"))==null?void 0:d.textContent)??e.textContent??"").trim(),o=document.createElement("dialog");o.className="db-sheet",o.id=F("db-sheet");let r=document.createElement("h2");r.className="db-sheet-title",r.id=F("db-sheet-title"),r.textContent=s,o.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",()=>o.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",o.append(l,c),this.append(o),this.dialog=o,this.body=c,e.setAttribute("aria-haspopup","dialog"),e.setAttribute("aria-controls",o.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:n,body:s}=this;if(!e||!n||!s||e.open)return;let o=Array.from(n.childNodes).filter(c=>c!==this.summary),r=o.filter(c=>c.nodeType===Node.ELEMENT_NODE),a=r.length===1&&o.every(c=>{var d;return c===r[0]||!((d=c.textContent)!=null&&d.trim())})?r[0]:null;this.source=a??n,this.moved=a?Array.from(a.childNodes):o,s.append(...this.moved),e.showModal(),this.summary.setAttribute("aria-expanded","true"),this.setAttribute("data-state","open"),t&&t!==n&&((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,n;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&&((n=(e=this.summary).checkVisibility)==null?void 0:n.call(e))!==!1&&this.summary.focus(),this.dispatchEvent(new CustomEvent("db-details-sheet:close",{bubbles:!0})))}openForHash(){let t=wt(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)}},$e="dogsbay-details-sheet";function kn(){if(document.getElementById($e))return;let i=document.createElement("style");i.id=$e,i.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(i)}N();customElements.get("db-details-sheet")||customElements.define("db-details-sheet",Be);var qe=class extends z{constructor(){super(...arguments);h(this,"copyBtn",null);h(this,"copyIcon",null);h(this,"checkIcon",null);h(this,"liveRegion",null);h(this,"resetTimeout",null);h(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 n=this.querySelector("[data-part=\'code\']");return(n==null?void 0:n.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)}};N();customElements.get("db-code-block")||customElements.define("db-code-block",qe);var Ke=class extends z{constructor(){super(...arguments);h(this,"navData",null);h(this,"onClick",t=>{let e=t.target.closest("[data-part=\'toggle\']");if(!e||e.closest("db-nav-tree")!==this)return;let n=e.closest("[data-part=\'item\']");n&&this.toggle(n)});h(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 n=this.visibleRows(),s=e.closest("[data-part=\'row\']"),o=s?n.indexOf(s):-1;if(o<0)return;let r=s.closest("[data-part=\'item\']"),a=!!this.groupOf(r),l=u=>{var f;u&&(t.preventDefault(),(f=this.primary(u))==null||f.focus())};switch(t.key){case"ArrowDown":return l(n[o+1]);case"ArrowUp":return l(n[o-1]);case"Home":return l(n[0]);case"End":return l(n[n.length-1]);case"ArrowRight":if(!a)return;t.preventDefault(),this.isOpen(r)?l(this.visibleRows()[o+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 f=u.querySelector(":scope > [data-part=\'row\']");f&&((d=this.primary(f))==null||d.focus())}return}}})}setup(){for(let t of et(this,"[data-part=\'item\']"))this.prepareItem(t)}connect(){this.addEventListener("click",this.onClick),this.addEventListener("keydown",this.onKey);for(let t of et(this,"[data-part=\'group\'][data-lazy]")){let e=t.closest("[data-part=\'item\']");e&&this.isOpen(e)&&this.fill(t)}this.hasAttribute("scroll-current")&&requestAnimationFrame(()=>this.revealCurrent())}disconnect(){this.removeEventListener("click",this.onClick),this.removeEventListener("keydown",this.onKey)}prepareItem(t){let e=this.groupOf(t),n=t.querySelector(":scope > [data-part=\'row\'] > [data-part=\'toggle\']");if(!e||!n)return;e.id||(e.id=F("db-nav-group")),n.setAttribute("aria-controls",e.id),n instanceof HTMLButtonElement&&!n.hasAttribute("type")&&(n.type="button");let s=n.getAttribute("aria-expanded")==="true"||t.getAttribute("data-state")==="open";this.apply(t,s)}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 et(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 n=this.groupOf(t);!n||this.isOpen(t)===e||(e&&n.hasAttribute("data-lazy")&&this.fill(n),this.apply(t,e),this.dispatchEvent(new CustomEvent("db-nav-tree:toggle",{detail:{item:t,open:e},bubbles:!0})))}apply(t,e){let n=this.groupOf(t),s=this.toggleOf(t);n&&(n.hidden=!e),s==null||s.setAttribute("aria-expanded",String(e)),t.setAttribute("data-state",e?"open":"closed")}revealCurrent(){var o;let t=this.querySelector("[aria-current=\'page\']");if(!t)return;for(let r=t.closest("[data-part=\'item\']");r&&this.contains(r);r=((o=r.parentElement)==null?void 0:o.closest("[data-part=\'item\']"))??null)this.groupOf(r)&&!this.groupOf(r).contains(t)||this.groupOf(r)&&this.setOpen(r,!0);let e=On(this);if(!e)return;let n=t.getBoundingClientRect(),s=e.getBoundingClientRect();(n.top<s.top||n.bottom>s.bottom)&&(e.scrollTop+=n.top-s.top-s.height/2+n.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(),n=t.dataset.path;if(!e||n==null)return;let s=e,o;for(let r of n.split(".").map(Number))o=s==null?void 0:s[r],s=o==null?void 0:o[2];o!=null&&o[2]&&(t.replaceChildren(...this.build(o[2],n)),t.removeAttribute("data-lazy"))}build(t,e){let n=this.getAttribute("base")??"",s=this.getAttribute("toggle-label")??"Toggle {label}",o=location.href.split("#")[0];return t.map(([r,a,l,c],d)=>{let u=`${e}.${d}`,f=document.createElement("li");f.setAttribute("data-part","item"),f.style.setProperty("--db-level",String(u.split(".").length-1));let m=document.createElement("div");m.setAttribute("data-part","row"),f.appendChild(m);let p=(a==null?void 0:a.replace(/[\\u0000-\\u0020]/g,""))??"";a!=null&&/^[a-z][a-z0-9+.-]*:/i.test(p)&&!/^(?:https?|mailto):/i.test(p)&&(a=null);let b=a!=null&&/^[a-z][a-z0-9+.-]*:|^\\/\\//i.test(p),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",s.replace("{label}",()=>r));else{let w=document.createElement("span");w.setAttribute("data-part","label"),w.textContent=r,g.appendChild(w)}g.insertAdjacentHTML("beforeend",Tn)}let y=this.getAttribute("toggle-position")==="end";if(g&&!y&&m.appendChild(g),a!=null){let w=document.createElement("a");w.setAttribute("data-part","link"),w.textContent=r,w.href=b?a:n+a,b&&(w.rel="noopener"),!c&&w.href.split("#")[0]===o&&w.setAttribute("aria-current","page"),m.appendChild(w)}if(a==null&&!(l!=null&&l.length)){let w=document.createElement("span");w.setAttribute("data-part","label"),w.textContent=r,m.appendChild(w)}if(g&&y&&m.appendChild(g),l!=null&&l.length){let w=document.createElement("ul");w.setAttribute("data-part","group"),w.dataset.lazy="",w.dataset.path=u,w.hidden=!0,f.setAttribute("data-state","closed"),f.appendChild(w),this.prepareItem(f)}return f})}},Tn=\'<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 On(i){for(let t=i.parentElement;t;t=t.parentElement){let e=getComputedStyle(t).overflowY;if((e==="auto"||e==="scroll")&&t.scrollHeight>t.clientHeight)return t}return null}N();customElements.get("db-nav-tree")||customElements.define("db-nav-tree",Ke);var We=class extends z{constructor(){super(...arguments);h(this,"links",[]);h(this,"headings",[]);h(this,"observer",null);h(this,"active",null);h(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)});h(this,"onHash",()=>{let t=wt(location.hash.slice(1));t&&this.headings.some(e=>e.id===t)&&this.setActive(t)})}slugOf(t){return t.getAttribute("data-toc-slug")??wt(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(n=>document.getElementById(this.slugOf(n))).filter(n=>!!n),!this.headings.length)return;let t=Number(this.getAttribute("offset")??80);typeof IntersectionObserver<"u"&&(this.observer=new IntersectionObserver(n=>{var o;let s=n.find(r=>r.isIntersecting);if(s)return this.setActive(s.target.id);this.setActive(((o=this.lastAbove(t))==null?void 0:o.id)??null)},{rootMargin:`-${t}px 0px -70% 0px`,threshold:0}),this.headings.forEach(n=>this.observer.observe(n))),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 n of this.headings)n.getBoundingClientRect().top<=t+20&&(e=n);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}))}}};N();customElements.get("db-toc")||customElements.define("db-toc",We);var Dn=["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] *)"],ce=Dn.join(","),Ye=typeof Element>"u",Rt=Ye?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Wt=!Ye&&Element.prototype.getRootNode?function(i){var t;return i==null||(t=i.getRootNode)===null||t===void 0?void 0:t.call(i)}:function(i){return i==null?void 0:i.ownerDocument},jt=function(t,e){var n;e===void 0&&(e=!0);var s=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"inert"),o=s===""||s==="true",r=o||e&&t&&(typeof t.closest=="function"?t.closest("[inert]"):jt(t.parentNode));return r},Rn=function(t){var e,n=t==null||(e=t.getAttribute)===null||e===void 0?void 0:e.call(t,"contenteditable");return n===""||n==="true"},In=function(t,e,n){if(jt(t))return[];var s=Array.prototype.slice.apply(t.querySelectorAll(ce));return e&&Rt.call(t,ce)&&s.unshift(t),s=s.filter(n),s},de=function(t,e,n){for(var s=[],o=Array.from(t);o.length;){var r=o.shift();if(!jt(r,!1))if(r.tagName==="SLOT"){var a=r.assignedElements(),l=a.length?a:r.children,c=de(l,!0,n);n.flatten?s.push.apply(s,c):s.push({scopeParent:r,candidates:c})}else{var d=Rt.call(r,ce);d&&n.filter(r)&&(e||!t.includes(r))&&s.push(r);var u=r.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(r),f=!jt(u,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(r));if(u&&f){var m=de(u===!0?r.children:u.children,!0,n);n.flatten?s.push.apply(s,m):s.push({scopeParent:r,candidates:m})}else o.unshift.apply(o,r.children)}}return s},Ue=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Xe=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||Rn(t))&&!Ue(t)?0:t.tabIndex},Mn=function(t,e){var n=Xe(t);return n<0&&e&&!Ue(t)?0:n},Hn=function(t,e){return t.tabIndex===e.tabIndex?t.documentOrder-e.documentOrder:t.tabIndex-e.tabIndex},Ge=function(t){return t.tagName==="INPUT"},zn=function(t){return Ge(t)&&t.type==="hidden"},Nn=function(t){var e=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(n){return n.tagName==="SUMMARY"});return e},_n=function(t,e){for(var n=0;n<t.length;n++)if(t[n].checked&&t[n].form===e)return t[n]},Pn=function(t){if(!t.name)return!0;var e=t.form||Wt(t),n=function(a){return e.querySelectorAll(\'input[type="radio"][name="\'+a+\'"]\')},s;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")s=n(window.CSS.escape(t.name));else try{s=n(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 o=_n(s,t.form);return!o||o===t},Fn=function(t){return Ge(t)&&t.type==="radio"},$n=function(t){return Fn(t)&&!Pn(t)},Bn=function(t){var e,n=t&&Wt(t),s=(e=n)===null||e===void 0?void 0:e.host,o=!1;if(n&&n!==t){var r,a,l;for(o=!!((r=s)!==null&&r!==void 0&&(a=r.ownerDocument)!==null&&a!==void 0&&a.contains(s)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!o&&s;){var c,d,u;n=Wt(s),s=(c=n)===null||c===void 0?void 0:c.host,o=!!((d=s)!==null&&d!==void 0&&(u=d.ownerDocument)!==null&&u!==void 0&&u.contains(s))}}return o},je=function(t){var e=t.getBoundingClientRect(),n=e.width,s=e.height;return n===0&&s===0},qn=function(t,e){var n=e.displayCheck,s=e.getShadowRoot;if(n==="full-native"&&"checkVisibility"in t){var o=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!o}var r=getComputedStyle(t),a=r.visibility;if(a==="hidden"||a==="collapse")return!0;var l=Rt.call(t,"details>summary:first-of-type"),c=l?t.parentElement:t;if(Rt.call(c,"details:not([open]) *"))return!0;if(!n||n==="full"||n==="full-native"||n==="legacy-full"){if(typeof s=="function"){for(var d=t;t;){var u=t.parentElement,f=Wt(t);if(u&&!u.shadowRoot&&s(u)===!0)return je(t);t.assignedSlot?t=t.assignedSlot:!u&&f!==t.ownerDocument?t=f.host:t=u}t=d}if(Bn(t))return!t.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return je(t);return!1},Kn=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var e=t.parentElement;e;){if(e.tagName==="FIELDSET"&&e.disabled){for(var n=0;n<e.children.length;n++){var s=e.children.item(n);if(s.tagName==="LEGEND")return Rt.call(e,"fieldset[disabled] *")?!0:!s.contains(t)}return!0}e=e.parentElement}return!1},Wn=function(t,e){return!(e.disabled||zn(e)||qn(e,t)||Nn(e)||Kn(e))},Ve=function(t,e){return!($n(e)||Xe(e)<0||!Wn(t,e))},jn=function(t){var e=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(e)||e>=0)},Ze=function(t){var e=[],n=[];return t.forEach(function(s,o){var r=!!s.scopeParent,a=r?s.scopeParent:s,l=Mn(a,r),c=r?Ze(s.candidates):a;l===0?r?e.push.apply(e,c):e.push(a):n.push({documentOrder:o,tabIndex:l,item:s,isScope:r,content:c})}),n.sort(Hn).reduce(function(s,o){return o.isScope?s.push.apply(s,o.content):s.push(o.content),s},[]).concat(e)},ue=function(t,e){e=e||{};var n;return e.getShadowRoot?n=de([t],e.includeContainer,{filter:Ve.bind(null,e),flatten:!1,getShadowRoot:e.getShadowRoot,shadowRootFilter:jn}):n=In(t,e.includeContainer,Ve.bind(null,e)),Ze(n)};var he=class{constructor(i,t={}){h(this,"root");h(this,"opts");h(this,"previouslyFocused",null);h(this,"keydownHandler",null);h(this,"active",!1);this.root=i,this.opts={initialFocus:t.initialFocus??"first",returnFocus:t.returnFocus??!0}}activate(){this.active||(this.active=!0,this.previouslyFocused=document.activeElement,this.keydownHandler=i=>{if(i.key!=="Tab")return;let t=ue(this.root);if(t.length===0){i.preventDefault();return}let e=t[0],n=t[t.length-1];i.shiftKey?document.activeElement===e&&(n.focus(),i.preventDefault()):document.activeElement===n&&(e.focus(),i.preventDefault())},document.addEventListener("keydown",this.keydownHandler),requestAnimationFrame(()=>{var t;if(!this.active)return;let i=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=i[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 B,at=(B=class{static activate(){if(B.count++,B.count>1)return;let t=window.innerWidth-document.documentElement.clientWidth;B.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(){B.count=Math.max(0,B.count-1),!(B.count>0)&&B.originalStyles&&(document.body.style.overflow=B.originalStyles.overflow,document.body.style.paddingRight=B.originalStyles.paddingRight,B.originalStyles=null)}static reset(){B.count=0,B.originalStyles=null}},h(B,"count",0),h(B,"originalStyles",null),B);var Q=[];function Vn(i){if(i.key!=="Escape"||Q.length===0)return;let t=Q[Q.length-1];t.escapePrevented||(i.preventDefault(),i.stopPropagation(),t.opts.onDismiss("escape-key"))}var Qe=!1;function Yn(){Qe||(Qe=!0,document.addEventListener("keydown",Vn))}var lt=class{constructor(i,t){h(this,"root");h(this,"opts");h(this,"outsideHandler",null);h(this,"active",!1);h(this,"frameId",null);h(this,"escapePrevented",!1);this.root=i,this.opts={onDismiss:t.onDismiss,escapeKey:t.escapeKey??!0,outsidePress:t.outsidePress??!0}}activate(){this.active||(this.active=!0,this.opts.escapeKey&&(Yn(),Q.push(this)),this.opts.outsidePress&&(this.outsideHandler=i=>{if(Q.length>0&&Q[Q.length-1]!==this)return;let t=i.target;if(this.root.contains(t))return;let e=this.root.id;if(e){let s=document.querySelector(`[aria-controls="${e}"]`);if(s!=null&&s.contains(t))return}let n=this.root.getAttribute("aria-labelledby");if(n){let s=document.getElementById(n);if(s!=null&&s.contains(t))return}typeof this.opts.outsidePress=="function"&&!this.opts.outsidePress(i)||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 i=Q.indexOf(this);i!==-1&&Q.splice(i,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 fe(i){let t=[],e=i;for(;e&&e!==document.body;){let n=e.parentElement;if(!n)break;for(let s=0;s<n.children.length;s++){let o=n.children[s];if(o===e||o.contains(i))continue;let r=o.tagName;if(r==="SCRIPT"||r==="STYLE"||r==="LINK")continue;let a=o.getAttribute("aria-hidden");a!=="true"&&(t.push({el:o,prev:a}),o.setAttribute("aria-hidden","true"))}e=n}return()=>{for(let{el:n,prev:s}of t)s===null?n.removeAttribute("aria-hidden"):n.setAttribute("aria-hidden",s)}}var Je=class extends z{constructor(){super(...arguments);h(this,"content",null);h(this,"backdrop",null);h(this,"trigger",null);h(this,"native",!1);h(this,"_open",!1);h(this,"openedBy",null);h(this,"focusTrap",null);h(this,"dismiss",null);h(this,"cleanupInert",null);h(this,"onTriggerClick",t=>{t.preventDefault(),this.toggle(t.currentTarget)});h(this,"onHostClick",t=>{let e=t.target.closest("[data-part=\'close\']");e&&e.closest("db-dialog")===this&&this.close("close-press")});h(this,"onDocumentClick",t=>{var s,o,r;let e=(o=(s=t.target).closest)==null?void 0:o.call(s,"[data-dialog-for]");if(!e||e===this.trigger)return;let n=e.getAttribute("data-dialog-for");n&&(n===this.id||n===((r=this.content)==null?void 0:r.id))&&(t.preventDefault(),this.toggle(e))});h(this,"onCancel",t=>{t.preventDefault(),this.dismissible&&this.close("escape-key")});h(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")});h(this,"onNativeClose",()=>{this._open&&this.finishClose("close-press")})}get open(){return this._open}get dismissible(){return this.getAttribute("dismissible")!=="false"}setup(){if(this.content=$(this,"[data-part=\'content\']"),!this.content)return;this.native=typeof HTMLDialogElement<"u"&&this.content instanceof HTMLDialogElement&&typeof this.content.showModal=="function",this.backdrop=$(this,"[data-part=\'backdrop\']"),this.trigger=bt($(this,"[data-part=\'trigger\']"));let t=this.content;t.id||(t.id=F("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=F("db-dialog-title")),t.setAttribute("aria-labelledby",e.id));let n=t.querySelector("[data-part=\'description\']");n&&!t.hasAttribute("aria-describedby")&&(n.id||(n.id=F("db-dialog-desc")),t.setAttribute("aria-describedby",n.id));for(let s of this.triggers())this.prepareTrigger(s);this.setState("closed"),this.native||(this.focusTrap=new he(t),this.dismiss=new lt(t,{onDismiss:s=>this.dismissible&&this.close(s)}))}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 n;let t=this.trigger?[this.trigger]:[],e=[this.id,(n=this.content)==null?void 0:n.id].filter(Boolean);for(let s of e)document.querySelectorAll(`[data-dialog-for="${CSS.escape(s)}"]`).forEach(o=>t.push(o));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,n;this.setAttribute("data-state",t),(e=this.content)==null||e.setAttribute("data-state",t),(n=this.backdrop)==null||n.setAttribute("data-state",t)}toggle(t){this._open?this.close("trigger-press"):this.show(t)}show(t){var n,s;let e=this.content;if(!(!e||this._open)){this._open=!0,this.openedBy=t??document.activeElement??this.trigger;for(let o of this.triggers())this.prepareTrigger(o),o.setAttribute("aria-expanded","true");if(at.activate(),this.native){let o=e;o.open||o.showModal()}else e.hidden=!1,this.backdrop&&(this.backdrop.hidden=!1),this.cleanupInert=fe(e),(n=this.focusTrap)==null||n.activate(),(s=this.dismiss)==null||s.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 o,r,a;let n=this.content;this._open=!1,this.setState("closed");for(let l of this.triggers())l.setAttribute("aria-expanded","false");if(at.deactivate(),this.native){let l=n;l.open&&l.close()}else(o=this.dismiss)==null||o.deactivate(),(r=this.focusTrap)==null||r.deactivate(),(a=this.cleanupInert)==null||a.call(this),this.cleanupInert=null,Fe(n,()=>{this._open||(n.hidden=!0,this.backdrop&&(this.backdrop.hidden=!0))});let s=this.openedBy;this.openedBy=null,e&&s&&document.contains(s)&&s.focus(),this.dispatchEvent(new CustomEvent("db-dialog:close",{detail:{reason:t},bubbles:!0}))}};N();customElements.get("db-dialog")||customElements.define("db-dialog",Je);var ti=class extends z{constructor(){super(...arguments);h(this,"input",null);h(this,"listbox",null);h(this,"empty",null);h(this,"_open",!1);h(this,"highlighted",null);h(this,"observer",null);h(this,"base",F("db-combobox"));h(this,"optionSeq",0);h(this,"onInput",()=>{this.filtering?this.filter(this.input.value):this.show()});h(this,"onFocus",()=>{(this.hasAttribute("open-on-focus")||this.filtering&&this.input.value)&&(this.filtering?this.filter(this.input.value):this.show())});h(this,"onKey",t=>{let e=this.visible(),n=this.highlighted?e.indexOf(this.highlighted):-1;switch(t.key){case"ArrowDown":t.preventDefault(),this._open||this.show(),e.length&&this.highlight(e[n<0?0:Math.min(n+1,e.length-1)]);break;case"ArrowUp":t.preventDefault(),this._open||this.show(),e.length&&this.highlight(e[n<0?e.length-1:Math.max(n-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}});h(this,"onListClick",t=>{let e=t.target.closest("[data-part=\'option\']");if(!e||e.closest("db-combobox")!==this||W(e))return;let n=t.target.closest("a[href]");!this.choose(e,!n)&&n&&t.preventDefault()});h(this,"onListPointer",t=>{let e=t.target.closest("[data-part=\'option\']");e&&e.closest("db-combobox")===this&&!W(e)&&!e.hidden&&this.highlight(e)});h(this,"onListDown",t=>t.preventDefault());h(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&&!W(t))}setup(){if(this.input=$(this,"[data-part=\'input\']"),this.listbox=$(this,"[data-part=\'listbox\']"),this.empty=$(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 n;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),(n=this.observer)==null||n.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(),n=0;for(let o of this.options()){let r=!e||(o.textContent??"").toLowerCase().includes(e)||(o.dataset.value??"").toLowerCase().includes(e);o.hidden=!r,r&&n++}this.empty&&(this.empty.hidden=n>0||!e),this.clearHighlight(),n||e&&this.empty?this.show():this.hide();let s=this.visible();s.length&&!this.hasAttribute("no-autohighlight")&&this.highlight(s[0]),this.dispatchEvent(new CustomEvent("db-combobox:update",{detail:{count:n},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,n,s;this.input&&((e=this.highlighted)==null||e.removeAttribute("data-highlighted"),(n=this.highlighted)==null||n.setAttribute("aria-selected","false"),this.highlighted=t,t.setAttribute("data-highlighted",""),t.setAttribute("aria-selected","true"),this.input.setAttribute("aria-activedescendant",t.id),(s=t.scrollIntoView)==null||s.call(t,{block:"nearest"}))}clearHighlight(){var t,e,n;(t=this.highlighted)==null||t.removeAttribute("data-highlighted"),(e=this.highlighted)==null||e.setAttribute("aria-selected","false"),this.highlighted=null,(n=this.input)==null||n.removeAttribute("aria-activedescendant")}choose(t,e=!0){var a;let n=t.dataset.value??"",s=((a=t.textContent)==null?void 0:a.trim())??n,o=new CustomEvent("db-combobox:select",{detail:{value:n,text:s,option:t},bubbles:!0,cancelable:!0});if(!this.dispatchEvent(o))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")??s),this.inline||this.hide(),this.dispatchEvent(new CustomEvent("db-combobox:change",{detail:{value:n,text:s},bubbles:!0})),!0)}};N();customElements.get("db-combobox")||customElements.define("db-combobox",ti);var it=Math.min,j=Math.max,Mt=Math.round,Ht=Math.floor,U=i=>({x:i,y:i}),Un={left:"right",right:"left",bottom:"top",top:"bottom"};function ni(i,t,e){return j(i,it(t,e))}function Et(i,t){return typeof i=="function"?i(t):i}function nt(i){return i.split("-")[0]}function xt(i){return i.split("-")[1]}function me(i){return i==="x"?"y":"x"}function pe(i){return i==="y"?"height":"width"}function X(i){let t=i[0];return t==="t"||t==="b"?"y":"x"}function ge(i){return me(X(i))}function si(i,t,e){e===void 0&&(e=!1);let n=xt(i),s=ge(i),o=pe(s),r=s==="x"?n===(e?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(r=It(r)),[r,It(r)]}function oi(i){let t=It(i);return[Vt(i),t,Vt(t)]}function Vt(i){return i.includes("start")?i.replace("start","end"):i.replace("end","start")}var ei=["left","right"],ii=["right","left"],Xn=["top","bottom"],Gn=["bottom","top"];function Zn(i,t,e){switch(i){case"top":case"bottom":return e?t?ii:ei:t?ei:ii;case"left":case"right":return t?Xn:Gn;default:return[]}}function ri(i,t,e,n){let s=xt(i),o=Zn(nt(i),e==="start",n);return s&&(o=o.map(r=>r+"-"+s),t&&(o=o.concat(o.map(Vt)))),o}function It(i){let t=nt(i);return Un[t]+i.slice(t.length)}function Qn(i){var t,e,n,s;return{top:(t=i.top)!=null?t:0,right:(e=i.right)!=null?e:0,bottom:(n=i.bottom)!=null?n:0,left:(s=i.left)!=null?s:0}}function ai(i){return typeof i!="number"?Qn(i):{top:i,right:i,bottom:i,left:i}}function ct(i){let{x:t,y:e,width:n,height:s}=i;return{width:n,height:s,top:e,left:t,right:t+n,bottom:e+s,x:t,y:e}}function li(i,t,e){let{reference:n,floating:s}=i,o=X(t),r=ge(t),a=pe(r),l=nt(t),c=o==="y",d=n.x+n.width/2-s.width/2,u=n.y+n.height/2-s.height/2,f=n[a]/2-s[a]/2,m;switch(l){case"top":m={x:d,y:n.y-s.height};break;case"bottom":m={x:d,y:n.y+n.height};break;case"right":m={x:n.x+n.width,y:u};break;case"left":m={x:n.x-s.width,y:u};break;default:m={x:n.x,y:n.y}}let p=xt(t);return p&&(m[r]+=f*(p==="end"?1:-1)*(e&&c?-1:1)),m}async function ci(i,t){var e;t===void 0&&(t={});let{x:n,y:s,platform:o,rects:r,elements:a,strategy:l}=i,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:f=!1,padding:m=0}=Et(t,i),p=ai(m),g=a[f?u==="floating"?"reference":"floating":u],y=ct(await o.getClippingRect({element:(e=await(o.isElement==null?void 0:o.isElement(g)))==null||e?g:g.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:l})),w=u==="floating"?{x:n,y:s,width:r.floating.width,height:r.floating.height}:r.reference,L=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),R=await(o.isElement==null?void 0:o.isElement(L))&&await(o.getScale==null?void 0:o.getScale(L))||{x:1,y:1},M=ct(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:L,strategy:l}):w);return{top:(y.top-M.top+p.top)/R.y,bottom:(M.bottom-y.bottom+p.bottom)/R.y,left:(y.left-M.left+p.left)/R.x,right:(M.right-y.right+p.right)/R.x}}var Jn=50,di=async(i,t,e)=>{let{placement:n="bottom",strategy:s="absolute",middleware:o=[],platform:r}=e,a=r.detectOverflow?r:{...r,detectOverflow:ci},l=await(r.isRTL==null?void 0:r.isRTL(t)),c=await r.getElementRects({reference:i,floating:t,strategy:s}),{x:d,y:u}=li(c,n,l),f=n,m=0,p={};for(let b=0;b<o.length;b++){let g=o[b];if(!g)continue;let{name:y,fn:w}=g,{x:L,y:R,data:M,reset:H}=await w({x:d,y:u,initialPlacement:n,placement:f,strategy:s,middlewareData:p,rects:c,platform:a,elements:{reference:i,floating:t}});d=L??d,u=R??u,p[y]={...p[y],...M},H&&m<Jn&&(m++,typeof H=="object"&&(H.placement&&(f=H.placement),H.rects&&(c=H.rects===!0?await r.getElementRects({reference:i,floating:t,strategy:s}):H.rects),{x:d,y:u}=li(c,f,l)),b=-1)}return{x:d,y:u,placement:f,strategy:s,middlewareData:p}};var ui=function(i){return i===void 0&&(i={}),{name:"flip",options:i,async fn(t){var e,n;let{placement:s,middlewareData:o,rects:r,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:f,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:b=!0,...g}=Et(i,t);if((e=o.arrow)!=null&&e.alignmentOffset)return{};let y=nt(s),w=X(a),L=nt(a)===a,R=await(l.isRTL==null?void 0:l.isRTL(c.floating)),M=f||(L||!b?[It(a)]:oi(a)),H=p!=="none";!f&&H&&M.push(...ri(a,b,p,R));let O=[a,...M],v=await l.detectOverflow(t,g),q=[],I=((n=o.flip)==null?void 0:n.overflows)||[];if(d&&q.push(v[y]),u){let C=si(s,r,R);q.push(v[C[0]],v[C[1]])}if(I=[...I,{placement:s,overflows:q}],!q.every(C=>C<=0)){var S,x;let C=(((S=o.flip)==null?void 0:S.index)||0)+1,T=O[C];if(T&&(!(u==="alignment"?w!==X(T):!1)||I.every(D=>X(D.placement)===w?D.overflows[0]>0:!0)))return{data:{index:C,overflows:I},reset:{placement:T}};let A=(x=I.filter(k=>k.overflows[0]<=0).sort((k,D)=>k.overflows[1]-D.overflows[1])[0])==null?void 0:x.placement;if(!A)switch(m){case"bestFit":{var E;let k=(E=I.filter(D=>{if(H){let _=X(D.placement);return _===w||_==="y"}return!0}).map(D=>[D.placement,D.overflows.filter(_=>_>0).reduce((_,P)=>_+P,0)]).sort((D,_)=>D[1]-_[1])[0])==null?void 0:E[0];k&&(A=k);break}case"initialPlacement":A=a;break}if(s!==A)return{reset:{placement:A}}}return{}}}};var ts=new Set(["left","top"]);async function es(i,t){let{placement:e,platform:n,elements:s}=i,o=await(n.isRTL==null?void 0:n.isRTL(s.floating)),r=nt(e),a=xt(e),l=X(e)==="y",c=ts.has(r)?-1:1,d=o&&l?-1:1,u=Et(t,i),{mainAxis:f,crossAxis:m,alignmentAxis:p}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return a&&typeof p=="number"&&(m=a==="end"?p*-1:p),l?{x:m*d,y:f*c}:{x:f*c,y:m*d}}var hi=function(i){return i===void 0&&(i=0),{name:"offset",options:i,async fn(t){var e,n;let{x:s,y:o,placement:r,middlewareData:a}=t,l=await es(t,i);return r===((e=a.offset)==null?void 0:e.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:s+l.x,y:o+l.y,data:{...l,placement:r}}}}},fi=function(i){return i===void 0&&(i={}),{name:"shift",options:i,async fn(t){let{x:e,y:n,placement:s,platform:o}=t,{mainAxis:r=!0,crossAxis:a=!1,limiter:l={fn:w=>{let{x:L,y:R}=w;return{x:L,y:R}}},...c}=Et(i,t),d={x:e,y:n},u=await o.detectOverflow(t,c),f=X(s),m=me(f),p=d[m],b=d[f],g=(w,L)=>ni(L+u[w==="y"?"top":"left"],L,L-u[w==="y"?"bottom":"right"]);r&&(p=g(m,p)),a&&(b=g(f,b));let y=l.fn({...t,[m]:p,[f]:b});return{...y,data:{x:y.x-e,y:y.y-n,enabled:{[m]:r,[f]:a}}}}}};var mi=function(i){return i===void 0&&(i={}),{name:"size",options:i,async fn(t){let{placement:e,rects:n,platform:s,elements:o}=t,{apply:r=()=>{},...a}=Et(i,t),l=await s.detectOverflow(t,a),c=nt(e),d=xt(e),u=X(e)==="y",{width:f,height:m}=n.floating,p,b;c==="top"||c==="bottom"?(p=c,b=d===(await(s.isRTL==null?void 0:s.isRTL(o.floating))?"start":"end")?"left":"right"):(b=c,p=d==="end"?"top":"bottom");let g=m-l.top-l.bottom,y=f-l.left-l.right,w=it(m-l[p],g),L=it(f-l[b],y),R=t.middlewareData.shift,M=!R,H=w,O=L;R!=null&&R.enabled.x&&(O=y),R!=null&&R.enabled.y&&(H=g),M&&!d&&(u?O=f-2*j(l.left,l.right):H=m-2*j(l.top,l.bottom)),await r({...t,availableWidth:O,availableHeight:H});let v=await s.getDimensions(o.floating);return f!==v.width||m!==v.height?{reset:{rects:!0}}:{}}}};function Yt(){return typeof window<"u"}function ut(i){return gi(i)?(i.nodeName||"").toLowerCase():"#document"}function K(i){var t;return(i==null||(t=i.ownerDocument)==null?void 0:t.defaultView)||window}function G(i){var t;return(t=(gi(i)?i.ownerDocument:i.document)||window.document)==null?void 0:t.documentElement}function gi(i){return Yt()?i instanceof Node||i instanceof K(i).Node:!1}function V(i){return Yt()?i instanceof Element||i instanceof K(i).Element:!1}function J(i){return Yt()?i instanceof HTMLElement||i instanceof K(i).HTMLElement:!1}function pi(i){return!Yt()||typeof ShadowRoot>"u"?!1:i instanceof ShadowRoot||i instanceof K(i).ShadowRoot}function zt(i){let{overflow:t,overflowX:e,overflowY:n,display:s}=Y(i);return/auto|scroll|overlay|hidden|clip/.test(t+n+e)&&s!=="inline"&&s!=="contents"}function bi(i){return/^(table|td|th)$/.test(ut(i))}function Nt(i){try{if(i.matches(":popover-open"))return!0}catch{}try{return i.matches(":modal")}catch{return!1}}var is=/transform|translate|scale|rotate|perspective|filter/,ns=/paint|layout|strict|content/,dt=i=>!!i&&i!=="none",be;function Ut(i){let t=V(i)?Y(i):i;return dt(t.transform)||dt(t.translate)||dt(t.scale)||dt(t.rotate)||dt(t.perspective)||!Xt()&&(dt(t.backdropFilter)||dt(t.filter))||is.test(t.willChange||"")||ns.test(t.contain||"")}function vi(i){let t=st(i);for(;J(t)&&!St(t);){if(Ut(t))return t;if(Nt(t))return null;t=st(t)}return null}function Xt(){return be==null&&(be=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),be}function St(i){return/^(html|body|#document)$/.test(ut(i))}function Y(i){return K(i).getComputedStyle(i)}function _t(i){return V(i)?{scrollLeft:i.scrollLeft,scrollTop:i.scrollTop}:{scrollLeft:i.scrollX,scrollTop:i.scrollY}}function st(i){if(ut(i)==="html")return i;let t=i.assignedSlot||i.parentNode||pi(i)&&i.host||G(i);return pi(t)?t.host:t}function yi(i){let t=st(i);return St(t)?(i.ownerDocument||i).body:J(t)&&zt(t)?t:yi(t)}function At(i,t,e){var n;t===void 0&&(t=[]),e===void 0&&(e=!0);let s=yi(i),o=s===((n=i.ownerDocument)==null?void 0:n.body),r=K(s);if(o){let a=Gt(r);return t.concat(r,r.visualViewport||[],zt(s)?s:[],a&&e?At(a):[])}else return t.concat(s,At(s,[],e))}function Gt(i){return i.parent&&Object.getPrototypeOf(i.parent)?i.frameElement:null}function xi(i){let t=Y(i),e=parseFloat(t.width)||0,n=parseFloat(t.height)||0,s=J(i),o=s?i.offsetWidth:e,r=s?i.offsetHeight:n,a=Mt(e)!==o||Mt(n)!==r;return a&&(e=o,n=r),{width:e,height:n,$:a}}function ye(i){return V(i)?i:i.contextElement}function Ct(i){let t=ye(i);if(!J(t))return U(1);let e=t.getBoundingClientRect(),{width:n,height:s,$:o}=xi(t),r=(o?Mt(e.width):e.width)/n,a=(o?Mt(e.height):e.height)/s;return(!r||!Number.isFinite(r))&&(r=1),(!a||!Number.isFinite(a))&&(a=1),{x:r,y:a}}var ss=U(0);function Ai(i){let t=K(i);return!Xt()||!t.visualViewport?ss:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function os(i,t,e){return t===void 0&&(t=!1),!!e&&t&&e===K(i)}function ht(i,t,e,n){t===void 0&&(t=!1),e===void 0&&(e=!1);let s=i.getBoundingClientRect(),o=ye(i),r=U(1);t&&(n?V(n)&&(r=Ct(n)):r=Ct(i));let a=os(o,e,n)?Ai(o):U(0),l=(s.left+a.x)/r.x,c=(s.top+a.y)/r.y,d=s.width/r.x,u=s.height/r.y;if(o&&n){let f=K(o),m=V(n)?K(n):n,p=f,b=Gt(p);for(;b&&m!==p;){let g=Ct(b),y=b.getBoundingClientRect(),w=Y(b),L=y.left+(b.clientLeft+parseFloat(w.paddingLeft))*g.x,R=y.top+(b.clientTop+parseFloat(w.paddingTop))*g.y;l*=g.x,c*=g.y,d*=g.x,u*=g.y,l+=L,c+=R,p=K(b),b=Gt(p)}}return ct({width:d,height:u,x:l,y:c})}function Zt(i,t){let e=_t(i).scrollLeft;return t?t.left+e:ht(G(i)).left+e}function Si(i,t){let e=i.getBoundingClientRect(),n=e.left+t.scrollLeft-Zt(i,e),s=e.top+t.scrollTop;return{x:n,y:s}}function rs(i){let{elements:t,rect:e,offsetParent:n,strategy:s}=i,o=s==="fixed",r=G(n),a=t?Nt(t.floating):!1;if(n===r||a&&o)return e;let l={scrollLeft:0,scrollTop:0},c=U(1),d=U(0),u=J(n);if((u||!o)&&((ut(n)!=="body"||zt(r))&&(l=_t(n)),u)){let m=ht(n);c=Ct(n),d.x=m.x+n.clientLeft,d.y=m.y+n.clientTop}let f=r&&!u&&!o?Si(r,l):U(0);return{width:e.width*c.x,height:e.height*c.y,x:e.x*c.x-l.scrollLeft*c.x+d.x+f.x,y:e.y*c.y-l.scrollTop*c.y+d.y+f.y}}function as(i){return i.getClientRects?Array.from(i.getClientRects()):[]}function ls(i){let t=_t(i),e=i.ownerDocument.body,n=j(i.scrollWidth,i.clientWidth,e.scrollWidth,e.clientWidth),s=j(i.scrollHeight,i.clientHeight,e.scrollHeight,e.clientHeight),o=-t.scrollLeft+Zt(i),r=-t.scrollTop;return Y(e).direction==="rtl"&&(o+=j(i.clientWidth,e.clientWidth)-n),{width:n,height:s,x:o,y:r}}var cs=25;function ds(i,t,e){e===void 0&&(e="viewport");let n=e==="layoutViewport",s=K(i),o=G(i),r=s.visualViewport,a=o.clientWidth,l=o.clientHeight,c=0,d=0;if(r){let f=!Xt()||t==="fixed";n?f||(c=-r.offsetLeft,d=-r.offsetTop):(a=r.width,l=r.height,f&&(c=r.offsetLeft,d=r.offsetTop))}if(Zt(o)<=0){let f=o.ownerDocument,m=f.body,p=getComputedStyle(m),b=f.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,g=Math.abs(o.clientWidth-m.clientWidth-b),y=getComputedStyle(o).scrollbarGutter==="stable both-edges"?g/2:g;y<=cs&&(a-=y)}return{width:a,height:l,x:c,y:d}}function us(i,t){let e=ht(i,!0,t==="fixed"),n=e.top+i.clientTop,s=e.left+i.clientLeft,o=Ct(i),r=i.clientWidth*o.x,a=i.clientHeight*o.y,l=s*o.x,c=n*o.y;return{width:r,height:a,x:l,y:c}}function wi(i,t,e){let n;if(t==="viewport"||t==="layoutViewport")n=ds(i,e,t);else if(t==="document")n=ls(G(i));else if(V(t))n=us(t,e);else{let s=Ai(i);n={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return ct(n)}function hs(i,t){let e=t.get(i);if(e)return e;let n=At(i,[],!1).filter(a=>V(a)&&ut(a)!=="body"),s=null,o=Y(i).position==="fixed",r=o?st(i):i;for(;V(r)&&!St(r);){let a=Y(r),l=Ut(r),c=s?s.position:o?"fixed":"";!l&&(c==="fixed"||c==="absolute"&&a.position==="static")?n=n.filter(u=>u!==r):s=a,r=st(r)}return t.set(i,n),n}function fs(i){let{element:t,boundary:e,rootBoundary:n,strategy:s}=i,r=[...e==="clippingAncestors"?Nt(t)?[]:hs(t,this._c):[].concat(e),n],a=wi(t,r[0],s),l=a.top,c=a.right,d=a.bottom,u=a.left;for(let f=1;f<r.length;f++){let m=wi(t,r[f],s);l=j(m.top,l),c=it(m.right,c),d=it(m.bottom,d),u=j(m.left,u)}return{width:c-u,height:d-l,x:u,y:l}}function ms(i){let{width:t,height:e}=xi(i);return{width:t,height:e}}function ps(i,t,e){let n=J(t),s=G(t),o=e==="fixed",r=ht(i,!0,o,t),a={scrollLeft:0,scrollTop:0},l=U(0);if((n||!o)&&((ut(t)!=="body"||zt(s))&&(a=_t(t)),n)){let f=ht(t,!0,o,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}!n&&s&&(l.x=Zt(s));let c=s&&!n&&!o?Si(s,a):U(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 ve(i){return Y(i).position==="static"}function Ei(i,t){if(!J(i)||Y(i).position==="fixed")return null;if(t)return t(i);let e=i.offsetParent;return G(i)===e&&(e=e.ownerDocument.body),e}function Ci(i,t){let e=K(i);if(Nt(i))return e;if(!J(i)){let s=st(i);for(;s&&!St(s);){if(V(s)&&!ve(s))return s;s=st(s)}return e}let n=Ei(i,t);for(;n&&bi(n)&&ve(n);)n=Ei(n,t);return n&&St(n)&&ve(n)&&!Ut(n)?e:n||vi(i)||e}var gs=async function(i){let t=this.getOffsetParent||Ci,e=this.getDimensions,n=await e(i.floating);return{reference:ps(i.reference,await t(i.floating),i.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function bs(i){return Y(i).direction==="rtl"}var vs={convertOffsetParentRelativeRectToViewportRelativeRect:rs,getDocumentElement:G,getClippingRect:fs,getOffsetParent:Ci,getElementRects:gs,getClientRects:as,getDimensions:ms,getScale:Ct,isElement:V,isRTL:bs};function Li(i,t){return i.x===t.x&&i.y===t.y&&i.width===t.width&&i.height===t.height}function ys(i,t,e){let n=null,s,o=G(i);function r(){var d;clearTimeout(s),(d=n)==null||d.disconnect(),n=null}function a(d,u){d===void 0&&(d=!1),u===void 0&&(u=1),r();let f=i.getBoundingClientRect(),{left:m,top:p,width:b,height:g}=f;if(d||t(),!b||!g)return;let y=Ht(p),w=Ht(o.clientWidth-(m+b)),L=Ht(o.clientHeight-(p+g)),R=Ht(m),H={rootMargin:-y+"px "+-w+"px "+-L+"px "+-R+"px",threshold:j(0,it(1,u))||1},O=!0;function v(q){let I=q[0].intersectionRatio;if(!Li(f,i.getBoundingClientRect()))return a();if(I!==u){if(!O)return a();I?a(!1,I):s=setTimeout(()=>{a(!1,1e-7)},1e3)}O=!1}try{n=new IntersectionObserver(v,{...H,root:o.ownerDocument})}catch{n=new IntersectionObserver(v,H)}n.observe(i)}let l=K(i),c=()=>a(e);return l.addEventListener("resize",c),a(!0),()=>{l.removeEventListener("resize",c),r()}}function ki(i,t,e,n){n===void 0&&(n={});let{ancestorScroll:s=!0,ancestorResize:o=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=ye(i),d=s||o?[...c?At(c):[],...t?At(t):[]]:[];d.forEach(y=>{s&&y.addEventListener("scroll",e),o&&y.addEventListener("resize",e)});let u=c&&a?ys(c,e,o):null,f=-1,m=null;r&&(m=new ResizeObserver(y=>{let[w]=y;w&&w.target===c&&m&&t&&(m.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var L;(L=m)==null||L.observe(t)})),e()}),c&&!l&&m.observe(c),t&&m.observe(t));let p,b=l?ht(i):null;l&&g();function g(){let y=ht(i);b&&!Li(b,y)&&e(),b=y,p=requestAnimationFrame(g)}return e(),()=>{var y;d.forEach(w=>{s&&w.removeEventListener("scroll",e),o&&w.removeEventListener("resize",e)}),u==null||u(),(y=m)==null||y.disconnect(),m=null,l&&cancelAnimationFrame(p)}}var Ti=hi;var Oi=fi,Di=ui,Ri=mi;var Ii=(i,t,e)=>{let n=new Map,s=e??{},o={...vs,...s.platform,_c:n};return di(i,t,{...s,platform:o})};function ft(i,t,e={}){let{placement:n="bottom-start",strategy:s="absolute",offset:o=4,flip:r=!0,shift:a=!0,padding:l=8,matchWidth:c=!1}=e,d=[Ti(o),...r?[Di({padding:l})]:[],...a?[Oi({padding:l})]:[],...c?[Ri({apply({rects:f}){Object.assign(t.style,{width:`${f.reference.width}px`})}})]:[]];return t.style.position=s,ki(i,t,async()=>{let f=await Ii(i,t,{placement:n,strategy:s,middleware:d});Object.assign(t.style,{left:`${f.x}px`,top:`${f.y}px`});let m=f.placement.split("-")[0];t.setAttribute("data-side",m)})}var we=class{constructor(i){h(this,"opts");h(this,"buffer","");h(this,"timerId",null);h(this,"timeout");this.opts=i,this.timeout=i.timeout??1e3}handle(i){if(i.length!==1)return!1;this.timerId!==null&&clearTimeout(this.timerId),this.buffer+=i.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 Mi=class extends z{constructor(){super(...arguments);h(this,"trigger",null);h(this,"content",null);h(this,"valueEl",null);h(this,"items",[]);h(this,"nativeSelect",null);h(this,"hiddenInput",null);h(this,"labelEl",null);h(this,"onLabelClick",t=>{var e;t.target.closest("[data-part=\'trigger\']")||(t.preventDefault(),(e=this.trigger)==null||e.focus())});h(this,"dismiss",null);h(this,"typeahead",null);h(this,"cleanupFloating",null);h(this,"_open",!1);h(this,"_value","");h(this,"highlighted",-1);h(this,"syncing",!1);h(this,"onNativeChange",()=>{this.syncing||this.refresh()});h(this,"onFormReset",()=>setTimeout(()=>this.refresh()));h(this,"onTriggerClick",()=>{this.isDisabled||(this._open?this.close():this.show())});h(this,"onTriggerKeyUp",t=>{t.key===" "&&t.preventDefault()});h(this,"onTriggerKey",t=>{var o,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&&((o=this.typeahead)==null||o.handle(t.key));return}if(!e.length)return;let n=this.highlighted>=0?e.indexOf(this.items[this.highlighted]):-1,s=a=>{t.preventDefault(),this.highlight(this.items.indexOf(e[a]))};switch(t.key){case"ArrowDown":return s(Math.min(n+1,e.length-1));case"ArrowUp":return t.altKey?(t.preventDefault(),this.highlighted>=0&&this.select(this.items[this.highlighted]),this.close()):s(Math.max(n-1,0));case"Home":return s(0);case"End":return s(e.length-1);case"PageDown":return s(Math.min(n+10,e.length-1));case"PageUp":return s(Math.max(n-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))}});h(this,"onListClick",t=>{let e=t.target.closest("[data-part=\'item\']");!e||!this.items.includes(e)||W(e)||(this.select(e),this.close())});h(this,"onListPointer",t=>{let e=t.target.closest("[data-part=\'item\']");e&&this.items.includes(e)&&!W(e)&&this.highlight(this.items.indexOf(e))});h(this,"preventBlur",t=>t.preventDefault())}get open(){return this._open}get value(){return this._value}set value(t){let e=this.items.find(n=>n.dataset.value===t);e&&this.select(e,!1)}get isDisabled(){var t;return this.hasAttribute("disabled")||!!((t=this.nativeSelect)!=null&&t.disabled)}refresh(){var n;let t=this.nativeSelect;if(!t)return;let e=this.items.find(s=>s.dataset.value===t.value);e&&this.select(e,!1),(n=this.trigger)==null||n.setAttribute("aria-disabled",String(this.isDisabled))}enabled(){return this.items.filter(t=>!W(t))}setup(){var a,l;if(this.nativeSelect=$(this,"select"),this.nativeSelect&&!$(this,"[data-part=\'trigger\']")&&this.buildFromNative(this.nativeSelect),this.trigger=$(this,"[data-part=\'trigger\']"),this.content=$(this,"[data-part=\'content\']"),this.valueEl=$(this,"[data-part=\'value\']"),!this.trigger||!this.content)return;let{trigger:t,content:e}=this;this.items=et(this,"[data-part=\'item\']");let n=F("db-select");e.id||(e.id=`${n}-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=`${n}-item-${d}`),c.setAttribute("role","option"),c.setAttribute("aria-selected","false")}),et(this,"[data-part=\'group\']").forEach(c=>{c.setAttribute("role","group");let d=c.querySelector("[data-part=\'label\']");d&&(d.id||(d.id=F("db-select-label")),c.setAttribute("aria-labelledby",d.id))});let s=this.getAttribute("name");s&&!this.nativeSelect&&(this.hiddenInput=document.createElement("input"),this.hiddenInput.type="hidden",this.hiddenInput.name=s,this.hasAttribute("required")&&(this.hiddenInput.required=!0),this.appendChild(this.hiddenInput)),this.typeahead=new we({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 lt(e,{onDismiss:c=>this.close(c!=="outside-press")});let o=((a=this.nativeSelect)==null?void 0:a.value)??this.getAttribute("default-value")??"",r=this.items.find(c=>c.dataset.value===o);r&&W(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 n=t.getAttribute("aria-label"),s=t.getAttribute("aria-labelledby"),o=!s&&t.id?document.querySelector(`label[for="${CSS.escape(t.id)}"]`):null;o&&(s=o.id||(o.id=F("db-select-for"))),n&&e.setAttribute("aria-label",n),s&&e.setAttribute("aria-labelledby",s);let r=t.closest("label");if(r){if(this.labelEl=r,!n&&!s){let u=Array.from(r.childNodes).filter(f=>!(f instanceof Element&&(f===t||f.contains(t)||f.localName==="db-select"))).map(f=>f.textContent??"").join(" ").replace(/\\s+/g," ").trim();u&&e.setAttribute("aria-label",u)}}else o&&(this.labelEl=o);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,f)=>{let m=document.createElement("div");m.setAttribute("data-part","item"),m.className="db-select-item",m.dataset.value=u.value;for(let[p,b]of Object.entries(u.dataset))b!=null&&(m.dataset[p]=b);u.disabled&&m.setAttribute("aria-disabled","true"),m.textContent=u.textContent??u.value,f.appendChild(m)};for(let u of Array.from(t.children))if(u instanceof HTMLOptGroupElement){let f=document.createElement("div");f.setAttribute("data-part","group");let m=document.createElement("div");m.setAttribute("data-part","label"),m.className="db-select-label",m.textContent=u.label,f.appendChild(m);for(let p of Array.from(u.children))p instanceof HTMLOptionElement&&d(p,f);c.appendChild(f)}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,n,s,o,r,a,l,c,d;(t=this.trigger)==null||t.addEventListener("click",this.onTriggerClick),(e=this.trigger)==null||e.addEventListener("keydown",this.onTriggerKey),(n=this.trigger)==null||n.addEventListener("keyup",this.onTriggerKeyUp),(s=this.nativeSelect)==null||s.addEventListener("change",this.onNativeChange),(r=(o=this.nativeSelect)==null?void 0:o.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,n,s,o,r,a,l,c,d;(t=this.trigger)==null||t.removeEventListener("click",this.onTriggerClick),(e=this.trigger)==null||e.removeEventListener("keydown",this.onTriggerKey),(n=this.trigger)==null||n.removeEventListener("keyup",this.onTriggerKeyUp),(s=this.nativeSelect)==null||s.removeEventListener("change",this.onNativeChange),(r=(o=this.nativeSelect)==null?void 0:o.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 n=vt(e);this.setState("open"),t.setAttribute("aria-expanded","true"),this.cleanupFloating=ft(t,e,{placement:"bottom-start",offset:4,matchWidth:!this.hasAttribute("auto-width"),strategy:n==="top-layer"?"fixed":"absolute"});let o=this.items.find(l=>l.dataset.value===this._value&&!W(l))??this.enabled()[0];o&&this.highlight(this.items.indexOf(o)),(r=this.dismiss)==null||r.activate(),(a=this.typeahead)==null||a.reset(),t.focus()}close(t=!0){var s,o,r;let{trigger:e,content:n}=this;!e||!n||!this._open||(this._open=!1,(s=this.dismiss)==null||s.deactivate(),(o=this.cleanupFloating)==null||o.call(this),this.cleanupFloating=null,yt(n),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],n=this.content;if(!e||!n||!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 s=e.offsetTop,o=s+e.offsetHeight;s<n.scrollTop?n.scrollTop=s:o>n.scrollTop+n.clientHeight&&(n.scrollTop=o-n.clientHeight)}select(t,e=!0){var o;if(W(t))return;let n=t.dataset.value??"",s=n!==this._value;this._value=n;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=((o=t.textContent)==null?void 0:o.trim())??"",this.valueEl.removeAttribute("data-placeholder")),this.hiddenInput&&(this.hiddenInput.value=n),!e||!s){this.nativeSelect&&(this.nativeSelect.value=n);return}if(this.nativeSelect){this.nativeSelect.value=n,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:n},bubbles:!0}))}};N();customElements.get("db-select")||customElements.define("db-select",Mi);var Hi=class extends z{constructor(){super(...arguments);h(this,"trigger",null);h(this,"content",null);h(this,"dismiss",null);h(this,"cleanupFloating",null);h(this,"_open",!1);h(this,"onTriggerClick",()=>this.toggle());h(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=bt($(this,"[data-part=\'trigger\']")),this.content=$(this,"[data-part=\'content\']"),!this.trigger||!this.content)return;let t=this.content;t.id||(t.id=F("db-popover")),t.hasAttribute("role")||t.setAttribute("role","dialog"),!t.hasAttribute("aria-labelledby")&&!t.hasAttribute("aria-label")&&((e=this.trigger).id||(e.id=F("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 lt(t,{onDismiss:n=>this.close(n)})}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 s,o;let t=this.getAttribute("placement");if(t)return t;let e=((s=this.content)==null?void 0:s.dataset.side)||"bottom",n=((o=this.content)==null?void 0:o.dataset.align)||"center";return`${e}${n!=="center"?`-${n}`:""}`}toggle(){this._open?this.close("trigger-press"):this.show()}show(){var s;let{trigger:t,content:e}=this;if(!t||!e||this._open)return;this._open=!0;let n=vt(e);this.setState("open"),t.setAttribute("aria-expanded","true"),this.cleanupFloating=ft(t,e,{placement:this.placement(),offset:Number(this.getAttribute("offset")??8),strategy:n==="top-layer"?"fixed":"absolute"}),(s=this.dismiss)==null||s.activate(),this.hasAttribute("no-autofocus")||requestAnimationFrame(()=>{this._open&&(Pe(e)[0]??e).focus({preventScroll:!0})}),this.dispatchEvent(new CustomEvent("db-popover:open",{bubbles:!0}))}close(t="api"){var o,r;let{trigger:e,content:n}=this;if(!e||!n||!this._open)return;this._open=!1,(o=this.dismiss)==null||o.deactivate(),(r=this.cleanupFloating)==null||r.call(this),this.cleanupFloating=null;let s=n.contains(document.activeElement);yt(n),this.setState("closed"),e.setAttribute("aria-expanded","false"),t!=="outside-press"&&(s||t==="escape-key"||t==="close-press")&&e.focus(),this.dispatchEvent(new CustomEvent("db-popover:close",{detail:{reason:t},bubbles:!0}))}};N();customElements.get("db-popover")||customElements.define("db-popover",Hi);var zi=class extends z{constructor(){super(...arguments);h(this,"trigger",null);h(this,"content",null);h(this,"cleanupFloating",null);h(this,"showTimer",null);h(this,"hideTimer",null);h(this,"_open",!1);h(this,"onEnter",t=>{t.pointerType!=="touch"&&(this.clearTimers(),this._open||(this.showTimer=setTimeout(()=>this.show(),this.num("delay",200))))});h(this,"onLeave",t=>{t.pointerType!=="touch"&&(this.clearTimers(),this.hideTimer=setTimeout(()=>this.hide(),this.num("close-delay",100)))});h(this,"onContentEnter",()=>this.clearTimers());h(this,"onFocus",()=>{let t=!0;try{t=this.trigger.matches(":focus-visible")}catch{}t&&(this.clearTimers(),this.show())});h(this,"onBlur",()=>this.hide());h(this,"onPress",()=>this.hide());h(this,"onKey",t=>{t.key==="Escape"&&this._open&&(t.preventDefault(),t.stopImmediatePropagation(),this.hide())})}get open(){return this._open}num(t,e){let n=Number(this.getAttribute(t));return Number.isFinite(n)&&this.hasAttribute(t)?n:e}setup(){var e;if(this.trigger=bt($(this,"[data-part=\'trigger\']")),this.content=$(this,"[data-part=\'content\']"),!this.trigger||!this.content)return;(e=this.content).id||(e.id=F("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 n=vt(e);this.setState("open"),this.cleanupFloating=ft(t,e,{placement:this.getAttribute("placement")||e.dataset.side||"top",offset:8,strategy:n==="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,yt(this.content),this.setState("closed"),this.dispatchEvent(new CustomEvent("db-tooltip:close",{bubbles:!0})))}};N();customElements.get("db-tooltip")||customElements.define("db-tooltip",zi);var Ni="sidebar_state",ws="b",Es=768,Pt=new WeakMap;function xs(i){try{return localStorage.getItem(i)}catch{return null}}function As(i,t){try{localStorage.setItem(i,t)}catch{}}function Ae(i){if(Pt.has(i))return;let t=i.querySelector("[data-component=\'sidebar\']");if(!t)return;let e=t.dataset.collapsible||"offcanvas",n=t.dataset.side||"left",s=t.dataset.defaultOpen!=="false",o=xs(Ni),r=o!==null?o==="true":s,a=t.querySelector("[data-sidebar-desktop]"),l=t.querySelector("[data-sidebar-mobile]"),c=t.querySelector("[data-sidebar-mobile-backdrop]"),d=window.matchMedia(`(max-width: ${Es-1}px)`),u={provider:i,sidebar:t,desktopSidebar:a,mobileSidebar:l,mobileBackdrop:c,collapsible:e,side:n,open:r,openMobile:!1,isMobile:d.matches,mediaQuery:d};Pt.set(i,u),_i(u);let f=b=>{u.isMobile=b.matches,!b.matches&&u.openMobile&&ot(i)};d.addEventListener("change",f);let m=b=>{b.key===ws&&(b.metaKey||b.ctrlKey)?(b.preventDefault(),Ee(i)):b.key==="Escape"&&u.openMobile&&(b.preventDefault(),ot(i))};document.addEventListener("keydown",m),Ss(i,u),c&&c.addEventListener("click",()=>{ot(i)});let p=t.querySelector("[data-part=\'rail\']");p&&p.addEventListener("click",()=>{Ee(i)})}function Ss(i,t){i.querySelectorAll("[data-part=\'sidebar-trigger\']").forEach(e=>{e.addEventListener("click",()=>{Ee(i)})})}function Ee(i){let t=Pt.get(i);t&&(t.isMobile?t.openMobile?ot(i):Cs(i):(t.open=!t.open,_i(t),As(Ni,String(t.open))))}function _i(i){let t=i.open?"expanded":"collapsed";i.provider.setAttribute("data-state",t),i.sidebar.setAttribute("data-state",t),i.desktopSidebar&&(i.desktopSidebar.setAttribute("data-state",t),i.open?i.desktopSidebar.setAttribute("data-collapsible",""):i.desktopSidebar.setAttribute("data-collapsible",i.collapsible))}function Cs(i){var n;let t=Pt.get(i);if(!t||t.openMobile||!t.mobileSidebar)return;t.openMobile=!0;let e=(n=t.desktopSidebar)==null?void 0:n.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),at.activate(),requestAnimationFrame(()=>{var o;let s=(o=t.mobileSidebar)==null?void 0:o.querySelector(\'a, button, [tabindex]:not([tabindex="-1"])\');s==null||s.focus()})}function ot(i){var s;let t=Pt.get(i);if(!t||!t.openMobile||!t.mobileSidebar)return;t.openMobile=!1;let e=(s=t.desktopSidebar)==null?void 0:s.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),at.deactivate();let n=t.provider.querySelector("[data-part=\'sidebar-trigger\']");n==null||n.focus()}function xe(){document.querySelectorAll("[data-component=\'sidebar-provider\']").forEach(i=>{Ae(i)})}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",xe):xe();document.addEventListener("astro:page-load",xe);var Qt={docs:"docs.js",shard:i=>`t-${i}.js`,fragment:i=>`f-${i}.js`},Jt={docs:"docs",shard:i=>i,fragment:i=>`frag:${i}`};var Ls={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"},ks={icate:"ic",ative:"",alize:"al",iciti:"ic",ical:"ic",ful:"",ness:""},Ts="[^aeiou]",Ce="[aeiouy]",rt="("+Ts+"[^aeiouy]*)",ee="("+Ce+"[aeiou]*)",Se=new RegExp("^"+rt+"?"+ee+rt),Os=new RegExp("^"+rt+"?"+ee+rt+ee+"?$"),te=new RegExp("^"+rt+"?("+ee+rt+"){2,}"),Pi=new RegExp("^"+rt+"?"+Ce),Fi=new RegExp("^"+rt+Ce+"[^aeiouwxy]$"),Ds=/ll$/,Rs=/^(.+?)e$/,Is=/^(.+?)y$/,Ms=/^(.+?(s|t))(ion)$/,Hs=/^(.+?)(ed|ing)$/,zs=/(at|bl|iz)$/,Ns=/^(.+?)eed$/,_s=/^.+?[^s]s$/,Ps=/^.+?(ss|i)es$/,Fs=/([^aeiouylsz])\\1$/,$s=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,Bs=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,qs=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/;function $i(i){let t=String(i).toLowerCase();if(t.length<3)return t;let e=!1;t.codePointAt(0)===121&&(e=!0,t="Y"+t.slice(1)),Ps.test(t)?t=t.slice(0,-2):_s.test(t)&&(t=t.slice(0,-1));let n;return(n=Ns.exec(t))?Se.test(n[1])&&(t=t.slice(0,-1)):(n=Hs.exec(t))&&Pi.test(n[1])&&(t=n[1],zs.test(t)?t+="e":Fs.test(t)?t=t.slice(0,-1):Fi.test(t)&&(t+="e")),(n=Is.exec(t))&&Pi.test(n[1])&&(t=n[1]+"i"),(n=$s.exec(t))&&Se.test(n[1])&&(t=n[1]+Ls[n[2]]),(n=Bs.exec(t))&&Se.test(n[1])&&(t=n[1]+ks[n[2]]),(n=qs.exec(t))?te.test(n[1])&&(t=n[1]):(n=Ms.exec(t))&&te.test(n[1])&&(t=n[1]),(n=Rs.exec(t))&&(te.test(n[1])||Os.test(n[1])&&!Fi.test(n[1]))&&(t=n[1]),Ds.test(t)&&te.test(t)&&(t=t.slice(0,-1)),e&&(t="y"+t.slice(1)),t}var Bi=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(" ")),Ks=/[\\p{Script=Han}\\p{Script=Hiragana}\\p{Script=Katakana}\\p{Script=Hangul}]/u,Ft;function Ws(i){if(Ft===void 0)try{Ft=typeof Intl<"u"&&"Segmenter"in Intl?new Intl.Segmenter(void 0,{granularity:"word"}):null}catch{Ft=null}if(Ft)return[...Ft.segment(i)].filter(n=>n.isWordLike).map(n=>n.segment);let t=[...i];if(t.length<2)return t;let e=[];for(let n=0;n<t.length-1;n++)e.push(t[n]+t[n+1]);return e}function mt(i){let t=[];for(let e of i.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 n=e[0],s=n.split(/[._-]+/).filter(Boolean);if(s.length>1&&t.push(n),s.length>1&&!/[._]/.test(n)){let o=s.join("");o.length>=3&&!Bi.has(o)&&t.push(o)}for(let o of s)Ks.test(o)?t.push(...Ws(o)):o.length>=2&&!Bi.has(o)&&t.push(o)}return t}function Le(i,t){let e="";for(let n of i.slice(0,t))e+=/[a-z0-9]/.test(n)?n:`_${n.codePointAt(0).toString(16)}_`;return e}function $t(i){if(!(!i||!/^en(-|$)/i.test(i)))return t=>/^[a-z]{3,}$/.test(t)?$i(t):t}function Lt(i){let t=[],e=[],n=[],s=!1,o={tag:[],section:[]},r={tag:[],section:[]},a=[...i.matchAll(new RegExp(\'(?<!\\\\S)(-?)(tag|section):(?:"([^"]*)"?|(\\\\S*))|(-?)"([^"]*)"?|(\\\\S+)\',"gi"))].map(u=>{var f;return{facetNeg:u[1]==="-",facet:(f=u[2])==null?void 0:f.toLowerCase(),value:u[3]??u[4],neg:u[5],phrase:u[6],word:u[7]}}),l=!1,c=!1;for(let[u,f]of a.entries()){if(f.facet){let H=Yi(f.value??"");H&&(f.facetNeg?r:o)[f.facet].push(H);continue}let m=f.word;if(m==="OR"){c=t.length>0,s=!0;continue}if(m==="NOT"){l=!0,s=!0;continue}if(m==="AND"){s=!0;continue}let p=f.phrase!==void 0,b=l||f.neg==="-"||(m==null?void 0:m.startsWith("-"))&&m.length>1;l=!1;let g=p?f.phrase:b&&(m!=null&&m.startsWith("-"))?m.slice(1):m,y=[...new Set(mt(g))];if(!y.length){c=!1;continue}if(b){e.push(p?y:[y[0]]),s=!0,c=!1;continue}if(p){c=!1,s=!0,y.length>1&&n.push(mt(g).join(" "));for(let H of y)t.push({terms:[H],prefix:!1,exact:!0});continue}let w=u===a.length-1&&!/\\s$/.test(i);if(c){t[t.length-1].terms.push(y[0]);for(let H of y.slice(1))t.push({terms:[H],prefix:!1});c=!1;continue}let L=y[0],R=/[._-]/.test(L),M=L.replace(/-/g,"");for(let[H,O]of y.entries())t.push({terms:[O],prefix:w&&O.length>=2&&(H===y.length-1||R&&(O===L||O===M))})}let d=[...new Set(t.flatMap(u=>u.terms))];return{groups:t,not:e,phrases:n,strict:s,highlight:d,filters:o,notFilters:r}}async function js(i,t){let e=await t.meta(),n=typeof i=="string"?Lt(i):i,s=new Set;for(let c of n.not){let d;for(let u of c){let[f]=Vi(u,e),m=f?await t.shard(f):void 0,p=m&&Object.hasOwn(m,u)?m[u]:[],b=new Set;for(let g=0;g<p.length;g+=2)(!d||d.has(p[g]))&&b.add(p[g]);d=b}for(let u of d??[])s.add(u)}let o=Us(n,e);if(!n.groups.length){if(!o)return[];let c=[];return e.docs.forEach(([d,u,f],m)=>o(m)&&!s.has(m)&&c.push({id:m,title:d,url:u,section:e.sections[f]??"",score:1})),c}let r=[];for(let c of n.groups)r.push(await Xs(c,e,t));let a=c=>{let d=new Map,u=new Map;for(let m of r)for(let[p,b]of m)d.set(p,(d.get(p)??0)+b),u.set(p,(u.get(p)??0)+1);let f=[];for(let[m,p]of d){if(s.has(m)||o&&!o(m)||c==="and"&&u.get(m)!==r.length)continue;let[b,g,y]=e.docs[m];f.push({id:m,title:b,url:g,section:e.sections[y]??"",score:p*(u.get(m)/r.length)})}return f.sort((m,p)=>p.score-m.score)},l=a("and");return l.length||n.strict?l:a("or")}var Z={prefix:.6,stem:.4,titleAll:1.5,titleExact:2,headingAll:1.4,headingExact:1.8,phrase:1.5,typo:.3};function Vs(i,t){if(i===t)return!1;if(i.length===t.length){let o=[];for(let r=0;r<i.length&&o.length<=2;r++)i[r]!==t[r]&&o.push(r);return o.length===1?!0:o.length===2&&o[1]===o[0]+1&&i[o[0]]===t[o[1]]&&i[o[1]]===t[o[0]]}let[e,n]=i.length<t.length?[i,t]:[t,i];if(n.length-e.length!==1)return!1;let s=0;for(;s<e.length&&e[s]===n[s];)s++;return e.slice(s)===n.slice(s+1)}function Vi(i,t,e=!1){let n=Ys(t);for(let o=Math.min(i.length,Ki);o>=1;o--){let r=Le(i,o);if(n.has(r))return!e||o<i.length?[r]:[r,...t.shards.filter(a=>a.length>r.length&&a.startsWith(r)).slice(0,10)]}let s=Le(i,Math.min(i.length,Ki));return e?t.shards.filter(o=>o.startsWith(s)).slice(0,10):[]}var Ki=3,Wi=new WeakMap;function Ys(i){let t=Wi.get(i);return t||Wi.set(i,t=new Set(i.shards)),t}function Yi(i){return i.replace(/"/g,"").trim().toLowerCase()}function Us(i,t){let{tag:e,section:n}=i.filters,s=i.notFilters??{tag:[],section:[]};if(!e.length&&!n.length&&!s.tag.length&&!s.section.length)return;let o=(d,u)=>new Set(d.flatMap((f,m)=>u.includes(Yi(f))?[m]:[])),r=o(t.sections,n),a=o(t.tags??[],e),l=o(t.sections,s.section),c=o(t.tags??[],s.tag);return d=>{let u=t.docs[d],f=u[3]??[];return!(n.length&&!r.has(u[2])||e.length&&!f.some(m=>a.has(m))||l.has(u[2])||f.some(m=>c.has(m)))}}async function Xs(i,t,e){i.corrected=void 0;let n=$t(t.lang),s=new Map,o=new Map;for(let d of i.terms)for(let u of Vi(d,t,i.prefix)){let f=await e.shard(u);if(!f)continue;let m=(y,w)=>{w>(s.get(y)??0)&&(s.set(y,w),o.set(y,f))};Object.hasOwn(f,d)&&m(d,1);let p=n==null?void 0:n(d),b=p?p.slice(0,Math.max(3,p.length-1)):void 0,g=0;for(let y in f)y!==d&&(i.prefix&&y.startsWith(d)&&g++<200&&m(y,Z.prefix),p&&b&&y.startsWith(b)&&n(y)===p&&m(y,Z.stem));if(!s.size&&!i.exact&&d.length>=4&&!/[._-]/.test(d))for(let y in f)Math.abs(y.length-d.length)<=1&&Vs(d,y)&&m(y,Z.typo)}[...s.values()].some(d=>d===Z.typo)&&(i.corrected=[...s].filter(([,d])=>d===Z.typo).map(([d])=>d));let r=[...s].map(([d,u])=>[o.get(d)[d],u]),a=new Set;for(let[d]of r)for(let u=0;u<d.length;u+=2)a.add(d[u]);let l=Math.log(1+(t.count-a.size+.5)/(a.size+.5)),c=new Map;for(let[d,u]of r)for(let f=0;f<d.length;f+=2)c.set(d[f],Math.max(c.get(d[f])??0,d[f+1]*u*l));return c}async function Ui(i,t){var o;let e=await t.meta(),n=[...new Set(i.map(r=>Math.floor(r.id/e.block)))],s=new Map;await Promise.all(n.map(async r=>s.set(r,await t.fragment(r))));for(let r of i)r.fragment??(r.fragment=(o=s.get(Math.floor(r.id/e.block)))==null?void 0:o[r.id%e.block])}async function Gs(i,t,e,n=10){let s=t.slice(0,n);await Ui(s,e);let o=i.groups,r=$t((await e.meta()).lang),a=(l,c)=>c.terms.some(d=>l===d||c.prefix&&l.startsWith(d)||r!==void 0&&r(l)===r(d))||(c.corrected??[]).includes(l);for(let l of s){let[c,d]=l.fragment??["",[]],u=mt(l.title),f=1;o.length&&o.every(p=>u.some(b=>a(b,p)))&&(f=ji(u,o,a)?Z.titleExact:Z.titleAll);let m=[];for(let[p,b]of d){let g=mt(p);!o.length||!o.every(y=>g.some(w=>a(w,y)))||(m.push([p,b]),f=Math.max(f,ji(g,o,a)?Z.headingExact:Z.headingAll))}if(l.sections=m.slice(0,3),i.phrases.length){let p=[l.title,c,...d.map(([b])=>b)].map(b=>mt(b).join(" ")).join(" \\0 ");i.phrases.every(b=>p.includes(b))&&(f*=Z.phrase)}l.score*=f}return s.sort((l,c)=>c.score-l.score),[...s,...t.slice(n)]}async function Xi(i,t,e){await Ui(t,e);let n=$t((await e.meta()).lang),s=(o,r)=>r.terms.some(a=>o===a||r.prefix&&o.startsWith(a)||n!==void 0&&n(o)===n(a))||(r.corrected??[]).includes(o);for(let o of t)!o.fragment||o.sections||(o.sections=o.fragment[1].filter(([r])=>{let a=mt(r);return i.groups.length>0&&i.groups.every(l=>a.some(c=>s(c,l)))}).slice(0,3))}function ji(i,t,e){return i.every(n=>t.some(s=>e(n,s)))&&t.every(n=>i.some(s=>e(s,n)))}async function Gi(i,t,e=10){let n=Lt(i),s=$t((await t.meta()).lang);s&&(n.highlight=[...new Set([...n.highlight,...n.highlight.map(s).filter(r=>r.length>=3)])]);let o=await js(n,t);return n.highlight=[...new Set([...n.highlight,...n.groups.flatMap(r=>r.corrected??[])])],{parsed:n,results:await Gs(n,o,t,e)}}function Zi(i,t,e=globalThis){let n=new Map,s=e.__DOGSBAY_SEARCH__??{q:[],load(){}};for(let[l,c]of s.q)n.set(l,c);s.q=[],s.load=(l,c)=>void n.set(l,c),e.__DOGSBAY_SEARCH__=s;let o=async(l,c)=>(n.has(l)||await t(i+c),n.get(l)),r,a={meta:()=>r??(r=o(Jt.docs,Qt.docs).then(l=>{if(!l||l.format!==4)throw new Error(`search index format ${(l==null?void 0:l.format)??"missing"}, expected ${4}: rebuild the site`);return l})),shard:async l=>(await a.meta()).shards.includes(l)?o(Jt.shard(l),Qt.shard(l)):void 0,fragment:l=>o(Jt.fragment(l),Qt.fragment(l))};return a}function Qi(i){let t,e=new URL(i||"./",location.href).pathname;return async n=>{t??(t=import(new URL(`${i}pagefind/pagefind.js`,location.href).href).catch(d=>{throw t=void 0,d}));let s=n.replace(new RegExp(\'(?<!\\\\S)-?(tag|section):("[^"]*"?|\\\\S*)\',"gi")," ").trim(),o=s?await(await t).search(s):null,r=(o==null?void 0:o.results)??[],a=async(d,u)=>{let f=await d.data(),m=f.url.startsWith(e)?f.url.slice(e.length):f.url.replace(/^\\/+/,""),p=(f.sub_results??[]).map(b=>[b.title,b.url.split("#")[1]??""]).filter(([,b])=>b);return{id:u,title:f.meta.title??m,url:m,section:"",score:r.length-u,fragment:[Zs(f.excerpt),p],sections:p.slice(0,3)}},l=await Promise.all(r.slice(0,10).map(a)),c=Promise.all(r.slice(10,30).map((d,u)=>a(d,u+10)));return c.catch(()=>{}),{results:l,more:c,total:r.length,highlight:Lt(n).highlight}}}function Zs(i){return new DOMParser().parseFromString(i,"text/html").body.textContent??""}function Ji(i){let{signal:t}=i,e=document.getElementById("db-search");if(!e)return;let n=e.querySelector("[data-db-search-input]"),s=e.querySelector("[data-part=\'listbox\']"),o=e.querySelector("[data-db-search-status]"),r=o.textContent??"",a=Zi(`${i.unitRoot}_dogsbay/search/`,i.loadScript,window),l=document.body.dataset.search??"builtin",c=location.protocol!=="file:",d=l==="pagefind"||l==="both"&&c?Qi(i.unitRoot):void 0,u=l==="pagefind"&&!c;e.addEventListener("db-dialog:open",()=>{n.focus(),n.select(),u?o.textContent=s.dataset.needsServer??"":d||a.meta().catch(()=>o.textContent="Search index could not be loaded.")},{signal:t}),document.addEventListener("keydown",S=>{let x=S.target.closest("input, textarea, select, [contenteditable]");(S.key==="/"&&!x||S.key.toLowerCase()==="k"&&(S.metaKey||S.ctrlKey))&&(S.preventDefault(),e.open?n.focus():e.show())},{signal:t}),s.addEventListener("click",S=>{S.target.closest("a")&&e.close("api")},{signal:t});let f=0,m,p;n.addEventListener("input",()=>{clearTimeout(p),p=setTimeout(()=>void y(++f),80)},{signal:t});let b=new Map,g=typeof IntersectionObserver=="function"?new IntersectionObserver(S=>{var x;for(let E of S)E.isIntersecting&&((x=b.get(E.target))==null||x(),b.delete(E.target),g.unobserve(E.target))}):void 0,y=async S=>{let x=n.value.trim();if(!x){g==null||g.disconnect(),b.clear(),w.hidden=!0,s.replaceChildren(),o.textContent=r;return}if(!u)try{if(d){let E=await d(x);if(S!==f)return;O(x,E.results,E.highlight,E.total);let C=await E.more;S===f&&C.length&&v(x,C,E.highlight)}else{let E=await Gi(x,a);if(S!==f)return;m=E.parsed,O(x,E.results.slice(0,30),E.parsed.highlight,E.results.length,E.results)}}catch{S===f&&(o.textContent="Search index could not be loaded.")}},w=document.createElement("div");w.setAttribute("role","group"),w.setAttribute("aria-label",s.dataset.filterSection??"Filter by section"),w.className="flex flex-wrap gap-1 px-3 pb-2",w.hidden=!0,s.before(w),t==null||t.addEventListener("abort",()=>{clearTimeout(p),f++,g==null||g.disconnect(),b.clear(),w.remove()});let L=S=>S.replace(/"/g,""),R=S=>`section:"${L(S)}"`,M,H=(S,x)=>{let E=new Map;for(let k of x)k.section&&E.set(k.section,(E.get(k.section)??0)+1);let C=[...S.matchAll(/section:"([^"]*)"/gi)].map(k=>k[1].toLowerCase()),T=k=>C.includes(L(k).toLowerCase()),A=[...E].sort((k,D)=>D[1]-k[1]).slice(0,6).map(([k])=>k);for(let k of C)A.some(D=>L(D).toLowerCase()===k)||A.push(k);w.replaceChildren(...A.length>1||C.length?A.map(k=>{let D=document.createElement("button");D.type="button";let _=T(k);return D.setAttribute("aria-pressed",String(_)),D.className="rounded-full border px-2.5 py-0.5 text-xs hover:bg-accent aria-pressed:bg-primary aria-pressed:text-primary-foreground",D.textContent=k,D.addEventListener("click",()=>{let P=R(k),tt=n.value.replace(new RegExp(`\\\\s*section:"${L(k).replace(/[.*+?^${}()|[\\]\\\\]/g,"\\\\$&")}"`,"i"),"").trim();n.value=_?tt:`${tt} ${P}`.trim(),M=k,n.dispatchEvent(new Event("input",{bubbles:!0}))},{signal:t}),D}):[]),w.hidden=!w.childElementCount,M!==void 0&&(([...w.querySelectorAll("button")].find(D=>D.textContent===M)??n).focus(),M=void 0)},O=(S,x,E,C,T=x)=>{g==null||g.disconnect(),b.clear(),H(S,T),s.replaceChildren(...q(S,x,E)),o.textContent=C?`${C} result${C===1?"":"s"}`:`${s.dataset.noResults} \\u201C${S}\\u201D`},v=(S,x,E)=>s.append(...q(S,x,E)),q=(S,x,E)=>{let C=[];for(let T of x){let A=I(T.url,E,"block rounded-md p-3 hover:bg-accent"),k=document.createElement("div");if(k.className="font-medium",k.append(...ke(T.title,E)),A.a.appendChild(k),T.section){let P=document.createElement("div");P.className="text-xs text-muted-foreground",P.textContent=T.section,A.a.appendChild(P)}let D=document.createElement("div");D.className="mt-1 line-clamp-2 text-xs text-muted-foreground",A.a.appendChild(D),C.push(A.li);let _=()=>T.fragment?(T.fragment[0]&&D.replaceChildren(...ke(T.fragment[0],E)),(T.sections??[]).map(([P,tt])=>{let qt=I(`${T.url}#${tt}`,E,"ml-4 block rounded-md border-l px-3 py-1.5 text-sm hover:bg-accent");return qt.a.append(...ke(P,E)),qt.li})):[];if(T.fragment)C.push(..._());else if(g){let P=m??Lt(S);b.set(A.li,()=>void Xi(P,[T],a).then(()=>A.li.after(..._()),()=>{})),g.observe(A.li)}}return C},I=(S,x,E)=>{let C=document.createElement("li");C.setAttribute("role","none"),C.className="mb-1";let T=document.createElement("a");return T.setAttribute("data-part","option"),T.dataset.value=S,T.href=Qs(i.unitRoot+S,x),T.tabIndex=-1,T.className=E,C.appendChild(T),{li:C,a:T}}}function Qs(i,t){if(!t.length)return i;let e=i.indexOf("#"),[n,s]=e<0?[i,""]:[i.slice(0,e),i.slice(e)];return`${n}${n.includes("?")?"&":"?"}h=${encodeURIComponent(t.join(" "))}${s}`}function ke(i,t){if(!t.length)return[document.createTextNode(i)];let e=new RegExp(`(${t.map(n=>n.replace(/[.*+?^${}()|[\\]\\\\]/g,"\\\\$&")).join("|")})`,"gi");return i.split(e).map((n,s)=>{if(s%2===0)return document.createTextNode(n);let o=document.createElement("mark");return o.textContent=n,o})}var tn=/[\\p{Script=Han}\\p{Script=Hiragana}\\p{Script=Katakana}\\p{Script=Hangul}]/u;function en(i){var b;let t;try{t=(new URLSearchParams(location.search).get("h")??"").split(/\\s+/).filter(g=>g.length>0)}catch{return}let e=document.querySelector("#db-content article")??document.querySelector("#db-content");if(!t.length||!e)return;let n=g=>g.replace(/[.*+?^${}()|[\\]\\\\]/g,"\\\\$&"),s=[...t].sort((g,y)=>y.length-g.length),o=s.filter(g=>tn.test(g)).map(n),r=s.filter(g=>!tn.test(g)).map(n),a=[r.length?`(?<![\\\\p{L}\\\\p{N}])(?:${r.join("|")})`:"",o.length?`(?:${o.join("|")})`:""].filter(Boolean),l=new RegExp(`(${a.join("|")})`,"giu"),c=[],d=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,{acceptNode:g=>{var y;return(y=g.parentElement)!=null&&y.closest("script, style, mark, button, [aria-hidden=\'true\']")?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}}),u=[];for(let g=d.nextNode();g;g=d.nextNode())u.push(g);for(let g of u){if(c.length>=500)break;let y=g.data;if(l.lastIndex=0,!l.test(y))continue;l.lastIndex=0;let w=document.createDocumentFragment(),L=0;for(let R of y.matchAll(l)){w.append(y.slice(L,R.index));let M=document.createElement("mark");M.className="db-search-hl",M.textContent=R[0],w.append(M),c.push(M),L=R.index+R[0].length}w.append(y.slice(L)),g.replaceWith(w)}if(Js(),!c.length)return;let f=((b=document.querySelector("[data-clear-highlights]"))==null?void 0:b.dataset.clearHighlights)??"Clear highlights",m=document.createElement("div");m.className="not-prose mb-4";let p=document.createElement("button");p.type="button",p.className="inline-flex h-8 items-center rounded-md border px-3 text-sm hover:bg-accent",p.textContent=f,p.addEventListener("click",()=>{var g;for(let y of c)y.replaceWith(document.createTextNode(y.textContent??""));e.normalize(),m.remove(),(g=document.getElementById("db-content"))==null||g.focus({preventScroll:!0})},{signal:i}),m.append(p),e.prepend(m),location.hash||c[0].scrollIntoView({block:"center"})}function Js(){try{let i=new URL(location.href);i.searchParams.delete("h"),history.replaceState(history.state,"",i.toString())}catch{}}var pt=Object.assign||function(i){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(i[n]=e[n])}return i},ie=function(t){return t.tagName==="IMG"},to=function(t){return NodeList.prototype.isPrototypeOf(t)},ne=function(t){return t&&t.nodeType===1},nn=function(t){var e=t.currentSrc||t.src;return e.substr(-4).toLowerCase()===".svg"},sn=function(t){try{return Array.isArray(t)?t.filter(ie):to(t)?[].slice.call(t).filter(ie):ne(t)?[t].filter(ie):typeof t=="string"?[].slice.call(document.querySelectorAll(t)).filter(ie):[]}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`)}},eo=function(t){var e=document.createElement("div");return e.classList.add("medium-zoom-overlay"),e.style.background=t,e},io=function(t){var e=t.getBoundingClientRect(),n=e.top,s=e.left,o=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=n+l+"px",a.style.left=s+c+"px",a.style.width=o+"px",a.style.height=r+"px",a.style.transform="",a},kt=function(t,e){var n=pt({bubbles:!1,cancelable:!1,detail:void 0},e);if(typeof window.CustomEvent=="function")return new CustomEvent(t,n);var s=document.createEvent("CustomEvent");return s.initCustomEvent(t,n.bubbles,n.cancelable,n.detail),s},no=function i(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=window.Promise||function(x){function E(){}x(E,E)},s=function(x){var E=x.target;if(E===q){p();return}L.indexOf(E)!==-1&&b({target:E})},o=function(){if(!(M||!v.original)){var x=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0;Math.abs(H-x)>O.scrollOffset&&setTimeout(p,150)}},r=function(x){var E=x.key||x.keyCode;(E==="Escape"||E==="Esc"||E===27)&&p()},a=function(){var x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},E=x;if(x.background&&(q.style.background=x.background),x.container&&x.container instanceof Object&&(E.container=pt({},O.container,x.container)),x.template){var C=ne(x.template)?x.template:document.querySelector(x.template);E.template=C}return O=pt({},O,E),L.forEach(function(T){T.dispatchEvent(kt("medium-zoom:update",{detail:{zoom:I}}))}),I},l=function(){var x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return i(pt({},O,x))},c=function(){for(var x=arguments.length,E=Array(x),C=0;C<x;C++)E[C]=arguments[C];var T=E.reduce(function(A,k){return[].concat(A,sn(k))},[]);return T.filter(function(A){return L.indexOf(A)===-1}).forEach(function(A){L.push(A),A.classList.add("medium-zoom-image")}),R.forEach(function(A){var k=A.type,D=A.listener,_=A.options;T.forEach(function(P){P.addEventListener(k,D,_)})}),I},d=function(){for(var x=arguments.length,E=Array(x),C=0;C<x;C++)E[C]=arguments[C];v.zoomed&&p();var T=E.length>0?E.reduce(function(A,k){return[].concat(A,sn(k))},[]):L;return T.forEach(function(A){A.classList.remove("medium-zoom-image"),A.dispatchEvent(kt("medium-zoom:detach",{detail:{zoom:I}}))}),L=L.filter(function(A){return T.indexOf(A)===-1}),I},u=function(x,E){var C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return L.forEach(function(T){T.addEventListener("medium-zoom:"+x,E,C)}),R.push({type:"medium-zoom:"+x,listener:E,options:C}),I},f=function(x,E){var C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return L.forEach(function(T){T.removeEventListener("medium-zoom:"+x,E,C)}),R=R.filter(function(T){return!(T.type==="medium-zoom:"+x&&T.listener.toString()===E.toString())}),I},m=function(){var x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},E=x.target,C=function(){var A={width:document.documentElement.clientWidth,height:document.documentElement.clientHeight,left:0,top:0,right:0,bottom:0},k=void 0,D=void 0;if(O.container)if(O.container instanceof Object)A=pt({},A,O.container),k=A.width-A.left-A.right-O.margin*2,D=A.height-A.top-A.bottom-O.margin*2;else{var _=ne(O.container)?O.container:document.querySelector(O.container),P=_.getBoundingClientRect(),tt=P.width,qt=P.height,ln=P.left,cn=P.top;A=pt({},A,{width:tt,height:qt,left:ln,top:cn})}k=k||A.width-O.margin*2,D=D||A.height-O.margin*2;var Ot=v.zoomedHd||v.original,dn=nn(Ot)?k:Ot.naturalWidth||k,un=nn(Ot)?D:Ot.naturalHeight||D,Kt=Ot.getBoundingClientRect(),hn=Kt.top,fn=Kt.left,re=Kt.width,ae=Kt.height,mn=Math.min(Math.max(re,dn),k)/re,pn=Math.min(Math.max(ae,un),D)/ae,le=Math.min(mn,pn),gn=(-fn+(k-re)/2+O.margin+A.left)/le,bn=(-hn+(D-ae)/2+O.margin+A.top)/le,Re="scale("+le+") translate3d("+gn+"px, "+bn+"px, 0)";v.zoomed.style.transform=Re,v.zoomedHd&&(v.zoomedHd.style.transform=Re)};return new n(function(T){if(E&&L.indexOf(E)===-1){T(I);return}var A=function tt(){M=!1,v.zoomed.removeEventListener("transitionend",tt),v.original.dispatchEvent(kt("medium-zoom:opened",{detail:{zoom:I}})),T(I)};if(v.zoomed){T(I);return}if(E)v.original=E;else if(L.length>0){var k=L;v.original=k[0]}else{T(I);return}if(v.original.dispatchEvent(kt("medium-zoom:open",{detail:{zoom:I}})),H=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,M=!0,v.zoomed=io(v.original),document.body.appendChild(q),O.template){var D=ne(O.template)?O.template:document.querySelector(O.template);v.template=document.createElement("div"),v.template.appendChild(D.content.cloneNode(!0)),document.body.appendChild(v.template)}if(v.original.parentElement&&v.original.parentElement.tagName==="PICTURE"&&v.original.currentSrc&&(v.zoomed.src=v.original.currentSrc),document.body.appendChild(v.zoomed),window.requestAnimationFrame(function(){document.body.classList.add("medium-zoom--opened")}),v.original.classList.add("medium-zoom-image--hidden"),v.zoomed.classList.add("medium-zoom-image--opened"),v.zoomed.addEventListener("click",p),v.zoomed.addEventListener("transitionend",A),v.original.getAttribute("data-zoom-src")){v.zoomedHd=v.zoomed.cloneNode(),v.zoomedHd.removeAttribute("srcset"),v.zoomedHd.removeAttribute("sizes"),v.zoomedHd.removeAttribute("loading"),v.zoomedHd.src=v.zoomed.getAttribute("data-zoom-src"),v.zoomedHd.onerror=function(){clearInterval(_),console.warn("Unable to reach the zoom image target "+v.zoomedHd.src),v.zoomedHd=null,C()};var _=setInterval(function(){v.zoomedHd.complete&&(clearInterval(_),v.zoomedHd.classList.add("medium-zoom-image--opened"),v.zoomedHd.addEventListener("click",p),document.body.appendChild(v.zoomedHd),C())},10)}else if(v.original.hasAttribute("srcset")){v.zoomedHd=v.zoomed.cloneNode(),v.zoomedHd.removeAttribute("sizes"),v.zoomedHd.removeAttribute("loading");var P=v.zoomedHd.addEventListener("load",function(){v.zoomedHd.removeEventListener("load",P),v.zoomedHd.classList.add("medium-zoom-image--opened"),v.zoomedHd.addEventListener("click",p),document.body.appendChild(v.zoomedHd),C()})}else C()})},p=function(){return new n(function(x){if(M||!v.original){x(I);return}var E=function C(){v.original.classList.remove("medium-zoom-image--hidden"),document.body.removeChild(v.zoomed),v.zoomedHd&&document.body.removeChild(v.zoomedHd),document.body.removeChild(q),v.zoomed.classList.remove("medium-zoom-image--opened"),v.template&&document.body.removeChild(v.template),M=!1,v.zoomed.removeEventListener("transitionend",C),v.original.dispatchEvent(kt("medium-zoom:closed",{detail:{zoom:I}})),v.original=null,v.zoomed=null,v.zoomedHd=null,v.template=null,x(I)};M=!0,document.body.classList.remove("medium-zoom--opened"),v.zoomed.style.transform="",v.zoomedHd&&(v.zoomedHd.style.transform=""),v.template&&(v.template.style.transition="opacity 150ms",v.template.style.opacity=0),v.original.dispatchEvent(kt("medium-zoom:close",{detail:{zoom:I}})),v.zoomed.addEventListener("transitionend",E)})},b=function(){var x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},E=x.target;return v.original?p():m({target:E})},g=function(){return O},y=function(){return L},w=function(){return v.original},L=[],R=[],M=!1,H=0,O=e,v={original:null,zoomed:null,zoomedHd:null,template:null};Object.prototype.toString.call(t)==="[object Object]"?O=t:(t||typeof t=="string")&&c(t),O=pt({margin:0,background:"#fff",scrollOffset:40,container:null,template:null},O);var q=eo(O.background);document.addEventListener("click",s),document.addEventListener("keyup",r),document.addEventListener("scroll",o),window.addEventListener("resize",p);var I={open:m,close:p,toggle:b,update:a,clone:l,attach:c,detach:d,on:u,off:f,getOptions:g,getImages:y,getZoomedImage:w};return I};function so(i,t){t===void 0&&(t={});var e=t.insertAt;if(!(!i||typeof document>"u")){var n=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.type="text/css",e==="top"&&n.firstChild?n.insertBefore(s,n.firstChild):n.appendChild(s),s.styleSheet?s.styleSheet.cssText=i:s.appendChild(document.createTextNode(i))}}var oo=".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}";so(oo);var on=no;var ro;function rn(i){let t=document.body.dataset.imageZoom;if(!t)return;let e;try{e=JSON.parse(t)}catch{return}let n=[...document.querySelectorAll(\'img[data-zoomable="true"]\')];if(!n.length)return;let s=ro??(ro=on());s.update(e),s.attach(...n),i==null||i.addEventListener("abort",()=>{s.close(),s.detach(...n)});let o={signal:i},r=!1,a=l=>l.key==="Enter"||l.key===" ";for(let l of n)l.alt&&(l.tabIndex=0,l.addEventListener("keydown",c=>{a(c)&&(c.preventDefault(),r=!0,s.open({target:l}))},o),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(),s.close())}),c.focus())},o),l.addEventListener("medium-zoom:closed",()=>{r&&l.focus(),r=!1},o))}function Te(i){return!/^[\\x00-\\x20]*([a-z][a-z0-9+.-]*:|[\\\\/])/i.test(i.replace(/[\\t\\n\\r]/g,""))}var Oe=new Map;function an(i){let t=Oe.get(i);return t||(t=new Promise((e,n)=>{let s=document.createElement("script");s.src=i,s.onload=()=>e(),s.onerror=()=>{Oe.delete(i),n(new Error(`could not load ${i}`))},document.head.appendChild(s)}),Oe.set(i,t)),t}function ao(i){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 n=!document.documentElement.classList.contains("dark");document.documentElement.classList.toggle("dark",n);try{localStorage.setItem("theme",n?"dark":"light")}catch{}e()},{signal:i})})}function lo(i){document.addEventListener("click",async t=>{var s,o,r,a;let e=t.target.closest("[data-copy-markdown]");if(!e)return;let n=(((s=document.getElementById("db-page-markdown"))==null?void 0:s.textContent)??"").replace(/<\\\\\\/(script)/gi,"</$1").replace(/<\\\\!--/g,"<!--");try{await navigator.clipboard.writeText(n);let l=(o=e.dataset).label??(o.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:i})}function co(i,t){let e=document.body.dataset.page??"index.html";document.querySelectorAll("select[data-db-switch]").forEach(n=>{n.addEventListener("change",async()=>{var a;let s=n.selectedOptions[0],o=(s==null?void 0:s.dataset.prefix)??"",r=n.value;if(!(!Te(r)||!Te(o)))try{let l=o?`${i}${o}/`:i;await an(`${l}_dogsbay/pages.js`);let c=(a=window.__DOGSBAY_PAGES__)==null?void 0:a[o];location.href=c&&!c.includes(e)?`${l}index.html`:r}catch{location.href=r}},{signal:t})})}function uo(i){document.addEventListener("click",t=>{var n;let e=t.target.closest("a.db-anchor");!e||location.protocol==="file:"||(n=navigator.clipboard)==null||n.writeText(e.href).catch(()=>{})},{signal:i})}var Bt=new Map,oe=new Set;function se(){for(let[i,t]of Bt)i.isConnected||(ot(i),t.abort(),Bt.delete(i));for(let i of oe)i.isConnected||ot(i)}function ho(i,t){let e=EventTarget.prototype,n=e.addEventListener,s=0;e.addEventListener=function(o,r,a){s++;let l=typeof a=="object"?a.signal:void 0;n.call(this,o,r,typeof a=="object"?{...a,signal:l?AbortSignal.any([l,i]):i}:{capture:a===!0,signal:i})};try{t()}finally{e.addEventListener=n}return s}function fo(){se(),document.querySelectorAll("[data-component=\'sidebar-provider\']").forEach(i=>{if(Bt.has(i)||oe.has(i))return;let t=new AbortController;ho(t.signal,()=>Ae(i))?Bt.set(i,t):i.querySelector("[data-component=\'sidebar\']")&&oe.add(i)}),document.removeEventListener("keydown",se),document.addEventListener("keydown",se)}var Tt;function De(i={}){Tt==null||Tt.unmount();let t=new AbortController,{signal:e}=t,n=document.body,s=n.dataset.unitRoot??"",o=n.dataset.siteRoot??"";i.nav!==void 0&&(window.__DOGSBAY_NAV__=i.nav),fo(),i.theme!==!1&&ao(e),lo(e),i.switchers!==!1&&co(o,e),uo(e),i.search!==!1&&Ji({unitRoot:s,loadScript:an,signal:e}),en(e),rn(e);let r={unmount(){if(!e.aborted){t.abort();for(let a of[...Bt.keys(),...oe])ot(a);se(),Tt===r&&(Tt=void 0)}}};return Tt=r}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>De()):De();})();\n';
|
|
1289
|
-
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 }}">\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{% 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 }}{{ h1 }}{{ byline }}{{ lede }}{{ hero }}{{ metaStrip }}\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 }}">\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{% 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 }}{{ 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/blog-index.html": '{#- A blog index page (BlogIndex.astro): post cards, newest first, and links between index pages. Context: blog = {heading, posts: [{title, href, description, authors, date, datetime, minutes, hero}], newer, older (links or empty), pageLabel}, t. -#}\n<h1 class="text-3xl font-bold tracking-tight mb-8">{{ blog.heading }}</h1>\n{%- if not blog.posts %}\n<p class="text-muted-foreground">{{ t("noPosts") }}</p>\n{%- endif %}\n<ul class="not-prose grid list-none grid-cols-1 items-stretch gap-6 p-0 sm:grid-cols-2 lg:grid-cols-3" data-blog-index>\n{%- for post in blog.posts %}\n<li class="m-0 p-0"><a href="{{ post.href }}" class="group block h-full rounded-lg no-underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"><div class="rounded-lg border bg-card text-card-foreground shadow-sm flex h-full flex-col gap-3 p-5 transition-colors group-hover:border-ring">\n{%- if post.hero %}<img src="{{ post.hero }}" alt="" class="aspect-[16/9] w-full rounded-md border border-border object-cover" loading="lazy" decoding="async">{% endif -%}\n<h2 class="text-lg font-semibold leading-snug tracking-tight text-foreground group-hover:underline">{{ post.title }}</h2>\n<div class="flex flex-wrap items-center gap-x-2 gap-y-1 text-xs text-muted-foreground" data-pagefind-ignore>\n{%- if post.authors %}<span class="font-medium text-foreground">{{ post.authors }}</span>{% endif -%}\n{%- if post.authors and post.date %}<span aria-hidden="true">·</span>{% endif -%}\n{%- if post.date %}<time datetime="{{ post.datetime }}">{{ post.date }}</time>{% endif -%}\n{%- if post.authors or post.date %}<span aria-hidden="true">·</span>{% endif -%}\n<span>{{ post.minutes }}</span></div>\n{%- if post.description %}<p class="m-0 text-sm leading-relaxed text-muted-foreground">{{ post.description }}</p>{% endif -%}\n</div></a></li>\n{%- endfor %}\n</ul>\n{%- if blog.newer or blog.older %}\n<nav class="not-prose mt-12 flex items-center justify-between" aria-label="{{ t("blogPages") }}">\n{%- if blog.newer %}<a href="{{ blog.newer }}" class="text-sm text-foreground no-underline hover:underline" rel="prev">← {{ t("newerPosts") }}</a>{% else %}<span></span>{% endif -%}\n<span class="text-sm text-muted-foreground">{{ blog.pageLabel }}</span>\n{%- if blog.older %}<a href="{{ blog.older }}" class="text-sm text-foreground no-underline hover:underline" rel="next">{{ t("olderPosts") }} →</a>{% else %}<span></span>{% endif -%}\n</nav>\n{%- endif %}\n', "partials/breadcrumb.html": `{#- Breadcrumb trail (hidden below two items). Context: breadcrumbs = [{label, href?}], t. -#}
|
|
1346
|
+
var CLIENT_JS = '/*! dogsbay-ssg site client (Apache-2.0). Third-party notices: THIRD-PARTY-NOTICES.txt */\n"use strict";(()=>{var vn=Object.defineProperty;var yn=(i,t,e)=>t in i?vn(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e;var h=(i,t,e)=>yn(i,typeof t!="symbol"?t+"":t,e);var z=class extends HTMLElement{constructor(){super(...arguments);h(this,"_initialized",!1);h(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(){}},wn={"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"},Ie="dogsbay-elements-display";function N(){if(typeof document>"u"||document.getElementById(Ie))return;let i=Object.entries(wn).map(([e,n])=>`:where(${e}){display:${n}}`).join(""),t=document.createElement("style");t.id=Ie,t.textContent=i,document.head.prepend(t)}function En(i){return i.hasAttribute("disabled")||i.getAttribute("aria-disabled")==="true"}function gt(i,t,e){let n=t;do n+=e?-1:1;while(n>=0&&n<i.length&&En(i[n]));return n}var Dt=class{constructor(i,t,e={}){h(this,"container");h(this,"itemSelector");h(this,"opts");h(this,"keydownHandler",null);h(this,"active",!1);this.container=i,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(i,t){let{orientation:e}=this.opts;return(e==="horizontal"||e==="both")&&i===(t?"ArrowLeft":"ArrowRight")||(e==="vertical"||e==="both")&&i==="ArrowDown"}isBackwardKey(i,t){let{orientation:e}=this.opts;return(e==="horizontal"||e==="both")&&i===(t?"ArrowRight":"ArrowLeft")||(e==="vertical"||e==="both")&&i==="ArrowUp"}activate(){this.active||(this.active=!0,this.keydownHandler=i=>{let t=this.getItems();if(t.length===0||i.ctrlKey||i.altKey||i.metaKey)return;let e=getComputedStyle(this.container).direction==="rtl",n=t.indexOf(document.activeElement);if(n===-1)return;let s=null;this.isForwardKey(i.key,e)?(s=gt(t,n,!1),s>=t.length&&(s=this.opts.loop?gt(t,-1,!1):n)):this.isBackwardKey(i.key,e)?(s=gt(t,n,!0),s<0&&(s=this.opts.loop?gt(t,t.length,!0):n)):this.opts.homeEnd&&i.key==="Home"?s=gt(t,-1,!1):this.opts.homeEnd&&i.key==="End"&&(s=gt(t,t.length,!0)),s!==null&&(s<0||s>=t.length||s!==n&&(i.preventDefault(),t[n].setAttribute("tabindex","-1"),t[s].setAttribute("tabindex","0"),t[s].focus(),this.opts.onHighlightedIndexChange(s)))},this.container.addEventListener("keydown",this.keydownHandler))}deactivate(){this.active&&(this.active=!1,this.keydownHandler&&(this.container.removeEventListener("keydown",this.keydownHandler),this.keydownHandler=null))}setActiveIndex(i,t){i.forEach((e,n)=>{e.setAttribute("tabindex",n===t?"0":"-1")})}isActive(){return this.active}};var xn=0;function Me(i){return`${i}-${++xn}`}var He=class extends z{constructor(){super(...arguments);h(this,"list");h(this,"triggers",[]);h(this,"panels",[]);h(this,"nav",null);h(this,"value","");h(this,"syncKey",null);h(this,"orientation","horizontal");h(this,"handleClick",t=>{let e=t.target.closest("[data-part=\'trigger\']");if(!e||e.hasAttribute("disabled"))return;let n=e.dataset.value;n&&this.select(n)});h(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)});h(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 o;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||Me("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||Me("db-tabpanel");c.id=d,r.setAttribute("aria-controls",d),c.setAttribute("aria-labelledby",l)}}),this.nav=new Dt(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 n=this.getAttribute("default-value")||((o=this.triggers[0])==null?void 0:o.dataset.value)||"";if(this.syncKey){let r=localStorage.getItem(`db-tabs-sync:${this.syncKey}`);r&&this.triggers.some(a=>a.dataset.value===r)&&(n=r)}let s=window.location.hash.slice(1);s&&this.triggers.some(r=>r.dataset.value===s)&&(n=s),this.select(n)}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 n=e.dataset.value===t;e.setAttribute("aria-selected",String(n)),e.setAttribute("tabindex",n?"0":"-1"),n?e.setAttribute("data-state","active"):e.removeAttribute("data-state")}),this.panels.forEach(e=>{let n=e.dataset.value===t;e.hidden=!n,n?(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})))}};N();customElements.get("db-tabs")||customElements.define("db-tabs",He);var An=0;function Sn(i){return`${i}-${++An}`}var ze=class{constructor(i,t,e={}){h(this,"trigger");h(this,"content");h(this,"_open",!1);h(this,"opts");this.trigger=i,this.content=t,this.opts=e;let n=Sn("base-collapsible");i.id||(i.id=`${n}-trigger`),t.id||(t.id=`${n}-content`),i.setAttribute("aria-controls",t.id),t.setAttribute("aria-labelledby",i.id),t.setAttribute("role","region"),i.setAttribute("aria-expanded","false"),i.addEventListener("click",()=>{i.hasAttribute("disabled")||i.getAttribute("aria-disabled")==="true"||this.toggle()})}get isOpen(){return this._open}toggle(){this._open?this.collapse():this.expand()}expand(){var i,t;this._open||(this._open=!0,this.trigger.setAttribute("aria-expanded","true"),this.content.hidden=!1,this.content.setAttribute("data-state","open"),(t=(i=this.opts).onToggle)==null||t.call(i,!0))}collapse(){var i,t;this._open&&(this._open=!1,this.trigger.setAttribute("aria-expanded","false"),this.content.hidden=!0,this.content.removeAttribute("data-state"),(t=(i=this.opts).onToggle)==null||t.call(i,!1))}};var Ne=class extends z{constructor(){super(...arguments);h(this,"items",[]);h(this,"nav",null);h(this,"openValues",new Set);h(this,"type","single")}setup(){this.type=this.getAttribute("type")||"single";let t=this.getAttribute("default-value")||"",e=t?t.split(","):[],n=Array.from(this.querySelectorAll("[data-part=\'item\']"));this.items=n.map(s=>{let o=s.querySelector("[data-part=\'trigger\']"),r=s.querySelector("[data-part=\'content\']");if(!o||!r)return null;let a=s.dataset.value||"",l=s.hasAttribute("data-disabled");l&&(o.setAttribute("disabled",""),o.setAttribute("aria-disabled","true"));let c=new ze(o,r,{onToggle:d=>{d?this.onItemExpanded(a):this.onItemCollapsed(a)}});return{el:s,value:a,collapsible:c,disabled:l}}).filter(Boolean),this.nav=new Dt(this,"[data-part=\'trigger\']",{orientation:"vertical",loop:!0,homeEnd:!0}),this.nav.activate(),this.items.forEach((s,o)=>{s.collapsible.trigger.setAttribute("tabindex",o===0?"0":"-1")}),e.forEach(s=>{let o=this.items.find(r=>r.value===s&&!r.disabled);o&&o.collapsible.expand()})}onItemExpanded(t){if(this.type==="single"){for(let n of this.openValues)if(n!==t){let s=this.items.find(o=>o.value===n);s&&s.collapsible.collapse()}}this.openValues.add(t);let e=this.items.find(n=>n.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(n=>n.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}))}};N();customElements.get("db-accordion")||customElements.define("db-accordion",Ne);var Cn=0;function F(i){return`${i}-${++Cn}`}function et(i,t){let e=i.localName;return Array.from(i.querySelectorAll(t)).filter(n=>n.closest(e)===i)}function $(i,t){return et(i,t)[0]??null}function bt(i){if(!i||!i.hasAttribute("data-as-child"))return i;let t=i.firstElementChild;if(!t)return i;let e=i.getAttribute("data-part");return e&&t.setAttribute("data-part",e),t}function W(i){return i.hasAttribute("disabled")||i.getAttribute("aria-disabled")==="true"||i.getAttribute("data-disabled")==="true"}function _e(){return typeof HTMLElement<"u"&&typeof HTMLElement.prototype.showPopover=="function"}function vt(i){if(i.hidden=!1,!_e())return"inline";i.hasAttribute("popover")||i.setAttribute("popover","manual"),i.style.inset="auto",i.style.margin="0";try{i.matches(":popover-open")||i.showPopover()}catch{return"inline"}return"top-layer"}function yt(i){if(_e())try{i.matches(":popover-open")&&i.hidePopover()}catch{}i.hidden=!0}var Ln=\'a[href], button:not([disabled]), input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"]), [contenteditable="true"]\';function Pe(i){return Array.from(i.querySelectorAll(Ln)).filter(t=>!t.closest("[hidden]")&&!W(t))}function Fe(i,t){let e=typeof i.getAnimations=="function"?i.getAnimations():[];if(!e.length)return t();Promise.all(e.map(n=>n.finished)).then(t,t)}function wt(i){try{return decodeURIComponent(i)}catch{return i}}var Be=class extends z{constructor(){super(...arguments);h(this,"details",null);h(this,"summary",null);h(this,"dialog",null);h(this,"body",null);h(this,"source",null);h(this,"moved",[]);h(this,"handledHash",null);h(this,"onSummaryClick",t=>{var n,s;let e=t.target;e&&e!==this.summary&&((s=(n=e.closest)==null?void 0:n.call(e,"a[href], button, input, select, textarea, label"))==null?void 0:s.closest("summary"))===this.summary||(t.preventDefault(),this.show())});h(this,"onDialogClick",t=>{let e=this.dialog;if(!e||t.target!==e)return;let n=e.getBoundingClientRect();!(t.clientX>=n.left&&t.clientX<=n.right&&t.clientY>=n.top&&t.clientY<=n.bottom)&&(t.clientX!==0||t.clientY!==0)&&e.close()});h(this,"onDialogClose",()=>this.restore());h(this,"onDocClick",t=>{var o,r;if(t.defaultPrevented||t.button!==0||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey)return;let e=(r=(o=t.target)==null?void 0:o.closest)==null?void 0:r.call(o,"a[href]");if(!e||!this.details||this.open||e.hasAttribute("download")||e.target&&e.target!=="_self")return;let n=new URL(e.href,location.href);if(!n.hash||n.hash!==location.hash||n.pathname!==location.pathname||n.search!==location.search)return;let s=document.getElementById(wt(n.hash.slice(1)));if(!(!s||!this.details.contains(s))){for(let a of this.details.querySelectorAll("db-details-sheet"))a.handledHash=null;this.show(s)}});h(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,n=typeof HTMLDialogElement<"u"&&typeof HTMLDialogElement.prototype.showModal=="function";if(!t||!e||!n)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,kn();let s=(((d=e.querySelector("[data-part=\'title\']"))==null?void 0:d.textContent)??e.textContent??"").trim(),o=document.createElement("dialog");o.className="db-sheet",o.id=F("db-sheet");let r=document.createElement("h2");r.className="db-sheet-title",r.id=F("db-sheet-title"),r.textContent=s,o.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",()=>o.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",o.append(l,c),this.append(o),this.dialog=o,this.body=c,e.setAttribute("aria-haspopup","dialog"),e.setAttribute("aria-controls",o.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:n,body:s}=this;if(!e||!n||!s||e.open)return;let o=Array.from(n.childNodes).filter(c=>c!==this.summary),r=o.filter(c=>c.nodeType===Node.ELEMENT_NODE),a=r.length===1&&o.every(c=>{var d;return c===r[0]||!((d=c.textContent)!=null&&d.trim())})?r[0]:null;this.source=a??n,this.moved=a?Array.from(a.childNodes):o,s.append(...this.moved),e.showModal(),this.summary.setAttribute("aria-expanded","true"),this.setAttribute("data-state","open"),t&&t!==n&&((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,n;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&&((n=(e=this.summary).checkVisibility)==null?void 0:n.call(e))!==!1&&this.summary.focus(),this.dispatchEvent(new CustomEvent("db-details-sheet:close",{bubbles:!0})))}openForHash(){let t=wt(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)}},$e="dogsbay-details-sheet";function kn(){if(document.getElementById($e))return;let i=document.createElement("style");i.id=$e,i.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(i)}N();customElements.get("db-details-sheet")||customElements.define("db-details-sheet",Be);var qe=class extends z{constructor(){super(...arguments);h(this,"copyBtn",null);h(this,"copyIcon",null);h(this,"checkIcon",null);h(this,"liveRegion",null);h(this,"resetTimeout",null);h(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 n=this.querySelector("[data-part=\'code\']");return(n==null?void 0:n.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)}};N();customElements.get("db-code-block")||customElements.define("db-code-block",qe);var Ke=class extends z{constructor(){super(...arguments);h(this,"navData",null);h(this,"onClick",t=>{let e=t.target.closest("[data-part=\'toggle\']");if(!e||e.closest("db-nav-tree")!==this)return;let n=e.closest("[data-part=\'item\']");n&&this.toggle(n)});h(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 n=this.visibleRows(),s=e.closest("[data-part=\'row\']"),o=s?n.indexOf(s):-1;if(o<0)return;let r=s.closest("[data-part=\'item\']"),a=!!this.groupOf(r),l=u=>{var f;u&&(t.preventDefault(),(f=this.primary(u))==null||f.focus())};switch(t.key){case"ArrowDown":return l(n[o+1]);case"ArrowUp":return l(n[o-1]);case"Home":return l(n[0]);case"End":return l(n[n.length-1]);case"ArrowRight":if(!a)return;t.preventDefault(),this.isOpen(r)?l(this.visibleRows()[o+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 f=u.querySelector(":scope > [data-part=\'row\']");f&&((d=this.primary(f))==null||d.focus())}return}}})}setup(){for(let t of et(this,"[data-part=\'item\']"))this.prepareItem(t)}connect(){this.addEventListener("click",this.onClick),this.addEventListener("keydown",this.onKey);for(let t of et(this,"[data-part=\'group\'][data-lazy]")){let e=t.closest("[data-part=\'item\']");e&&this.isOpen(e)&&this.fill(t)}this.hasAttribute("scroll-current")&&requestAnimationFrame(()=>this.revealCurrent())}disconnect(){this.removeEventListener("click",this.onClick),this.removeEventListener("keydown",this.onKey)}prepareItem(t){let e=this.groupOf(t),n=t.querySelector(":scope > [data-part=\'row\'] > [data-part=\'toggle\']");if(!e||!n)return;e.id||(e.id=F("db-nav-group")),n.setAttribute("aria-controls",e.id),n instanceof HTMLButtonElement&&!n.hasAttribute("type")&&(n.type="button");let s=n.getAttribute("aria-expanded")==="true"||t.getAttribute("data-state")==="open";this.apply(t,s)}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 et(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 n=this.groupOf(t);!n||this.isOpen(t)===e||(e&&n.hasAttribute("data-lazy")&&this.fill(n),this.apply(t,e),this.dispatchEvent(new CustomEvent("db-nav-tree:toggle",{detail:{item:t,open:e},bubbles:!0})))}apply(t,e){let n=this.groupOf(t),s=this.toggleOf(t);n&&(n.hidden=!e),s==null||s.setAttribute("aria-expanded",String(e)),t.setAttribute("data-state",e?"open":"closed")}revealCurrent(){var o;let t=this.querySelector("[aria-current=\'page\']");if(!t)return;for(let r=t.closest("[data-part=\'item\']");r&&this.contains(r);r=((o=r.parentElement)==null?void 0:o.closest("[data-part=\'item\']"))??null)this.groupOf(r)&&!this.groupOf(r).contains(t)||this.groupOf(r)&&this.setOpen(r,!0);let e=On(this);if(!e)return;let n=t.getBoundingClientRect(),s=e.getBoundingClientRect();(n.top<s.top||n.bottom>s.bottom)&&(e.scrollTop+=n.top-s.top-s.height/2+n.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(),n=t.dataset.path;if(!e||n==null)return;let s=e,o;for(let r of n.split(".").map(Number))o=s==null?void 0:s[r],s=o==null?void 0:o[2];o!=null&&o[2]&&(t.replaceChildren(...this.build(o[2],n)),t.removeAttribute("data-lazy"))}build(t,e){let n=this.getAttribute("base")??"",s=this.getAttribute("toggle-label")??"Toggle {label}",o=location.href.split("#")[0];return t.map(([r,a,l,c],d)=>{let u=`${e}.${d}`,f=document.createElement("li");f.setAttribute("data-part","item"),f.style.setProperty("--db-level",String(u.split(".").length-1));let m=document.createElement("div");m.setAttribute("data-part","row"),f.appendChild(m);let p=(a==null?void 0:a.replace(/[\\u0000-\\u0020]/g,""))??"";a!=null&&/^[a-z][a-z0-9+.-]*:/i.test(p)&&!/^(?:https?|mailto):/i.test(p)&&(a=null);let b=a!=null&&/^[a-z][a-z0-9+.-]*:|^\\/\\//i.test(p),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",s.replace("{label}",()=>r));else{let w=document.createElement("span");w.setAttribute("data-part","label"),w.textContent=r,g.appendChild(w)}g.insertAdjacentHTML("beforeend",Tn)}let y=this.getAttribute("toggle-position")==="end";if(g&&!y&&m.appendChild(g),a!=null){let w=document.createElement("a");w.setAttribute("data-part","link"),w.textContent=r,w.href=b?a:n+a,b&&(w.rel="noopener"),!c&&w.href.split("#")[0]===o&&w.setAttribute("aria-current","page"),m.appendChild(w)}if(a==null&&!(l!=null&&l.length)){let w=document.createElement("span");w.setAttribute("data-part","label"),w.textContent=r,m.appendChild(w)}if(g&&y&&m.appendChild(g),l!=null&&l.length){let w=document.createElement("ul");w.setAttribute("data-part","group"),w.dataset.lazy="",w.dataset.path=u,w.hidden=!0,f.setAttribute("data-state","closed"),f.appendChild(w),this.prepareItem(f)}return f})}},Tn=\'<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 On(i){for(let t=i.parentElement;t;t=t.parentElement){let e=getComputedStyle(t).overflowY;if((e==="auto"||e==="scroll")&&t.scrollHeight>t.clientHeight)return t}return null}N();customElements.get("db-nav-tree")||customElements.define("db-nav-tree",Ke);var We=class extends z{constructor(){super(...arguments);h(this,"links",[]);h(this,"headings",[]);h(this,"observer",null);h(this,"active",null);h(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)});h(this,"onHash",()=>{let t=wt(location.hash.slice(1));t&&this.headings.some(e=>e.id===t)&&this.setActive(t)})}slugOf(t){return t.getAttribute("data-toc-slug")??wt(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(n=>document.getElementById(this.slugOf(n))).filter(n=>!!n),!this.headings.length)return;let t=Number(this.getAttribute("offset")??80);typeof IntersectionObserver<"u"&&(this.observer=new IntersectionObserver(n=>{var o;let s=n.find(r=>r.isIntersecting);if(s)return this.setActive(s.target.id);this.setActive(((o=this.lastAbove(t))==null?void 0:o.id)??null)},{rootMargin:`-${t}px 0px -70% 0px`,threshold:0}),this.headings.forEach(n=>this.observer.observe(n))),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 n of this.headings)n.getBoundingClientRect().top<=t+20&&(e=n);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}))}}};N();customElements.get("db-toc")||customElements.define("db-toc",We);var Dn=["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] *)"],de=Dn.join(","),Ye=typeof Element>"u",Rt=Ye?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Wt=!Ye&&Element.prototype.getRootNode?function(i){var t;return i==null||(t=i.getRootNode)===null||t===void 0?void 0:t.call(i)}:function(i){return i==null?void 0:i.ownerDocument},jt=function(t,e){var n;e===void 0&&(e=!0);var s=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"inert"),o=s===""||s==="true",r=o||e&&t&&(typeof t.closest=="function"?t.closest("[inert]"):jt(t.parentNode));return r},Rn=function(t){var e,n=t==null||(e=t.getAttribute)===null||e===void 0?void 0:e.call(t,"contenteditable");return n===""||n==="true"},In=function(t,e,n){if(jt(t))return[];var s=Array.prototype.slice.apply(t.querySelectorAll(de));return e&&Rt.call(t,de)&&s.unshift(t),s=s.filter(n),s},ue=function(t,e,n){for(var s=[],o=Array.from(t);o.length;){var r=o.shift();if(!jt(r,!1))if(r.tagName==="SLOT"){var a=r.assignedElements(),l=a.length?a:r.children,c=ue(l,!0,n);n.flatten?s.push.apply(s,c):s.push({scopeParent:r,candidates:c})}else{var d=Rt.call(r,de);d&&n.filter(r)&&(e||!t.includes(r))&&s.push(r);var u=r.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(r),f=!jt(u,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(r));if(u&&f){var m=ue(u===!0?r.children:u.children,!0,n);n.flatten?s.push.apply(s,m):s.push({scopeParent:r,candidates:m})}else o.unshift.apply(o,r.children)}}return s},Ue=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Xe=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||Rn(t))&&!Ue(t)?0:t.tabIndex},Mn=function(t,e){var n=Xe(t);return n<0&&e&&!Ue(t)?0:n},Hn=function(t,e){return t.tabIndex===e.tabIndex?t.documentOrder-e.documentOrder:t.tabIndex-e.tabIndex},Ge=function(t){return t.tagName==="INPUT"},zn=function(t){return Ge(t)&&t.type==="hidden"},Nn=function(t){var e=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(n){return n.tagName==="SUMMARY"});return e},_n=function(t,e){for(var n=0;n<t.length;n++)if(t[n].checked&&t[n].form===e)return t[n]},Pn=function(t){if(!t.name)return!0;var e=t.form||Wt(t),n=function(a){return e.querySelectorAll(\'input[type="radio"][name="\'+a+\'"]\')},s;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")s=n(window.CSS.escape(t.name));else try{s=n(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 o=_n(s,t.form);return!o||o===t},Fn=function(t){return Ge(t)&&t.type==="radio"},$n=function(t){return Fn(t)&&!Pn(t)},Bn=function(t){var e,n=t&&Wt(t),s=(e=n)===null||e===void 0?void 0:e.host,o=!1;if(n&&n!==t){var r,a,l;for(o=!!((r=s)!==null&&r!==void 0&&(a=r.ownerDocument)!==null&&a!==void 0&&a.contains(s)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!o&&s;){var c,d,u;n=Wt(s),s=(c=n)===null||c===void 0?void 0:c.host,o=!!((d=s)!==null&&d!==void 0&&(u=d.ownerDocument)!==null&&u!==void 0&&u.contains(s))}}return o},je=function(t){var e=t.getBoundingClientRect(),n=e.width,s=e.height;return n===0&&s===0},qn=function(t,e){var n=e.displayCheck,s=e.getShadowRoot;if(n==="full-native"&&"checkVisibility"in t){var o=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!o}var r=getComputedStyle(t),a=r.visibility;if(a==="hidden"||a==="collapse")return!0;var l=Rt.call(t,"details>summary:first-of-type"),c=l?t.parentElement:t;if(Rt.call(c,"details:not([open]) *"))return!0;if(!n||n==="full"||n==="full-native"||n==="legacy-full"){if(typeof s=="function"){for(var d=t;t;){var u=t.parentElement,f=Wt(t);if(u&&!u.shadowRoot&&s(u)===!0)return je(t);t.assignedSlot?t=t.assignedSlot:!u&&f!==t.ownerDocument?t=f.host:t=u}t=d}if(Bn(t))return!t.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return je(t);return!1},Kn=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var e=t.parentElement;e;){if(e.tagName==="FIELDSET"&&e.disabled){for(var n=0;n<e.children.length;n++){var s=e.children.item(n);if(s.tagName==="LEGEND")return Rt.call(e,"fieldset[disabled] *")?!0:!s.contains(t)}return!0}e=e.parentElement}return!1},Wn=function(t,e){return!(e.disabled||zn(e)||qn(e,t)||Nn(e)||Kn(e))},Ve=function(t,e){return!($n(e)||Xe(e)<0||!Wn(t,e))},jn=function(t){var e=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(e)||e>=0)},Ze=function(t){var e=[],n=[];return t.forEach(function(s,o){var r=!!s.scopeParent,a=r?s.scopeParent:s,l=Mn(a,r),c=r?Ze(s.candidates):a;l===0?r?e.push.apply(e,c):e.push(a):n.push({documentOrder:o,tabIndex:l,item:s,isScope:r,content:c})}),n.sort(Hn).reduce(function(s,o){return o.isScope?s.push.apply(s,o.content):s.push(o.content),s},[]).concat(e)},he=function(t,e){e=e||{};var n;return e.getShadowRoot?n=ue([t],e.includeContainer,{filter:Ve.bind(null,e),flatten:!1,getShadowRoot:e.getShadowRoot,shadowRootFilter:jn}):n=In(t,e.includeContainer,Ve.bind(null,e)),Ze(n)};var fe=class{constructor(i,t={}){h(this,"root");h(this,"opts");h(this,"previouslyFocused",null);h(this,"keydownHandler",null);h(this,"active",!1);this.root=i,this.opts={initialFocus:t.initialFocus??"first",returnFocus:t.returnFocus??!0}}activate(){this.active||(this.active=!0,this.previouslyFocused=document.activeElement,this.keydownHandler=i=>{if(i.key!=="Tab")return;let t=he(this.root);if(t.length===0){i.preventDefault();return}let e=t[0],n=t[t.length-1];i.shiftKey?document.activeElement===e&&(n.focus(),i.preventDefault()):document.activeElement===n&&(e.focus(),i.preventDefault())},document.addEventListener("keydown",this.keydownHandler),requestAnimationFrame(()=>{var t;if(!this.active)return;let i=he(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=i[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 B,at=(B=class{static activate(){if(B.count++,B.count>1)return;let t=window.innerWidth-document.documentElement.clientWidth;B.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(){B.count=Math.max(0,B.count-1),!(B.count>0)&&B.originalStyles&&(document.body.style.overflow=B.originalStyles.overflow,document.body.style.paddingRight=B.originalStyles.paddingRight,B.originalStyles=null)}static reset(){B.count=0,B.originalStyles=null}},h(B,"count",0),h(B,"originalStyles",null),B);var Q=[];function Vn(i){if(i.key!=="Escape"||Q.length===0)return;let t=Q[Q.length-1];t.escapePrevented||(i.preventDefault(),i.stopPropagation(),t.opts.onDismiss("escape-key"))}var Qe=!1;function Yn(){Qe||(Qe=!0,document.addEventListener("keydown",Vn))}var lt=class{constructor(i,t){h(this,"root");h(this,"opts");h(this,"outsideHandler",null);h(this,"active",!1);h(this,"frameId",null);h(this,"escapePrevented",!1);this.root=i,this.opts={onDismiss:t.onDismiss,escapeKey:t.escapeKey??!0,outsidePress:t.outsidePress??!0}}activate(){this.active||(this.active=!0,this.opts.escapeKey&&(Yn(),Q.push(this)),this.opts.outsidePress&&(this.outsideHandler=i=>{if(Q.length>0&&Q[Q.length-1]!==this)return;let t=i.target;if(this.root.contains(t))return;let e=this.root.id;if(e){let s=document.querySelector(`[aria-controls="${e}"]`);if(s!=null&&s.contains(t))return}let n=this.root.getAttribute("aria-labelledby");if(n){let s=document.getElementById(n);if(s!=null&&s.contains(t))return}typeof this.opts.outsidePress=="function"&&!this.opts.outsidePress(i)||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 i=Q.indexOf(this);i!==-1&&Q.splice(i,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 me(i){let t=[],e=i;for(;e&&e!==document.body;){let n=e.parentElement;if(!n)break;for(let s=0;s<n.children.length;s++){let o=n.children[s];if(o===e||o.contains(i))continue;let r=o.tagName;if(r==="SCRIPT"||r==="STYLE"||r==="LINK")continue;let a=o.getAttribute("aria-hidden");a!=="true"&&(t.push({el:o,prev:a}),o.setAttribute("aria-hidden","true"))}e=n}return()=>{for(let{el:n,prev:s}of t)s===null?n.removeAttribute("aria-hidden"):n.setAttribute("aria-hidden",s)}}var Je=class extends z{constructor(){super(...arguments);h(this,"content",null);h(this,"backdrop",null);h(this,"trigger",null);h(this,"native",!1);h(this,"_open",!1);h(this,"openedBy",null);h(this,"focusTrap",null);h(this,"dismiss",null);h(this,"cleanupInert",null);h(this,"onTriggerClick",t=>{t.preventDefault(),this.toggle(t.currentTarget)});h(this,"onHostClick",t=>{let e=t.target.closest("[data-part=\'close\']");e&&e.closest("db-dialog")===this&&this.close("close-press")});h(this,"onDocumentClick",t=>{var s,o,r;let e=(o=(s=t.target).closest)==null?void 0:o.call(s,"[data-dialog-for]");if(!e||e===this.trigger)return;let n=e.getAttribute("data-dialog-for");n&&(n===this.id||n===((r=this.content)==null?void 0:r.id))&&(t.preventDefault(),this.toggle(e))});h(this,"onCancel",t=>{t.preventDefault(),this.dismissible&&this.close("escape-key")});h(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")});h(this,"onNativeClose",()=>{this._open&&this.finishClose("close-press")})}get open(){return this._open}get dismissible(){return this.getAttribute("dismissible")!=="false"}setup(){if(this.content=$(this,"[data-part=\'content\']"),!this.content)return;this.native=typeof HTMLDialogElement<"u"&&this.content instanceof HTMLDialogElement&&typeof this.content.showModal=="function",this.backdrop=$(this,"[data-part=\'backdrop\']"),this.trigger=bt($(this,"[data-part=\'trigger\']"));let t=this.content;t.id||(t.id=F("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=F("db-dialog-title")),t.setAttribute("aria-labelledby",e.id));let n=t.querySelector("[data-part=\'description\']");n&&!t.hasAttribute("aria-describedby")&&(n.id||(n.id=F("db-dialog-desc")),t.setAttribute("aria-describedby",n.id));for(let s of this.triggers())this.prepareTrigger(s);this.setState("closed"),this.native||(this.focusTrap=new fe(t),this.dismiss=new lt(t,{onDismiss:s=>this.dismissible&&this.close(s)}))}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 n;let t=this.trigger?[this.trigger]:[],e=[this.id,(n=this.content)==null?void 0:n.id].filter(Boolean);for(let s of e)document.querySelectorAll(`[data-dialog-for="${CSS.escape(s)}"]`).forEach(o=>t.push(o));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,n;this.setAttribute("data-state",t),(e=this.content)==null||e.setAttribute("data-state",t),(n=this.backdrop)==null||n.setAttribute("data-state",t)}toggle(t){this._open?this.close("trigger-press"):this.show(t)}show(t){var n,s;let e=this.content;if(!(!e||this._open)){this._open=!0,this.openedBy=t??document.activeElement??this.trigger;for(let o of this.triggers())this.prepareTrigger(o),o.setAttribute("aria-expanded","true");if(at.activate(),this.native){let o=e;o.open||o.showModal()}else e.hidden=!1,this.backdrop&&(this.backdrop.hidden=!1),this.cleanupInert=me(e),(n=this.focusTrap)==null||n.activate(),(s=this.dismiss)==null||s.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 o,r,a;let n=this.content;this._open=!1,this.setState("closed");for(let l of this.triggers())l.setAttribute("aria-expanded","false");if(at.deactivate(),this.native){let l=n;l.open&&l.close()}else(o=this.dismiss)==null||o.deactivate(),(r=this.focusTrap)==null||r.deactivate(),(a=this.cleanupInert)==null||a.call(this),this.cleanupInert=null,Fe(n,()=>{this._open||(n.hidden=!0,this.backdrop&&(this.backdrop.hidden=!0))});let s=this.openedBy;this.openedBy=null,e&&s&&document.contains(s)&&s.focus(),this.dispatchEvent(new CustomEvent("db-dialog:close",{detail:{reason:t},bubbles:!0}))}};N();customElements.get("db-dialog")||customElements.define("db-dialog",Je);var ti=class extends z{constructor(){super(...arguments);h(this,"input",null);h(this,"listbox",null);h(this,"empty",null);h(this,"_open",!1);h(this,"highlighted",null);h(this,"observer",null);h(this,"base",F("db-combobox"));h(this,"optionSeq",0);h(this,"onInput",()=>{this.filtering?this.filter(this.input.value):this.show()});h(this,"onFocus",()=>{(this.hasAttribute("open-on-focus")||this.filtering&&this.input.value)&&(this.filtering?this.filter(this.input.value):this.show())});h(this,"onKey",t=>{let e=this.visible(),n=this.highlighted?e.indexOf(this.highlighted):-1;switch(t.key){case"ArrowDown":t.preventDefault(),this._open||this.show(),e.length&&this.highlight(e[n<0?0:Math.min(n+1,e.length-1)]);break;case"ArrowUp":t.preventDefault(),this._open||this.show(),e.length&&this.highlight(e[n<0?e.length-1:Math.max(n-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}});h(this,"onListClick",t=>{let e=t.target.closest("[data-part=\'option\']");if(!e||e.closest("db-combobox")!==this||W(e))return;let n=t.target.closest("a[href]");!this.choose(e,!n)&&n&&t.preventDefault()});h(this,"onListPointer",t=>{let e=t.target.closest("[data-part=\'option\']");e&&e.closest("db-combobox")===this&&!W(e)&&!e.hidden&&this.highlight(e)});h(this,"onListDown",t=>t.preventDefault());h(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&&!W(t))}setup(){if(this.input=$(this,"[data-part=\'input\']"),this.listbox=$(this,"[data-part=\'listbox\']"),this.empty=$(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 n;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),(n=this.observer)==null||n.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(),n=0;for(let o of this.options()){let r=!e||(o.textContent??"").toLowerCase().includes(e)||(o.dataset.value??"").toLowerCase().includes(e);o.hidden=!r,r&&n++}this.empty&&(this.empty.hidden=n>0||!e),this.clearHighlight(),n||e&&this.empty?this.show():this.hide();let s=this.visible();s.length&&!this.hasAttribute("no-autohighlight")&&this.highlight(s[0]),this.dispatchEvent(new CustomEvent("db-combobox:update",{detail:{count:n},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,n,s;this.input&&((e=this.highlighted)==null||e.removeAttribute("data-highlighted"),(n=this.highlighted)==null||n.setAttribute("aria-selected","false"),this.highlighted=t,t.setAttribute("data-highlighted",""),t.setAttribute("aria-selected","true"),this.input.setAttribute("aria-activedescendant",t.id),(s=t.scrollIntoView)==null||s.call(t,{block:"nearest"}))}clearHighlight(){var t,e,n;(t=this.highlighted)==null||t.removeAttribute("data-highlighted"),(e=this.highlighted)==null||e.setAttribute("aria-selected","false"),this.highlighted=null,(n=this.input)==null||n.removeAttribute("aria-activedescendant")}choose(t,e=!0){var a;let n=t.dataset.value??"",s=((a=t.textContent)==null?void 0:a.trim())??n,o=new CustomEvent("db-combobox:select",{detail:{value:n,text:s,option:t},bubbles:!0,cancelable:!0});if(!this.dispatchEvent(o))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")??s),this.inline||this.hide(),this.dispatchEvent(new CustomEvent("db-combobox:change",{detail:{value:n,text:s},bubbles:!0})),!0)}};N();customElements.get("db-combobox")||customElements.define("db-combobox",ti);var it=Math.min,j=Math.max,Mt=Math.round,Ht=Math.floor,U=i=>({x:i,y:i}),Un={left:"right",right:"left",bottom:"top",top:"bottom"};function ni(i,t,e){return j(i,it(t,e))}function Et(i,t){return typeof i=="function"?i(t):i}function nt(i){return i.split("-")[0]}function xt(i){return i.split("-")[1]}function pe(i){return i==="x"?"y":"x"}function ge(i){return i==="y"?"height":"width"}function X(i){let t=i[0];return t==="t"||t==="b"?"y":"x"}function be(i){return pe(X(i))}function si(i,t,e){e===void 0&&(e=!1);let n=xt(i),s=be(i),o=ge(s),r=s==="x"?n===(e?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(r=It(r)),[r,It(r)]}function oi(i){let t=It(i);return[Vt(i),t,Vt(t)]}function Vt(i){return i.includes("start")?i.replace("start","end"):i.replace("end","start")}var ei=["left","right"],ii=["right","left"],Xn=["top","bottom"],Gn=["bottom","top"];function Zn(i,t,e){switch(i){case"top":case"bottom":return e?t?ii:ei:t?ei:ii;case"left":case"right":return t?Xn:Gn;default:return[]}}function ri(i,t,e,n){let s=xt(i),o=Zn(nt(i),e==="start",n);return s&&(o=o.map(r=>r+"-"+s),t&&(o=o.concat(o.map(Vt)))),o}function It(i){let t=nt(i);return Un[t]+i.slice(t.length)}function Qn(i){var t,e,n,s;return{top:(t=i.top)!=null?t:0,right:(e=i.right)!=null?e:0,bottom:(n=i.bottom)!=null?n:0,left:(s=i.left)!=null?s:0}}function ai(i){return typeof i!="number"?Qn(i):{top:i,right:i,bottom:i,left:i}}function ct(i){let{x:t,y:e,width:n,height:s}=i;return{width:n,height:s,top:e,left:t,right:t+n,bottom:e+s,x:t,y:e}}function li(i,t,e){let{reference:n,floating:s}=i,o=X(t),r=be(t),a=ge(r),l=nt(t),c=o==="y",d=n.x+n.width/2-s.width/2,u=n.y+n.height/2-s.height/2,f=n[a]/2-s[a]/2,m;switch(l){case"top":m={x:d,y:n.y-s.height};break;case"bottom":m={x:d,y:n.y+n.height};break;case"right":m={x:n.x+n.width,y:u};break;case"left":m={x:n.x-s.width,y:u};break;default:m={x:n.x,y:n.y}}let p=xt(t);return p&&(m[r]+=f*(p==="end"?1:-1)*(e&&c?-1:1)),m}async function ci(i,t){var e;t===void 0&&(t={});let{x:n,y:s,platform:o,rects:r,elements:a,strategy:l}=i,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:f=!1,padding:m=0}=Et(t,i),p=ai(m),g=a[f?u==="floating"?"reference":"floating":u],y=ct(await o.getClippingRect({element:(e=await(o.isElement==null?void 0:o.isElement(g)))==null||e?g:g.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:l})),w=u==="floating"?{x:n,y:s,width:r.floating.width,height:r.floating.height}:r.reference,L=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),R=await(o.isElement==null?void 0:o.isElement(L))&&await(o.getScale==null?void 0:o.getScale(L))||{x:1,y:1},M=ct(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:L,strategy:l}):w);return{top:(y.top-M.top+p.top)/R.y,bottom:(M.bottom-y.bottom+p.bottom)/R.y,left:(y.left-M.left+p.left)/R.x,right:(M.right-y.right+p.right)/R.x}}var Jn=50,di=async(i,t,e)=>{let{placement:n="bottom",strategy:s="absolute",middleware:o=[],platform:r}=e,a=r.detectOverflow?r:{...r,detectOverflow:ci},l=await(r.isRTL==null?void 0:r.isRTL(t)),c=await r.getElementRects({reference:i,floating:t,strategy:s}),{x:d,y:u}=li(c,n,l),f=n,m=0,p={};for(let b=0;b<o.length;b++){let g=o[b];if(!g)continue;let{name:y,fn:w}=g,{x:L,y:R,data:M,reset:H}=await w({x:d,y:u,initialPlacement:n,placement:f,strategy:s,middlewareData:p,rects:c,platform:a,elements:{reference:i,floating:t}});d=L??d,u=R??u,p[y]={...p[y],...M},H&&m<Jn&&(m++,typeof H=="object"&&(H.placement&&(f=H.placement),H.rects&&(c=H.rects===!0?await r.getElementRects({reference:i,floating:t,strategy:s}):H.rects),{x:d,y:u}=li(c,f,l)),b=-1)}return{x:d,y:u,placement:f,strategy:s,middlewareData:p}};var ui=function(i){return i===void 0&&(i={}),{name:"flip",options:i,async fn(t){var e,n;let{placement:s,middlewareData:o,rects:r,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:f,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:b=!0,...g}=Et(i,t);if((e=o.arrow)!=null&&e.alignmentOffset)return{};let y=nt(s),w=X(a),L=nt(a)===a,R=await(l.isRTL==null?void 0:l.isRTL(c.floating)),M=f||(L||!b?[It(a)]:oi(a)),H=p!=="none";!f&&H&&M.push(...ri(a,b,p,R));let O=[a,...M],v=await l.detectOverflow(t,g),q=[],I=((n=o.flip)==null?void 0:n.overflows)||[];if(d&&q.push(v[y]),u){let C=si(s,r,R);q.push(v[C[0]],v[C[1]])}if(I=[...I,{placement:s,overflows:q}],!q.every(C=>C<=0)){var S,x;let C=(((S=o.flip)==null?void 0:S.index)||0)+1,T=O[C];if(T&&(!(u==="alignment"?w!==X(T):!1)||I.every(D=>X(D.placement)===w?D.overflows[0]>0:!0)))return{data:{index:C,overflows:I},reset:{placement:T}};let A=(x=I.filter(k=>k.overflows[0]<=0).sort((k,D)=>k.overflows[1]-D.overflows[1])[0])==null?void 0:x.placement;if(!A)switch(m){case"bestFit":{var E;let k=(E=I.filter(D=>{if(H){let _=X(D.placement);return _===w||_==="y"}return!0}).map(D=>[D.placement,D.overflows.filter(_=>_>0).reduce((_,P)=>_+P,0)]).sort((D,_)=>D[1]-_[1])[0])==null?void 0:E[0];k&&(A=k);break}case"initialPlacement":A=a;break}if(s!==A)return{reset:{placement:A}}}return{}}}};var ts=new Set(["left","top"]);async function es(i,t){let{placement:e,platform:n,elements:s}=i,o=await(n.isRTL==null?void 0:n.isRTL(s.floating)),r=nt(e),a=xt(e),l=X(e)==="y",c=ts.has(r)?-1:1,d=o&&l?-1:1,u=Et(t,i),{mainAxis:f,crossAxis:m,alignmentAxis:p}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return a&&typeof p=="number"&&(m=a==="end"?p*-1:p),l?{x:m*d,y:f*c}:{x:f*c,y:m*d}}var hi=function(i){return i===void 0&&(i=0),{name:"offset",options:i,async fn(t){var e,n;let{x:s,y:o,placement:r,middlewareData:a}=t,l=await es(t,i);return r===((e=a.offset)==null?void 0:e.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:s+l.x,y:o+l.y,data:{...l,placement:r}}}}},fi=function(i){return i===void 0&&(i={}),{name:"shift",options:i,async fn(t){let{x:e,y:n,placement:s,platform:o}=t,{mainAxis:r=!0,crossAxis:a=!1,limiter:l={fn:w=>{let{x:L,y:R}=w;return{x:L,y:R}}},...c}=Et(i,t),d={x:e,y:n},u=await o.detectOverflow(t,c),f=X(s),m=pe(f),p=d[m],b=d[f],g=(w,L)=>ni(L+u[w==="y"?"top":"left"],L,L-u[w==="y"?"bottom":"right"]);r&&(p=g(m,p)),a&&(b=g(f,b));let y=l.fn({...t,[m]:p,[f]:b});return{...y,data:{x:y.x-e,y:y.y-n,enabled:{[m]:r,[f]:a}}}}}};var mi=function(i){return i===void 0&&(i={}),{name:"size",options:i,async fn(t){let{placement:e,rects:n,platform:s,elements:o}=t,{apply:r=()=>{},...a}=Et(i,t),l=await s.detectOverflow(t,a),c=nt(e),d=xt(e),u=X(e)==="y",{width:f,height:m}=n.floating,p,b;c==="top"||c==="bottom"?(p=c,b=d===(await(s.isRTL==null?void 0:s.isRTL(o.floating))?"start":"end")?"left":"right"):(b=c,p=d==="end"?"top":"bottom");let g=m-l.top-l.bottom,y=f-l.left-l.right,w=it(m-l[p],g),L=it(f-l[b],y),R=t.middlewareData.shift,M=!R,H=w,O=L;R!=null&&R.enabled.x&&(O=y),R!=null&&R.enabled.y&&(H=g),M&&!d&&(u?O=f-2*j(l.left,l.right):H=m-2*j(l.top,l.bottom)),await r({...t,availableWidth:O,availableHeight:H});let v=await s.getDimensions(o.floating);return f!==v.width||m!==v.height?{reset:{rects:!0}}:{}}}};function Yt(){return typeof window<"u"}function ut(i){return gi(i)?(i.nodeName||"").toLowerCase():"#document"}function K(i){var t;return(i==null||(t=i.ownerDocument)==null?void 0:t.defaultView)||window}function G(i){var t;return(t=(gi(i)?i.ownerDocument:i.document)||window.document)==null?void 0:t.documentElement}function gi(i){return Yt()?i instanceof Node||i instanceof K(i).Node:!1}function V(i){return Yt()?i instanceof Element||i instanceof K(i).Element:!1}function J(i){return Yt()?i instanceof HTMLElement||i instanceof K(i).HTMLElement:!1}function pi(i){return!Yt()||typeof ShadowRoot>"u"?!1:i instanceof ShadowRoot||i instanceof K(i).ShadowRoot}function zt(i){let{overflow:t,overflowX:e,overflowY:n,display:s}=Y(i);return/auto|scroll|overlay|hidden|clip/.test(t+n+e)&&s!=="inline"&&s!=="contents"}function bi(i){return/^(table|td|th)$/.test(ut(i))}function Nt(i){try{if(i.matches(":popover-open"))return!0}catch{}try{return i.matches(":modal")}catch{return!1}}var is=/transform|translate|scale|rotate|perspective|filter/,ns=/paint|layout|strict|content/,dt=i=>!!i&&i!=="none",ve;function Ut(i){let t=V(i)?Y(i):i;return dt(t.transform)||dt(t.translate)||dt(t.scale)||dt(t.rotate)||dt(t.perspective)||!Xt()&&(dt(t.backdropFilter)||dt(t.filter))||is.test(t.willChange||"")||ns.test(t.contain||"")}function vi(i){let t=st(i);for(;J(t)&&!St(t);){if(Ut(t))return t;if(Nt(t))return null;t=st(t)}return null}function Xt(){return ve==null&&(ve=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),ve}function St(i){return/^(html|body|#document)$/.test(ut(i))}function Y(i){return K(i).getComputedStyle(i)}function _t(i){return V(i)?{scrollLeft:i.scrollLeft,scrollTop:i.scrollTop}:{scrollLeft:i.scrollX,scrollTop:i.scrollY}}function st(i){if(ut(i)==="html")return i;let t=i.assignedSlot||i.parentNode||pi(i)&&i.host||G(i);return pi(t)?t.host:t}function yi(i){let t=st(i);return St(t)?(i.ownerDocument||i).body:J(t)&&zt(t)?t:yi(t)}function At(i,t,e){var n;t===void 0&&(t=[]),e===void 0&&(e=!0);let s=yi(i),o=s===((n=i.ownerDocument)==null?void 0:n.body),r=K(s);if(o){let a=Gt(r);return t.concat(r,r.visualViewport||[],zt(s)?s:[],a&&e?At(a):[])}else return t.concat(s,At(s,[],e))}function Gt(i){return i.parent&&Object.getPrototypeOf(i.parent)?i.frameElement:null}function xi(i){let t=Y(i),e=parseFloat(t.width)||0,n=parseFloat(t.height)||0,s=J(i),o=s?i.offsetWidth:e,r=s?i.offsetHeight:n,a=Mt(e)!==o||Mt(n)!==r;return a&&(e=o,n=r),{width:e,height:n,$:a}}function we(i){return V(i)?i:i.contextElement}function Ct(i){let t=we(i);if(!J(t))return U(1);let e=t.getBoundingClientRect(),{width:n,height:s,$:o}=xi(t),r=(o?Mt(e.width):e.width)/n,a=(o?Mt(e.height):e.height)/s;return(!r||!Number.isFinite(r))&&(r=1),(!a||!Number.isFinite(a))&&(a=1),{x:r,y:a}}var ss=U(0);function Ai(i){let t=K(i);return!Xt()||!t.visualViewport?ss:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function os(i,t,e){return t===void 0&&(t=!1),!!e&&t&&e===K(i)}function ht(i,t,e,n){t===void 0&&(t=!1),e===void 0&&(e=!1);let s=i.getBoundingClientRect(),o=we(i),r=U(1);t&&(n?V(n)&&(r=Ct(n)):r=Ct(i));let a=os(o,e,n)?Ai(o):U(0),l=(s.left+a.x)/r.x,c=(s.top+a.y)/r.y,d=s.width/r.x,u=s.height/r.y;if(o&&n){let f=K(o),m=V(n)?K(n):n,p=f,b=Gt(p);for(;b&&m!==p;){let g=Ct(b),y=b.getBoundingClientRect(),w=Y(b),L=y.left+(b.clientLeft+parseFloat(w.paddingLeft))*g.x,R=y.top+(b.clientTop+parseFloat(w.paddingTop))*g.y;l*=g.x,c*=g.y,d*=g.x,u*=g.y,l+=L,c+=R,p=K(b),b=Gt(p)}}return ct({width:d,height:u,x:l,y:c})}function Zt(i,t){let e=_t(i).scrollLeft;return t?t.left+e:ht(G(i)).left+e}function Si(i,t){let e=i.getBoundingClientRect(),n=e.left+t.scrollLeft-Zt(i,e),s=e.top+t.scrollTop;return{x:n,y:s}}function rs(i){let{elements:t,rect:e,offsetParent:n,strategy:s}=i,o=s==="fixed",r=G(n),a=t?Nt(t.floating):!1;if(n===r||a&&o)return e;let l={scrollLeft:0,scrollTop:0},c=U(1),d=U(0),u=J(n);if((u||!o)&&((ut(n)!=="body"||zt(r))&&(l=_t(n)),u)){let m=ht(n);c=Ct(n),d.x=m.x+n.clientLeft,d.y=m.y+n.clientTop}let f=r&&!u&&!o?Si(r,l):U(0);return{width:e.width*c.x,height:e.height*c.y,x:e.x*c.x-l.scrollLeft*c.x+d.x+f.x,y:e.y*c.y-l.scrollTop*c.y+d.y+f.y}}function as(i){return i.getClientRects?Array.from(i.getClientRects()):[]}function ls(i){let t=_t(i),e=i.ownerDocument.body,n=j(i.scrollWidth,i.clientWidth,e.scrollWidth,e.clientWidth),s=j(i.scrollHeight,i.clientHeight,e.scrollHeight,e.clientHeight),o=-t.scrollLeft+Zt(i),r=-t.scrollTop;return Y(e).direction==="rtl"&&(o+=j(i.clientWidth,e.clientWidth)-n),{width:n,height:s,x:o,y:r}}var cs=25;function ds(i,t,e){e===void 0&&(e="viewport");let n=e==="layoutViewport",s=K(i),o=G(i),r=s.visualViewport,a=o.clientWidth,l=o.clientHeight,c=0,d=0;if(r){let f=!Xt()||t==="fixed";n?f||(c=-r.offsetLeft,d=-r.offsetTop):(a=r.width,l=r.height,f&&(c=r.offsetLeft,d=r.offsetTop))}if(Zt(o)<=0){let f=o.ownerDocument,m=f.body,p=getComputedStyle(m),b=f.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,g=Math.abs(o.clientWidth-m.clientWidth-b),y=getComputedStyle(o).scrollbarGutter==="stable both-edges"?g/2:g;y<=cs&&(a-=y)}return{width:a,height:l,x:c,y:d}}function us(i,t){let e=ht(i,!0,t==="fixed"),n=e.top+i.clientTop,s=e.left+i.clientLeft,o=Ct(i),r=i.clientWidth*o.x,a=i.clientHeight*o.y,l=s*o.x,c=n*o.y;return{width:r,height:a,x:l,y:c}}function wi(i,t,e){let n;if(t==="viewport"||t==="layoutViewport")n=ds(i,e,t);else if(t==="document")n=ls(G(i));else if(V(t))n=us(t,e);else{let s=Ai(i);n={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return ct(n)}function hs(i,t){let e=t.get(i);if(e)return e;let n=At(i,[],!1).filter(a=>V(a)&&ut(a)!=="body"),s=null,o=Y(i).position==="fixed",r=o?st(i):i;for(;V(r)&&!St(r);){let a=Y(r),l=Ut(r),c=s?s.position:o?"fixed":"";!l&&(c==="fixed"||c==="absolute"&&a.position==="static")?n=n.filter(u=>u!==r):s=a,r=st(r)}return t.set(i,n),n}function fs(i){let{element:t,boundary:e,rootBoundary:n,strategy:s}=i,r=[...e==="clippingAncestors"?Nt(t)?[]:hs(t,this._c):[].concat(e),n],a=wi(t,r[0],s),l=a.top,c=a.right,d=a.bottom,u=a.left;for(let f=1;f<r.length;f++){let m=wi(t,r[f],s);l=j(m.top,l),c=it(m.right,c),d=it(m.bottom,d),u=j(m.left,u)}return{width:c-u,height:d-l,x:u,y:l}}function ms(i){let{width:t,height:e}=xi(i);return{width:t,height:e}}function ps(i,t,e){let n=J(t),s=G(t),o=e==="fixed",r=ht(i,!0,o,t),a={scrollLeft:0,scrollTop:0},l=U(0);if((n||!o)&&((ut(t)!=="body"||zt(s))&&(a=_t(t)),n)){let f=ht(t,!0,o,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}!n&&s&&(l.x=Zt(s));let c=s&&!n&&!o?Si(s,a):U(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 ye(i){return Y(i).position==="static"}function Ei(i,t){if(!J(i)||Y(i).position==="fixed")return null;if(t)return t(i);let e=i.offsetParent;return G(i)===e&&(e=e.ownerDocument.body),e}function Ci(i,t){let e=K(i);if(Nt(i))return e;if(!J(i)){let s=st(i);for(;s&&!St(s);){if(V(s)&&!ye(s))return s;s=st(s)}return e}let n=Ei(i,t);for(;n&&bi(n)&&ye(n);)n=Ei(n,t);return n&&St(n)&&ye(n)&&!Ut(n)?e:n||vi(i)||e}var gs=async function(i){let t=this.getOffsetParent||Ci,e=this.getDimensions,n=await e(i.floating);return{reference:ps(i.reference,await t(i.floating),i.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function bs(i){return Y(i).direction==="rtl"}var vs={convertOffsetParentRelativeRectToViewportRelativeRect:rs,getDocumentElement:G,getClippingRect:fs,getOffsetParent:Ci,getElementRects:gs,getClientRects:as,getDimensions:ms,getScale:Ct,isElement:V,isRTL:bs};function Li(i,t){return i.x===t.x&&i.y===t.y&&i.width===t.width&&i.height===t.height}function ys(i,t,e){let n=null,s,o=G(i);function r(){var d;clearTimeout(s),(d=n)==null||d.disconnect(),n=null}function a(d,u){d===void 0&&(d=!1),u===void 0&&(u=1),r();let f=i.getBoundingClientRect(),{left:m,top:p,width:b,height:g}=f;if(d||t(),!b||!g)return;let y=Ht(p),w=Ht(o.clientWidth-(m+b)),L=Ht(o.clientHeight-(p+g)),R=Ht(m),H={rootMargin:-y+"px "+-w+"px "+-L+"px "+-R+"px",threshold:j(0,it(1,u))||1},O=!0;function v(q){let I=q[0].intersectionRatio;if(!Li(f,i.getBoundingClientRect()))return a();if(I!==u){if(!O)return a();I?a(!1,I):s=setTimeout(()=>{a(!1,1e-7)},1e3)}O=!1}try{n=new IntersectionObserver(v,{...H,root:o.ownerDocument})}catch{n=new IntersectionObserver(v,H)}n.observe(i)}let l=K(i),c=()=>a(e);return l.addEventListener("resize",c),a(!0),()=>{l.removeEventListener("resize",c),r()}}function ki(i,t,e,n){n===void 0&&(n={});let{ancestorScroll:s=!0,ancestorResize:o=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=we(i),d=s||o?[...c?At(c):[],...t?At(t):[]]:[];d.forEach(y=>{s&&y.addEventListener("scroll",e),o&&y.addEventListener("resize",e)});let u=c&&a?ys(c,e,o):null,f=-1,m=null;r&&(m=new ResizeObserver(y=>{let[w]=y;w&&w.target===c&&m&&t&&(m.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var L;(L=m)==null||L.observe(t)})),e()}),c&&!l&&m.observe(c),t&&m.observe(t));let p,b=l?ht(i):null;l&&g();function g(){let y=ht(i);b&&!Li(b,y)&&e(),b=y,p=requestAnimationFrame(g)}return e(),()=>{var y;d.forEach(w=>{s&&w.removeEventListener("scroll",e),o&&w.removeEventListener("resize",e)}),u==null||u(),(y=m)==null||y.disconnect(),m=null,l&&cancelAnimationFrame(p)}}var Ti=hi;var Oi=fi,Di=ui,Ri=mi;var Ii=(i,t,e)=>{let n=new Map,s=e??{},o={...vs,...s.platform,_c:n};return di(i,t,{...s,platform:o})};function ft(i,t,e={}){let{placement:n="bottom-start",strategy:s="absolute",offset:o=4,flip:r=!0,shift:a=!0,padding:l=8,matchWidth:c=!1}=e,d=[Ti(o),...r?[Di({padding:l})]:[],...a?[Oi({padding:l})]:[],...c?[Ri({apply({rects:f}){Object.assign(t.style,{width:`${f.reference.width}px`})}})]:[]];return t.style.position=s,ki(i,t,async()=>{let f=await Ii(i,t,{placement:n,strategy:s,middleware:d});Object.assign(t.style,{left:`${f.x}px`,top:`${f.y}px`});let m=f.placement.split("-")[0];t.setAttribute("data-side",m)})}var Ee=class{constructor(i){h(this,"opts");h(this,"buffer","");h(this,"timerId",null);h(this,"timeout");this.opts=i,this.timeout=i.timeout??1e3}handle(i){if(i.length!==1)return!1;this.timerId!==null&&clearTimeout(this.timerId),this.buffer+=i.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 Mi=class extends z{constructor(){super(...arguments);h(this,"trigger",null);h(this,"content",null);h(this,"valueEl",null);h(this,"items",[]);h(this,"nativeSelect",null);h(this,"hiddenInput",null);h(this,"labelEl",null);h(this,"onLabelClick",t=>{var e;t.target.closest("[data-part=\'trigger\']")||(t.preventDefault(),(e=this.trigger)==null||e.focus())});h(this,"dismiss",null);h(this,"typeahead",null);h(this,"cleanupFloating",null);h(this,"_open",!1);h(this,"_value","");h(this,"highlighted",-1);h(this,"syncing",!1);h(this,"onNativeChange",()=>{this.syncing||this.refresh()});h(this,"onFormReset",()=>setTimeout(()=>this.refresh()));h(this,"onTriggerClick",()=>{this.isDisabled||(this._open?this.close():this.show())});h(this,"onTriggerKeyUp",t=>{t.key===" "&&t.preventDefault()});h(this,"onTriggerKey",t=>{var o,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&&((o=this.typeahead)==null||o.handle(t.key));return}if(!e.length)return;let n=this.highlighted>=0?e.indexOf(this.items[this.highlighted]):-1,s=a=>{t.preventDefault(),this.highlight(this.items.indexOf(e[a]))};switch(t.key){case"ArrowDown":return s(Math.min(n+1,e.length-1));case"ArrowUp":return t.altKey?(t.preventDefault(),this.highlighted>=0&&this.select(this.items[this.highlighted]),this.close()):s(Math.max(n-1,0));case"Home":return s(0);case"End":return s(e.length-1);case"PageDown":return s(Math.min(n+10,e.length-1));case"PageUp":return s(Math.max(n-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))}});h(this,"onListClick",t=>{let e=t.target.closest("[data-part=\'item\']");!e||!this.items.includes(e)||W(e)||(this.select(e),this.close())});h(this,"onListPointer",t=>{let e=t.target.closest("[data-part=\'item\']");e&&this.items.includes(e)&&!W(e)&&this.highlight(this.items.indexOf(e))});h(this,"preventBlur",t=>t.preventDefault())}get open(){return this._open}get value(){return this._value}set value(t){let e=this.items.find(n=>n.dataset.value===t);e&&this.select(e,!1)}get isDisabled(){var t;return this.hasAttribute("disabled")||!!((t=this.nativeSelect)!=null&&t.disabled)}refresh(){var n;let t=this.nativeSelect;if(!t)return;let e=this.items.find(s=>s.dataset.value===t.value);e&&this.select(e,!1),(n=this.trigger)==null||n.setAttribute("aria-disabled",String(this.isDisabled))}enabled(){return this.items.filter(t=>!W(t))}setup(){var a,l;if(this.nativeSelect=$(this,"select"),this.nativeSelect&&!$(this,"[data-part=\'trigger\']")&&this.buildFromNative(this.nativeSelect),this.trigger=$(this,"[data-part=\'trigger\']"),this.content=$(this,"[data-part=\'content\']"),this.valueEl=$(this,"[data-part=\'value\']"),!this.trigger||!this.content)return;let{trigger:t,content:e}=this;this.items=et(this,"[data-part=\'item\']");let n=F("db-select");e.id||(e.id=`${n}-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=`${n}-item-${d}`),c.setAttribute("role","option"),c.setAttribute("aria-selected","false")}),et(this,"[data-part=\'group\']").forEach(c=>{c.setAttribute("role","group");let d=c.querySelector("[data-part=\'label\']");d&&(d.id||(d.id=F("db-select-label")),c.setAttribute("aria-labelledby",d.id))});let s=this.getAttribute("name");s&&!this.nativeSelect&&(this.hiddenInput=document.createElement("input"),this.hiddenInput.type="hidden",this.hiddenInput.name=s,this.hasAttribute("required")&&(this.hiddenInput.required=!0),this.appendChild(this.hiddenInput)),this.typeahead=new Ee({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 lt(e,{onDismiss:c=>this.close(c!=="outside-press")});let o=((a=this.nativeSelect)==null?void 0:a.value)??this.getAttribute("default-value")??"",r=this.items.find(c=>c.dataset.value===o);r&&W(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 n=t.getAttribute("aria-label"),s=t.getAttribute("aria-labelledby"),o=!s&&t.id?document.querySelector(`label[for="${CSS.escape(t.id)}"]`):null;o&&(s=o.id||(o.id=F("db-select-for"))),n&&e.setAttribute("aria-label",n),s&&e.setAttribute("aria-labelledby",s);let r=t.closest("label");if(r){if(this.labelEl=r,!n&&!s){let u=Array.from(r.childNodes).filter(f=>!(f instanceof Element&&(f===t||f.contains(t)||f.localName==="db-select"))).map(f=>f.textContent??"").join(" ").replace(/\\s+/g," ").trim();u&&e.setAttribute("aria-label",u)}}else o&&(this.labelEl=o);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,f)=>{let m=document.createElement("div");m.setAttribute("data-part","item"),m.className="db-select-item",m.dataset.value=u.value;for(let[p,b]of Object.entries(u.dataset))b!=null&&(m.dataset[p]=b);u.disabled&&m.setAttribute("aria-disabled","true"),m.textContent=u.textContent??u.value,f.appendChild(m)};for(let u of Array.from(t.children))if(u instanceof HTMLOptGroupElement){let f=document.createElement("div");f.setAttribute("data-part","group");let m=document.createElement("div");m.setAttribute("data-part","label"),m.className="db-select-label",m.textContent=u.label,f.appendChild(m);for(let p of Array.from(u.children))p instanceof HTMLOptionElement&&d(p,f);c.appendChild(f)}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,n,s,o,r,a,l,c,d;(t=this.trigger)==null||t.addEventListener("click",this.onTriggerClick),(e=this.trigger)==null||e.addEventListener("keydown",this.onTriggerKey),(n=this.trigger)==null||n.addEventListener("keyup",this.onTriggerKeyUp),(s=this.nativeSelect)==null||s.addEventListener("change",this.onNativeChange),(r=(o=this.nativeSelect)==null?void 0:o.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,n,s,o,r,a,l,c,d;(t=this.trigger)==null||t.removeEventListener("click",this.onTriggerClick),(e=this.trigger)==null||e.removeEventListener("keydown",this.onTriggerKey),(n=this.trigger)==null||n.removeEventListener("keyup",this.onTriggerKeyUp),(s=this.nativeSelect)==null||s.removeEventListener("change",this.onNativeChange),(r=(o=this.nativeSelect)==null?void 0:o.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 n=vt(e);this.setState("open"),t.setAttribute("aria-expanded","true"),this.cleanupFloating=ft(t,e,{placement:"bottom-start",offset:4,matchWidth:!this.hasAttribute("auto-width"),strategy:n==="top-layer"?"fixed":"absolute"});let o=this.items.find(l=>l.dataset.value===this._value&&!W(l))??this.enabled()[0];o&&this.highlight(this.items.indexOf(o)),(r=this.dismiss)==null||r.activate(),(a=this.typeahead)==null||a.reset(),t.focus()}close(t=!0){var s,o,r;let{trigger:e,content:n}=this;!e||!n||!this._open||(this._open=!1,(s=this.dismiss)==null||s.deactivate(),(o=this.cleanupFloating)==null||o.call(this),this.cleanupFloating=null,yt(n),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],n=this.content;if(!e||!n||!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 s=e.offsetTop,o=s+e.offsetHeight;s<n.scrollTop?n.scrollTop=s:o>n.scrollTop+n.clientHeight&&(n.scrollTop=o-n.clientHeight)}select(t,e=!0){var o;if(W(t))return;let n=t.dataset.value??"",s=n!==this._value;this._value=n;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=((o=t.textContent)==null?void 0:o.trim())??"",this.valueEl.removeAttribute("data-placeholder")),this.hiddenInput&&(this.hiddenInput.value=n),!e||!s){this.nativeSelect&&(this.nativeSelect.value=n);return}if(this.nativeSelect){this.nativeSelect.value=n,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:n},bubbles:!0}))}};N();customElements.get("db-select")||customElements.define("db-select",Mi);var Hi=class extends z{constructor(){super(...arguments);h(this,"trigger",null);h(this,"content",null);h(this,"dismiss",null);h(this,"cleanupFloating",null);h(this,"_open",!1);h(this,"onTriggerClick",()=>this.toggle());h(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=bt($(this,"[data-part=\'trigger\']")),this.content=$(this,"[data-part=\'content\']"),!this.trigger||!this.content)return;let t=this.content;t.id||(t.id=F("db-popover")),t.hasAttribute("role")||t.setAttribute("role","dialog"),!t.hasAttribute("aria-labelledby")&&!t.hasAttribute("aria-label")&&((e=this.trigger).id||(e.id=F("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 lt(t,{onDismiss:n=>this.close(n)})}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 s,o;let t=this.getAttribute("placement");if(t)return t;let e=((s=this.content)==null?void 0:s.dataset.side)||"bottom",n=((o=this.content)==null?void 0:o.dataset.align)||"center";return`${e}${n!=="center"?`-${n}`:""}`}toggle(){this._open?this.close("trigger-press"):this.show()}show(){var s;let{trigger:t,content:e}=this;if(!t||!e||this._open)return;this._open=!0;let n=vt(e);this.setState("open"),t.setAttribute("aria-expanded","true"),this.cleanupFloating=ft(t,e,{placement:this.placement(),offset:Number(this.getAttribute("offset")??8),strategy:n==="top-layer"?"fixed":"absolute"}),(s=this.dismiss)==null||s.activate(),this.hasAttribute("no-autofocus")||requestAnimationFrame(()=>{this._open&&(Pe(e)[0]??e).focus({preventScroll:!0})}),this.dispatchEvent(new CustomEvent("db-popover:open",{bubbles:!0}))}close(t="api"){var o,r;let{trigger:e,content:n}=this;if(!e||!n||!this._open)return;this._open=!1,(o=this.dismiss)==null||o.deactivate(),(r=this.cleanupFloating)==null||r.call(this),this.cleanupFloating=null;let s=n.contains(document.activeElement);yt(n),this.setState("closed"),e.setAttribute("aria-expanded","false"),t!=="outside-press"&&(s||t==="escape-key"||t==="close-press")&&e.focus(),this.dispatchEvent(new CustomEvent("db-popover:close",{detail:{reason:t},bubbles:!0}))}};N();customElements.get("db-popover")||customElements.define("db-popover",Hi);var zi=class extends z{constructor(){super(...arguments);h(this,"trigger",null);h(this,"content",null);h(this,"cleanupFloating",null);h(this,"showTimer",null);h(this,"hideTimer",null);h(this,"_open",!1);h(this,"onEnter",t=>{t.pointerType!=="touch"&&(this.clearTimers(),this._open||(this.showTimer=setTimeout(()=>this.show(),this.num("delay",200))))});h(this,"onLeave",t=>{t.pointerType!=="touch"&&(this.clearTimers(),this.hideTimer=setTimeout(()=>this.hide(),this.num("close-delay",100)))});h(this,"onContentEnter",()=>this.clearTimers());h(this,"onFocus",()=>{let t=!0;try{t=this.trigger.matches(":focus-visible")}catch{}t&&(this.clearTimers(),this.show())});h(this,"onBlur",()=>this.hide());h(this,"onPress",()=>this.hide());h(this,"onKey",t=>{t.key==="Escape"&&this._open&&(t.preventDefault(),t.stopImmediatePropagation(),this.hide())})}get open(){return this._open}num(t,e){let n=Number(this.getAttribute(t));return Number.isFinite(n)&&this.hasAttribute(t)?n:e}setup(){var e;if(this.trigger=bt($(this,"[data-part=\'trigger\']")),this.content=$(this,"[data-part=\'content\']"),!this.trigger||!this.content)return;(e=this.content).id||(e.id=F("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 n=vt(e);this.setState("open"),this.cleanupFloating=ft(t,e,{placement:this.getAttribute("placement")||e.dataset.side||"top",offset:8,strategy:n==="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,yt(this.content),this.setState("closed"),this.dispatchEvent(new CustomEvent("db-tooltip:close",{bubbles:!0})))}};N();customElements.get("db-tooltip")||customElements.define("db-tooltip",zi);var Ni="sidebar_state",ws="b",Es=768,Pt=new WeakMap;function xs(i){try{return localStorage.getItem(i)}catch{return null}}function As(i,t){try{localStorage.setItem(i,t)}catch{}}function Se(i){if(Pt.has(i))return;let t=i.querySelector("[data-component=\'sidebar\']");if(!t)return;let e=t.dataset.collapsible||"offcanvas",n=t.dataset.side||"left",s=t.dataset.defaultOpen!=="false",o=xs(Ni),r=o!==null?o==="true":s,a=t.querySelector("[data-sidebar-desktop]"),l=t.querySelector("[data-sidebar-mobile]"),c=t.querySelector("[data-sidebar-mobile-backdrop]"),d=window.matchMedia(`(max-width: ${Es-1}px)`),u={provider:i,sidebar:t,desktopSidebar:a,mobileSidebar:l,mobileBackdrop:c,collapsible:e,side:n,open:r,openMobile:!1,isMobile:d.matches,mediaQuery:d};Pt.set(i,u),_i(u);let f=b=>{u.isMobile=b.matches,!b.matches&&u.openMobile&&ot(i)};d.addEventListener("change",f);let m=b=>{b.key===ws&&(b.metaKey||b.ctrlKey)?(b.preventDefault(),xe(i)):b.key==="Escape"&&u.openMobile&&(b.preventDefault(),ot(i))};document.addEventListener("keydown",m),Ss(i,u),c&&c.addEventListener("click",()=>{ot(i)});let p=t.querySelector("[data-part=\'rail\']");p&&p.addEventListener("click",()=>{xe(i)})}function Ss(i,t){i.querySelectorAll("[data-part=\'sidebar-trigger\']").forEach(e=>{e.addEventListener("click",()=>{xe(i)})})}function xe(i){let t=Pt.get(i);t&&(t.isMobile?t.openMobile?ot(i):Cs(i):(t.open=!t.open,_i(t),As(Ni,String(t.open))))}function _i(i){let t=i.open?"expanded":"collapsed";i.provider.setAttribute("data-state",t),i.sidebar.setAttribute("data-state",t),i.desktopSidebar&&(i.desktopSidebar.setAttribute("data-state",t),i.open?i.desktopSidebar.setAttribute("data-collapsible",""):i.desktopSidebar.setAttribute("data-collapsible",i.collapsible))}function Cs(i){var n;let t=Pt.get(i);if(!t||t.openMobile||!t.mobileSidebar)return;t.openMobile=!0;let e=(n=t.desktopSidebar)==null?void 0:n.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),at.activate(),requestAnimationFrame(()=>{var o;let s=(o=t.mobileSidebar)==null?void 0:o.querySelector(\'a, button, [tabindex]:not([tabindex="-1"])\');s==null||s.focus()})}function ot(i){var s;let t=Pt.get(i);if(!t||!t.openMobile||!t.mobileSidebar)return;t.openMobile=!1;let e=(s=t.desktopSidebar)==null?void 0:s.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),at.deactivate();let n=t.provider.querySelector("[data-part=\'sidebar-trigger\']");n==null||n.focus()}function Ae(){document.querySelectorAll("[data-component=\'sidebar-provider\']").forEach(i=>{Se(i)})}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",Ae):Ae();document.addEventListener("astro:page-load",Ae);var Qt={docs:"docs.js",shard:i=>`t-${i}.js`,fragment:i=>`f-${i}.js`},Jt={docs:"docs",shard:i=>i,fragment:i=>`frag:${i}`};var Ls={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"},ks={icate:"ic",ative:"",alize:"al",iciti:"ic",ical:"ic",ful:"",ness:""},Ts="[^aeiou]",Le="[aeiouy]",rt="("+Ts+"[^aeiouy]*)",ee="("+Le+"[aeiou]*)",Ce=new RegExp("^"+rt+"?"+ee+rt),Os=new RegExp("^"+rt+"?"+ee+rt+ee+"?$"),te=new RegExp("^"+rt+"?("+ee+rt+"){2,}"),Pi=new RegExp("^"+rt+"?"+Le),Fi=new RegExp("^"+rt+Le+"[^aeiouwxy]$"),Ds=/ll$/,Rs=/^(.+?)e$/,Is=/^(.+?)y$/,Ms=/^(.+?(s|t))(ion)$/,Hs=/^(.+?)(ed|ing)$/,zs=/(at|bl|iz)$/,Ns=/^(.+?)eed$/,_s=/^.+?[^s]s$/,Ps=/^.+?(ss|i)es$/,Fs=/([^aeiouylsz])\\1$/,$s=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,Bs=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,qs=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/;function $i(i){let t=String(i).toLowerCase();if(t.length<3)return t;let e=!1;t.codePointAt(0)===121&&(e=!0,t="Y"+t.slice(1)),Ps.test(t)?t=t.slice(0,-2):_s.test(t)&&(t=t.slice(0,-1));let n;return(n=Ns.exec(t))?Ce.test(n[1])&&(t=t.slice(0,-1)):(n=Hs.exec(t))&&Pi.test(n[1])&&(t=n[1],zs.test(t)?t+="e":Fs.test(t)?t=t.slice(0,-1):Fi.test(t)&&(t+="e")),(n=Is.exec(t))&&Pi.test(n[1])&&(t=n[1]+"i"),(n=$s.exec(t))&&Ce.test(n[1])&&(t=n[1]+Ls[n[2]]),(n=Bs.exec(t))&&Ce.test(n[1])&&(t=n[1]+ks[n[2]]),(n=qs.exec(t))?te.test(n[1])&&(t=n[1]):(n=Ms.exec(t))&&te.test(n[1])&&(t=n[1]),(n=Rs.exec(t))&&(te.test(n[1])||Os.test(n[1])&&!Fi.test(n[1]))&&(t=n[1]),Ds.test(t)&&te.test(t)&&(t=t.slice(0,-1)),e&&(t="y"+t.slice(1)),t}var Bi=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(" ")),Ks=/[\\p{Script=Han}\\p{Script=Hiragana}\\p{Script=Katakana}\\p{Script=Hangul}]/u,Ft;function Ws(i){if(Ft===void 0)try{Ft=typeof Intl<"u"&&"Segmenter"in Intl?new Intl.Segmenter(void 0,{granularity:"word"}):null}catch{Ft=null}if(Ft)return[...Ft.segment(i)].filter(n=>n.isWordLike).map(n=>n.segment);let t=[...i];if(t.length<2)return t;let e=[];for(let n=0;n<t.length-1;n++)e.push(t[n]+t[n+1]);return e}function mt(i){let t=[];for(let e of i.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 n=e[0],s=n.split(/[._-]+/).filter(Boolean);if(s.length>1&&t.push(n),s.length>1&&!/[._]/.test(n)){let o=s.join("");o.length>=3&&!Bi.has(o)&&t.push(o)}for(let o of s)Ks.test(o)?t.push(...Ws(o)):o.length>=2&&!Bi.has(o)&&t.push(o)}return t}function ke(i,t){let e="";for(let n of i.slice(0,t))e+=/[a-z0-9]/.test(n)?n:`_${n.codePointAt(0).toString(16)}_`;return e}function $t(i){if(!(!i||!/^en(-|$)/i.test(i)))return t=>/^[a-z]{3,}$/.test(t)?$i(t):t}function Lt(i){let t=[],e=[],n=[],s=!1,o={tag:[],section:[]},r={tag:[],section:[]},a=[...i.matchAll(new RegExp(\'(?<!\\\\S)(-?)(tag|section):(?:"([^"]*)"?|(\\\\S*))|(-?)"([^"]*)"?|(\\\\S+)\',"gi"))].map(u=>{var f;return{facetNeg:u[1]==="-",facet:(f=u[2])==null?void 0:f.toLowerCase(),value:u[3]??u[4],neg:u[5],phrase:u[6],word:u[7]}}),l=!1,c=!1;for(let[u,f]of a.entries()){if(f.facet){let H=Yi(f.value??"");H&&(f.facetNeg?r:o)[f.facet].push(H);continue}let m=f.word;if(m==="OR"){c=t.length>0,s=!0;continue}if(m==="NOT"){l=!0,s=!0;continue}if(m==="AND"){s=!0;continue}let p=f.phrase!==void 0,b=l||f.neg==="-"||(m==null?void 0:m.startsWith("-"))&&m.length>1;l=!1;let g=p?f.phrase:b&&(m!=null&&m.startsWith("-"))?m.slice(1):m,y=[...new Set(mt(g))];if(!y.length){c=!1;continue}if(b){e.push(p?y:[y[0]]),s=!0,c=!1;continue}if(p){c=!1,s=!0,y.length>1&&n.push(mt(g).join(" "));for(let H of y)t.push({terms:[H],prefix:!1,exact:!0});continue}let w=u===a.length-1&&!/\\s$/.test(i);if(c){t[t.length-1].terms.push(y[0]);for(let H of y.slice(1))t.push({terms:[H],prefix:!1});c=!1;continue}let L=y[0],R=/[._-]/.test(L),M=L.replace(/-/g,"");for(let[H,O]of y.entries())t.push({terms:[O],prefix:w&&O.length>=2&&(H===y.length-1||R&&(O===L||O===M))})}let d=[...new Set(t.flatMap(u=>u.terms))];return{groups:t,not:e,phrases:n,strict:s,highlight:d,filters:o,notFilters:r}}async function js(i,t){let e=await t.meta(),n=typeof i=="string"?Lt(i):i,s=new Set;for(let c of n.not){let d;for(let u of c){let[f]=Vi(u,e),m=f?await t.shard(f):void 0,p=m&&Object.hasOwn(m,u)?m[u]:[],b=new Set;for(let g=0;g<p.length;g+=2)(!d||d.has(p[g]))&&b.add(p[g]);d=b}for(let u of d??[])s.add(u)}let o=Us(n,e);if(!n.groups.length){if(!o)return[];let c=[];return e.docs.forEach(([d,u,f],m)=>o(m)&&!s.has(m)&&c.push({id:m,title:d,url:u,section:e.sections[f]??"",score:1})),c}let r=[];for(let c of n.groups)r.push(await Xs(c,e,t));let a=c=>{let d=new Map,u=new Map;for(let m of r)for(let[p,b]of m)d.set(p,(d.get(p)??0)+b),u.set(p,(u.get(p)??0)+1);let f=[];for(let[m,p]of d){if(s.has(m)||o&&!o(m)||c==="and"&&u.get(m)!==r.length)continue;let[b,g,y]=e.docs[m];f.push({id:m,title:b,url:g,section:e.sections[y]??"",score:p*(u.get(m)/r.length)})}return f.sort((m,p)=>p.score-m.score)},l=a("and");return l.length||n.strict?l:a("or")}var Z={prefix:.6,stem:.4,titleAll:1.5,titleExact:2,headingAll:1.4,headingExact:1.8,phrase:1.5,typo:.3};function Vs(i,t){if(i===t)return!1;if(i.length===t.length){let o=[];for(let r=0;r<i.length&&o.length<=2;r++)i[r]!==t[r]&&o.push(r);return o.length===1?!0:o.length===2&&o[1]===o[0]+1&&i[o[0]]===t[o[1]]&&i[o[1]]===t[o[0]]}let[e,n]=i.length<t.length?[i,t]:[t,i];if(n.length-e.length!==1)return!1;let s=0;for(;s<e.length&&e[s]===n[s];)s++;return e.slice(s)===n.slice(s+1)}function Vi(i,t,e=!1){let n=Ys(t);for(let o=Math.min(i.length,Ki);o>=1;o--){let r=ke(i,o);if(n.has(r))return!e||o<i.length?[r]:[r,...t.shards.filter(a=>a.length>r.length&&a.startsWith(r)).slice(0,10)]}let s=ke(i,Math.min(i.length,Ki));return e?t.shards.filter(o=>o.startsWith(s)).slice(0,10):[]}var Ki=3,Wi=new WeakMap;function Ys(i){let t=Wi.get(i);return t||Wi.set(i,t=new Set(i.shards)),t}function Yi(i){return i.replace(/"/g,"").trim().toLowerCase()}function Us(i,t){let{tag:e,section:n}=i.filters,s=i.notFilters??{tag:[],section:[]};if(!e.length&&!n.length&&!s.tag.length&&!s.section.length)return;let o=(d,u)=>new Set(d.flatMap((f,m)=>u.includes(Yi(f))?[m]:[])),r=o(t.sections,n),a=o(t.tags??[],e),l=o(t.sections,s.section),c=o(t.tags??[],s.tag);return d=>{let u=t.docs[d],f=u[3]??[];return!(n.length&&!r.has(u[2])||e.length&&!f.some(m=>a.has(m))||l.has(u[2])||f.some(m=>c.has(m)))}}async function Xs(i,t,e){i.corrected=void 0;let n=$t(t.lang),s=new Map,o=new Map;for(let d of i.terms)for(let u of Vi(d,t,i.prefix)){let f=await e.shard(u);if(!f)continue;let m=(y,w)=>{w>(s.get(y)??0)&&(s.set(y,w),o.set(y,f))};Object.hasOwn(f,d)&&m(d,1);let p=n==null?void 0:n(d),b=p?p.slice(0,Math.max(3,p.length-1)):void 0,g=0;for(let y in f)y!==d&&(i.prefix&&y.startsWith(d)&&g++<200&&m(y,Z.prefix),p&&b&&y.startsWith(b)&&n(y)===p&&m(y,Z.stem));if(!s.size&&!i.exact&&d.length>=4&&!/[._-]/.test(d))for(let y in f)Math.abs(y.length-d.length)<=1&&Vs(d,y)&&m(y,Z.typo)}[...s.values()].some(d=>d===Z.typo)&&(i.corrected=[...s].filter(([,d])=>d===Z.typo).map(([d])=>d));let r=[...s].map(([d,u])=>[o.get(d)[d],u]),a=new Set;for(let[d]of r)for(let u=0;u<d.length;u+=2)a.add(d[u]);let l=Math.log(1+(t.count-a.size+.5)/(a.size+.5)),c=new Map;for(let[d,u]of r)for(let f=0;f<d.length;f+=2)c.set(d[f],Math.max(c.get(d[f])??0,d[f+1]*u*l));return c}async function Ui(i,t){var o;let e=await t.meta(),n=[...new Set(i.map(r=>Math.floor(r.id/e.block)))],s=new Map;await Promise.all(n.map(async r=>s.set(r,await t.fragment(r))));for(let r of i)r.fragment??(r.fragment=(o=s.get(Math.floor(r.id/e.block)))==null?void 0:o[r.id%e.block])}async function Gs(i,t,e,n=10){let s=t.slice(0,n);await Ui(s,e);let o=i.groups,r=$t((await e.meta()).lang),a=(l,c)=>c.terms.some(d=>l===d||c.prefix&&l.startsWith(d)||r!==void 0&&r(l)===r(d))||(c.corrected??[]).includes(l);for(let l of s){let[c,d]=l.fragment??["",[]],u=mt(l.title),f=1;o.length&&o.every(p=>u.some(b=>a(b,p)))&&(f=ji(u,o,a)?Z.titleExact:Z.titleAll);let m=[];for(let[p,b]of d){let g=mt(p);!o.length||!o.every(y=>g.some(w=>a(w,y)))||(m.push([p,b]),f=Math.max(f,ji(g,o,a)?Z.headingExact:Z.headingAll))}if(l.sections=m.slice(0,3),i.phrases.length){let p=[l.title,c,...d.map(([b])=>b)].map(b=>mt(b).join(" ")).join(" \\0 ");i.phrases.every(b=>p.includes(b))&&(f*=Z.phrase)}l.score*=f}return s.sort((l,c)=>c.score-l.score),[...s,...t.slice(n)]}async function Xi(i,t,e){await Ui(t,e);let n=$t((await e.meta()).lang),s=(o,r)=>r.terms.some(a=>o===a||r.prefix&&o.startsWith(a)||n!==void 0&&n(o)===n(a))||(r.corrected??[]).includes(o);for(let o of t)!o.fragment||o.sections||(o.sections=o.fragment[1].filter(([r])=>{let a=mt(r);return i.groups.length>0&&i.groups.every(l=>a.some(c=>s(c,l)))}).slice(0,3))}function ji(i,t,e){return i.every(n=>t.some(s=>e(n,s)))&&t.every(n=>i.some(s=>e(s,n)))}async function Gi(i,t,e=10){let n=Lt(i),s=$t((await t.meta()).lang);s&&(n.highlight=[...new Set([...n.highlight,...n.highlight.map(s).filter(r=>r.length>=3)])]);let o=await js(n,t);return n.highlight=[...new Set([...n.highlight,...n.groups.flatMap(r=>r.corrected??[])])],{parsed:n,results:await Gs(n,o,t,e)}}function Zi(i,t,e=globalThis){let n=new Map,s=e.__DOGSBAY_SEARCH__??{q:[],load(){}};for(let[l,c]of s.q)n.set(l,c);s.q=[],s.load=(l,c)=>void n.set(l,c),e.__DOGSBAY_SEARCH__=s;let o=async(l,c)=>(n.has(l)||await t(i+c),n.get(l)),r,a={meta:()=>r??(r=o(Jt.docs,Qt.docs).then(l=>{if(!l||l.format!==4)throw new Error(`search index format ${(l==null?void 0:l.format)??"missing"}, expected ${4}: rebuild the site`);return l})),shard:async l=>(await a.meta()).shards.includes(l)?o(Jt.shard(l),Qt.shard(l)):void 0,fragment:l=>o(Jt.fragment(l),Qt.fragment(l))};return a}function Qi(i){let t,e=new URL(i||"./",location.href).pathname;return async n=>{t??(t=import(new URL(`${i}pagefind/pagefind.js`,location.href).href).catch(d=>{throw t=void 0,d}));let s=n.replace(new RegExp(\'(?<!\\\\S)-?(tag|section):("[^"]*"?|\\\\S*)\',"gi")," ").trim(),o=s?await(await t).search(s):null,r=(o==null?void 0:o.results)??[],a=async(d,u)=>{let f=await d.data(),m=f.url.startsWith(e)?f.url.slice(e.length):f.url.replace(/^\\/+/,""),p=(f.sub_results??[]).map(b=>[b.title,b.url.split("#")[1]??""]).filter(([,b])=>b);return{id:u,title:f.meta.title??m,url:m,section:"",score:r.length-u,fragment:[Zs(f.excerpt),p],sections:p.slice(0,3)}},l=await Promise.all(r.slice(0,10).map(a)),c=Promise.all(r.slice(10,30).map((d,u)=>a(d,u+10)));return c.catch(()=>{}),{results:l,more:c,total:r.length,highlight:Lt(n).highlight}}}function Zs(i){return new DOMParser().parseFromString(i,"text/html").body.textContent??""}function Ji(i){let{signal:t}=i,e=document.getElementById("db-search");if(!e)return;let n=e.querySelector("[data-db-search-input]"),s=e.querySelector("[data-part=\'listbox\']"),o=e.querySelector("[data-db-search-status]"),r=o.textContent??"",a=Zi(`${i.unitRoot}_dogsbay/search/`,i.loadScript,window),l=document.body.dataset.search??"builtin",c=location.protocol!=="file:",d=l==="pagefind"||l==="both"&&c?Qi(i.unitRoot):void 0,u=l==="pagefind"&&!c;e.addEventListener("db-dialog:open",()=>{n.focus(),n.select(),u?o.textContent=s.dataset.needsServer??"":d||a.meta().catch(()=>o.textContent="Search index could not be loaded.")},{signal:t}),document.addEventListener("keydown",S=>{let x=S.target.closest("input, textarea, select, [contenteditable]");(S.key==="/"&&!x||S.key.toLowerCase()==="k"&&(S.metaKey||S.ctrlKey))&&(S.preventDefault(),e.open?n.focus():e.show())},{signal:t}),s.addEventListener("click",S=>{S.target.closest("a")&&e.close("api")},{signal:t});let f=0,m,p;n.addEventListener("input",()=>{clearTimeout(p),p=setTimeout(()=>void y(++f),80)},{signal:t});let b=new Map,g=typeof IntersectionObserver=="function"?new IntersectionObserver(S=>{var x;for(let E of S)E.isIntersecting&&((x=b.get(E.target))==null||x(),b.delete(E.target),g.unobserve(E.target))}):void 0,y=async S=>{let x=n.value.trim();if(!x){g==null||g.disconnect(),b.clear(),w.hidden=!0,s.replaceChildren(),o.textContent=r;return}if(!u)try{if(d){let E=await d(x);if(S!==f)return;O(x,E.results,E.highlight,E.total);let C=await E.more;S===f&&C.length&&v(x,C,E.highlight)}else{let E=await Gi(x,a);if(S!==f)return;m=E.parsed,O(x,E.results.slice(0,30),E.parsed.highlight,E.results.length,E.results)}}catch{S===f&&(o.textContent="Search index could not be loaded.")}},w=document.createElement("div");w.setAttribute("role","group"),w.setAttribute("aria-label",s.dataset.filterSection??"Filter by section"),w.className="flex flex-wrap gap-1 px-3 pb-2",w.hidden=!0,s.before(w),t==null||t.addEventListener("abort",()=>{clearTimeout(p),f++,g==null||g.disconnect(),b.clear(),w.remove()});let L=S=>S.replace(/"/g,""),R=S=>`section:"${L(S)}"`,M,H=(S,x)=>{let E=new Map;for(let k of x)k.section&&E.set(k.section,(E.get(k.section)??0)+1);let C=[...S.matchAll(/section:"([^"]*)"/gi)].map(k=>k[1].toLowerCase()),T=k=>C.includes(L(k).toLowerCase()),A=[...E].sort((k,D)=>D[1]-k[1]).slice(0,6).map(([k])=>k);for(let k of C)A.some(D=>L(D).toLowerCase()===k)||A.push(k);w.replaceChildren(...A.length>1||C.length?A.map(k=>{let D=document.createElement("button");D.type="button";let _=T(k);return D.setAttribute("aria-pressed",String(_)),D.className="rounded-full border px-2.5 py-0.5 text-xs hover:bg-accent aria-pressed:bg-primary aria-pressed:text-primary-foreground",D.textContent=k,D.addEventListener("click",()=>{let P=R(k),tt=n.value.replace(new RegExp(`\\\\s*section:"${L(k).replace(/[.*+?^${}()|[\\]\\\\]/g,"\\\\$&")}"`,"i"),"").trim();n.value=_?tt:`${tt} ${P}`.trim(),M=k,n.dispatchEvent(new Event("input",{bubbles:!0}))},{signal:t}),D}):[]),w.hidden=!w.childElementCount,M!==void 0&&(([...w.querySelectorAll("button")].find(D=>D.textContent===M)??n).focus(),M=void 0)},O=(S,x,E,C,T=x)=>{g==null||g.disconnect(),b.clear(),H(S,T),s.replaceChildren(...q(S,x,E)),o.textContent=C?`${C} result${C===1?"":"s"}`:`${s.dataset.noResults} \\u201C${S}\\u201D`},v=(S,x,E)=>s.append(...q(S,x,E)),q=(S,x,E)=>{let C=[];for(let T of x){let A=I(T.url,E,"block rounded-md p-3 hover:bg-accent"),k=document.createElement("div");if(k.className="font-medium",k.append(...Te(T.title,E)),A.a.appendChild(k),T.section){let P=document.createElement("div");P.className="text-xs text-muted-foreground",P.textContent=T.section,A.a.appendChild(P)}let D=document.createElement("div");D.className="mt-1 line-clamp-2 text-xs text-muted-foreground",A.a.appendChild(D),C.push(A.li);let _=()=>T.fragment?(T.fragment[0]&&D.replaceChildren(...Te(T.fragment[0],E)),(T.sections??[]).map(([P,tt])=>{let qt=I(`${T.url}#${tt}`,E,"ml-4 block rounded-md border-l px-3 py-1.5 text-sm hover:bg-accent");return qt.a.append(...Te(P,E)),qt.li})):[];if(T.fragment)C.push(..._());else if(g){let P=m??Lt(S);b.set(A.li,()=>void Xi(P,[T],a).then(()=>A.li.after(..._()),()=>{})),g.observe(A.li)}}return C},I=(S,x,E)=>{let C=document.createElement("li");C.setAttribute("role","none"),C.className="mb-1";let T=document.createElement("a");return T.setAttribute("data-part","option"),T.dataset.value=S,T.href=Qs(i.unitRoot+S,x),T.tabIndex=-1,T.className=E,C.appendChild(T),{li:C,a:T}}}function Qs(i,t){if(!t.length)return i;let e=i.indexOf("#"),[n,s]=e<0?[i,""]:[i.slice(0,e),i.slice(e)];return`${n}${n.includes("?")?"&":"?"}h=${encodeURIComponent(t.join(" "))}${s}`}function Te(i,t){if(!t.length)return[document.createTextNode(i)];let e=new RegExp(`(${t.map(n=>n.replace(/[.*+?^${}()|[\\]\\\\]/g,"\\\\$&")).join("|")})`,"gi");return i.split(e).map((n,s)=>{if(s%2===0)return document.createTextNode(n);let o=document.createElement("mark");return o.textContent=n,o})}var tn=/[\\p{Script=Han}\\p{Script=Hiragana}\\p{Script=Katakana}\\p{Script=Hangul}]/u;function en(i){var b;let t;try{t=(new URLSearchParams(location.search).get("h")??"").split(/\\s+/).filter(g=>g.length>0)}catch{return}let e=document.querySelector("#db-content article")??document.querySelector("#db-content");if(!t.length||!e)return;let n=g=>g.replace(/[.*+?^${}()|[\\]\\\\]/g,"\\\\$&"),s=[...t].sort((g,y)=>y.length-g.length),o=s.filter(g=>tn.test(g)).map(n),r=s.filter(g=>!tn.test(g)).map(n),a=[r.length?`(?<![\\\\p{L}\\\\p{N}])(?:${r.join("|")})`:"",o.length?`(?:${o.join("|")})`:""].filter(Boolean),l=new RegExp(`(${a.join("|")})`,"giu"),c=[],d=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,{acceptNode:g=>{var y;return(y=g.parentElement)!=null&&y.closest("script, style, mark, button, [aria-hidden=\'true\']")?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}}),u=[];for(let g=d.nextNode();g;g=d.nextNode())u.push(g);for(let g of u){if(c.length>=500)break;let y=g.data;if(l.lastIndex=0,!l.test(y))continue;l.lastIndex=0;let w=document.createDocumentFragment(),L=0;for(let R of y.matchAll(l)){w.append(y.slice(L,R.index));let M=document.createElement("mark");M.className="db-search-hl",M.textContent=R[0],w.append(M),c.push(M),L=R.index+R[0].length}w.append(y.slice(L)),g.replaceWith(w)}if(Js(),!c.length)return;let f=((b=document.querySelector("[data-clear-highlights]"))==null?void 0:b.dataset.clearHighlights)??"Clear highlights",m=document.createElement("div");m.className="not-prose mb-4";let p=document.createElement("button");p.type="button",p.className="inline-flex h-8 items-center rounded-md border px-3 text-sm hover:bg-accent",p.textContent=f,p.addEventListener("click",()=>{var g;for(let y of c)y.replaceWith(document.createTextNode(y.textContent??""));e.normalize(),m.remove(),(g=document.getElementById("db-content"))==null||g.focus({preventScroll:!0})},{signal:i}),m.append(p),e.prepend(m),location.hash||c[0].scrollIntoView({block:"center"})}function Js(){try{let i=new URL(location.href);i.searchParams.delete("h"),history.replaceState(history.state,"",i.toString())}catch{}}var pt=Object.assign||function(i){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(i[n]=e[n])}return i},ie=function(t){return t.tagName==="IMG"},to=function(t){return NodeList.prototype.isPrototypeOf(t)},ne=function(t){return t&&t.nodeType===1},nn=function(t){var e=t.currentSrc||t.src;return e.substr(-4).toLowerCase()===".svg"},sn=function(t){try{return Array.isArray(t)?t.filter(ie):to(t)?[].slice.call(t).filter(ie):ne(t)?[t].filter(ie):typeof t=="string"?[].slice.call(document.querySelectorAll(t)).filter(ie):[]}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`)}},eo=function(t){var e=document.createElement("div");return e.classList.add("medium-zoom-overlay"),e.style.background=t,e},io=function(t){var e=t.getBoundingClientRect(),n=e.top,s=e.left,o=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=n+l+"px",a.style.left=s+c+"px",a.style.width=o+"px",a.style.height=r+"px",a.style.transform="",a},kt=function(t,e){var n=pt({bubbles:!1,cancelable:!1,detail:void 0},e);if(typeof window.CustomEvent=="function")return new CustomEvent(t,n);var s=document.createEvent("CustomEvent");return s.initCustomEvent(t,n.bubbles,n.cancelable,n.detail),s},no=function i(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=window.Promise||function(x){function E(){}x(E,E)},s=function(x){var E=x.target;if(E===q){p();return}L.indexOf(E)!==-1&&b({target:E})},o=function(){if(!(M||!v.original)){var x=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0;Math.abs(H-x)>O.scrollOffset&&setTimeout(p,150)}},r=function(x){var E=x.key||x.keyCode;(E==="Escape"||E==="Esc"||E===27)&&p()},a=function(){var x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},E=x;if(x.background&&(q.style.background=x.background),x.container&&x.container instanceof Object&&(E.container=pt({},O.container,x.container)),x.template){var C=ne(x.template)?x.template:document.querySelector(x.template);E.template=C}return O=pt({},O,E),L.forEach(function(T){T.dispatchEvent(kt("medium-zoom:update",{detail:{zoom:I}}))}),I},l=function(){var x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return i(pt({},O,x))},c=function(){for(var x=arguments.length,E=Array(x),C=0;C<x;C++)E[C]=arguments[C];var T=E.reduce(function(A,k){return[].concat(A,sn(k))},[]);return T.filter(function(A){return L.indexOf(A)===-1}).forEach(function(A){L.push(A),A.classList.add("medium-zoom-image")}),R.forEach(function(A){var k=A.type,D=A.listener,_=A.options;T.forEach(function(P){P.addEventListener(k,D,_)})}),I},d=function(){for(var x=arguments.length,E=Array(x),C=0;C<x;C++)E[C]=arguments[C];v.zoomed&&p();var T=E.length>0?E.reduce(function(A,k){return[].concat(A,sn(k))},[]):L;return T.forEach(function(A){A.classList.remove("medium-zoom-image"),A.dispatchEvent(kt("medium-zoom:detach",{detail:{zoom:I}}))}),L=L.filter(function(A){return T.indexOf(A)===-1}),I},u=function(x,E){var C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return L.forEach(function(T){T.addEventListener("medium-zoom:"+x,E,C)}),R.push({type:"medium-zoom:"+x,listener:E,options:C}),I},f=function(x,E){var C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return L.forEach(function(T){T.removeEventListener("medium-zoom:"+x,E,C)}),R=R.filter(function(T){return!(T.type==="medium-zoom:"+x&&T.listener.toString()===E.toString())}),I},m=function(){var x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},E=x.target,C=function(){var A={width:document.documentElement.clientWidth,height:document.documentElement.clientHeight,left:0,top:0,right:0,bottom:0},k=void 0,D=void 0;if(O.container)if(O.container instanceof Object)A=pt({},A,O.container),k=A.width-A.left-A.right-O.margin*2,D=A.height-A.top-A.bottom-O.margin*2;else{var _=ne(O.container)?O.container:document.querySelector(O.container),P=_.getBoundingClientRect(),tt=P.width,qt=P.height,ln=P.left,cn=P.top;A=pt({},A,{width:tt,height:qt,left:ln,top:cn})}k=k||A.width-O.margin*2,D=D||A.height-O.margin*2;var Ot=v.zoomedHd||v.original,dn=nn(Ot)?k:Ot.naturalWidth||k,un=nn(Ot)?D:Ot.naturalHeight||D,Kt=Ot.getBoundingClientRect(),hn=Kt.top,fn=Kt.left,ae=Kt.width,le=Kt.height,mn=Math.min(Math.max(ae,dn),k)/ae,pn=Math.min(Math.max(le,un),D)/le,ce=Math.min(mn,pn),gn=(-fn+(k-ae)/2+O.margin+A.left)/ce,bn=(-hn+(D-le)/2+O.margin+A.top)/ce,Re="scale("+ce+") translate3d("+gn+"px, "+bn+"px, 0)";v.zoomed.style.transform=Re,v.zoomedHd&&(v.zoomedHd.style.transform=Re)};return new n(function(T){if(E&&L.indexOf(E)===-1){T(I);return}var A=function tt(){M=!1,v.zoomed.removeEventListener("transitionend",tt),v.original.dispatchEvent(kt("medium-zoom:opened",{detail:{zoom:I}})),T(I)};if(v.zoomed){T(I);return}if(E)v.original=E;else if(L.length>0){var k=L;v.original=k[0]}else{T(I);return}if(v.original.dispatchEvent(kt("medium-zoom:open",{detail:{zoom:I}})),H=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,M=!0,v.zoomed=io(v.original),document.body.appendChild(q),O.template){var D=ne(O.template)?O.template:document.querySelector(O.template);v.template=document.createElement("div"),v.template.appendChild(D.content.cloneNode(!0)),document.body.appendChild(v.template)}if(v.original.parentElement&&v.original.parentElement.tagName==="PICTURE"&&v.original.currentSrc&&(v.zoomed.src=v.original.currentSrc),document.body.appendChild(v.zoomed),window.requestAnimationFrame(function(){document.body.classList.add("medium-zoom--opened")}),v.original.classList.add("medium-zoom-image--hidden"),v.zoomed.classList.add("medium-zoom-image--opened"),v.zoomed.addEventListener("click",p),v.zoomed.addEventListener("transitionend",A),v.original.getAttribute("data-zoom-src")){v.zoomedHd=v.zoomed.cloneNode(),v.zoomedHd.removeAttribute("srcset"),v.zoomedHd.removeAttribute("sizes"),v.zoomedHd.removeAttribute("loading"),v.zoomedHd.src=v.zoomed.getAttribute("data-zoom-src"),v.zoomedHd.onerror=function(){clearInterval(_),console.warn("Unable to reach the zoom image target "+v.zoomedHd.src),v.zoomedHd=null,C()};var _=setInterval(function(){v.zoomedHd.complete&&(clearInterval(_),v.zoomedHd.classList.add("medium-zoom-image--opened"),v.zoomedHd.addEventListener("click",p),document.body.appendChild(v.zoomedHd),C())},10)}else if(v.original.hasAttribute("srcset")){v.zoomedHd=v.zoomed.cloneNode(),v.zoomedHd.removeAttribute("sizes"),v.zoomedHd.removeAttribute("loading");var P=v.zoomedHd.addEventListener("load",function(){v.zoomedHd.removeEventListener("load",P),v.zoomedHd.classList.add("medium-zoom-image--opened"),v.zoomedHd.addEventListener("click",p),document.body.appendChild(v.zoomedHd),C()})}else C()})},p=function(){return new n(function(x){if(M||!v.original){x(I);return}var E=function C(){v.original.classList.remove("medium-zoom-image--hidden"),document.body.removeChild(v.zoomed),v.zoomedHd&&document.body.removeChild(v.zoomedHd),document.body.removeChild(q),v.zoomed.classList.remove("medium-zoom-image--opened"),v.template&&document.body.removeChild(v.template),M=!1,v.zoomed.removeEventListener("transitionend",C),v.original.dispatchEvent(kt("medium-zoom:closed",{detail:{zoom:I}})),v.original=null,v.zoomed=null,v.zoomedHd=null,v.template=null,x(I)};M=!0,document.body.classList.remove("medium-zoom--opened"),v.zoomed.style.transform="",v.zoomedHd&&(v.zoomedHd.style.transform=""),v.template&&(v.template.style.transition="opacity 150ms",v.template.style.opacity=0),v.original.dispatchEvent(kt("medium-zoom:close",{detail:{zoom:I}})),v.zoomed.addEventListener("transitionend",E)})},b=function(){var x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},E=x.target;return v.original?p():m({target:E})},g=function(){return O},y=function(){return L},w=function(){return v.original},L=[],R=[],M=!1,H=0,O=e,v={original:null,zoomed:null,zoomedHd:null,template:null};Object.prototype.toString.call(t)==="[object Object]"?O=t:(t||typeof t=="string")&&c(t),O=pt({margin:0,background:"#fff",scrollOffset:40,container:null,template:null},O);var q=eo(O.background);document.addEventListener("click",s),document.addEventListener("keyup",r),document.addEventListener("scroll",o),window.addEventListener("resize",p);var I={open:m,close:p,toggle:b,update:a,clone:l,attach:c,detach:d,on:u,off:f,getOptions:g,getImages:y,getZoomedImage:w};return I};function so(i,t){t===void 0&&(t={});var e=t.insertAt;if(!(!i||typeof document>"u")){var n=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.type="text/css",e==="top"&&n.firstChild?n.insertBefore(s,n.firstChild):n.appendChild(s),s.styleSheet?s.styleSheet.cssText=i:s.appendChild(document.createTextNode(i))}}var oo=".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}";so(oo);var on=no;var ro;function rn(i){let t=document.body.dataset.imageZoom;if(!t)return;let e;try{e=JSON.parse(t)}catch{return}let n=[...document.querySelectorAll(\'img[data-zoomable="true"]\')];if(!n.length)return;let s=ro??(ro=on());s.update(e),s.attach(...n),i==null||i.addEventListener("abort",()=>{s.close(),s.detach(...n)});let o={signal:i},r=!1,a=l=>l.key==="Enter"||l.key===" ";for(let l of n)l.alt&&(l.tabIndex=0,l.addEventListener("keydown",c=>{a(c)&&(c.preventDefault(),r=!0,s.open({target:l}))},o),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(),s.close())}),c.focus())},o),l.addEventListener("medium-zoom:closed",()=>{r&&l.focus(),r=!1},o))}function se(i){return!/^[\\x00-\\x20]*([a-z][a-z0-9+.-]*:|[\\\\/])/i.test(i.replace(/[\\t\\n\\r]/g,""))}var Oe=new Map;function an(i){let t=Oe.get(i);return t||(t=new Promise((e,n)=>{let s=document.createElement("script");s.src=i,s.onload=()=>e(),s.onerror=()=>{Oe.delete(i),n(new Error(`could not load ${i}`))},document.head.appendChild(s)}),Oe.set(i,t)),t}function ao(i){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 n=!document.documentElement.classList.contains("dark");document.documentElement.classList.toggle("dark",n);try{localStorage.setItem("theme",n?"dark":"light")}catch{}e()},{signal:i})})}function lo(i){document.addEventListener("click",async t=>{var s,o,r,a;let e=t.target.closest("[data-copy-markdown]");if(!e)return;let n=(((s=document.getElementById("db-page-markdown"))==null?void 0:s.textContent)??"").replace(/<\\\\\\/(script)/gi,"</$1").replace(/<\\\\!--/g,"<!--");try{await navigator.clipboard.writeText(n);let l=(o=e.dataset).label??(o.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:i})}function co(i,t){let e=document.body.dataset.page??"index.html";document.querySelectorAll("select[data-db-switch]").forEach(n=>{n.addEventListener("change",async()=>{var a;let s=n.selectedOptions[0];if(!s||s.disabled||!s.hasAttribute("value"))return;let o=s.dataset.prefix??"",r=n.value;if(s.hasAttribute("data-link")){(se(r)||/^https?:\\/\\//i.test(r))&&(location.href=r);return}if(!(!se(r)||!se(o))){if(n.dataset.dbSwitch==="product"){location.href=r;return}try{let l=o?`${i}${o}/`:i;await an(`${l}_dogsbay/pages.js`);let c=(a=window.__DOGSBAY_PAGES__)==null?void 0:a[o];location.href=c&&!c.includes(e)?`${l}index.html`:r}catch{location.href=r}}},{signal:t})})}function uo(i){document.addEventListener("click",t=>{var n;let e=t.target.closest("a.db-anchor");!e||location.protocol==="file:"||(n=navigator.clipboard)==null||n.writeText(e.href).catch(()=>{})},{signal:i})}var Bt=new Map,re=new Set;function oe(){for(let[i,t]of Bt)i.isConnected||(ot(i),t.abort(),Bt.delete(i));for(let i of re)i.isConnected||ot(i)}function ho(i,t){let e=EventTarget.prototype,n=e.addEventListener,s=0;e.addEventListener=function(o,r,a){s++;let l=typeof a=="object"?a.signal:void 0;n.call(this,o,r,typeof a=="object"?{...a,signal:l?AbortSignal.any([l,i]):i}:{capture:a===!0,signal:i})};try{t()}finally{e.addEventListener=n}return s}function fo(){oe(),document.querySelectorAll("[data-component=\'sidebar-provider\']").forEach(i=>{if(Bt.has(i)||re.has(i))return;let t=new AbortController;ho(t.signal,()=>Se(i))?Bt.set(i,t):i.querySelector("[data-component=\'sidebar\']")&&re.add(i)}),document.removeEventListener("keydown",oe),document.addEventListener("keydown",oe)}var Tt;function De(i={}){Tt==null||Tt.unmount();let t=new AbortController,{signal:e}=t,n=document.body,s=n.dataset.unitRoot??"",o=n.dataset.siteRoot??"";i.nav!==void 0&&(window.__DOGSBAY_NAV__=i.nav),fo(),i.theme!==!1&&ao(e),lo(e),i.switchers!==!1&&co(o,e),uo(e),i.search!==!1&&Ji({unitRoot:s,loadScript:an,signal:e}),en(e),rn(e);let r={unmount(){if(!e.aborted){t.abort();for(let a of[...Bt.keys(),...re])ot(a);oe(),Tt===r&&(Tt=void 0)}}};return Tt=r}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>De()):De();})();\n';
|
|
1347
|
+
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 }}">\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{% 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 }}\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 }}">\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{% 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/blog-index.html": '{#- A blog index page (BlogIndex.astro): post cards, newest first, and links between index pages. Context: blog = {heading, posts: [{title, href, description, authors, date, datetime, minutes, hero}], newer, older (links or empty), pageLabel}, t. -#}\n<h1 class="text-3xl font-bold tracking-tight mb-8">{{ blog.heading }}</h1>\n{%- if not blog.posts %}\n<p class="text-muted-foreground">{{ t("noPosts") }}</p>\n{%- endif %}\n<ul class="not-prose grid list-none grid-cols-1 items-stretch gap-6 p-0 sm:grid-cols-2 lg:grid-cols-3" data-blog-index>\n{%- for post in blog.posts %}\n<li class="m-0 p-0"><a href="{{ post.href }}" class="group block h-full rounded-lg no-underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"><div class="rounded-lg border bg-card text-card-foreground shadow-sm flex h-full flex-col gap-3 p-5 transition-colors group-hover:border-ring">\n{%- if post.hero %}<img src="{{ post.hero }}" alt="" class="aspect-[16/9] w-full rounded-md border border-border object-cover" loading="lazy" decoding="async">{% endif -%}\n<h2 class="text-lg font-semibold leading-snug tracking-tight text-foreground group-hover:underline">{{ post.title }}</h2>\n<div class="flex flex-wrap items-center gap-x-2 gap-y-1 text-xs text-muted-foreground" data-pagefind-ignore>\n{%- if post.authors %}<span class="font-medium text-foreground">{{ post.authors }}</span>{% endif -%}\n{%- if post.authors and post.date %}<span aria-hidden="true">·</span>{% endif -%}\n{%- if post.date %}<time datetime="{{ post.datetime }}">{{ post.date }}</time>{% endif -%}\n{%- if post.authors or post.date %}<span aria-hidden="true">·</span>{% endif -%}\n<span>{{ post.minutes }}</span></div>\n{%- if post.description %}<p class="m-0 text-sm leading-relaxed text-muted-foreground">{{ post.description }}</p>{% endif -%}\n</div></a></li>\n{%- endfor %}\n</ul>\n{%- if blog.newer or blog.older %}\n<nav class="not-prose mt-12 flex items-center justify-between" aria-label="{{ t("blogPages") }}">\n{%- if blog.newer %}<a href="{{ blog.newer }}" class="text-sm text-foreground no-underline hover:underline" rel="prev">← {{ t("newerPosts") }}</a>{% else %}<span></span>{% endif -%}\n<span class="text-sm text-muted-foreground">{{ blog.pageLabel }}</span>\n{%- if blog.older %}<a href="{{ blog.older }}" class="text-sm text-foreground no-underline hover:underline" rel="next">{{ t("olderPosts") }} →</a>{% else %}<span></span>{% endif -%}\n</nav>\n{%- endif %}\n', "partials/breadcrumb.html": `{#- Breadcrumb trail (hidden below two items). Context: breadcrumbs = [{label, href?}], t. -#}
|
|
1290
1348
|
{%- if breadcrumbs | length >= 2 -%}
|
|
1291
1349
|
<nav aria-label="{{ t("breadcrumb") }}" class="mb-4 text-sm text-muted-foreground"><ol class="m-0 flex list-none flex-wrap gap-1.5 p-0">
|
|
1292
1350
|
{%- for item in breadcrumbs -%}
|
|
@@ -1362,7 +1420,7 @@ var THEME_TEMPLATES = { "layouts/blank.html": '{# A page without the sidebar or
|
|
|
1362
1420
|
{% endif -%}
|
|
1363
1421
|
{%- endset -%}
|
|
1364
1422
|
{{- head_tags | trim -}}
|
|
1365
|
-
`, "partials/sidebar-header.html": '<div class="flex flex-col gap-2 p-2" data-sidebar="header">\n<ul class="flex w-full min-w-0 flex-col gap-0" data-sidebar="menu">\n<li class="group/menu-item relative">\n<a href="{{ paths.home }}" class="peer/menu-button group/menu-button flex h-12 w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>span:last-child]:truncate [&_svg]:size-4 [&_svg]:shrink-0 group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-0" data-sidebar="menu-button" data-size="lg">\n<div class="flex aspect-square size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground">{{ logo }}</div>\n<div class="grid flex-1 text-left text-sm leading-tight"><span class="truncate font-semibold">{{ site.name }}</span><span class="truncate text-xs text-sidebar-foreground/70">{{ site.tagline }}</span></div>\n</a>\n</li>\n</ul>\n</div>\n', "partials/switcher.html": '{#-
|
|
1423
|
+
`, "partials/sidebar-header.html": '<div class="flex flex-col gap-2 p-2" data-sidebar="header">\n<ul class="flex w-full min-w-0 flex-col gap-0" data-sidebar="menu">\n<li class="group/menu-item relative">\n<a href="{{ paths.home }}" class="peer/menu-button group/menu-button flex h-12 w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>span:last-child]:truncate [&_svg]:size-4 [&_svg]:shrink-0 group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-0" data-sidebar="menu-button" data-size="lg">\n<div class="flex aspect-square size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground">{{ logo }}</div>\n<div class="grid flex-1 text-left text-sm leading-tight"><span class="truncate font-semibold">{{ site.name }}</span><span class="truncate text-xs text-sidebar-foreground/70">{{ site.tagline }}</span></div>\n</a>\n</li>\n</ul>\n</div>\n', "partials/switcher.html": '{#- Product, version or language switcher: a native <select> upgraded by db-select (the no-JS fallback is kept).\n Context: switcher = {kind: "product" | "locale" | "version", label, options: [{label, href, current, prefix, note?, disabled?, link?}]}.\n A `link` option (versionMenu.links) goes straight to its page; db-select copies data-link to its item, which ssg.css draws a line above. -#}\n{%- if switcher.options | length >= 2 -%}\n<db-select class="db-switch db-switch-{{ switcher.kind }}"><select data-db-switch="{{ switcher.kind }}" aria-label="{{ switcher.label }}" class="rounded-md border border-border bg-background px-2 py-1.5 text-sm">\n{%- for o in switcher.options -%}\n<option{% if o.href %} value="{{ o.href }}"{% endif %}{% if o.current %} selected{% endif %}{% if o.disabled is defined and o.disabled %} disabled{% endif %}{% if o.link is defined and o.link %} data-link{% endif %}{% if o.prefix %} data-prefix="{{ o.prefix }}"{% endif %}>{{ o.label }}{% if o.note %} ({{ o.note }}){% endif %}</option>\n{%- endfor -%}\n</select></db-select>\n{%- endif -%}\n', "partials/tags.html": '{#- The meta strip (DocsLayout): type and status badges (TypeBadge, StatusBadge), then the tag chips (TagList.astro). Context: badges = [{label, cls, href, attr, value}], tags (the values), and tagChips = [{tag, label, prefix, href, cls}] when chips link to term pages or carry colours and labels (taxonomies.tags); otherwise tags render as plain chips. -#}\n{%- set badges = badges if badges is defined else [] -%}\n{%- if badges or tags -%}\n<div class="not-prose mb-6 flex flex-wrap items-center gap-2" data-page-meta-strip>\n{%- for b in badges -%}\n{% if b.href %}<a href="{{ b.href }}" class="{{ b.cls }}" {{ b.attr }}="{{ b.value }}">{{ b.label }}</a>{% else %}<span class="{{ b.cls }}" {{ b.attr }}="{{ b.value }}">{{ b.label }}</span>{% endif %}\n{%- endfor -%}\n{%- if tagChips is defined and tagChips -%}\n<ul class="not-prose m-0 flex list-none flex-wrap items-center gap-1.5 p-0 text-xs" data-tag-list aria-label="Tags">\n{%- for chip in tagChips -%}\n<li>{% if chip.href %}<a href="{{ chip.href }}" class="{{ chip.cls }}" data-tag="{{ chip.tag }}">{% else %}<span class="{{ chip.cls }}" data-tag="{{ chip.tag }}">{% endif -%}\n{%- if chip.prefix %}<span>{{ chip.prefix }}:</span><span class="font-semibold">{{ chip.label }}</span>{% else %}<span aria-hidden="true">#</span><span>{{ chip.label }}</span>{% endif -%}\n{%- if chip.href %}</a>{% else %}</span>{% endif %}</li>\n{%- endfor -%}\n</ul>\n{%- elif tags -%}\n<ul class="not-prose m-0 flex list-none flex-wrap items-center gap-1.5 p-0 text-xs" data-tag-list aria-label="Tags">\n{%- for tag in tags -%}\n<li><span class="inline-flex items-center gap-1 rounded-full border border-border bg-secondary px-2 py-0.5 font-medium text-secondary-foreground"><span aria-hidden="true">#</span><span>{{ tag }}</span></span></li>\n{%- endfor -%}\n</ul>\n{%- endif -%}\n</div>\n{%- endif -%}\n', "partials/taxonomy-index.html": `{#- A taxonomy's index page (TaxonomyIndex.astro): all terms with their page counts, as a tree when the taxonomy is hierarchical. Context: taxonomy = {name, title, summary, hierarchical, terms: [{label, href, count, children: [{label, href, count}]}]}. -#}
|
|
1366
1424
|
<section class="mx-auto max-w-3xl px-6 py-8" data-taxonomy-index data-taxonomy="{{ taxonomy.name }}">
|
|
1367
1425
|
<header class="mb-6"><h1 class="text-3xl font-bold tracking-tight">{{ taxonomy.title }}</h1><p class="mt-2 text-sm text-muted-foreground">{{ taxonomy.summary }}</p></header>
|
|
1368
1426
|
{%- if taxonomy.hierarchical %}
|
|
@@ -1407,36 +1465,36 @@ var THEME_TEMPLATES = { "layouts/blank.html": '{# A page without the sidebar or
|
|
|
1407
1465
|
<p class="text-sm text-muted-foreground">{{ t("noTaggedPages") }}</p>
|
|
1408
1466
|
{%- endif %}
|
|
1409
1467
|
</section>
|
|
1410
|
-
`, "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' };
|
|
1411
|
-
var CLIENT_CANDIDATES = ['""', '"&"', '"\\\\$&")).join("|")})', '"\\\\$&")}"', '"s"}', "#db-content", "([^", "(here", "(index.ts)", "./", "./elements.js", "./highlight.js", "./image-zoom.js", "./mount.js", "./pagefind.js", "./search.js", "./targets.js", ".medium-zoom-image--opened", "/g,", "<!--", "</", "</$1", "<\\/", "<db-combobox", "<db-dialog", "<script>", "===", "=>", "?h=<terms>", "?|\\S*)/gi,", "@dogsbay/elements/db-accordion", "@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/query", "@dogsbay/ssg/client", "@dogsbay/ui/sidebar/sidebar.ts", "Clear", "Copied", "DOMContentLoaded", "Enter", "Filter", "Search", "[^", "[aria-hidden='true']", "[contenteditable]", "[data-clear-highlights]", "[data-component='sidebar']", "[data-component='sidebar-provider']", "[data-component='theme-toggle']", "[data-copy-markdown]", "[data-db-search-input]", "[data-db-search-status]", "[data-part='listbox']", "\\\\$&", "_dogsbay", "_dogsbay/nav.js", "a.db-anchor", "abort", "api", "aria-label", "aria-pressed", "aria-pressed:bg-primary", "aria-pressed:text-primary-foreground", "article", "be", "block", "border", "border-l", "both", "builtin", "button", "button,", "by", "center", "change", "click", "close-press", "could", "dark", "data", "data-part", "db-content", "db-dialog:open", "db-page-markdown", "db-popover", "db-search", "db-search-hl", "div", "file:", 'filter="none"', "flex", "flex-wrap", "fn", "folder", "font-medium", "fullNavLimit", "function", "gap-1", "gi", "giu", "group", "h-8", "highlights", "host", "hover:bg-accent", "https:", 'id="db-search">', 'img[data-zoomable="true"]', "index", "index.html", "inline-flex", "inline>", "input", "input,", "inst", "installing", "items-center", "javascript:", "keydown", "li", "light", "line-clamp-2", "load", "loaded.", "loading", "loads.", "mark", "mark,", "mb-1", "mb-4", "medium-zoom", "medium-zoom:closed", "medium-zoom:opened", "ml-4", "mount()", "mounts", "mt-1", "none", "not", "not-prose", "object", "once", "option", "own", "p-3", "page", "page.html#id", "page.html?h=terms#id", "pagefind", "pb-2", "puts", "px-2.5", "px-3", "py-0.5", "py-1.5", "readDataScript:", "role", "rounded-full", "rounded-md", "script", "script,", "section", "select,", "select[data-db-switch]", "signal", "ssg.search:", "style,", "text-muted-foreground", "text-sm", "text-xs", "text/html", "textarea,", "that", "the", "theme", "true", "unit", "unmount()", "when", "window.__DOGSBAY_NAV__"];
|
|
1468
|
+
`, "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' };
|
|
1469
|
+
var CLIENT_CANDIDATES = ['""', '"&"', '"\\\\$&")).join("|")})', '"\\\\$&")}"', '"s"}', "#db-content", "([^", "(here", "(index.ts)", "./", "./elements.js", "./highlight.js", "./image-zoom.js", "./mount.js", "./pagefind.js", "./search.js", "./targets.js", ".medium-zoom-image--opened", "/g,", "<!--", "</", "</$1", "<\\/", "<db-combobox", "<db-dialog", "<script>", "===", "=>", "?h=<terms>", "?|\\S*)/gi,", "@dogsbay/elements/db-accordion", "@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/query", "@dogsbay/ssg/client", "@dogsbay/ui/sidebar/sidebar.ts", "All", "Clear", "Copied", "DOMContentLoaded", "Enter", "Filter", "Product", "Search", "[^", "[aria-hidden='true']", "[contenteditable]", "[data-clear-highlights]", "[data-component='sidebar']", "[data-component='sidebar-provider']", "[data-component='theme-toggle']", "[data-copy-markdown]", "[data-db-search-input]", "[data-db-search-status]", "[data-part='listbox']", "\\\\$&", "_dogsbay", "_dogsbay/nav.js", "a.db-anchor", "abort", "api", "aria-label", "aria-pressed", "aria-pressed:bg-primary", "aria-pressed:text-primary-foreground", "article", "be", "block", "border", "border-l", "both", "builtin", "button", "button,", "by", "center", "change", "click", "close-press", "could", "dark", "data", "data-link", "data-part", "db-content", "db-dialog:open", "db-page-markdown", "db-popover", "db-search", "db-search-hl", "disabled", "div", "file:", 'filter="none"', "flex", "flex-wrap", "fn", "folder", "font-medium", "fullNavLimit", "function", "gap-1", "gi", "giu", "group", "h-8", "highlights", "host", "hover:bg-accent", "https:", 'id="db-search">', 'img[data-zoomable="true"]', "index", "index.html", "inline-flex", "inline>", "input", "input,", "inst", "installing", "items-center", "javascript:", "keydown", "li", "light", "line-clamp-2", "load", "loaded.", "loading", "loads.", "mark", "mark,", "mb-1", "mb-4", "medium-zoom", "medium-zoom:closed", "medium-zoom:opened", "ml-4", "mount()", "mounts", "mt-1", "none", "not", "not-prose", "object", "once", "option", "own", "p-3", "page", "page.html#id", "page.html?h=terms#id", "pagefind", "pb-2", "product", "puts", "px-2.5", "px-3", "py-0.5", "py-1.5", "readDataScript:", "role", "rounded-full", "rounded-md", "script", "script,", "section", "select,", "select[data-db-switch]", "signal", "ssg.search:", "style,", "text-muted-foreground", "text-sm", "text-xs", "text/html", "textarea,", "that", "the", "theme", "true", "unit", "unmount()", "value", "versions", "when", "window.__DOGSBAY_NAV__"];
|
|
1412
1470
|
var SITE_NOTICES = `Third-party software in this site's _dogsbay/ files (dogsbay.js, site.css) and pages
|
|
1413
1471
|
|
|
1414
1472
|
========================================================================
|
|
1415
|
-
@dogsbay/elements@0.2.0-beta.
|
|
1473
|
+
@dogsbay/elements@0.2.0-beta.149 (MIT)
|
|
1416
1474
|
https://github.com/dogsbay/dogsbay.git
|
|
1417
1475
|
|
|
1418
1476
|
Licensed under MIT; the package ships no licence file.
|
|
1419
1477
|
|
|
1420
1478
|
========================================================================
|
|
1421
|
-
@dogsbay/primitives@0.2.0-beta.
|
|
1479
|
+
@dogsbay/primitives@0.2.0-beta.149 (MIT)
|
|
1422
1480
|
https://github.com/dogsbay/dogsbay.git
|
|
1423
1481
|
|
|
1424
1482
|
Licensed under MIT; the package ships no licence file.
|
|
1425
1483
|
|
|
1426
1484
|
========================================================================
|
|
1427
|
-
@dogsbay/render-html@0.2.0-beta.
|
|
1485
|
+
@dogsbay/render-html@0.2.0-beta.149 (MIT)
|
|
1428
1486
|
https://github.com/dogsbay/dogsbay.git
|
|
1429
1487
|
|
|
1430
1488
|
Licensed under MIT; the package ships no licence file.
|
|
1431
1489
|
|
|
1432
1490
|
========================================================================
|
|
1433
|
-
@dogsbay/search@0.2.0-beta.
|
|
1491
|
+
@dogsbay/search@0.2.0-beta.149 (MIT)
|
|
1434
1492
|
https://github.com/dogsbay/dogsbay.git
|
|
1435
1493
|
|
|
1436
1494
|
Licensed under MIT; the package ships no licence file.
|
|
1437
1495
|
|
|
1438
1496
|
========================================================================
|
|
1439
|
-
@dogsbay/ui@0.2.0-beta.
|
|
1497
|
+
@dogsbay/ui@0.2.0-beta.149 (MIT)
|
|
1440
1498
|
https://github.com/dogsbay/dogsbay.git
|
|
1441
1499
|
|
|
1442
1500
|
Licensed under MIT; the package ships no licence file.
|
|
@@ -2238,7 +2296,7 @@ async function composePage(p, cfg, templates) {
|
|
|
2238
2296
|
icons: ICONS2
|
|
2239
2297
|
};
|
|
2240
2298
|
const region = (name, extra) => templates.region(`partials/${name}.html`, extra ? { ...base, ...extra } : base);
|
|
2241
|
-
const switcher = (kind, options, label) => region("switcher", { switcher: { kind, label, options: options.map((o) => ({ label: o.label, href: o.href, current: o.current, prefix: o.prefix, note: o.note })) } });
|
|
2299
|
+
const switcher = (kind, options, label) => region("switcher", { switcher: { kind, label, options: options.map((o) => ({ label: o.label, href: o.href, current: o.current, prefix: o.prefix, note: o.note, disabled: o.disabled, link: o.link })) } });
|
|
2242
2300
|
const sidebarHeader = hasSidebar ? String(await templates.renderPartial("partials/sidebar-header.html", base)) : "";
|
|
2243
2301
|
const ctx = {
|
|
2244
2302
|
...base,
|
|
@@ -2257,11 +2315,15 @@ async function composePage(p, cfg, templates) {
|
|
|
2257
2315
|
hero: await region("hero"),
|
|
2258
2316
|
metaStrip: await region("tags"),
|
|
2259
2317
|
banner: safe2(p.banner ? banner(p.banner) : ""),
|
|
2318
|
+
versionBadge: await region("version-badge", { versionBadge: p.versionBadge ? t("versionBadge").replace("{label}", () => p.versionBadge) : "" }),
|
|
2260
2319
|
breadcrumb: cfg.breadcrumbs ? await region("breadcrumb") : "",
|
|
2261
2320
|
tocTop: hasToc && p.toc === "top" ? await region("toc-top") : "",
|
|
2262
2321
|
tocRail: hasToc && p.toc === "rail" && hasSidebar ? await region("toc-rail") : "",
|
|
2263
2322
|
tocPopover: hasToc && p.toc === "popover" ? await region("toc-popover") : "",
|
|
2264
|
-
|
|
2323
|
+
// Product first: it is the widest choice, and the version menu below lists only its versions.
|
|
2324
|
+
switchers: safe2(
|
|
2325
|
+
String(await switcher("product", p.products ?? [], t("product"))) + String(await switcher("locale", p.locales, t("language"))) + String(await switcher("version", p.versions, t("version")))
|
|
2326
|
+
),
|
|
2265
2327
|
// The blank layout has no inline slot, so its pages keep the menu in the header.
|
|
2266
2328
|
pageActions: safe2(actions && (cfg.pageActions.placement !== "inline" || p.layout === "blank") ? actions : ""),
|
|
2267
2329
|
// Below the breadcrumb, above the title, as DocsLayout's inline placement.
|
|
@@ -2588,6 +2650,8 @@ var EN = {
|
|
|
2588
2650
|
close: "Close",
|
|
2589
2651
|
theme: "Toggle dark mode",
|
|
2590
2652
|
version: "Version",
|
|
2653
|
+
product: "Product",
|
|
2654
|
+
versionBadge: "Version: {label}",
|
|
2591
2655
|
language: "Language",
|
|
2592
2656
|
breadcrumb: "Breadcrumb",
|
|
2593
2657
|
home: "Home",
|
|
@@ -2648,6 +2712,8 @@ var FR = {
|
|
|
2648
2712
|
close: "Fermer",
|
|
2649
2713
|
theme: "Basculer le mode sombre",
|
|
2650
2714
|
version: "Version",
|
|
2715
|
+
product: "Produit",
|
|
2716
|
+
versionBadge: "Version : {label}",
|
|
2651
2717
|
language: "Langue",
|
|
2652
2718
|
home: "Accueil",
|
|
2653
2719
|
edit: "Modifier cette page",
|
|
@@ -2676,6 +2742,8 @@ var DE = {
|
|
|
2676
2742
|
close: "Schlie\xDFen",
|
|
2677
2743
|
theme: "Dunkelmodus umschalten",
|
|
2678
2744
|
version: "Version",
|
|
2745
|
+
product: "Produkt",
|
|
2746
|
+
versionBadge: "Version: {label}",
|
|
2679
2747
|
language: "Sprache",
|
|
2680
2748
|
home: "Startseite",
|
|
2681
2749
|
edit: "Diese Seite bearbeiten",
|
|
@@ -2704,6 +2772,8 @@ var ES = {
|
|
|
2704
2772
|
close: "Cerrar",
|
|
2705
2773
|
theme: "Cambiar modo oscuro",
|
|
2706
2774
|
version: "Versi\xF3n",
|
|
2775
|
+
product: "Producto",
|
|
2776
|
+
versionBadge: "Versi\xF3n: {label}",
|
|
2707
2777
|
language: "Idioma",
|
|
2708
2778
|
home: "Inicio",
|
|
2709
2779
|
edit: "Editar esta p\xE1gina",
|
|
@@ -2732,6 +2802,8 @@ var JA = {
|
|
|
2732
2802
|
close: "\u9589\u3058\u308B",
|
|
2733
2803
|
theme: "\u30C0\u30FC\u30AF\u30E2\u30FC\u30C9\u5207\u66FF",
|
|
2734
2804
|
version: "\u30D0\u30FC\u30B8\u30E7\u30F3",
|
|
2805
|
+
product: "\u88FD\u54C1",
|
|
2806
|
+
versionBadge: "\u30D0\u30FC\u30B8\u30E7\u30F3: {label}",
|
|
2735
2807
|
language: "\u8A00\u8A9E",
|
|
2736
2808
|
home: "\u30DB\u30FC\u30E0",
|
|
2737
2809
|
edit: "\u3053\u306E\u30DA\u30FC\u30B8\u3092\u7DE8\u96C6",
|
|
@@ -3154,11 +3226,7 @@ var DiagramStore = class {
|
|
|
3154
3226
|
|
|
3155
3227
|
// src/core/build.ts
|
|
3156
3228
|
var ACTIVE_FILE = /\.(html?|xhtml?|xml|xsl|js|mjs|shtml)$/i;
|
|
3157
|
-
var PASSIVE_FILE = /\.(png|jpe?g|gif|webp|avif|ico|bmp|tiff?|svg|woff2?|ttf|otf|eot|css|mp4|webm|ogv|ogg|oga|mp3|wav|m4a|flac|pdf|txt|csv|tsv|json|ya?ml|zip|gz|tgz|bz2|xz|7z|epub|docx?|xlsx?|pptx?|odt|ods|odp)$/i;
|
|
3158
3229
|
var HOST_FILES = /* @__PURE__ */ new Set(["_headers", "_redirects", "_routes.json", "_worker.js"]);
|
|
3159
|
-
function passiveSvg(text) {
|
|
3160
|
-
return !/<([\w.-]+:)?(script|foreignObject|a|animate|set|iframe|embed|object|handler|listener)[\s/>]|<!ENTITY|\son[a-z]+\s*=|javascript:|&#|<([\w.-]+:)?use[^>]*href\s*=\s*["']\s*[^"'#\s]/i.test(text);
|
|
3161
|
-
}
|
|
3162
3230
|
function diagramStore(input, cfg) {
|
|
3163
3231
|
const renderer = cfg.diagrams ? pickRenderer(input.diagrams, cfg.diagramEngine) : void 0;
|
|
3164
3232
|
return renderer ? new DiagramStore(renderer, input.diagramCacheChars, input.diagramPinChars) : void 0;
|
|
@@ -3253,6 +3321,12 @@ function finiteLimits(given) {
|
|
|
3253
3321
|
function inDataFolder(cfg, path) {
|
|
3254
3322
|
return [cfg.dataDir, ...cfg.sources.flatMap((s) => s.data ? [s.data] : [])].some((d) => path.startsWith(`${d}/`));
|
|
3255
3323
|
}
|
|
3324
|
+
async function readBytes(c) {
|
|
3325
|
+
if (typeof c === "string") return new TextEncoder().encode(c);
|
|
3326
|
+
if (isLazyText(c)) return new TextEncoder().encode(await c.read());
|
|
3327
|
+
if (isRef(c)) return c.read();
|
|
3328
|
+
return c;
|
|
3329
|
+
}
|
|
3256
3330
|
async function readText(c) {
|
|
3257
3331
|
if (typeof c === "string") return c;
|
|
3258
3332
|
if (isLazyText(c)) return c.read();
|
|
@@ -3271,7 +3345,12 @@ var copiedPath = (p) => {
|
|
|
3271
3345
|
async function assetVerdict(p, c, untrusted, sanitizing) {
|
|
3272
3346
|
if (untrusted) {
|
|
3273
3347
|
const name = p.slice(p.lastIndexOf("/") + 1);
|
|
3274
|
-
|
|
3348
|
+
if (HOST_FILES.has(name)) return "untrusted";
|
|
3349
|
+
if (/\.svg$/i.test(p)) {
|
|
3350
|
+
const bytes = await readBytes(c);
|
|
3351
|
+
return bytes.length <= PASSIVE_SVG_MAX_BYTES && passiveSvgBytes(bytes) ? "copy" : "untrusted";
|
|
3352
|
+
}
|
|
3353
|
+
return isPassiveStaticFile(p) ? "copy" : "untrusted";
|
|
3275
3354
|
}
|
|
3276
3355
|
return sanitizing && ACTIVE_FILE.test(p) ? "active" : "copy";
|
|
3277
3356
|
}
|
|
@@ -3342,7 +3421,7 @@ async function build(input, hooks = {}) {
|
|
|
3342
3421
|
phase.init = now() - t0;
|
|
3343
3422
|
let pages = 0;
|
|
3344
3423
|
let assets = 0;
|
|
3345
|
-
const state = { redirects: [], notes: /* @__PURE__ */ new Map(), navCache: navCache(), written: /* @__PURE__ */ new Set(), stubs: [], pageOut: /* @__PURE__ */ new Map(), sitemaps: /* @__PURE__ */ new Map(), supplied: /* @__PURE__ */ new Set(), hostFiles: /* @__PURE__ */ new Map(), usedMath: false, diagrams: diagramStore(input, cfg), scan: hooks.keep || hooks.lazy ? new ScanCache() : void 0, parseCache: input.parseCacheBytes === 0 ? false : new ParseCache(input.parseCacheBytes ?? DEFAULT_PARSE_CACHE_BYTES), templateBudget: templateBudget(input.untrusted === true, input.templateMs), dataCache: new DataCache(input.dataCacheBytes ?? DEFAULT_DATA_CACHE_BYTES) };
|
|
3424
|
+
const state = { redirects: [], notes: /* @__PURE__ */ new Map(), navCache: navCache(), written: /* @__PURE__ */ new Set(), stubs: [], pageOut: /* @__PURE__ */ new Map(), sitemaps: /* @__PURE__ */ new Map(), supplied: /* @__PURE__ */ new Set(), hostFiles: /* @__PURE__ */ new Map(), homeForward: /* @__PURE__ */ new Map(), usedMath: false, diagrams: diagramStore(input, cfg), scan: hooks.keep || hooks.lazy ? new ScanCache() : void 0, parseCache: input.parseCacheBytes === 0 ? false : new ParseCache(input.parseCacheBytes ?? DEFAULT_PARSE_CACHE_BYTES), templateBudget: templateBudget(input.untrusted === true, input.templateMs), dataCache: new DataCache(input.dataCacheBytes ?? DEFAULT_DATA_CACHE_BYTES) };
|
|
3346
3425
|
for (const r of cfg.redirects) {
|
|
3347
3426
|
const from = sitePath(r.from, cfg.basePath);
|
|
3348
3427
|
if (!from) {
|
|
@@ -3363,6 +3442,7 @@ async function build(input, hooks = {}) {
|
|
|
3363
3442
|
if (siteBase(cfg)) state.languages = await languageTables(cfg, allUnits, units, input.files, readText, frontMatterOf);
|
|
3364
3443
|
const translations = await translationTables(cfg, allUnits, input.files, readText, input.includeDrafts === true, frontMatterOf);
|
|
3365
3444
|
frontMatterOf = void 0;
|
|
3445
|
+
if (cfg.staticDir) Object.assign(state, staticFolder2(cfg.staticDir, input.files, input.untrusted === true));
|
|
3366
3446
|
hooks.context?.({ cfg, allUnits, input, highlighter, emit, warnings, problems, report, phase, theme, state, diagnostics: hooks.diagnostics, dataLines: hooks.dataLines });
|
|
3367
3447
|
for (const unit of units) {
|
|
3368
3448
|
classes = new Set(CLIENT_CANDIDATES);
|
|
@@ -3408,26 +3488,38 @@ async function build(input, hooks = {}) {
|
|
|
3408
3488
|
const def = defaultUnit(allUnits, cfg);
|
|
3409
3489
|
const tSite = now();
|
|
3410
3490
|
const rootUnit = allUnits.find((u) => u.prefix === "");
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
|
|
3414
|
-
|
|
3415
|
-
|
|
3491
|
+
for (const n of MERGED_FILES) {
|
|
3492
|
+
const own = rootUnit ? input.files.get(sourceRoot(rootUnit.source) + n) : void 0;
|
|
3493
|
+
const fromStatic = state.staticFiles?.get(n);
|
|
3494
|
+
if (own !== void 0 && fromStatic !== void 0) throw new ConfigError(`${cfg.staticDir}/${n} and ${sourceRoot(rootUnit.source)}${n} are both the site's ${n}: keep the one in content.static (${cfg.staticDir})`);
|
|
3495
|
+
const c = fromStatic ?? own;
|
|
3496
|
+
if (c === void 0) continue;
|
|
3497
|
+
if (!input.untrusted) state.hostFiles.set(n, c);
|
|
3498
|
+
else if (fromStatic !== void 0) report("untrusted", `[untrusted] ${cfg.staticDir}/${n} is not used: an untrusted build takes no host configuration`);
|
|
3499
|
+
}
|
|
3500
|
+
if (state.staticFiles?.has("robots.txt")) {
|
|
3501
|
+
if (state.supplied.has("robots.txt")) throw new ConfigError(`${cfg.staticDir}/robots.txt and the root content's robots.txt are both the site's robots.txt: keep the one in content.static (${cfg.staticDir})`);
|
|
3502
|
+
state.supplied.add("robots.txt");
|
|
3416
3503
|
}
|
|
3417
3504
|
await emitSiteFiles(cfg, allUnits, units, def, state, emit, report, input.onRedirects);
|
|
3418
3505
|
phase.site = (phase.site ?? 0) + now() - tSite;
|
|
3506
|
+
const homeOf = (fromDir, unitPrefix, fallback) => {
|
|
3507
|
+
const page = state.homeForward.get(unitPrefix);
|
|
3508
|
+
return page !== void 0 ? relative(fromDir, page) : fallback;
|
|
3509
|
+
};
|
|
3419
3510
|
if (def && def.prefix) {
|
|
3420
|
-
await emit("index.html", redirectPage(`${def.prefix}/index.html
|
|
3511
|
+
await emit("index.html", redirectPage(homeOf("", def.prefix, `${def.prefix}/index.html`), cfg.name));
|
|
3421
3512
|
await emit("404.html", redirectPage(`${def.prefix}/404.html`, cfg.name));
|
|
3422
3513
|
}
|
|
3423
3514
|
if (cfg.products) {
|
|
3424
|
-
for (const [from, to] of productRootRedirects(cfg.products)) await emit(`${from.slice(1)}index.html`, redirectPage(`${relativeHome(from, to)}index.html
|
|
3515
|
+
for (const [from, to] of productRootRedirects(cfg.products)) await emit(`${from.slice(1)}index.html`, redirectPage(homeOf(from.slice(1, -1), to.slice(1, -1), `${relativeHome(from, to)}index.html`), cfg.name));
|
|
3425
3516
|
} else if (def && def.prefix) {
|
|
3426
3517
|
for (const u of allUnits) {
|
|
3427
3518
|
const root = groupPrefix(u);
|
|
3428
|
-
if (root && u.version && u.version === cfg.defaultVersion && u.prefix !== root) await emit(`${root}/index.html`, redirectPage(`${u.version}/index.html
|
|
3519
|
+
if (root && u.version && u.version === cfg.defaultVersion && u.prefix !== root) await emit(`${root}/index.html`, redirectPage(homeOf(root, u.prefix, `${u.version}/index.html`), cfg.name));
|
|
3429
3520
|
}
|
|
3430
3521
|
}
|
|
3522
|
+
if (state.staticFiles && (units.length === allUnits.length || rootUnit && units.includes(rootUnit))) await emitStatic(cfg, state, allUnits, input.untrusted === true, emit, report);
|
|
3431
3523
|
state.stubs = await writeTranslationStubs(cfg, allUnits, units, translations, state, emit);
|
|
3432
3524
|
const spent = state.templateBudget.problem();
|
|
3433
3525
|
if (spent) report("template", spent);
|
|
@@ -3493,11 +3585,97 @@ function checkProductFolders(allUnits, files) {
|
|
|
3493
3585
|
}
|
|
3494
3586
|
}
|
|
3495
3587
|
}
|
|
3588
|
+
function staticFolder2(dir, files, untrusted) {
|
|
3589
|
+
const staticFiles = /* @__PURE__ */ new Map();
|
|
3590
|
+
for (const [k, c] of files) {
|
|
3591
|
+
if (!k.startsWith(dir + "/")) continue;
|
|
3592
|
+
const rel = k.slice(dir.length + 1);
|
|
3593
|
+
if (staticPath(rel)) staticFiles.set(rel, c);
|
|
3594
|
+
}
|
|
3595
|
+
const served = { has: (p) => staticFiles.has(p) && staticServed(p, untrusted) };
|
|
3596
|
+
const staticFile = (t) => {
|
|
3597
|
+
const bare = t.replace(/\/+$/, "");
|
|
3598
|
+
if (served.has(t)) return t;
|
|
3599
|
+
if (served.has(`${bare}/index.html`)) return bare ? `${bare}/index.html` : "index.html";
|
|
3600
|
+
if (!t.endsWith("/") && served.has(`${t}.html`)) return `${t}.html`;
|
|
3601
|
+
return void 0;
|
|
3602
|
+
};
|
|
3603
|
+
return { staticFiles, staticFile };
|
|
3604
|
+
}
|
|
3605
|
+
function staticPath(rel) {
|
|
3606
|
+
return copiedPath(rel) || rel.startsWith(".well-known/") && copiedPath(rel.slice(".well-known/".length));
|
|
3607
|
+
}
|
|
3608
|
+
function staticServed(p, untrusted) {
|
|
3609
|
+
if (MERGED_FILES.has(p)) return false;
|
|
3610
|
+
if (!untrusted) return true;
|
|
3611
|
+
return !HOST_FILES.has(p.slice(p.lastIndexOf("/") + 1)) && (isPassiveStaticFile(p) || /\.svg$/i.test(p));
|
|
3612
|
+
}
|
|
3613
|
+
function staticLinkPaths(state) {
|
|
3614
|
+
const out = [];
|
|
3615
|
+
for (const p of state.staticFiles.keys()) {
|
|
3616
|
+
if (MERGED_FILES.has(p) || !state.staticFile(p)) continue;
|
|
3617
|
+
out.push(p);
|
|
3618
|
+
if (p === "index.html" || p.endsWith("/index.html")) out.push(p.slice(0, -"index.html".length), p.slice(0, -"/index.html".length));
|
|
3619
|
+
else if (p.endsWith(".html")) out.push(p.slice(0, -".html".length));
|
|
3620
|
+
}
|
|
3621
|
+
return out.filter(Boolean);
|
|
3622
|
+
}
|
|
3623
|
+
var PASSIVE_STAND_IN = new TextEncoder().encode("<svg/>");
|
|
3624
|
+
async function emitStatic(cfg, state, units, untrusted, emit, report) {
|
|
3625
|
+
const files = state.staticFiles;
|
|
3626
|
+
const label = `content.static (${cfg.staticDir})`;
|
|
3627
|
+
const lower = /* @__PURE__ */ new Map();
|
|
3628
|
+
const dirs = /* @__PURE__ */ new Map();
|
|
3629
|
+
for (const w of state.written) {
|
|
3630
|
+
lower.set(w.toLowerCase(), w);
|
|
3631
|
+
for (let i = w.indexOf("/"); i > 0; i = w.indexOf("/", i + 1)) dirs.set(w.slice(0, i).toLowerCase(), w);
|
|
3632
|
+
}
|
|
3633
|
+
const reserved = ["_dogsbay/", ...cfg.search && cfg.searchEngine !== "builtin" ? units.map((u) => `${u.prefix ? u.prefix + "/" : ""}pagefind/`) : []];
|
|
3634
|
+
const writes = (p) => {
|
|
3635
|
+
const own = reserved.find((r) => p.toLowerCase().startsWith(r.toLowerCase()));
|
|
3636
|
+
if (own) return `${own}, the build's own folder`;
|
|
3637
|
+
const same = lower.get(p.toLowerCase());
|
|
3638
|
+
if (same) return same === p ? same : `${same}, the same path in another case`;
|
|
3639
|
+
const inside = dirs.get(p.toLowerCase());
|
|
3640
|
+
if (inside) return `${inside}, inside a folder at this path`;
|
|
3641
|
+
for (let i = p.indexOf("/"); i > 0; i = p.indexOf("/", i + 1)) {
|
|
3642
|
+
const file = lower.get(p.slice(0, i).toLowerCase());
|
|
3643
|
+
if (file) return `${file}, a file where this folder would be`;
|
|
3644
|
+
}
|
|
3645
|
+
return void 0;
|
|
3646
|
+
};
|
|
3647
|
+
const errors = [];
|
|
3648
|
+
const seen = /* @__PURE__ */ new Map();
|
|
3649
|
+
for (const p of files.keys()) {
|
|
3650
|
+
const other = seen.get(p.toLowerCase());
|
|
3651
|
+
if (other) errors.push(`${label}: ${other} and ${p} differ only in case, so a case-insensitive disk or host keeps one of them`);
|
|
3652
|
+
else seen.set(p.toLowerCase(), p);
|
|
3653
|
+
}
|
|
3654
|
+
const passingSvgs = /* @__PURE__ */ new Set();
|
|
3655
|
+
const hostConfig = [];
|
|
3656
|
+
if (untrusted) {
|
|
3657
|
+
for (const [p, c] of files) {
|
|
3658
|
+
if (HOST_FILES.has(p.slice(p.lastIndexOf("/") + 1)) && !MERGED_FILES.has(p)) hostConfig.push(p);
|
|
3659
|
+
if (!/\.svg$/i.test(p)) continue;
|
|
3660
|
+
const bytes = await readBytes(c);
|
|
3661
|
+
if (bytes.length <= PASSIVE_SVG_MAX_BYTES && passiveSvgBytes(bytes)) passingSvgs.add(p);
|
|
3662
|
+
}
|
|
3663
|
+
}
|
|
3664
|
+
const listed = [...files.keys()].filter((p) => !hostConfig.includes(p));
|
|
3665
|
+
const plan = staticFolderPlan(listed, { writes, untrusted, basePath: cfg.basePath ? `/${cfg.basePath.replace(/^\/+|\/+$/g, "")}` : "", label, readBytes: (p) => passingSvgs.has(p) ? PASSIVE_STAND_IN : void 0 });
|
|
3666
|
+
if (hostConfig.length) report("untrusted", `[untrusted] ${label}: host configuration is not copied from an untrusted folder: ${hostConfig.slice(0, 5).join(", ")}`);
|
|
3667
|
+
errors.push(...plan.errors);
|
|
3668
|
+
if (errors.length) throw new ConfigError(errors.join("\n"));
|
|
3669
|
+
for (const w of plan.warnings) report("static", `[static] ${w}`);
|
|
3670
|
+
if (plan.robots) for (const w of staticRobotsWarnings(await readText(files.get("robots.txt")), label)) report("static", `[static] ${w}`);
|
|
3671
|
+
for (const p of plan.copy) await emit(p, files.get(p));
|
|
3672
|
+
}
|
|
3496
3673
|
async function emitSiteFiles(cfg, all, built, def, state, emit, report, onRedirects) {
|
|
3497
3674
|
const defPrefix = def?.prefix ?? "";
|
|
3498
3675
|
const put = async (p, content) => {
|
|
3499
|
-
if (state.supplied.has(p))
|
|
3500
|
-
|
|
3676
|
+
if (state.supplied.has(p)) {
|
|
3677
|
+
if (!state.staticFiles?.has(p)) report("site", `[site] ${p} comes from the content, so the generated one is not written`);
|
|
3678
|
+
} else await emit(p, content);
|
|
3501
3679
|
};
|
|
3502
3680
|
const cloudflare = cfg.deployTarget === "cloudflare-workers";
|
|
3503
3681
|
const merged = async (p, generated, merge) => {
|
|
@@ -3854,7 +4032,7 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, read2),
|
|
|
3854
4032
|
}
|
|
3855
4033
|
const some = (l) => `${l.slice(0, 5).join(", ")}${l.length > 5 ? ", \u2026" : ""}`;
|
|
3856
4034
|
if (activeFiles.length) warn("html", `content.html is sanitize, so ${activeFiles.length} HTML, XML or script file(s) are not copied: ${some(activeFiles)}`);
|
|
3857
|
-
if (untrustedFiles.length) report("untrusted", `[untrusted] ${untrustedFiles.length} file(s) not copied: only images, fonts, media,
|
|
4035
|
+
if (untrustedFiles.length) report("untrusted", `[untrusted] ${untrustedFiles.length} file(s) not copied: only images, fonts, media, documents, archives and data are (no stylesheets), and no SVG that runs script, is not UTF-8 or is over 5 MB, and no host configuration (_headers, _redirects): ${some(untrustedFiles)}`);
|
|
3858
4036
|
const specNavs = /* @__PURE__ */ new Map();
|
|
3859
4037
|
const mountedNavs = /* @__PURE__ */ new Map();
|
|
3860
4038
|
const mountedSlugs = /* @__PURE__ */ new Set();
|
|
@@ -3994,12 +4172,13 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, read2),
|
|
|
3994
4172
|
let childLinkItems;
|
|
3995
4173
|
let childLinkDirs;
|
|
3996
4174
|
const isLeftOut = (s) => !infos.has(s) && !stubTargets.has(s) && leftOut.has(s);
|
|
3997
|
-
for (const s of order) if (!infos.has(s) && !stubTargets.has(s) && !leftOut.has(s)) warn("nav", `nav entry "${s}" has no page`, navFileAt());
|
|
4175
|
+
for (const s of order) if (!infos.has(s) && !stubTargets.has(s) && !leftOut.has(s) && !(state.staticFile?.(s) ?? state.staticFile?.(`${s}/`))) warn("nav", `nav entry "${s}" has no page`, navFileAt());
|
|
3998
4176
|
if (cfg.routablesFrom === "nav") {
|
|
3999
4177
|
const keep = new Set(order);
|
|
4000
4178
|
for (const s of [...infos.keys()]) if (s !== "" && !keep.has(s)) infos.delete(s);
|
|
4001
4179
|
}
|
|
4002
4180
|
const excludedEntries = /* @__PURE__ */ new Map();
|
|
4181
|
+
const staticNav = /* @__PURE__ */ new Map();
|
|
4003
4182
|
const dropMissing = (nodes) => {
|
|
4004
4183
|
const kept = nodes.filter((n) => {
|
|
4005
4184
|
const had = n.children.length;
|
|
@@ -4032,6 +4211,13 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, read2),
|
|
|
4032
4211
|
n.alias = true;
|
|
4033
4212
|
if (stub.fragment) n.fragment = stub.fragment;
|
|
4034
4213
|
} else warn("nav", `nav entry "${from}" redirects to /${stub.to}, which is not a page of this build; it keeps its label without a link`);
|
|
4214
|
+
} else {
|
|
4215
|
+
const key = cfg.basePath && from.startsWith(`${cfg.basePath.replace(/^\/+|\/+$/g, "")}/`) ? from.slice(cfg.basePath.replace(/^\/+|\/+$/g, "").length + 1) : from;
|
|
4216
|
+
const file = state.staticFile?.(key) ?? state.staticFile?.(`${key}/`);
|
|
4217
|
+
if (file !== void 0) {
|
|
4218
|
+
n.slug = from;
|
|
4219
|
+
staticNav.set(from, relative(unit.prefix, file));
|
|
4220
|
+
}
|
|
4035
4221
|
}
|
|
4036
4222
|
}
|
|
4037
4223
|
}
|
|
@@ -4059,17 +4245,19 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, read2),
|
|
|
4059
4245
|
if (cfg.blog?.path) add(cfg.blog.path, `${cfg.blog.path}/index.html`);
|
|
4060
4246
|
return all;
|
|
4061
4247
|
};
|
|
4062
|
-
const table = { pages: linkTargets(pageRefs), assets: assetPaths, basePath: cfg.basePath, linkStyle: cfg.linkStyle, stripPrefixes: cfg.linkPrefixes };
|
|
4248
|
+
const table = { pages: linkTargets(pageRefs), assets: assetPaths, basePath: cfg.basePath, linkStyle: cfg.linkStyle, stripPrefixes: cfg.linkPrefixes, staticFile: state.staticFile, unitPrefix: unit.prefix };
|
|
4063
4249
|
const readingOrder = order.filter((s) => infos.has(s));
|
|
4064
4250
|
const fullNav = cfg.navMode === "ssr-full" ? true : cfg.navMode === "client" ? false : navSize(nav) <= (input.fullNavLimit ?? cfg.fullNavLimit);
|
|
4065
|
-
const
|
|
4251
|
+
const locale = unit.locale ?? cfg.defaultLocale;
|
|
4252
|
+
const lc = (locale ?? "en").toLowerCase();
|
|
4253
|
+
const t_ = strings(locale, { ...cfg.strings.all, ...cfg.strings.byLocale[lc] ?? cfg.strings.byLocale[lc.split("-")[0]] ?? {} });
|
|
4066
4254
|
const lang = unit.locale ?? cfg.defaultLocale ?? "en";
|
|
4067
4255
|
const dir = /^(ar|he|fa|ur)(-|$)/.test(unit.locale ?? "") ? "rtl" : "ltr";
|
|
4068
4256
|
let search = cfg.search && cfg.searchEngine !== "pagefind" ? new SearchIndexBuilder({ lang: unit.locale ?? cfg.defaultLocale ?? "en" }) : void 0;
|
|
4069
4257
|
const siteDepthPrefix = unit.prefix ? "../".repeat(unit.prefix.split("/").length) : "";
|
|
4070
4258
|
phase.scan = (phase.scan ?? 0) + now() - t;
|
|
4071
4259
|
state.scanned?.(unit, "end");
|
|
4072
|
-
input.onUnitAssets?.(unit.prefix, assetPaths);
|
|
4260
|
+
input.onUnitAssets?.(unit.prefix, state.staticFiles ? /* @__PURE__ */ new Set([...assetPaths, ...staticLinkPaths(state)]) : assetPaths);
|
|
4073
4261
|
if (diagrams) {
|
|
4074
4262
|
t = now();
|
|
4075
4263
|
const live = new Set([...infos.values()].map((i) => i.source));
|
|
@@ -4368,8 +4556,8 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, read2),
|
|
|
4368
4556
|
phase.render = (phase.render ?? 0) + now() - t;
|
|
4369
4557
|
t = now();
|
|
4370
4558
|
const hrefTo = (slug) => {
|
|
4371
|
-
const
|
|
4372
|
-
return
|
|
4559
|
+
const out = pageRefs.get(slug)?.out ?? staticNav.get(slug);
|
|
4560
|
+
return out !== void 0 ? hrefBetween(info.out, out, cfg.linkStyle) : void 0;
|
|
4373
4561
|
};
|
|
4374
4562
|
const chain = trail.get(info.slug) ?? [];
|
|
4375
4563
|
const pos = readingOrder.indexOf(info.slug);
|
|
@@ -4418,9 +4606,11 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, read2),
|
|
|
4418
4606
|
tagChips: tagChips(Array.isArray(fm.tags) ? fm.tags : [], cfg, (tagPath) => hrefBetween(info.out, tagPath, cfg.linkStyle)),
|
|
4419
4607
|
badges: fieldBadges(fm, cfg, (target) => hrefBetween(info.out, target, cfg.linkStyle)),
|
|
4420
4608
|
post: postHead,
|
|
4609
|
+
products: productOptions(unit, cfg, siteRoot, t_),
|
|
4421
4610
|
versions: switchOptions("version", unit, allUnits, cfg, info.out, siteRoot, t_),
|
|
4422
4611
|
locales: switchOptions("locale", unit, allUnits, cfg, info.out, siteRoot, t_),
|
|
4423
4612
|
banner: versionBanner(unit, allUnits, cfg, info.out, siteRoot, t_),
|
|
4613
|
+
versionBadge: unit.version !== void 0 ? versionsOf(cfg, unit.product).versions.find((v) => v.id === unit.version && v.badge)?.label : void 0,
|
|
4424
4614
|
// The source's path in the repository includes the content root.
|
|
4425
4615
|
editUrl: cfg.repoUrl ? `${cfg.repoUrl.replace(/\/+$/, "")}/${(cfg.editUri ?? "").replace(/^\/+/, "")}${srcOf(info)}` : void 0,
|
|
4426
4616
|
mdHref: cfg.mdMirror ? mdOut.split("/").pop() : void 0,
|
|
@@ -4514,7 +4704,7 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, read2),
|
|
|
4514
4704
|
const pagesJs = `(window.__DOGSBAY_PAGES__=window.__DOGSBAY_PAGES__||{})[${JSON.stringify(unit.prefix)}]=${JSON.stringify([...[...infos.values()].filter((i) => i.slug !== replaced).map((i) => i.out), ...generatedOuts])};
|
|
4515
4705
|
`;
|
|
4516
4706
|
await emit(prefix + "_dogsbay/pages.js", pagesJs);
|
|
4517
|
-
const unitHref = (slug) => pageRefs.get(slug)?.out;
|
|
4707
|
+
const unitHref = (slug) => pageRefs.get(slug)?.out ?? staticNav.get(slug);
|
|
4518
4708
|
await emit(prefix + "_dogsbay/nav.js", `window.__DOGSBAY_NAV__=${JSON.stringify(compactNav(nav, unitHref)).replace(/<\//g, "<\\/")};
|
|
4519
4709
|
`);
|
|
4520
4710
|
if (search) {
|
|
@@ -4524,7 +4714,10 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, read2),
|
|
|
4524
4714
|
}
|
|
4525
4715
|
if (!infos.has("") && blogIndex !== "") {
|
|
4526
4716
|
const first = readingOrder[0] ?? [...infos.keys()][0];
|
|
4527
|
-
if (first != null)
|
|
4717
|
+
if (first != null) {
|
|
4718
|
+
await emit(prefix + "index.html", redirectPage(pageRefs.get(first).out, cfg.name));
|
|
4719
|
+
state.homeForward.set(unit.prefix, prefix + pageRefs.get(first).out);
|
|
4720
|
+
}
|
|
4528
4721
|
}
|
|
4529
4722
|
await emit(prefix + "404.html", notFoundPage(cfg, unit, t_));
|
|
4530
4723
|
if (cfg.llmsTxt) {
|
|
@@ -4649,8 +4842,8 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, read2),
|
|
|
4649
4842
|
const siteRoot = unitRoot + siteDepthPrefix;
|
|
4650
4843
|
const homeHref = hrefBetween(out, "index.html", cfg.linkStyle);
|
|
4651
4844
|
const hrefTo = (slug) => {
|
|
4652
|
-
const
|
|
4653
|
-
return
|
|
4845
|
+
const target = pageRefs.get(slug)?.out ?? staticNav.get(slug);
|
|
4846
|
+
return target !== void 0 ? hrefBetween(out, target, cfg.linkStyle) : void 0;
|
|
4654
4847
|
};
|
|
4655
4848
|
const url = absoluteUrl(cfg, unit.prefix, servedPath(out, cfg.linkStyle));
|
|
4656
4849
|
const html = await composePage(
|
|
@@ -4673,6 +4866,7 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, read2),
|
|
|
4673
4866
|
nav,
|
|
4674
4867
|
navOptions: { current: "\0", trail: /* @__PURE__ */ new Set(), href: hrefTo, full: fullNav, cache: state.navCache, cacheKey: `${unit.prefix}\0${dirname(out)}` },
|
|
4675
4868
|
breadcrumb: [],
|
|
4869
|
+
products: productOptions(unit, cfg, siteRoot, t_),
|
|
4676
4870
|
versions: switchOptions("version", unit, allUnits, cfg, out, siteRoot, t_),
|
|
4677
4871
|
locales: switchOptions("locale", unit, allUnits, cfg, out, siteRoot, t_),
|
|
4678
4872
|
wide: o.wide ?? false,
|
|
@@ -5022,10 +5216,13 @@ function switchOptions(kind, unit, all, cfg, out, siteRoot, t) {
|
|
|
5022
5216
|
const other = kind === "version" ? "locale" : "version";
|
|
5023
5217
|
if (!unit[axis]) return [];
|
|
5024
5218
|
const peers = all.filter((u) => u[other] === unit[other] && sameProduct(u, unit) && u[axis]);
|
|
5025
|
-
const { versions, defaultVersion } = versionsOf(cfg, unit.product);
|
|
5219
|
+
const { versions, defaultVersion, menu } = versionsOf(cfg, unit.product);
|
|
5026
5220
|
const defs = kind === "version" ? versions : cfg.locales;
|
|
5027
5221
|
const ordered = defs.length ? defs.map((d) => peers.find((u) => u[axis] === d.id)).filter((u) => !!u) : peers;
|
|
5028
|
-
|
|
5222
|
+
let shown = ordered.filter((u) => !(kind === "version" && versions.find((v) => v.id === u.version)?.hidden && u !== unit));
|
|
5223
|
+
const hasMenu = shown.length >= 2;
|
|
5224
|
+
if (kind === "version") shown = limitVersionRows(shown, menu?.limit, (u) => u === unit);
|
|
5225
|
+
const options = shown.map((u) => {
|
|
5029
5226
|
const v = kind === "version" ? versions.find((d) => d.id === u.version) : void 0;
|
|
5030
5227
|
const l = kind === "locale" ? cfg.locales.find((d) => d.id === u.locale) : void 0;
|
|
5031
5228
|
const note = v?.eol ? t("eol") : v?.prerelease ? t("prerelease") : v && v.id === defaultVersion && v.id !== "latest" ? t("latest") : void 0;
|
|
@@ -5037,6 +5234,30 @@ function switchOptions(kind, unit, all, cfg, out, siteRoot, t) {
|
|
|
5037
5234
|
note
|
|
5038
5235
|
};
|
|
5039
5236
|
});
|
|
5237
|
+
if (kind !== "version" || !hasMenu || !menu?.links.length) return options;
|
|
5238
|
+
return [...options, ...menu.links.map((l) => ({ label: l.label, href: menuHref(l.href, siteRoot, cfg.linkStyle, cfg.basePath), current: false, prefix: "", link: true }))];
|
|
5239
|
+
}
|
|
5240
|
+
var MENU_FILE = /\.(html?|pdf|txt|md|xml|json|ya?ml|csv|zip|gz|tgz|epub|svg|png|jpe?g|gif|webp)$/i;
|
|
5241
|
+
function menuHref(href, siteRoot, style, basePath = "") {
|
|
5242
|
+
if (/^https?:/i.test(href)) return href;
|
|
5243
|
+
const m = /^\/([^?#]*)(.*)$/.exec(href);
|
|
5244
|
+
let path = m[1];
|
|
5245
|
+
if (basePath && (path === basePath || path.startsWith(basePath + "/"))) path = path.slice(basePath.length + 1);
|
|
5246
|
+
if (path === "" || path.endsWith("/")) path = style === "pretty" ? path : `${path}index.html`;
|
|
5247
|
+
else if (!MENU_FILE.test(path) && style !== "pretty") path = `${path}.html`;
|
|
5248
|
+
return `${siteRoot || "./"}${path}${m[2]}`;
|
|
5249
|
+
}
|
|
5250
|
+
function productOptions(unit, cfg, siteRoot, t) {
|
|
5251
|
+
if (!cfg.products) return [];
|
|
5252
|
+
const entries = shared(() => productSwitcher(cfg.products, unit.locale));
|
|
5253
|
+
if (entries.length < 2) return [];
|
|
5254
|
+
const options = entries.map((e) => ({
|
|
5255
|
+
label: e.label,
|
|
5256
|
+
href: `${siteRoot}${e.home.replace(/^\//, "")}index.html`,
|
|
5257
|
+
current: e.name === unit.product,
|
|
5258
|
+
prefix: e.home.replace(/^\/|\/$/g, "")
|
|
5259
|
+
}));
|
|
5260
|
+
return unit.product && options.some((o) => o.current) ? options : [{ label: t("product"), href: "", current: true, prefix: "", disabled: true }, ...options];
|
|
5040
5261
|
}
|
|
5041
5262
|
function versionBanner(unit, all, cfg, out, siteRoot, t) {
|
|
5042
5263
|
const link = (latest2) => ` <a href="${esc3(`${siteRoot}${latest2.prefix ? latest2.prefix + "/" : ""}${out}`)}" data-db-version-link data-prefix="${esc3(latest2.prefix)}">${esc3(t("goLatest"))}</a>`;
|
|
@@ -5455,6 +5676,22 @@ async function openDevSession(input, o = {}) {
|
|
|
5455
5676
|
continue;
|
|
5456
5677
|
}
|
|
5457
5678
|
if (TOPIC_MAP.test(p)) continue;
|
|
5679
|
+
if (config.staticDir && p.startsWith(config.staticDir + "/")) {
|
|
5680
|
+
const rel = p.slice(config.staticDir.length + 1);
|
|
5681
|
+
if (rel === "_headers" || rel === "_redirects" || !staticPath(rel)) continue;
|
|
5682
|
+
const files = ctx.state.staticFiles;
|
|
5683
|
+
if (!files.has(rel) && out.has(rel)) continue;
|
|
5684
|
+
mark("asset");
|
|
5685
|
+
const content2 = input.files.get(p);
|
|
5686
|
+
if (content2 !== void 0 && (!input.untrusted || await assetVerdict(rel, content2, true, true) === "copy")) {
|
|
5687
|
+
files.set(rel, content2);
|
|
5688
|
+
out.set(rel, content2);
|
|
5689
|
+
} else {
|
|
5690
|
+
files.delete(rel);
|
|
5691
|
+
out.delete(rel);
|
|
5692
|
+
}
|
|
5693
|
+
continue;
|
|
5694
|
+
}
|
|
5458
5695
|
const dataDirs = (x) => [...new Set(x.unit.members.map((m) => dataDirOf(config, m.source)))].filter((d) => p.startsWith(`${d}/`));
|
|
5459
5696
|
const dataUnits = [...units.values()].filter((x) => dataDirs(x).length);
|
|
5460
5697
|
if (dataUnits.length) {
|
|
@@ -5507,7 +5744,7 @@ async function openDevSession(input, o = {}) {
|
|
|
5507
5744
|
for (const prefix of lazy) {
|
|
5508
5745
|
const u = units.get(prefix);
|
|
5509
5746
|
for (const key of [...out.keys()]) {
|
|
5510
|
-
if (START_ONLY.test(key) || SITE_WIDE.test(key) || UNIT_CSS.test(key)) continue;
|
|
5747
|
+
if (START_ONLY.test(key) || SITE_WIDE.test(key) || UNIT_CSS.test(key) || ctx.state.staticFiles?.has(key)) continue;
|
|
5511
5748
|
if (unitForSitePath(key) === u) out.delete(key);
|
|
5512
5749
|
}
|
|
5513
5750
|
for (const s of [...stale]) if (unitForSitePath(s) === u) stale.delete(s);
|
|
@@ -5662,8 +5899,8 @@ function peleRenderer() {
|
|
|
5662
5899
|
// src/package/prebuilt.ts
|
|
5663
5900
|
import { minifyCss } from "@dogsbay/render-html/css-tools";
|
|
5664
5901
|
var SHEETS = {
|
|
5665
|
-
default: () => import("./chunks/prebuilt-css-default-
|
|
5666
|
-
mintlify: () => import("./chunks/prebuilt-css-mintlify-
|
|
5902
|
+
default: () => import("./chunks/prebuilt-css-default-XHQGPWFR.mjs"),
|
|
5903
|
+
mintlify: () => import("./chunks/prebuilt-css-mintlify-ZOM7VGVT.mjs")
|
|
5667
5904
|
};
|
|
5668
5905
|
var prebuiltSiteCss = async (o) => {
|
|
5669
5906
|
const base = (await (SHEETS[o.theme] ?? SHEETS.default)()).CSS;
|