@stacksjs/bunpress 0.2.18 → 0.2.19

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/bin/cli.js CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env bun
2
2
  // @bun
3
- import{u as a,v as b,w as c}from"../chunk-w25thc3e.js";import"../chunk-wdrb5swv.js";import"../chunk-pmf08yky.js";import"../chunk-4zrjjjjh.js";export{b as resolveConfig,a as findMarkdownFiles,c as buildDocs};
3
+ import{u as a,v as b,w as c}from"../chunk-7cdk9y78.js";import"../chunk-rcr6k1et.js";import"../chunk-3ymfys00.js";import"../chunk-rnzqf7rp.js";export{b as resolveConfig,a as findMarkdownFiles,c as buildDocs};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{da as m,ga as D}from"./chunk-4zrjjjjh.js";import{loadConfig as u}from"bunfig";var h={docsDir:"./docs",outDir:"./dist",theme:"vitepress",nav:[{text:"Guide",link:"/install"},{text:"API",link:"/advanced#api-reference"},{text:"Examples",link:"/examples"}],plugins:[],markdown:{title:"BunPress Documentation",meta:{description:"Documentation built with BunPress",generator:"BunPress",viewport:"width=device-width, initial-scale=1.0"},sidebar:{"/":[{text:"Getting Started",items:[{text:"Introduction",link:"/"},{text:"Installation",link:"/install"},{text:"Quick Start",link:"/quick-start"},{text:"Usage",link:"/usage"},{text:"Configuration",link:"/config"}]},{text:"Core Features",items:[{text:"Features Overview",link:"/features"},{text:"Markdown Extensions",link:"/markdown-extensions"},{text:"Syntax Highlighting",link:"/syntax-highlighting"},{text:"Table of Contents",link:"/table-of-contents"},{text:"CLI Commands",link:"/cli"}]},{text:"SEO & Analytics",items:[{text:"SEO Features",link:"/seo"},{text:"Analytics (Fathom)",link:"/config#fathom-analytics-configuration"}]},{text:"Advanced",items:[{text:"Advanced Usage",link:"/advanced"},{text:"Examples",link:"/examples"},{text:"Best Practices",link:"/best-practices"}]},{text:"More",items:[{text:"Showcase",link:"/showcase"},{text:"Partners",link:"/partners"},{text:"License",link:"/license"},{text:"Postcardware",link:"/postcardware"}]}]},css:`
2
+ import{fa as o,ia as C}from"./chunk-rnzqf7rp.js";import{loadConfig as n}from"bunfig";var t={docsDir:"./docs",outDir:"./dist",theme:"vitepress",nav:[{text:"Guide",link:"/install"},{text:"API",link:"/advanced#api-reference"},{text:"Examples",link:"/examples"}],plugins:[],markdown:{title:"BunPress Documentation",meta:{description:"Documentation built with BunPress",generator:"BunPress",viewport:"width=device-width, initial-scale=1.0"},sidebar:{"/":[{text:"Getting Started",items:[{text:"Introduction",link:"/"},{text:"Installation",link:"/install"},{text:"Quick Start",link:"/quick-start"},{text:"Usage",link:"/usage"},{text:"Configuration",link:"/config"}]},{text:"Core Features",items:[{text:"Features Overview",link:"/features"},{text:"Markdown Extensions",link:"/markdown-extensions"},{text:"Syntax Highlighting",link:"/syntax-highlighting"},{text:"Table of Contents",link:"/table-of-contents"},{text:"CLI Commands",link:"/cli"}]},{text:"SEO & Analytics",items:[{text:"SEO Features",link:"/seo"},{text:"Analytics (Fathom)",link:"/config#fathom-analytics-configuration"}]},{text:"Advanced",items:[{text:"Advanced Usage",link:"/advanced"},{text:"Examples",link:"/examples"},{text:"Best Practices",link:"/best-practices"}]},{text:"More",items:[{text:"Showcase",link:"/showcase"},{text:"Partners",link:"/partners"},{text:"License",link:"/license"},{text:"Postcardware",link:"/postcardware"}]}]},css:`
3
3
  /* Additional BunPress customizations */
4
4
  /* Note: Base styles are provided by the VitePress theme */
5
5
 
@@ -1236,19 +1236,272 @@ if (typeof document !== 'undefined') {
1236
1236
  }
1237
1237
  });
1238
1238
  }
