@stacksjs/bunpress 0.2.22 → 0.2.23

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.
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{p as $,q as I,r as f,s as h,u as x}from"./chunk-zpf2c5ag.js";import"./chunk-xjz041s0.js";import{C as _}from"./chunk-8rsrw3sw.js";import"./chunk-ynp2pgxy.js";import{join as D}from"path";var E="@stacksjs/ts-cloud";async function Y(){try{return await import(E)}catch(j){throw Error(`Deploying requires @stacksjs/ts-cloud, which is an optional dependency.
2
+ import{o as $,p as I,q as f,r as h,t as x}from"./chunk-7gvva4jg.js";import"./chunk-5dtz0br7.js";import{B as _}from"./chunk-vm81tncs.js";import"./chunk-gn1n2yxt.js";import{join as D}from"path";var E="@stacksjs/ts-cloud";async function Y(){try{return await import(E)}catch(j){throw Error(`Deploying requires @stacksjs/ts-cloud, which is an optional dependency.
3
3
  Install it with: bun add -d @stacksjs/ts-cloud
4
4
  Original error: ${j instanceof Error?j.message:String(j)}`)}}function W(j,A){let k=A||j?.provider;if(!k||k==="route53")return null;if(k==="porkbun"){let m=j?.apiKey||process.env.PORKBUN_API_KEY,w=j?.secretKey||process.env.PORKBUN_SECRET_KEY;if(!m||!w)throw Error("Porkbun API credentials not found. Set PORKBUN_API_KEY and PORKBUN_SECRET_KEY environment variables, or configure them in bunpress.config.ts under cloud.dnsProvider");return{provider:"porkbun",apiKey:m,secretKey:w}}if(k==="godaddy"){let m=j?.apiKey||process.env.GODADDY_API_KEY,w=j?.secretKey||process.env.GODADDY_API_SECRET,J=j?.environment||process.env.GODADDY_ENVIRONMENT;if(!m||!w)throw Error("GoDaddy API credentials not found. Set GODADDY_API_KEY and GODADDY_API_SECRET environment variables, or configure them in bunpress.config.ts under cloud.dnsProvider");return{provider:"godaddy",apiKey:m,apiSecret:w,environment:J}}throw Error(`Unknown DNS provider: ${k}. Supported: porkbun, godaddy, route53`)}async function F(j={}){let A=await _,k=A.cloud||{},m=j.verbose??A.verbose??!1;if(k.driver&&k.driver!=="aws")return I(`Unsupported cloud driver: ${k.driver}. Only 'aws' is implemented.`),!1;let w=j.region||k.region||"us-east-1",J=j.domain||k.domain,M=j.subdomain||k.subdomain,N=j.baseDomain||k.baseDomain,O=j.bucket||k.bucket,P=j.stackName||k.stackName,U=j.hostedZoneId||k.hostedZoneId,Q=j.certificateArn||k.certificateArn,V=k.cacheControl||"max-age=31536000, public",B;if(J)B=J;else if(M&&N)B=`${M}.${N}`;let K=B?.replace(/\./g,"-")||"bunpress-site",G=null;try{G=W(k.dnsProvider,j.dnsProvider)}catch(H){return I(H.message),!1}let L=G!==null;if(j.dryRun){if(f("Dry run mode - no changes will be made"),console.log(`
5
5
  Configuration:`),console.log(` Region: ${w}`),console.log(` Site Name: ${K}`),console.log(` Bucket: ${O||"auto-generated"}`),console.log(` Domain: ${B||"not specified"}`),console.log(` Stack Name: ${P||`${K}-static-site`}`),console.log(` DNS Provider: ${G?.provider||"route53 (AWS)"}`),!L)console.log(` Hosted Zone ID: ${U||"auto-detected"}`);return console.log(` Certificate ARN: ${Q||"auto-created"}`),!0}if(!process.env.AWS_ACCESS_KEY_ID||!process.env.AWS_SECRET_ACCESS_KEY)return I("AWS credentials not found. Set AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables."),!1;let z=new h("Building documentation...");try{if(!m)z.start();if(!await x({verbose:m})){if(!m)z.fail("Build failed");return!1}if(!m)z.succeed("Documentation built successfully");let C=A.outDir||"./dist",X=D(C,".bunpress");if(!m)z.text="Deploying infrastructure with CloudFormation...",z.start();else if(console.log(`
@@ -0,0 +1,38 @@
1
+ // @bun
2
+ var Y=import.meta.require;function Q(q){return(q.sitemap?.baseUrl||q.url||"").replace(/\/$/,"")}function j(q){if(q.basePath){let B=q.basePath.trim().replace(/\/+$/,"");if(!B||B==="/")return"";return B.startsWith("/")?B:`/${B}`}let G=Q(q);if(!G)return"";try{let B=new URL(G).pathname.replace(/\/+$/,"");return B==="/"?"":B}catch{return""}}var V={"search.placeholder":"Search documentation","toc.title":"On this page","nav.menu":"Menu","search.noResults":"No results for","theme.toggle":"Toggle dark mode"};function A(q){let G=q?.i18n,B=(G?.locales??[]).filter(Boolean),H=G?.defaultLocale||B[0]||q?.lang||"en",J=(G?.enabled??B.length>1)&&B.length>0;return{enabled:J,locales:J?B:[H],defaultLocale:H,fallbackLocale:G?.fallbackLocale??H,localePath:G?.localePath??"./locales",detectLocale:G?.detectLocale===!0,localeNames:G?.localeNames??{},localeConfig:G?.localeConfig??{},translate:(K)=>V[K]??K}}async function E(q,G){if(!q.enabled)return q;try{let{createTranslator:B,loadTranslations:H}=await import("@stacksjs/ts-i18n"),J=await H({translationsDir:q.localePath,defaultLocale:q.defaultLocale,fallbackLocale:q.fallbackLocale,sources:G?.i18n?.sources??["ts","yaml","json"],optional:!0,verbose:!1}),K=B(J,{defaultLocale:q.defaultLocale,fallbackLocale:q.fallbackLocale}),P=new Set;for(let M of Object.values(J))for(let N of Object.keys(M??{}))P.add(N);let W=[...P].sort((M,N)=>M==="theme"?-1:N==="theme"?1:M.localeCompare(N));return{...q,translate:(M,N,X)=>{for(let R of[M,...W.map((O)=>`${O}.${M}`)])try{let O=K(R,N,X);if(typeof O==="string"&&O&&O!==R)return O}catch{}return V[M]??M}}}catch(B){return console.warn("[bunpress] i18n translations could not be loaded; falling back to defaults \u2014",B instanceof Error?B.message:B),q}}function F(q,G){if(!q.enabled)return{locale:q.defaultLocale,path:G};let B=G.match(/^\/([^/]+)(\/.*)?$/);if(B&&q.locales.includes(B[1])&&B[1]!==q.defaultLocale)return{locale:B[1],path:B[2]||"/"};return{locale:q.defaultLocale,path:G}}function Z(q,G,B){if(!q.enabled||G===q.defaultLocale)return B||"/";return`/${G}${B==="/"?"":B}`||`/${G}`}function I(q,G,B,H){let J=H==="/"?"/index":H,K=[];if(q.enabled&&B!==q.defaultLocale)K.push(`${G}/${B}${J}.md`),K.push(`${G}/${B}${J}/index.md`),K.push(`${G}${J}.${B}.md`);if(K.push(`${G}${J}.md`),K.push(`${G}${J}/index.md`),q.enabled)K.push(`${G}${J}.${q.defaultLocale}.md`);return K}function _(q,G,B){let H=G.localeConfig[B];if(!H)return q;return{...q,...H,themeConfig:H.themeConfig?{...q.themeConfig,...H.themeConfig}:q.themeConfig,markdown:H.markdown?{...q.markdown,...H.markdown}:q.markdown}}function D(q,G){return q.localeNames[G]??G}function S(q,G,B){if(!q.enabled)return"";let H=Q(G);if(!H)return"";let J=q.locales.map((K)=>{let P=`${H}${Z(q,K,B==="/index"?"/":B)}`;return`<link rel="alternate" hreflang="${K}" href="${P}">`});return J.push(`<link rel="alternate" hreflang="x-default" href="${H}${B==="/index"?"/":B}">`),J.join(`
3
+ `)}function w(q){if(!q.enabled||!q.detectLocale)return"";return`
4
+ (function () {
5
+ var LOCALES = ${JSON.stringify(q.locales)};
6
+ var DEFAULT = ${JSON.stringify(q.defaultLocale)};
7
+ var KEY = 'bunpress-locale';
8
+
9
+ try {
10
+ var current = location.pathname.split('/')[1];
11
+ if (LOCALES.indexOf(current) !== -1) {
12
+ // Reading a non-default locale is itself a choice; remember it.
13
+ localStorage.setItem(KEY, current);
14
+ return;
15
+ }
16
+ if (localStorage.getItem(KEY)) return;
17
+
18
+ var preferred = (navigator.languages || [navigator.language || ''])
19
+ .map(function (tag) { return String(tag).toLowerCase(); });
20
+
21
+ for (var i = 0; i < preferred.length; i++) {
22
+ var tag = preferred[i];
23
+ var exact = LOCALES.indexOf(tag) !== -1 ? tag : null;
24
+ // 'en-GB' should match an 'en' locale.
25
+ var base = exact || (LOCALES.indexOf(tag.split('-')[0]) !== -1 ? tag.split('-')[0] : null);
26
+ if (base && base !== DEFAULT) {
27
+ localStorage.setItem(KEY, base);
28
+ location.replace(\`/\${base}\${location.pathname}\${location.search}\${location.hash}\`);
29
+ return;
30
+ }
31
+ if (base === DEFAULT) return;
32
+ }
33
+ } catch (_) {
34
+ // Storage or history unavailable: leave the reader where they are.
35
+ }
36
+ })();
37
+ `.trim()}
38
+ export{Y as fa,Q as ga,j as ha,A as ia,E as ja,F as ka,Z as la,I as ma,_ as na,D as oa,S as pa,w as qa};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{ia as Q0,la as L,ma as Y0}from"./chunk-ynp2pgxy.js";import{loadConfig as z0}from"bunfig";var K0={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{ha as Q0,ia as X0,la as L,ma as q0}from"./chunk-gn1n2yxt.js";import{loadConfig as K0}from"bunfig";var G0={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,19 @@ 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 G0(X){let Q=X.plugins;if(!Array.isArray(Q)||Q.length===0)return X;let Z=X;for(let $ of Q){if(!$||typeof $!=="object")continue;let J=$.name||"unnamed plugin";try{if(typeof $.extendConfig==="function")Z=$.extendConfig(Z)??Z}catch(V){console.error(`[bunpress] ${J}: extendConfig failed \u2014`,V)}try{if(typeof $.validateConfig==="function"){let V=$.validateConfig(Z);for(let W of V?.warnings??[])console.warn(`[bunpress] ${J}: ${W}`);for(let W of V?.errors??[])console.error(`[bunpress] ${J}: ${W}`)}}catch(V){console.error(`[bunpress] ${J}: validateConfig failed \u2014`,V)}}for(let $ of Q)try{$?.onConfigLoad?.(Z)}catch(J){console.error(`[bunpress] ${$?.name||"unnamed plugin"}: onConfigLoad failed \u2014`,J)}return Z}async function B0(){let X=["bunpress.config.ts","bunpress.config.js",".config/bunpress.ts","docs.config.ts",".config/docs.ts"],Q=[];for(let Z of X)if(await Bun.file(Z).exists())Q.push(Z);if(Q.length>1){let[Z,...$]=Q;console.warn(`[bunpress] Multiple config files found. Using ${Z}; ignoring ${$.join(", ")}.`)}await N0(Q.length>0)}async function N0(X){let Q=["docs","documentation","site"],Z=["bunpress.config.ts","bunpress.config.js","docs.config.ts"];for(let $ of Q)for(let J of Z){let V=`${$}/${J}`;if(!await Bun.file(V).exists())continue;let W=X?`merge it into the config at the project root, or pass --config ${V}`:`move it to ./${J}, or pass --config ${V}`;console.warn(`[bunpress] ${V} is never loaded: config is discovered from the working directory, not the docs directory. To use it, ${W}.`);return}}await B0();var M0=G0(await z0({name:"bunpress",alias:"docs",defaultConfig:K0}));async function n0(){return M0}function E(){let X=null;return(Q)=>{let Z=Q.match(/^\s{0,3}(`{3,}|~{3,})(.*)$/);if(!Z)return X!==null;let $=Z[1];if(X===null)return X=$,!0;let J=$[0]===X[0],V=$.length>=X.length;if(J&&V&&Z[2].trim()==="")X=null;return!0}}function p(X){let Q=E();return X.split(`
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 B0(X){let Q=X.plugins;if(!Array.isArray(Q)||Q.length===0)return X;let Z=X;for(let $ of Q){if(!$||typeof $!=="object")continue;let J=$.name||"unnamed plugin";try{if(typeof $.extendConfig==="function")Z=$.extendConfig(Z)??Z}catch(V){console.error(`[bunpress] ${J}: extendConfig failed \u2014`,V)}try{if(typeof $.validateConfig==="function"){let V=$.validateConfig(Z);for(let W of V?.warnings??[])console.warn(`[bunpress] ${J}: ${W}`);for(let W of V?.errors??[])console.error(`[bunpress] ${J}: ${W}`)}}catch(V){console.error(`[bunpress] ${J}: validateConfig failed \u2014`,V)}}for(let $ of Q)try{$?.onConfigLoad?.(Z)}catch(J){console.error(`[bunpress] ${$?.name||"unnamed plugin"}: onConfigLoad failed \u2014`,J)}return Z}async function N0(){let X=["bunpress.config.ts","bunpress.config.js",".config/bunpress.ts","docs.config.ts",".config/docs.ts"],Q=[];for(let Z of X)if(await Bun.file(Z).exists())Q.push(Z);if(Q.length>1){let[Z,...$]=Q;console.warn(`[bunpress] Multiple config files found. Using ${Z}; ignoring ${$.join(", ")}.`)}await M0(Q.length>0)}async function M0(X){let Q=["docs","documentation","site"],Z=["bunpress.config.ts","bunpress.config.js","docs.config.ts"];for(let $ of Q)for(let J of Z){let V=`${$}/${J}`;if(!await Bun.file(V).exists())continue;let W=X?`merge it into the config at the project root, or pass --config ${V}`:`move it to ./${J}, or pass --config ${V}`;console.warn(`[bunpress] ${V} is never loaded: config is discovered from the working directory, not the docs directory. To use it, ${W}.`);return}}await N0();var U0=B0(await K0({name:"bunpress",alias:"docs",defaultConfig:G0}));async function t0(){return U0}function E(){let X=null;return(Q)=>{let Z=Q.match(/^\s{0,3}(`{3,}|~{3,})(.*)$/);if(!Z)return X!==null;let $=Z[1];if(X===null)return X=$,!0;let J=$[0]===X[0],V=$.length>=X.length;if(J&&V&&Z[2].trim()==="")X=null;return!0}}function u(X){let Q=E();return X.split(`
1240
1240
  `).filter((Z)=>!Q(Z)).join(`
1241
- `)}function u(X){return`\x00BPCODE${X}\x00`}var U0=/\u0000BPCODE(\d+)\u0000/g;function I0(X){let Q=[],Z=E(),$=[],J=null,V=()=>{if(!J)return;Q.push(J.join(`
1242
- `)),$.push(u(Q.length-1)),J=null};for(let W of X.split(`
1243
- `)){if(Z(W)){J??=[],J.push(W);continue}V(),$.push(W.replace(/(`+)(?:(?!\1)[\s\S])*\1/g,(q)=>{return Q.push(q),u(Q.length-1)}))}return V(),{masked:$.join(`
1244
- `),restore:(W)=>W.replace(U0,(q,j)=>Q[Number(j)]??q)}}async function e0(X,Q){let{masked:Z,restore:$}=I0(X);return $(await Q(Z))}var _0=["email","sms"];function F0(X){return _0.includes(X.toLowerCase())}function F(X){return X.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}var c=/\{\{\s*([\w.-]+)\s*\}\}|\{([\w.-]+)\}/g;function P(X){return F(X).replace(/`([^`]+)`/g,"<code>$1</code>").replace(/\*\*([^*]+)\*\*/g,"<strong>$1</strong>").replace(/(^|[^*\w])\*([^*\s][^*]*)\*(?!\w)/g,"$1<em>$2</em>").replace(c,(Q)=>`<span class="bp-message-var">${Q}</span>`)}var R0=/\[([^\]]+)\]\(([^)\s]+)\)|(https?:\/\/[^\s<>()]+[^\s<>().,;:!?'"])/g;function _(X){let Q="",Z=0;for(let $ of X.matchAll(R0)){Q+=P(X.slice(Z,$.index));let J=$[2]??$[3],V=$[1]??$[3];Q+=`<a href="${F(J)}" target="_blank" rel="noopener noreferrer">${P(V)}</a>`,Z=$.index+$[0].length}return Q+P(X.slice(Z))}var g=/^([A-Za-z][\w-]*):\s*(.*)$/,y=/^\s*-{3,}\s*$/;function S(X,Q){let Z=X.replace(/\r\n?/g,`
1241
+ `)}function p(X){return`\x00BPCODE${X}\x00`}var I0=/\u0000BPCODE(\d+)\u0000/g;function _0(X){let Q=[],Z=E(),$=[],J=null,V=()=>{if(!J)return;Q.push(J.join(`
1242
+ `)),$.push(p(Q.length-1)),J=null};for(let W of X.split(`
1243
+ `)){if(Z(W)){J??=[],J.push(W);continue}V(),$.push(W.replace(/(`+)(?:(?!\1)[\s\S])*\1/g,(Y)=>{return Q.push(Y),p(Q.length-1)}))}return V(),{masked:$.join(`
1244
+ `),restore:(W)=>W.replace(I0,(Y,j)=>Q[Number(j)]??Y)}}async function Q1(X,Q){let{masked:Z,restore:$}=_0(X);return $(await Q(Z))}var F0=["email","sms"];function R0(X){return F0.includes(X.toLowerCase())}function F(X){return X.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}var c=/\{\{\s*([\w.-]+)\s*\}\}|\{([\w.-]+)\}/g;function w(X){return F(X).replace(/`([^`]+)`/g,"<code>$1</code>").replace(/\*\*([^*]+)\*\*/g,"<strong>$1</strong>").replace(/(^|[^*\w])\*([^*\s][^*]*)\*(?!\w)/g,"$1<em>$2</em>").replace(c,(Q)=>`<span class="bp-message-var">${Q}</span>`)}var D0=/\[([^\]]+)\]\(([^)\s]+)\)|(https?:\/\/[^\s<>()]+[^\s<>().,;:!?'"])/g;function _(X){let Q="",Z=0;for(let $ of X.matchAll(D0)){Q+=w(X.slice(Z,$.index));let J=$[2]??$[3],V=$[1]??$[3];Q+=`<a href="${F(J)}" target="_blank" rel="noopener noreferrer">${w(V)}</a>`,Z=$.index+$[0].length}return Q+w(X.slice(Z))}var g=/^([A-Za-z][\w-]*):\s*(.*)$/,y=/^\s*-{3,}\s*$/;function S(X,Q){let Z=X.replace(/\r\n?/g,`
1245
1245
  `).replace(/^\n+|\n+$/g,"").split(`
1246
- `),$=[],J=0,V=Z.findIndex((q)=>y.test(q));if(V>0){let q=Z.slice(0,V).filter((j)=>j.trim()!=="");if(q.length>0&&q.every((j)=>g.test(j))){for(let j of q){let[,G,K]=j.match(g);$.push({key:G.toLowerCase(),value:K.trim()})}J=V+1}}let W=[[]];for(let q of Z.slice(J)){if(Q&&y.test(q)){W.push([]);continue}W[W.length-1].push(q)}return{headers:$,parts:W.map((q)=>D0(q)).filter((q)=>q.length>0)}}function D0(X){let Q=0,Z=X.length;while(Q<Z&&X[Q].trim()==="")Q++;while(Z>Q&&X[Z-1].trim()==="")Z--;return X.slice(Q,Z)}function O0(X){let Q=[[]];for(let Z of X){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 h=/^\s*\[([^\]]+)\]\(([^)\s]+)\)\s*$/,d=/^\s*[-*]\s+/;function H0(X){return O0(X).map((Q)=>{if(Q.length===1&&y.test(Q[0]))return"<hr>";if(Q.every((Z)=>h.test(Z)))return`<p class="bp-email-actions">${Q.map(($)=>{let[,J,V]=$.match(h);return`<a class="bp-email-button" href="${F(V)}" target="_blank" rel="noopener noreferrer">${P(J)}</a>`}).join("")}</p>`;if(Q.every((Z)=>d.test(Z)))return`<ul>${Q.map((Z)=>`<li>${_(Z.replace(d,""))}</li>`).join("")}</ul>`;if(Q.every((Z)=>Z.startsWith(">")))return`<blockquote>${Q.map((Z)=>_(Z.replace(/^>\s?/,""))).join("<br>")}</blockquote>`;return Q.join(`
1246
+ `),$=[],J=0,V=Z.findIndex((Y)=>y.test(Y));if(V>0){let Y=Z.slice(0,V).filter((j)=>j.trim()!=="");if(Y.length>0&&Y.every((j)=>g.test(j))){for(let j of Y){let[,M,z]=j.match(g);$.push({key:M.toLowerCase(),value:z.trim()})}J=V+1}}let W=[[]];for(let Y of Z.slice(J)){if(Q&&y.test(Y)){W.push([]);continue}W[W.length-1].push(Y)}return{headers:$,parts:W.map((Y)=>O0(Y)).filter((Y)=>Y.length>0)}}function O0(X){let Q=0,Z=X.length;while(Q<Z&&X[Q].trim()==="")Q++;while(Z>Q&&X[Z-1].trim()==="")Z--;return X.slice(Q,Z)}function H0(X){let Q=[[]];for(let Z of X){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 h=/^\s*\[([^\]]+)\]\(([^)\s]+)\)\s*$/,d=/^\s*[-*]\s+/;function A0(X){return H0(X).map((Q)=>{if(Q.length===1&&y.test(Q[0]))return"<hr>";if(Q.every((Z)=>h.test(Z)))return`<p class="bp-email-actions">${Q.map(($)=>{let[,J,V]=$.match(h);return`<a class="bp-email-button" href="${F(V)}" target="_blank" rel="noopener noreferrer">${w(J)}</a>`}).join("")}</p>`;if(Q.every((Z)=>d.test(Z)))return`<ul>${Q.map((Z)=>`<li>${_(Z.replace(d,""))}</li>`).join("")}</ul>`;if(Q.every((Z)=>Z.startsWith(">")))return`<blockquote>${Q.map((Z)=>_(Z.replace(/^>\s?/,""))).join("<br>")}</blockquote>`;return Q.join(`
1247
1247
  `).split(/\n\s*-{3,}\s*\n?/).map((Z)=>`<p>${Z.split(`
1248
1248
  `).map(_).join("<br>")}</p>`).join("<hr>")}).join(`
1249
- `)}var A0={from:"From",to:"To",cc:"Cc",bcc:"Bcc","reply-to":"Reply-To"};function l(X){return A0[X]??X.replace(/[-_]/g," ").replace(/^\w/,(Q)=>Q.toUpperCase())}function L0(X){let{headers:Q,parts:Z}=S(X,!1),$=Q.find((W)=>W.key==="subject")?.value,J=Q.find((W)=>W.key==="preheader")?.value,V=Q.filter((W)=>W.key!=="subject"&&W.key!=="preheader").map((W)=>`<div><dt>${F(l(W.key))}</dt><dd>${_(W.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>',$?`<div class="bp-email-subject">${_($)}</div>`:"",V?`<dl class="bp-email-headers">${V}</dl>`:"",J?`<div class="bp-email-preheader"><span>Preview text</span> ${_(J)}</div>`:"",`<div class="bp-email-body">${H0(Z[0]??[])}</div>`,"</figure>"].join("")}var C0=`@\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`,E0="^{}\\[~]|\u20AC\f";function P0(X){let Q=0,Z=!0;for(let J of X)if(C0.includes(J))Q+=1;else if(E0.includes(J))Q+=2;else{Z=!1;break}if(Z)return{encoding:"GSM-7",length:Q,segments:Q<=160?1:Math.ceil(Q/153)};let $=X.length;return{encoding:"UCS-2",length:$,segments:$<=70?1:Math.ceil($/67)}}function w0(X){let Q=X.replace(c,""),Z=Q!==X;if(Z&&Q.trim()==="")return'<div class="bp-sms-meta">Length depends on what is filled in</div>';let{encoding:$,length:J,segments:V}=P0(Q),W=Z?" + placeholders":"",q=`${Z?"at least ":""}${V} ${V===1?"segment":"segments"}`,j=`${J} ${$==="GSM-7"?"characters":"UTF-16 units"} (${$})${Z?", not counting placeholders":""}`;return`<div class="bp-sms-meta" title="${F(j)}">${J} chars${W} \xB7 ${q}${$==="UCS-2"?" \xB7 Unicode":""}</div>`}function y0(X){let{headers:Q,parts:Z}=S(X,!0),$=Q.find((j)=>j.key==="from")?.value??"",J=Q.find((j)=>j.key==="to")?.value,V=Q.filter((j)=>j.key!=="from"&&j.key!=="to").map((j)=>`<div><dt>${F(l(j.key))}</dt><dd>${_(j.value)}</dd></div>`).join(""),W=($.replace(/[^A-Za-z0-9]/g,"")[0]??"#").toUpperCase(),q=Z.map((j)=>{let G=j.every((Y)=>Y.trim()===""||Y.startsWith(">")),K=G?j.map((Y)=>Y.replace(/^>\s?/,"")):j,B=K.join(`
1251
- `),z=K.map(_).join("<br>");if(G)return`<div class="bp-sms-reply bp-sms-row"><div class="bp-sms-bubble">${z}</div></div>`;return`<div class="bp-sms-row"><div class="bp-sms-bubble">${z}</div>${w0(B)}</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(W)}</span>`,'<span class="bp-sms-who">',`<span class="bp-sms-from">${_($||"Text message")}</span>`,J?`<span class="bp-sms-to">to ${_(J)}</span>`:"","</span>",'<span class="bp-message-kind">SMS</span>',"</div>",V?`<dl class="bp-sms-details">${V}</dl>`:"",`<div class="bp-sms-thread">${q}</div>`,"</div>","</figure>"].join("")}function X1(X,Q){switch(X.toLowerCase()){case"email":return L0(Q);case"sms":return y0(Q);default:return null}}var Z1=`
1249
+ `)}var L0={from:"From",to:"To",cc:"Cc",bcc:"Bcc","reply-to":"Reply-To"};function l(X){return L0[X]??X.replace(/[-_]/g," ").replace(/^\w/,(Q)=>Q.toUpperCase())}function C0(X){let{headers:Q,parts:Z}=S(X,!1),$=Q.find((W)=>W.key==="subject")?.value,J=Q.find((W)=>W.key==="preheader")?.value,V=Q.filter((W)=>W.key!=="subject"&&W.key!=="preheader").map((W)=>`<div><dt>${F(l(W.key))}</dt><dd>${_(W.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>',$?`<div class="bp-email-subject">${_($)}</div>`:"",V?`<dl class="bp-email-headers">${V}</dl>`:"",J?`<div class="bp-email-preheader"><span>Preview text</span> ${_(J)}</div>`:"",`<div class="bp-email-body">${A0(Z[0]??[])}</div>`,"</figure>"].join("")}var E0=`@\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`,w0="^{}\\[~]|\u20AC\f";function P0(X){let Q=0,Z=!0;for(let J of X)if(E0.includes(J))Q+=1;else if(w0.includes(J))Q+=2;else{Z=!1;break}if(Z)return{encoding:"GSM-7",length:Q,segments:Q<=160?1:Math.ceil(Q/153)};let $=X.length;return{encoding:"UCS-2",length:$,segments:$<=70?1:Math.ceil($/67)}}function y0(X){let Q=X.replace(c,""),Z=Q!==X;if(Z&&Q.trim()==="")return'<div class="bp-sms-meta">Length depends on what is filled in</div>';let{encoding:$,length:J,segments:V}=P0(Q),W=Z?" + placeholders":"",Y=`${Z?"at least ":""}${V} ${V===1?"segment":"segments"}`,j=`${J} ${$==="GSM-7"?"characters":"UTF-16 units"} (${$})${Z?", not counting placeholders":""}`;return`<div class="bp-sms-meta" title="${F(j)}">${J} chars${W} \xB7 ${Y}${$==="UCS-2"?" \xB7 Unicode":""}</div>`}function S0(X){let{headers:Q,parts:Z}=S(X,!0),$=Q.find((j)=>j.key==="from")?.value??"",J=Q.find((j)=>j.key==="to")?.value,V=Q.filter((j)=>j.key!=="from"&&j.key!=="to").map((j)=>`<div><dt>${F(l(j.key))}</dt><dd>${_(j.value)}</dd></div>`).join(""),W=($.replace(/[^A-Za-z0-9]/g,"")[0]??"#").toUpperCase(),Y=Z.map((j)=>{let M=j.every((q)=>q.trim()===""||q.startsWith(">")),z=M?j.map((q)=>q.replace(/^>\s?/,"")):j,B=z.join(`
1251
+ `),K=z.map(_).join("<br>");if(M)return`<div class="bp-sms-reply bp-sms-row"><div class="bp-sms-bubble">${K}</div></div>`;return`<div class="bp-sms-row"><div class="bp-sms-bubble">${K}</div>${y0(B)}</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(W)}</span>`,'<span class="bp-sms-who">',`<span class="bp-sms-from">${_($||"Text message")}</span>`,J?`<span class="bp-sms-to">to ${_(J)}</span>`:"","</span>",'<span class="bp-message-kind">SMS</span>',"</div>",V?`<dl class="bp-sms-details">${V}</dl>`:"",`<div class="bp-sms-thread">${Y}</div>`,"</div>","</figure>"].join("")}function Z1(X,Q){switch(X.toLowerCase()){case"email":return C0(Q);case"sms":return S0(Q);default:return null}}var $1=`
1252
1252
  .bp-message {
1253
1253
  margin: 20px 0;
1254
1254
  font-size: 15px;
@@ -1492,16 +1492,16 @@ if (typeof document !== 'undefined') {
1492
1492
  color: var(--bp-c-text-3, #929295);
1493
1493
  }
1494
1494
  `;function r(X){let Q=[],Z=null,$=null;for(let J of X.split(`
1495
- `)){let V=J.match(/^\s{0,3}(`{3,}|~{3,})(.*)$/);if($){if(V&&V[1][0]===$.marker[0]&&V[1].length>=$.marker.length&&V[2].trim()===""){let{headers:W,parts:q}=S($.lines.join(`
1496
- `),!0);Q.push("",...W.map((j)=>j.value),...q.flat(),""),$=null}else $.lines.push(J);continue}if(Z){if(V&&V[1][0]===Z[0]&&V[1].length>=Z.length&&V[2].trim()==="")Z=null;Q.push(J);continue}if(V){if(F0(V[2].trim().split(/[\s{]/)[0]??""))$={marker:V[1],lines:[]};else Z=V[1];if(!$)Q.push(J);continue}Q.push(J)}return Q.join(`
1497
- `)}var S0={enabled:!0,position:["sidebar"],title:"Table of Contents",maxDepth:6,minDepth:2,className:"table-of-contents",smoothScroll:!0,activeHighlight:!0,collapsible:!0,exclude:[]};function v(X){return X.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 T(X){return X.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 b(X,Q){let Z=X,$=1;while(Q.has(X))X=`${Z}-${$}`,$++;return Q.add(X),X}function s(X,Q){return b(T(X),Q)}function v0(X){let Q=[],Z=new Set,$=/^(#{1,6})\s+(.+)$/gm,J;while((J=$.exec(X))!==null){let V=J[1].length,W=J[2].trim();if(!W)continue;if(W.includes("toc-ignore"))continue;let q=W.replace(/\s*<!-- toc-ignore -->\s*/g,"").trim();q=q.replace(/`([^`]+)`/g,"<code>$1</code>");let j=q.includes("<code>"),G=s(v(W),Z);Q.push({level:V,text:q,id:G,children:[],hasCode:j})}return Q}function T0(X){let Q=[],Z=[];for(let $ of X){while(Z.length>0&&Z[Z.length-1].level>=$.level)Z.pop();if(Z.length===0)Q.push($);else Z[Z.length-1].children.push($);Z.push($)}return Q}function b0(X,Q){let{minDepth:Z=2,maxDepth:$=6,exclude:J=[]}=Q,V=(W)=>{let q=[];for(let j of W){if(J.some((K)=>{if(K.startsWith("/")&&K.endsWith("/"))return new RegExp(K.slice(1,-1)).test(j.text);else return j.text===K}))continue;if(j.level>$)continue;let G=V(j.children);if(j.level>=Z&&j.level<=$)q.push({...j,children:G});else q.push(...G)}return q};return V(X)}function w(X){let{items:Q,title:Z,config:$}=X,{className:J,collapsible:V}=$,W=(q,j=0)=>{if(q.length===0)return"";let G=j===0?"toc-list":"toc-sublist",K=j===0?"toc-item":"toc-subitem";return`<ul class="${G}">
1498
- ${q.map((B)=>{let z=B.children.length>0,Y=z&&V?"toc-expand":"",M=z?W(B.children,j+1):"",I=50,N=B.text.length>50?`${B.text.substring(0,50)}...`:B.text,U=B.text.length>50?"toc-truncate":"";return`<li class="${B.hasCode?"toc-code":""} ${Y} ${K} ${U}">
1495
+ `)){let V=J.match(/^\s{0,3}(`{3,}|~{3,})(.*)$/);if($){if(V&&V[1][0]===$.marker[0]&&V[1].length>=$.marker.length&&V[2].trim()===""){let{headers:W,parts:Y}=S($.lines.join(`
1496
+ `),!0);Q.push("",...W.map((j)=>j.value),...Y.flat(),""),$=null}else $.lines.push(J);continue}if(Z){if(V&&V[1][0]===Z[0]&&V[1].length>=Z.length&&V[2].trim()==="")Z=null;Q.push(J);continue}if(V){if(R0(V[2].trim().split(/[\s{]/)[0]??""))$={marker:V[1],lines:[]};else Z=V[1];if(!$)Q.push(J);continue}Q.push(J)}return Q.join(`
1497
+ `)}var T0={enabled:!0,position:["sidebar"],title:"Table of Contents",maxDepth:6,minDepth:2,className:"table-of-contents",smoothScroll:!0,activeHighlight:!0,collapsible:!0,exclude:[]};function T(X){return X.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 v(X){return X.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 b(X,Q){let Z=X,$=1;while(Q.has(X))X=`${Z}-${$}`,$++;return Q.add(X),X}function s(X,Q){return b(v(X),Q)}function v0(X){let Q=[],Z=new Set,$=/^(#{1,6})\s+(.+)$/gm,J;while((J=$.exec(X))!==null){let V=J[1].length,W=J[2].trim();if(!W)continue;if(W.includes("toc-ignore"))continue;let Y=W.replace(/\s*<!-- toc-ignore -->\s*/g,"").trim();Y=Y.replace(/`([^`]+)`/g,"<code>$1</code>");let j=Y.includes("<code>"),M=s(T(W),Z);Q.push({level:V,text:Y,id:M,children:[],hasCode:j})}return Q}function b0(X){let Q=[],Z=[];for(let $ of X){while(Z.length>0&&Z[Z.length-1].level>=$.level)Z.pop();if(Z.length===0)Q.push($);else Z[Z.length-1].children.push($);Z.push($)}return Q}function x0(X,Q){let{minDepth:Z=2,maxDepth:$=6,exclude:J=[]}=Q,V=(W)=>{let Y=[];for(let j of W){if(J.some((z)=>{if(z.startsWith("/")&&z.endsWith("/"))return new RegExp(z.slice(1,-1)).test(j.text);else return j.text===z}))continue;if(j.level>$)continue;let M=V(j.children);if(j.level>=Z&&j.level<=$)Y.push({...j,children:M});else Y.push(...M)}return Y};return V(X)}function P(X){let{items:Q,title:Z,config:$}=X,{className:J,collapsible:V}=$,W=(Y,j=0)=>{if(Y.length===0)return"";let M=j===0?"toc-list":"toc-sublist",z=j===0?"toc-item":"toc-subitem";return`<ul class="${M}">
1498
+ ${Y.map((B)=>{let K=B.children.length>0,q=K&&V?"toc-expand":"",G=K?W(B.children,j+1):"",I=50,N=B.text.length>50?`${B.text.substring(0,50)}...`:B.text,U=B.text.length>50?"toc-truncate":"";return`<li class="${B.hasCode?"toc-code":""} ${q} ${z} ${U}">
1499
1499
  <a href="#${B.id}" class="toc-link" title="${B.text.replace(/<[^>]*>/g,"")}">${N}</a>
1500
- ${M}
1500
+ ${G}
1501
1501
  </li>`}).join(`
1502
1502
  `)}
1503
1503
  </ul>`};return[`<nav class="${J}" role="navigation" aria-label="${Z}">`,'<div class="toc-container">',` <h2 class="toc-title">${Z}</h2>`,` ${W(Q)}`,"</div>","</nav>"].join(`
1504
- `)}function o(X){return w(X).replace("table-of-contents","table-of-contents toc-inline inline-toc")}function x0(X){return w(X).replace("table-of-contents","table-of-contents toc-sidebar sidebar-toc")}function k0(X){return w(X).replace("table-of-contents","table-of-contents toc-floating floating-toc")}function f0(X,Q={}){let Z={...Q};if(typeof Z.position==="string")Z.position=[Z.position];let $={...S0,...Z},J=v0(X),V=T0(J),W=b0(V,$);return{title:$.title,items:W,config:$}}function J1(X,Q={}){let Z=f0(X,Q);return(Array.isArray(Q.position)?Q.position:[Q.position||"sidebar"]).map((J)=>{let V;switch(J){case"inline":V=o(Z);break;case"sidebar":V=x0(Z);break;case"floating":V=k0(Z);break;default:V=w(Z)}return{position:J,data:Z,html:V}})}function V1(X,Q){let Z=o(Q);return X.replace(/\[\[toc\]\]/gi,Z)}function W1(X){let Q=new Set;return X.replace(/<h([1-6])>(.*?)<\/h[1-6]>/gi,(Z,$,J)=>{let V=s(J.replace(/<[^>]*>/g,""),Q);return`<h${$} id="${V}"><a href="#${V}" class="heading-anchor">#</a>${J}</h${$}>`})}function Y1(){return`
1504
+ `)}function o(X){return P(X).replace("table-of-contents","table-of-contents toc-inline inline-toc")}function k0(X){return P(X).replace("table-of-contents","table-of-contents toc-sidebar sidebar-toc")}function m0(X){return P(X).replace("table-of-contents","table-of-contents toc-floating floating-toc")}function f0(X,Q={}){let Z={...Q};if(typeof Z.position==="string")Z.position=[Z.position];let $={...T0,...Z},J=v0(X),V=b0(J),W=x0(V,$);return{title:$.title,items:W,config:$}}function V1(X,Q={}){let Z=f0(X,Q);return(Array.isArray(Q.position)?Q.position:[Q.position||"sidebar"]).map((J)=>{let V;switch(J){case"inline":V=o(Z);break;case"sidebar":V=k0(Z);break;case"floating":V=m0(Z);break;default:V=P(Z)}return{position:J,data:Z,html:V}})}function W1(X,Q){let Z=o(Q);return X.replace(/\[\[toc\]\]/gi,Z)}function Y1(X){let Q=new Set;return X.replace(/<h([1-6])>(.*?)<\/h[1-6]>/gi,(Z,$,J)=>{let V=s(J.replace(/<[^>]*>/g,""),Q);return`<h${$} id="${V}"><a href="#${V}" class="heading-anchor">#</a>${J}</h${$}>`})}function q1(){return`
1505
1505
  .table-of-contents {
1506
1506
  position: sticky;
1507
1507
  top: 60px; /* Match navbar height */
@@ -1631,7 +1631,7 @@ html {
1631
1631
  max-width: 250px;
1632
1632
  }
1633
1633
  }
1634
- `}function q1(X={}){let Q=X.smoothScroll!==!1,Z=X.activeHighlight!==!1,$=X.collapsible!==!1;return`
1634
+ `}function j1(X={}){let Q=X.smoothScroll!==!1,Z=X.activeHighlight!==!1,$=X.collapsible!==!1;return`
1635
1635
  function initToc() {
1636
1636
  const tocLinks = document.querySelectorAll('.toc-link')
1637
1637
 
@@ -1733,7 +1733,7 @@ if (document.readyState === 'loading') {
1733
1733
  else {
1734
1734
  initToc()
1735
1735
  }
1736
- `}var{Glob:i,YAML:m0}=globalThis.Bun;import{join as u0}from"path";var U1="/search-index.json",O={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 X0(X){let Q=X?.options??{};return{...O,...Q,include:Q.include??O.include,exclude:Q.exclude??O.exclude,searchFields:Q.searchFields??O.searchFields,maxResults:Q.maxResults??X?.maxResults??O.maxResults,boost:{...O.boost,...Q.boost??{}}}}var a=[{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 p0(X){if(!X)return a;let Q=(Array.isArray(X)?X:[X]).map((J)=>String(J).toLowerCase()),Z={meta:!1,ctrl:!1,alt:!1,shift:!1},$="";for(let J of Q)if(J==="meta"||J==="cmd"||J==="command")Z.meta=!0;else if(J==="ctrl"||J==="control")Z.ctrl=!0;else if(J==="alt"||J==="option")Z.alt=!0;else if(J==="shift")Z.shift=!0;else $=J;if(!$)return a;return[{key:$,...Z}]}function n(X){if(typeof X!=="function")return null;let Q=Function.prototype.toString.call(X);return Q.includes("[native code]")?null:Q}function I1(X,Q){let Z=X?.search??X?.markdown?.search,$=X0(Z),J=Z?.resultOptions??{};return{indexUrl:Q,placeholder:Z?.placeholder??"Search documentation",lazy:Z?.lazy!==!1,maxResults:$.maxResults,minQueryLength:$.minQueryLength,searchFields:$.searchFields,boost:{title:$.boost.title??10,headings:$.boost.headings??5,content:$.boost.content??1},fuzzy:$.fuzzy,fuzziness:$.fuzziness,stemmer:$.stemmer,shortcuts:{keyboard:Z?.keyboardShortcuts!==!1,keys:p0(Z?.shortcut)},result:{showDescription:J.showDescription!==!1,descriptionLength:J.descriptionLength??180,highlightMatches:J.highlightMatches!==!1,showPath:J.showPath!==!1},tokenizeSource:n(Z?.options?.tokenize),onSearchSource:n(Z?.onSearch),locale:null}}function t(X){return p(r(X)).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 g0(X){let Q=X.match(/^---\r?\n([\s\S]*?)\r?\n---\r?\n?/);if(!Q)return{body:X,data:{}};let Z={};try{Z=m0.parse(Q[1])??{}}catch{Z={}}return{body:X.slice(Q[0].length),data:Z}}function h0(X){let Q=X.replace(/\.md$/,"");if(Q==="index")return"/";if(Q.endsWith("/index"))return`/${Q.slice(0,-6)}`;return`/${Q}`}function d0(X,Q,Z){let{body:$,data:J}=g0(Q);if(J.search===!1)return[];if(J.layout==="home")return[];let V=typeof J.search==="object"&&J.search!==null?J.search:{},W=Array.isArray(V.keywords)?V.keywords.map(String):[],q=h0(X),j=$.split(`
1737
- `),G=$.match(/^#\s+(.+)$/m),K=V.title||J.title||(G?G[1].trim():q),B=[],z=new Set,Y={title:K,anchor:"",level:1,buffer:[]},M=()=>{let N=t(Y.buffer.join(`
1738
- `)).slice(0,Z.maxContentLength);if(!N&&!Y.title)return;let U={url:Y.anchor?`${q}#${Y.anchor}`:q,page:K,title:t(Y.title)||K,text:N,level:Y.level};if(W.length)U.keywords=W;B.push(U)},I=E();for(let N of j){let U=I(N)?null:N.match(/^(#{1,6})\s+(.+?)\s*$/);if(!U){Y.buffer.push(N);continue}let H=U[1].length,A=U[2].replace(/\s*\{#([\w-]+)\}\s*$/,""),R=U[2].match(/\{#([\w-]+)\}\s*$/),D=b(R?R[1]:T(v(A)),z);if(H===1){Y.buffer.push("");continue}M(),Y={title:A,anchor:D,level:H,buffer:[]}}return M(),B.filter((N)=>N.text||N.level>1)}function c0(X,Q){let{storeFields:Z}=Q;if(!Z||!Z.length)return X;let $=new Set(["url",...Z]);if(Q.searchFields.includes("title"))$.add("title");if(Q.searchFields.includes("content"))$.add("text");if(Q.searchFields.includes("headings"))$.add("page");if(Q.searchFields.includes("keywords"))$.add("keywords");return X.map((J)=>{let V={};for(let[W,q]of Object.entries(J))if($.has(W)&&q!==void 0)V[W]=q;return V})}function e(X){return X.split("#")[0]}function l0(X,Q){if(!Q.enabled)return{locale:Q.defaultLocale,page:X};let Z=X.split("/");if(Z.length>1&&Q.locales.includes(Z[0])&&Z[0]!==Q.defaultLocale)return{locale:Z[0],page:Z.slice(1).join("/")};let $=X.match(/^(.*)\.([A-Za-z-]+)(\.md)$/);if($&&Q.locales.includes($[2]))return{locale:$[2],page:`${$[1]}${$[3]}`};return{locale:Q.defaultLocale,page:X}}async function _1(X,Q){let Z=Q?.search??Q?.markdown?.search,$=X0(Z),J=Q0(Q),V=$.exclude.map((G)=>new i(G)),W=[],q=new Set,j=new Map;for(let G of J.locales)j.set(G,new Set);for(let G of $.include){let K=new i(G);for await(let B of K.scan(X)){let z=B.replace(/\\/g,"/");if(V.some((Y)=>Y.match(z)))continue;q.add(z)}}for(let G of[...q].sort())try{let K=await Bun.file(u0(X,G)).text(),{locale:B,page:z}=l0(G,J);for(let Y of d0(z,K,$)){if(J.enabled)Y.locale=B,Y.url=L(J,B,Y.url);W.push(Y),j.get(B)?.add(e(Y.url))}}catch{}if(J.enabled){let G=W.filter((K)=>K.locale===J.defaultLocale);for(let K of J.locales){if(K===J.defaultLocale)continue;let B=j.get(K)??new Set;for(let z of G){let Y=L(J,K,z.url);if(B.has(e(Y)))continue;W.push({...z,url:Y,locale:K})}}}return c0(W,$)}function Z0(X){let Q={amp:"&",lt:"<",gt:">",quot:'"',apos:"'",nbsp:"\xA0"};return X.replace(/&(#x[\da-f]+|#\d+|[a-z]+);/gi,(Z,$)=>{if($[0]==="#"){let J=$[1]==="x"||$[1]==="X"?Number.parseInt($.slice(2),16):Number.parseInt($.slice(1),10);return Number.isFinite(J)&&J>0&&J<=1114111?String.fromCodePoint(J):Z}return Q[$.toLowerCase()]??Z})}function $0(X){return String(X??"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}var{Glob:r0}=globalThis.Bun;import{dirname as s0,isAbsolute as J0,join as o0,relative as V0,resolve as C,sep as W0}from"path";async function L1(X){let Q=[];for await(let Z of new r0("**/*.md").scan({cwd:X,onlyFiles:!0}))Q.push(o0(X,Z));return Q}function q0(X){return X.split("/").map((Q)=>encodeURIComponent(Q)).join("/")}function x(X){let Q=X==="index"?"":X.replace(/\/index$/,"/");return`/${q0(Q)}`}function k(X){return X.split("/").map((Z)=>encodeURIComponent(decodeURIComponent(Z))).join("/").replace(/\/+$/,"")||"/"}function C1(X,Q,Z){let $=C(Q),J={...Z,locales:[...Z.locales]},V=new Set(X.map((z)=>C(z))),W=new Map,q=new Set;for(let z of V){let Y=V0($,z).split(W0).join("/").replace(/\.md$/,"");if(Y===".."||Y.startsWith("../")||J0(Y))throw Error("Markdown source is outside the documentation root");let M=J.defaultLocale,I=!1;if(J.enabled){let N=Y.split("/");if(N.length>1&&J.locales.includes(N[0])&&N[0]!==J.defaultLocale)M=N.shift(),I=!0,Y=N.join("/");else{let U=Y.match(/^(.*)\.([A-Za-z-]+)$/);if(U&&J.locales.includes(U[2]))Y=U[1],M=U[2],I=!0}}W.set(z,{path:Y,locale:M,explicitLocale:I}),q.add(Y)}let j=[],G=new Map,K=new Map,B=new Map;for(let z of J.locales)for(let Y of q){let M=J.enabled?Y0(J,$,z,`/${Y}`).map((U)=>C(U)).find((U)=>V.has(U)):C($,`${Y}.md`);if(!M||!V.has(M))continue;let I=Object.freeze({sourceFile:M,relativePath:Y,locale:z}),N=`${z}\x00${k(x(Y))}`;if(K.has(N))throw Error(`Documentation pages share an output route: ${x(Y)}`);K.set(N,I),G.set(`${z}\x00${Y}`,I),B.set(`${z}\x00${k(`/${q0(Y)}`)}`,I),j.push(I)}return Object.freeze({pages:Object.freeze(j),findPage(z,Y){let M=`${z}\x00${k(Y)}`;return K.get(M)??B.get(M)},resolveLink(z,Y){if(!Y||/^(?:[a-z][a-z\d+.-]*:|\/|#|\?)/i.test(Y))return Y;let M=Y.search(/[?#]/),I=M===-1?Y:Y.slice(0,M),N=M===-1?"":Y.slice(M),U=I.replace(/%([\da-f]{2})/gi,(i0,j0)=>String.fromCharCode(Number.parseInt(j0,16)));if(!/\.md$/i.test(U))return Y;let H=decodeURIComponent(I),A=C(s0(z.sourceFile),H),R=V0($,A);if(R===".."||R.startsWith(`..${W0}`)||J0(R))return Y;let D=W.get(A);if(!D)throw Error(`Markdown link has no documentation source: ${I}`);let f=D.explicitLocale?D.locale:z.locale,m=G.get(`${f}\x00${D.path}`);if(!m)throw Error(`Markdown link has no rendered page: ${I}`);return`${L(J,f,x(m.relativePath))}${N}`}})}async function E1(X,Q,Z=new Map){let $=[Q.page],J=new Set(Z.keys()),V=await new HTMLRewriter().onDocument({comments(W){let q=Z.get(W.text);if(q===void 0)return;if(!J.delete(W.text))throw Error("Markdown include source boundary was duplicated");if(q===null){if($.length===1)throw Error("Markdown include source boundaries are unbalanced");$.pop()}else $.push(q);W.remove()}}).on("a[href]",{element(W){let q=Z0(W.getAttribute("href")),j=Q.catalog.resolveLink($[$.length-1],q);if(j!==q)W.setAttribute("href",$0(j))}}).transform(new Response(X)).text();if(J.size||$.length!==1)throw Error("Markdown include source boundaries did not survive rendering");return V}
1739
- export{K0 as A,G0 as B,M0 as C,n0 as D,p as E,e0 as F,X1 as G,Z1 as H,S0 as I,v as J,T as K,b as L,s as M,v0 as N,T0 as O,b0 as P,w as Q,o as R,x0 as S,k0 as T,f0 as U,J1 as V,V1 as W,W1 as X,Y1 as Y,q1 as Z,U1 as _,I1 as $,_1 as aa,Z0 as ba,$0 as ca,L1 as da,C1 as ea,E1 as fa};
1736
+ `}var{Glob:i,YAML:p0}=globalThis.Bun;import{join as u0}from"path";var _1="/search-index.json",O={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 Z0(X){let Q=X?.options??{};return{...O,...Q,include:Q.include??O.include,exclude:Q.exclude??O.exclude,searchFields:Q.searchFields??O.searchFields,maxResults:Q.maxResults??X?.maxResults??O.maxResults,boost:{...O.boost,...Q.boost??{}}}}var n=[{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 g0(X){if(!X)return n;let Q=(Array.isArray(X)?X:[X]).map((J)=>String(J).toLowerCase()),Z={meta:!1,ctrl:!1,alt:!1,shift:!1},$="";for(let J of Q)if(J==="meta"||J==="cmd"||J==="command")Z.meta=!0;else if(J==="ctrl"||J==="control")Z.ctrl=!0;else if(J==="alt"||J==="option")Z.alt=!0;else if(J==="shift")Z.shift=!0;else $=J;if(!$)return n;return[{key:$,...Z}]}function a(X){if(typeof X!=="function")return null;let Q=Function.prototype.toString.call(X);return Q.includes("[native code]")?null:Q}function F1(X,Q){let Z=X?.search??X?.markdown?.search,$=Z0(Z),J=Z?.resultOptions??{};return{indexUrl:Q,placeholder:Z?.placeholder??"Search documentation",lazy:Z?.lazy!==!1,maxResults:$.maxResults,minQueryLength:$.minQueryLength,searchFields:$.searchFields,boost:{title:$.boost.title??10,headings:$.boost.headings??5,content:$.boost.content??1},fuzzy:$.fuzzy,fuzziness:$.fuzziness,stemmer:$.stemmer,shortcuts:{keyboard:Z?.keyboardShortcuts!==!1,keys:g0(Z?.shortcut)},result:{showDescription:J.showDescription!==!1,descriptionLength:J.descriptionLength??180,highlightMatches:J.highlightMatches!==!1,showPath:J.showPath!==!1},tokenizeSource:a(Z?.options?.tokenize),onSearchSource:a(Z?.onSearch),locale:null}}function t(X){return u(r(X)).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 h0(X){let Q=X.match(/^---\r?\n([\s\S]*?)\r?\n---\r?\n?/);if(!Q)return{body:X,data:{}};let Z={};try{Z=p0.parse(Q[1])??{}}catch{Z={}}return{body:X.slice(Q[0].length),data:Z}}function d0(X){let Q=X.replace(/\.md$/,"");if(Q==="index")return"/";if(Q.endsWith("/index"))return`/${Q.slice(0,-6)}`;return`/${Q}`}function c0(X,Q,Z){let{body:$,data:J}=h0(Q);if(J.search===!1)return[];if(J.layout==="home")return[];let V=typeof J.search==="object"&&J.search!==null?J.search:{},W=Array.isArray(V.keywords)?V.keywords.map(String):[],Y=d0(X),j=$.split(`
1737
+ `),M=$.match(/^#\s+(.+)$/m),z=V.title||J.title||(M?M[1].trim():Y),B=[],K=new Set,q={title:z,anchor:"",level:1,buffer:[]},G=()=>{let N=t(q.buffer.join(`
1738
+ `)).slice(0,Z.maxContentLength);if(!N&&!q.title)return;let U={url:q.anchor?`${Y}#${q.anchor}`:Y,page:z,title:t(q.title)||z,text:N,level:q.level};if(W.length)U.keywords=W;B.push(U)},I=E();for(let N of j){let U=I(N)?null:N.match(/^(#{1,6})\s+(.+?)\s*$/);if(!U){q.buffer.push(N);continue}let H=U[1].length,A=U[2].replace(/\s*\{#([\w-]+)\}\s*$/,""),R=U[2].match(/\{#([\w-]+)\}\s*$/),D=b(R?R[1]:v(T(A)),K);if(H===1){q.buffer.push("");continue}G(),q={title:A,anchor:D,level:H,buffer:[]}}return G(),B.filter((N)=>N.text||N.level>1)}function l0(X,Q){let{storeFields:Z}=Q;if(!Z||!Z.length)return X;let $=new Set(["url",...Z]);if(Q.searchFields.includes("title"))$.add("title");if(Q.searchFields.includes("content"))$.add("text");if(Q.searchFields.includes("headings"))$.add("page");if(Q.searchFields.includes("keywords"))$.add("keywords");return X.map((J)=>{let V={};for(let[W,Y]of Object.entries(J))if($.has(W)&&Y!==void 0)V[W]=Y;return V})}function e(X){return X.split("#")[0]}function r0(X,Q){if(!Q.enabled)return{locale:Q.defaultLocale,page:X};let Z=X.split("/");if(Z.length>1&&Q.locales.includes(Z[0])&&Z[0]!==Q.defaultLocale)return{locale:Z[0],page:Z.slice(1).join("/")};let $=X.match(/^(.*)\.([A-Za-z-]+)(\.md)$/);if($&&Q.locales.includes($[2]))return{locale:$[2],page:`${$[1]}${$[3]}`};return{locale:Q.defaultLocale,page:X}}async function R1(X,Q){let Z=Q?.search??Q?.markdown?.search,$=Z0(Z),J=X0(Q),V=$.exclude.map((z)=>new i(z)),W=[],Y=new Set,j=new Map;for(let z of J.locales)j.set(z,new Set);for(let z of $.include){let B=new i(z);for await(let K of B.scan(X)){let q=K.replace(/\\/g,"/");if(V.some((G)=>G.match(q)))continue;Y.add(q)}}for(let z of[...Y].sort())try{let B=await Bun.file(u0(X,z)).text(),{locale:K,page:q}=r0(z,J);for(let G of c0(q,B,$)){if(J.enabled)G.locale=K,G.url=L(J,K,G.url);W.push(G),j.get(K)?.add(e(G.url))}}catch{}if(J.enabled){let z=W.filter((B)=>B.locale===J.defaultLocale);for(let B of J.locales){if(B===J.defaultLocale)continue;let K=j.get(B)??new Set;for(let q of z){let G=L(J,B,q.url);if(K.has(e(G)))continue;W.push({...q,url:G,locale:B})}}}let M=Q?Q0(Q):"";if(M)for(let z of W)z.url=`${M}${z.url}`;return l0(W,$)}function $0(X){let Q={amp:"&",lt:"<",gt:">",quot:'"',apos:"'",nbsp:"\xA0"};return X.replace(/&(#x[\da-f]+|#\d+|[a-z]+);/gi,(Z,$)=>{if($[0]==="#"){let J=$[1]==="x"||$[1]==="X"?Number.parseInt($.slice(2),16):Number.parseInt($.slice(1),10);return Number.isFinite(J)&&J>0&&J<=1114111?String.fromCodePoint(J):Z}return Q[$.toLowerCase()]??Z})}function J0(X){return String(X??"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}var{Glob:s0}=globalThis.Bun;import{dirname as o0,isAbsolute as V0,join as i0,relative as W0,resolve as C,sep as Y0}from"path";async function E1(X){let Q=[];for await(let Z of new s0("**/*.md").scan({cwd:X,onlyFiles:!0}))Q.push(i0(X,Z));return Q}function j0(X){return X.split("/").map((Q)=>encodeURIComponent(Q)).join("/")}function x(X){let Q=X==="index"?"":X.replace(/\/index$/,"/");return`/${j0(Q)}`}function k(X){return X.split("/").map((Z)=>encodeURIComponent(decodeURIComponent(Z))).join("/").replace(/\/+$/,"")||"/"}function w1(X,Q,Z){let $=C(Q),J={...Z,locales:[...Z.locales]},V=new Set(X.map((K)=>C(K))),W=new Map,Y=new Set;for(let K of V){let q=W0($,K).split(Y0).join("/").replace(/\.md$/,"");if(q===".."||q.startsWith("../")||V0(q))throw Error("Markdown source is outside the documentation root");let G=J.defaultLocale,I=!1;if(J.enabled){let N=q.split("/");if(N.length>1&&J.locales.includes(N[0])&&N[0]!==J.defaultLocale)G=N.shift(),I=!0,q=N.join("/");else{let U=q.match(/^(.*)\.([A-Za-z-]+)$/);if(U&&J.locales.includes(U[2]))q=U[1],G=U[2],I=!0}}W.set(K,{path:q,locale:G,explicitLocale:I}),Y.add(q)}let j=[],M=new Map,z=new Map,B=new Map;for(let K of J.locales)for(let q of Y){let G=J.enabled?q0(J,$,K,`/${q}`).map((U)=>C(U)).find((U)=>V.has(U)):C($,`${q}.md`);if(!G||!V.has(G))continue;let I=Object.freeze({sourceFile:G,relativePath:q,locale:K}),N=`${K}\x00${k(x(q))}`;if(z.has(N))throw Error(`Documentation pages share an output route: ${x(q)}`);z.set(N,I),M.set(`${K}\x00${q}`,I),B.set(`${K}\x00${k(`/${j0(q)}`)}`,I),j.push(I)}return Object.freeze({pages:Object.freeze(j),findPage(K,q){let G=`${K}\x00${k(q)}`;return z.get(G)??B.get(G)},resolveLink(K,q){if(!q||/^(?:[a-z][a-z\d+.-]*:|\/|#|\?)/i.test(q))return q;let G=q.search(/[?#]/),I=G===-1?q:q.slice(0,G),N=G===-1?"":q.slice(G),U=I.replace(/%([\da-f]{2})/gi,(n0,z0)=>String.fromCharCode(Number.parseInt(z0,16)));if(!/\.md$/i.test(U))return q;let H=decodeURIComponent(I),A=C(o0(K.sourceFile),H),R=W0($,A);if(R===".."||R.startsWith(`..${Y0}`)||V0(R))return q;let D=W.get(A);if(!D)throw Error(`Markdown link has no documentation source: ${I}`);let m=D.explicitLocale?D.locale:K.locale,f=M.get(`${m}\x00${D.path}`);if(!f)throw Error(`Markdown link has no rendered page: ${I}`);return`${L(J,m,x(f.relativePath))}${N}`}})}async function P1(X,Q,Z=new Map){let $=[Q.page],J=new Set(Z.keys()),V=await new HTMLRewriter().onDocument({comments(W){let Y=Z.get(W.text);if(Y===void 0)return;if(!J.delete(W.text))throw Error("Markdown include source boundary was duplicated");if(Y===null){if($.length===1)throw Error("Markdown include source boundaries are unbalanced");$.pop()}else $.push(Y);W.remove()}}).on("a[href]",{element(W){let Y=$0(W.getAttribute("href")),j=Q.catalog.resolveLink($[$.length-1],Y);if(j!==Y)W.setAttribute("href",J0(j))}}).transform(new Response(X)).text();if(J.size||$.length!==1)throw Error("Markdown include source boundaries did not survive rendering");return V}
1739
+ export{G0 as z,B0 as A,U0 as B,t0 as C,u as D,Q1 as E,Z1 as F,$1 as G,T0 as H,T as I,v as J,b as K,s as L,v0 as M,b0 as N,x0 as O,P,o as Q,k0 as R,m0 as S,f0 as T,V1 as U,W1 as V,Y1 as W,q1 as X,j1 as Y,_1 as Z,F1 as _,R1 as $,$0 as aa,J0 as ba,E1 as ca,w1 as da,P1 as ea};
package/dist/src/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{a as W,b as X,c as Y,d as Z,e as _,f as $,g as b,h as v,i as A,j as Bj,k as Dj,l as Ej,m as Gj,n as Hj,o as Ij}from"../chunk-m7y4g28p.js";import{v as j,w as k,x as q,y as u,z as w}from"../chunk-xjz041s0.js";import{$ as B,A as Q,B as S,C as T,D as V,I as p,J as f,K as c,L as d,M as g,N as a,O as n,P as o,Q as r,R as t,S as i,T as s,U as e,V as jj,W as kj,X as qj,Y as uj,Z as wj,_ as z,aa as D,ba as zj}from"../chunk-8rsrw3sw.js";import{ia as F,ja as R,ka as U,la as m,ma as x,na as C,oa as l,pa as h,qa as y}from"../chunk-ynp2pgxy.js";export{Ej as wrapInLayout,Dj as stripConfiguredBasePath,Hj as startServer,U as splitLocaleFromPath,X as setLanguageAliases,Ij as serveCLI,F as resolveI18nConfig,W as resetHighlighter,d as reserveUniqueSlug,kj as processInlineTocSyntax,v as prewarmHighlighter,Y as normalizeLanguage,Gj as markdownToHtml,f as markdownHeadingText,m as localizeUrl,l as localeLabel,x as localeContentCandidates,R as loadI18nTranslations,Z as isLanguageSupported,$ as highlightCodeSync,_ as highlightCode,b as getSyntaxHighlightingStyles,A as getHighlighterInstance,Bj as getConfiguredBasePath,V as getConfig,g as generateUniqueSlug,uj as generateTocStyles,wj as generateTocScripts,jj as generateTocPositions,r as generateTocHtml,e as generateTocData,c as generateSlug,w as generateSitemap,i as generateSidebarTocHtml,k as generateRssFeed,q as generateRobotsTxt,y as generateLocaleDetectionScript,t as generateInlineTocHtml,h as generateHreflangTags,s as generateFloatingTocHtml,o as filterHeadings,a as extractHeadings,qj as enhanceHeadingsWithAnchors,p as defaultTocConfig,Q as defaultConfig,zj as decodeHtmlEntities,C as configForLocale,T as config,n as buildTocHierarchy,u as buildSitemap,B as buildSearchRuntimeConfig,D as buildSearchIndex,j as buildRssFeed,S as applyConfigPlugins,z as SEARCH_INDEX_PATH};
2
+ import{a as W,b as X,c as Y,d as Z,e as _,f as $,g as b,h as v,i as A,j as Dj,k as Ej,l as Gj,m as Hj,n as Ij}from"../chunk-a6b6xwxm.js";import{u as j,v as k,w as q,x as u,y as w}from"../chunk-5dtz0br7.js";import{$ as D,A as S,B as T,C as V,H as f,I as c,J as d,K as g,L as a,M as n,N as o,O as r,P as t,Q as i,R as s,S as e,T as jj,U as kj,V as qj,W as uj,X as wj,Y as zj,Z as z,_ as B,aa as Bj,z as Q}from"../chunk-vm81tncs.js";import{ha as F,ia as R,ja as U,ka as m,la as x,ma as C,na as l,oa as h,pa as y,qa as p}from"../chunk-gn1n2yxt.js";export{Ej as wrapInLayout,Dj as stripConfiguredBasePath,Hj as startServer,m as splitLocaleFromPath,X as setLanguageAliases,Ij as serveCLI,R as resolveI18nConfig,W as resetHighlighter,g as reserveUniqueSlug,qj as processInlineTocSyntax,v as prewarmHighlighter,Y as normalizeLanguage,Gj as markdownToHtml,c as markdownHeadingText,x as localizeUrl,h as localeLabel,C as localeContentCandidates,U as loadI18nTranslations,Z as isLanguageSupported,$ as highlightCodeSync,_ as highlightCode,b as getSyntaxHighlightingStyles,A as getHighlighterInstance,F as getConfiguredBasePath,V as getConfig,a as generateUniqueSlug,wj as generateTocStyles,zj as generateTocScripts,kj as generateTocPositions,t as generateTocHtml,jj as generateTocData,d as generateSlug,w as generateSitemap,s as generateSidebarTocHtml,k as generateRssFeed,q as generateRobotsTxt,p as generateLocaleDetectionScript,i as generateInlineTocHtml,y as generateHreflangTags,e as generateFloatingTocHtml,r as filterHeadings,n as extractHeadings,uj as enhanceHeadingsWithAnchors,f as defaultTocConfig,Q as defaultConfig,Bj as decodeHtmlEntities,l as configForLocale,T as config,o as buildTocHierarchy,u as buildSitemap,B as buildSearchRuntimeConfig,D as buildSearchIndex,j as buildRssFeed,S as applyConfigPlugins,z as SEARCH_INDEX_PATH};
@@ -1,9 +1,9 @@
1
1
  import { config } from './config';
2
2
  import { decodeHtmlEntities } from './html-entities';
3
+ import { getConfiguredBasePath } from './site-url';
3
4
  import type { BunPressConfig, Frontmatter } from './types';
4
5
  import type { MarkdownPageContext } from './markdown-pages';
5
6
  import type { ResolvedI18n } from './i18n';
6
- export declare function getConfiguredBasePath(config: BunPressConfig): string;
7
7
  export declare function stripConfiguredBasePath(config: BunPressConfig, pathname: string): string;
8
8
  export declare function wrapInLayout(content: string, siteConfig: BunPressConfig, currentPath: string, layout?: string, frontmatter?: Frontmatter, options?: WrapLayoutOptions): Promise<string>;
9
9
  /**
@@ -48,4 +48,5 @@ export declare interface WrapLayoutOptions {
48
48
  sourceFile?: string
49
49
  docsDir?: string
50
50
  }
51
+ export { getConfiguredBasePath } from './site-url';
51
52
  export { decodeHtmlEntities } from './html-entities';
@@ -14,3 +14,5 @@ import type { BunPressConfig } from './types';
14
14
  * moves; `url` is the place to say it once.
15
15
  */
16
16
  export declare function siteUrl(config: BunPressConfig): string;
17
+ /** Shared deployment prefix for rendered pages and generated navigation data. */
18
+ export declare function getConfiguredBasePath(config: BunPressConfig): string;
@@ -0,0 +1,6 @@
1
+ <button class="sidebar-section-toggle" onclick="toggleSection(this.parentElement)" type="button">
2
+ <span>{{ title }}</span>
3
+ <svg class="chevron" fill="none" stroke="currentColor" viewBox="0 0 24 24">
4
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path>
5
+ </svg>
6
+ </button>
@@ -1,10 +1,5 @@
1
1
  <div class="BPSidebarItem sidebar-section{{ collapsedClass }}">
2
- <button class="sidebar-section-toggle" onclick="toggleSection(this.parentElement)" type="button">
3
- <span>{{ title }}</span>
4
- <svg class="chevron" fill="none" stroke="currentColor" viewBox="0 0 24 24">
5
- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path>
6
- </svg>
7
- </button>
2
+ {!! heading !!}
8
3
  <div class="sidebar-items-wrapper">
9
4
  <ul class="sidebar-items">
10
5
  {!! items !!}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/bunpress",
3
3
  "type": "module",
4
- "version": "0.2.22",
4
+ "version": "0.2.23",
5
5
  "description": "Modern documentation engine. Powered by Bun.",
6
6
  "author": "Chris Breuer <chris@stacksjs.org>",
7
7
  "license": "MIT",
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{j as b,k as c,l as d,m as e,n as f,o as g}from"./chunk-m7y4g28p.js";import{ba as a}from"./chunk-8rsrw3sw.js";import"./chunk-ynp2pgxy.js";export{d as wrapInLayout,c as stripConfiguredBasePath,f as startServer,g as serveCLI,e as markdownToHtml,b as getConfiguredBasePath,a as decodeHtmlEntities};
@@ -1,38 +0,0 @@
1
- // @bun
2
- var j=import.meta.require;function X(q){return(q.sitemap?.baseUrl||q.url||"").replace(/\/$/,"")}var Y={"search.placeholder":"Search documentation","toc.title":"On this page","nav.menu":"Menu","search.noResults":"No results for","theme.toggle":"Toggle dark mode"};function O(q){let B=q?.i18n,H=(B?.locales??[]).filter(Boolean),J=B?.defaultLocale||H[0]||q?.lang||"en",K=(B?.enabled??H.length>1)&&H.length>0;return{enabled:K,locales:K?H:[J],defaultLocale:J,fallbackLocale:B?.fallbackLocale??J,localePath:B?.localePath??"./locales",detectLocale:B?.detectLocale===!0,localeNames:B?.localeNames??{},localeConfig:B?.localeConfig??{},translate:(M)=>Y[M]??M}}async function A(q,B){if(!q.enabled)return q;try{let{createTranslator:H,loadTranslations:J}=await import("@stacksjs/ts-i18n"),K=await J({translationsDir:q.localePath,defaultLocale:q.defaultLocale,fallbackLocale:q.fallbackLocale,sources:B?.i18n?.sources??["ts","yaml","json"],optional:!0,verbose:!1}),M=H(K,{defaultLocale:q.defaultLocale,fallbackLocale:q.fallbackLocale}),V=new Set;for(let N of Object.values(K))for(let P of Object.keys(N??{}))V.add(P);let Z=[...V].sort((N,P)=>N==="theme"?-1:P==="theme"?1:N.localeCompare(P));return{...q,translate:(N,P,$)=>{for(let W of[N,...Z.map((Q)=>`${Q}.${N}`)])try{let Q=M(W,P,$);if(typeof Q==="string"&&Q&&Q!==W)return Q}catch{}return Y[N]??N}}}catch(H){return console.warn("[bunpress] i18n translations could not be loaded; falling back to defaults \u2014",H instanceof Error?H.message:H),q}}function E(q,B){if(!q.enabled)return{locale:q.defaultLocale,path:B};let H=B.match(/^\/([^/]+)(\/.*)?$/);if(H&&q.locales.includes(H[1])&&H[1]!==q.defaultLocale)return{locale:H[1],path:H[2]||"/"};return{locale:q.defaultLocale,path:B}}function x(q,B,H){if(!q.enabled||B===q.defaultLocale)return H||"/";return`/${B}${H==="/"?"":H}`||`/${B}`}function I(q,B,H,J){let K=J==="/"?"/index":J,M=[];if(q.enabled&&H!==q.defaultLocale)M.push(`${B}/${H}${K}.md`),M.push(`${B}/${H}${K}/index.md`),M.push(`${B}${K}.${H}.md`);if(M.push(`${B}${K}.md`),M.push(`${B}${K}/index.md`),q.enabled)M.push(`${B}${K}.${q.defaultLocale}.md`);return M}function _(q,B,H){let J=B.localeConfig[H];if(!J)return q;return{...q,...J,themeConfig:J.themeConfig?{...q.themeConfig,...J.themeConfig}:q.themeConfig,markdown:J.markdown?{...q.markdown,...J.markdown}:q.markdown}}function D(q,B){return q.localeNames[B]??B}function F(q,B,H){if(!q.enabled)return"";let J=X(B);if(!J)return"";let K=q.locales.map((M)=>{let V=`${J}${x(q,M,H==="/index"?"/":H)}`;return`<link rel="alternate" hreflang="${M}" href="${V}">`});return K.push(`<link rel="alternate" hreflang="x-default" href="${J}${H==="/index"?"/":H}">`),K.join(`
3
- `)}function R(q){if(!q.enabled||!q.detectLocale)return"";return`
4
- (function () {
5
- var LOCALES = ${JSON.stringify(q.locales)};
6
- var DEFAULT = ${JSON.stringify(q.defaultLocale)};
7
- var KEY = 'bunpress-locale';
8
-
9
- try {
10
- var current = location.pathname.split('/')[1];
11
- if (LOCALES.indexOf(current) !== -1) {
12
- // Reading a non-default locale is itself a choice; remember it.
13
- localStorage.setItem(KEY, current);
14
- return;
15
- }
16
- if (localStorage.getItem(KEY)) return;
17
-
18
- var preferred = (navigator.languages || [navigator.language || ''])
19
- .map(function (tag) { return String(tag).toLowerCase(); });
20
-
21
- for (var i = 0; i < preferred.length; i++) {
22
- var tag = preferred[i];
23
- var exact = LOCALES.indexOf(tag) !== -1 ? tag : null;
24
- // 'en-GB' should match an 'en' locale.
25
- var base = exact || (LOCALES.indexOf(tag.split('-')[0]) !== -1 ? tag.split('-')[0] : null);
26
- if (base && base !== DEFAULT) {
27
- localStorage.setItem(KEY, base);
28
- location.replace(\`/\${base}\${location.pathname}\${location.search}\${location.hash}\`);
29
- return;
30
- }
31
- if (base === DEFAULT) return;
32
- }
33
- } catch (_) {
34
- // Storage or history unavailable: leave the reader where they are.
35
- }
36
- })();
37
- `.trim()}
38
- export{j as ga,X as ha,O as ia,A as ja,E as ka,x as la,I as ma,_ as na,D as oa,F as pa,R as qa};