@dogsbay/ssg 0.2.0-beta.151 → 0.2.0-beta.152
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 +6 -6
- package/dist/package/browser.mjs +459 -71
- package/dist/package/chunks/{prebuilt-css-default-65IKPMHZ.mjs → prebuilt-css-default-FYH7N4SF.mjs} +103 -0
- package/dist/package/chunks/{prebuilt-css-mintlify-PIEJO5KN.mjs → prebuilt-css-mintlify-KCT32TZ6.mjs} +103 -0
- package/dist/package/css.mjs +10 -1
- package/dist/package/types/core/build.d.ts +19 -4
- package/dist/package/types/core/icon-notices.d.ts +9 -0
- package/dist/package/types/core/site-files.d.ts +6 -0
- package/dist/package/types/core/unit-manifest.d.ts +74 -0
- package/dist/package/types/generated/assets.d.ts +7 -0
- package/dist/package/types/generated/icon-notices.d.ts +2 -0
- package/dist/package/types/theme/docs-layout/site-chrome.d.ts +12 -0
- package/dist/package/types/theme/docs-layout/tag-list-data.d.ts +4 -18
- package/dist/package/types/theme/regions.d.ts +5 -1
- package/package.json +29 -29
package/dist/package/browser.mjs
CHANGED
|
@@ -1207,15 +1207,12 @@ function renderRedirectPage(rule, cfg) {
|
|
|
1207
1207
|
const canonical = isExternal(rule.to) ? rule.to : rule.toOut ? absoluteUrl(cfg, "", servedPath(rule.toOut, cfg.linkStyle)) : void 0;
|
|
1208
1208
|
return renderRedirectStub(href, canonical);
|
|
1209
1209
|
}
|
|
1210
|
-
function
|
|
1210
|
+
function servedRedirect(r, cfg) {
|
|
1211
1211
|
const served = (sitePathOrOut) => "/" + [cfg.basePath, sitePathOrOut].filter(Boolean).join("/");
|
|
1212
|
-
return
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
status: r.status
|
|
1217
|
-
}))
|
|
1218
|
-
);
|
|
1212
|
+
return { from: served(r.from), to: isExternal(r.to) ? r.to : served(r.toOut ? servedPath(r.toOut, cfg.linkStyle) : r.to) + (r.suffix ?? ""), status: r.status };
|
|
1213
|
+
}
|
|
1214
|
+
function renderRedirectsFile(rules, cfg) {
|
|
1215
|
+
return renderRedirectsLines(rules.map((r) => servedRedirect(r, cfg)));
|
|
1219
1216
|
}
|
|
1220
1217
|
|
|
1221
1218
|
// src/core/canonical.ts
|
|
@@ -1357,12 +1354,10 @@ import { parseMeta as parseMeta3 } from "@dogsbay/types";
|
|
|
1357
1354
|
import { directoryChildren, hasChildLinks, navKey, realizeChildLinks } from "@dogsbay/serialize-core";
|
|
1358
1355
|
|
|
1359
1356
|
// src/generated/assets.ts
|
|
1360
|
-
var CLIENT_JS = `/*! dogsbay-ssg site client (Apache-2.0). Third-party notices: THIRD-PARTY-NOTICES.txt */
|
|
1361
|
-
"use strict";(()=>{var wn=Object.defineProperty;var En=(i,t,e)=>t in i?wn(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e;var h=(i,t,e)=>En(i,typeof t!="symbol"?t+"":t,e);var N=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(){}},xn={"db-tabs":"block","db-accordion":"block","db-collapsible":"block","db-details-sheet":"block","db-card":"block","db-steps":"block","db-code-block":"block","db-link-button":"inline-block","db-dialog":"contents","db-popover":"inline-block","db-tooltip":"inline-block","db-select":"inline-block","db-combobox":"block","db-nav-tree":"block","db-toc":"block","db-announcement":"block"},Me="dogsbay-elements-display";function z(){if(typeof document>"u"||document.getElementById(Me))return;let i=Object.entries(xn).map(([e,n])=>\`:where(\${e}){display:\${n}}\`).join(""),t=document.createElement("style");t.id=Me,t.textContent=i,document.head.prepend(t)}function An(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&&An(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 Sn=0;function Ie(i){return\`\${i}-\${++Sn}\`}var He=class extends N{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||Ie("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||Ie("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})))}};z();customElements.get("db-tabs")||customElements.define("db-tabs",He);var Cn=0;function Ln(i){return\`\${i}-\${++Cn}\`}var Ne=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=Ln("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 ze=class extends N{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 Ne(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}))}};z();customElements.get("db-accordion")||customElements.define("db-accordion",ze);var kn=0;function F(i){return\`\${i}-\${++kn}\`}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 Tn='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(Tn)).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 N{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,On();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 On(){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)}z();customElements.get("db-details-sheet")||customElements.define("db-details-sheet",Be);var qe=class extends N{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)}};z();customElements.get("db-code-block")||customElements.define("db-code-block",qe);var Ke=class extends N{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=Rn(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",Dn)}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})}},Dn='<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 Rn(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}z();customElements.get("db-nav-tree")||customElements.define("db-nav-tree",Ke);var We=class extends N{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}))}}};z();customElements.get("db-toc")||customElements.define("db-toc",We);var Mn=["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=Mn.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},In=function(t){var e,n=t==null||(e=t.getAttribute)===null||e===void 0?void 0:e.call(t,"contenteditable");return n===""||n==="true"},Hn=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)||In(t))&&!Ue(t)?0:t.tabIndex},Nn=function(t,e){var n=Xe(t);return n<0&&e&&!Ue(t)?0:n},zn=function(t,e){return t.tabIndex===e.tabIndex?t.documentOrder-e.documentOrder:t.tabIndex-e.tabIndex},Ge=function(t){return t.tagName==="INPUT"},_n=function(t){return Ge(t)&&t.type==="hidden"},Pn=function(t){var e=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(n){return n.tagName==="SUMMARY"});return e},Fn=function(t,e){for(var n=0;n<t.length;n++)if(t[n].checked&&t[n].form===e)return t[n]},$n=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=Fn(s,t.form);return!o||o===t},Bn=function(t){return Ge(t)&&t.type==="radio"},qn=function(t){return Bn(t)&&!$n(t)},Kn=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},Wn=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(Kn(t))return!t.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return je(t);return!1},jn=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},Vn=function(t,e){return!(e.disabled||_n(e)||Wn(e,t)||Pn(e)||jn(e))},Ve=function(t,e){return!(qn(e)||Xe(e)<0||!Vn(t,e))},Yn=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=Nn(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(zn).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:Yn}):n=Hn(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 Un(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 Xn(){Qe||(Qe=!0,document.addEventListener("keydown",Un))}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&&(Xn(),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 N{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}))}};z();customElements.get("db-dialog")||customElements.define("db-dialog",Je);var ti=class extends N{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)}};z();customElements.get("db-combobox")||customElements.define("db-combobox",ti);var it=Math.min,j=Math.max,It=Math.round,Ht=Math.floor,U=i=>({x:i,y:i}),Gn={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=Mt(r)),[r,Mt(r)]}function oi(i){let t=Mt(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"],Zn=["top","bottom"],Qn=["bottom","top"];function Jn(i,t,e){switch(i){case"top":case"bottom":return e?t?ii:ei:t?ei:ii;case"left":case"right":return t?Zn:Qn;default:return[]}}function ri(i,t,e,n){let s=xt(i),o=Jn(nt(i),e==="start",n);return s&&(o=o.map(r=>r+"-"+s),t&&(o=o.concat(o.map(Vt)))),o}function Mt(i){let t=nt(i);return Gn[t]+i.slice(t.length)}function ts(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"?ts(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},I=ct(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:L,strategy:l}):w);return{top:(y.top-I.top+p.top)/R.y,bottom:(I.bottom-y.bottom+p.bottom)/R.y,left:(y.left-I.left+p.left)/R.x,right:(I.right-y.right+p.right)/R.x}}var es=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:I,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],...I},H&&m<es&&(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)),I=f||(L||!b?[Mt(a)]:oi(a)),H=p!=="none";!f&&H&&I.push(...ri(a,b,p,R));let O=[a,...I],v=await l.detectOverflow(t,g),q=[],M=((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(M=[...M,{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)||M.every(D=>X(D.placement)===w?D.overflows[0]>0:!0)))return{data:{index:C,overflows:M},reset:{placement:T}};let A=(x=M.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=M.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 is=new Set(["left","top"]);async function ns(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=is.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 ns(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,I=!R,H=w,O=L;R!=null&&R.enabled.x&&(O=y),R!=null&&R.enabled.y&&(H=g),I&&!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 Nt(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 zt(i){try{if(i.matches(":popover-open"))return!0}catch{}try{return i.matches(":modal")}catch{return!1}}var ss=/transform|translate|scale|rotate|perspective|filter/,os=/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))||ss.test(t.willChange||"")||os.test(t.contain||"")}function vi(i){let t=st(i);for(;J(t)&&!St(t);){if(Ut(t))return t;if(zt(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)&&Nt(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||[],Nt(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=It(e)!==o||It(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?It(e.width):e.width)/n,a=(o?It(e.height):e.height)/s;return(!r||!Number.isFinite(r))&&(r=1),(!a||!Number.isFinite(a))&&(a=1),{x:r,y:a}}var rs=U(0);function Ai(i){let t=K(i);return!Xt()||!t.visualViewport?rs:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function as(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=as(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 ls(i){let{elements:t,rect:e,offsetParent:n,strategy:s}=i,o=s==="fixed",r=G(n),a=t?zt(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"||Nt(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 cs(i){return i.getClientRects?Array.from(i.getClientRects()):[]}function ds(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 us=25;function hs(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<=us&&(a-=y)}return{width:a,height:l,x:c,y:d}}function fs(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=hs(i,e,t);else if(t==="document")n=ds(G(i));else if(V(t))n=fs(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 ms(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 ps(i){let{element:t,boundary:e,rootBoundary:n,strategy:s}=i,r=[...e==="clippingAncestors"?zt(t)?[]:ms(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 gs(i){let{width:t,height:e}=xi(i);return{width:t,height:e}}function bs(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"||Nt(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(zt(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 vs=async function(i){let t=this.getOffsetParent||Ci,e=this.getDimensions,n=await e(i.floating);return{reference:bs(i.reference,await t(i.floating),i.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function ys(i){return Y(i).direction==="rtl"}var ws={convertOffsetParentRelativeRectToViewportRelativeRect:ls,getDocumentElement:G,getClippingRect:ps,getOffsetParent:Ci,getElementRects:vs,getClientRects:cs,getDimensions:gs,getScale:Ct,isElement:V,isRTL:ys};function Li(i,t){return i.x===t.x&&i.y===t.y&&i.width===t.width&&i.height===t.height}function Es(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 M=q[0].intersectionRatio;if(!Li(f,i.getBoundingClientRect()))return a();if(M!==u){if(!O)return a();M?a(!1,M):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?Es(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 Mi=(i,t,e)=>{let n=new Map,s=e??{},o={...ws,...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 Mi(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 Ii=class extends N{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}))}};z();customElements.get("db-select")||customElements.define("db-select",Ii);var Hi=class extends N{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}))}};z();customElements.get("db-popover")||customElements.define("db-popover",Hi);var Ni="db-announcement-closed:";var zi=class extends N{constructor(){super(...arguments);h(this,"closeButton",null);h(this,"onClose",()=>this.close())}setup(){var t;this.closeButton=[...this.querySelectorAll("[data-part='close']")].find(e=>e.closest("db-announcement")===this)??null,this.closeButton&&!this.closeButton.hasAttribute("aria-label")&&!((t=this.closeButton.textContent)!=null&&t.trim())&&this.closeButton.setAttribute("aria-label","Close announcement")}connect(){var t;(t=this.closeButton)==null||t.addEventListener("click",this.onClose)}disconnect(){var t;(t=this.closeButton)==null||t.removeEventListener("click",this.onClose)}close(){var n;let t=this.getAttribute("announcement-id")??"";try{t&&localStorage.setItem(Ni+t,"1")}catch{}let e=this.contains(document.activeElement);if(document.documentElement.setAttribute("data-announcement-closed",""),this.hidden=!0,this.style.display="none",e){let s=document.querySelector("main, [role='main']");s?(s.hasAttribute("tabindex")||s.setAttribute("tabindex","-1"),s.focus({preventScroll:!0})):(n=document.activeElement)==null||n.blur()}this.dispatchEvent(new CustomEvent("db-announcement:close",{bubbles:!0,detail:{id:t}}))}};z();customElements.get("db-announcement")||customElements.define("db-announcement",zi);var _i=class extends N{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})))}};z();customElements.get("db-tooltip")||customElements.define("db-tooltip",_i);var Pi="sidebar_state",xs="b",As=768,Pt=new WeakMap;function Ss(i){try{return localStorage.getItem(i)}catch{return null}}function Cs(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=Ss(Pi),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: \${As-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),Fi(u);let f=b=>{u.isMobile=b.matches,!b.matches&&u.openMobile&&ot(i)};d.addEventListener("change",f);let m=b=>{b.key===xs&&(b.metaKey||b.ctrlKey)?(b.preventDefault(),xe(i)):b.key==="Escape"&&u.openMobile&&(b.preventDefault(),ot(i))};document.addEventListener("keydown",m),Ls(i,u),c&&c.addEventListener("click",()=>{ot(i)});let p=t.querySelector("[data-part='rail']");p&&p.addEventListener("click",()=>{xe(i)})}function Ls(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):ks(i):(t.open=!t.open,Fi(t),Cs(Pi,String(t.open))))}function Fi(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 ks(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 Ts={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"},Os={icate:"ic",ative:"",alize:"al",iciti:"ic",ical:"ic",ful:"",ness:""},Ds="[^aeiou]",Le="[aeiouy]",rt="("+Ds+"[^aeiouy]*)",ee="("+Le+"[aeiou]*)",Ce=new RegExp("^"+rt+"?"+ee+rt),Rs=new RegExp("^"+rt+"?"+ee+rt+ee+"?$"),te=new RegExp("^"+rt+"?("+ee+rt+"){2,}"),$i=new RegExp("^"+rt+"?"+Le),Bi=new RegExp("^"+rt+Le+"[^aeiouwxy]$"),Ms=/ll$/,Is=/^(.+?)e$/,Hs=/^(.+?)y$/,Ns=/^(.+?(s|t))(ion)$/,zs=/^(.+?)(ed|ing)$/,_s=/(at|bl|iz)$/,Ps=/^(.+?)eed$/,Fs=/^.+?[^s]s$/,$s=/^.+?(ss|i)es$/,Bs=/([^aeiouylsz])\\1$/,qs=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,Ks=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,Ws=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/;function qi(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)),$s.test(t)?t=t.slice(0,-2):Fs.test(t)&&(t=t.slice(0,-1));let n;return(n=Ps.exec(t))?Ce.test(n[1])&&(t=t.slice(0,-1)):(n=zs.exec(t))&&$i.test(n[1])&&(t=n[1],_s.test(t)?t+="e":Bs.test(t)?t=t.slice(0,-1):Bi.test(t)&&(t+="e")),(n=Hs.exec(t))&&$i.test(n[1])&&(t=n[1]+"i"),(n=qs.exec(t))&&Ce.test(n[1])&&(t=n[1]+Ts[n[2]]),(n=Ks.exec(t))&&Ce.test(n[1])&&(t=n[1]+Os[n[2]]),(n=Ws.exec(t))?te.test(n[1])&&(t=n[1]):(n=Ns.exec(t))&&te.test(n[1])&&(t=n[1]),(n=Is.exec(t))&&(te.test(n[1])||Rs.test(n[1])&&!Bi.test(n[1]))&&(t=n[1]),Ms.test(t)&&te.test(t)&&(t=t.slice(0,-1)),e&&(t="y"+t.slice(1)),t}var Ki=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(" ")),js=/[\\p{Script=Han}\\p{Script=Hiragana}\\p{Script=Katakana}\\p{Script=Hangul}]/u,Ft;function Vs(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&&!Ki.has(o)&&t.push(o)}for(let o of s)js.test(o)?t.push(...Vs(o)):o.length>=2&&!Ki.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)?qi(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=Xi(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),I=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===I))})}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 Ys(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]=Ui(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=Gs(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 Zs(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 Us(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 Ui(i,t,e=!1){let n=Xs(t);for(let o=Math.min(i.length,ji);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,ji));return e?t.shards.filter(o=>o.startsWith(s)).slice(0,10):[]}var ji=3,Vi=new WeakMap;function Xs(i){let t=Vi.get(i);return t||Vi.set(i,t=new Set(i.shards)),t}function Xi(i){return i.replace(/"/g,"").trim().toLowerCase()}function Gs(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(Xi(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 Zs(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 Ui(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&&Us(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 Gi(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 Qs(i,t,e,n=10){let s=t.slice(0,n);await Gi(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=Yi(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,Yi(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 Zi(i,t,e){await Gi(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 Yi(i,t,e){return i.every(n=>t.some(s=>e(n,s)))&&t.every(n=>i.some(s=>e(s,n)))}async function Qi(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 Ys(n,t);return n.highlight=[...new Set([...n.highlight,...n.groups.flatMap(r=>r.corrected??[])])],{parsed:n,results:await Qs(n,o,t,e)}}function Ji(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 tn(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:[Js(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 Js(i){return new DOMParser().parseFromString(i,"text/html").body.textContent??""}function en(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=Ji(\`\${i.unitRoot}_dogsbay/search/\`,i.loadScript,window),l=document.body.dataset.search??"builtin",c=location.protocol!=="file:",d=l==="pagefind"||l==="both"&&c?tn(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 Qi(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)}"\`,I,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(),I=k,n.dispatchEvent(new Event("input",{bubbles:!0}))},{signal:t}),D}):[]),w.hidden=!w.childElementCount,I!==void 0&&(([...w.querySelectorAll("button")].find(D=>D.textContent===I)??n).focus(),I=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=M(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=M(\`\${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 Zi(P,[T],a).then(()=>A.li.after(..._()),()=>{})),g.observe(A.li)}}return C},M=(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=to(i.unitRoot+S,x),T.tabIndex=-1,T.className=E,C.appendChild(T),{li:C,a:T}}}function to(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 nn=/[\\p{Script=Han}\\p{Script=Hiragana}\\p{Script=Katakana}\\p{Script=Hangul}]/u;function sn(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=>nn.test(g)).map(n),r=s.filter(g=>!nn.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 I=document.createElement("mark");I.className="db-search-hl",I.textContent=R[0],w.append(I),c.push(I),L=R.index+R[0].length}w.append(y.slice(L)),g.replaceWith(w)}if(eo(),!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 eo(){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"},io=function(t){return NodeList.prototype.isPrototypeOf(t)},ne=function(t){return t&&t.nodeType===1},on=function(t){var e=t.currentSrc||t.src;return e.substr(-4).toLowerCase()===".svg"},rn=function(t){try{return Array.isArray(t)?t.filter(ie):io(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.
|
|
1362
|
-
|
|
1363
|
-
See: https://github.com/francoischalifour/medium-zoom\`)}},no=function(t){var e=document.createElement("div");return e.classList.add("medium-zoom-overlay"),e.style.background=t,e},so=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},oo=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(!(I||!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:M}}))}),M},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,rn(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,_)})}),M},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,rn(k))},[]):L;return T.forEach(function(A){A.classList.remove("medium-zoom-image"),A.dispatchEvent(kt("medium-zoom:detach",{detail:{zoom:M}}))}),L=L.filter(function(A){return T.indexOf(A)===-1}),M},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}),M},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())}),M},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,dn=P.left,un=P.top;A=pt({},A,{width:tt,height:qt,left:dn,top:un})}k=k||A.width-O.margin*2,D=D||A.height-O.margin*2;var Ot=v.zoomedHd||v.original,hn=on(Ot)?k:Ot.naturalWidth||k,fn=on(Ot)?D:Ot.naturalHeight||D,Kt=Ot.getBoundingClientRect(),mn=Kt.top,pn=Kt.left,ae=Kt.width,le=Kt.height,gn=Math.min(Math.max(ae,hn),k)/ae,bn=Math.min(Math.max(le,fn),D)/le,ce=Math.min(gn,bn),vn=(-pn+(k-ae)/2+O.margin+A.left)/ce,yn=(-mn+(D-le)/2+O.margin+A.top)/ce,Re="scale("+ce+") translate3d("+vn+"px, "+yn+"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(M);return}var A=function tt(){I=!1,v.zoomed.removeEventListener("transitionend",tt),v.original.dispatchEvent(kt("medium-zoom:opened",{detail:{zoom:M}})),T(M)};if(v.zoomed){T(M);return}if(E)v.original=E;else if(L.length>0){var k=L;v.original=k[0]}else{T(M);return}if(v.original.dispatchEvent(kt("medium-zoom:open",{detail:{zoom:M}})),H=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,I=!0,v.zoomed=so(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(I||!v.original){x(M);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),I=!1,v.zoomed.removeEventListener("transitionend",C),v.original.dispatchEvent(kt("medium-zoom:closed",{detail:{zoom:M}})),v.original=null,v.zoomed=null,v.zoomedHd=null,v.template=null,x(M)};I=!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:M}})),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=[],I=!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=no(O.background);document.addEventListener("click",s),document.addEventListener("keyup",r),document.addEventListener("scroll",o),window.addEventListener("resize",p);var M={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 M};function ro(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 ao=".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}";ro(ao);var an=oo;var lo;function ln(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=lo??(lo=an());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 cn(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 co(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 uo(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 ho(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 cn(\`\${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 fo(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 mo(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 po(){oe(),document.querySelectorAll("[data-component='sidebar-provider']").forEach(i=>{if(Bt.has(i)||re.has(i))return;let t=new AbortController;mo(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),po(),i.theme!==!1&&co(e),uo(e),i.switchers!==!1&&ho(o,e),fo(e),i.search!==!1&&en({unitRoot:s,loadScript:cn,signal:e}),sn(e),ln(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();})();
|
|
1364
|
-
`;
|
|
1365
|
-
var THEME_TEMPLATES = { "layouts/blank.html": '{# A page without the sidebar or table of contents: landing pages, splash pages, 404. -#}\n<!doctype html>\n<html lang="{{ page.lang }}" dir="{{ page.dir }}"{% if site.colorMode == "dark" %} class="dark"{% endif %}>\n<head>\n{% include "partials/head.html" %}\n</head>\n<body class="bg-background text-foreground antialiased" data-unit-root="{{ paths.unit }}" data-site-root="{{ paths.site }}" data-prefix="{{ page.prefix }}" data-page="{{ page.out }}"{{ bodyAttrs }}>\n{{ skipLink }}\n<div class="relative flex min-h-svh w-full flex-col bg-background">\n{{ announcementBar }}\n{% include "partials/header.html" %}\n<main id="db-content" class="min-w-0 flex-1 px-6 py-8 outline-none lg:px-12" tabindex="-1">\n<div class="mx-auto {{ widthClass }}">\n{{ banner }}{{ versionBadge }}{{ h1 }}{{ byline }}{{ lede }}{{ hero }}{{ metaStrip }}\n<article class="docs-prose">\n{{ content }}\n</article>\n{% include "partials/footer.html" %}\n</div>\n</main>\n</div>\n{{ searchDialog }}\n{{ scripts }}\n</body>\n</html>\n', "layouts/docs.html": '{# The docs layout: a port of @dogsbay/docs-layout DocsLayout.astro. -#}\n<!doctype html>\n<html lang="{{ page.lang }}" dir="{{ page.dir }}"{% if site.colorMode == "dark" %} class="dark"{% endif %}>\n<head>\n{% include "partials/head.html" %}\n</head>\n<body class="bg-background text-foreground antialiased" data-unit-root="{{ paths.unit }}" data-site-root="{{ paths.site }}" data-prefix="{{ page.prefix }}" data-page="{{ page.out }}"{{ bodyAttrs }}>\n{{ skipLink }}\n<div class="group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar" data-component="sidebar-provider" style="--sidebar-width: 16rem; --sidebar-width-icon: 3rem;">\n{{ sidebar }}\n<div class="relative flex w-full min-w-0 flex-1 flex-col bg-background">\n{{ announcementBar }}\n{% include "partials/header.html" %}\n<div class="flex min-w-0">\n<main id="db-content" class="min-w-0 flex-1 px-6 py-8 outline-none lg:px-12" tabindex="-1">\n<div class="mx-auto {{ widthClass }}">\n{{ banner }}{{ breadcrumb }}{{ pageActionsInline }}{{ versionBadge }}{{ h1 }}{{ byline }}{{ lede }}{{ hero }}{{ metaStrip }}{{ tocTop }}\n<article class="docs-prose">\n{{ content }}\n</article>\n{% include "partials/footer.html" %}\n</div>\n</main>\n{{ tocRail }}\n</div>\n</div>\n</div>\n{{ searchDialog }}\n{{ scripts }}\n</body>\n</html>\n', "partials/announcement.html": `{#- The site's announcement bar (site.announcement), as DocsLayout's AnnouncementBar.astro: a band above the
|
|
1357
|
+
var CLIENT_JS = '/*! dogsbay-ssg site client (Apache-2.0). Third-party notices: THIRD-PARTY-NOTICES.txt */\n"use strict";(()=>{var kn=Object.defineProperty;var Tn=(i,t,e)=>t in i?kn(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e;var u=(i,t,e)=>Tn(i,typeof t!="symbol"?t+"":t,e);var N=class extends HTMLElement{constructor(){super(...arguments);u(this,"_initialized",!1);u(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(){}},On={"db-tabs":"block","db-accordion":"block","db-collapsible":"block","db-details-sheet":"block","db-card":"block","db-steps":"block","db-code-block":"block","db-link-button":"inline-block","db-dialog":"contents","db-popover":"inline-block","db-tooltip":"inline-block","db-select":"inline-block","db-combobox":"block","db-nav-tree":"block","db-toc":"block","db-announcement":"block"},Ie="dogsbay-elements-display";function z(){if(typeof document>"u"||document.getElementById(Ie))return;let i=Object.entries(On).map(([e,n])=>`:where(${e}){display:${n}}`).join(""),t=document.createElement("style");t.id=Ie,t.textContent=i,document.head.prepend(t)}function Dn(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&&Dn(i[n]));return n}var Dt=class{constructor(i,t,e={}){u(this,"container");u(this,"itemSelector");u(this,"opts");u(this,"keydownHandler",null);u(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 o=null;this.isForwardKey(i.key,e)?(o=gt(t,n,!1),o>=t.length&&(o=this.opts.loop?gt(t,-1,!1):n)):this.isBackwardKey(i.key,e)?(o=gt(t,n,!0),o<0&&(o=this.opts.loop?gt(t,t.length,!0):n)):this.opts.homeEnd&&i.key==="Home"?o=gt(t,-1,!1):this.opts.homeEnd&&i.key==="End"&&(o=gt(t,t.length,!0)),o!==null&&(o<0||o>=t.length||o!==n&&(i.preventDefault(),t[n].setAttribute("tabindex","-1"),t[o].setAttribute("tabindex","0"),t[o].focus(),this.opts.onHighlightedIndexChange(o)))},this.container.addEventListener("keydown",this.keydownHandler))}deactivate(){this.active&&(this.active=!1,this.keydownHandler&&(this.container.removeEventListener("keydown",this.keydownHandler),this.keydownHandler=null))}setActiveIndex(i,t){i.forEach((e,n)=>{e.setAttribute("tabindex",n===t?"0":"-1")})}isActive(){return this.active}};var Rn=0;function He(i){return`${i}-${++Rn}`}var Ne=class extends N{constructor(){super(...arguments);u(this,"list");u(this,"triggers",[]);u(this,"panels",[]);u(this,"nav",null);u(this,"value","");u(this,"syncKey",null);u(this,"orientation","horizontal");u(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)});u(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)});u(this,"handleSyncEvent",(t=>{let e=t.detail.value;e&&this.value!==e&&this.has(e)&&this.select(e)}))}has(t){return this.triggers.some(e=>e.dataset.value===t)}own(t){return Array.from(this.querySelectorAll(t)).filter(e=>e.closest("db-tabs")===this)}setup(){var s;let t=this.own("[data-part=\'list\']")[0]??null;if(!t)return;this.list=t,this.triggers=this.own("[data-part=\'trigger\']"),this.panels=this.own("[data-part=\'content\']"),this.orientation=this.getAttribute("orientation")||"horizontal",this.syncKey=this.getAttribute("sync-key")||null,t.setAttribute("role","tablist"),t.setAttribute("aria-orientation",this.orientation),this.triggers.forEach(r=>{let a=r.dataset.value;r.setAttribute("role","tab");let l=r.id||He("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||He("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")||((s=this.triggers[0])==null?void 0:s.dataset.value)||"";if(this.syncKey){let r=localStorage.getItem(`db-tabs-sync:${this.syncKey}`);r&&this.triggers.some(a=>a.dataset.value===r)&&(n=r)}let o=window.location.hash.slice(1);o&&this.triggers.some(r=>r.dataset.value===o)&&(n=o),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})))}};z();customElements.get("db-tabs")||customElements.define("db-tabs",Ne);var Mn=0;function In(i){return`${i}-${++Mn}`}var ze=class{constructor(i,t,e={}){u(this,"trigger");u(this,"content");u(this,"_open",!1);u(this,"opts");this.trigger=i,this.content=t,this.opts=e;let n=In("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 _e=class extends N{constructor(){super(...arguments);u(this,"items",[]);u(this,"nav",null);u(this,"openValues",new Set);u(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(o=>{let s=o.querySelector("[data-part=\'trigger\']"),r=o.querySelector("[data-part=\'content\']");if(!s||!r)return null;let a=o.dataset.value||"",l=o.hasAttribute("data-disabled");l&&(s.setAttribute("disabled",""),s.setAttribute("aria-disabled","true"));let c=new ze(s,r,{onToggle:d=>{d?this.onItemExpanded(a):this.onItemCollapsed(a)}});return{el:o,value:a,collapsible:c,disabled:l}}).filter(Boolean),this.nav=new Dt(this,"[data-part=\'trigger\']",{orientation:"vertical",loop:!0,homeEnd:!0}),this.nav.activate(),this.items.forEach((o,s)=>{o.collapsible.trigger.setAttribute("tabindex",s===0?"0":"-1")}),e.forEach(o=>{let s=this.items.find(r=>r.value===o&&!r.disabled);s&&s.collapsible.expand()})}onItemExpanded(t){if(this.type==="single"){for(let n of this.openValues)if(n!==t){let o=this.items.find(s=>s.value===n);o&&o.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}))}};z();customElements.get("db-accordion")||customElements.define("db-accordion",_e);var Hn=0;function F(i){return`${i}-${++Hn}`}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 j(i){return i.hasAttribute("disabled")||i.getAttribute("aria-disabled")==="true"||i.getAttribute("data-disabled")==="true"}function Pe(){return typeof HTMLElement<"u"&&typeof HTMLElement.prototype.showPopover=="function"}function vt(i){if(i.hidden=!1,!Pe())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(Pe())try{i.matches(":popover-open")&&i.hidePopover()}catch{}i.hidden=!0}var Nn=\'a[href], button:not([disabled]), input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"]), [contenteditable="true"]\';function Fe(i){return Array.from(i.querySelectorAll(Nn)).filter(t=>!t.closest("[hidden]")&&!j(t))}function $e(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 qe=class extends N{constructor(){super(...arguments);u(this,"details",null);u(this,"summary",null);u(this,"dialog",null);u(this,"body",null);u(this,"source",null);u(this,"moved",[]);u(this,"handledHash",null);u(this,"onSummaryClick",t=>{var n,o;let e=t.target;e&&e!==this.summary&&((o=(n=e.closest)==null?void 0:n.call(e,"a[href], button, input, select, textarea, label"))==null?void 0:o.closest("summary"))===this.summary||(t.preventDefault(),this.show())});u(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()});u(this,"onDialogClose",()=>this.restore());u(this,"onDocClick",t=>{var s,r;if(t.defaultPrevented||t.button!==0||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey)return;let e=(r=(s=t.target)==null?void 0:s.closest)==null?void 0:r.call(s,"a[href]");if(!e||!this.details||this.open||e.hasAttribute("download")||e.target&&e.target!=="_self")return;let n=new URL(e.href,location.href);if(!n.hash||n.hash!==location.hash||n.pathname!==location.pathname||n.search!==location.search)return;let o=document.getElementById(wt(n.hash.slice(1)));if(!(!o||!this.details.contains(o))){for(let a of this.details.querySelectorAll("db-details-sheet"))a.handledHash=null;this.show(o)}});u(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(h=>h.tagName==="DETAILS")??null,e=t?Array.from(t.children).find(h=>h.tagName==="SUMMARY")??null:null,n=typeof HTMLDialogElement<"u"&&typeof HTMLDialogElement.prototype.showModal=="function";if(!t||!e||!n)return;for(let h of Array.from(t.children))h.getAttribute("role")==="status"&&h.setAttribute("aria-live","off");this.details=t,this.summary=e,t.open=!1,zn();let o=(((d=e.querySelector("[data-part=\'title\']"))==null?void 0:d.textContent)??e.textContent??"").trim(),s=document.createElement("dialog");s.className="db-sheet",s.id=F("db-sheet");let r=document.createElement("h2");r.className="db-sheet-title",r.id=F("db-sheet-title"),r.textContent=o,s.setAttribute("aria-labelledby",r.id);let a=document.createElement("button");a.type="button",a.className="db-sheet-close",a.setAttribute("aria-label",this.getAttribute("close-label")||"Close"),a.innerHTML=\'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M18 6 6 18"/><path d="m6 6 12 12"/></svg>\',a.addEventListener("click",()=>s.close());let l=document.createElement("div");l.className="db-sheet-header",l.append(r,a);let c=document.createElement("div");c.className="db-sheet-body",s.append(l,c),this.append(s),this.dialog=s,this.body=c,e.setAttribute("aria-haspopup","dialog"),e.setAttribute("aria-controls",s.id),e.setAttribute("aria-expanded","false"),this.setAttribute("data-state","closed")}connect(){this.dialog&&(this.summary.addEventListener("click",this.onSummaryClick),this.dialog.addEventListener("click",this.onDialogClick),this.dialog.addEventListener("close",this.onDialogClose),window.addEventListener("hashchange",this.onHash),document.addEventListener("click",this.onDocClick),queueMicrotask(()=>this.isConnected&&this.openForHash()))}disconnect(){this.dialog&&(this.dialog.open&&this.dialog.close(),this.restore(!1),this.summary.removeEventListener("click",this.onSummaryClick),this.dialog.removeEventListener("click",this.onDialogClick),this.dialog.removeEventListener("close",this.onDialogClose),window.removeEventListener("hashchange",this.onHash),document.removeEventListener("click",this.onDocClick))}show(t){var l;let{dialog:e,details:n,body:o}=this;if(!e||!n||!o||e.open)return;let s=Array.from(n.childNodes).filter(c=>c!==this.summary),r=s.filter(c=>c.nodeType===Node.ELEMENT_NODE),a=r.length===1&&s.every(c=>{var d;return c===r[0]||!((d=c.textContent)!=null&&d.trim())})?r[0]:null;this.source=a??n,this.moved=a?Array.from(a.childNodes):s,o.append(...this.moved),e.showModal(),this.summary.setAttribute("aria-expanded","true"),this.setAttribute("data-state","open"),t&&t!==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)}},Be="dogsbay-details-sheet";function zn(){if(document.getElementById(Be))return;let i=document.createElement("style");i.id=Be,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)}z();customElements.get("db-details-sheet")||customElements.define("db-details-sheet",qe);var Ke=class extends N{constructor(){super(...arguments);u(this,"copyBtn",null);u(this,"copyIcon",null);u(this,"checkIcon",null);u(this,"liveRegion",null);u(this,"resetTimeout",null);u(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)}};z();customElements.get("db-code-block")||customElements.define("db-code-block",Ke);var je=class extends N{constructor(){super(...arguments);u(this,"navData",null);u(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)});u(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(),o=e.closest("[data-part=\'row\']"),s=o?n.indexOf(o):-1;if(s<0)return;let r=o.closest("[data-part=\'item\']"),a=!!this.groupOf(r),l=h=>{var f;h&&(t.preventDefault(),(f=this.primary(h))==null||f.focus())};switch(t.key){case"ArrowDown":return l(n[s+1]);case"ArrowUp":return l(n[s-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()[s+1]):this.setOpen(r,!0);return;case"ArrowLeft":{if(t.preventDefault(),a&&this.isOpen(r))return this.setOpen(r,!1);let h=(c=r.parentElement)==null?void 0:c.closest("[data-part=\'item\']");if(h&&this.contains(h)){let f=h.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 o=n.getAttribute("aria-expanded")==="true"||t.getAttribute("data-state")==="open";this.apply(t,o)}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),o=this.toggleOf(t);n&&(n.hidden=!e),o==null||o.setAttribute("aria-expanded",String(e)),t.setAttribute("data-state",e?"open":"closed")}revealCurrent(){var s;let t=this.querySelector("[aria-current=\'page\']");if(!t)return;for(let r=t.closest("[data-part=\'item\']");r&&this.contains(r);r=((s=r.parentElement)==null?void 0:s.closest("[data-part=\'item\']"))??null)this.groupOf(r)&&!this.groupOf(r).contains(t)||this.groupOf(r)&&this.setOpen(r,!0);let e=Pn(this);if(!e)return;let n=t.getBoundingClientRect(),o=e.getBoundingClientRect();(n.top<o.top||n.bottom>o.bottom)&&(e.scrollTop+=n.top-o.top-o.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 o=e,s;for(let r of n.split(".").map(Number))s=o==null?void 0:o[r],o=s==null?void 0:s[2];s!=null&&s[2]&&(t.replaceChildren(...this.build(s[2],n)),t.removeAttribute("data-lazy"))}build(t,e){let n=this.getAttribute("base")??"",o=this.getAttribute("toggle-label")??"Toggle {label}",s=location.href.split("#")[0];return t.map(([r,a,l,c],d)=>{let h=`${e}.${d}`,f=document.createElement("li");f.setAttribute("data-part","item"),f.style.setProperty("--db-level",String(h.split(".").length-1));let m=document.createElement("div");m.setAttribute("data-part","row"),f.appendChild(m);let b=(a==null?void 0:a.replace(/[\\u0000-\\u0020]/g,""))??"";a!=null&&/^[a-z][a-z0-9+.-]*:/i.test(b)&&!/^(?:https?|mailto):/i.test(b)&&(a=null);let p=a!=null&&/^[a-z][a-z0-9+.-]*:|^\\/\\//i.test(b),y=null;if(l!=null&&l.length){if(y=document.createElement("button"),y.type="button",y.setAttribute("data-part","toggle"),y.setAttribute("aria-expanded","false"),a!=null)y.setAttribute("aria-label",o.replace("{label}",()=>r));else{let g=document.createElement("span");g.setAttribute("data-part","label"),g.textContent=r,y.appendChild(g)}y.insertAdjacentHTML("beforeend",_n)}let w=this.getAttribute("toggle-position")==="end";if(y&&!w&&m.appendChild(y),a!=null){let g=document.createElement("a");g.setAttribute("data-part","link"),g.textContent=r,g.href=p?a:n+a,p&&(g.rel="noopener"),!c&&g.href.split("#")[0]===s&&g.setAttribute("aria-current","page"),m.appendChild(g)}if(a==null&&!(l!=null&&l.length)){let g=document.createElement("span");g.setAttribute("data-part","label"),g.textContent=r,m.appendChild(g)}if(y&&w&&m.appendChild(y),l!=null&&l.length){let g=document.createElement("ul");g.setAttribute("data-part","group"),g.dataset.lazy="",g.dataset.path=h,g.hidden=!0,f.setAttribute("data-state","closed"),f.appendChild(g),this.prepareItem(f)}return f})}},_n=\'<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 Pn(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}z();customElements.get("db-nav-tree")||customElements.define("db-nav-tree",je);var We=class extends N{constructor(){super(...arguments);u(this,"links",[]);u(this,"headings",[]);u(this,"observer",null);u(this,"active",null);u(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)});u(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 s;let o=n.find(r=>r.isIntersecting);if(o)return this.setActive(o.target.id);this.setActive(((s=this.lastAbove(t))==null?void 0:s.id)??null)},{rootMargin:`-${t}px 0px -70% 0px`,threshold:0}),this.headings.forEach(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}))}}};z();customElements.get("db-toc")||customElements.define("db-toc",We);var Fn=["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=Fn.join(","),Ye=typeof Element>"u",Rt=Ye?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Kt=!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 o=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"inert"),s=o===""||o==="true",r=s||e&&t&&(typeof t.closest=="function"?t.closest("[inert]"):jt(t.parentNode));return r},$n=function(t){var e,n=t==null||(e=t.getAttribute)===null||e===void 0?void 0:e.call(t,"contenteditable");return n===""||n==="true"},Bn=function(t,e,n){if(jt(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(de));return e&&Rt.call(t,de)&&o.unshift(t),o=o.filter(n),o},ue=function(t,e,n){for(var o=[],s=Array.from(t);s.length;){var r=s.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?o.push.apply(o,c):o.push({scopeParent:r,candidates:c})}else{var d=Rt.call(r,de);d&&n.filter(r)&&(e||!t.includes(r))&&o.push(r);var h=r.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(r),f=!jt(h,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(r));if(h&&f){var m=ue(h===!0?r.children:h.children,!0,n);n.flatten?o.push.apply(o,m):o.push({scopeParent:r,candidates:m})}else s.unshift.apply(s,r.children)}}return o},Xe=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Ge=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||$n(t))&&!Xe(t)?0:t.tabIndex},qn=function(t,e){var n=Ge(t);return n<0&&e&&!Xe(t)?0:n},Kn=function(t,e){return t.tabIndex===e.tabIndex?t.documentOrder-e.documentOrder:t.tabIndex-e.tabIndex},Ze=function(t){return t.tagName==="INPUT"},jn=function(t){return Ze(t)&&t.type==="hidden"},Wn=function(t){var e=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(n){return n.tagName==="SUMMARY"});return e},Vn=function(t,e){for(var n=0;n<t.length;n++)if(t[n].checked&&t[n].form===e)return t[n]},Un=function(t){if(!t.name)return!0;var e=t.form||Kt(t),n=function(a){return e.querySelectorAll(\'input[type="radio"][name="\'+a+\'"]\')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=n(window.CSS.escape(t.name));else try{o=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 s=Vn(o,t.form);return!s||s===t},Yn=function(t){return Ze(t)&&t.type==="radio"},Xn=function(t){return Yn(t)&&!Un(t)},Gn=function(t){var e,n=t&&Kt(t),o=(e=n)===null||e===void 0?void 0:e.host,s=!1;if(n&&n!==t){var r,a,l;for(s=!!((r=o)!==null&&r!==void 0&&(a=r.ownerDocument)!==null&&a!==void 0&&a.contains(o)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!s&&o;){var c,d,h;n=Kt(o),o=(c=n)===null||c===void 0?void 0:c.host,s=!!((d=o)!==null&&d!==void 0&&(h=d.ownerDocument)!==null&&h!==void 0&&h.contains(o))}}return s},Ve=function(t){var e=t.getBoundingClientRect(),n=e.width,o=e.height;return n===0&&o===0},Zn=function(t,e){var n=e.displayCheck,o=e.getShadowRoot;if(n==="full-native"&&"checkVisibility"in t){var s=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!s}var r=getComputedStyle(t),a=r.visibility;if(a==="hidden"||a==="collapse")return!0;var l=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 o=="function"){for(var d=t;t;){var h=t.parentElement,f=Kt(t);if(h&&!h.shadowRoot&&o(h)===!0)return Ve(t);t.assignedSlot?t=t.assignedSlot:!h&&f!==t.ownerDocument?t=f.host:t=h}t=d}if(Gn(t))return!t.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return Ve(t);return!1},Qn=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 o=e.children.item(n);if(o.tagName==="LEGEND")return Rt.call(e,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}e=e.parentElement}return!1},Jn=function(t,e){return!(e.disabled||jn(e)||Zn(e,t)||Wn(e)||Qn(e))},Ue=function(t,e){return!(Xn(e)||Ge(e)<0||!Jn(t,e))},to=function(t){var e=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(e)||e>=0)},Qe=function(t){var e=[],n=[];return t.forEach(function(o,s){var r=!!o.scopeParent,a=r?o.scopeParent:o,l=qn(a,r),c=r?Qe(o.candidates):a;l===0?r?e.push.apply(e,c):e.push(a):n.push({documentOrder:s,tabIndex:l,item:o,isScope:r,content:c})}),n.sort(Kn).reduce(function(o,s){return s.isScope?o.push.apply(o,s.content):o.push(s.content),o},[]).concat(e)},he=function(t,e){e=e||{};var n;return e.getShadowRoot?n=ue([t],e.includeContainer,{filter:Ue.bind(null,e),flatten:!1,getShadowRoot:e.getShadowRoot,shadowRootFilter:to}):n=Bn(t,e.includeContainer,Ue.bind(null,e)),Qe(n)};var fe=class{constructor(i,t={}){u(this,"root");u(this,"opts");u(this,"previouslyFocused",null);u(this,"keydownHandler",null);u(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}},u(B,"count",0),u(B,"originalStyles",null),B);var Z=[];function eo(i){if(i.key!=="Escape"||Z.length===0)return;let t=Z[Z.length-1];t.escapePrevented||(i.preventDefault(),i.stopPropagation(),t.opts.onDismiss("escape-key"))}var Je=!1;function io(){Je||(Je=!0,document.addEventListener("keydown",eo))}var lt=class{constructor(i,t){u(this,"root");u(this,"opts");u(this,"outsideHandler",null);u(this,"active",!1);u(this,"frameId",null);u(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&&(io(),Z.push(this)),this.opts.outsidePress&&(this.outsideHandler=i=>{if(Z.length>0&&Z[Z.length-1]!==this)return;let t=i.target;if(this.root.contains(t))return;let e=this.root.id;if(e){let o=document.querySelector(`[aria-controls="${e}"]`);if(o!=null&&o.contains(t))return}let n=this.root.getAttribute("aria-labelledby");if(n){let o=document.getElementById(n);if(o!=null&&o.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=Z.indexOf(this);i!==-1&&Z.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 o=0;o<n.children.length;o++){let s=n.children[o];if(s===e||s.contains(i))continue;let r=s.tagName;if(r==="SCRIPT"||r==="STYLE"||r==="LINK")continue;let a=s.getAttribute("aria-hidden");a!=="true"&&(t.push({el:s,prev:a}),s.setAttribute("aria-hidden","true"))}e=n}return()=>{for(let{el:n,prev:o}of t)o===null?n.removeAttribute("aria-hidden"):n.setAttribute("aria-hidden",o)}}var ti=class extends N{constructor(){super(...arguments);u(this,"content",null);u(this,"backdrop",null);u(this,"trigger",null);u(this,"native",!1);u(this,"_open",!1);u(this,"openedBy",null);u(this,"focusTrap",null);u(this,"dismiss",null);u(this,"cleanupInert",null);u(this,"onTriggerClick",t=>{t.preventDefault(),this.toggle(t.currentTarget)});u(this,"onHostClick",t=>{let e=t.target.closest("[data-part=\'close\']");e&&e.closest("db-dialog")===this&&this.close("close-press")});u(this,"onDocumentClick",t=>{var o,s,r;let e=(s=(o=t.target).closest)==null?void 0:s.call(o,"[data-dialog-for]");if(!e||e===this.trigger)return;let n=e.getAttribute("data-dialog-for");n&&(n===this.id||n===((r=this.content)==null?void 0:r.id))&&(t.preventDefault(),this.toggle(e))});u(this,"onCancel",t=>{t.preventDefault(),this.dismissible&&this.close("escape-key")});u(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")});u(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 o of this.triggers())this.prepareTrigger(o);this.setState("closed"),this.native||(this.focusTrap=new fe(t),this.dismiss=new lt(t,{onDismiss:o=>this.dismissible&&this.close(o)}))}connect(){var t;this.content&&((t=this.trigger)==null||t.addEventListener("click",this.onTriggerClick),this.addEventListener("click",this.onHostClick),document.addEventListener("click",this.onDocumentClick),this.native&&(this.content.addEventListener("cancel",this.onCancel),this.content.addEventListener("click",this.onNativeClick),this.content.addEventListener("close",this.onNativeClose)),queueMicrotask(()=>{if(this.isConnected){for(let e of this.triggers())e.hasAttribute("aria-controls")||this.prepareTrigger(e);this.hasAttribute("open")&&!this._open&&this.show()}}))}disconnect(){var t;(t=this.trigger)==null||t.removeEventListener("click",this.onTriggerClick),this.removeEventListener("click",this.onHostClick),document.removeEventListener("click",this.onDocumentClick),this.content&&this.native&&(this.content.removeEventListener("cancel",this.onCancel),this.content.removeEventListener("click",this.onNativeClick),this.content.removeEventListener("close",this.onNativeClose)),this._open&&this.finishClose("api",!1)}triggers(){var n;let t=this.trigger?[this.trigger]:[],e=[this.id,(n=this.content)==null?void 0:n.id].filter(Boolean);for(let o of e)document.querySelectorAll(`[data-dialog-for="${CSS.escape(o)}"]`).forEach(s=>t.push(s));return t}prepareTrigger(t){t.hasAttribute("aria-haspopup")||t.setAttribute("aria-haspopup","dialog"),t.setAttribute("aria-controls",this.content.id),t.setAttribute("aria-expanded","false")}setState(t){var e,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,o;let e=this.content;if(!(!e||this._open)){this._open=!0,this.openedBy=t??document.activeElement??this.trigger;for(let s of this.triggers())this.prepareTrigger(s),s.setAttribute("aria-expanded","true");if(at.activate(),this.native){let s=e;s.open||s.showModal()}else e.hidden=!1,this.backdrop&&(this.backdrop.hidden=!1),this.cleanupInert=me(e),(n=this.focusTrap)==null||n.activate(),(o=this.dismiss)==null||o.activate();this.setState("open"),this.dispatchEvent(new CustomEvent("db-dialog:open",{bubbles:!0}))}}close(t="api"){this._open&&this.finishClose(t)}finishClose(t,e=!0){var s,r,a;let 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(s=this.dismiss)==null||s.deactivate(),(r=this.focusTrap)==null||r.deactivate(),(a=this.cleanupInert)==null||a.call(this),this.cleanupInert=null,$e(n,()=>{this._open||(n.hidden=!0,this.backdrop&&(this.backdrop.hidden=!0))});let o=this.openedBy;this.openedBy=null,e&&o&&document.contains(o)&&o.focus(),this.dispatchEvent(new CustomEvent("db-dialog:close",{detail:{reason:t},bubbles:!0}))}};z();customElements.get("db-dialog")||customElements.define("db-dialog",ti);var ei=class extends N{constructor(){super(...arguments);u(this,"input",null);u(this,"listbox",null);u(this,"empty",null);u(this,"_open",!1);u(this,"highlighted",null);u(this,"observer",null);u(this,"base",F("db-combobox"));u(this,"optionSeq",0);u(this,"onInput",()=>{this.filtering?this.filter(this.input.value):this.show()});u(this,"onFocus",()=>{(this.hasAttribute("open-on-focus")||this.filtering&&this.input.value)&&(this.filtering?this.filter(this.input.value):this.show())});u(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}});u(this,"onListClick",t=>{let e=t.target.closest("[data-part=\'option\']");if(!e||e.closest("db-combobox")!==this||j(e))return;let n=t.target.closest("a[href]");!this.choose(e,!n)&&n&&t.preventDefault()});u(this,"onListPointer",t=>{let e=t.target.closest("[data-part=\'option\']");e&&e.closest("db-combobox")===this&&!j(e)&&!e.hidden&&this.highlight(e)});u(this,"onListDown",t=>t.preventDefault());u(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&&!j(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 s of this.options()){let r=!e||(s.textContent??"").toLowerCase().includes(e)||(s.dataset.value??"").toLowerCase().includes(e);s.hidden=!r,r&&n++}this.empty&&(this.empty.hidden=n>0||!e),this.clearHighlight(),n||e&&this.empty?this.show():this.hide();let o=this.visible();o.length&&!this.hasAttribute("no-autohighlight")&&this.highlight(o[0]),this.dispatchEvent(new CustomEvent("db-combobox:update",{detail:{count: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,o;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),(o=t.scrollIntoView)==null||o.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??"",o=((a=t.textContent)==null?void 0:a.trim())??n,s=new CustomEvent("db-combobox:select",{detail:{value:n,text:o,option:t},bubbles:!0,cancelable:!0});if(!this.dispatchEvent(s))return!1;let r=t.matches("a[href]")?t:t.querySelector("a[href]");return r?(e&&r.click(),!0):(this.input&&(this.input.value=t.getAttribute("data-label")??o),this.inline||this.hide(),this.dispatchEvent(new CustomEvent("db-combobox:change",{detail:{value:n,text:o},bubbles:!0})),!0)}};z();customElements.get("db-combobox")||customElements.define("db-combobox",ei);var it=Math.min,W=Math.max,It=Math.round,Ht=Math.floor,Y=i=>({x:i,y:i}),no={left:"right",right:"left",bottom:"top",top:"bottom"};function oi(i,t,e){return W(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),o=be(i),s=ge(o),r=o==="x"?n===(e?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(r=Mt(r)),[r,Mt(r)]}function ri(i){let t=Mt(i);return[Wt(i),t,Wt(t)]}function Wt(i){return i.includes("start")?i.replace("start","end"):i.replace("end","start")}var ii=["left","right"],ni=["right","left"],oo=["top","bottom"],so=["bottom","top"];function ro(i,t,e){switch(i){case"top":case"bottom":return e?t?ni:ii:t?ii:ni;case"left":case"right":return t?oo:so;default:return[]}}function ai(i,t,e,n){let o=xt(i),s=ro(nt(i),e==="start",n);return o&&(s=s.map(r=>r+"-"+o),t&&(s=s.concat(s.map(Wt)))),s}function Mt(i){let t=nt(i);return no[t]+i.slice(t.length)}function ao(i){var t,e,n,o;return{top:(t=i.top)!=null?t:0,right:(e=i.right)!=null?e:0,bottom:(n=i.bottom)!=null?n:0,left:(o=i.left)!=null?o:0}}function li(i){return typeof i!="number"?ao(i):{top:i,right:i,bottom:i,left:i}}function ct(i){let{x:t,y:e,width:n,height:o}=i;return{width:n,height:o,top:e,left:t,right:t+n,bottom:e+o,x:t,y:e}}function ci(i,t,e){let{reference:n,floating:o}=i,s=X(t),r=be(t),a=ge(r),l=nt(t),c=s==="y",d=n.x+n.width/2-o.width/2,h=n.y+n.height/2-o.height/2,f=n[a]/2-o[a]/2,m;switch(l){case"top":m={x:d,y:n.y-o.height};break;case"bottom":m={x:d,y:n.y+n.height};break;case"right":m={x:n.x+n.width,y:h};break;case"left":m={x:n.x-o.width,y:h};break;default:m={x:n.x,y:n.y}}let b=xt(t);return b&&(m[r]+=f*(b==="end"?1:-1)*(e&&c?-1:1)),m}async function di(i,t){var e;t===void 0&&(t={});let{x:n,y:o,platform:s,rects:r,elements:a,strategy:l}=i,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:f=!1,padding:m=0}=Et(t,i),b=li(m),y=a[f?h==="floating"?"reference":"floating":h],w=ct(await s.getClippingRect({element:(e=await(s.isElement==null?void 0:s.isElement(y)))==null||e?y:y.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:l})),g=h==="floating"?{x:n,y:o,width:r.floating.width,height:r.floating.height}:r.reference,x=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),S=await(s.isElement==null?void 0:s.isElement(x))&&await(s.getScale==null?void 0:s.getScale(x))||{x:1,y:1},M=ct(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:g,offsetParent:x,strategy:l}):g);return{top:(w.top-M.top+b.top)/S.y,bottom:(M.bottom-w.bottom+b.bottom)/S.y,left:(w.left-M.left+b.left)/S.x,right:(M.right-w.right+b.right)/S.x}}var lo=50,ui=async(i,t,e)=>{let{placement:n="bottom",strategy:o="absolute",middleware:s=[],platform:r}=e,a=r.detectOverflow?r:{...r,detectOverflow:di},l=await(r.isRTL==null?void 0:r.isRTL(t)),c=await r.getElementRects({reference:i,floating:t,strategy:o}),{x:d,y:h}=ci(c,n,l),f=n,m=0,b={};for(let p=0;p<s.length;p++){let y=s[p];if(!y)continue;let{name:w,fn:g}=y,{x,y:S,data:M,reset:H}=await g({x:d,y:h,initialPlacement:n,placement:f,strategy:o,middlewareData:b,rects:c,platform:a,elements:{reference:i,floating:t}});d=x??d,h=S??h,b[w]={...b[w],...M},H&&m<lo&&(m++,typeof H=="object"&&(H.placement&&(f=H.placement),H.rects&&(c=H.rects===!0?await r.getElementRects({reference:i,floating:t,strategy:o}):H.rects),{x:d,y:h}=ci(c,f,l)),p=-1)}return{x:d,y:h,placement:f,strategy:o,middlewareData:b}};var hi=function(i){return i===void 0&&(i={}),{name:"flip",options:i,async fn(t){var e,n;let{placement:o,middlewareData:s,rects:r,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:d=!0,crossAxis:h=!0,fallbackPlacements:f,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:p=!0,...y}=Et(i,t);if((e=s.arrow)!=null&&e.alignmentOffset)return{};let w=nt(o),g=X(a),x=nt(a)===a,S=await(l.isRTL==null?void 0:l.isRTL(c.floating)),M=f||(x||!p?[Mt(a)]:ri(a)),H=b!=="none";!f&&H&&M.push(...ai(a,p,b,S));let D=[a,...M],v=await l.detectOverflow(t,y),q=[],I=((n=s.flip)==null?void 0:n.overflows)||[];if(d&&q.push(v[w]),h){let C=si(o,r,S);q.push(v[C[0]],v[C[1]])}if(I=[...I,{placement:o,overflows:q}],!q.every(C=>C<=0)){var L,A;let C=(((L=s.flip)==null?void 0:L.index)||0)+1,O=D[C];if(O&&(!(h==="alignment"?g!==X(O):!1)||I.every(R=>X(R.placement)===g?R.overflows[0]>0:!0)))return{data:{index:C,overflows:I},reset:{placement:O}};let k=(A=I.filter(T=>T.overflows[0]<=0).sort((T,R)=>T.overflows[1]-R.overflows[1])[0])==null?void 0:A.placement;if(!k)switch(m){case"bestFit":{var E;let T=(E=I.filter(R=>{if(H){let _=X(R.placement);return _===g||_==="y"}return!0}).map(R=>[R.placement,R.overflows.filter(_=>_>0).reduce((_,P)=>_+P,0)]).sort((R,_)=>R[1]-_[1])[0])==null?void 0:E[0];T&&(k=T);break}case"initialPlacement":k=a;break}if(o!==k)return{reset:{placement:k}}}return{}}}};var co=new Set(["left","top"]);async function uo(i,t){let{placement:e,platform:n,elements:o}=i,s=await(n.isRTL==null?void 0:n.isRTL(o.floating)),r=nt(e),a=xt(e),l=X(e)==="y",c=co.has(r)?-1:1,d=s&&l?-1:1,h=Et(t,i),{mainAxis:f,crossAxis:m,alignmentAxis:b}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return a&&typeof b=="number"&&(m=a==="end"?b*-1:b),l?{x:m*d,y:f*c}:{x:f*c,y:m*d}}var fi=function(i){return i===void 0&&(i=0),{name:"offset",options:i,async fn(t){var e,n;let{x:o,y:s,placement:r,middlewareData:a}=t,l=await uo(t,i);return r===((e=a.offset)==null?void 0:e.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:o+l.x,y:s+l.y,data:{...l,placement:r}}}}},mi=function(i){return i===void 0&&(i={}),{name:"shift",options:i,async fn(t){let{x:e,y:n,placement:o,platform:s}=t,{mainAxis:r=!0,crossAxis:a=!1,limiter:l={fn:g=>{let{x,y:S}=g;return{x,y:S}}},...c}=Et(i,t),d={x:e,y:n},h=await s.detectOverflow(t,c),f=X(o),m=pe(f),b=d[m],p=d[f],y=(g,x)=>oi(x+h[g==="y"?"top":"left"],x,x-h[g==="y"?"bottom":"right"]);r&&(b=y(m,b)),a&&(p=y(f,p));let w=l.fn({...t,[m]:b,[f]:p});return{...w,data:{x:w.x-e,y:w.y-n,enabled:{[m]:r,[f]:a}}}}}};var pi=function(i){return i===void 0&&(i={}),{name:"size",options:i,async fn(t){let{placement:e,rects:n,platform:o,elements:s}=t,{apply:r=()=>{},...a}=Et(i,t),l=await o.detectOverflow(t,a),c=nt(e),d=xt(e),h=X(e)==="y",{width:f,height:m}=n.floating,b,p;c==="top"||c==="bottom"?(b=c,p=d===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?"start":"end")?"left":"right"):(p=c,b=d==="end"?"top":"bottom");let y=m-l.top-l.bottom,w=f-l.left-l.right,g=it(m-l[b],y),x=it(f-l[p],w),S=t.middlewareData.shift,M=!S,H=g,D=x;S!=null&&S.enabled.x&&(D=w),S!=null&&S.enabled.y&&(H=y),M&&!d&&(h?D=f-2*W(l.left,l.right):H=m-2*W(l.top,l.bottom)),await r({...t,availableWidth:D,availableHeight:H});let v=await o.getDimensions(s.floating);return f!==v.width||m!==v.height?{reset:{rects:!0}}:{}}}};function Vt(){return typeof window<"u"}function ut(i){return bi(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=(bi(i)?i.ownerDocument:i.document)||window.document)==null?void 0:t.documentElement}function bi(i){return Vt()?i instanceof Node||i instanceof K(i).Node:!1}function V(i){return Vt()?i instanceof Element||i instanceof K(i).Element:!1}function Q(i){return Vt()?i instanceof HTMLElement||i instanceof K(i).HTMLElement:!1}function gi(i){return!Vt()||typeof ShadowRoot>"u"?!1:i instanceof ShadowRoot||i instanceof K(i).ShadowRoot}function Nt(i){let{overflow:t,overflowX:e,overflowY:n,display:o}=U(i);return/auto|scroll|overlay|hidden|clip/.test(t+n+e)&&o!=="inline"&&o!=="contents"}function vi(i){return/^(table|td|th)$/.test(ut(i))}function zt(i){try{if(i.matches(":popover-open"))return!0}catch{}try{return i.matches(":modal")}catch{return!1}}var ho=/transform|translate|scale|rotate|perspective|filter/,fo=/paint|layout|strict|content/,dt=i=>!!i&&i!=="none",ve;function Ut(i){let t=V(i)?U(i):i;return dt(t.transform)||dt(t.translate)||dt(t.scale)||dt(t.rotate)||dt(t.perspective)||!Yt()&&(dt(t.backdropFilter)||dt(t.filter))||ho.test(t.willChange||"")||fo.test(t.contain||"")}function yi(i){let t=ot(i);for(;Q(t)&&!St(t);){if(Ut(t))return t;if(zt(t))return null;t=ot(t)}return null}function Yt(){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 U(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 ot(i){if(ut(i)==="html")return i;let t=i.assignedSlot||i.parentNode||gi(i)&&i.host||G(i);return gi(t)?t.host:t}function wi(i){let t=ot(i);return St(t)?(i.ownerDocument||i).body:Q(t)&&Nt(t)?t:wi(t)}function At(i,t,e){var n;t===void 0&&(t=[]),e===void 0&&(e=!0);let o=wi(i),s=o===((n=i.ownerDocument)==null?void 0:n.body),r=K(o);if(s){let a=Xt(r);return t.concat(r,r.visualViewport||[],Nt(o)?o:[],a&&e?At(a):[])}else return t.concat(o,At(o,[],e))}function Xt(i){return i.parent&&Object.getPrototypeOf(i.parent)?i.frameElement:null}function Ai(i){let t=U(i),e=parseFloat(t.width)||0,n=parseFloat(t.height)||0,o=Q(i),s=o?i.offsetWidth:e,r=o?i.offsetHeight:n,a=It(e)!==s||It(n)!==r;return a&&(e=s,n=r),{width:e,height:n,$:a}}function we(i){return V(i)?i:i.contextElement}function Ct(i){let t=we(i);if(!Q(t))return Y(1);let e=t.getBoundingClientRect(),{width:n,height:o,$:s}=Ai(t),r=(s?It(e.width):e.width)/n,a=(s?It(e.height):e.height)/o;return(!r||!Number.isFinite(r))&&(r=1),(!a||!Number.isFinite(a))&&(a=1),{x:r,y:a}}var mo=Y(0);function Si(i){let t=K(i);return!Yt()||!t.visualViewport?mo:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function po(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 o=i.getBoundingClientRect(),s=we(i),r=Y(1);t&&(n?V(n)&&(r=Ct(n)):r=Ct(i));let a=po(s,e,n)?Si(s):Y(0),l=(o.left+a.x)/r.x,c=(o.top+a.y)/r.y,d=o.width/r.x,h=o.height/r.y;if(s&&n){let f=K(s),m=V(n)?K(n):n,b=f,p=Xt(b);for(;p&&m!==b;){let y=Ct(p),w=p.getBoundingClientRect(),g=U(p),x=w.left+(p.clientLeft+parseFloat(g.paddingLeft))*y.x,S=w.top+(p.clientTop+parseFloat(g.paddingTop))*y.y;l*=y.x,c*=y.y,d*=y.x,h*=y.y,l+=x,c+=S,b=K(p),p=Xt(b)}}return ct({width:d,height:h,x:l,y:c})}function Gt(i,t){let e=_t(i).scrollLeft;return t?t.left+e:ht(G(i)).left+e}function Ci(i,t){let e=i.getBoundingClientRect(),n=e.left+t.scrollLeft-Gt(i,e),o=e.top+t.scrollTop;return{x:n,y:o}}function go(i){let{elements:t,rect:e,offsetParent:n,strategy:o}=i,s=o==="fixed",r=G(n),a=t?zt(t.floating):!1;if(n===r||a&&s)return e;let l={scrollLeft:0,scrollTop:0},c=Y(1),d=Y(0),h=Q(n);if((h||!s)&&((ut(n)!=="body"||Nt(r))&&(l=_t(n)),h)){let m=ht(n);c=Ct(n),d.x=m.x+n.clientLeft,d.y=m.y+n.clientTop}let f=r&&!h&&!s?Ci(r,l):Y(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 bo(i){return i.getClientRects?Array.from(i.getClientRects()):[]}function vo(i){let t=_t(i),e=i.ownerDocument.body,n=W(i.scrollWidth,i.clientWidth,e.scrollWidth,e.clientWidth),o=W(i.scrollHeight,i.clientHeight,e.scrollHeight,e.clientHeight),s=-t.scrollLeft+Gt(i),r=-t.scrollTop;return U(e).direction==="rtl"&&(s+=W(i.clientWidth,e.clientWidth)-n),{width:n,height:o,x:s,y:r}}var yo=25;function wo(i,t,e){e===void 0&&(e="viewport");let n=e==="layoutViewport",o=K(i),s=G(i),r=o.visualViewport,a=s.clientWidth,l=s.clientHeight,c=0,d=0;if(r){let f=!Yt()||t==="fixed";n?f||(c=-r.offsetLeft,d=-r.offsetTop):(a=r.width,l=r.height,f&&(c=r.offsetLeft,d=r.offsetTop))}if(Gt(s)<=0){let f=s.ownerDocument,m=f.body,b=getComputedStyle(m),p=f.compatMode==="CSS1Compat"&&parseFloat(b.marginLeft)+parseFloat(b.marginRight)||0,y=Math.abs(s.clientWidth-m.clientWidth-p),w=getComputedStyle(s).scrollbarGutter==="stable both-edges"?y/2:y;w<=yo&&(a-=w)}return{width:a,height:l,x:c,y:d}}function Eo(i,t){let e=ht(i,!0,t==="fixed"),n=e.top+i.clientTop,o=e.left+i.clientLeft,s=Ct(i),r=i.clientWidth*s.x,a=i.clientHeight*s.y,l=o*s.x,c=n*s.y;return{width:r,height:a,x:l,y:c}}function Ei(i,t,e){let n;if(t==="viewport"||t==="layoutViewport")n=wo(i,e,t);else if(t==="document")n=vo(G(i));else if(V(t))n=Eo(t,e);else{let o=Si(i);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return ct(n)}function xo(i,t){let e=t.get(i);if(e)return e;let n=At(i,[],!1).filter(a=>V(a)&&ut(a)!=="body"),o=null,s=U(i).position==="fixed",r=s?ot(i):i;for(;V(r)&&!St(r);){let a=U(r),l=Ut(r),c=o?o.position:s?"fixed":"";!l&&(c==="fixed"||c==="absolute"&&a.position==="static")?n=n.filter(h=>h!==r):o=a,r=ot(r)}return t.set(i,n),n}function Ao(i){let{element:t,boundary:e,rootBoundary:n,strategy:o}=i,r=[...e==="clippingAncestors"?zt(t)?[]:xo(t,this._c):[].concat(e),n],a=Ei(t,r[0],o),l=a.top,c=a.right,d=a.bottom,h=a.left;for(let f=1;f<r.length;f++){let m=Ei(t,r[f],o);l=W(m.top,l),c=it(m.right,c),d=it(m.bottom,d),h=W(m.left,h)}return{width:c-h,height:d-l,x:h,y:l}}function So(i){let{width:t,height:e}=Ai(i);return{width:t,height:e}}function Co(i,t,e){let n=Q(t),o=G(t),s=e==="fixed",r=ht(i,!0,s,t),a={scrollLeft:0,scrollTop:0},l=Y(0);if((n||!s)&&((ut(t)!=="body"||Nt(o))&&(a=_t(t)),n)){let f=ht(t,!0,s,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}!n&&o&&(l.x=Gt(o));let c=o&&!n&&!s?Ci(o,a):Y(0),d=r.left+a.scrollLeft-l.x-c.x,h=r.top+a.scrollTop-l.y-c.y;return{x:d,y:h,width:r.width,height:r.height}}function ye(i){return U(i).position==="static"}function xi(i,t){if(!Q(i)||U(i).position==="fixed")return null;if(t)return t(i);let e=i.offsetParent;return G(i)===e&&(e=e.ownerDocument.body),e}function Li(i,t){let e=K(i);if(zt(i))return e;if(!Q(i)){let o=ot(i);for(;o&&!St(o);){if(V(o)&&!ye(o))return o;o=ot(o)}return e}let n=xi(i,t);for(;n&&vi(n)&&ye(n);)n=xi(n,t);return n&&St(n)&&ye(n)&&!Ut(n)?e:n||yi(i)||e}var Lo=async function(i){let t=this.getOffsetParent||Li,e=this.getDimensions,n=await e(i.floating);return{reference:Co(i.reference,await t(i.floating),i.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function ko(i){return U(i).direction==="rtl"}var To={convertOffsetParentRelativeRectToViewportRelativeRect:go,getDocumentElement:G,getClippingRect:Ao,getOffsetParent:Li,getElementRects:Lo,getClientRects:bo,getDimensions:So,getScale:Ct,isElement:V,isRTL:ko};function ki(i,t){return i.x===t.x&&i.y===t.y&&i.width===t.width&&i.height===t.height}function Oo(i,t,e){let n=null,o,s=G(i);function r(){var d;clearTimeout(o),(d=n)==null||d.disconnect(),n=null}function a(d,h){d===void 0&&(d=!1),h===void 0&&(h=1),r();let f=i.getBoundingClientRect(),{left:m,top:b,width:p,height:y}=f;if(d||t(),!p||!y)return;let w=Ht(b),g=Ht(s.clientWidth-(m+p)),x=Ht(s.clientHeight-(b+y)),S=Ht(m),H={rootMargin:-w+"px "+-g+"px "+-x+"px "+-S+"px",threshold:W(0,it(1,h))||1},D=!0;function v(q){let I=q[0].intersectionRatio;if(!ki(f,i.getBoundingClientRect()))return a();if(I!==h){if(!D)return a();I?a(!1,I):o=setTimeout(()=>{a(!1,1e-7)},1e3)}D=!1}try{n=new IntersectionObserver(v,{...H,root:s.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 Ti(i,t,e,n){n===void 0&&(n={});let{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=we(i),d=o||s?[...c?At(c):[],...t?At(t):[]]:[];d.forEach(w=>{o&&w.addEventListener("scroll",e),s&&w.addEventListener("resize",e)});let h=c&&a?Oo(c,e,s):null,f=-1,m=null;r&&(m=new ResizeObserver(w=>{let[g]=w;g&&g.target===c&&m&&t&&(m.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var x;(x=m)==null||x.observe(t)})),e()}),c&&!l&&m.observe(c),t&&m.observe(t));let b,p=l?ht(i):null;l&&y();function y(){let w=ht(i);p&&!ki(p,w)&&e(),p=w,b=requestAnimationFrame(y)}return e(),()=>{var w;d.forEach(g=>{o&&g.removeEventListener("scroll",e),s&&g.removeEventListener("resize",e)}),h==null||h(),(w=m)==null||w.disconnect(),m=null,l&&cancelAnimationFrame(b)}}var Oi=fi;var Di=mi,Ri=hi,Mi=pi;var Ii=(i,t,e)=>{let n=new Map,o=e??{},s={...To,...o.platform,_c:n};return ui(i,t,{...o,platform:s})};function ft(i,t,e={}){let{placement:n="bottom-start",strategy:o="absolute",offset:s=4,flip:r=!0,shift:a=!0,padding:l=8,matchWidth:c=!1}=e,d=[Oi(s),...r?[Ri({padding:l})]:[],...a?[Di({padding:l})]:[],...c?[Mi({apply({rects:f}){Object.assign(t.style,{width:`${f.reference.width}px`})}})]:[]];return t.style.position=o,Ti(i,t,async()=>{let f=await Ii(i,t,{placement:n,strategy:o,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){u(this,"opts");u(this,"buffer","");u(this,"timerId",null);u(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 Hi=class extends N{constructor(){super(...arguments);u(this,"trigger",null);u(this,"content",null);u(this,"valueEl",null);u(this,"items",[]);u(this,"nativeSelect",null);u(this,"hiddenInput",null);u(this,"labelEl",null);u(this,"onLabelClick",t=>{var e;t.target.closest("[data-part=\'trigger\']")||(t.preventDefault(),(e=this.trigger)==null||e.focus())});u(this,"dismiss",null);u(this,"typeahead",null);u(this,"cleanupFloating",null);u(this,"_open",!1);u(this,"_value","");u(this,"highlighted",-1);u(this,"syncing",!1);u(this,"onNativeChange",()=>{this.syncing||this.refresh()});u(this,"onFormReset",()=>setTimeout(()=>this.refresh()));u(this,"onTriggerClick",()=>{this.isDisabled||(this._open?this.close():this.show())});u(this,"onTriggerKeyUp",t=>{t.key===" "&&t.preventDefault()});u(this,"onTriggerKey",t=>{var s,r;if(this.isDisabled)return;let e=this.enabled();if(!this._open){if(t.key==="ArrowDown"||t.key==="ArrowUp"||t.key==="Enter"||t.key===" "||t.altKey&&t.key==="ArrowDown")t.preventDefault(),this.show(),t.key==="ArrowUp"&&e.length&&this.highlight(this.items.indexOf(e[e.length-1]));else if(t.key==="Home"||t.key==="End"){t.preventDefault(),this.show();let a=t.key==="Home"?e[0]:e[e.length-1];a&&this.highlight(this.items.indexOf(a))}else t.key.length===1&&!t.ctrlKey&&!t.metaKey&&!t.altKey&&((s=this.typeahead)==null||s.handle(t.key));return}if(!e.length)return;let n=this.highlighted>=0?e.indexOf(this.items[this.highlighted]):-1,o=a=>{t.preventDefault(),this.highlight(this.items.indexOf(e[a]))};switch(t.key){case"ArrowDown":return o(Math.min(n+1,e.length-1));case"ArrowUp":return t.altKey?(t.preventDefault(),this.highlighted>=0&&this.select(this.items[this.highlighted]),this.close()):o(Math.max(n-1,0));case"Home":return o(0);case"End":return o(e.length-1);case"PageDown":return o(Math.min(n+10,e.length-1));case"PageUp":return o(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))}});u(this,"onListClick",t=>{let e=t.target.closest("[data-part=\'item\']");!e||!this.items.includes(e)||j(e)||(this.select(e),this.close())});u(this,"onListPointer",t=>{let e=t.target.closest("[data-part=\'item\']");e&&this.items.includes(e)&&!j(e)&&this.highlight(this.items.indexOf(e))});u(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(o=>o.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=>!j(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 o=this.getAttribute("name");o&&!this.nativeSelect&&(this.hiddenInput=document.createElement("input"),this.hiddenInput.type="hidden",this.hiddenInput.name=o,this.hasAttribute("required")&&(this.hiddenInput.required=!0),this.appendChild(this.hiddenInput)),this.typeahead=new Ee({getItemCount:()=>this.enabled().length,getItemText:c=>{var d,h;return((h=(d=this.enabled()[c])==null?void 0:d.textContent)==null?void 0:h.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 s=((a=this.nativeSelect)==null?void 0:a.value)??this.getAttribute("default-value")??"",r=this.items.find(c=>c.dataset.value===s);r&&j(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"),o=t.getAttribute("aria-labelledby"),s=!o&&t.id?document.querySelector(`label[for="${CSS.escape(t.id)}"]`):null;s&&(o=s.id||(s.id=F("db-select-for"))),n&&e.setAttribute("aria-label",n),o&&e.setAttribute("aria-labelledby",o);let r=t.closest("label");if(r){if(this.labelEl=r,!n&&!o){let h=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();h&&e.setAttribute("aria-label",h)}}else s&&(this.labelEl=s);let a=document.createElement("span");a.setAttribute("data-part","value"),a.className="db-select-value";let l=document.createElementNS("http://www.w3.org/2000/svg","svg");l.setAttribute("viewBox","0 0 24 24"),l.setAttribute("aria-hidden","true"),l.setAttribute("class","db-select-chevron"),l.innerHTML=\'<path d="m6 9 6 6 6-6" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>\',e.append(a,l);let c=document.createElement("div");c.setAttribute("data-part","content"),c.className="db-select-content";let d=(h,f)=>{let m=document.createElement("div");m.setAttribute("data-part","item"),m.className="db-select-item",m.dataset.value=h.value;for(let[b,p]of Object.entries(h.dataset))p!=null&&(m.dataset[b]=p);h.disabled&&m.setAttribute("aria-disabled","true"),m.textContent=h.textContent??h.value,f.appendChild(m)};for(let h of Array.from(t.children))if(h 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=h.label,f.appendChild(m);for(let b of Array.from(h.children))b instanceof HTMLOptionElement&&d(b,f);c.appendChild(f)}else h instanceof HTMLOptionElement&&d(h,c);t.hidden=!0,t.tabIndex=-1,t.setAttribute("aria-hidden","true"),this.append(e,c)}connect(){var t,e,n,o,s,r,a,l,c,d;(t=this.trigger)==null||t.addEventListener("click",this.onTriggerClick),(e=this.trigger)==null||e.addEventListener("keydown",this.onTriggerKey),(n=this.trigger)==null||n.addEventListener("keyup",this.onTriggerKeyUp),(o=this.nativeSelect)==null||o.addEventListener("change",this.onNativeChange),(r=(s=this.nativeSelect)==null?void 0:s.form)==null||r.addEventListener("reset",this.onFormReset),(a=this.labelEl)==null||a.addEventListener("click",this.onLabelClick),(l=this.content)==null||l.addEventListener("click",this.onListClick),(c=this.content)==null||c.addEventListener("pointermove",this.onListPointer),(d=this.content)==null||d.addEventListener("mousedown",this.preventBlur)}disconnect(){var t,e,n,o,s,r,a,l,c,d;(t=this.trigger)==null||t.removeEventListener("click",this.onTriggerClick),(e=this.trigger)==null||e.removeEventListener("keydown",this.onTriggerKey),(n=this.trigger)==null||n.removeEventListener("keyup",this.onTriggerKeyUp),(o=this.nativeSelect)==null||o.removeEventListener("change",this.onNativeChange),(r=(s=this.nativeSelect)==null?void 0:s.form)==null||r.removeEventListener("reset",this.onFormReset),(a=this.labelEl)==null||a.removeEventListener("click",this.onLabelClick),(l=this.content)==null||l.removeEventListener("click",this.onListClick),(c=this.content)==null||c.removeEventListener("pointermove",this.onListPointer),(d=this.content)==null||d.removeEventListener("mousedown",this.preventBlur),this._open&&this.close(!1)}setState(t){var e;this.setAttribute("data-state",t),(e=this.content)==null||e.setAttribute("data-state",t)}show(){var r,a;let{trigger:t,content:e}=this;if(!t||!e||this._open)return;this._open=!0;let 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 s=this.items.find(l=>l.dataset.value===this._value&&!j(l))??this.enabled()[0];s&&this.highlight(this.items.indexOf(s)),(r=this.dismiss)==null||r.activate(),(a=this.typeahead)==null||a.reset(),t.focus()}close(t=!0){var o,s,r;let{trigger:e,content:n}=this;!e||!n||!this._open||(this._open=!1,(o=this.dismiss)==null||o.deactivate(),(s=this.cleanupFloating)==null||s.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 o=e.offsetTop,s=o+e.offsetHeight;o<n.scrollTop?n.scrollTop=o:s>n.scrollTop+n.clientHeight&&(n.scrollTop=s-n.clientHeight)}select(t,e=!0){var s;if(j(t))return;let n=t.dataset.value??"",o=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=((s=t.textContent)==null?void 0:s.trim())??"",this.valueEl.removeAttribute("data-placeholder")),this.hiddenInput&&(this.hiddenInput.value=n),!e||!o){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}))}};z();customElements.get("db-select")||customElements.define("db-select",Hi);var Ni=class extends N{constructor(){super(...arguments);u(this,"trigger",null);u(this,"content",null);u(this,"dismiss",null);u(this,"cleanupFloating",null);u(this,"_open",!1);u(this,"onTriggerClick",()=>this.toggle());u(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 o,s;let t=this.getAttribute("placement");if(t)return t;let e=((o=this.content)==null?void 0:o.dataset.side)||"bottom",n=((s=this.content)==null?void 0:s.dataset.align)||"center";return`${e}${n!=="center"?`-${n}`:""}`}toggle(){this._open?this.close("trigger-press"):this.show()}show(){var o;let{trigger:t,content:e}=this;if(!t||!e||this._open)return;this._open=!0;let 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"}),(o=this.dismiss)==null||o.activate(),this.hasAttribute("no-autofocus")||requestAnimationFrame(()=>{this._open&&(Fe(e)[0]??e).focus({preventScroll:!0})}),this.dispatchEvent(new CustomEvent("db-popover:open",{bubbles:!0}))}close(t="api"){var s,r;let{trigger:e,content:n}=this;if(!e||!n||!this._open)return;this._open=!1,(s=this.dismiss)==null||s.deactivate(),(r=this.cleanupFloating)==null||r.call(this),this.cleanupFloating=null;let o=n.contains(document.activeElement);yt(n),this.setState("closed"),e.setAttribute("aria-expanded","false"),t!=="outside-press"&&(o||t==="escape-key"||t==="close-press")&&e.focus(),this.dispatchEvent(new CustomEvent("db-popover:close",{detail:{reason:t},bubbles:!0}))}};z();customElements.get("db-popover")||customElements.define("db-popover",Ni);var zi="db-announcement-closed:";var _i=class extends N{constructor(){super(...arguments);u(this,"closeButton",null);u(this,"onClose",()=>this.close())}setup(){var t;this.closeButton=[...this.querySelectorAll("[data-part=\'close\']")].find(e=>e.closest("db-announcement")===this)??null,this.closeButton&&!this.closeButton.hasAttribute("aria-label")&&!((t=this.closeButton.textContent)!=null&&t.trim())&&this.closeButton.setAttribute("aria-label","Close announcement")}connect(){var t;(t=this.closeButton)==null||t.addEventListener("click",this.onClose)}disconnect(){var t;(t=this.closeButton)==null||t.removeEventListener("click",this.onClose)}close(){var n;let t=this.getAttribute("announcement-id")??"";try{t&&localStorage.setItem(zi+t,"1")}catch{}let e=this.contains(document.activeElement);if(document.documentElement.setAttribute("data-announcement-closed",""),this.hidden=!0,this.style.display="none",e){let o=document.querySelector("main, [role=\'main\']");o?(o.hasAttribute("tabindex")||o.setAttribute("tabindex","-1"),o.focus({preventScroll:!0})):(n=document.activeElement)==null||n.blur()}this.dispatchEvent(new CustomEvent("db-announcement:close",{bubbles:!0,detail:{id:t}}))}};z();customElements.get("db-announcement")||customElements.define("db-announcement",_i);var Pi=class extends N{constructor(){super(...arguments);u(this,"trigger",null);u(this,"content",null);u(this,"cleanupFloating",null);u(this,"showTimer",null);u(this,"hideTimer",null);u(this,"_open",!1);u(this,"onEnter",t=>{t.pointerType!=="touch"&&(this.clearTimers(),this._open||(this.showTimer=setTimeout(()=>this.show(),this.num("delay",200))))});u(this,"onLeave",t=>{t.pointerType!=="touch"&&(this.clearTimers(),this.hideTimer=setTimeout(()=>this.hide(),this.num("close-delay",100)))});u(this,"onContentEnter",()=>this.clearTimers());u(this,"onFocus",()=>{let t=!0;try{t=this.trigger.matches(":focus-visible")}catch{}t&&(this.clearTimers(),this.show())});u(this,"onBlur",()=>this.hide());u(this,"onPress",()=>this.hide());u(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})))}};z();customElements.get("db-tooltip")||customElements.define("db-tooltip",Pi);var Fi="sidebar_state",Do="b",Ro=768,Pt=new WeakMap;function Mo(i){try{return localStorage.getItem(i)}catch{return null}}function Io(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",o=t.dataset.defaultOpen!=="false",s=Mo(Fi),r=s!==null?s==="true":o,a=t.querySelector("[data-sidebar-desktop]"),l=t.querySelector("[data-sidebar-mobile]"),c=t.querySelector("[data-sidebar-mobile-backdrop]"),d=window.matchMedia(`(max-width: ${Ro-1}px)`),h={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,h),$i(h);let f=p=>{h.isMobile=p.matches,!p.matches&&h.openMobile&&st(i)};d.addEventListener("change",f);let m=p=>{p.key===Do&&(p.metaKey||p.ctrlKey)?(p.preventDefault(),xe(i)):p.key==="Escape"&&h.openMobile&&(p.preventDefault(),st(i))};document.addEventListener("keydown",m),Ho(i,h),c&&c.addEventListener("click",()=>{st(i)});let b=t.querySelector("[data-part=\'rail\']");b&&b.addEventListener("click",()=>{xe(i)})}function Ho(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?st(i):No(i):(t.open=!t.open,$i(t),Io(Fi,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 No(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 s;let o=(s=t.mobileSidebar)==null?void 0:s.querySelector(\'a, button, [tabindex]:not([tabindex="-1"])\');o==null||o.focus()})}function st(i){var o;let t=Pt.get(i);if(!t||!t.openMobile||!t.mobileSidebar)return;t.openMobile=!1;let e=(o=t.desktopSidebar)==null?void 0:o.querySelector("[data-sidebar=\'sidebar-inner\']");if(e&&t.mobileSidebar)for(;t.mobileSidebar.firstChild;)e.appendChild(t.mobileSidebar.firstChild);t.mobileSidebar.setAttribute("data-state","closed"),t.mobileSidebar.hidden=!0,t.mobileBackdrop&&(t.mobileBackdrop.hidden=!0),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 Bi=/^[a-z][a-z0-9_-]{0,63}$/,Zt={docs:"docs.js",shard:i=>`t-${i}.js`,fragment:i=>`f-${i}.js`},Qt={docs:"docs",shard:i=>i,fragment:i=>`frag:${i}`};var zo={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"},_o={icate:"ic",ative:"",alize:"al",iciti:"ic",ical:"ic",ful:"",ness:""},Po="[^aeiou]",Le="[aeiouy]",rt="("+Po+"[^aeiouy]*)",te="("+Le+"[aeiou]*)",Ce=new RegExp("^"+rt+"?"+te+rt),Fo=new RegExp("^"+rt+"?"+te+rt+te+"?$"),Jt=new RegExp("^"+rt+"?("+te+rt+"){2,}"),qi=new RegExp("^"+rt+"?"+Le),Ki=new RegExp("^"+rt+Le+"[^aeiouwxy]$"),$o=/ll$/,Bo=/^(.+?)e$/,qo=/^(.+?)y$/,Ko=/^(.+?(s|t))(ion)$/,jo=/^(.+?)(ed|ing)$/,Wo=/(at|bl|iz)$/,Vo=/^(.+?)eed$/,Uo=/^.+?[^s]s$/,Yo=/^.+?(ss|i)es$/,Xo=/([^aeiouylsz])\\1$/,Go=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,Zo=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,Qo=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/;function ji(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)),Yo.test(t)?t=t.slice(0,-2):Uo.test(t)&&(t=t.slice(0,-1));let n;return(n=Vo.exec(t))?Ce.test(n[1])&&(t=t.slice(0,-1)):(n=jo.exec(t))&&qi.test(n[1])&&(t=n[1],Wo.test(t)?t+="e":Xo.test(t)?t=t.slice(0,-1):Ki.test(t)&&(t+="e")),(n=qo.exec(t))&&qi.test(n[1])&&(t=n[1]+"i"),(n=Go.exec(t))&&Ce.test(n[1])&&(t=n[1]+zo[n[2]]),(n=Zo.exec(t))&&Ce.test(n[1])&&(t=n[1]+_o[n[2]]),(n=Qo.exec(t))?Jt.test(n[1])&&(t=n[1]):(n=Ko.exec(t))&&Jt.test(n[1])&&(t=n[1]),(n=Bo.exec(t))&&(Jt.test(n[1])||Fo.test(n[1])&&!Ki.test(n[1]))&&(t=n[1]),$o.test(t)&&Jt.test(t)&&(t=t.slice(0,-1)),e&&(t="y"+t.slice(1)),t}var Wi=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(" ")),Jo=/[\\p{Script=Han}\\p{Script=Hiragana}\\p{Script=Katakana}\\p{Script=Hangul}]/u,Ft;function ts(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],o=n.split(/[._-]+/).filter(Boolean);if(o.length>1&&t.push(n),o.length>1&&!/[._]/.test(n)){let s=o.join("");s.length>=3&&!Wi.has(s)&&t.push(s)}for(let s of o)Jo.test(s)?t.push(...ts(s)):s.length>=2&&!Wi.has(s)&&t.push(s)}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 ee(i){if(!(!i||!/^en(-|$)/i.test(i)))return t=>/^[a-z]{3,}$/.test(t)?ji(t):t}function Lt(i,t={}){var y,w;let e=[],n=[],o=[],s=!1,r={tag:[],section:[]},a={tag:[],section:[]},l=Object.create(null),c=Object.create(null),d=["tag","section",...new Set((t.facets??[]).filter(g=>Bi.test(g)&&g!=="tag"&&g!=="section"))],h=new RegExp(`(?<!\\\\S)(-?)(${d.join("|")}):(?:"([^"]*)"?|(?!\\\\/\\\\/)(\\\\S*))|(-?)"([^"]*)"?|(\\\\S+)`,"gi"),f=[...i.matchAll(h)].map(g=>{var x;return{facetNeg:g[1]==="-",facet:(x=g[2])==null?void 0:x.toLowerCase(),value:g[3]??g[4],neg:g[5],phrase:g[6],word:g[7]}}),m=!1,b=!1;for(let[g,x]of f.entries()){if(x.facet){let E=Te(x.value??"");if(!E)continue;x.facet==="tag"||x.facet==="section"?(x.facetNeg?a:r)[x.facet].push(E):((y=x.facetNeg?c:l)[w=x.facet]??(y[w]=[])).push(E);continue}let S=x.word;if(S==="OR"){b=e.length>0,s=!0;continue}if(S==="NOT"){m=!0,s=!0;continue}if(S==="AND"){s=!0;continue}let M=x.phrase!==void 0,H=m||x.neg==="-"||(S==null?void 0:S.startsWith("-"))&&S.length>1;m=!1;let D=M?x.phrase:H&&(S!=null&&S.startsWith("-"))?S.slice(1):S,v=[...new Set(mt(D))];if(!v.length){b=!1;continue}if(H){n.push(M?v:[v[0]]),s=!0,b=!1;continue}if(M){b=!1,s=!0,v.length>1&&o.push(mt(D).join(" "));for(let E of v)e.push({terms:[E],prefix:!1,exact:!0});continue}let q=g===f.length-1&&!/\\s$/.test(i);if(b){e[e.length-1].terms.push(v[0]);for(let E of v.slice(1))e.push({terms:[E],prefix:!1});b=!1;continue}let I=v[0],L=/[._-]/.test(I),A=I.replace(/-/g,"");for(let[E,C]of v.entries())e.push({terms:[C],prefix:q&&C.length>=2&&(E===v.length-1||L&&(C===I||C===A))})}let p=[...new Set(e.flatMap(g=>g.terms))];return{groups:e,not:n,phrases:o,strict:s,highlight:p,filters:r,notFilters:a,...Object.keys(l).length?{facets:l}:{},...Object.keys(c).length?{notFacets:c}:{}}}async function es(i,t){let e=await t.meta(),n=typeof i=="string"?Lt(i,{facets:tn([e])}):i,o=await is(n,e,t),s=rs(n,e);if(!n.groups.length)return ns(e,o,s);let r=[];for(let l of n.groups)r.push(await ls(l,e,t));let a=Yi(r,e,o,s,"and").sort(Ui);return a.length||n.strict?a:Yi(r,e,o,s,"or").sort(Ui)}var Ui=(i,t)=>t.score-i.score;async function is(i,t,e){let n=new Set;for(let o of i.not){let s;for(let r of o){let[a]=Ji(r,t),l=a?await e.shard(a):void 0,c=l&&Object.hasOwn(l,r)?l[r]:[],d=new Set;for(let h=0;h<c.length;h+=2)(!s||s.has(c[h]))&&d.add(c[h]);s=d}for(let r of s??[])n.add(r)}return n}function ns(i,t,e){if(!e)return[];let n=[];return i.docs.forEach(([o,s,r],a)=>e(a)&&!t.has(a)&&n.push({id:a,title:o,url:s,section:i.sections[r]??"",score:1})),n}function Yi(i,t,e,n,o){let s=new Map,r=new Map;for(let l of i)for(let[c,d]of l)s.set(c,(s.get(c)??0)+d),r.set(c,(r.get(c)??0)+1);let a=[];for(let[l,c]of s){if(e.has(l)||n&&!n(l)||o==="and"&&r.get(l)!==i.length)continue;let[d,h,f]=t.docs[l];a.push({id:l,title:d,url:h,section:t.sections[f]??"",score:c*(r.get(l)/i.length)})}return a}var J={prefix:.6,stem:.4,titleAll:1.5,titleExact:2,headingAll:1.4,headingExact:1.8,phrase:1.5,typo:.3};function os(i,t){if(i===t)return!1;if(i.length===t.length){let s=[];for(let r=0;r<i.length&&s.length<=2;r++)i[r]!==t[r]&&s.push(r);return s.length===1?!0:s.length===2&&s[1]===s[0]+1&&i[s[0]]===t[s[1]]&&i[s[1]]===t[s[0]]}let[e,n]=i.length<t.length?[i,t]:[t,i];if(n.length-e.length!==1)return!1;let o=0;for(;o<e.length&&e[o]===n[o];)o++;return e.slice(o)===n.slice(o+1)}function Ji(i,t,e=!1){let n=ss(t);for(let s=Math.min(i.length,Xi);s>=1;s--){let r=ke(i,s);if(n.has(r))return!e||s<i.length?[r]:[r,...t.shards.filter(a=>a.length>r.length&&a.startsWith(r)).slice(0,10)]}let o=ke(i,Math.min(i.length,Xi));return e?t.shards.filter(s=>s.startsWith(o)).slice(0,10):[]}var Xi=3,Gi=new WeakMap;function ss(i){let t=Gi.get(i);return t||Gi.set(i,t=new Set(i.shards)),t}function Te(i){return i.replace(/"/g,"").trim().toLowerCase()}function rs(i,t){let{tag:e,section:n}=i.filters,o=i.notFilters??{tag:[],section:[]},s=Object.entries(i.facets??{}).filter(([,w])=>w.length),r=Object.entries(i.notFacets??{}).filter(([,w])=>w.length);if(!e.length&&!n.length&&!o.tag.length&&!o.section.length&&!s.length&&!r.length)return;let a=(w,g)=>new Set(w.flatMap((x,S)=>g.includes(Te(x))?[S]:[])),l=a(t.sections,n),c=a(t.tags??[],e),d=a(t.sections,o.section),h=a(t.tags??[],o.tag),f=w=>(t.facets??[]).findIndex(g=>g.name===w),m=w=>w.map(([g,x])=>{let S=f(g);return[S,S<0?new Set:a(t.facets[S].values,x)]}),b=m(s),p=m(r).filter(([w])=>w>=0),y=(w,[g,x])=>{var S;return g>=0&&(((S=w[4])==null?void 0:S[g])??[]).some(M=>x.has(M))};return w=>{let g=t.docs[w],x=g[3]??[];if(n.length&&!l.has(g[2])||e.length&&!x.some(S=>c.has(S))||d.has(g[2])||x.some(S=>h.has(S)))return!1;for(let S of b)if(!y(g,S))return!1;for(let S of p)if(y(g,S))return!1;return!0}}function tn(i){return[...new Set(i.flatMap(t=>((t==null?void 0:t.facets)??[]).map(e=>e.name)))]}function as(i,t){let e=Object.create(null),n=new Map,o=(s,r)=>{let a=`${s}\\0${Te(r)}`,l=n.get(a);l===void 0&&n.set(a,l=r);let c=e[s]??(e[s]=Object.create(null));c[l]=(c[l]??0)+1};for(let s of i){let r=typeof t=="function"?t(s):t,a=r==null?void 0:r.docs[s.id];if(a){r.sections[a[2]]&&o("section",r.sections[a[2]]);for(let l of new Set(a[3]??[]))r.tags[l]!==void 0&&o("tag",r.tags[l]);(a[4]??[]).forEach((l,c)=>{var h;let d=(h=r.facets)==null?void 0:h[c];if(d)for(let f of new Set(l))d.values[f]!==void 0&&o(d.name,d.values[f])})}}return e}async function ls(i,t,e){let n=await us(i,t,e,!0);return i.corrected=n.corrected.length?n.corrected:void 0,ds(n,cs(t.count,n.docs.size))}function cs(i,t){return Math.log(1+(i-t+.5)/(t+.5))}function ds(i,t){let e=new Map;for(let[n,o]of i.lists)for(let s=0;s<n.length;s+=2)e.set(n[s],Math.max(e.get(n[s])??0,n[s+1]*o*t));return e}async function us(i,t,e,n){let o=ee(t.lang),s=new Map,r=new Map;for(let d of i.terms)for(let h of Ji(d,t,i.prefix)){let f=await e.shard(h);if(!f)continue;let m=(w,g)=>{g>(s.get(w)??0)&&(s.set(w,g),r.set(w,f))};Object.hasOwn(f,d)&&m(d,1);let b=o==null?void 0:o(d),p=b?b.slice(0,Math.max(3,b.length-1)):void 0,y=0;for(let w in f)w!==d&&(i.prefix&&w.startsWith(d)&&y++<200&&m(w,J.prefix),b&&p&&w.startsWith(p)&&o(w)===b&&m(w,J.stem));if(n&&!s.size&&!i.exact&&d.length>=4&&!/[._-]/.test(d))for(let w in f)Math.abs(w.length-d.length)<=1&&os(d,w)&&m(w,J.typo)}let a=[...s].filter(([,d])=>d===J.typo).map(([d])=>d),l=[...s].map(([d,h])=>[r.get(d)[d],h]),c=new Set;for(let[d]of l)for(let h=0;h<d.length;h+=2)c.add(d[h]);return{lists:l,docs:c,corrected:a}}var en=i=>typeof i=="function"?i:()=>i;async function nn(i,t){let e=en(t),n=new Map;for(let o of i){let s=e(o),r=n.get(s);r||n.set(s,r=[]),r.push(o)}await Promise.all([...n].map(async([o,s])=>{var c;let r=await o.meta(),a=[...new Set(s.map(d=>Math.floor(d.id/r.block)))],l=new Map;await Promise.all(a.map(async d=>l.set(d,await o.fragment(d))));for(let d of s)d.fragment??(d.fragment=(c=l.get(Math.floor(d.id/r.block)))==null?void 0:c[d.id%r.block])}))}async function on(i){let t=en(i),e=new Map;return async n=>{let o=t(n),s=e.get(o);if(!s){let r=ee((await o.meta()).lang);s=(a,l)=>l.terms.some(c=>a===c||l.prefix&&a.startsWith(c)||r!==void 0&&r(a)===r(c))||(l.corrected??[]).includes(a),e.set(o,s)}return s}}async function hs(i,t,e,n=10){let o=t.slice(0,n);await nn(o,e);let s=i.groups,r=await on(e);for(let a of o){let l=await r(a),[c,d]=a.fragment??["",[]],h=mt(a.title),f=1;s.length&&s.every(b=>h.some(p=>l(p,b)))&&(f=Zi(h,s,l)?J.titleExact:J.titleAll);let m=[];for(let[b,p]of d){let y=mt(b);!s.length||!s.every(w=>y.some(g=>l(g,w)))||(m.push([b,p]),f=Math.max(f,Zi(y,s,l)?J.headingExact:J.headingAll))}if(a.sections=m.slice(0,3),i.phrases.length){let b=[a.title,c,...d.map(([p])=>p)].map(p=>mt(p).join(" ")).join(" \\0 ");i.phrases.every(p=>b.includes(p))&&(f*=J.phrase)}a.score*=f}return o.sort((a,l)=>l.score-a.score),[...o,...t.slice(n)]}async function sn(i,t,e){await nn(t,e);let n=await on(e);for(let o of t){if(!o.fragment||o.sections)continue;let s=await n(o);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 Zi(i,t,e){return i.every(n=>t.some(o=>e(n,o)))&&t.every(n=>i.some(o=>e(o,n)))}async function rn(i,t,e=10){let n=await t.meta(),o=Lt(i,{facets:tn([n])}),s=ee(n.lang);s&&(o.highlight=[...new Set([...o.highlight,...o.highlight.map(s).filter(a=>a.length>=3)])]);let r=await es(o,t);return o.highlight=[...new Set([...o.highlight,...o.groups.flatMap(a=>a.corrected??[])])],{parsed:o,results:await hs(o,r,t,e),facets:as(r,n)}}function an(i,t,e=globalThis){var m,b;let n=((m=e.document)==null?void 0:m.baseURI)??((b=e.location)==null?void 0:b.href),o=Qi(i,n),s=e.__DOGSBAY_SEARCH__??{q:[],load(){}},r=s.stores??(s.stores=new Map),a=r.get(o)??new Map;r.set(o,a);let l=(p,y,w)=>{let g;if(w){let x="",S=Qi(w,n);for(let M of r.keys())S.startsWith(M)&&M.length>x.length&&(x=M);g=x?r.get(x):void 0}!g&&r.size===1&&(g=a),g?g.set(p,y):s.q.push([p,y,w])},c=s.q;s.q=[],s.load=l;for(let[p,y,w]of c)l(p,y,w);e.__DOGSBAY_SEARCH__=s;let d=async(p,y)=>(a.has(p)||await t(i+y),a.get(p)),h,f={meta:()=>h??(h=d(Qt.docs,Zt.docs).then(p=>{if(!p||p.format!==5)throw new Error(`search index format ${(p==null?void 0:p.format)??"missing"}, expected ${5}: rebuild the site`);return p}).catch(p=>{throw h=void 0,p})),shard:async p=>(await f.meta()).shards.includes(p)?d(Qt.shard(p),Zt.shard(p)):void 0,fragment:p=>d(Qt.fragment(p),Zt.fragment(p))};return f}function Qi(i,t){try{return new URL(i,t).href}catch{return i}}function ln(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 o=n.replace(new RegExp(\'(?<!\\\\S)-?(tag|section):("[^"]*"?|\\\\S*)\',"gi")," ").trim(),s=o?await(await t).search(o):null,r=(s==null?void 0:s.results)??[],a=async(d,h)=>{let f=await d.data(),m=f.url.startsWith(e)?f.url.slice(e.length):f.url.replace(/^\\/+/,""),b=(f.sub_results??[]).map(p=>[p.title,p.url.split("#")[1]??""]).filter(([,p])=>p);return{id:h,title:f.meta.title??m,url:m,section:"",score:r.length-h,fragment:[fs(f.excerpt),b],sections:b.slice(0,3)}},l=await Promise.all(r.slice(0,10).map(a)),c=Promise.all(r.slice(10,30).map((d,h)=>a(d,h+10)));return c.catch(()=>{}),{results:l,more:c,total:r.length,highlight:Lt(n).highlight}}}function fs(i){return new DOMParser().parseFromString(i,"text/html").body.textContent??""}function cn(i){let{signal:t}=i,e=document.getElementById("db-search");if(!e)return;let n=e.querySelector("[data-db-search-input]"),o=e.querySelector("[data-part=\'listbox\']"),s=e.querySelector("[data-db-search-status]"),r=s.textContent??"",a=an(`${i.unitRoot}_dogsbay/search/`,i.loadScript,window),l=document.body.dataset.search??"builtin",c=location.protocol!=="file:",d=l==="pagefind"||l==="both"&&c?ln(i.unitRoot):void 0,h=l==="pagefind"&&!c;e.addEventListener("db-dialog:open",()=>{n.focus(),n.select(),h?s.textContent=o.dataset.needsServer??"":d||a.meta().catch(()=>s.textContent="Search index could not be loaded.")},{signal:t}),document.addEventListener("keydown",L=>{let A=L.target.closest("input, textarea, select, [contenteditable]");(L.key==="/"&&!A||L.key.toLowerCase()==="k"&&(L.metaKey||L.ctrlKey))&&(L.preventDefault(),e.open?n.focus():e.show())},{signal:t}),o.addEventListener("click",L=>{L.target.closest("a")&&e.close("api")},{signal:t});let f=0,m,b;n.addEventListener("input",()=>{clearTimeout(b),b=setTimeout(()=>void w(++f),80)},{signal:t});let p=new Map,y=typeof IntersectionObserver=="function"?new IntersectionObserver(L=>{var A;for(let E of L)E.isIntersecting&&((A=p.get(E.target))==null||A(),p.delete(E.target),y.unobserve(E.target))}):void 0,w=async L=>{let A=n.value.trim();if(!A){y==null||y.disconnect(),p.clear(),g.hidden=!0,o.replaceChildren(),s.textContent=r;return}if(!h)try{if(d){let E=await d(A);if(L!==f)return;D(A,E.results,E.highlight,E.total);let C=await E.more;L===f&&C.length&&v(A,C,E.highlight)}else{let E=await rn(A,a);if(L!==f)return;m=E.parsed,D(A,E.results.slice(0,30),E.parsed.highlight,E.results.length,E.results)}}catch{L===f&&(s.textContent="Search index could not be loaded.")}},g=document.createElement("div");g.setAttribute("role","group"),g.setAttribute("aria-label",o.dataset.filterSection??"Filter by section"),g.className="flex flex-wrap gap-1 px-3 pb-2",g.hidden=!0,o.before(g),t==null||t.addEventListener("abort",()=>{clearTimeout(b),f++,y==null||y.disconnect(),p.clear(),g.remove()});let x=L=>L.replace(/"/g,""),S=L=>`section:"${x(L)}"`,M,H=(L,A)=>{let E=new Map;for(let T of A)T.section&&E.set(T.section,(E.get(T.section)??0)+1);let C=[...L.matchAll(/section:"([^"]*)"/gi)].map(T=>T[1].toLowerCase()),O=T=>C.includes(x(T).toLowerCase()),k=[...E].sort((T,R)=>R[1]-T[1]).slice(0,6).map(([T])=>T);for(let T of C)k.some(R=>x(R).toLowerCase()===T)||k.push(T);g.replaceChildren(...k.length>1||C.length?k.map(T=>{let R=document.createElement("button");R.type="button";let _=O(T);return R.setAttribute("aria-pressed",String(_)),R.className="rounded-full border px-2.5 py-0.5 text-xs hover:bg-accent aria-pressed:bg-primary aria-pressed:text-primary-foreground",R.textContent=T,R.addEventListener("click",()=>{let P=S(T),tt=n.value.replace(new RegExp(`\\\\s*section:"${x(T).replace(/[.*+?^${}()|[\\]\\\\]/g,"\\\\$&")}"`,"i"),"").trim();n.value=_?tt:`${tt} ${P}`.trim(),M=T,n.dispatchEvent(new Event("input",{bubbles:!0}))},{signal:t}),R}):[]),g.hidden=!g.childElementCount,M!==void 0&&(([...g.querySelectorAll("button")].find(R=>R.textContent===M)??n).focus(),M=void 0)},D=(L,A,E,C,O=A)=>{y==null||y.disconnect(),p.clear(),H(L,O),o.replaceChildren(...q(L,A,E)),s.textContent=C?`${C} result${C===1?"":"s"}`:`${o.dataset.noResults} \\u201C${L}\\u201D`},v=(L,A,E)=>o.append(...q(L,A,E)),q=(L,A,E)=>{let C=[];for(let O of A){let k=I(O.url,E,"block rounded-md p-3 hover:bg-accent"),T=document.createElement("div");if(T.className="font-medium",T.append(...Oe(O.title,E)),k.a.appendChild(T),O.section){let P=document.createElement("div");P.className="text-xs text-muted-foreground",P.textContent=O.section,k.a.appendChild(P)}let R=document.createElement("div");R.className="mt-1 line-clamp-2 text-xs text-muted-foreground",k.a.appendChild(R),C.push(k.li);let _=()=>O.fragment?(O.fragment[0]&&R.replaceChildren(...Oe(O.fragment[0],E)),(O.sections??[]).map(([P,tt])=>{let Bt=I(`${O.url}#${tt}`,E,"ml-4 block rounded-md border-l px-3 py-1.5 text-sm hover:bg-accent");return Bt.a.append(...Oe(P,E)),Bt.li})):[];if(O.fragment)C.push(..._());else if(y){let P=m??Lt(L);p.set(k.li,()=>void sn(P,[O],a).then(()=>k.li.after(..._()),()=>{})),y.observe(k.li)}}return C},I=(L,A,E)=>{let C=document.createElement("li");C.setAttribute("role","none"),C.className="mb-1";let O=document.createElement("a");return O.setAttribute("data-part","option"),O.dataset.value=L,O.href=ms(i.unitRoot+L,A),O.tabIndex=-1,O.className=E,C.appendChild(O),{li:C,a:O}}}function ms(i,t){if(!t.length)return i;let e=i.indexOf("#"),[n,o]=e<0?[i,""]:[i.slice(0,e),i.slice(e)];return`${n}${n.includes("?")?"&":"?"}h=${encodeURIComponent(t.join(" "))}${o}`}function Oe(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,o)=>{if(o%2===0)return document.createTextNode(n);let s=document.createElement("mark");return s.textContent=n,s})}var dn=/[\\p{Script=Han}\\p{Script=Hiragana}\\p{Script=Katakana}\\p{Script=Hangul}]/u;function un(i){var p;let t;try{t=(new URLSearchParams(location.search).get("h")??"").split(/\\s+/).filter(y=>y.length>0)}catch{return}let e=document.querySelector("#db-content article")??document.querySelector("#db-content");if(!t.length||!e)return;let n=y=>y.replace(/[.*+?^${}()|[\\]\\\\]/g,"\\\\$&"),o=[...t].sort((y,w)=>w.length-y.length),s=o.filter(y=>dn.test(y)).map(n),r=o.filter(y=>!dn.test(y)).map(n),a=[r.length?`(?<![\\\\p{L}\\\\p{N}])(?:${r.join("|")})`:"",s.length?`(?:${s.join("|")})`:""].filter(Boolean),l=new RegExp(`(${a.join("|")})`,"giu"),c=[],d=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,{acceptNode:y=>{var w;return(w=y.parentElement)!=null&&w.closest("script, style, mark, button, [aria-hidden=\'true\']")?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}}),h=[];for(let y=d.nextNode();y;y=d.nextNode())h.push(y);for(let y of h){if(c.length>=500)break;let w=y.data;if(l.lastIndex=0,!l.test(w))continue;l.lastIndex=0;let g=document.createDocumentFragment(),x=0;for(let S of w.matchAll(l)){g.append(w.slice(x,S.index));let M=document.createElement("mark");M.className="db-search-hl",M.textContent=S[0],g.append(M),c.push(M),x=S.index+S[0].length}g.append(w.slice(x)),y.replaceWith(g)}if(ps(),!c.length)return;let f=((p=document.querySelector("[data-clear-highlights]"))==null?void 0:p.dataset.clearHighlights)??"Clear highlights",m=document.createElement("div");m.className="not-prose mb-4";let b=document.createElement("button");b.type="button",b.className="inline-flex h-8 items-center rounded-md border px-3 text-sm hover:bg-accent",b.textContent=f,b.addEventListener("click",()=>{var y;for(let w of c)w.replaceWith(document.createTextNode(w.textContent??""));e.normalize(),m.remove(),(y=document.getElementById("db-content"))==null||y.focus({preventScroll:!0})},{signal:i}),m.append(b),e.prepend(m),location.hash||c[0].scrollIntoView({block:"center"})}function ps(){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"},gs=function(t){return NodeList.prototype.isPrototypeOf(t)},ne=function(t){return t&&t.nodeType===1},hn=function(t){var e=t.currentSrc||t.src;return e.substr(-4).toLowerCase()===".svg"},fn=function(t){try{return Array.isArray(t)?t.filter(ie):gs(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`)}},bs=function(t){var e=document.createElement("div");return e.classList.add("medium-zoom-overlay"),e.style.background=t,e},vs=function(t){var e=t.getBoundingClientRect(),n=e.top,o=e.left,s=e.width,r=e.height,a=t.cloneNode(),l=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,c=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0;return a.removeAttribute("id"),a.style.position="absolute",a.style.top=n+l+"px",a.style.left=o+c+"px",a.style.width=s+"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 o=document.createEvent("CustomEvent");return o.initCustomEvent(t,n.bubbles,n.cancelable,n.detail),o},ys=function i(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=window.Promise||function(A){function E(){}A(E,E)},o=function(A){var E=A.target;if(E===q){b();return}x.indexOf(E)!==-1&&p({target:E})},s=function(){if(!(M||!v.original)){var A=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0;Math.abs(H-A)>D.scrollOffset&&setTimeout(b,150)}},r=function(A){var E=A.key||A.keyCode;(E==="Escape"||E==="Esc"||E===27)&&b()},a=function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},E=A;if(A.background&&(q.style.background=A.background),A.container&&A.container instanceof Object&&(E.container=pt({},D.container,A.container)),A.template){var C=ne(A.template)?A.template:document.querySelector(A.template);E.template=C}return D=pt({},D,E),x.forEach(function(O){O.dispatchEvent(kt("medium-zoom:update",{detail:{zoom:I}}))}),I},l=function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return i(pt({},D,A))},c=function(){for(var A=arguments.length,E=Array(A),C=0;C<A;C++)E[C]=arguments[C];var O=E.reduce(function(k,T){return[].concat(k,fn(T))},[]);return O.filter(function(k){return x.indexOf(k)===-1}).forEach(function(k){x.push(k),k.classList.add("medium-zoom-image")}),S.forEach(function(k){var T=k.type,R=k.listener,_=k.options;O.forEach(function(P){P.addEventListener(T,R,_)})}),I},d=function(){for(var A=arguments.length,E=Array(A),C=0;C<A;C++)E[C]=arguments[C];v.zoomed&&b();var O=E.length>0?E.reduce(function(k,T){return[].concat(k,fn(T))},[]):x;return O.forEach(function(k){k.classList.remove("medium-zoom-image"),k.dispatchEvent(kt("medium-zoom:detach",{detail:{zoom:I}}))}),x=x.filter(function(k){return O.indexOf(k)===-1}),I},h=function(A,E){var C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return x.forEach(function(O){O.addEventListener("medium-zoom:"+A,E,C)}),S.push({type:"medium-zoom:"+A,listener:E,options:C}),I},f=function(A,E){var C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return x.forEach(function(O){O.removeEventListener("medium-zoom:"+A,E,C)}),S=S.filter(function(O){return!(O.type==="medium-zoom:"+A&&O.listener.toString()===E.toString())}),I},m=function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},E=A.target,C=function(){var k={width:document.documentElement.clientWidth,height:document.documentElement.clientHeight,left:0,top:0,right:0,bottom:0},T=void 0,R=void 0;if(D.container)if(D.container instanceof Object)k=pt({},k,D.container),T=k.width-k.left-k.right-D.margin*2,R=k.height-k.top-k.bottom-D.margin*2;else{var _=ne(D.container)?D.container:document.querySelector(D.container),P=_.getBoundingClientRect(),tt=P.width,Bt=P.height,bn=P.left,vn=P.top;k=pt({},k,{width:tt,height:Bt,left:bn,top:vn})}T=T||k.width-D.margin*2,R=R||k.height-D.margin*2;var Ot=v.zoomedHd||v.original,yn=hn(Ot)?T:Ot.naturalWidth||T,wn=hn(Ot)?R:Ot.naturalHeight||R,qt=Ot.getBoundingClientRect(),En=qt.top,xn=qt.left,ae=qt.width,le=qt.height,An=Math.min(Math.max(ae,yn),T)/ae,Sn=Math.min(Math.max(le,wn),R)/le,ce=Math.min(An,Sn),Cn=(-xn+(T-ae)/2+D.margin+k.left)/ce,Ln=(-En+(R-le)/2+D.margin+k.top)/ce,Me="scale("+ce+") translate3d("+Cn+"px, "+Ln+"px, 0)";v.zoomed.style.transform=Me,v.zoomedHd&&(v.zoomedHd.style.transform=Me)};return new n(function(O){if(E&&x.indexOf(E)===-1){O(I);return}var k=function tt(){M=!1,v.zoomed.removeEventListener("transitionend",tt),v.original.dispatchEvent(kt("medium-zoom:opened",{detail:{zoom:I}})),O(I)};if(v.zoomed){O(I);return}if(E)v.original=E;else if(x.length>0){var T=x;v.original=T[0]}else{O(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=vs(v.original),document.body.appendChild(q),D.template){var R=ne(D.template)?D.template:document.querySelector(D.template);v.template=document.createElement("div"),v.template.appendChild(R.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",b),v.zoomed.addEventListener("transitionend",k),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",b),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",b),document.body.appendChild(v.zoomedHd),C()})}else C()})},b=function(){return new n(function(A){if(M||!v.original){A(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,A(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)})},p=function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},E=A.target;return v.original?b():m({target:E})},y=function(){return D},w=function(){return x},g=function(){return v.original},x=[],S=[],M=!1,H=0,D=e,v={original:null,zoomed:null,zoomedHd:null,template:null};Object.prototype.toString.call(t)==="[object Object]"?D=t:(t||typeof t=="string")&&c(t),D=pt({margin:0,background:"#fff",scrollOffset:40,container:null,template:null},D);var q=bs(D.background);document.addEventListener("click",o),document.addEventListener("keyup",r),document.addEventListener("scroll",s),window.addEventListener("resize",b);var I={open:m,close:b,toggle:p,update:a,clone:l,attach:c,detach:d,on:h,off:f,getOptions:y,getImages:w,getZoomedImage:g};return I};function ws(i,t){t===void 0&&(t={});var e=t.insertAt;if(!(!i||typeof document>"u")){var n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",e==="top"&&n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.styleSheet?o.styleSheet.cssText=i:o.appendChild(document.createTextNode(i))}}var Es=".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}";ws(Es);var mn=ys;var xs;function pn(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 o=xs??(xs=mn());o.update(e),o.attach(...n),i==null||i.addEventListener("abort",()=>{o.close(),o.detach(...n)});let s={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,o.open({target:l}))},s),l.addEventListener("medium-zoom:opened",()=>{let c=document.querySelector(".medium-zoom-image--opened");!r||!c||(c.tabIndex=-1,c.addEventListener("keydown",d=>{a(d)&&(d.preventDefault(),o.close())}),c.focus())},s),l.addEventListener("medium-zoom:closed",()=>{r&&l.focus(),r=!1},s))}function oe(i){return!/^[\\x00-\\x20]*([a-z][a-z0-9+.-]*:|[\\\\/])/i.test(i.replace(/[\\t\\n\\r]/g,""))}var De=new Map;function gn(i){let t=De.get(i);return t||(t=new Promise((e,n)=>{let o=document.createElement("script");o.src=i,o.onload=()=>e(),o.onerror=()=>{De.delete(i),n(new Error(`could not load ${i}`))},document.head.appendChild(o)}),De.set(i,t)),t}function As(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 Ss(i){document.addEventListener("click",async t=>{var o,s,r,a;let e=t.target.closest("[data-copy-markdown]");if(!e)return;let n=(((o=document.getElementById("db-page-markdown"))==null?void 0:o.textContent)??"").replace(/<\\\\\\/(script)/gi,"</$1").replace(/<\\\\!--/g,"<!--");try{await navigator.clipboard.writeText(n);let l=(s=e.dataset).label??(s.label=e.textContent??"");e.textContent="Copied",clearTimeout(Number(e.dataset.timer)),e.dataset.timer=String(setTimeout(()=>e.textContent=l,1500))}catch{}(a=(r=e.closest("db-popover"))==null?void 0:r.close)==null||a.call(r,"close-press")},{signal:i})}function Cs(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 o=n.selectedOptions[0];if(!o||o.disabled||!o.hasAttribute("value"))return;let s=o.dataset.prefix??"",r=n.value;if(o.hasAttribute("data-link")){(oe(r)||/^https?:\\/\\//i.test(r))&&(location.href=r);return}if(!(!oe(r)||!oe(s))){if(n.dataset.dbSwitch==="product"){location.href=r;return}try{let l=s?`${i}${s}/`:i;await gn(`${l}_dogsbay/pages.js`);let c=(a=window.__DOGSBAY_PAGES__)==null?void 0:a[s];location.href=c&&!c.includes(e)?`${l}index.html`:r}catch{location.href=r}}},{signal:t})})}function Ls(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 $t=new Map,re=new Set;function se(){for(let[i,t]of $t)i.isConnected||(st(i),t.abort(),$t.delete(i));for(let i of re)i.isConnected||st(i)}function ks(i,t){let e=EventTarget.prototype,n=e.addEventListener,o=0;e.addEventListener=function(s,r,a){o++;let l=typeof a=="object"?a.signal:void 0;n.call(this,s,r,typeof a=="object"?{...a,signal:l?AbortSignal.any([l,i]):i}:{capture:a===!0,signal:i})};try{t()}finally{e.addEventListener=n}return o}function Ts(){se(),document.querySelectorAll("[data-component=\'sidebar-provider\']").forEach(i=>{if($t.has(i)||re.has(i))return;let t=new AbortController;ks(t.signal,()=>Se(i))?$t.set(i,t):i.querySelector("[data-component=\'sidebar\']")&&re.add(i)}),document.removeEventListener("keydown",se),document.addEventListener("keydown",se)}var Tt;function Re(i={}){Tt==null||Tt.unmount();let t=new AbortController,{signal:e}=t,n=document.body,o=n.dataset.unitRoot??"",s=n.dataset.siteRoot??"";i.nav!==void 0&&(window.__DOGSBAY_NAV__=i.nav),Ts(),i.theme!==!1&&As(e),Ss(e),i.switchers!==!1&&Cs(s,e),Ls(e),i.search!==!1&&cn({unitRoot:o,loadScript:gn,signal:e}),un(e),pn(e);let r={unmount(){if(!e.aborted){t.abort();for(let a of[...$t.keys(),...re])st(a);se(),Tt===r&&(Tt=void 0)}}};return Tt=r}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>Re()):Re();})();\n';
|
|
1358
|
+
var CLIENT_FILE = "dogsbay-38a668e51a.js";
|
|
1359
|
+
var SSG_VERSION = "0.2.0-beta.152";
|
|
1360
|
+
var THEME_TEMPLATES = { "layouts/blank.html": '{# A page without the sidebar or table of contents: landing pages, splash pages, 404. -#}\n<!doctype html>\n<html lang="{{ page.lang }}" dir="{{ page.dir }}"{% if site.colorMode == "dark" %} class="dark"{% endif %}{% if has.crowdedHeader %} data-header="crowded"{% endif %}>\n<head>\n{% include "partials/head.html" %}\n</head>\n<body class="bg-background text-foreground antialiased" data-unit-root="{{ paths.unit }}" data-site-root="{{ paths.site }}" data-prefix="{{ page.prefix }}" data-page="{{ page.out }}"{{ bodyAttrs }}>\n{{ skipLink }}\n<div class="relative flex min-h-svh w-full flex-col bg-background">\n{{ announcementBar }}\n{% include "partials/header.html" %}\n<main id="db-content" class="min-w-0 flex-1 px-6 py-8 outline-none lg:px-12" tabindex="-1">\n<div class="mx-auto {{ widthClass }}">\n{{ banner }}{{ versionBadge }}{{ h1 }}{{ byline }}{{ lede }}{{ hero }}{{ metaStrip }}\n<article class="docs-prose">\n{{ content }}\n</article>\n{% include "partials/footer.html" %}\n</div>\n</main>\n</div>\n{{ searchDialog }}\n{{ scripts }}\n</body>\n</html>\n', "layouts/docs.html": '{# The docs layout: a port of @dogsbay/docs-layout DocsLayout.astro. -#}\n<!doctype html>\n<html lang="{{ page.lang }}" dir="{{ page.dir }}"{% if site.colorMode == "dark" %} class="dark"{% endif %}{% if has.crowdedHeader %} data-header="crowded"{% endif %}>\n<head>\n{% include "partials/head.html" %}\n</head>\n<body class="bg-background text-foreground antialiased" data-unit-root="{{ paths.unit }}" data-site-root="{{ paths.site }}" data-prefix="{{ page.prefix }}" data-page="{{ page.out }}"{{ bodyAttrs }}>\n{{ skipLink }}\n<div class="group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar" data-component="sidebar-provider" style="--sidebar-width: 16rem; --sidebar-width-icon: 3rem;">\n{{ sidebar }}\n<div class="relative flex w-full min-w-0 flex-1 flex-col bg-background">\n{{ announcementBar }}\n{% include "partials/header.html" %}\n<div class="flex min-w-0">\n<main id="db-content" class="min-w-0 flex-1 px-6 py-8 outline-none lg:px-12" tabindex="-1">\n<div class="mx-auto {{ widthClass }}">\n{{ banner }}{{ breadcrumb }}{{ pageActionsInline }}{{ versionBadge }}{{ h1 }}{{ byline }}{{ lede }}{{ hero }}{{ metaStrip }}{{ tocTop }}\n<article class="docs-prose">\n{{ content }}\n</article>\n{% include "partials/footer.html" %}\n</div>\n</main>\n{{ tocRail }}\n</div>\n</div>\n</div>\n{{ searchDialog }}\n{{ scripts }}\n</body>\n</html>\n', "partials/announcement.html": `{#- The site's announcement bar (site.announcement), as DocsLayout's AnnouncementBar.astro: a band above the
|
|
1366
1361
|
header in the callout colours of its tone. A closeable one is closed and remembered by <db-announcement>,
|
|
1367
1362
|
and the head script hides a closed one before first paint. Context: announcement = {id, key (what a close is
|
|
1368
1363
|
stored under, as the head meta), html (inline Markdown, rendered), toneClass, closeable} or "". -#}
|
|
@@ -1415,19 +1410,20 @@ var THEME_TEMPLATES = { "layouts/blank.html": '{# A page without the sidebar or
|
|
|
1415
1410
|
as <details> lists, so every link is in the HTML (crawlers, readers without JavaScript).
|
|
1416
1411
|
Context: headerLinks = [{label, href, current, items}] (items: [{label, href, current}], empty for a link;
|
|
1417
1412
|
href relative to the page; current "page" or ""), layout = "bar" (the header, from lg) or "list" (the sidebar, below lg),
|
|
1418
|
-
wrap = "1" on a layout with no sidebar to move them into: the bar shows at every width and wraps
|
|
1413
|
+
wrap = "1" on a layout with no sidebar to move them into: the bar shows at every width and wraps;
|
|
1414
|
+
barClass = the bar's classes from the width its labels fit at ("hidden lg:flex", "hidden xl:flex"\u2026, headerLinksFrom). -#}
|
|
1419
1415
|
{%- if headerLinks | length -%}
|
|
1420
1416
|
{%- if layout == "bar" -%}
|
|
1421
|
-
<nav aria-label="{{ t('siteLinks') }}" class="site-header-links items-center gap-1 {% if wrap %}flex min-w-0 flex-wrap{% else %}hidden lg:flex{% endif %}">
|
|
1417
|
+
<nav aria-label="{{ t('siteLinks') }}" class="site-header-links items-center gap-1 {% if wrap %}flex min-w-0 flex-wrap{% elif barClass %}{{ barClass }}{% else %}hidden lg:flex{% endif %}">
|
|
1422
1418
|
{%- for l in headerLinks -%}
|
|
1423
1419
|
{%- if l.items | length -%}
|
|
1424
|
-
<details class="site-header-menu relative"><summary class="flex cursor-pointer items-center gap-1 rounded-md px-2 py-1.5 text-sm text-muted-foreground hover:bg-accent hover:text-foreground">{{ l.label }}{{ icons.chevronDown }}</summary><ul class="absolute left-0 z-50 mt-1 min-w-[12rem] rounded-md border border-border bg-popover p-1 text-sm shadow-md">
|
|
1420
|
+
<details class="site-header-menu relative"><summary class="flex cursor-pointer items-center gap-1 whitespace-nowrap rounded-md px-2 py-1.5 text-sm text-muted-foreground hover:bg-accent hover:text-foreground">{{ l.label }}{{ icons.chevronDown }}</summary><ul class="absolute left-0 z-50 mt-1 min-w-[12rem] rounded-md border border-border bg-popover p-1 text-sm shadow-md">
|
|
1425
1421
|
{%- for i in l.items -%}
|
|
1426
1422
|
<li><a href="{{ i.href }}"{% if i.current %} aria-current="page"{% endif %} class="block rounded-sm px-2 py-1.5 text-foreground no-underline hover:bg-accent">{{ i.label }}</a></li>
|
|
1427
1423
|
{%- endfor -%}
|
|
1428
1424
|
</ul></details>
|
|
1429
1425
|
{%- else -%}
|
|
1430
|
-
<a href="{{ l.href }}"{% if l.current %} aria-current="page"{% endif %} class="rounded-md px-2 py-1.5 text-sm text-muted-foreground no-underline hover:bg-accent hover:text-foreground aria-[current=page]:text-foreground">{{ l.label }}</a>
|
|
1426
|
+
<a href="{{ l.href }}"{% if l.current %} aria-current="page"{% endif %} class="whitespace-nowrap rounded-md px-2 py-1.5 text-sm text-muted-foreground no-underline hover:bg-accent hover:text-foreground aria-[current=page]:text-foreground">{{ l.label }}</a>
|
|
1431
1427
|
{%- endif -%}
|
|
1432
1428
|
{%- endfor -%}
|
|
1433
1429
|
</nav>
|
|
@@ -1447,7 +1443,23 @@ var THEME_TEMPLATES = { "layouts/blank.html": '{# A page without the sidebar or
|
|
|
1447
1443
|
</ul></nav>
|
|
1448
1444
|
{%- endif -%}
|
|
1449
1445
|
{%- endif -%}
|
|
1450
|
-
`, "partials/header.html":
|
|
1446
|
+
`, "partials/header.html": `{#- Class names stand apart from template tags (a space, trimmed by "{%-"): scripts/build-package.mjs finds
|
|
1447
|
+
the browser package's classes by splitting on whitespace. -#}
|
|
1448
|
+
<header class="sticky top-0 z-40 flex shrink-0 items-center gap-2 border-b bg-background/95 px-4 backdrop-blur-sm supports-[backdrop-filter]:bg-background/60 {% if has.headerLinks and not has.sidebar %}min-h-[var(--db-header-height)] flex-wrap py-1{% elif has.crowdedHeader %}h-[var(--db-header-height)] max-lg:h-auto max-lg:min-h-12 max-lg:py-1 {%- else %}h-[var(--db-header-height)]{% endif %}">
|
|
1449
|
+
{#- A layout with no sidebar keeps its header links in the header, wrapping, so the header grows a row; a crowded
|
|
1450
|
+
header (links and menus) wraps its menus below lg and grows with them (DocsLayout) #}
|
|
1451
|
+
{{ sidebarTrigger }}
|
|
1452
|
+
{#- With header links, the page title shows only below lg, where the links are in the sidebar; a layout with
|
|
1453
|
+
no sidebar keeps the links in the header (wrapping) and has no title #}
|
|
1454
|
+
{%- if not (has.headerLinks and not has.sidebar) %}
|
|
1455
|
+
<span class="min-w-0 truncate text-sm text-muted-foreground{% if has.headerLinks and linksListHidden %} {{ linksListHidden }}{% endif %}{% if has.crowdedHeader %} max-lg:hidden {%- endif %}" data-page-title>{{ page.title }}</span>
|
|
1456
|
+
{%- endif %}
|
|
1457
|
+
{{ headerLinks }}
|
|
1458
|
+
<div class="ml-auto flex min-w-0 items-center gap-2{% if has.crowdedHeader %} max-lg:flex-wrap max-lg:justify-end max-lg:gap-y-1 {%- endif %}">
|
|
1459
|
+
{{ tocPopover }}{{ switchers }}{{ pageActions }}{{ searchButton }}{{ repoLink }}{{ themeToggle }}
|
|
1460
|
+
</div>
|
|
1461
|
+
</header>
|
|
1462
|
+
`, "partials/hero.html": `{#- A blog post's hero image (DocsLayout.astro, chrome "blog"). Context: post.hero (a link to the image) or empty. -#}
|
|
1451
1463
|
{%- if post is defined and post and post.hero -%}
|
|
1452
1464
|
<img src="{{ post.hero }}" alt="" class="not-prose mb-8 w-full rounded-lg border border-border object-cover aspect-[2/1]" loading="eager" decoding="async">
|
|
1453
1465
|
{%- endif -%}
|
|
@@ -1575,31 +1587,31 @@ var CLIENT_CANDIDATES = ['""', '"&"', '"\\\\$&")).join("|")})', '"\\\\$&")}"', '
|
|
|
1575
1587
|
var SITE_NOTICES = `Third-party software in this site's _dogsbay/ files (dogsbay.js, site.css) and pages
|
|
1576
1588
|
|
|
1577
1589
|
========================================================================
|
|
1578
|
-
@dogsbay/elements@0.2.0-beta.
|
|
1590
|
+
@dogsbay/elements@0.2.0-beta.152 (MIT)
|
|
1579
1591
|
https://github.com/dogsbay/dogsbay.git
|
|
1580
1592
|
|
|
1581
1593
|
Licensed under MIT; the package ships no licence file.
|
|
1582
1594
|
|
|
1583
1595
|
========================================================================
|
|
1584
|
-
@dogsbay/primitives@0.2.0-beta.
|
|
1596
|
+
@dogsbay/primitives@0.2.0-beta.152 (MIT)
|
|
1585
1597
|
https://github.com/dogsbay/dogsbay.git
|
|
1586
1598
|
|
|
1587
1599
|
Licensed under MIT; the package ships no licence file.
|
|
1588
1600
|
|
|
1589
1601
|
========================================================================
|
|
1590
|
-
@dogsbay/render-html@0.2.0-beta.
|
|
1602
|
+
@dogsbay/render-html@0.2.0-beta.152 (MIT)
|
|
1591
1603
|
https://github.com/dogsbay/dogsbay.git
|
|
1592
1604
|
|
|
1593
1605
|
Licensed under MIT; the package ships no licence file.
|
|
1594
1606
|
|
|
1595
1607
|
========================================================================
|
|
1596
|
-
@dogsbay/search@0.2.0-beta.
|
|
1608
|
+
@dogsbay/search@0.2.0-beta.152 (MIT)
|
|
1597
1609
|
https://github.com/dogsbay/dogsbay.git
|
|
1598
1610
|
|
|
1599
1611
|
Licensed under MIT; the package ships no licence file.
|
|
1600
1612
|
|
|
1601
1613
|
========================================================================
|
|
1602
|
-
@dogsbay/ui@0.2.0-beta.
|
|
1614
|
+
@dogsbay/ui@0.2.0-beta.152 (MIT)
|
|
1603
1615
|
https://github.com/dogsbay/dogsbay.git
|
|
1604
1616
|
|
|
1605
1617
|
Licensed under MIT; the package ships no licence file.
|
|
@@ -2078,7 +2090,7 @@ function sidebar(opts) {
|
|
|
2078
2090
|
${opts.header}
|
|
2079
2091
|
<div class="mx-2 h-px w-auto shrink-0 bg-sidebar-border" role="separator"></div>
|
|
2080
2092
|
<div class="flex min-h-0 flex-1 flex-col gap-0 overflow-auto group-data-[collapsible=icon]:overflow-hidden [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]" data-sidebar="content">
|
|
2081
|
-
${opts.links ? `<div class="relative flex w-full min-w-0 flex-col p-2 lg:hidden" data-sidebar="group"><div class="w-full text-sm" data-sidebar="group-content">${opts.links}</div></div>
|
|
2093
|
+
${opts.links ? `<div class="relative flex w-full min-w-0 flex-col p-2${opts.linksClass === void 0 ? " lg:hidden" : opts.linksClass ? ` ${opts.linksClass}` : ""}" data-sidebar="group"><div class="w-full text-sm" data-sidebar="group-content">${opts.links}</div></div>
|
|
2082
2094
|
` : ""}<div class="relative flex w-full min-w-0 flex-col p-2"><div class="w-full text-sm">
|
|
2083
2095
|
${opts.nav}
|
|
2084
2096
|
</div></div>
|
|
@@ -2176,12 +2188,13 @@ function navSize(nodes) {
|
|
|
2176
2188
|
for (const x of nodes) n += 1 + navSize(x.children);
|
|
2177
2189
|
return n;
|
|
2178
2190
|
}
|
|
2179
|
-
function searchButton(label) {
|
|
2180
|
-
|
|
2191
|
+
function searchButton(label, compact = false) {
|
|
2192
|
+
const shown = compact ? "2xl:inline" : "sm:inline";
|
|
2193
|
+
return `<button type="button" data-dialog-for="db-search" class="inline-flex h-9 shrink-0 items-center gap-2 whitespace-nowrap rounded-md border border-border bg-background px-3 text-sm text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring" aria-label="${esc(label)}" aria-keyshortcuts="/ Control+K">${svg(
|
|
2181
2194
|
'<circle cx="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/>',
|
|
2182
2195
|
"",
|
|
2183
2196
|
14
|
|
2184
|
-
)}<span class="hidden
|
|
2197
|
+
)}<span class="hidden ${shown}" aria-hidden="true">${esc(label)}</span><kbd class="hidden rounded border border-border px-1.5 py-0.5 font-mono text-[10px] ${shown}" aria-hidden="true">/</kbd></button>`;
|
|
2185
2198
|
}
|
|
2186
2199
|
function themeToggle(label) {
|
|
2187
2200
|
return `<button type="button" data-component="theme-toggle" aria-label="${esc(label)}" class="inline-flex h-9 w-9 items-center justify-center rounded-md border border-border bg-background text-foreground transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring">${svg(
|
|
@@ -2192,12 +2205,15 @@ function themeToggle(label) {
|
|
|
2192
2205
|
"hidden h-4 w-4 dark:block"
|
|
2193
2206
|
)}</button>`;
|
|
2194
2207
|
}
|
|
2208
|
+
var ACTIONS_PAD_COMPACT = "px-3 max-2xl:px-2";
|
|
2209
|
+
var ACTIONS_ICON_COMPACT = "2xl:hidden";
|
|
2210
|
+
var ACTIONS_LABEL_COMPACT = "max-2xl:hidden";
|
|
2195
2211
|
function pageActions(o) {
|
|
2196
2212
|
const item = "relative flex w-full cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm text-foreground outline-none focus:bg-accent focus:text-accent-foreground hover:bg-accent hover:text-accent-foreground no-underline border-0 bg-transparent text-left";
|
|
2197
2213
|
const arrow = svg('<path d="M7 7h10v10"/><path d="M7 17 17 7"/>', "ml-auto opacity-60", 14);
|
|
2198
2214
|
const providers = o.providers.map((p) => `<li><a class="${item}" href="${esc(p.href)}" target="_blank" rel="noopener">${esc(p.label)}${arrow}</a></li>`).join("");
|
|
2199
2215
|
return `<div class="flex items-center" data-component="page-actions"><db-popover placement="bottom-end" class="relative inline-block">
|
|
2200
|
-
<button type="button" data-part="trigger" class="inline-flex h-8 items-center justify-center gap-1 rounded-md border border-border bg-background px-3 text-sm text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring">${esc(o.label)}${svg('<path d="m6 9 6 6 6-6"/>', "", 14)}</button>
|
|
2216
|
+
<button type="button" data-part="trigger"${o.compact ? ` aria-label="${esc(o.label)}"` : ""} class="inline-flex h-8 shrink-0 items-center justify-center gap-1 whitespace-nowrap rounded-md border border-border bg-background ${o.compact ? ACTIONS_PAD_COMPACT : "px-3"} text-sm text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring">${o.compact ? `${svg('<rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/>', ACTIONS_ICON_COMPACT, 14)}<span class="${ACTIONS_LABEL_COMPACT}">${esc(o.label)}</span>` : esc(o.label)}${svg('<path d="m6 9 6 6 6-6"/>', "", 14)}</button>
|
|
2201
2217
|
<div data-part="content" class="z-50 min-w-[12rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md" aria-label="${esc(o.label)}">
|
|
2202
2218
|
<ul class="m-0 list-none p-0">
|
|
2203
2219
|
${o.copy ? `<li><button type="button" class="${item}" data-copy-markdown>${esc(o.copyLabel)}</button></li>` : ""}
|
|
@@ -2323,6 +2339,7 @@ function linkIconAttrs(icons) {
|
|
|
2323
2339
|
}
|
|
2324
2340
|
|
|
2325
2341
|
// src/theme/docs-layout/site-chrome.ts
|
|
2342
|
+
var isMenu = (l) => "items" in l;
|
|
2326
2343
|
var isExternal2 = (href) => /^https?:\/\//i.test(href);
|
|
2327
2344
|
var ANNOUNCEMENT_TONE_CLASS = {
|
|
2328
2345
|
note: "border-note/40 bg-note/15",
|
|
@@ -2330,6 +2347,16 @@ var ANNOUNCEMENT_TONE_CLASS = {
|
|
|
2330
2347
|
warning: "border-warning/40 bg-warning/20",
|
|
2331
2348
|
caution: "border-danger/40 bg-danger/15"
|
|
2332
2349
|
};
|
|
2350
|
+
function headerLinksFrom(links, crowded) {
|
|
2351
|
+
const est = links.reduce((n, l) => n + l.label.length * 6.2 + 28 + (isMenu(l) ? 14 : 0), 0);
|
|
2352
|
+
const menus = crowded ? 520 : 210;
|
|
2353
|
+
const widths = [["lg", 1024], ["xl", 1280], ["2xl", 1536]];
|
|
2354
|
+
for (const [from, width] of widths) {
|
|
2355
|
+
if (crowded && from === "lg") continue;
|
|
2356
|
+
if (est <= width - 256 - 80 - menus) return from;
|
|
2357
|
+
}
|
|
2358
|
+
return "never";
|
|
2359
|
+
}
|
|
2333
2360
|
|
|
2334
2361
|
// src/theme/compose.ts
|
|
2335
2362
|
import { inlineMarkdownHtml, isChromeMenu } from "@dogsbay/site-files";
|
|
@@ -2438,6 +2465,8 @@ var SOCIAL_ICONS = Object.keys(SOCIAL_ICON_BODIES);
|
|
|
2438
2465
|
// src/theme/compose.ts
|
|
2439
2466
|
import { ANNOUNCEMENT_HEAD_SCRIPT } from "@dogsbay/elements/announcement-head";
|
|
2440
2467
|
import { COLOR_MODE_HEAD_SCRIPTS } from "@dogsbay/elements/color-mode-head";
|
|
2468
|
+
var LINKS_LIST_HIDDEN = { lg: "lg:hidden", xl: "xl:hidden", "2xl": "2xl:hidden", never: "" };
|
|
2469
|
+
var LINKS_BAR = { lg: "hidden lg:flex", xl: "hidden xl:flex", "2xl": "hidden 2xl:flex", never: "hidden" };
|
|
2441
2470
|
var PROVIDERS = {
|
|
2442
2471
|
claude: { label: "Open in Claude", url: "https://claude.ai/new?q={q}" },
|
|
2443
2472
|
chatgpt: { label: "Open in ChatGPT", url: "https://chatgpt.com/?q={q}" },
|
|
@@ -2523,7 +2552,8 @@ async function composePage(p, cfg, templates) {
|
|
|
2523
2552
|
const t = p.t;
|
|
2524
2553
|
const hasToc = p.toc !== "off" && p.headings.length >= 2 && !p.wide;
|
|
2525
2554
|
const hasSidebar = p.layout !== "blank";
|
|
2526
|
-
const
|
|
2555
|
+
const actionsOf = (compact) => cfg.pageActions.enabled && p.mdHref ? pageActions({
|
|
2556
|
+
compact,
|
|
2527
2557
|
mdHref: p.mdHref,
|
|
2528
2558
|
label: t("pageActions"),
|
|
2529
2559
|
copyLabel: t("copyMarkdown"),
|
|
@@ -2534,6 +2564,7 @@ async function composePage(p, cfg, templates) {
|
|
|
2534
2564
|
href: PROVIDERS[k].url.replace("{q}", encodeURIComponent((cfg.pageActions.promptTemplate ?? "Read this docs page: {url}").replace("{url}", () => p.absoluteUrl)))
|
|
2535
2565
|
})) : []
|
|
2536
2566
|
}) : "";
|
|
2567
|
+
const actions = actionsOf(false);
|
|
2537
2568
|
const base = {
|
|
2538
2569
|
page: {
|
|
2539
2570
|
title: p.title,
|
|
@@ -2572,6 +2603,11 @@ async function composePage(p, cfg, templates) {
|
|
|
2572
2603
|
};
|
|
2573
2604
|
const region = (name, extra) => templates.region(`partials/${name}.html`, extra ? { ...base, ...extra } : base);
|
|
2574
2605
|
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 })) } });
|
|
2606
|
+
const switchersHtml = String(await switcher("product", p.products ?? [], t("product"))) + String(await switcher("locale", p.locales, t("language"))) + String(await switcher("version", p.versions, t("version")));
|
|
2607
|
+
const actionsInHeader = !!actions && (cfg.pageActions.placement !== "inline" || p.layout === "blank");
|
|
2608
|
+
const headerLinkList = cfg.chrome.header.links;
|
|
2609
|
+
const crowded = hasSidebar && headerLinkList.length > 0 && (switchersHtml.trim() !== "" || actionsInHeader);
|
|
2610
|
+
const linksFrom = headerLinkList.length ? headerLinksFrom(headerLinkList, crowded) : "lg";
|
|
2575
2611
|
const sidebarHeader = hasSidebar ? String(await templates.renderPartial("partials/sidebar-header.html", base)) : "";
|
|
2576
2612
|
const ctx = {
|
|
2577
2613
|
...base,
|
|
@@ -2580,6 +2616,7 @@ async function composePage(p, cfg, templates) {
|
|
|
2580
2616
|
hasSidebar ? sidebar({
|
|
2581
2617
|
header: sidebarHeader,
|
|
2582
2618
|
label: t("nav"),
|
|
2619
|
+
linksClass: LINKS_LIST_HIDDEN[linksFrom],
|
|
2583
2620
|
links: cfg.chrome.header.links.length ? String(await region("header-links", { layout: "list" })) + // The header's icons too, below md, where the header has no room for them beside the links
|
|
2584
2621
|
(base.headerSocial.length ? `<div class="mt-2 flex flex-wrap items-center gap-1 px-1 md:hidden">${await region("social-links", { social: base.headerSocial, size: "header", socialClass: "" })}</div>` : "") : "",
|
|
2585
2622
|
nav: navTree(p.nav, { ...p.navOptions, toggleLabel: t("toggleSection"), unitRoot: p.unitRoot })
|
|
@@ -2597,19 +2634,17 @@ async function composePage(p, cfg, templates) {
|
|
|
2597
2634
|
tocTop: hasToc && p.toc === "top" ? await region("toc-top") : "",
|
|
2598
2635
|
tocRail: hasToc && p.toc === "rail" && hasSidebar ? await region("toc-rail") : "",
|
|
2599
2636
|
tocPopover: hasToc && p.toc === "popover" ? await region("toc-popover") : "",
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
String(await switcher("product", p.products ?? [], t("product"))) + String(await switcher("locale", p.locales, t("language"))) + String(await switcher("version", p.versions, t("version")))
|
|
2603
|
-
),
|
|
2604
|
-
// The blank layout has no inline slot, so its pages keep the menu in the header.
|
|
2605
|
-
pageActions: safe2(actions && (cfg.pageActions.placement !== "inline" || p.layout === "blank") ? actions : ""),
|
|
2637
|
+
switchers: safe2(switchersHtml),
|
|
2638
|
+
pageActions: safe2(actionsInHeader ? crowded ? actionsOf(true) : actions : ""),
|
|
2606
2639
|
// Below the breadcrumb, above the title, as DocsLayout's inline placement.
|
|
2607
2640
|
pageActionsInline: safe2(actions && cfg.pageActions.placement !== "header" ? `<div class="mb-4 flex justify-end" data-page-actions-inline>${actions}</div>` : ""),
|
|
2608
|
-
searchButton: safe2(cfg.search ? searchButton(t("search")) : ""),
|
|
2641
|
+
searchButton: safe2(cfg.search ? searchButton(t("search"), crowded) : ""),
|
|
2609
2642
|
// header.social (site.repoUrl is its default); hidden below md when the header has links and a sidebar carries them
|
|
2610
2643
|
// (a blank page has none, so its links and icons stay in the header)
|
|
2611
2644
|
repoLink: await region("social-links", { social: base.headerSocial, size: "header", socialClass: cfg.chrome.header.links.length && hasSidebar ? "max-md:hidden" : "" }),
|
|
2612
|
-
headerLinks: await region("header-links", { layout: "bar", wrap: hasSidebar ? "" : "1" }),
|
|
2645
|
+
headerLinks: await region("header-links", { layout: "bar", wrap: hasSidebar ? "" : "1", barClass: LINKS_BAR[linksFrom] }),
|
|
2646
|
+
// The class that hides what stands in for the header links (the page title) from the width they show at.
|
|
2647
|
+
linksListHidden: LINKS_LIST_HIDDEN[linksFrom],
|
|
2613
2648
|
footerColumns: await region("footer-columns"),
|
|
2614
2649
|
footerSocial: await region("social-links", { social: base.footerSocial, size: "footer", socialClass: "" }),
|
|
2615
2650
|
announcementBar: await region("announcement"),
|
|
@@ -2636,6 +2671,7 @@ async function composePage(p, cfg, templates) {
|
|
|
2636
2671
|
toc: hasToc ? "1" : "",
|
|
2637
2672
|
search: cfg.search ? "1" : "",
|
|
2638
2673
|
headerLinks: cfg.chrome.header.links.length ? "1" : "",
|
|
2674
|
+
crowdedHeader: crowded ? "1" : "",
|
|
2639
2675
|
footerSocial: base.footerSocial.length ? "1" : ""
|
|
2640
2676
|
},
|
|
2641
2677
|
scripts: safe2(
|
|
@@ -2643,7 +2679,7 @@ async function composePage(p, cfg, templates) {
|
|
|
2643
2679
|
// into its escaped script states; the client reverses both before copying.
|
|
2644
2680
|
(p.markdown != null && cfg.pageActions.enabled && cfg.pageActions.copyButton ? `<script type="text/markdown" id="db-page-markdown">${p.markdown.replace(/<\/(script)/gi, "<\\/$1").replace(/<!--/g, "<\\!--")}<\/script>
|
|
2645
2681
|
` : "") + `<script src="${esc2(p.unitRoot)}_dogsbay/nav.js" defer><\/script>
|
|
2646
|
-
<script src="${esc2(p.siteRoot)}_dogsbay/assets
|
|
2682
|
+
<script src="${esc2(p.siteRoot)}_dogsbay/assets/${CLIENT_FILE}" defer><\/script>`
|
|
2647
2683
|
)
|
|
2648
2684
|
};
|
|
2649
2685
|
return templates.render(p.layout, ctx);
|
|
@@ -3115,6 +3151,264 @@ function strings(locale, overrides) {
|
|
|
3115
3151
|
return (key) => table[key] ?? "";
|
|
3116
3152
|
}
|
|
3117
3153
|
|
|
3154
|
+
// src/core/unit-manifest.ts
|
|
3155
|
+
import { unitKeyString, unitManifest } from "@dogsbay/site-files";
|
|
3156
|
+
function unitKey(u) {
|
|
3157
|
+
return unitKeyString({ product: u.product, locale: u.locale, version: u.version });
|
|
3158
|
+
}
|
|
3159
|
+
function manifestPath(u) {
|
|
3160
|
+
return `_dogsbay/units/${unitKey(u)}.json`;
|
|
3161
|
+
}
|
|
3162
|
+
function makeManifest(u, ssg, redirects) {
|
|
3163
|
+
const inside = (p) => !u.prefix ? p : p === u.prefix ? "" : p.startsWith(`${u.prefix}/`) ? p.slice(u.prefix.length + 1) : p;
|
|
3164
|
+
return { ...unitManifest({ product: u.product, locale: u.locale, version: u.version }, { pages: ssg.pageOut.map(([p]) => inside(p)), sitemap: [], redirects }), ssg };
|
|
3165
|
+
}
|
|
3166
|
+
function parseManifest(raw) {
|
|
3167
|
+
let v = raw;
|
|
3168
|
+
if (typeof raw === "string") {
|
|
3169
|
+
try {
|
|
3170
|
+
v = JSON.parse(raw);
|
|
3171
|
+
} catch (e) {
|
|
3172
|
+
return { problem: `not JSON (${e.message})` };
|
|
3173
|
+
}
|
|
3174
|
+
}
|
|
3175
|
+
const m = v;
|
|
3176
|
+
if (!m || typeof m !== "object" || m.schemaVersion !== 1) return { problem: "not a unit manifest (schemaVersion 1)" };
|
|
3177
|
+
const s = m.ssg;
|
|
3178
|
+
const strings2 = (x) => Array.isArray(x) && x.every((y) => typeof y === "string");
|
|
3179
|
+
const pairs = (x) => Array.isArray(x) && x.every((y) => Array.isArray(y) && y.length === 2 && typeof y[0] === "string" && typeof y[1] === "string");
|
|
3180
|
+
if (!s || typeof s !== "object" || typeof s.prefix !== "string" || !Array.isArray(s.redirectInputs) || !pairs(s.pageOut) || !strings2(s.sitemaps) || !strings2(s.files) || typeof s.client !== "string" || typeof s.builder !== "string") {
|
|
3181
|
+
return { problem: "has no dogsbay-ssg section (written by another tool, or an older dogsbay-ssg)" };
|
|
3182
|
+
}
|
|
3183
|
+
if (s.math !== void 0 && typeof s.math !== "boolean" || s.iconSets !== void 0 && !strings2(s.iconSets)) return { problem: "has a malformed notices record" };
|
|
3184
|
+
const triples = (x) => Array.isArray(x) && x.every((y) => Array.isArray(y) && y.length === 3 && typeof y[0] === "string" && typeof y[1] === "string" && typeof y[2] === "number");
|
|
3185
|
+
if (!triples(m.redirects)) return { problem: "has malformed redirects" };
|
|
3186
|
+
const inputs = s.redirectInputs;
|
|
3187
|
+
if (!inputs.every((r) => !!r && typeof r === "object" && typeof r.from === "string" && typeof r.to === "string" && typeof r.status === "number")) {
|
|
3188
|
+
return { problem: "has a malformed redirect" };
|
|
3189
|
+
}
|
|
3190
|
+
return { manifest: m };
|
|
3191
|
+
}
|
|
3192
|
+
|
|
3193
|
+
// src/generated/icon-notices.ts
|
|
3194
|
+
var ICON_SET_NOTICES = { "fa6-brands": "Font Awesome 6 Brands icons (CC-BY-4.0), by Dave Gandy\nhttps://github.com/FortAwesome/Font-Awesome\nLicence: https://creativecommons.org/licenses/by/4.0/", "fa6-regular": "Font Awesome 6 Regular icons (CC-BY-4.0), by Dave Gandy\nhttps://github.com/FortAwesome/Font-Awesome\nLicence: https://creativecommons.org/licenses/by/4.0/", "fa6-solid": "Font Awesome 6 Solid icons (CC-BY-4.0), by Dave Gandy\nhttps://github.com/FortAwesome/Font-Awesome\nLicence: https://creativecommons.org/licenses/by/4.0/", "lucide": 'Lucide icons (ISC), by Lucide Contributors\nhttps://github.com/lucide-icons/lucide\nLicence: https://github.com/lucide-icons/lucide/blob/main/LICENSE\n\nISC License\n\nCopyright (c) 2026 Lucide Icons and Contributors\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted, provided that the above\ncopyright notice and this permission notice appear in all copies.\n\nTHE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\nWITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\nMERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\nANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\nWHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\nACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\nOR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n\n---\n\nThe following Lucide icons are derived from the Feather project:\n\nairplay, alert-circle, alert-octagon, alert-triangle, aperture, arrow-down-circle, arrow-down-left, arrow-down-right, arrow-down, arrow-left-circle, arrow-left, arrow-right-circle, arrow-right, arrow-up-circle, arrow-up-left, arrow-up-right, arrow-up, at-sign, calendar, cast, check, chevron-down, chevron-left, chevron-right, chevron-up, chevrons-down, chevrons-left, chevrons-right, chevrons-up, circle, clipboard, clock, code, columns, command, compass, corner-down-left, corner-down-right, corner-left-down, corner-left-up, corner-right-down, corner-right-up, corner-up-left, corner-up-right, crosshair, database, divide-circle, divide-square, dollar-sign, download, external-link, feather, frown, hash, headphones, help-circle, info, italic, key, layout, life-buoy, link-2, link, loader, lock, log-in, log-out, maximize, meh, minimize, minimize-2, minus-circle, minus-square, minus, monitor, moon, more-horizontal, more-vertical, move, music, navigation-2, navigation, octagon, pause-circle, percent, plus-circle, plus-square, plus, power, radio, rss, search, server, share, shopping-bag, sidebar, smartphone, smile, square, table-2, tablet, target, terminal, trash-2, trash, triangle, tv, type, upload, x-circle, x-octagon, x-square, x, zoom-in, zoom-out\n\nThe MIT License (MIT) (for the icons listed above)\n\nCopyright (c) 2013-present Cole Bemis\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the "Software"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.', "mdi": `Material Design Icons (Apache-2.0), by Pictogrammers
|
|
3195
|
+
https://github.com/Templarian/MaterialDesign
|
|
3196
|
+
Licence: https://github.com/Templarian/MaterialDesign/blob/master/LICENSE
|
|
3197
|
+
|
|
3198
|
+
Apache License
|
|
3199
|
+
Version 2.0, January 2004
|
|
3200
|
+
http://www.apache.org/licenses/
|
|
3201
|
+
|
|
3202
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
3203
|
+
|
|
3204
|
+
1. Definitions.
|
|
3205
|
+
|
|
3206
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
3207
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
3208
|
+
|
|
3209
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
3210
|
+
the copyright owner that is granting the License.
|
|
3211
|
+
|
|
3212
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
3213
|
+
other entities that control, are controlled by, or are under common
|
|
3214
|
+
control with that entity. For the purposes of this definition,
|
|
3215
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
3216
|
+
direction or management of such entity, whether by contract or
|
|
3217
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
3218
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
3219
|
+
|
|
3220
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
3221
|
+
exercising permissions granted by this License.
|
|
3222
|
+
|
|
3223
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
3224
|
+
including but not limited to software source code, documentation
|
|
3225
|
+
source, and configuration files.
|
|
3226
|
+
|
|
3227
|
+
"Object" form shall mean any form resulting from mechanical
|
|
3228
|
+
transformation or translation of a Source form, including but
|
|
3229
|
+
not limited to compiled object code, generated documentation,
|
|
3230
|
+
and conversions to other media types.
|
|
3231
|
+
|
|
3232
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
3233
|
+
Object form, made available under the License, as indicated by a
|
|
3234
|
+
copyright notice that is included in or attached to the work
|
|
3235
|
+
(an example is provided in the Appendix below).
|
|
3236
|
+
|
|
3237
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
3238
|
+
form, that is based on (or derived from) the Work and for which the
|
|
3239
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
3240
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
3241
|
+
of this License, Derivative Works shall not include works that remain
|
|
3242
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
3243
|
+
the Work and Derivative Works thereof.
|
|
3244
|
+
|
|
3245
|
+
"Contribution" shall mean any work of authorship, including
|
|
3246
|
+
the original version of the Work and any modifications or additions
|
|
3247
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
3248
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
3249
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
3250
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
3251
|
+
means any form of electronic, verbal, or written communication sent
|
|
3252
|
+
to the Licensor or its representatives, including but not limited to
|
|
3253
|
+
communication on electronic mailing lists, source code control systems,
|
|
3254
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
3255
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
3256
|
+
excluding communication that is conspicuously marked or otherwise
|
|
3257
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
3258
|
+
|
|
3259
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
3260
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
3261
|
+
subsequently incorporated within the Work.
|
|
3262
|
+
|
|
3263
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
3264
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
3265
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
3266
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
3267
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
3268
|
+
Work and such Derivative Works in Source or Object form.
|
|
3269
|
+
|
|
3270
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
3271
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
3272
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
3273
|
+
(except as stated in this section) patent license to make, have made,
|
|
3274
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
3275
|
+
where such license applies only to those patent claims licensable
|
|
3276
|
+
by such Contributor that are necessarily infringed by their
|
|
3277
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
3278
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
3279
|
+
institute patent litigation against any entity (including a
|
|
3280
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
3281
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
3282
|
+
or contributory patent infringement, then any patent licenses
|
|
3283
|
+
granted to You under this License for that Work shall terminate
|
|
3284
|
+
as of the date such litigation is filed.
|
|
3285
|
+
|
|
3286
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
3287
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
3288
|
+
modifications, and in Source or Object form, provided that You
|
|
3289
|
+
meet the following conditions:
|
|
3290
|
+
|
|
3291
|
+
(a) You must give any other recipients of the Work or
|
|
3292
|
+
Derivative Works a copy of this License; and
|
|
3293
|
+
|
|
3294
|
+
(b) You must cause any modified files to carry prominent notices
|
|
3295
|
+
stating that You changed the files; and
|
|
3296
|
+
|
|
3297
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
3298
|
+
that You distribute, all copyright, patent, trademark, and
|
|
3299
|
+
attribution notices from the Source form of the Work,
|
|
3300
|
+
excluding those notices that do not pertain to any part of
|
|
3301
|
+
the Derivative Works; and
|
|
3302
|
+
|
|
3303
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
3304
|
+
distribution, then any Derivative Works that You distribute must
|
|
3305
|
+
include a readable copy of the attribution notices contained
|
|
3306
|
+
within such NOTICE file, excluding those notices that do not
|
|
3307
|
+
pertain to any part of the Derivative Works, in at least one
|
|
3308
|
+
of the following places: within a NOTICE text file distributed
|
|
3309
|
+
as part of the Derivative Works; within the Source form or
|
|
3310
|
+
documentation, if provided along with the Derivative Works; or,
|
|
3311
|
+
within a display generated by the Derivative Works, if and
|
|
3312
|
+
wherever such third-party notices normally appear. The contents
|
|
3313
|
+
of the NOTICE file are for informational purposes only and
|
|
3314
|
+
do not modify the License. You may add Your own attribution
|
|
3315
|
+
notices within Derivative Works that You distribute, alongside
|
|
3316
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
3317
|
+
that such additional attribution notices cannot be construed
|
|
3318
|
+
as modifying the License.
|
|
3319
|
+
|
|
3320
|
+
You may add Your own copyright statement to Your modifications and
|
|
3321
|
+
may provide additional or different license terms and conditions
|
|
3322
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
3323
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
3324
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
3325
|
+
the conditions stated in this License.
|
|
3326
|
+
|
|
3327
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
3328
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
3329
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
3330
|
+
this License, without any additional terms or conditions.
|
|
3331
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
3332
|
+
the terms of any separate license agreement you may have executed
|
|
3333
|
+
with Licensor regarding such Contributions.
|
|
3334
|
+
|
|
3335
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
3336
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
3337
|
+
except as required for reasonable and customary use in describing the
|
|
3338
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
3339
|
+
|
|
3340
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
3341
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
3342
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
3343
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
3344
|
+
implied, including, without limitation, any warranties or conditions
|
|
3345
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
3346
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
3347
|
+
appropriateness of using or redistributing the Work and assume any
|
|
3348
|
+
risks associated with Your exercise of permissions under this License.
|
|
3349
|
+
|
|
3350
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
3351
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
3352
|
+
unless required by applicable law (such as deliberate and grossly
|
|
3353
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
3354
|
+
liable to You for damages, including any direct, indirect, special,
|
|
3355
|
+
incidental, or consequential damages of any character arising as a
|
|
3356
|
+
result of this License or out of the use or inability to use the
|
|
3357
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
3358
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
3359
|
+
other commercial damages or losses), even if such Contributor
|
|
3360
|
+
has been advised of the possibility of such damages.
|
|
3361
|
+
|
|
3362
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
3363
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
3364
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
3365
|
+
or other liability obligations and/or rights consistent with this
|
|
3366
|
+
License. However, in accepting such obligations, You may act only
|
|
3367
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
3368
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
3369
|
+
defend, and hold each Contributor harmless for any liability
|
|
3370
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
3371
|
+
of your accepting any such warranty or additional liability.
|
|
3372
|
+
|
|
3373
|
+
END OF TERMS AND CONDITIONS
|
|
3374
|
+
|
|
3375
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
3376
|
+
|
|
3377
|
+
To apply the Apache License to your work, attach the following
|
|
3378
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
3379
|
+
replaced with your own identifying information. (Don't include
|
|
3380
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
3381
|
+
comment syntax for the file format. We also recommend that a
|
|
3382
|
+
file or class name and description of purpose be included on the
|
|
3383
|
+
same "printed page" as the copyright notice for easier
|
|
3384
|
+
identification within third-party archives.
|
|
3385
|
+
|
|
3386
|
+
Copyright [yyyy] [name of copyright owner]
|
|
3387
|
+
|
|
3388
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
3389
|
+
you may not use this file except in compliance with the License.
|
|
3390
|
+
You may obtain a copy of the License at
|
|
3391
|
+
|
|
3392
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
3393
|
+
|
|
3394
|
+
Unless required by applicable law or agreed to in writing, software
|
|
3395
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
3396
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
3397
|
+
See the License for the specific language governing permissions and
|
|
3398
|
+
limitations under the License.`, "octicon": 'Octicons (MIT), by GitHub\nhttps://github.com/primer/octicons/\nLicence: https://github.com/primer/octicons/blob/main/LICENSE\n\nMIT License\n\nCopyright (c) 2026 GitHub Inc.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the "Software"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.', "simple-icons": "Simple Icons (CC0-1.0), by Simple Icons Collaborators\nhttps://github.com/simple-icons/simple-icons\nLicence: https://github.com/simple-icons/simple-icons/blob/develop/LICENSE.md" };
|
|
3399
|
+
|
|
3400
|
+
// src/core/icon-notices.ts
|
|
3401
|
+
var ICON_SET_NAME = /^[a-z0-9][a-z0-9-]{0,63}$/;
|
|
3402
|
+
function iconSetNotices(sets) {
|
|
3403
|
+
const more = [...new Set(sets)].filter((s) => s !== "lucide" && s !== "mdi" && ICON_SET_NAME.test(s)).sort();
|
|
3404
|
+
if (!more.length) return void 0;
|
|
3405
|
+
const lines = more.map((set) => ICON_SET_NOTICES[set] ?? `Iconify set "${set}": its licence is in @iconify-json/${set}/info.json`);
|
|
3406
|
+
return `Icons in the pages from other Iconify sets (@dogsbay/icons)
|
|
3407
|
+
|
|
3408
|
+
${lines.join("\n\n")}
|
|
3409
|
+
`;
|
|
3410
|
+
}
|
|
3411
|
+
|
|
3118
3412
|
// src/core/taxonomy.ts
|
|
3119
3413
|
import { parseMeta } from "@dogsbay/types";
|
|
3120
3414
|
function safeSegment(s) {
|
|
@@ -3258,6 +3552,7 @@ function buildRss(o) {
|
|
|
3258
3552
|
import { callable as callable2 } from "@dogsbay/minja/template";
|
|
3259
3553
|
|
|
3260
3554
|
// src/theme/docs-layout/tag-list-data.ts
|
|
3555
|
+
import { resolveTermLabel } from "@dogsbay/search/facets";
|
|
3261
3556
|
var AUTO_PALETTE = ["blue", "amber", "emerald", "violet", "rose", "slate"];
|
|
3262
3557
|
function autoTagColor(segment) {
|
|
3263
3558
|
let hash = 2166136261;
|
|
@@ -3272,17 +3567,6 @@ function filterTags(tags) {
|
|
|
3272
3567
|
(t) => typeof t === "string" && t.length > 0
|
|
3273
3568
|
);
|
|
3274
3569
|
}
|
|
3275
|
-
function resolveTermLabel(fullPath, prefixes, labels) {
|
|
3276
|
-
if (fullPath.length === 0) return "";
|
|
3277
|
-
const slug = fullPath.join("/");
|
|
3278
|
-
const override = labels?.[slug];
|
|
3279
|
-
if (override && override.length > 0) return override;
|
|
3280
|
-
if (fullPath.length === 1) {
|
|
3281
|
-
const prefixLabel = prefixes?.[fullPath[0]]?.label;
|
|
3282
|
-
if (prefixLabel && prefixLabel.length > 0) return prefixLabel;
|
|
3283
|
-
}
|
|
3284
|
-
return fullPath[fullPath.length - 1];
|
|
3285
|
-
}
|
|
3286
3570
|
function buildChips(tags, options) {
|
|
3287
3571
|
const safe4 = filterTags(tags);
|
|
3288
3572
|
const { indexPath, prefixes, labels, autoColor = false } = options;
|
|
@@ -3734,7 +4018,7 @@ async function build(input, hooks = {}) {
|
|
|
3734
4018
|
phase.init = now() - t0;
|
|
3735
4019
|
let pages = 0;
|
|
3736
4020
|
let assets = 0;
|
|
3737
|
-
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) };
|
|
4021
|
+
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, mathUnits: /* @__PURE__ */ new Set(), 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) };
|
|
3738
4022
|
for (const w of cfg.chrome.warnings) report("config", `[config] ${w}`);
|
|
3739
4023
|
state.logo = await emitLogo(cfg, input, emit, report);
|
|
3740
4024
|
for (const r of cfg.redirects) {
|
|
@@ -3752,6 +4036,17 @@ async function build(input, hooks = {}) {
|
|
|
3752
4036
|
stub: /\/\s*$/.test(r.from) ? `${from}/index.html` : void 0
|
|
3753
4037
|
});
|
|
3754
4038
|
}
|
|
4039
|
+
const stored = storedManifests(input.manifests, allUnits, units, report);
|
|
4040
|
+
input.manifests?.splice(0);
|
|
4041
|
+
const configRedirects = state.redirects.length;
|
|
4042
|
+
const unitRedirects = /* @__PURE__ */ new Map();
|
|
4043
|
+
for (const [prefix, m] of stored) {
|
|
4044
|
+
unitRedirects.set(prefix, m.redirectInputs);
|
|
4045
|
+
for (const [p, o] of m.pageOut) state.pageOut.set(p, o);
|
|
4046
|
+
state.sitemaps.set(prefix, m.sitemaps);
|
|
4047
|
+
if (m.homeForward !== void 0) state.homeForward.set(prefix, m.homeForward);
|
|
4048
|
+
}
|
|
4049
|
+
const unitRecords = /* @__PURE__ */ new Map();
|
|
3755
4050
|
let frontMatterOf = frontMatterCache(readText);
|
|
3756
4051
|
state.canonical = await defaultTables(cfg, allUnits, units, input.files, readText, (m) => report("canonical", m), frontMatterOf);
|
|
3757
4052
|
if (siteBase(cfg)) state.languages = await languageTables(cfg, allUnits, units, input.files, readText, frontMatterOf);
|
|
@@ -3761,6 +4056,7 @@ async function build(input, hooks = {}) {
|
|
|
3761
4056
|
hooks.context?.({ cfg, allUnits, input, highlighter, emit, warnings, problems, report, phase, theme, state, diagnostics: hooks.diagnostics, dataLines: hooks.dataLines });
|
|
3762
4057
|
for (const unit of units) {
|
|
3763
4058
|
classes = new Set(CLIENT_CANDIDATES);
|
|
4059
|
+
const before = { redirects: state.redirects.length, pageOut: state.pageOut.size, written: state.written.size };
|
|
3764
4060
|
const r = await buildUnit(unit, allUnits, cfg, input, highlighter, emit, report, phase, theme.templates, state, { keep: hooks.keep, lazy: hooks.lazy, diagnostics: hooks.diagnostics, dataLines: hooks.dataLines });
|
|
3765
4061
|
hooks.unitBuilt?.(unit, r, classes);
|
|
3766
4062
|
pages += r.pages;
|
|
@@ -3772,15 +4068,21 @@ async function build(input, hooks = {}) {
|
|
|
3772
4068
|
report("css", `[css] could not build the stylesheet for ${unit.prefix || "/"}: ${e.message}`, { unit: unit.prefix || "/" });
|
|
3773
4069
|
}
|
|
3774
4070
|
phase.css = (phase.css ?? 0) + now() - tCss;
|
|
4071
|
+
unitRedirects.set(unit.prefix, state.redirects.slice(before.redirects));
|
|
4072
|
+
unitRecords.set(unit.prefix, { pageOut: [...state.pageOut].slice(before.pageOut), files: [...state.written].slice(before.written), iconSets: input.icons?.sets?.() ?? [] });
|
|
3775
4073
|
}
|
|
4074
|
+
state.redirects = [...state.redirects.slice(0, configRedirects), ...allUnits.flatMap((u) => unitRedirects.get(u.prefix) ?? [])];
|
|
4075
|
+
await emit(`_dogsbay/assets/${CLIENT_FILE}`, CLIENT_JS);
|
|
3776
4076
|
await emit("_dogsbay/assets/dogsbay.js", CLIENT_JS);
|
|
3777
|
-
|
|
4077
|
+
const storedUnits = [...stored.values()];
|
|
4078
|
+
const anyMath = state.usedMath || storedUnits.some((m) => m.math);
|
|
4079
|
+
if (anyMath) {
|
|
3778
4080
|
const { KATEX_CSS, KATEX_FONTS } = await import("./chunks/katex-assets-7BGR6WCR.mjs");
|
|
3779
4081
|
await emit("_dogsbay/assets/katex/katex.min.css", KATEX_CSS);
|
|
3780
4082
|
for (const [f, b64] of Object.entries(KATEX_FONTS)) await emit(`_dogsbay/assets/katex/fonts/${f}`, base64Bytes(b64));
|
|
3781
4083
|
}
|
|
3782
|
-
const iconNotices = input.icons?.
|
|
3783
|
-
await emit("_dogsbay/assets/THIRD-PARTY-NOTICES.txt", [SITE_NOTICES,
|
|
4084
|
+
const iconNotices = iconSetNotices([...input.icons?.sets?.() ?? [], ...storedUnits.flatMap((m) => m.iconSets ?? [])]);
|
|
4085
|
+
await emit("_dogsbay/assets/THIRD-PARTY-NOTICES.txt", [SITE_NOTICES, anyMath && KATEX_NOTICE, iconNotices].filter(Boolean).join("\n"));
|
|
3784
4086
|
await emit("_dogsbay/assets/favicon.svg", `${FAVICON_SVG}
|
|
3785
4087
|
`);
|
|
3786
4088
|
await emit(
|
|
@@ -3812,11 +4114,14 @@ async function build(input, hooks = {}) {
|
|
|
3812
4114
|
if (!input.untrusted) state.hostFiles.set(n, c);
|
|
3813
4115
|
else if (fromStatic !== void 0) report("untrusted", `[untrusted] ${cfg.staticDir}/${n} is not used: an untrusted build takes no host configuration`);
|
|
3814
4116
|
}
|
|
4117
|
+
if (rootUnit && !units.includes(rootUnit)) {
|
|
4118
|
+
for (const n of SITE_FILES) if (input.files.has(sourceRoot(rootUnit.source) + n)) state.supplied.add(n);
|
|
4119
|
+
}
|
|
3815
4120
|
if (state.staticFiles?.has("robots.txt")) {
|
|
3816
4121
|
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})`);
|
|
3817
4122
|
state.supplied.add("robots.txt");
|
|
3818
4123
|
}
|
|
3819
|
-
await emitSiteFiles(cfg, allUnits, units, def, state, emit, report, input.onRedirects);
|
|
4124
|
+
const rules = await emitSiteFiles(cfg, allUnits, units, stored, def, state, emit, report, input.onRedirects);
|
|
3820
4125
|
phase.site = (phase.site ?? 0) + now() - tSite;
|
|
3821
4126
|
const homeOf = (fromDir, unitPrefix, fallback) => {
|
|
3822
4127
|
const page = state.homeForward.get(unitPrefix);
|
|
@@ -3834,8 +4139,30 @@ async function build(input, hooks = {}) {
|
|
|
3834
4139
|
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));
|
|
3835
4140
|
}
|
|
3836
4141
|
}
|
|
3837
|
-
if (state.staticFiles && (units.length === allUnits.length || rootUnit && units.includes(rootUnit))) await emitStatic(cfg, state, allUnits, input.untrusted === true, emit, report);
|
|
3838
|
-
state.stubs = await writeTranslationStubs(cfg, allUnits, units, translations, state, emit);
|
|
4142
|
+
if (state.staticFiles && (units.length === allUnits.length || units.length === 0 || rootUnit && units.includes(rootUnit))) await emitStatic(cfg, state, allUnits, input.untrusted === true, emit, report);
|
|
4143
|
+
state.stubs = await writeTranslationStubs(cfg, allUnits, units, translations, state, emit, void 0, new Set(stored.keys()));
|
|
4144
|
+
if (allUnits.length > 1 && !hooks.lazy && !hooks.keep) {
|
|
4145
|
+
for (const u of units) {
|
|
4146
|
+
const rec = unitRecords.get(u.prefix);
|
|
4147
|
+
const own = rules.filter((r) => unitOfPath(allUnits, r.from) === u);
|
|
4148
|
+
const ssg = {
|
|
4149
|
+
prefix: u.prefix,
|
|
4150
|
+
redirectInputs: unitRedirects.get(u.prefix) ?? [],
|
|
4151
|
+
pageOut: rec.pageOut,
|
|
4152
|
+
sitemaps: state.sitemaps.get(u.prefix) ?? [],
|
|
4153
|
+
...state.homeForward.has(u.prefix) ? { homeForward: state.homeForward.get(u.prefix) } : {},
|
|
4154
|
+
// Its redirect stubs and missing-translation stubs are written after the units, in its folder.
|
|
4155
|
+
files: [.../* @__PURE__ */ new Set([...rec.files, ...own.map(stubFile), ...state.stubs.filter((f) => unitOfPath(allUnits, f) === u)])],
|
|
4156
|
+
client: CLIENT_FILE,
|
|
4157
|
+
builder: SSG_VERSION,
|
|
4158
|
+
...state.mathUnits.has(u.prefix) ? { math: true } : {},
|
|
4159
|
+
...rec.iconSets.length ? { iconSets: rec.iconSets } : {}
|
|
4160
|
+
};
|
|
4161
|
+
const served = own.map((r) => siteRedirect(r, cfg)).map((r) => [r.from, r.to, r.status]);
|
|
4162
|
+
await emit(manifestPath(u), `${JSON.stringify(makeManifest(u, ssg, served))}
|
|
4163
|
+
`);
|
|
4164
|
+
}
|
|
4165
|
+
}
|
|
3839
4166
|
const spent = state.templateBudget.problem();
|
|
3840
4167
|
if (spent) report("template", spent);
|
|
3841
4168
|
return {
|
|
@@ -3938,7 +4265,7 @@ async function emitStatic(cfg, state, units, untrusted, emit, report) {
|
|
|
3938
4265
|
const label = `content.static (${cfg.staticDir})`;
|
|
3939
4266
|
const lower = /* @__PURE__ */ new Map();
|
|
3940
4267
|
const dirs = /* @__PURE__ */ new Map();
|
|
3941
|
-
for (const w of state.written) {
|
|
4268
|
+
for (const w of /* @__PURE__ */ new Set([...state.written, ...state.pageOut.values()])) {
|
|
3942
4269
|
lower.set(w.toLowerCase(), w);
|
|
3943
4270
|
for (let i = w.indexOf("/"); i > 0; i = w.indexOf("/", i + 1)) dirs.set(w.slice(0, i).toLowerCase(), w);
|
|
3944
4271
|
}
|
|
@@ -3982,7 +4309,7 @@ async function emitStatic(cfg, state, units, untrusted, emit, report) {
|
|
|
3982
4309
|
if (plan.robots) for (const w of staticRobotsWarnings(await readText(files.get("robots.txt")), label)) report("static", `[static] ${w}`);
|
|
3983
4310
|
for (const p of plan.copy) await emit(p, files.get(p));
|
|
3984
4311
|
}
|
|
3985
|
-
async function emitSiteFiles(cfg, all, built, def, state, emit, report, onRedirects) {
|
|
4312
|
+
async function emitSiteFiles(cfg, all, built, stored, def, state, emit, report, onRedirects) {
|
|
3986
4313
|
const defPrefix = def?.prefix ?? "";
|
|
3987
4314
|
const put = async (p, content) => {
|
|
3988
4315
|
if (state.supplied.has(p)) {
|
|
@@ -4005,18 +4332,71 @@ async function emitSiteFiles(cfg, all, built, def, state, emit, report, onRedire
|
|
|
4005
4332
|
} else if (cfg.url) {
|
|
4006
4333
|
report("config", `[site] site.url "${cfg.url}" has no http:// or https://, so canonical links, the sitemap and absolute llms.txt links are left out`);
|
|
4007
4334
|
}
|
|
4008
|
-
if (!state.redirects.length)
|
|
4335
|
+
if (!state.redirects.length) {
|
|
4336
|
+
await merged("_redirects", void 0, mergeRedirects);
|
|
4337
|
+
return [];
|
|
4338
|
+
}
|
|
4339
|
+
const unitOf2 = (p) => unitOfPath(all, p);
|
|
4009
4340
|
const known = (p) => {
|
|
4010
|
-
const u =
|
|
4011
|
-
return !!u && built.includes(u);
|
|
4341
|
+
const u = unitOf2(p);
|
|
4342
|
+
return !!u && (built.includes(u) || stored.has(u.prefix));
|
|
4012
4343
|
};
|
|
4013
4344
|
const inputs = state.redirects.filter((r) => known(r.from));
|
|
4014
4345
|
const { rules, warnings: w } = collectRedirects(inputs, (p) => state.pageOut.get(p), known);
|
|
4346
|
+
const builtFrom = (r) => built.includes(unitOf2(r.from));
|
|
4015
4347
|
for (const m of w) report("redirects", `[redirects] ${m}`);
|
|
4016
|
-
onRedirects?.(rules);
|
|
4017
|
-
|
|
4348
|
+
onRedirects?.(rules.filter(builtFrom));
|
|
4349
|
+
const servedBefore = (r) => stored.get(unitOf2(r.from).prefix)?.redirects.get(siteRedirect(r, cfg).from);
|
|
4350
|
+
for (const r of rules) if (builtFrom(r) || servedBefore(r) !== siteRedirect(r, cfg).to) await emit(stubFile(r), renderRedirectPage(r, cfg));
|
|
4018
4351
|
const ownRedirects = state.hostFiles.has("_redirects");
|
|
4019
4352
|
await merged("_redirects", (cloudflare || ownRedirects) && rules.length ? renderRedirectsFile(rules, cfg) : void 0, mergeRedirects);
|
|
4353
|
+
return rules;
|
|
4354
|
+
}
|
|
4355
|
+
var siteRedirect = (r, cfg) => servedRedirect(r, { ...cfg, basePath: "" });
|
|
4356
|
+
function storedManifests(given, all, built, report) {
|
|
4357
|
+
const out = /* @__PURE__ */ new Map();
|
|
4358
|
+
if (!given) return out;
|
|
4359
|
+
for (const { path, text } of given) {
|
|
4360
|
+
const { manifest: m, problem } = parseManifest(text);
|
|
4361
|
+
if (!m) {
|
|
4362
|
+
report("units", `[units] ${path}: ${problem}; ignored`);
|
|
4363
|
+
continue;
|
|
4364
|
+
}
|
|
4365
|
+
const key = unitKey({ product: m.product ?? void 0, locale: m.locale ?? void 0, version: m.version ?? void 0 });
|
|
4366
|
+
const u = all.find((x) => unitKey(x) === key);
|
|
4367
|
+
if (!u) {
|
|
4368
|
+
report("units", `[units] ${path} is for ${key}, which the config no longer builds; ignored (remove its folder, ${m.ssg.prefix || "the site root"}, and the manifest)`);
|
|
4369
|
+
continue;
|
|
4370
|
+
}
|
|
4371
|
+
if (path !== manifestPath(u)) {
|
|
4372
|
+
report("units", `[units] ${path} is for ${key}, whose manifest is ${manifestPath(u)}; ignored`);
|
|
4373
|
+
continue;
|
|
4374
|
+
}
|
|
4375
|
+
if (u.prefix !== m.ssg.prefix) {
|
|
4376
|
+
report("units", `[units] ${path}: ${key} was built at ${m.ssg.prefix || "the site root"} and is now at ${u.prefix || "the site root"}; ignored until it is built again`);
|
|
4377
|
+
continue;
|
|
4378
|
+
}
|
|
4379
|
+
if (built.includes(u)) continue;
|
|
4380
|
+
const clean = (x) => !/[\s\u0000-\u001f\u007f]/.test(x) && !x.split("/").some((p) => p === ".." || p === ".");
|
|
4381
|
+
const mine = (p) => clean(p) && unitOfPath(all, p) === u;
|
|
4382
|
+
const redirectInputs = m.ssg.redirectInputs.filter((r) => mine(r.from) && (r.stub === void 0 || mine(r.stub)) && clean(r.to) && (r.suffix === void 0 || clean(r.suffix)));
|
|
4383
|
+
const pageOut = m.ssg.pageOut.filter(([p, o]) => mine(p) && mine(o));
|
|
4384
|
+
const sitemaps = m.ssg.sitemaps.filter(mine);
|
|
4385
|
+
const dropped = m.ssg.redirectInputs.length - redirectInputs.length + m.ssg.pageOut.length - pageOut.length + m.ssg.sitemaps.length - sitemaps.length;
|
|
4386
|
+
if (dropped) report("units", `[units] ${path}: ${dropped} entr${dropped === 1 ? "y" : "ies"} outside ${u.prefix || "the root unit"} left out`);
|
|
4387
|
+
out.set(u.prefix, {
|
|
4388
|
+
redirectInputs,
|
|
4389
|
+
pageOut,
|
|
4390
|
+
sitemaps,
|
|
4391
|
+
homeForward: m.ssg.homeForward !== void 0 && mine(m.ssg.homeForward) ? m.ssg.homeForward : void 0,
|
|
4392
|
+
math: m.ssg.math,
|
|
4393
|
+
iconSets: m.ssg.iconSets,
|
|
4394
|
+
redirects: new Map(m.redirects.map(([f, t]) => [f, t]))
|
|
4395
|
+
});
|
|
4396
|
+
}
|
|
4397
|
+
const missing = all.filter((u) => !built.includes(u) && !out.has(u.prefix));
|
|
4398
|
+
if (missing.length) report("units", `[units] no manifest for ${missing.map((u) => u.prefix || "the root unit").join(", ")}: not built yet, so the site-wide files leave out their redirects`);
|
|
4399
|
+
return out;
|
|
4020
4400
|
}
|
|
4021
4401
|
function defaultUnit(units, cfg) {
|
|
4022
4402
|
if (cfg.products) {
|
|
@@ -4336,6 +4716,10 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, read2),
|
|
|
4336
4716
|
blog?.add(slug, infos.get(slug).title, fm);
|
|
4337
4717
|
if (mode.keep || mode.lazy) frontMatter.set(p, memo2 ? memo2.fmKey ??= fmKey(await source()) : fmKey(await source()));
|
|
4338
4718
|
} else if (!SKIP_FILES.has(memberRel(p)) && copiedPath(p)) {
|
|
4719
|
+
if (p.split("/").some((seg) => seg.toLowerCase() === "_dogsbay")) {
|
|
4720
|
+
warn("site", `${p} is inside a folder named _dogsbay, the build's own; not copied`, { file: abs(p) });
|
|
4721
|
+
continue;
|
|
4722
|
+
}
|
|
4339
4723
|
const verdict = await assetVerdict(p, c, input.untrusted === true, sanitizing);
|
|
4340
4724
|
if (verdict === "untrusted") untrustedFiles.push(p);
|
|
4341
4725
|
else if (verdict === "active") activeFiles.push(p);
|
|
@@ -4863,7 +5247,10 @@ ${marker}${title}${marker}`, path, attributesOf(path), includesFor(path, read2),
|
|
|
4863
5247
|
for (const u of ctx.unsafeUrls ?? []) warnPage(info, "unsafe-url", `refused the unsafe URL "${u}"`);
|
|
4864
5248
|
for (const m of removed) warnPage(info, "html", m);
|
|
4865
5249
|
for (const name of ctx.missingIcons ?? []) warnPage(info, "icon", `unknown icon "${name}"${input.icons ? "" : " (only the built-in icons are available in this build)"}`);
|
|
4866
|
-
if (ctx.usedMath)
|
|
5250
|
+
if (ctx.usedMath) {
|
|
5251
|
+
state.usedMath = true;
|
|
5252
|
+
state.mathUnits.add(unit.prefix);
|
|
5253
|
+
}
|
|
4867
5254
|
for (const b of resolver.broken) brokenCounts.has(b) ? brokenCounts.set(b, brokenCounts.get(b) + 1) : brokenCounts.set(detach(b), 1);
|
|
4868
5255
|
phase.render = (phase.render ?? 0) + now() - t;
|
|
4869
5256
|
t = now();
|
|
@@ -5580,7 +5967,7 @@ function versionBanner(unit, all, cfg, out, siteRoot, t) {
|
|
|
5580
5967
|
if (!latest) return void 0;
|
|
5581
5968
|
return esc3(t("oldVersion")) + link(latest);
|
|
5582
5969
|
}
|
|
5583
|
-
async function writeTranslationStubs(cfg, all, built, tables, state, emit, exists = () => false) {
|
|
5970
|
+
async function writeTranslationStubs(cfg, all, built, tables, state, emit, exists = () => false, stored = /* @__PURE__ */ new Set()) {
|
|
5584
5971
|
const def = cfg.defaultLocale;
|
|
5585
5972
|
if (!def || !tables.size) return [];
|
|
5586
5973
|
const unitOf2 = (locale, version) => all.find((u) => u.locale === locale && u.version === version && !u.product);
|
|
@@ -5599,10 +5986,11 @@ async function writeTranslationStubs(cfg, all, built, tables, state, emit, exist
|
|
|
5599
5986
|
const home = unitOf2(def, m.version);
|
|
5600
5987
|
const out = tables.get(home.prefix).pages.get(m.page);
|
|
5601
5988
|
const target = unitOf2(m.locale, m.version);
|
|
5602
|
-
if (!built.includes(target ?? home)) continue;
|
|
5603
|
-
const to = join(home.prefix, out);
|
|
5604
|
-
if (built.includes(home) && !pageFiles.has(to)) continue;
|
|
5605
5989
|
const file = join(target ? target.prefix : m.locale + home.prefix.slice(def.length), out);
|
|
5990
|
+
const folder = target ? void 0 : unitOfPath(all, file);
|
|
5991
|
+
if (!built.includes(target ?? home) && !(folder && built.includes(folder) && stored.has(home.prefix))) continue;
|
|
5992
|
+
const to = join(home.prefix, out);
|
|
5993
|
+
if ((built.includes(home) || stored.has(home.prefix)) && !pageFiles.has(to)) continue;
|
|
5606
5994
|
if (state.written.has(file) || pageFiles.has(file) || exists(file)) continue;
|
|
5607
5995
|
await emit(file, redirectPage(hrefBetween(file, to, cfg.linkStyle), cfg.name));
|
|
5608
5996
|
written.push(file);
|
|
@@ -6205,8 +6593,8 @@ function peleRenderer() {
|
|
|
6205
6593
|
// src/package/prebuilt.ts
|
|
6206
6594
|
import { minifyCss } from "@dogsbay/render-html/css-tools";
|
|
6207
6595
|
var SHEETS = {
|
|
6208
|
-
default: () => import("./chunks/prebuilt-css-default-
|
|
6209
|
-
mintlify: () => import("./chunks/prebuilt-css-mintlify-
|
|
6596
|
+
default: () => import("./chunks/prebuilt-css-default-FYH7N4SF.mjs"),
|
|
6597
|
+
mintlify: () => import("./chunks/prebuilt-css-mintlify-KCT32TZ6.mjs")
|
|
6210
6598
|
};
|
|
6211
6599
|
var prebuiltSiteCss = async (o) => {
|
|
6212
6600
|
const base = (await (SHEETS[o.theme] ?? SHEETS.default)()).CSS;
|