1239
- `],preserveDirectoryStructure:!0,features:{inlineFormatting:!0,containers:!0,githubAlerts:!0,codeBlocks:{lineHighlighting:!0,lineNumbers:!0,focus:!0,diffs:!0,errorWarningMarkers:!0},codeGroups:!0,codeImports:!0,inlineToc:!0,customAnchors:!0,emoji:!0,badges:!0,includes:!0,externalLinks:{autoTarget:!0,autoRel:!0,showIcon:!0},imageLazyLoading:!0,tables:{alignment:!0,enhancedStyling:!0,responsive:!0}},syntaxHighlightTheme:"github-light"},search:{enabled:!0,maxResults:12,keyboardShortcuts:!0},themeConfig:{socialLinks:[{icon:"github",link:"https://github.com/stacksjs/bunpress"}]},verbose:!1,sitemap:{enabled:!0,filename:"sitemap.xml",defaultPriority:0.5,defaultChangefreq:"monthly",maxUrlsPerFile:50000,useSitemapIndex:!1},robots:{enabled:!0,filename:"robots.txt"}};function g(Q){let V=Q.plugins;if(!Array.isArray(V)||V.length===0)return Q;let W=Q;for(let X of V){if(!X||typeof X!=="object")continue;let Z=X.name||"unnamed plugin";try{if(typeof X.extendConfig==="function")W=X.extendConfig(W)??W}catch($){console.error(`[bunpress] ${Z}: extendConfig failed \u2014`,$)}try{if(typeof X.validateConfig==="function"){let $=X.validateConfig(W);for(let j of $?.warnings??[])console.warn(`[bunpress] ${Z}: ${j}`);for(let j of $?.errors??[])console.error(`[bunpress] ${Z}: ${j}`)}}catch($){console.error(`[bunpress] ${Z}: validateConfig failed \u2014`,$)}}for(let X of V)try{X?.onConfigLoad?.(W)}catch(Z){console.error(`[bunpress] ${X?.name||"unnamed plugin"}: onConfigLoad failed \u2014`,Z)}return W}async function d(){let Q=["bunpress.config.ts","bunpress.config.js",".config/bunpress.ts","docs.config.ts",".config/docs.ts"],V=[];for(let W of Q)if(await Bun.file(W).exists())V.push(W);if(V.length>1){let[W,...X]=V;console.warn(`[bunpress] Multiple config files found. Using ${W}; ignoring ${X.join(", ")}.`)}await c(V.length>0)}async function c(Q){let V=["docs","documentation","site"],W=["bunpress.config.ts","bunpress.config.js","docs.config.ts"];for(let X of V)for(let Z of W){let $=`${X}/${Z}`;if(!await Bun.file($).exists())continue;let j=Q?`merge it into the config at the project root, or pass --config ${$}`:`move it to ./${Z}, or pass --config ${$}`;console.warn(`[bunpress] ${$} is never loaded: config is discovered from the working directory, not the docs directory. To use it, ${j}.`);return}}await d();var l=g(await u({name:"bunpress",alias:"docs",defaultConfig:h}));async function KQ(){return l}function U(){let Q=null;return(V)=>{let W=V.match(/^\s{0,3}(`{3,}|~{3,})(.*)$/);if(!W)return Q!==null;let X=W[1];if(Q===null)return Q=X,!0;let Z=X[0]===Q[0],$=X.length>=Q.length;if(Z&&$&&W[2].trim()==="")Q=null;return!0}}function P(Q){let V=U();return Q.split(`
1240
- `).filter((W)=>!V(W)).join(`
1241
- `)}function L(Q){return`\x00BPCODE${Q}\x00`}var s=/\u0000BPCODE(\d+)\u0000/g;function i(Q){let V=[],W=U(),X=[],Z=null,$=()=>{if(!Z)return;V.push(Z.join(`
1242
- `)),X.push(L(V.length-1)),Z=null};for(let j of Q.split(`
1243
- `)){if(W(j)){Z??=[],Z.push(j);continue}$(),X.push(j.replace(/(`+)(?:(?!\1)[\s\S])*\1/g,(J)=>{return V.push(J),L(V.length-1)}))}return $(),{masked:X.join(`
1244
- `),restore:(j)=>j.replace(s,(J,G)=>V[Number(G)]??J)}}async function zQ(Q,V){let{masked:W,restore:X}=i(Q);return X(await V(W))}var a={enabled:!0,position:["sidebar"],title:"Table of Contents",maxDepth:6,minDepth:2,className:"table-of-contents",smoothScroll:!0,activeHighlight:!0,collapsible:!0,exclude:[]};function y(Q){return Q.replace(/\s*<!-- toc-ignore -->\s*/g,"").replace(/!\[[^\]]*\]\([^)]*\)/g,"").replace(/\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/`([^`]+)`/g,"$1").replace(/\*\*(.+?)\*\*/g,"$1").replace(/__(.+?)__/g,"$1").replace(/\*(.+?)\*/g,"$1").replace(/_(.+?)_/g,"$1").replace(/~~(.+?)~~/g,"$1").replace(/<[^>]*>/g,"").trim()}function b(Q){return Q.toLowerCase().trim().replace(/<[^>]*>/g,"").replace(/what's new\?\s*\(v2\.0\)/g,"whats-new-v2-0").replace(/features\s*&\s*benefits/g,"features-benefits").replace(/vue\.js\s*\+\s*typescript\s*=\s*\u2764\uFE0F/g,"vue-js-typescript").replace(/\//g,"-").replace(/\./g,"-").replace(/[^\w\s-]/g,"").replace(/[\s_]+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,"")}function A(Q,V){let W=Q,X=1;while(V.has(Q))Q=`${W}-${X}`,X++;return V.add(Q),Q}function w(Q,V){return A(b(Q),V)}function o(Q){let V=[],W=new Set,X=/^(#{1,6})\s+(.+)$/gm,Z;while((Z=X.exec(Q))!==null){let $=Z[1].length,j=Z[2].trim();if(!j)continue;if(j.includes("toc-ignore"))continue;let J=j.replace(/\s*<!-- toc-ignore -->\s*/g,"").trim();J=J.replace(/`([^`]+)`/g,"<code>$1</code>");let G=J.includes("<code>"),z=w(y(j),W);V.push({level:$,text:J,id:z,children:[],hasCode:G})}return V}function r(Q){let V=[],W=[];for(let X of Q){while(W.length>0&&W[W.length-1].level>=X.level)W.pop();if(W.length===0)V.push(X);else W[W.length-1].children.push(X);W.push(X)}return V}function n(Q,V){let{minDepth:W=2,maxDepth:X=6,exclude:Z=[]}=V,$=(j)=>{let J=[];for(let G of j){if(Z.some((K)=>{if(K.startsWith("/")&&K.endsWith("/"))return new RegExp(K.slice(1,-1)).test(G.text);else return G.text===K}))continue;if(G.level>X)continue;let z=$(G.children);if(G.level>=W&&G.level<=X)J.push({...G,children:z});else J.push(...z)}return J};return $(Q)}function E(Q){let{items:V,title:W,config:X}=Q,{className:Z,collapsible:$}=X,j=(J,G=0)=>{if(J.length===0)return"";let z=G===0?"toc-list":"toc-sublist",K=G===0?"toc-item":"toc-subitem";return`<ul class="${z}">
1245
- ${J.map((q)=>{let B=q.children.length>0,Y=B&&$?"toc-expand":"",R=B?j(q.children,G+1):"",H=50,I=q.text.length>50?`${q.text.substring(0,50)}...`:q.text,N=q.text.length>50?"toc-truncate":"";return`<li class="${q.hasCode?"toc-code":""} ${Y} ${K} ${N}">
1246
- <a href="#${q.id}" class="toc-link" title="${q.text.replace(/<[^>]*>/g,"")}">${I}</a>
1247
- ${R}
1239
+ `],preserveDirectoryStructure:!0,features:{inlineFormatting:!0,containers:!0,githubAlerts:!0,codeBlocks:{lineHighlighting:!0,lineNumbers:!0,focus:!0,diffs:!0,errorWarningMarkers:!0},codeGroups:!0,codeImports:!0,inlineToc:!0,customAnchors:!0,emoji:!0,badges:!0,includes:!0,externalLinks:{autoTarget:!0,autoRel:!0,showIcon:!0},imageLazyLoading:!0,tables:{alignment:!0,enhancedStyling:!0,responsive:!0}},syntaxHighlightTheme:"github-light"},search:{enabled:!0,maxResults:12,keyboardShortcuts:!0},themeConfig:{socialLinks:[{icon:"github",link:"https://github.com/stacksjs/bunpress"}]},verbose:!1,sitemap:{enabled:!0,filename:"sitemap.xml",defaultPriority:0.5,defaultChangefreq:"monthly",maxUrlsPerFile:50000,useSitemapIndex:!1},robots:{enabled:!0,filename:"robots.txt"}};function e($){let Q=$.plugins;if(!Array.isArray(Q)||Q.length===0)return $;let Z=$;for(let J of Q){if(!J||typeof J!=="object")continue;let V=J.name||"unnamed plugin";try{if(typeof J.extendConfig==="function")Z=J.extendConfig(Z)??Z}catch(W){console.error(`[bunpress] ${V}: extendConfig failed \u2014`,W)}try{if(typeof J.validateConfig==="function"){let W=J.validateConfig(Z);for(let X of W?.warnings??[])console.warn(`[bunpress] ${V}: ${X}`);for(let X of W?.errors??[])console.error(`[bunpress] ${V}: ${X}`)}}catch(W){console.error(`[bunpress] ${V}: validateConfig failed \u2014`,W)}}for(let J of Q)try{J?.onConfigLoad?.(Z)}catch(V){console.error(`[bunpress] ${J?.name||"unnamed plugin"}: onConfigLoad failed \u2014`,V)}return Z}async function QQ(){let $=["bunpress.config.ts","bunpress.config.js",".config/bunpress.ts","docs.config.ts",".config/docs.ts"],Q=[];for(let Z of $)if(await Bun.file(Z).exists())Q.push(Z);if(Q.length>1){let[Z,...J]=Q;console.warn(`[bunpress] Multiple config files found. Using ${Z}; ignoring ${J.join(", ")}.`)}await ZQ(Q.length>0)}async function ZQ($){let Q=["docs","documentation","site"],Z=["bunpress.config.ts","bunpress.config.js","docs.config.ts"];for(let J of Q)for(let V of Z){let W=`${J}/${V}`;if(!await Bun.file(W).exists())continue;let X=$?`merge it into the config at the project root, or pass --config ${W}`:`move it to ./${V}, or pass --config ${W}`;console.warn(`[bunpress] ${W} is never loaded: config is discovered from the working directory, not the docs directory. To use it, ${X}.`);return}}await QQ();var $Q=e(await n({name:"bunpress",alias:"docs",defaultConfig:t}));async function TQ(){return $Q}function D(){let $=null;return(Q)=>{let Z=Q.match(/^\s{0,3}(`{3,}|~{3,})(.*)$/);if(!Z)return $!==null;let J=Z[1];if($===null)return $=J,!0;let V=J[0]===$[0],W=J.length>=$.length;if(V&&W&&Z[2].trim()==="")$=null;return!0}}function T($){let Q=D();return $.split(`
1240
+ `).filter((Z)=>!Q(Z)).join(`
1241
+ `)}function S($){return`\x00BPCODE${$}\x00`}var JQ=/\u0000BPCODE(\d+)\u0000/g;function VQ($){let Q=[],Z=D(),J=[],V=null,W=()=>{if(!V)return;Q.push(V.join(`
1242
+ `)),J.push(S(Q.length-1)),V=null};for(let X of $.split(`
1243
+ `)){if(Z(X)){V??=[],V.push(X);continue}W(),J.push(X.replace(/(`+)(?:(?!\1)[\s\S])*\1/g,(j)=>{return Q.push(j),S(Q.length-1)}))}return W(),{masked:J.join(`
1244
+ `),restore:(X)=>X.replace(JQ,(j,Y)=>Q[Number(Y)]??j)}}async function kQ($,Q){let{masked:Z,restore:J}=VQ($);return J(await Q(Z))}var WQ=["email","sms"];function XQ($){return WQ.includes($.toLowerCase())}function F($){return $.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}var m=/\{\{\s*([\w.-]+)\s*\}\}|\{([\w.-]+)\}/g;function R($){return F($).replace(/`([^`]+)`/g,"<code>$1</code>").replace(/\*\*([^*]+)\*\*/g,"<strong>$1</strong>").replace(/(^|[^*\w])\*([^*\s][^*]*)\*(?!\w)/g,"$1<em>$2</em>").replace(m,(Q)=>`<span class="bp-message-var">${Q}</span>`)}var YQ=/\[([^\]]+)\]\(([^)\s]+)\)|(https?:\/\/[^\s<>()]+[^\s<>().,;:!?'"])/g;function M($){let Q="",Z=0;for(let J of $.matchAll(YQ)){Q+=R($.slice(Z,J.index));let V=J[2]??J[3],W=J[1]??J[3];Q+=`<a href="${F(V)}" target="_blank" rel="noopener noreferrer">${R(W)}</a>`,Z=J.index+J[0].length}return Q+R($.slice(Z))}var x=/^([A-Za-z][\w-]*):\s*(.*)$/,H=/^\s*-{3,}\s*$/;function A($,Q){let Z=$.replace(/\r\n?/g,`
1245
+ `).replace(/^\n+|\n+$/g,"").split(`
1246
+ `),J=[],V=0,W=Z.findIndex((j)=>H.test(j));if(W>0){let j=Z.slice(0,W).filter((Y)=>Y.trim()!=="");if(j.length>0&&j.every((Y)=>x.test(Y))){for(let Y of j){let[,K,z]=Y.match(x);J.push({key:K.toLowerCase(),value:z.trim()})}V=W+1}}let X=[[]];for(let j of Z.slice(V)){if(Q&&H.test(j)){X.push([]);continue}X[X.length-1].push(j)}return{headers:J,parts:X.map((j)=>jQ(j)).filter((j)=>j.length>0)}}function jQ($){let Q=0,Z=$.length;while(Q<Z&&$[Q].trim()==="")Q++;while(Z>Q&&$[Z-1].trim()==="")Z--;return $.slice(Q,Z)}function qQ($){let Q=[[]];for(let Z of $){if(Z.trim()===""){if(Q[Q.length-1].length>0)Q.push([]);continue}Q[Q.length-1].push(Z)}return Q.filter((Z)=>Z.length>0)}var k=/^\s*\[([^\]]+)\]\(([^)\s]+)\)\s*$/,f=/^\s*[-*]\s+/;function zQ($){return qQ($).map((Q)=>{if(Q.length===1&&H.test(Q[0]))return"<hr>";if(Q.every((Z)=>k.test(Z)))return`<p class="bp-email-actions">${Q.map((J)=>{let[,V,W]=J.match(k);return`<a class="bp-email-button" href="${F(W)}" target="_blank" rel="noopener noreferrer">${R(V)}</a>`}).join("")}</p>`;if(Q.every((Z)=>f.test(Z)))return`<ul>${Q.map((Z)=>`<li>${M(Z.replace(f,""))}</li>`).join("")}</ul>`;if(Q.every((Z)=>Z.startsWith(">")))return`<blockquote>${Q.map((Z)=>M(Z.replace(/^>\s?/,""))).join("<br>")}</blockquote>`;return Q.join(`
1247
+ `).split(/\n\s*-{3,}\s*\n?/).map((Z)=>`<p>${Z.split(`
1248
+ `).map(M).join("<br>")}</p>`).join("<hr>")}).join(`
1249
+ `)}var KQ={from:"From",to:"To",cc:"Cc",bcc:"Bcc","reply-to":"Reply-To"};function u($){return KQ[$]??$.replace(/[-_]/g," ").replace(/^\w/,(Q)=>Q.toUpperCase())}function GQ($){let{headers:Q,parts:Z}=A($,!1),J=Q.find((X)=>X.key==="subject")?.value,V=Q.find((X)=>X.key==="preheader")?.value,W=Q.filter((X)=>X.key!=="subject"&&X.key!=="preheader").map((X)=>`<div><dt>${F(u(X.key))}</dt><dd>${M(X.value)}</dd></div>`).join("");return['<figure class="bp-email bp-message" aria-label="Email preview">','<div class="bp-email-bar"><span class="bp-email-dots" aria-hidden="true"><i></i><i></i><i></i></span><span class="bp-message-kind">Email</span></div>',J?`<div class="bp-email-subject">${M(J)}</div>`:"",W?`<dl class="bp-email-headers">${W}</dl>`:"",V?`<div class="bp-email-preheader"><span>Preview text</span> ${M(V)}</div>`:"",`<div class="bp-email-body">${zQ(Z[0]??[])}</div>`,"</figure>"].join("")}var BQ=`@\xA3$\xA5\xE8\xE9\xF9\xEC\xF2\xC7
1250
+ \xD8\xF8\r\xC5\xE5\u0394_\u03A6\u0393\u039B\u03A9\u03A0\u03A8\u03A3\u0398\u039E\xC6\xE6\xDF\xC9 !"#\xA4%&'()*+,-./0123456789:;<=>?\xA1ABCDEFGHIJKLMNOPQRSTUVWXYZ\xC4\xD6\xD1\xDC\xA7\xBFabcdefghijklmnopqrstuvwxyz\xE4\xF6\xF1\xFC\xE0`,NQ="^{}\\[~]|\u20AC\f";function MQ($){let Q=0,Z=!0;for(let V of $)if(BQ.includes(V))Q+=1;else if(NQ.includes(V))Q+=2;else{Z=!1;break}if(Z)return{encoding:"GSM-7",length:Q,segments:Q<=160?1:Math.ceil(Q/153)};let J=$.length;return{encoding:"UCS-2",length:J,segments:J<=70?1:Math.ceil(J/67)}}function UQ($){let Q=$.replace(m,""),Z=Q!==$;if(Z&&Q.trim()==="")return'<div class="bp-sms-meta">Length depends on what is filled in</div>';let{encoding:J,length:V,segments:W}=MQ(Q),X=Z?" + placeholders":"",j=`${Z?"at least ":""}${W} ${W===1?"segment":"segments"}`,Y=`${V} ${J==="GSM-7"?"characters":"UTF-16 units"} (${J})${Z?", not counting placeholders":""}`;return`<div class="bp-sms-meta" title="${F(Y)}">${V} chars${X} \xB7 ${j}${J==="UCS-2"?" \xB7 Unicode":""}</div>`}function FQ($){let{headers:Q,parts:Z}=A($,!0),J=Q.find((Y)=>Y.key==="from")?.value??"",V=Q.find((Y)=>Y.key==="to")?.value,W=Q.filter((Y)=>Y.key!=="from"&&Y.key!=="to").map((Y)=>`<div><dt>${F(u(Y.key))}</dt><dd>${M(Y.value)}</dd></div>`).join(""),X=(J.replace(/[^A-Za-z0-9]/g,"")[0]??"#").toUpperCase(),j=Z.map((Y)=>{let K=Y.every((q)=>q.trim()===""||q.startsWith(">")),z=K?Y.map((q)=>q.replace(/^>\s?/,"")):Y,G=z.join(`
1251
+ `),B=z.map(M).join("<br>");if(K)return`<div class="bp-sms-reply bp-sms-row"><div class="bp-sms-bubble">${B}</div></div>`;return`<div class="bp-sms-row"><div class="bp-sms-bubble">${B}</div>${UQ(G)}</div>`}).join("");return['<figure class="bp-message bp-sms" aria-label="SMS preview">','<div class="bp-sms-phone">','<div class="bp-sms-header">',`<span class="bp-sms-avatar" aria-hidden="true">${F(X)}</span>`,'<span class="bp-sms-who">',`<span class="bp-sms-from">${M(J||"Text message")}</span>`,V?`<span class="bp-sms-to">to ${M(V)}</span>`:"","</span>",'<span class="bp-message-kind">SMS</span>',"</div>",W?`<dl class="bp-sms-details">${W}</dl>`:"",`<div class="bp-sms-thread">${j}</div>`,"</div>","</figure>"].join("")}function mQ($,Q){switch($.toLowerCase()){case"email":return GQ(Q);case"sms":return FQ(Q);default:return null}}var uQ=`
1252
+ .bp-message {
1253
+ margin: 20px 0;
1254
+ font-size: 15px;
1255
+ line-height: 1.6;
1256
+ }
1257
+ .bp-message .bp-message-var {
1258
+ display: inline-block;
1259
+ padding: 0 5px;
1260
+ border-radius: 4px;
1261
+ font-family: var(--bp-font-family-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
1262
+ font-size: 0.86em;
1263
+ line-height: 1.5;
1264
+ color: var(--bp-c-brand-1, #3451b2);
1265
+ background: var(--bp-c-brand-soft, rgba(100, 108, 255, 0.14));
1266
+ white-space: nowrap;
1267
+ }
1268
+ .bp-message .bp-message-kind {
1269
+ margin-left: auto;
1270
+ font-size: 11px;
1271
+ font-weight: 600;
1272
+ letter-spacing: 0.06em;
1273
+ text-transform: uppercase;
1274
+ color: var(--bp-c-text-3, #929295);
1275
+ }
1276
+ /* A message's links are part of its copy, not links out of the docs. */
1277
+ .bp-message .external-link-icon {
1278
+ display: none;
1279
+ }
1280
+ .bp-message dl {
1281
+ margin: 0;
1282
+ }
1283
+ .bp-message dl > div {
1284
+ display: flex;
1285
+ gap: 10px;
1286
+ }
1287
+ .bp-message dt {
1288
+ flex: none;
1289
+ min-width: 64px;
1290
+ color: var(--bp-c-text-3, #929295);
1291
+ }
1292
+ .bp-message dd {
1293
+ margin: 0;
1294
+ min-width: 0;
1295
+ overflow-wrap: anywhere;
1296
+ color: var(--bp-c-text-1, #3c3c43);
1297
+ }
1298
+
1299
+ /* Email: a mail-client card. */
1300
+ .bp-email {
1301
+ max-width: 640px;
1302
+ overflow: hidden;
1303
+ border: 1px solid var(--bp-c-divider, #e2e2e3);
1304
+ border-radius: 12px;
1305
+ background: var(--bp-c-bg-elv, #fff);
1306
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.05);
1307
+ }
1308
+ .bp-email-bar {
1309
+ display: flex;
1310
+ align-items: center;
1311
+ gap: 12px;
1312
+ padding: 8px 16px;
1313
+ border-bottom: 1px solid var(--bp-c-divider, #e2e2e3);
1314
+ background: var(--bp-c-bg-soft, #f6f6f7);
1315
+ }
1316
+ .bp-email-dots {
1317
+ display: inline-flex;
1318
+ gap: 6px;
1319
+ }
1320
+ .bp-email-dots i {
1321
+ width: 10px;
1322
+ height: 10px;
1323
+ border-radius: 50%;
1324
+ background: var(--bp-c-divider, #e2e2e3);
1325
+ }
1326
+ .bp-email-subject {
1327
+ padding: 16px 20px 4px;
1328
+ font-size: 18px;
1329
+ font-weight: 600;
1330
+ line-height: 1.4;
1331
+ color: var(--bp-c-text-1, #3c3c43);
1332
+ }
1333
+ .bp-email-headers {
1334
+ padding: 4px 20px 12px;
1335
+ font-size: 13px;
1336
+ border-bottom: 1px solid var(--bp-c-divider, #e2e2e3);
1337
+ }
1338
+ .bp-email-preheader {
1339
+ padding: 8px 20px;
1340
+ font-size: 13px;
1341
+ color: var(--bp-c-text-2, #67676c);
1342
+ border-bottom: 1px solid var(--bp-c-divider, #e2e2e3);
1343
+ }
1344
+ .bp-email-preheader span {
1345
+ margin-right: 6px;
1346
+ color: var(--bp-c-text-3, #929295);
1347
+ }
1348
+ .bp-email-body {
1349
+ padding: 20px;
1350
+ color: var(--bp-c-text-1, #3c3c43);
1351
+ }
1352
+ .bp-email-body > :first-child {
1353
+ margin-top: 0;
1354
+ }
1355
+ .bp-email-body > :last-child {
1356
+ margin-bottom: 0;
1357
+ }
1358
+ .bp-email-body p,
1359
+ .bp-email-body ul,
1360
+ .bp-email-body blockquote {
1361
+ margin: 0 0 14px;
1362
+ }
1363
+ .bp-email-body ul {
1364
+ padding-left: 20px;
1365
+ list-style: disc;
1366
+ }
1367
+ .bp-email-body blockquote {
1368
+ padding: 4px 0 4px 14px;
1369
+ border-left: 3px solid var(--bp-c-divider, #e2e2e3);
1370
+ color: var(--bp-c-text-2, #67676c);
1371
+ }
1372
+ .bp-email-body hr {
1373
+ margin: 18px 0;
1374
+ border: 0;
1375
+ border-top: 1px solid var(--bp-c-divider, #e2e2e3);
1376
+ }
1377
+ .bp-email-body hr ~ p {
1378
+ font-size: 13px;
1379
+ color: var(--bp-c-text-2, #67676c);
1380
+ }
1381
+ .bp-email-body a {
1382
+ color: var(--bp-c-brand-1, #3451b2);
1383
+ }
1384
+ .bp-email-actions {
1385
+ display: flex;
1386
+ flex-wrap: wrap;
1387
+ gap: 10px;
1388
+ }
1389
+ .bp-email-body a.bp-email-button {
1390
+ display: inline-block;
1391
+ padding: 10px 18px;
1392
+ border-radius: 8px;
1393
+ font-weight: 600;
1394
+ line-height: 1.3;
1395
+ text-decoration: none;
1396
+ color: var(--bp-button-brand-text, #fff);
1397
+ background: var(--bp-button-brand-bg, var(--bp-c-brand-3, #5672cd));
1398
+ }
1399
+ .bp-email-body a.bp-email-button:hover {
1400
+ background: var(--bp-button-brand-hover-bg, var(--bp-c-brand-2, #3a5ccc));
1401
+ }
1402
+
1403
+ /* SMS: a phone thread. */
1404
+ .bp-sms-phone {
1405
+ max-width: 380px;
1406
+ overflow: hidden;
1407
+ border: 1px solid var(--bp-c-divider, #e2e2e3);
1408
+ border-radius: 24px;
1409
+ background: var(--bp-c-bg-elv, #fff);
1410
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.05);
1411
+ }
1412
+ .bp-sms-header {
1413
+ display: flex;
1414
+ align-items: center;
1415
+ gap: 10px;
1416
+ padding: 12px 16px;
1417
+ border-bottom: 1px solid var(--bp-c-divider, #e2e2e3);
1418
+ background: var(--bp-c-bg-soft, #f6f6f7);
1419
+ }
1420
+ .bp-sms-avatar {
1421
+ flex: none;
1422
+ display: inline-flex;
1423
+ align-items: center;
1424
+ justify-content: center;
1425
+ width: 32px;
1426
+ height: 32px;
1427
+ border-radius: 50%;
1428
+ font-size: 14px;
1429
+ font-weight: 600;
1430
+ color: var(--bp-c-white, #fff);
1431
+ background: var(--bp-c-text-3, #929295);
1432
+ }
1433
+ .bp-sms-who {
1434
+ display: flex;
1435
+ flex: 1;
1436
+ flex-direction: column;
1437
+ min-width: 0;
1438
+ line-height: 1.35;
1439
+ }
1440
+ .bp-sms-from {
1441
+ font-weight: 600;
1442
+ color: var(--bp-c-text-1, #3c3c43);
1443
+ }
1444
+ .bp-sms-to {
1445
+ font-size: 13px;
1446
+ color: var(--bp-c-text-2, #67676c);
1447
+ }
1448
+ .bp-sms-details {
1449
+ padding: 8px 16px;
1450
+ font-size: 13px;
1451
+ border-bottom: 1px solid var(--bp-c-divider, #e2e2e3);
1452
+ }
1453
+ .bp-sms-thread {
1454
+ display: flex;
1455
+ flex-direction: column;
1456
+ gap: 12px;
1457
+ padding: 16px;
1458
+ }
1459
+ .bp-sms-row {
1460
+ display: flex;
1461
+ flex-direction: column;
1462
+ align-items: flex-start;
1463
+ gap: 3px;
1464
+ }
1465
+ .bp-sms-bubble {
1466
+ max-width: 85%;
1467
+ padding: 8px 12px;
1468
+ border-radius: 18px 18px 18px 4px;
1469
+ overflow-wrap: anywhere;
1470
+ color: var(--bp-c-text-1, #3c3c43);
1471
+ background: var(--bp-c-gray-soft, rgba(142, 150, 170, 0.18));
1472
+ }
1473
+ .bp-sms-bubble a {
1474
+ color: inherit;
1475
+ text-decoration: underline;
1476
+ }
1477
+ .bp-sms-reply {
1478
+ align-items: flex-end;
1479
+ }
1480
+ .bp-sms-reply .bp-sms-bubble {
1481
+ border-radius: 18px 18px 4px 18px;
1482
+ color: #fff;
1483
+ background: #0b84ff;
1484
+ }
1485
+ .bp-sms-reply .bp-message-var {
1486
+ color: #fff;
1487
+ background: rgba(255, 255, 255, 0.22);
1488
+ }
1489
+ .bp-sms-meta {
1490
+ padding-left: 6px;
1491
+ font-size: 11px;
1492
+ color: var(--bp-c-text-3, #929295);
1493
+ }
1494
+ `;function p($){let Q=[],Z=null,J=null;for(let V of $.split(`
1495
+ `)){let W=V.match(/^\s{0,3}(`{3,}|~{3,})(.*)$/);if(J){if(W&&W[1][0]===J.marker[0]&&W[1].length>=J.marker.length&&W[2].trim()===""){let{headers:X,parts:j}=A(J.lines.join(`
1496
+ `),!0);Q.push("",...X.map((Y)=>Y.value),...j.flat(),""),J=null}else J.lines.push(V);continue}if(Z){if(W&&W[1][0]===Z[0]&&W[1].length>=Z.length&&W[2].trim()==="")Z=null;Q.push(V);continue}if(W){if(XQ(W[2].trim().split(/[\s{]/)[0]??""))J={marker:W[1],lines:[]};else Z=W[1];if(!J)Q.push(V);continue}Q.push(V)}return Q.join(`
1497
+ `)}var IQ={enabled:!0,position:["sidebar"],title:"Table of Contents",maxDepth:6,minDepth:2,className:"table-of-contents",smoothScroll:!0,activeHighlight:!0,collapsible:!0,exclude:[]};function L($){return $.replace(/\s*<!-- toc-ignore -->\s*/g,"").replace(/!\[[^\]]*\]\([^)]*\)/g,"").replace(/\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/`([^`]+)`/g,"$1").replace(/\*\*(.+?)\*\*/g,"$1").replace(/__(.+?)__/g,"$1").replace(/\*(.+?)\*/g,"$1").replace(/_(.+?)_/g,"$1").replace(/~~(.+?)~~/g,"$1").replace(/<[^>]*>/g,"").trim()}function P($){return $.toLowerCase().trim().replace(/<[^>]*>/g,"").replace(/what's new\?\s*\(v2\.0\)/g,"whats-new-v2-0").replace(/features\s*&\s*benefits/g,"features-benefits").replace(/vue\.js\s*\+\s*typescript\s*=\s*\u2764\uFE0F/g,"vue-js-typescript").replace(/\//g,"-").replace(/\./g,"-").replace(/[^\w\s-]/g,"").replace(/[\s_]+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,"")}function w($,Q){let Z=$,J=1;while(Q.has($))$=`${Z}-${J}`,J++;return Q.add($),$}function g($,Q){return w(P($),Q)}function _Q($){let Q=[],Z=new Set,J=/^(#{1,6})\s+(.+)$/gm,V;while((V=J.exec($))!==null){let W=V[1].length,X=V[2].trim();if(!X)continue;if(X.includes("toc-ignore"))continue;let j=X.replace(/\s*<!-- toc-ignore -->\s*/g,"").trim();j=j.replace(/`([^`]+)`/g,"<code>$1</code>");let Y=j.includes("<code>"),K=g(L(X),Z);Q.push({level:W,text:j,id:K,children:[],hasCode:Y})}return Q}function DQ($){let Q=[],Z=[];for(let J of $){while(Z.length>0&&Z[Z.length-1].level>=J.level)Z.pop();if(Z.length===0)Q.push(J);else Z[Z.length-1].children.push(J);Z.push(J)}return Q}function RQ($,Q){let{minDepth:Z=2,maxDepth:J=6,exclude:V=[]}=Q,W=(X)=>{let j=[];for(let Y of X){if(V.some((z)=>{if(z.startsWith("/")&&z.endsWith("/"))return new RegExp(z.slice(1,-1)).test(Y.text);else return Y.text===z}))continue;if(Y.level>J)continue;let K=W(Y.children);if(Y.level>=Z&&Y.level<=J)j.push({...Y,children:K});else j.push(...K)}return j};return W($)}function y($){let{items:Q,title:Z,config:J}=$,{className:V,collapsible:W}=J,X=(j,Y=0)=>{if(j.length===0)return"";let K=Y===0?"toc-list":"toc-sublist",z=Y===0?"toc-item":"toc-subitem";return`<ul class="${K}">
1498
+ ${j.map((G)=>{let B=G.children.length>0,q=B&&W?"toc-expand":"",_=B?X(G.children,Y+1):"",E=50,N=G.text.length>50?`${G.text.substring(0,50)}...`:G.text,U=G.text.length>50?"toc-truncate":"";return`<li class="${G.hasCode?"toc-code":""} ${q} ${z} ${U}">
1499
+ <a href="#${G.id}" class="toc-link" title="${G.text.replace(/<[^>]*>/g,"")}">${N}</a>
1500
+ ${_}
1248
1501
  </li>`}).join(`
1249
1502
  `)}
1250
- </ul>`};return[`<nav class="${Z}" role="navigation" aria-label="${W}">`,'<div class="toc-container">',` <h2 class="toc-title">${W}</h2>`,` ${j(V)}`,"</div>","</nav>"].join(`
1251
- `)}function C(Q){return E(Q).replace("table-of-contents","table-of-contents toc-inline inline-toc")}function t(Q){return E(Q).replace("table-of-contents","table-of-contents toc-sidebar sidebar-toc")}function e(Q){return E(Q).replace("table-of-contents","table-of-contents toc-floating floating-toc")}function QQ(Q,V={}){let W={...V};if(typeof W.position==="string")W.position=[W.position];let X={...a,...W},Z=o(Q),$=r(Z),j=n($,X);return{title:X.title,items:j,config:X}}function IQ(Q,V={}){let W=QQ(Q,V);return(Array.isArray(V.position)?V.position:[V.position||"sidebar"]).map((Z)=>{let $;switch(Z){case"inline":$=C(W);break;case"sidebar":$=t(W);break;case"floating":$=e(W);break;default:$=E(W)}return{position:Z,data:W,html:$}})}function NQ(Q,V){let W=C(V);return Q.replace(/\[\[toc\]\]/gi,W)}function MQ(Q){let V=new Set;return Q.replace(/<h([1-6])>(.*?)<\/h[1-6]>/gi,(W,X,Z)=>{let $=w(Z.replace(/<[^>]*>/g,""),V);return`<h${X} id="${$}"><a href="#${$}" class="heading-anchor">#</a>${Z}</h${X}>`})}function RQ(){return`
1503
+ </ul>`};return[`<nav class="${V}" role="navigation" aria-label="${Z}">`,'<div class="toc-container">',` <h2 class="toc-title">${Z}</h2>`,` ${X(Q)}`,"</div>","</nav>"].join(`
1504
+ `)}function h($){return y($).replace("table-of-contents","table-of-contents toc-inline inline-toc")}function yQ($){return y($).replace("table-of-contents","table-of-contents toc-sidebar sidebar-toc")}function OQ($){return y($).replace("table-of-contents","table-of-contents toc-floating floating-toc")}function HQ($,Q={}){let Z={...Q};if(typeof Z.position==="string")Z.position=[Z.position];let J={...IQ,...Z},V=_Q($),W=DQ(V),X=RQ(W,J);return{title:J.title,items:X,config:J}}function gQ($,Q={}){let Z=HQ($,Q);return(Array.isArray(Q.position)?Q.position:[Q.position||"sidebar"]).map((V)=>{let W;switch(V){case"inline":W=h(Z);break;case"sidebar":W=yQ(Z);break;case"floating":W=OQ(Z);break;default:W=y(Z)}return{position:V,data:Z,html:W}})}function hQ($,Q){let Z=h(Q);return $.replace(/\[\[toc\]\]/gi,Z)}function dQ($){let Q=new Set;return $.replace(/<h([1-6])>(.*?)<\/h[1-6]>/gi,(Z,J,V)=>{let W=g(V.replace(/<[^>]*>/g,""),Q);return`<h${J} id="${W}"><a href="#${W}" class="heading-anchor">#</a>${V}</h${J}>`})}function cQ(){return`
1252
1505
  .table-of-contents {
1253
1506
  position: sticky;
1254
1507
  top: 60px; /* Match navbar height */
@@ -1378,12 +1631,12 @@ html {
1378
1631
  max-width: 250px;
1379
1632
  }
1380
1633
  }
1381
- `}function UQ(Q={}){let V=Q.smoothScroll!==!1,W=Q.activeHighlight!==!1,X=Q.collapsible!==!1;return`
1634
+ `}function lQ($={}){let Q=$.smoothScroll!==!1,Z=$.activeHighlight!==!1,J=$.collapsible!==!1;return`
1382
1635
  function initToc() {
1383
1636
  const tocLinks = document.querySelectorAll('.toc-link')
1384
1637
 
1385
1638
  // Smooth scrolling for TOC links
1386
- if (${String(V)}) tocLinks.forEach(link => {
1639
+ if (${String(Q)}) tocLinks.forEach(link => {
1387
1640
  link.addEventListener('click', function(e) {
1388
1641
  e.preventDefault()
1389
1642
  const targetId = this.getAttribute('href')?.substring(1)
@@ -1403,7 +1656,7 @@ function initToc() {
1403
1656
 
1404
1657
  // Active TOC item highlighting on scroll
1405
1658
  function updateActiveTocItem() {
1406
- if (!${String(W)}) return
1659
+ if (!${String(Z)}) return
1407
1660
  const headings = document.querySelectorAll('h1, h2, h3, h4, h5, h6')
1408
1661
  const tocLinks = document.querySelectorAll('.toc-link')
1409
1662
 
@@ -1447,7 +1700,7 @@ function initToc() {
1447
1700
  updateActiveTocItem()
1448
1701
 
1449
1702
  // TOC collapse/expand functionality
1450
- const expandableItems = ${String(X)} ? document.querySelectorAll('.toc-expand') : []
1703
+ const expandableItems = ${String(J)} ? document.querySelectorAll('.toc-expand') : []
1451
1704
 
1452
1705
  expandableItems.forEach(item => {
1453
1706
  item.addEventListener('click', function(e) {
@@ -1480,7 +1733,7 @@ if (document.readyState === 'loading') {
1480
1733
  else {
1481
1734
  initToc()
1482
1735
  }
1483
- `}var{Glob:S,YAML:VQ}=globalThis.Bun;import{join as WQ}from"path";var HQ="/search-index.json",M={include:["**/*.md"],exclude:["public/**","**/node_modules/**"],searchFields:["title","content","headings","keywords"],maxResults:10,minQueryLength:1,fuzzy:!1,fuzziness:1,stemmer:"none",maxContentLength:800,boost:{title:10,headings:5,content:1}};function f(Q){let V=Q?.options??{};return{...M,...V,include:V.include??M.include,exclude:V.exclude??M.exclude,searchFields:V.searchFields??M.searchFields,maxResults:V.maxResults??Q?.maxResults??M.maxResults,boost:{...M.boost,...V.boost??{}}}}var x=[{key:"k",meta:!0,ctrl:!1,alt:!1,shift:!1},{key:"k",meta:!1,ctrl:!0,alt:!1,shift:!1},{key:"/",meta:!1,ctrl:!1,alt:!1,shift:!1}];function XQ(Q){if(!Q)return x;let V=(Array.isArray(Q)?Q:[Q]).map((Z)=>String(Z).toLowerCase()),W={meta:!1,ctrl:!1,alt:!1,shift:!1},X="";for(let Z of V)if(Z==="meta"||Z==="cmd"||Z==="command")W.meta=!0;else if(Z==="ctrl"||Z==="control")W.ctrl=!0;else if(Z==="alt"||Z==="option")W.alt=!0;else if(Z==="shift")W.shift=!0;else X=Z;if(!X)return x;return[{key:X,...W}]}function k(Q){if(typeof Q!=="function")return null;let V=Function.prototype.toString.call(Q);return V.includes("[native code]")?null:V}function OQ(Q,V){let W=Q?.search??Q?.markdown?.search,X=f(W),Z=W?.resultOptions??{};return{indexUrl:V,placeholder:W?.placeholder??"Search documentation",lazy:W?.lazy!==!1,maxResults:X.maxResults,minQueryLength:X.minQueryLength,searchFields:X.searchFields,boost:{title:X.boost.title??10,headings:X.boost.headings??5,content:X.boost.content??1},fuzzy:X.fuzzy,fuzziness:X.fuzziness,stemmer:X.stemmer,shortcuts:{keyboard:W?.keyboardShortcuts!==!1,keys:XQ(W?.shortcut)},result:{showDescription:Z.showDescription!==!1,descriptionLength:Z.descriptionLength??180,highlightMatches:Z.highlightMatches!==!1,showPath:Z.showPath!==!1},tokenizeSource:k(W?.options?.tokenize),onSearchSource:k(W?.onSearch),locale:null}}function v(Q){return P(Q).replace(/^:::.*$/gm," ").replace(/^\s{0,3}>\s*\[!(?:NOTE|TIP|IMPORTANT|WARNING|CAUTION)\]\s*$/gim," ").replace(/<[^>]+>/g," ").replace(/!\[[^\]]*\]\([^)]*\)/g," ").replace(/\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/`([^`]+)`/g,"$1").replace(/[*_~]{1,3}([^*_~]+)[*_~]{1,3}/g,"$1").replace(/^\s{0,3}>\s?/gm,"").replace(/^\s*[-*+]\s+/gm,"").replace(/^\s*\d+\.\s+/gm,"").replace(/^\s*\|?[\s:|-]+\|[\s:|-]*$/gm," ").replace(/^\s{0,3}(?:-{3,}|\*{3,}|_{3,})\s*$/gm," ").replace(/\|/g," ").replace(/\s+/g," ").trim()}function ZQ(Q){let V=Q.match(/^---\r?\n([\s\S]*?)\r?\n---\r?\n?/);if(!V)return{body:Q,data:{}};let W={};try{W=VQ.parse(V[1])??{}}catch{W={}}return{body:Q.slice(V[0].length),data:W}}function $Q(Q){let V=Q.replace(/\.md$/,"");if(V==="index")return"/";if(V.endsWith("/index"))return`/${V.slice(0,-6)}`;return`/${V}`}function jQ(Q,V,W){let{body:X,data:Z}=ZQ(V);if(Z.search===!1)return[];if(Z.layout==="home")return[];let $=typeof Z.search==="object"&&Z.search!==null?Z.search:{},j=Array.isArray($.keywords)?$.keywords.map(String):[],J=$Q(Q),G=X.split(`
1484
- `),z=X.match(/^#\s+(.+)$/m),K=$.title||Z.title||(z?z[1].trim():J),q=[],B=new Set,Y={title:K,anchor:"",level:1,buffer:[]},R=()=>{let I=v(Y.buffer.join(`
1485
- `)).slice(0,W.maxContentLength);if(!I&&!Y.title)return;let N={url:Y.anchor?`${J}#${Y.anchor}`:J,page:K,title:v(Y.title)||K,text:I,level:Y.level};if(j.length)N.keywords=j;q.push(N)},H=U();for(let I of G){let N=H(I)?null:I.match(/^(#{1,6})\s+(.+?)\s*$/);if(!N){Y.buffer.push(I);continue}let _=N[1].length,O=N[2].replace(/\s*\{#([\w-]+)\}\s*$/,""),F=N[2].match(/\{#([\w-]+)\}\s*$/),p=A(F?F[1]:b(y(O)),B);if(_===1){Y.buffer.push("");continue}R(),Y={title:O,anchor:p,level:_,buffer:[]}}return R(),q.filter((I)=>I.text||I.level>1)}function JQ(Q,V){let{storeFields:W}=V;if(!W||!W.length)return Q;let X=new Set(["url",...W]);if(V.searchFields.includes("title"))X.add("title");if(V.searchFields.includes("content"))X.add("text");if(V.searchFields.includes("headings"))X.add("page");if(V.searchFields.includes("keywords"))X.add("keywords");return Q.map((Z)=>{let $={};for(let[j,J]of Object.entries(Z))if(X.has(j)&&J!==void 0)$[j]=J;return $})}function T(Q){return Q.split("#")[0]}function YQ(Q,V){if(!V.enabled)return{locale:V.defaultLocale,page:Q};let W=Q.split("/");if(W.length>1&&V.locales.includes(W[0])&&W[0]!==V.defaultLocale)return{locale:W[0],page:W.slice(1).join("/")};let X=Q.match(/^(.*)\.([A-Za-z-]+)(\.md)$/);if(X&&V.locales.includes(X[2]))return{locale:X[2],page:`${X[1]}${X[3]}`};return{locale:V.defaultLocale,page:Q}}async function FQ(Q,V){let W=V?.search??V?.markdown?.search,X=f(W),Z=m(V),$=X.exclude.map((z)=>new S(z)),j=[],J=new Set,G=new Map;for(let z of Z.locales)G.set(z,new Set);for(let z of X.include){let K=new S(z);for await(let q of K.scan(Q)){let B=q.replace(/\\/g,"/");if($.some((Y)=>Y.match(B)))continue;J.add(B)}}for(let z of[...J].sort())try{let K=await Bun.file(WQ(Q,z)).text(),{locale:q,page:B}=YQ(z,Z);for(let Y of jQ(B,K,X)){if(Z.enabled)Y.locale=q,Y.url=D(Z,q,Y.url);j.push(Y),G.get(q)?.add(T(Y.url))}}catch{}if(Z.enabled){let z=j.filter((K)=>K.locale===Z.defaultLocale);for(let K of Z.locales){if(K===Z.defaultLocale)continue;let q=G.get(K)??new Set;for(let B of z){let Y=D(Z,K,B.url);if(q.has(T(Y)))continue;j.push({...B,url:Y,locale:K})}}}return JQ(j,X)}
1486
- export{h as C,g as D,l as E,KQ as F,P as G,zQ as H,a as I,y as J,b as K,A as L,w as M,o as N,r as O,n as P,E as Q,C as R,t as S,e as T,QQ as U,IQ as V,NQ as W,MQ as X,RQ as Y,UQ as Z,HQ as _,OQ as $,FQ as aa};
1736
+ `}var{Glob:d,YAML:AQ}=globalThis.Bun;import{join as LQ}from"path";var eQ="/search-index.json",I={include:["**/*.md"],exclude:["public/**","**/node_modules/**"],searchFields:["title","content","headings","keywords"],maxResults:10,minQueryLength:1,fuzzy:!1,fuzziness:1,stemmer:"none",maxContentLength:800,boost:{title:10,headings:5,content:1}};function r($){let Q=$?.options??{};return{...I,...Q,include:Q.include??I.include,exclude:Q.exclude??I.exclude,searchFields:Q.searchFields??I.searchFields,maxResults:Q.maxResults??$?.maxResults??I.maxResults,boost:{...I.boost,...Q.boost??{}}}}var c=[{key:"k",meta:!0,ctrl:!1,alt:!1,shift:!1},{key:"k",meta:!1,ctrl:!0,alt:!1,shift:!1},{key:"/",meta:!1,ctrl:!1,alt:!1,shift:!1}];function PQ($){if(!$)return c;let Q=(Array.isArray($)?$:[$]).map((V)=>String(V).toLowerCase()),Z={meta:!1,ctrl:!1,alt:!1,shift:!1},J="";for(let V of Q)if(V==="meta"||V==="cmd"||V==="command")Z.meta=!0;else if(V==="ctrl"||V==="control")Z.ctrl=!0;else if(V==="alt"||V==="option")Z.alt=!0;else if(V==="shift")Z.shift=!0;else J=V;if(!J)return c;return[{key:J,...Z}]}function l($){if(typeof $!=="function")return null;let Q=Function.prototype.toString.call($);return Q.includes("[native code]")?null:Q}function QZ($,Q){let Z=$?.search??$?.markdown?.search,J=r(Z),V=Z?.resultOptions??{};return{indexUrl:Q,placeholder:Z?.placeholder??"Search documentation",lazy:Z?.lazy!==!1,maxResults:J.maxResults,minQueryLength:J.minQueryLength,searchFields:J.searchFields,boost:{title:J.boost.title??10,headings:J.boost.headings??5,content:J.boost.content??1},fuzzy:J.fuzzy,fuzziness:J.fuzziness,stemmer:J.stemmer,shortcuts:{keyboard:Z?.keyboardShortcuts!==!1,keys:PQ(Z?.shortcut)},result:{showDescription:V.showDescription!==!1,descriptionLength:V.descriptionLength??180,highlightMatches:V.highlightMatches!==!1,showPath:V.showPath!==!1},tokenizeSource:l(Z?.options?.tokenize),onSearchSource:l(Z?.onSearch),locale:null}}function s($){return T(p($)).replace(/^:::.*$/gm," ").replace(/^\s{0,3}>\s*\[!(?:NOTE|TIP|IMPORTANT|WARNING|CAUTION)\]\s*$/gim," ").replace(/<[^>]+>/g," ").replace(/!\[[^\]]*\]\([^)]*\)/g," ").replace(/\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/`([^`]+)`/g,"$1").replace(/[*_~]{1,3}([^*_~]+)[*_~]{1,3}/g,"$1").replace(/^\s{0,3}>\s?/gm,"").replace(/^\s*[-*+]\s+/gm,"").replace(/^\s*\d+\.\s+/gm,"").replace(/^\s*\|?[\s:|-]+\|[\s:|-]*$/gm," ").replace(/^\s{0,3}(?:-{3,}|\*{3,}|_{3,})\s*$/gm," ").replace(/\|/g," ").replace(/\s+/g," ").trim()}function wQ($){let Q=$.match(/^---\r?\n([\s\S]*?)\r?\n---\r?\n?/);if(!Q)return{body:$,data:{}};let Z={};try{Z=AQ.parse(Q[1])??{}}catch{Z={}}return{body:$.slice(Q[0].length),data:Z}}function CQ($){let Q=$.replace(/\.md$/,"");if(Q==="index")return"/";if(Q.endsWith("/index"))return`/${Q.slice(0,-6)}`;return`/${Q}`}function EQ($,Q,Z){let{body:J,data:V}=wQ(Q);if(V.search===!1)return[];if(V.layout==="home")return[];let W=typeof V.search==="object"&&V.search!==null?V.search:{},X=Array.isArray(W.keywords)?W.keywords.map(String):[],j=CQ($),Y=J.split(`
1737
+ `),K=J.match(/^#\s+(.+)$/m),z=W.title||V.title||(K?K[1].trim():j),G=[],B=new Set,q={title:z,anchor:"",level:1,buffer:[]},_=()=>{let N=s(q.buffer.join(`
1738
+ `)).slice(0,Z.maxContentLength);if(!N&&!q.title)return;let U={url:q.anchor?`${j}#${q.anchor}`:j,page:z,title:s(q.title)||z,text:N,level:q.level};if(X.length)U.keywords=X;G.push(U)},E=D();for(let N of Y){let U=E(N)?null:N.match(/^(#{1,6})\s+(.+?)\s*$/);if(!U){q.buffer.push(N);continue}let O=U[1].length,v=U[2].replace(/\s*\{#([\w-]+)\}\s*$/,""),b=U[2].match(/\{#([\w-]+)\}\s*$/),a=w(b?b[1]:P(L(v)),B);if(O===1){q.buffer.push("");continue}_(),q={title:v,anchor:a,level:O,buffer:[]}}return _(),G.filter((N)=>N.text||N.level>1)}function vQ($,Q){let{storeFields:Z}=Q;if(!Z||!Z.length)return $;let J=new Set(["url",...Z]);if(Q.searchFields.includes("title"))J.add("title");if(Q.searchFields.includes("content"))J.add("text");if(Q.searchFields.includes("headings"))J.add("page");if(Q.searchFields.includes("keywords"))J.add("keywords");return $.map((V)=>{let W={};for(let[X,j]of Object.entries(V))if(J.has(X)&&j!==void 0)W[X]=j;return W})}function i($){return $.split("#")[0]}function bQ($,Q){if(!Q.enabled)return{locale:Q.defaultLocale,page:$};let Z=$.split("/");if(Z.length>1&&Q.locales.includes(Z[0])&&Z[0]!==Q.defaultLocale)return{locale:Z[0],page:Z.slice(1).join("/")};let J=$.match(/^(.*)\.([A-Za-z-]+)(\.md)$/);if(J&&Q.locales.includes(J[2]))return{locale:J[2],page:`${J[1]}${J[3]}`};return{locale:Q.defaultLocale,page:$}}async function ZZ($,Q){let Z=Q?.search??Q?.markdown?.search,J=r(Z),V=o(Q),W=J.exclude.map((K)=>new d(K)),X=[],j=new Set,Y=new Map;for(let K of V.locales)Y.set(K,new Set);for(let K of J.include){let z=new d(K);for await(let G of z.scan($)){let B=G.replace(/\\/g,"/");if(W.some((q)=>q.match(B)))continue;j.add(B)}}for(let K of[...j].sort())try{let z=await Bun.file(LQ($,K)).text(),{locale:G,page:B}=bQ(K,V);for(let q of EQ(B,z,J)){if(V.enabled)q.locale=G,q.url=C(V,G,q.url);X.push(q),Y.get(G)?.add(i(q.url))}}catch{}if(V.enabled){let K=X.filter((z)=>z.locale===V.defaultLocale);for(let z of V.locales){if(z===V.defaultLocale)continue;let G=Y.get(z)??new Set;for(let B of K){let q=C(V,z,B.url);if(G.has(i(q)))continue;X.push({...B,url:q,locale:z})}}}return vQ(X,J)}
1739
+ export{t as C,e as D,$Q as E,TQ as F,T as G,kQ as H,mQ as I,uQ as J,IQ as K,L,P as M,w as N,g as O,_Q as P,DQ as Q,RQ as R,y as S,h as T,yQ as U,OQ as V,HQ as W,gQ as X,hQ as Y,dQ as Z,cQ as _,lQ as $,eQ as aa,QZ as ba,ZZ as ca};