boltdocs 1.11.0 → 2.0.0
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/CHANGELOG.md +7 -0
- package/LICENSE +21 -0
- package/dist/cache-7G6D532T.mjs +1 -0
- package/dist/chunk-A4HQPEPU.mjs +1 -0
- package/dist/chunk-BA5NH5HU.mjs +1 -0
- package/dist/chunk-BQCD3DWG.mjs +1 -0
- package/dist/chunk-H63UMKYF.mjs +1 -0
- package/dist/chunk-IWHRQHS7.mjs +1 -0
- package/dist/chunk-JZXLCA2E.mjs +1 -0
- package/dist/chunk-MFU7Q6WF.mjs +1 -0
- package/dist/chunk-QYPNX5UN.mjs +1 -0
- package/dist/chunk-XEAPSFMB.mjs +1 -0
- package/dist/client/components/mdx/index.d.mts +209 -0
- package/dist/client/components/mdx/index.d.ts +209 -0
- package/dist/client/components/mdx/index.js +1 -0
- package/dist/client/components/mdx/index.mjs +1 -0
- package/dist/client/hooks/index.d.mts +133 -0
- package/dist/client/hooks/index.d.ts +133 -0
- package/dist/client/hooks/index.js +1 -0
- package/dist/client/hooks/index.mjs +1 -0
- package/dist/client/index.d.mts +212 -0
- package/dist/client/index.d.ts +212 -0
- package/dist/client/index.js +1 -0
- package/dist/client/index.mjs +1 -0
- package/dist/client/ssr.d.mts +31 -0
- package/dist/client/ssr.d.ts +31 -0
- package/dist/client/ssr.js +1 -0
- package/dist/client/ssr.mjs +1 -0
- package/dist/config-CX4l-ZNp.d.mts +166 -0
- package/dist/config-CX4l-ZNp.d.ts +166 -0
- package/dist/node/index.d.mts +89 -0
- package/dist/node/index.d.ts +89 -0
- package/dist/node/index.js +57 -0
- package/dist/node/index.mjs +57 -0
- package/dist/search-dialog-EB3N4TYM.mjs +1 -0
- package/dist/types-BuZWFT7r.d.ts +159 -0
- package/dist/types-CvT-SGbK.d.mts +159 -0
- package/dist/use-routes-5bAtAAYX.d.mts +30 -0
- package/dist/use-routes-BefRXY3v.d.ts +30 -0
- package/package.json +10 -10
- package/src/client/app/index.tsx +9 -6
- package/src/client/types.ts +1 -1
- package/src/node/plugin/index.ts +0 -1
- package/src/node/routes/parser.ts +27 -32
- package/src/node/ssg/index.ts +29 -3
- package/src/node/utils.ts +23 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var Rs=Object.create;var vt=Object.defineProperty;var Ns=Object.getOwnPropertyDescriptor;var ws=Object.getOwnPropertyNames;var Ts=Object.getPrototypeOf,ks=Object.prototype.hasOwnProperty;var N=(e,t)=>()=>(e&&(t=e(e=0)),t);var So=(e,t)=>{for(var o in t)vt(e,o,{get:t[o],enumerable:!0})},vr=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of ws(t))!ks.call(e,n)&&n!==o&&vt(e,n,{get:()=>t[n],enumerable:!(r=Ns(t,n))||r.enumerable});return e};var k=(e,t,o)=>(o=e!=null?Rs(Ts(e)):{},vr(t||!e||!e.__esModule?vt(o,"default",{value:e,enumerable:!0}):o,e)),Ls=e=>vr(vt({},"__esModule",{value:!0}),e);var i=N(()=>{"use strict"});function M(){let e=(0,yt.use)(Io);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e}var yt,Io,Y=N(()=>{"use strict";i();yt=require("react"),Io=(0,yt.createContext)(null)});function Bo(e){let t=(0,yr.useLocation)(),o=M();if(!o||typeof e!="string"||!o.i18n&&!o.versions)return e;let r="/docs";if(!e.startsWith(r))return e;let s=t.pathname.substring(r.length).split("/").filter(Boolean),l=o.versions?.defaultVersion,c=o.i18n?.defaultLocale,m=0;o.versions&&s.length>m&&o.versions.versions[s[m]]&&(l=s[m],m++),o.i18n&&s.length>m&&o.i18n.locales[s[m]]&&(c=s[m]);let d=e.substring(r.length).split("/").filter(Boolean),u=0,g=!1,h=!1;o.versions&&d.length>u&&o.versions.versions[d[u]]&&(g=!0,u++),o.i18n&&d.length>u&&o.i18n.locales[d[u]]&&(h=!0,u++);let b=d.slice(u),x=[];o.versions&&(g?x.push(d[0]):l&&x.push(l)),o.i18n&&(h?x.push(d[g?1:0]):c&&x.push(c)),x.push(...b);let I=`${r}/${x.join("/")}`;return I.endsWith("/")&&(I=I.slice(0,-1)),I===r?r:I}var yr,Cr=N(()=>{"use strict";i();yr=require("react-router-dom");Y()});function Ct(){return(0,we.use)(Pr)}function Rr({routes:e,modules:t,children:o}){let r=(0,we.useRef)(null),n=(0,we.useCallback)(s=>{r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{let l=s.split("#")[0].split("?")[0],c=e.find(m=>m.path===l||l==="/"&&m.path==="");if(c?.filePath){let m=Object.keys(t).find(a=>a.endsWith("/"+c.filePath));m&&t[m]().catch(a=>{console.error(`[boltdocs] Failed to preload route ${s}:`,a)})}},100)},[e,t]);return(0,Nr.jsx)(Pr.Provider,{value:{preload:n,routes:e},children:o})}var we,Nr,Pr,Pt=N(()=>{"use strict";i();we=require("react"),Nr=require("react/jsx-runtime"),Pr=(0,we.createContext)({preload:()=>{},routes:[]})});function p(...e){return(0,Tr.twMerge)((0,wr.clsx)(e))}var wr,Tr,C=N(()=>{"use strict";i();wr=require("clsx"),Tr=require("tailwind-merge")});var Ao,kr,Lr,Mo,G,Ss,Ve=N(()=>{"use strict";i();Ao=k(require("react")),kr=require("react-aria-components"),Lr=require("react-router-dom");Cr();Pt();C();Mo=require("react/jsx-runtime"),G=Ao.default.forwardRef((e,t)=>{let{href:o,prefetch:r="hover",onMouseEnter:n,onFocus:s,...l}=e,c=Bo(o??""),{preload:m}=Ct();return(0,Mo.jsx)(kr.Link,{...l,ref:t,href:c,onMouseEnter:u=>{n?.(u),r==="hover"&&typeof c=="string"&&c.startsWith("/")&&m(c)},onFocus:u=>{s?.(u),r==="hover"&&typeof c=="string"&&c.startsWith("/")&&m(c)}})});G.displayName="Link";Ss=Ao.default.forwardRef((e,t)=>{let{href:o,end:r=!1,className:n,children:s,...l}=e,c=(0,Lr.useLocation)(),m=Bo(o??""),a=r?c.pathname===m:c.pathname.startsWith(m),d=typeof n=="function"?n({isActive:a}):p(n,a&&"active"),u=typeof s=="function"?s({isActive:a}):s;return(0,Mo.jsx)(G,{...l,ref:t,href:o,className:d,children:u})});Ss.displayName="NavLink"});var Lt,Xr,se,kt,ie,St=N(()=>{"use strict";i();Lt=k(require("react-aria-components"));C();Xr=require("class-variance-authority"),se=require("react/jsx-runtime"),kt=(0,Xr.cva)("flex flex-row items-center justify-center w-auto font-semibold tracking-tight no-underline whitespace-nowrap select-none outline-none transition-all duration-200 cursor-pointer pressed:scale-[0.97] hover:-translate-y-px leading-none",{variants:{variant:{primary:"bg-primary-500 text-white shadow-md hover:brightness-110 hover:shadow-lg",secondary:"bg-bg-surface text-text-main border border-border-subtle hover:bg-bg-muted hover:border-border-strong",outline:"bg-transparent text-text-main border border-border-strong hover:bg-bg-surface hover:border-primary-500",ghost:"bg-transparent text-text-muted hover:bg-bg-surface hover:text-text-main",danger:"bg-[var(--color-danger-500)]/10 text-[var(--color-danger-500)] border border-[var(--color-danger-500)]/20 hover:bg-[var(--color-danger-500)]/15",success:"bg-[var(--color-success-500)]/10 text-[var(--color-success-500)] border border-[var(--color-success-500)]/20 hover:bg-[var(--color-success-500)]/15",warning:"bg-[var(--color-warning-500)]/10 text-[var(--color-warning-500)] border border-[var(--color-warning-500)]/20 hover:bg-[var(--color-warning-500)]/15",info:"bg-[var(--color-info-500)]/10 text-[var(--color-info-500)] border border-[var(--color-info-500)]/20 hover:bg-[var(--color-info-500)]/15",subtle:"bg-primary-500/10 text-primary-500 hover:bg-primary-500/20",link:"bg-transparent text-primary-500 !p-0 !min-h-0 hover:underline"},size:{sm:"min-h-8 px-3.5 text-[0.8125rem] gap-1.5",md:"min-h-10 px-5 text-[0.9375rem] gap-2",lg:"min-h-12 px-7 text-[1.05rem] gap-2.5"},rounded:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"},iconSize:{sm:"w-8 h-8 p-0",md:"w-10 h-10 p-0",lg:"w-12 h-12 p-0"},disabled:{true:"opacity-50 cursor-not-allowed pointer-events-none",false:null}},defaultVariants:{variant:"primary",size:"md",rounded:"md"}}),ie=({href:e,icon:t,iconPosition:o="left",isIconOnly:r,children:n,className:s,variant:l,size:c,rounded:m,iconSize:a,disabled:d,...u})=>{let g=r||!n&&!!t,h=g?(0,se.jsx)("span",{className:"inline-flex items-center justify-center [&>svg]:w-[1.2rem] [&>svg]:h-[1.2rem]",children:t}):(0,se.jsxs)(se.Fragment,{children:[t&&o==="left"&&(0,se.jsx)("span",{className:"inline-flex items-center shrink-0 [&>svg]:w-[1.1rem] [&>svg]:h-[1.1rem]",children:t}),(0,se.jsx)("span",{className:"flex items-center",children:n}),t&&o==="right"&&(0,se.jsx)("span",{className:"inline-flex items-center shrink-0 [&>svg]:w-[1.1rem] [&>svg]:h-[1.1rem]",children:t})]});return e?(0,se.jsx)(Lt.Link,{href:e,className:p(kt({variant:l,size:c,rounded:m,iconSize:g?a:void 0,disabled:d}),s),...u,children:h}):(0,se.jsx)(Lt.Button,{className:p(kt({variant:l,size:c,rounded:m,iconSize:g?a:void 0,disabled:d}),s),...u,children:h})}});function at(e){let{size:t=20,...o}=e;return{...o,width:t,height:t}}var D,Mt,Yr,en,tn,on,Et=N(()=>{"use strict";i();D=require("react/jsx-runtime");Mt=e=>(0,D.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...at(e),children:[(0,D.jsx)("title",{children:"GitHub"}),(0,D.jsx)("path",{d:"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"})]}),Yr=e=>(0,D.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...at(e),children:[(0,D.jsx)("title",{children:"Discord"}),(0,D.jsx)("path",{d:"M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.057 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028c.462-.63.874-1.295 1.226-1.994a.076.076 0 0 0-.041-.106 13.107 13.107 0 0 1-1.872-.892.077.077 0 0 1-.008-.128 10.2 10.2 0 0 0 .372-.292.074.074 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127 12.299 12.299 0 0 1-1.873.892.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028 19.839 19.839 0 0 0 6.002-3.03.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418Z"})]}),en=e=>(0,D.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...at(e),children:[(0,D.jsx)("title",{children:"X"}),(0,D.jsx)("path",{d:"M14.234 10.162 22.977 0h-2.072l-7.591 8.824L7.251 0H.258l9.168 13.343L.258 24H2.33l8.016-9.318L16.749 24h6.993zm-2.837 3.299-.929-1.329L3.076 1.56h3.182l5.965 8.532.929 1.329 7.754 11.09h-3.182z"})]}),tn=e=>(0,D.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...at(e),children:[(0,D.jsx)("title",{children:"CodeSandbox"}),(0,D.jsx)("path",{d:"M0 24h24V0H0v2.455h21.546v19.09H2.454V0H0Z"})]}),on=e=>(0,D.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...at(e),children:[(0,D.jsx)("title",{children:"Bluesky"}),(0,D.jsx)("path",{d:"M5.202 2.857C7.954 4.922 10.913 9.11 12 11.358c1.087-2.247 4.046-6.436 6.798-8.501C20.783 1.366 24 .213 24 3.883c0 .732-.42 6.156-.667 7.037-.856 3.061-3.978 3.842-6.755 3.37 4.854.826 6.089 3.562 3.422 6.299-5.065 5.196-7.28-1.304-7.847-2.97-.104-.305-.152-.448-.153-.327 0-.121-.05.022-.153.327-.568 1.666-2.782 8.166-7.847 2.97-2.667-2.737-1.432-5.473 3.422-6.3-2.777.473-5.899-.308-6.755-3.369C.42 10.04 0 4.615 0 3.883c0-3.67 3.217-2.517 5.202-1.026"})]})});var ze,ee,Bs,Ho,zo=N(()=>{"use strict";i();ze=k(require("react-aria-components"));C();ee=require("react/jsx-runtime"),Bs=({className:e,children:t,...o})=>(0,ee.jsx)(ze.Tooltip,{...o,offset:8,className:r=>p("group z-50 overflow-visible rounded-md bg-bg-surface/90 px-2.5 py-1.5 text-xs font-medium text-text-main shadow-lg backdrop-blur-md ring-1 ring-border-subtle outline-hidden select-none","data-entering:animate-in data-entering:fade-in data-entering:zoom-in-95 data-entering:duration-100","data-exiting:animate-out data-exiting:fade-out data-exiting:zoom-out-95 data-exiting:duration-75","data-[placement=top]:slide-in-from-bottom-1","data-[placement=bottom]:slide-in-from-top-1","data-[placement=left]:slide-in-from-right-1","data-[placement=right]:slide-in-from-left-1",typeof e=="function"?e(r):e),children:r=>(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsx)(ze.OverlayArrow,{children:(0,ee.jsxs)("svg",{width:8,height:8,viewBox:"0 0 8 8",className:"fill-bg-surface/90 stroke-border-subtle group-data-[placement=bottom]:rotate-180 group-data-[placement=left]:-rotate-90 group-data-[placement=right]:rotate-90",children:[(0,ee.jsx)("title",{children:"Arrow"}),(0,ee.jsx)("path",{d:"M0 0 L4 4 L8 0"})]})}),typeof t=="function"?t(r):t]})}),Ho=({content:e,children:t,delay:o=500,closeDelay:r=0,...n})=>(0,ee.jsxs)(ze.TooltipTrigger,{delay:o,closeDelay:r,children:[t,(0,ee.jsx)(Bs,{...n,children:e})]})});var ao,bn,Pe,y,Us,qs,js,Xs,Ks,Zs,Qs,Js,Ys,ei,ti,oi,ri,ni,si,_,lo=N(()=>{"use strict";i();ao=require("react");po();bn=require("react-aria-components"),Pe=require("lucide-react");Et();y=require("react/jsx-runtime"),Us=({children:e,className:t,...o})=>(0,y.jsx)("header",{className:p("boltdocs-navbar sticky top-0 z-50 w-full border-b border-border-subtle bg-bg-main/80 backdrop-blur-md",t),...o,children:e}),qs=({children:e,className:t})=>(0,y.jsx)("div",{className:p("mx-auto flex lg:h-navbar max-w-(--breakpoint-3xl) items-center justify-between px-4 md:px-6",t),children:e}),js=({children:e,className:t})=>(0,y.jsx)("div",{className:p("flex items-center gap-4",t),children:e}),Xs=({children:e,className:t})=>(0,y.jsx)("div",{className:p("flex items-center gap-2 md:gap-4",t),children:e}),Ks=({children:e,className:t})=>(0,y.jsx)("div",{className:p("hidden lg:flex flex-1 justify-center items-center gap-4 px-4",t),children:e}),Zs=({src:e,alt:t,width:o=24,height:r=24,className:n})=>(0,y.jsx)(G,{href:"/",className:p("flex items-center gap-2 shrink-0 outline-none",n),children:e?(0,y.jsx)("img",{src:e,alt:t,width:o,height:r,className:"h-6 w-6 object-contain"}):null}),Qs=({children:e,className:t})=>(0,y.jsx)("span",{className:p("text-lg font-bold tracking-tight hidden sm:inline-block",t),children:e}),Js=({children:e,className:t})=>(0,y.jsx)("nav",{className:p("hidden md:flex items-center gap-6 text-sm font-medium",t),children:e}),Ys=({label:e,href:t,active:o,to:r,className:n})=>(0,y.jsxs)(G,{href:t,target:r==="external"?"_blank":void 0,className:p("transition-colors outline-none hover:text-text-main focus-visible:ring-2 focus-visible:ring-primary-500/30 rounded-sm",o?"text-primary-500":"text-text-muted",n),children:[e,r==="external"&&(0,y.jsx)("span",{className:"ml-1 inline-block",children:(0,y.jsx)(Pe.ExternalLink,{size:12})})]}),ei=({className:e,onPress:t})=>{let[o,r]=(0,ao.useState)(!1),n=o&&/Mac|iPod|iPhone|iPad/.test(navigator.platform);return(0,ao.useEffect)(()=>{r(!0)},[]),(0,y.jsxs)(bn.Button,{onPress:t,className:p("flex items-center gap-2 rounded-full border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-muted outline-none cursor-pointer","transition-colors hover:border-border-strong hover:text-text-main","focus-visible:ring-2 focus-visible:ring-primary-500/30","w-full max-w-[320px] justify-between",e),children:[(0,y.jsxs)("div",{className:"flex items-center gap-2",children:[(0,y.jsx)(Pe.Search,{size:16}),(0,y.jsx)("span",{className:"hidden sm:inline-block",children:"Search docs..."})]}),(0,y.jsxs)("div",{className:"hidden sm:flex items-center gap-1 pointer-events-none select-none",children:[(0,y.jsx)("kbd",{className:"flex h-5 items-center justify-center rounded border border-border-subtle bg-bg-main px-1.5 font-mono text-[10px] font-medium",children:n?"\u2318":"Ctrl"}),(0,y.jsx)("kbd",{className:"flex h-5 w-5 items-center justify-center rounded border border-border-subtle bg-bg-main font-mono text-[10px] font-medium",children:"K"})]})]})},ti=({className:e,theme:t,onThemeChange:o})=>(0,y.jsx)(qe.ToggleButton,{isSelected:t==="dark",onChange:o,className:p("rounded-md p-2 text-text-muted outline-none cursor-pointer transition-colors","hover:bg-bg-surface hover:text-text-main","focus-visible:ring-2 focus-visible:ring-primary-500/30",e),"aria-label":"Toggle theme",children:t==="dark"?(0,y.jsx)(Pe.Sun,{size:20}):(0,y.jsx)(Pe.Moon,{size:20})}),oi=({label:e,className:t,onPress:o,isCurrent:r})=>(0,y.jsx)(Ue,{onAction:o,className:p(r&&"bg-primary-500 text-white font-medium hover:bg-primary-600 focus:bg-primary-600 focus:text-white",t),children:e}),ri=({name:e})=>{if(e==="github")return(0,y.jsx)(Mt,{});if(e==="discord")return(0,y.jsx)(Yr,{});if(e==="x")return(0,y.jsx)(en,{});if(e==="bluesky")return(0,y.jsx)(on,{})},ni=({icon:e,link:t,className:o})=>(0,y.jsx)(G,{href:t,target:"_blank",rel:"noopener noreferrer",className:p("rounded-md p-2 text-text-muted outline-none transition-colors","hover:bg-bg-surface hover:text-text-main","focus-visible:ring-2 focus-visible:ring-primary-500/30",o),children:(0,y.jsx)(ri,{name:e})}),si=({className:e})=>(0,y.jsx)(qe.Separator,{orientation:"vertical",className:p("h-6 w-px bg-border-subtle mx-1",e)}),_={NavbarRoot:Us,NavbarLeft:js,NavbarRight:Xs,NavbarCenter:Ks,NavbarLogo:Zs,Title:Qs,Links:Js,Link:Ys,SearchTrigger:ei,Theme:ti,Item:oi,Socials:ni,Split:si,Content:qs}});var ut,ii,Uo,hn=N(()=>{"use strict";i();ut=k(require("react-aria-components")),ii=require("lucide-react");C();Uo=require("react/jsx-runtime")});var H,Le,w,qo,jo,Xo,Ko,Zo,Qo,Jo,Yo,ac,er=N(()=>{"use strict";i();H=k(require("react-aria-components")),Le=require("lucide-react");C();w=require("react/jsx-runtime"),qo=({children:e,isOpen:t,onOpenChange:o,className:r})=>(0,w.jsx)(H.ModalOverlay,{isOpen:t,onOpenChange:o,isDismissable:!0,className:p("fixed inset-0 z-100 bg-black/40 backdrop-blur-sm px-4 py-4 sm:py-20","entering:animate-in entering:fade-in exiting:animate-out exiting:fade-out"),children:(0,w.jsx)(H.Modal,{className:p("mx-auto w-full max-w-2xl overflow-hidden rounded-xl border border-border-subtle bg-bg-surface shadow-2xl ring-1 ring-black/5 outline-none","entering:animate-in entering:fade-in entering:zoom-in-95 exiting:animate-out exiting:fade-out exiting:zoom-out-95",r),children:(0,w.jsx)(H.Dialog,{className:"flex flex-col max-h-[70vh] focus:outline-none",children:e})})}),jo=({children:e,className:t,...o})=>(0,w.jsx)("div",{className:t,children:(0,w.jsx)(H.Autocomplete,{...o,className:"flex flex-col min-h-0",children:e})}),Xo=({className:e,...t})=>(0,w.jsxs)(H.SearchField,{className:"flex items-center gap-3 border-b border-border-subtle px-4 py-4",autoFocus:!0,children:[(0,w.jsx)(Le.Search,{className:"h-5 w-5 text-text-muted"}),(0,w.jsx)(H.Input,{...t,className:p("w-full bg-transparent text-lg text-text-main placeholder-text-muted outline-none",e),placeholder:"Search documentation..."}),(0,w.jsx)("div",{className:"flex items-center gap-1.5 rounded-md border border-border-subtle bg-bg-main px-1.5 py-1 text-[10px] font-medium text-text-muted",children:(0,w.jsx)("kbd",{className:"font-sans",children:"ESC"})})]}),Ko=({children:e,className:t,...o})=>(0,w.jsx)(H.ListBox,{...o,className:p("flex-1 overflow-y-auto p-2 outline-none",t),children:e}),Zo=({children:e,className:t,...o})=>(0,w.jsx)(H.ListBoxItem,{...o,className:p("group flex items-center gap-3 rounded-lg p-3 text-left outline-none cursor-pointer transition-colors","text-text-muted hover:bg-bg-main hover:text-text-main focus:bg-primary-500 focus:text-white selected:bg-primary-500 selected:text-white",t),children:r=>(0,w.jsxs)(w.Fragment,{children:[e,(r.isFocused||r.isSelected)&&(0,w.jsxs)("div",{className:"ml-auto opacity-50 flex items-center gap-1",children:[(0,w.jsx)("span",{className:"text-[10px]",children:"Select"}),(0,w.jsx)(Le.CornerDownLeft,{size:10})]})]})}),Qo=({isHeading:e,className:t})=>(0,w.jsx)("div",{className:p("shrink-0",t),children:e?(0,w.jsx)(Le.Hash,{size:18}):(0,w.jsx)(Le.FileText,{size:18})}),Jo=({children:e,className:t})=>(0,w.jsx)("span",{className:p("block font-medium truncate flex-1 text-sm",t),children:e}),Yo=({children:e,className:t})=>(0,w.jsx)("span",{className:p("ml-2 text-xs opacity-70 truncate hidden sm:inline group-focus:opacity-100",t),children:e}),ac={Root:qo,Autocomplete:jo,Input:Xo,List:Ko,Item:Object.assign(Zo,{Icon:Qo,Title:Jo,Bio:Yo})}});function xn(e,t){let o=(0,uo.useRef)(e);(0,uo.useEffect)(()=>{o.current!==e&&(t(e),o.current=e)},[e,t])}var uo,vn=N(()=>{"use strict";i();uo=require("react")});function tr(e){return e.startsWith("#")?e.slice(1):null}var yn=N(()=>{"use strict";i()});function ai(){let e=(0,T.use)(rr);if(!e)throw new Error("Component must be used under the <AnchorProvider /> component.");return e}function li(e){let[t,o]=(0,T.useState)({isOverflowing:!1,isAtBottom:!1});return(0,T.useEffect)(()=>{let r=e.current;if(!r)return;let n=()=>{let l=r.scrollHeight>r.clientHeight,c=r.scrollHeight-r.scrollTop<=r.clientHeight+2;o({isOverflowing:l,isAtBottom:c})};n(),r.addEventListener("scroll",n,{passive:!0}),window.addEventListener("resize",n);let s=new MutationObserver(n);return s.observe(r,{childList:!0,subtree:!0}),()=>{r.removeEventListener("scroll",n),window.removeEventListener("resize",n),s.disconnect()}},[e]),t}function Rn(){let e=ai();return(0,T.useMemo)(()=>{let t;for(let o of e)o.active&&(!t||o.t>t.t)&&(t=o);return t?.id},[e])}function Nn({containerRef:e,children:t}){return(0,ge.jsx)(Pn.Provider,{value:e,children:t})}function wn({toc:e,single:t=!1,children:o}){let r=(0,T.useMemo)(()=>new or,[]),[n,s]=(0,T.useState)(r.items);return r.single=t,(0,T.useEffect)(()=>{r.setItems(e)},[r,e]),(0,T.useEffect)(()=>(r.watch({rootMargin:"0px",threshold:.98}),r.onChange=()=>s([...r.items]),()=>{r.unwatch()}),[r]),(0,ge.jsx)(rr.Provider,{value:n,children:o})}var T,Cn,ge,rr,Pn,or,ci,mi,Tn,pi,di,ui,fi,Ae,nr=N(()=>{"use strict";i();T=require("react"),Cn=k(require("scroll-into-view-if-needed"));C();vn();yn();ge=require("react/jsx-runtime"),rr=(0,T.createContext)(null),Pn=(0,T.createContext)(null),or=class{items=[];single=!1;observer=null;onChange;callback(t){if(t.length===0)return;let o=!1;if(this.items=this.items.map(r=>{let n=t.find(l=>l.target.id===r.id),s=n?n.isIntersecting:r.active&&!r.fallback;return this.single&&o&&(s=!1),r.active!==s&&(r={...r,t:Date.now(),active:s,fallback:!1}),s&&(o=!0),r}),!o&&t[0].rootBounds){let r=t[0].rootBounds.top,n=Number.MAX_VALUE,s=-1;for(let l=0;l<this.items.length;l++){let c=document.getElementById(this.items[l].id);if(!c)continue;let m=Math.abs(r-c.getBoundingClientRect().top);m<n&&(s=l,n=m)}s!==-1&&(this.items[s]={...this.items[s],active:!0,fallback:!0,t:Date.now()})}this.onChange?.()}setItems(t){let o=this.observer;if(o)for(let r of this.items){let n=document.getElementById(r.id);n&&o.unobserve(n)}this.items=[];for(let r of t){let n=tr(r.url);n&&this.items.push({id:n,active:!1,fallback:!1,t:0,original:r})}this.watchItems(),typeof window<"u"&&(setTimeout(()=>this.watchItems(),100),setTimeout(()=>this.watchItems(),500),setTimeout(()=>this.watchItems(),1e3)),this.onChange?.()}watch(t){this.observer||(this.observer=new IntersectionObserver(this.callback.bind(this),t),this.watchItems())}watchItems(){if(this.observer)for(let t of this.items){let o=document.getElementById(t.id);o&&this.observer.observe(o)}}unwatch(){this.observer?.disconnect(),this.observer=null}};ci=({children:e,className:t})=>(0,ge.jsx)("nav",{className:p("sticky top-navbar hidden xl:flex flex-col shrink-0","w-toc","py-8 pl-6 pr-4",t),children:e}),mi=({children:e,className:t,...o})=>(0,ge.jsx)("div",{className:p("mb-4 text-xs font-bold uppercase tracking-wider text-text-main",t),...o,children:e}),Tn=({children:e,className:t,ref:o,...r})=>{let n=(0,T.useRef)(null);(0,T.useImperativeHandle)(o,()=>n.current);let{isOverflowing:s,isAtBottom:l}=li(n);return(0,ge.jsx)("div",{ref:n,className:p("relative overflow-y-auto boltdocs-otp-content",s&&!l&&"mask-[linear-gradient(to_bottom,black_85%,transparent_100%)]",t),...r,children:e})};Tn.displayName="OnThisPageContent";pi=({children:e,className:t})=>(0,ge.jsx)("ul",{className:p("relative space-y-1 text-sm border-l border-border-subtle",t),children:e}),di=({level:e,children:t,className:o})=>(0,ge.jsx)("li",{className:p(e===3&&"pl-3",o),children:t}),ui=({children:e,href:t,active:o,onClick:r,className:n})=>{let s=(0,T.use)(rr),l=(0,T.use)(Pn),c=t?tr(t):null,m=(0,T.useRef)(null),[a,d]=(0,T.useState)(o);return xn(c&&s?s.find(u=>u.id===c)?.active:null,u=>{u!==null&&u!==a&&(d(!!u),u&&m.current&&l?.current&&(0,Cn.default)(m.current,{behavior:"smooth",block:"center",inline:"center",scrollMode:"if-needed",boundary:l.current}))}),(0,T.useEffect)(()=>{o!==void 0&&d(o)},[o]),(0,ge.jsx)("a",{ref:m,href:t,onClick:r,"data-active":a,className:p("block py-1 pl-4 text-[13px] outline-none transition-colors hover:text-text-main",a?"text-primary-500 font-medium":"text-text-muted",n),children:e})},fi=({style:e,className:t})=>(0,ge.jsx)("div",{className:p("absolute -left-px w-0.5 rounded-full bg-primary-500 transition-all duration-300",t),style:e}),Ae={OnThisPageRoot:ci,OnThisPageHeader:mi,OnThisPageContent:Tn,OnThisPageList:pi,OnThisPageItem:di,OnThisPageLink:ui,OnThisPageIndicator:fi}});var kn,fo,oe,gi,bi,hi,xi,vi,Se,sr=N(()=>{"use strict";i();kn=k(require("react-aria-components")),fo=require("lucide-react");C();oe=require("react/jsx-runtime"),gi=({children:e,className:t})=>(0,oe.jsx)("nav",{className:p("grid grid-cols-1 sm:grid-cols-2 gap-4 mt-12 pt-8 border-t border-border-subtle",t),children:e}),bi=({children:e,to:t,direction:o,className:r})=>{let n=o==="next";return(0,oe.jsxs)(kn.Link,{href:t,className:p("flex group items-center p-4 rounded-xl border border-border-subtle bg-bg-surface outline-none","transition-all hover:bg-bg-main hover:border-primary-500 hover:shadow-lg","focus-visible:ring-2 focus-visible:ring-primary-500/30",n?"text-right justify-end":"text-left justify-start",r),children:[!n&&(0,oe.jsx)(fo.ChevronLeft,{className:"mr-3 h-5 w-5 text-text-muted group-hover:text-primary-500 transition-transform group-hover:-translate-x-1"}),(0,oe.jsx)("div",{className:"flex flex-col gap-1 flex-1",children:e}),n&&(0,oe.jsx)(fo.ChevronRight,{className:"ml-3 h-5 w-5 text-text-muted group-hover:text-primary-500 transition-transform group-hover:translate-x-1"})]})},hi=({children:e,className:t})=>(0,oe.jsx)("span",{className:p("text-xs font-medium uppercase tracking-wider text-text-muted",t),children:e}),xi=({children:e,className:t})=>(0,oe.jsx)("span",{className:p("text-base font-bold text-text-main truncate",t),children:e}),vi=({children:e})=>(0,oe.jsx)(oe.Fragment,{children:e}),Se={PageNavRoot:gi,PageNavLink:Object.assign(bi,{Title:hi,Description:xi,Icon:vi})}});var je,yi,Ci,Pi,Ri,Ni,ir,ar=N(()=>{"use strict";i();C();je=require("react/jsx-runtime"),yi=({children:e,className:t="",...o})=>(0,je.jsx)("div",{className:p("w-full",t),...o,children:e}),Ci=({children:e,className:t=""})=>(0,je.jsx)("div",{role:"tablist",className:p("relative flex flex-row items-center border-b border-border-subtle",t),children:e}),Pi=({children:e,id:t,selected:o,className:r="",...n})=>(0,je.jsx)("button",{role:"tab","aria-selected":o,className:p("flex items-center gap-2 px-4 py-2 text-sm font-medium transition-colors outline-none cursor-pointer bg-transparent border-none",o?"text-primary-500":"text-text-muted hover:text-text-main",r),...n,children:e}),Ri=({children:e,className:t=""})=>(0,je.jsx)("div",{className:p("p-4 outline-none",t),children:e}),Ni=({className:e="",style:t})=>(0,je.jsx)("div",{className:p("absolute bottom-0 h-0.5 bg-primary-500 transition-all duration-300",e),style:t}),ir={TabsRoot:yi,TabsList:Ci,TabsItem:Pi,TabsContent:Ri,TabsIndicator:Ni}});var Ln,Sn,z,wi,Ti,ki,Li,Si,Xe,lr=N(()=>{"use strict";i();Ve();Ln=k(require("react-aria-components")),Sn=require("lucide-react");C();z=require("react/jsx-runtime"),wi=({badge:e})=>{let t={new:"bg-primary-500/20 text-primary-500",updated:"bg-gray-500/20 text-gray-500",deprecated:"bg-red-500/20 text-red-500"};if(typeof e=="object"&&e?.expires){let r=new Date(e.expires),n=new Date,s=r.getTime()-n.getTime();if(Math.ceil(s/(1e3*60*60*24))===0)return null}let o=typeof e=="string"?e:e?.text;return(0,z.jsx)("span",{className:p("ml-auto flex h-4.5 items-center rounded-full text-[9px] font-medium px-1.5 py-0.5 text-center whitespace-nowrap",t[o]||t.new),children:o})},Ti=({children:e,className:t})=>(0,z.jsx)("aside",{className:p("boltdocs-sidebar sticky top-navbar hidden lg:flex flex-col shrink-0","w-sidebar h-full","overflow-y-auto border-r border-border-subtle bg-bg-main","py-6 px-4",t),children:(0,z.jsx)("nav",{className:"flex-1 space-y-6",children:e})}),ki=({children:e,title:t,icon:o,isOpen:r=!0,onToggle:n,className:s})=>(0,z.jsxs)("div",{className:p("space-y-1",s),children:[t&&(0,z.jsxs)(Ln.Button,{onPress:n,className:p("flex w-full items-center justify-between px-2 py-1.5 text-xs font-bold uppercase tracking-wider outline-none cursor-pointer","text-text-muted hover:text-text-main transition-colors","focus-visible:ring-2 focus-visible:ring-primary-500/30 rounded-md"),children:[(0,z.jsxs)("div",{className:"flex items-center gap-2",children:[o&&(0,z.jsx)(o,{size:14}),t]}),(0,z.jsx)(Sn.ChevronRight,{size:14,className:p("transition-transform duration-200",r&&"rotate-90")})]}),r&&(0,z.jsx)("div",{className:"space-y-0.5",children:e})]}),Li=({children:e,className:t})=>(0,z.jsx)("div",{className:p(t),children:e}),Si=({label:e,href:t,active:o,icon:r,badge:n,className:s})=>(0,z.jsxs)(G,{href:t,className:p("group flex items-center gap-2.5 rounded-lg px-2.5 py-2 text-sm outline-none transition-colors","focus-visible:ring-2 focus-visible:ring-primary-500/30",o?"bg-primary-500/10 text-primary-500 font-medium":"text-text-muted hover:bg-bg-surface hover:text-text-main",s),children:[r&&(0,z.jsx)(r,{size:16,className:p(o?"text-primary-500":"text-text-muted group-hover:text-text-main")}),(0,z.jsx)("span",{className:"truncate",children:e}),n&&(0,z.jsx)(wi,{badge:n})]}),Xe={SidebarRoot:Ti,SidebarGroup:ki,SidebarGroupItem:Li,SidebarLink:Si}});var Ke,In,ft,Bn,cr,mr,An,pr=N(()=>{"use strict";i();Ke=require("react-aria-components"),In=require("lucide-react");C();ft=require("react/jsx-runtime"),Bn=({children:e,className:t,...o})=>(0,ft.jsx)(Ke.Breadcrumbs,{className:p("flex items-center gap-1.5 mb-0 text-sm text-text-muted",t),...o,children:e}),cr=({children:e,className:t,...o})=>(0,ft.jsx)(Ke.Breadcrumb,{className:p("flex items-center mb-0 gap-1.5",t),...o,children:e}),mr=({children:e,href:t,className:o,...r})=>(0,ft.jsx)(Ke.Link,{href:t,className:p("transition-colors outline-none hover:text-text-main focus-visible:ring-2 focus-visible:ring-primary-500/30 rounded-sm","current:font-medium current:text-text-main current:pointer-events-none cursor-pointer",o),...r,children:e}),An=({className:e})=>(0,ft.jsx)(In.ChevronRight,{size:14,className:p("shrink-0 text-text-dim",e)})});var En,Mn,On=N(()=>{"use strict";i();C();En=require("react/jsx-runtime"),Mn=({children:e,className:t,vertical:o=!1})=>(0,En.jsx)("div",{className:p("inline-flex",o?"flex-col":"flex-row",!o&&["[&>*:not(:first-child)]:-ml-px","[&>*:first-child]:rounded-r-none","[&>*:last-child]:rounded-l-none","[&>*:not(:first-child):not(:last-child)]:rounded-none",t?.includes("rounded-full")&&["[&>*:first-child]:rounded-l-full","[&>*:last-child]:rounded-r-full"],t?.includes("rounded-xl")&&["[&>*:first-child]:rounded-l-xl","[&>*:last-child]:rounded-r-xl"],t?.includes("rounded-lg")&&["[&>*:first-child]:rounded-l-lg","[&>*:last-child]:rounded-r-lg"]],o&&["[&>*:not(:first-child)]:-mt-px","[&>*:first-child]:rounded-b-none","[&>*:last-child]:rounded-t-none","[&>*:not(:first-child):not(:last-child)]:rounded-none",t?.includes("rounded-full")&&["[&>*:first-child]:rounded-t-full","[&>*:last-child]:rounded-b-full"]],t),children:e})});var Qe,Ze,dr,ur=N(()=>{"use strict";"use client";i();Qe=k(require("react-aria-components"));C();Ze=require("react/jsx-runtime"),dr=({children:e,className:t,showArrow:o,...r})=>(0,Ze.jsxs)(Qe.Popover,{offset:8,...r,className:Qe.composeRenderProps(t,n=>p("z-50 overflow-auto rounded-xl border border-border-subtle bg-bg-surface/80 shadow-xl backdrop-blur-md outline-none","entering:animate-in entering:fade-in entering:zoom-in-95 exiting:animate-out exiting:fade-out exiting:zoom-out-95 fill-mode-forwards",n)),children:[o&&(0,Ze.jsx)(Qe.OverlayArrow,{className:"group",children:(0,Ze.jsx)("svg",{viewBox:"0 0 12 12",className:"block h-3 w-3 fill-bg-surface/80 stroke-border-subtle group-placement-bottom:rotate-180 group-placement-left:-rotate-90 group-placement-right:rotate-90","aria-hidden":"true",children:(0,Ze.jsx)("path",{d:"M0 0 L6 6 L12 0"})})}),e]})});function co(e){let[t,o]=fr.default.Children.toArray(e.children).slice(0,2);return(0,E.jsxs)(O.MenuTrigger,{...e,children:[t,(0,E.jsx)(dr,{placement:e.placement,className:"min-w-[200px]",children:o})]})}function Ii(e){let[t,o]=fr.default.Children.toArray(e.children).slice(0,2);return(0,E.jsxs)(O.SubmenuTrigger,{...e,children:[t,(0,E.jsx)(dr,{offset:-4,crossOffset:-4,children:o})]})}function mo(e){return(0,E.jsx)(O.Menu,{...e,className:O.composeRenderProps(e.className,t=>p("p-1.5 outline-none max-h-[inherit] overflow-auto",t))})}function Ue(e){let t=e.textValue||(typeof e.children=="string"?e.children:void 0);return(0,E.jsx)(O.MenuItem,{...e,textValue:t,className:O.composeRenderProps(e.className,(o,{isFocused:r,isPressed:n,isDisabled:s})=>p("group relative flex flex-row items-center gap-2.5 px-3 py-1.5 rounded-lg outline-none cursor-default transition-all duration-200","text-text-main text-[0.8125rem]",r&&"bg-primary-500/10 text-primary-600 shadow-sm",n&&"scale-[0.98] bg-primary-500/15",s&&"opacity-40 grayscale pointer-events-none",o)),children:O.composeRenderProps(e.children,(o,{selectionMode:r,isSelected:n,hasSubmenu:s})=>(0,E.jsxs)(E.Fragment,{children:[r!=="none"&&(0,E.jsxs)("span",{className:"flex items-center w-4 h-4 shrink-0 justify-center",children:[n&&r==="multiple"&&(0,E.jsx)(Je.Check,{className:"w-3.5 h-3.5 stroke-[2.5px] text-primary-500 animate-in zoom-in-50 duration-200"}),n&&r==="single"&&(0,E.jsx)(Je.Dot,{className:"w-6 h-6 text-primary-500 animate-in zoom-in-50 duration-200"})]}),(0,E.jsx)("div",{className:"flex-1 flex flex-row items-center gap-2.5 truncate font-medium",children:o}),s&&(0,E.jsx)(Je.ChevronRight,{className:"w-4 h-4 ml-auto text-text-muted group-focused:text-primary-500/70 transition-colors"})]}))})}function Bi({title:e,...t}){return(0,E.jsxs)(O.MenuSection,{...t,className:p("flex flex-col gap-0.5",t.className),children:[e&&(0,E.jsx)(O.Header,{className:"px-3 py-2 text-[10px] font-bold uppercase tracking-[0.075em] text-text-muted/50 select-none",children:e}),(0,E.jsx)(O.Collection,{items:t.items,children:t.children})]})}function Ai(e){return(0,E.jsx)(O.Separator,{...e,className:"mx-2 my-1.5 border-t border-border-subtle/50"})}var Je,fr,O,E,Me,gr=N(()=>{"use strict";"use client";i();Je=require("lucide-react"),fr=k(require("react")),O=k(require("react-aria-components"));ur();C();E=require("react/jsx-runtime");Me={Root:mo,Item:Ue,Trigger:co,SubTrigger:Ii,Section:Bi,Separator:Ai}});var qe,po=N(()=>{"use strict";i();lo();hn();er();nr();sr();ar();lr();pr();St();On();gr();ur();zo();Ve();qe=require("react-aria-components");C()});function ts(e){let[t,o]=(0,ht.useState)(!1),[r,n]=(0,ht.useState)(""),s=(0,ht.useMemo)(()=>{if(!r)return e.slice(0,10).map(a=>({id:a.path,title:a.title,path:a.path,bio:a.description||"",groupTitle:a.groupTitle}));let l=[],c=r.toLowerCase();for(let a of e)if(a.title?.toLowerCase().includes(c)&&l.push({id:a.path,title:a.title,path:a.path,bio:a.description||"",groupTitle:a.groupTitle}),a.headings)for(let d of a.headings)d.text.toLowerCase().includes(c)&&l.push({id:`${a.path}#${d.id}`,title:d.text,path:`${a.path}#${d.id}`,bio:`Heading in ${a.title}`,groupTitle:a.title,isHeading:!0});let m=new Set;return l.filter(a=>m.has(a.path)?!1:(m.add(a.path),!0)).slice(0,10)},[e,r]);return{isOpen:t,setIsOpen:o,query:r,setQuery:n,list:s,input:{value:r,onChange:l=>n(l.target.value)}}}var ht,os=N(()=>{"use strict";i();ht=require("react")});var ns={};So(ns,{SearchDialog:()=>Wi});function Wi({routes:e}){let{isOpen:t,setIsOpen:o,query:r,setQuery:n,list:s}=ts(e),l=(0,rs.useNavigate)();(0,vo.useEffect)(()=>{let m=a=>{(/Mac/.test(navigator.userAgent)?a.metaKey:a.ctrlKey)&&(a.key==="k"||a.key==="j")&&(a.preventDefault(),o(g=>!g))};return window.addEventListener("keydown",m),()=>window.removeEventListener("keydown",m)},[o]);let c=(0,vo.useCallback)(m=>{let a=String(m);if(o(!1),a.includes("#")){let[d,u]=a.split("#");l(d),setTimeout(()=>{let g=document.getElementById(u);g&&g.scrollIntoView({behavior:"smooth"})},100)}else l(a)},[l,o]);return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(_.SearchTrigger,{onPress:()=>o(!0)}),(0,W.jsx)(qo,{isOpen:t,onOpenChange:o,children:(0,W.jsxs)(jo,{onSelectionChange:c,children:[(0,W.jsx)(Xo,{value:r,onChange:m=>n(m.target.value)}),(0,W.jsx)(Ko,{items:s,children:m=>(0,W.jsxs)(Zo,{onPress:()=>c(m.id),textValue:m.title,children:[(0,W.jsx)(Qo,{isHeading:m.isHeading}),(0,W.jsxs)("div",{className:"flex flex-col justify-center gap-0.5",children:[(0,W.jsx)(Jo,{children:m.title}),(0,W.jsx)(Yo,{children:m.groupTitle})]})]},m.id)})]})})]})}var vo,rs,W,ss=N(()=>{"use strict";i();vo=require("react");os();er();lo();rs=require("react-router-dom"),W=require("react/jsx-runtime")});var Zi={};So(Zi,{Admonition:()=>le,Badge:()=>$t,Breadcrumbs:()=>wo,Button:()=>It,Card:()=>_t,Cards:()=>Ft,Caution:()=>Kt,CodeBlock:()=>de,ComponentPreview:()=>io,ComponentProps:()=>so,CopyMarkdown:()=>Ye,Danger:()=>qt,DefaultLayout:()=>Ps,DocsLayout:()=>Ie,ErrorBoundary:()=>st,Field:()=>oo,FileTree:()=>eo,Head:()=>No,Image:()=>no,Important:()=>Xt,InfoBox:()=>jt,Link:()=>ro,List:()=>Jt,Loading:()=>Nt,Navbar:()=>Co,NotFound:()=>it,Note:()=>Wt,OnThisPage:()=>Ro,PageNav:()=>To,ProgressBar:()=>Lo,Sidebar:()=>Po,Tab:()=>Vt,Table:()=>to,Tabs:()=>Ht,Tip:()=>Gt,Video:()=>zt,Warning:()=>Ut,createBoltdocsApp:()=>$n,defineSandbox:()=>Vo,embedSandbox:()=>Zr,openSandbox:()=>At,useConfig:()=>M,useMdxComponents:()=>He,useRoutes:()=>q,useTheme:()=>Te});module.exports=Ls(Zi);i();i();var ne=k(require("react")),zn=k(require("react-dom/client")),be=require("react-router-dom");i();var Sr=require("lucide-react");Ve();var ye=require("react/jsx-runtime");function it(){return(0,ye.jsx)("div",{className:"flex items-center justify-center min-h-[60vh] text-center",children:(0,ye.jsxs)("div",{className:"space-y-4",children:[(0,ye.jsx)("span",{className:"text-8xl font-black tracking-tighter text-primary-500/20",children:"404"}),(0,ye.jsx)("h1",{className:"text-2xl font-bold text-text-main",children:"Page Not Found"}),(0,ye.jsx)("p",{className:"text-sm text-text-muted max-w-sm mx-auto",children:"The page you're looking for doesn't exist or has been moved."}),(0,ye.jsxs)(G,{href:"/",className:"inline-flex items-center gap-2 rounded-lg bg-primary-500 px-5 py-2.5 text-sm font-semibold text-white outline-none transition-all hover:brightness-110 hover:shadow-lg focus-visible:ring-2 focus-visible:ring-primary-500/30",children:[(0,ye.jsx)(Sr.ArrowLeft,{size:16})," Go to Home"]})]})})}i();var Rt=require("react"),j=require("react/jsx-runtime");function Nt(){let[e,t]=(0,Rt.useState)(0);(0,Rt.useEffect)(()=>{let r=0,n=!0,s=setInterval(()=>{n?(r+=1,r>=100&&(r=100,n=!1)):(r-=1,r<=0&&(r=0,n=!0)),t(r)},20);return()=>clearInterval(s)},[]);let o=`inset(${100-e}% 0 0 0)`;return(0,j.jsx)("div",{className:"flex flex-col items-center justify-center min-h-[60vh] p-4 text-center",children:(0,j.jsx)("div",{className:"relative group",children:(0,j.jsxs)("div",{className:"relative inline-block",children:[(0,j.jsxs)("svg",{className:"w-24 h-auto opacity-10 filter grayscale brightness-50",viewBox:"0 0 60 51",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-hidden":"true",children:[(0,j.jsx)("title",{children:"Loading indicator background"}),(0,j.jsx)("path",{d:"M29.4449 0H19.4449V16.5L29.4449 6.5V0Z",fill:"currentColor"}),(0,j.jsx)("path",{d:"M26.9449 22.7265C26.9449 22.5077 21.2201 27.0658 16.9449 28.5C13.7491 29.5721 12.3156 29.5038 8.94486 29.5C5.59532 29.4963 0 28.5 0 28.5C0 28.5 5.57953 28.5146 8.94486 27.5C12.5409 26.4158 14.8203 25.5843 17.9449 23.5C23.3445 19.898 29.4449 11.5 29.4449 11.5L29.9449 18C29.9449 18 33.5825 15.8308 36.4449 15C39.4452 14.1291 44.4449 14 44.4449 14C44.4449 14 36.9449 19 34.4449 21.5C31.5322 24.4126 29.8582 26.9017 29.4449 31C29.1217 34.2041 29.4771 36.4508 31.4449 39C33.5792 41.765 35.952 43.0183 39.4449 43C42.677 42.9831 45.3003 42.4182 47.4449 40C49.7406 37.4113 50.2495 34.4466 49.9449 31C49.6603 27.7804 48.4876 25.4953 45.9449 23.5C43.2931 21.4191 36.4449 24 36.4449 24L47.9449 15C47.9449 15 51.5761 16.771 53.4449 18.5C55.711 20.5967 56.7467 22.1546 57.9449 25C59.1784 27.9295 59.4832 29.8216 59.4449 33C59.4089 35.9867 59.179 37.78 57.9449 40.5C56.8475 42.9185 55.8511 44.6507 53.9449 46.5C51.9236 48.4609 50.5803 49.0076 47.9449 50C45.5414 50.9051 44.0131 51 41.4449 51C38.8766 51 37.3235 50.9685 34.9449 50C32.4851 48.9985 29.4449 46 29.4449 46V51H19.4449V37.9904L22.9449 31.4226L26.9449 22.7265Z",fill:"currentColor"})]}),(0,j.jsxs)("svg",{className:"absolute top-0 left-0 w-24 h-auto text-primary-500 drop-shadow-[0_0_20px_rgba(var(--primary-rgb),0.5)] transition-[clip-path] duration-100 ease-linear",style:{clipPath:o},viewBox:"0 0 60 51",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-hidden":"true",children:[(0,j.jsx)("title",{children:"Loading indicator animated fill"}),(0,j.jsx)("path",{d:"M29.4449 0H19.4449V16.5L29.4449 6.5V0Z",fill:"currentColor"}),(0,j.jsx)("path",{d:"M26.9449 22.7265C26.9449 22.5077 21.2201 27.0658 16.9449 28.5C13.7491 29.5721 12.3156 29.5038 8.94486 29.5C5.59532 29.4963 0 28.5 0 28.5C0 28.5 5.57953 28.5146 8.94486 27.5C12.5409 26.4158 14.8203 25.5843 17.9449 23.5C23.3445 19.898 29.4449 11.5 29.4449 11.5L29.9449 18C29.9449 18 33.5825 15.8308 36.4449 15C39.4452 14.1291 44.4449 14 44.4449 14C44.4449 14 36.9449 19 34.4449 21.5C31.5322 24.4126 29.8582 26.9017 29.4449 31C29.1217 34.2041 29.4771 36.4508 31.4449 39C33.5792 41.765 35.952 43.0183 39.4449 43C42.677 42.9831 45.3003 42.4182 47.4449 40C49.7406 37.4113 50.2495 34.4466 49.9449 31C49.6603 27.7804 48.4876 25.4953 45.9449 23.5C43.2931 21.4191 36.4449 24 36.4449 24L47.9449 15C47.9449 15 51.5761 16.771 53.4449 18.5C55.711 20.5967 56.7467 22.1546 57.9449 25C59.1784 27.9295 59.4832 29.8216 59.4449 33C59.4089 35.9867 59.179 37.78 57.9449 40.5C56.8475 42.9185 55.8511 44.6507 53.9449 46.5C51.9236 48.4609 50.5803 49.0076 47.9449 50C45.5414 50.9051 44.0131 51 41.4449 51C38.8766 51 37.3235 50.9685 34.9449 50C32.4851 48.9985 29.4449 46 29.4449 46V51H19.4449V37.9904L22.9449 31.4226L26.9449 22.7265Z",fill:"currentColor"})]})]})})})}i();var pe=require("react"),Ar=require("react/jsx-runtime"),Ir=(0,pe.createContext)(void 0);function Br({children:e}){let[t,o]=(0,pe.useState)("dark"),[r,n]=(0,pe.useState)(!1);(0,pe.useEffect)(()=>{n(!0);let c=localStorage.getItem("boltdocs-theme");if(c==="light"||c==="dark")o(c);else{let d=window.matchMedia("(prefers-color-scheme: dark)").matches;o(d?"dark":"light")}let m=window.matchMedia("(prefers-color-scheme: dark)"),a=d=>{localStorage.getItem("boltdocs-theme")||o(d.matches?"dark":"light")};return m.addEventListener("change",a),()=>m.removeEventListener("change",a)},[]),(0,pe.useEffect)(()=>{if(!r)return;let c=document.documentElement;t==="light"?(c.classList.add("theme-light"),c.dataset.theme="light"):(c.classList.remove("theme-light"),c.dataset.theme="dark")},[t,r]);let s=()=>{let c=t==="dark"?"light":"dark";o(c),localStorage.setItem("boltdocs-theme",c)},l=c=>{o(c),localStorage.setItem("boltdocs-theme",c)};return(0,Ar.jsx)(Ir.Provider,{value:{theme:t,toggleTheme:s,setTheme:l},children:e})}function Te(){let e=(0,pe.use)(Ir);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e}var go=k(require("virtual:boltdocs-layout"));Pt();i();var Mr=require("react"),Er=require("react-aria-components"),wt=require("react-router-dom"),Dr=require("react/jsx-runtime");function Or({children:e}){let t=(0,wt.useNavigate)();return(0,Dr.jsx)(Er.RouterProvider,{navigate:(o,r)=>{(0,Mr.startTransition)(()=>{t(o,r)})},useHref:wt.useHref,children:e})}Y();i();var Vr=require("react"),Hr=require("react-router-dom");function zr(){let{pathname:e,hash:t}=(0,Hr.useLocation)();return(0,Vr.useLayoutEffect)(()=>{let o=document.querySelector(".boltdocs-content");if(o){if(t){let r=t.replace("#",""),n=document.getElementById(r);if(n){let l=o.getBoundingClientRect().top,a=n.getBoundingClientRect().top-l-80+o.scrollTop;o.scrollTo({top:a,behavior:"smooth"});return}}o.scrollTo(0,0)}},[e,t]),null}i();var $r=require("react-router-dom"),Fr=k(require("virtual:boltdocs-layout")),Eo=require("react/jsx-runtime");function _r(){return(0,Eo.jsx)(Fr.default,{children:(0,Eo.jsx)($r.Outlet,{})})}i();var qr=require("@mdx-js/react");i();var Tt=require("react"),Ur=require("react/jsx-runtime"),Wr=(0,Tt.createContext)({});function He(){return(0,Tt.useContext)(Wr)}function Gr({components:e,children:t}){return(0,Ur.jsx)(Wr.Provider,{value:e,children:t})}var Oo=require("react/jsx-runtime");function jr({Component:e}){let t=He();return(0,Oo.jsx)(qr.MDXProvider,{components:t,children:(0,Oo.jsx)(e,{})})}i();var Vn=require("lucide-react");var br={};So(br,{Admonition:()=>le,Badge:()=>$t,Button:()=>It,Card:()=>_t,Cards:()=>Ft,Caution:()=>Kt,CodeBlock:()=>de,ComponentPreview:()=>io,ComponentProps:()=>so,CopyMarkdown:()=>Ye,Danger:()=>qt,Field:()=>oo,FileTree:()=>eo,Image:()=>no,Important:()=>Xt,InfoBox:()=>jt,Link:()=>ro,List:()=>Jt,Note:()=>Wt,Tab:()=>Vt,Table:()=>to,Tabs:()=>Ht,Tip:()=>Gt,Video:()=>zt,Warning:()=>Ut});i();i();St();C();var Kr=require("react/jsx-runtime"),It=({className:e,variant:t,size:o,rounded:r,iconSize:n,disabled:s,...l})=>(0,Kr.jsx)(ie,{className:p("group",kt({variant:t,size:o,rounded:r,iconSize:n,disabled:s,className:e})),...l});i();var Ot=k(require("react-aria-components")),Dt=require("lucide-react");C();i();Y();i();var Bt=require("codesandbox/lib/api/define.js");function Do(e){let t=e.files||{},o=e.dependencies||{},r=e.devDependencies||{},n=e.title||"codesandbox-project",s=e.description||"Generic Sandbox",l={};for(let[c,m]of Object.entries(t)){let a=typeof m.content=="object"?JSON.stringify(m.content,null,2):m.content;l[c]={content:a,isBinary:m.isBinary??!1}}if(!l["package.json"]){let m=e.template==="vite"||!!r.vite||!!r["@vitejs/plugin-react"]?{dev:"vite",build:"vite build",preview:"vite preview"}:{start:"node index.js"};l["package.json"]={content:JSON.stringify({private:!0,name:n,description:s,type:"module",version:"1.0.0",scripts:e.scripts||m,dependencies:o,devDependencies:r},null,2),isBinary:!1}}return l}function Vo(e){let t=Do(e),o=(0,Bt.getParameters)({files:t}),r=new URLSearchParams({parameters:o,installDependencies:"true"});return e.entry&&r.set("file",`/${e.entry}`),{parameters:o,url:`https://codesandbox.io/api/v1/sandboxes/define?${r.toString()}`,options:e}}function At(e){if(typeof window>"u")return Vo(e);let t=Do(e),o=(0,Bt.getParameters)({files:t}),r=e.entry||"src/App.tsx",n=document.createElement("form");n.method="POST",n.target="_blank",n.action="https://codesandbox.io/api/v1/sandboxes/define",n.style.display="none";let s=(c,m)=>{let a=document.createElement("input");a.type="hidden",a.name=c,a.value=m,n.appendChild(a)},l=new URLSearchParams({file:`/${r}`,eslint:"0",codemirror:"1",installDependencies:"true"});return s("query",l.toString()),s("parameters",o),document.body.appendChild(n),n.submit(),document.body.removeChild(n),{parameters:o,url:`https://codesandbox.io/api/v1/sandboxes/define?parameters=${o}`,options:e}}function Zr(e){let t=Do(e),o=(0,Bt.getParameters)({files:t}),r=e.embed||{},n=new URLSearchParams({parameters:o,embed:"1"});return r.view&&n.set("view",r.view),r.theme&&n.set("theme",r.theme),r.hideNavigation&&n.set("hidenavigation","1"),e.entry&&n.set("file",`/${e.entry}`),{parameters:o,url:`https://codesandbox.io/api/v1/sandboxes/define?${n.toString()}`,options:e}}i();var Qr=async e=>{try{return await navigator.clipboard.writeText(e),!0}catch{let t=document.createElement("textarea");return t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t),!0}};var ae=require("react");function Jr(e){let{title:t,sandbox:o}=e,[r,n]=(0,ae.useState)(!1),[s,l]=(0,ae.useState)(!1),[c,m]=(0,ae.useState)(!1),a=(0,ae.useRef)(null),d=M(),u=(0,ae.useCallback)(async()=>{let h=a.current?.textContent??"";Qr(h),n(!0),setTimeout(()=>n(!1),2e3)},[]),g=(0,ae.useCallback)(()=>{let h=a.current?.textContent??"",b=d?.integrations?.sandbox?.config||{},x=typeof o=="object"?o:b,I=x.entry||"src/App.tsx";At({title:t??"Code Snippet",...x,files:{...x.files,[I]:{content:h}}})},[t,d,o]);return(0,ae.useEffect)(()=>{let h=a.current?.textContent?.length??0;m(h>120)},[e.children,e.highlightedHtml]),{copied:r,isExpanded:s,setIsExpanded:l,isExpandable:c,preRef:a,handleCopy:u,handleSandbox:g,shouldTruncate:c&&!s}}Y();Et();zo();var F=require("react/jsx-runtime");function de(e){let{children:t,sandbox:o,hideSandbox:r=!0,hideCopy:n=!1,highlightedHtml:s,...l}=e,a=!!M()?.integrations?.sandbox?.enable&&!r,{copied:d,isExpanded:u,setIsExpanded:g,isExpandable:h,preRef:b,handleCopy:x,handleSandbox:I,shouldTruncate:J}=Jr(e);return(0,F.jsxs)("div",{className:p("group relative my-6 overflow-hidden rounded-lg border border-border-subtle bg-(--color-code-bg)",J&&"[&>pre]:max-h-[250px] [&>pre]:overflow-hidden"),children:[(0,F.jsxs)("div",{className:"absolute top-3 right-4 z-50 flex items-center gap-2 transition-all duration-300 opacity-0 group-hover:opacity-100",children:[a&&(0,F.jsx)(Ho,{content:"Open in CodeSandbox",children:(0,F.jsx)(Ot.Button,{onPress:I,className:"grid place-items-center w-8 h-8 bg-transparent text-text-muted outline-none cursor-pointer transition-all duration-200 hover:scale-115 hover:text-sky-400 active:scale-95 [&>svg]:w-5 [&>svg]:h-5 [&>svg]:stroke-2","aria-label":"Open in CodeSandbox",children:(0,F.jsx)(tn,{size:20})})}),!n&&(0,F.jsx)(Ho,{content:d?"Copied!":"Copy code",children:(0,F.jsx)(Ot.Button,{onPress:x,className:p("grid place-items-center w-8 h-8 bg-transparent outline-none cursor-pointer transition-all duration-200 hover:scale-115 active:scale-95 [&>svg]:w-5 [&>svg]:h-5 [&>svg]:stroke-2",d?"text-emerald-400":"text-text-muted hover:text-text-main"),"aria-label":"Copy code",children:d?(0,F.jsx)(Dt.Check,{size:20}):(0,F.jsx)(Dt.Copy,{size:20})})})]}),s?(0,F.jsx)("div",{ref:b,className:"shiki-wrapper [&>pre]:m-0! [&>pre]:rounded-none! [&>pre]:border-none! [&>pre]:bg-inherit! [&>pre>code]:grid! [&>pre>code]:p-5! [&>.shiki.shiki-themes]:bg-transparent!",dangerouslySetInnerHTML:{__html:s}}):(0,F.jsx)("pre",{ref:b,className:"m-0! rounded-none! border-none! bg-inherit! font-mono text-[0.8125rem] leading-[1.7]",...l,children:t}),h&&(0,F.jsx)("div",{className:p(J?"absolute bottom-0 inset-x-0 h-24 bg-linear-to-t from-(--color-code-bg) to-transparent flex items-end justify-center pb-4 z-10":"relative flex justify-center py-4"),children:(0,F.jsx)(Ot.Button,{onPress:()=>g(!u),className:"rounded-full bg-bg-surface border border-border-subtle px-5 py-2 text-[0.8125rem] font-medium text-text-main outline-none cursor-pointer transition-all hover:bg-border-subtle hover:-translate-y-px backdrop-blur-md",children:u?"Show less":"Expand code"})})]})}i();var $e=require("react"),ke=k(require("react-aria-components"));i();var Ce=require("react");function rn({initialIndex:e=0,tabs:t}){let o=t[e]?.props.disabled?t.findIndex(a=>!a.props.disabled):e,[r,n]=(0,Ce.useState)(o===-1?0:o),s=(0,Ce.useRef)([]),[l,c]=(0,Ce.useState)({opacity:0,transform:"translateX(0)",width:0});(0,Ce.useEffect)(()=>{let a=s.current[r];a&&c({opacity:1,width:a.offsetWidth,transform:`translateX(${a.offsetLeft}px)`})},[r,t]);let m=(0,Ce.useCallback)(a=>{let d=0;if(a.key==="ArrowRight"?d=1:a.key==="ArrowLeft"&&(d=-1),d!==0){let u=(r+d+t.length)%t.length;for(;t[u].props.disabled&&u!==r;)u=(u+d+t.length)%t.length;u!==r&&!t[u].props.disabled&&(n(u),s.current[u]?.focus())}},[r,t]);return{active:r,setActive:n,tabRefs:s,indicatorStyle:l,handleKeyDown:m}}C();var $o=require("class-variance-authority"),X=require("react/jsx-runtime"),As=(0,$o.cva)("relative flex items-center border-b border-border-subtle gap-1 overflow-x-auto no-scrollbar",{variants:{size:{default:"px-0",compact:"px-2"}},defaultVariants:{size:"default"}}),Ms=(0,$o.cva)("flex items-center gap-2 px-4 py-2.5 text-sm font-medium outline-none transition-all duration-200 cursor-pointer bg-transparent border-none select-none whitespace-nowrap",{variants:{isActive:{true:"text-primary-500",false:"text-text-muted hover:text-text-main"},isDisabled:{true:"opacity-40 pointer-events-none",false:""}},defaultVariants:{isActive:!1,isDisabled:!1}});function Vt({children:e}){let t=typeof e=="string"?(0,X.jsx)(de,{className:"language-bash",children:(0,X.jsx)("code",{children:e.trim()})}):e;return(0,X.jsx)("div",{className:"py-4",children:t})}function Ht({defaultIndex:e=0,children:t}){let o=(0,$e.useMemo)(()=>$e.Children.toArray(t).filter(c=>(0,$e.isValidElement)(c)&&c.props?.label),[t]),{active:r,setActive:n,tabRefs:s,indicatorStyle:l}=rn({initialIndex:e,tabs:o});return(0,X.jsx)("div",{className:"my-8 w-full group/tabs",children:(0,X.jsxs)(ke.Tabs,{selectedKey:r.toString(),onSelectionChange:c=>n(Number(c)),className:"w-full",children:[(0,X.jsxs)(ke.TabList,{"aria-label":"Content Tabs",className:p(As()),children:[o.map((c,m)=>{let{label:a,icon:d,disabled:u}=c.props,g=m.toString();return(0,X.jsxs)(ke.Tab,{id:g,isDisabled:u,ref:h=>{s.current[m]=h},className:({isSelected:h,isDisabled:b})=>p(Ms({isActive:h,isDisabled:b})),children:[!!d&&(0,X.jsx)("span",{className:"shrink-0 [&>svg]:w-4 [&>svg]:h-4",children:d}),(0,X.jsx)("span",{children:a})]},g)}),(0,X.jsx)("div",{className:"absolute bottom-0 h-0.5 bg-primary-500 transition-all duration-300 ease-in-out pointer-events-none",style:l,"aria-hidden":"true"})]}),o.map((c,m)=>(0,X.jsx)(ke.TabPanel,{id:m.toString(),children:o[m]},m))]})})}i();var Fe=require("react"),lt=require("react/jsx-runtime");function zt({src:e,poster:t,alt:o,children:r,controls:n,preload:s="metadata",...l}){let c=(0,Fe.useRef)(null),[m,a]=(0,Fe.useState)(!1);return(0,Fe.useEffect)(()=>{let d=c.current;if(!d)return;let u=new IntersectionObserver(([g])=>{g.isIntersecting&&(a(!0),u.disconnect())},{rootMargin:"200px"});return u.observe(d),()=>u.disconnect()},[]),(0,lt.jsx)("div",{ref:c,className:"my-6 overflow-hidden rounded-lg border border-border-subtle",children:m?(0,lt.jsxs)("video",{className:"block w-full h-auto",src:e,poster:t,controls:!0,preload:s,playsInline:!0,...l,children:[r,"Your browser does not support the video tag."]}):(0,lt.jsx)("div",{className:"aspect-video bg-bg-surface animate-pulse",role:"img","aria-label":o||"Video"})})}i();C();var nn=require("class-variance-authority"),sn=require("react/jsx-runtime"),Es=(0,nn.cva)("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold tracking-tight",{variants:{variant:{default:"bg-bg-surface text-text-muted border-border-subtle",primary:"bg-primary-500/15 text-primary-400 border-primary-500/20",success:"bg-emerald-500/15 text-emerald-400 border-emerald-500/20",warning:"bg-amber-500/15 text-amber-400 border-amber-500/20",danger:"bg-red-500/15 text-red-400 border-red-500/20",info:"bg-sky-500/15 text-sky-400 border-sky-500/20"}},defaultVariants:{variant:"default"}});function $t({variant:e="default",children:t,className:o="",...r}){return(0,sn.jsx)("span",{className:p(Es({variant:e}),o),...r,children:t})}i();var ct=require("react"),an=k(require("react-aria-components"));C();var ln=require("class-variance-authority"),K=require("react/jsx-runtime"),Os=(0,ln.cva)("grid gap-4 my-6",{variants:{cols:{1:"grid-cols-1",2:"grid-cols-1 sm:grid-cols-2",3:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-3",4:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-4"}},defaultVariants:{cols:3}});function Ft({cols:e=3,children:t,className:o="",...r}){return(0,K.jsx)("div",{className:p(Os({cols:e}),o),...r,children:t})}function _t({title:e,icon:t,href:o,children:r,className:n="",...s}){let l=(0,ct.useRef)(null),c=(0,ct.useRef)(null),m=(0,ct.useCallback)(u=>{let g=l.current||c.current;if(!g)return;let{left:h,top:b}=g.getBoundingClientRect();g.style.setProperty("--x",`${u.clientX-h}px`),g.style.setProperty("--y",`${u.clientY-b}px`)},[]),a=(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)("div",{className:"pointer-events-none absolute -inset-px rounded-xl opacity-0 transition-opacity duration-300 group-hover:opacity-100",style:{background:"radial-gradient(400px circle at var(--x) var(--y), color-mix(in oklch, var(--color-primary-500), transparent 90%), transparent 80%)"}}),t&&(0,K.jsx)("div",{className:"mb-3 flex h-10 w-10 items-center justify-center rounded-lg bg-primary-500/10 text-primary-400 text-lg transition-transform duration-300 group-hover:scale-105 group-hover:-rotate-3",children:t}),(0,K.jsxs)("div",{className:"space-y-1.5",children:[e&&(0,K.jsx)("h3",{className:"text-sm font-bold text-text-main",children:e}),r&&(0,K.jsx)("div",{className:"text-sm text-text-muted leading-relaxed",children:r})]})]}),d=p("group relative block rounded-xl border border-border-subtle bg-bg-surface p-5 outline-none overflow-hidden","transition-all duration-200 hover:border-primary-500/40 hover:shadow-lg hover:shadow-primary-500/5","focus-visible:ring-2 focus-visible:ring-primary-500/30",n);return o?(0,K.jsx)(an.Link,{ref:c,href:o,className:p(d,"no-underline cursor-pointer"),onMouseMove:m,...s,children:a}):(0,K.jsx)("div",{ref:l,role:"presentation",className:d,onMouseMove:m,...s,children:a})}i();var U=require("lucide-react");C();var mn=require("class-variance-authority"),B=require("react/jsx-runtime"),Ds={note:(0,B.jsx)(U.Bookmark,{size:18}),tip:(0,B.jsx)(U.Lightbulb,{size:18}),info:(0,B.jsx)(U.Info,{size:18}),warning:(0,B.jsx)(U.AlertTriangle,{size:18}),danger:(0,B.jsx)(U.ShieldAlert,{size:18}),important:(0,B.jsx)(U.Flame,{size:18}),caution:(0,B.jsx)(U.Zap,{size:18})},Vs={note:"Note",tip:"Tip",info:"Info",warning:"Warning",danger:"Danger",important:"Important",caution:"Caution"},cn=(0,mn.cva)("py-4 px-4 rounded-lg",{variants:{type:{note:"border-primary-400 bg-primary-500/5 text-primary-400",tip:"border-emerald-500 bg-emerald-500/5 text-emerald-500",info:"border-sky-500 bg-sky-500/5 text-sky-500",warning:"border-amber-500 bg-amber-500/5 text-amber-500",danger:"border-red-500 bg-red-500/5 text-red-500",important:"border-orange-500 bg-orange-500/5 text-orange-500",caution:"border-yellow-500 bg-yellow-500/5 text-yellow-500"}},defaultVariants:{type:"note"}});function le({type:e="note",title:t,children:o,className:r="",...n}){return(0,B.jsxs)("div",{className:p(cn({type:e}),r),role:e==="warning"||e==="danger"?"alert":"note",...n,children:[(0,B.jsxs)("div",{className:"flex items-center flex-row gap-2 mb-2",children:[(0,B.jsx)("span",{className:p("shrink-0",cn({type:e})),children:Ds[e]}),(0,B.jsx)("span",{className:"text-sm font-bold tracking-tight text-text-main",children:t||Vs[e]})]}),(0,B.jsx)("div",{className:"text-sm text-text-muted leading-relaxed [&>p]:m-0 [&>p]:mb-2 [&>p:last-child]:mb-0",children:o})]})}var Wt=e=>(0,B.jsx)(le,{type:"note",...e}),Gt=e=>(0,B.jsx)(le,{type:"tip",...e}),Ut=e=>(0,B.jsx)(le,{type:"warning",...e}),qt=e=>(0,B.jsx)(le,{type:"danger",...e}),jt=e=>(0,B.jsx)(le,{type:"info",...e}),Xt=e=>(0,B.jsx)(le,{type:"important",...e}),Kt=e=>(0,B.jsx)(le,{type:"caution",...e});i();var Zt=require("react"),_e=require("lucide-react");C();var Qt=require("class-variance-authority"),ce=require("react/jsx-runtime"),Hs=(0,Qt.cva)("my-6 transition-all duration-200",{variants:{variant:{default:"list-disc pl-5 text-text-muted marker:text-primary-500/50",number:"list-decimal pl-5 text-text-muted marker:text-primary-500/50 marker:font-bold",checked:"list-none p-0",arrow:"list-none p-0",bubble:"list-none p-0"},cols:{1:"grid-cols-1",2:"grid-cols-1 sm:grid-cols-2",3:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-3",4:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-4"},isGrid:{true:"grid gap-x-8 gap-y-3",false:"space-y-2"},dense:{true:"space-y-1",false:"space-y-2"}},compoundVariants:[{variant:"default",dense:!0,className:"space-y-0.5"}],defaultVariants:{variant:"default",cols:1,isGrid:!1,dense:!1}}),zs=(0,Qt.cva)("group flex items-start gap-3 text-sm leading-relaxed transition-all duration-200",{variants:{variant:{default:"",number:"",checked:"hover:translate-x-0.5",arrow:"hover:translate-x-0.5",bubble:"hover:translate-x-0.5"},dense:{true:"py-0",false:"py-0.5"}},defaultVariants:{variant:"default",dense:!1}}),$s=(0,Qt.cva)("mt-1 shrink-0 flex items-center justify-center transition-transform group-hover:scale-110",{variants:{variant:{bubble:"h-5 w-5 rounded-full bg-primary-500/10 text-primary-500 text-[10px] font-bold",default:""}},defaultVariants:{variant:"default"}});function Fs({icon:e,children:t,variant:o,dense:r}){return(0,ce.jsxs)("li",{className:p(zs({variant:o,dense:r})),children:[e&&(0,ce.jsx)("span",{className:p($s({variant:o==="bubble"?"bubble":"default"})),children:e}),(0,ce.jsx)("div",{className:"flex-1 text-text-muted group-hover:text-text-main transition-colors",children:t})]})}var _s={checked:e=>(0,ce.jsx)(_e.Check,{size:14,className:p("text-emerald-500 shrink-0",e)}),arrow:e=>(0,ce.jsx)(_e.ChevronRight,{size:14,className:p("text-primary-400 shrink-0",e)}),bubble:e=>(0,ce.jsx)(_e.Circle,{size:6,fill:"currentColor",className:p("text-primary-500 shrink-0",e)}),default:()=>null,number:()=>null};function Jt({variant:e="default",cols:t=1,dense:o=!1,children:r,className:n,...s}){let l=t!==void 0&&Number(t)>1,c=_s[e],m=Hs({variant:e,cols:t,dense:o,isGrid:l,className:n}),a=e==="number"?"ol":"ul";return e==="default"||e==="number"?(0,ce.jsx)(a,{className:m,...s,children:r}):(0,ce.jsx)("ul",{className:m,...s,children:Zt.Children.map(r,d=>{if(!(0,Zt.isValidElement)(d))return d;let u=d,g=u.type==="li"?u.props.children:u.props.children||d;return(0,ce.jsx)(Fs,{icon:c(),variant:e,dense:o,children:g})})})}i();var ue=require("react"),fe=k(require("react-aria-components")),te=require("lucide-react");C();var A=require("react/jsx-runtime"),mt=16,pt=2,Fo={CODE:/\.(ts|tsx|js|jsx|json|mjs|cjs|astro|vue|svelte)$/i,TEXT:/\.(md|mdx|txt)$/i,IMAGE:/\.(png|jpg|jpeg|svg|gif)$/i};function Wo(e){return typeof e=="string"?e:typeof e=="number"?e.toString():Array.isArray(e)?e.map(Wo).join(""):(0,ue.isValidElement)(e)&&e.props&&typeof e.props=="object"&&"children"in e.props?Wo(e.props.children):""}function Ws(e,t){let o=e.toLowerCase(),r="shrink-0 transition-colors duration-200";if(t)return(0,A.jsx)(te.Folder,{size:mt,strokeWidth:pt,className:p(r,"text-primary-400"),fill:"currentColor",fillOpacity:.15});let n=p(r,"text-text-dim group-hover:text-text-main");return Fo.CODE.test(o)?(0,A.jsx)(te.FileCode,{size:mt,strokeWidth:pt,className:n}):Fo.TEXT.test(o)?(0,A.jsx)(te.FileText,{size:mt,strokeWidth:pt,className:n}):Fo.IMAGE.test(o)?(0,A.jsx)(te.FileImage,{size:mt,strokeWidth:pt,className:n}):(0,A.jsx)(te.File,{size:mt,strokeWidth:pt,className:n})}function _o(e,t){if(!(0,ue.isValidElement)(e))return!1;let o=e.type;if(typeof o=="string")return o===t;if(typeof o=="function")return o.name===t||o.name?.toLowerCase()===t;let r=e.props;return r?.originalType===t||r?.mdxType===t}function Gs(e){let t=e.match(/\s+(\/\/|#)\s+(.*)$/);return t?{name:e.slice(0,t.index).trim(),comment:t[2]}:{name:e.trim()}}function Yt(e,t="root"){if(!(0,ue.isValidElement)(e))return[];let o=[];if(_o(e,"ul"))return ue.Children.forEach(e.props.children,(r,n)=>{o.push(...Yt(r,`${t}-${n}`))}),o;if(_o(e,"li")){let r=ue.Children.toArray(e.props.children),n=r.findIndex(b=>_o(b,"ul")),s=n!==-1,l=s?r.slice(0,n):r,c=s?r.slice(n):[],m=Wo(l),{name:a,comment:d}=Gs(m),u=a.endsWith("/"),g=u?a.slice(0,-1):a,h=s||u;return o.push({id:`${t}-${g}`,name:g,comment:d,isFolder:h,children:s?Yt(c[0],`${t}-${g}`):void 0}),o}return e.props&&typeof e.props=="object"&&"children"in e.props&&ue.Children.forEach(e.props.children,(r,n)=>{o.push(...Yt(r,`${t}-${n}`))}),o}function pn({item:e}){return(0,A.jsxs)(fe.TreeItem,{id:e.id,textValue:e.name,className:"outline-none group focus-visible:ring-2 focus-visible:ring-primary-500/30 rounded-md",children:[(0,A.jsx)(fe.TreeItemContent,{children:({isExpanded:t,hasChildItems:o})=>(0,A.jsxs)("div",{className:"flex items-center gap-2 py-1 px-1.5 rounded-md transition-colors hover:bg-primary-500/5 cursor-pointer",children:[(0,A.jsx)("div",{style:{width:"calc((var(--tree-item-level) - 1) * 1rem)"},className:"shrink-0"}),o?(0,A.jsx)(fe.Button,{slot:"chevron",className:"outline-none text-text-dim hover:text-primary-400 p-0.5 rounded transition-colors",children:(0,A.jsx)(te.ChevronRight,{size:14,strokeWidth:3,className:p("transition-transform duration-200",t&&"rotate-90")})}):(0,A.jsx)("div",{className:"w-[18px]"}),Ws(e.name,e.isFolder),(0,A.jsx)("span",{className:p("text-sm transition-colors truncate select-none",e.isFolder?"font-semibold text-text-main":"text-text-muted group-hover:text-text-main"),children:e.name}),e.comment&&(0,A.jsxs)("span",{className:"ml-2 text-xs italic text-text-dim opacity-70 group-hover:opacity-100 transition-opacity whitespace-nowrap overflow-hidden text-ellipsis font-sans",children:["//"," ",e.comment]})]})}),e.children&&(0,A.jsx)(fe.Collection,{items:e.children,children:t=>(0,A.jsx)(pn,{item:t})})]})}function eo({children:e}){let t=(0,ue.useMemo)(()=>Yt(e),[e]);return(0,A.jsx)("div",{className:"my-8",children:(0,A.jsx)(fe.Tree,{items:t,"aria-label":"File Tree",className:p("rounded-xl border border-border-subtle bg-bg-surface/50 p-4 font-mono text-sm shadow-sm backdrop-blur-sm outline-none","max-h-[500px] overflow-y-auto scrollbar-thin scrollbar-thumb-border-subtle","focus-visible:ring-2 focus-visible:ring-primary-500/20"),children:o=>(0,A.jsx)(pn,{item:o})})})}i();var dt=k(require("react-aria-components"));i();var We=require("react");function dn({data:e,sortable:t=!1,paginated:o=!1,pageSize:r=10}){let[n,s]=(0,We.useState)(null),[l,c]=(0,We.useState)(1),m=(0,We.useMemo)(()=>{if(!e)return[];let g=[...e];return t&&n!==null&&g.sort((h,b)=>{let x=h[n.key],I=b[n.key],J=typeof x=="string"?x:"",xt=typeof I=="string"?I:"";return J<xt?n.direction==="asc"?-1:1:J>xt?n.direction==="asc"?1:-1:0}),g},[e,n,t]),a=Math.ceil(m.length/r),d=(0,We.useMemo)(()=>{if(!o)return m;let g=(l-1)*r;return m.slice(g,g+r)},[m,o,l,r]);return{sortConfig:n,currentPage:l,setCurrentPage:c,totalPages:a,paginatedData:d,requestSort:g=>{if(!t)return;let h="asc";n&&n.key===g&&n.direction==="asc"&&(h="desc"),s({key:g,direction:h})}}}var Z=require("lucide-react");C();var P=require("react/jsx-runtime");function to({headers:e,data:t,children:o,className:r="",sortable:n=!1,paginated:s=!1,pageSize:l=10}){let{sortConfig:c,currentPage:m,setCurrentPage:a,totalPages:d,paginatedData:u,requestSort:g}=dn({data:t,sortable:n,paginated:s,pageSize:l}),h=x=>n?c?.key!==x?(0,P.jsx)(Z.ChevronDown,{size:14,className:"ml-1 opacity-30"}):c.direction==="asc"?(0,P.jsx)(Z.ChevronUp,{size:14,className:"ml-1 text-primary-400"}):(0,P.jsx)(Z.ChevronDown,{size:14,className:"ml-1 text-primary-400"}):null,b=o||(0,P.jsxs)(P.Fragment,{children:[e&&(0,P.jsx)("thead",{children:(0,P.jsx)("tr",{children:e.map((x,I)=>(0,P.jsx)("th",{onClick:()=>g(I),className:p("text-left px-3 py-2.5 border-b-2 border-border-subtle text-text-main font-semibold text-sm",n&&"cursor-pointer select-none hover:text-primary-400 transition-colors"),children:(0,P.jsxs)("div",{className:"flex items-center",children:[x,h(I)]})},I))})}),u&&(0,P.jsx)("tbody",{children:u.map((x,I)=>(0,P.jsx)("tr",{className:"transition-colors hover:bg-bg-surface",children:x.map((J,xt)=>(0,P.jsx)("td",{className:"px-3 py-2 border-b border-border-subtle text-sm text-text-muted",children:J},xt))},I))})]});return(0,P.jsxs)("div",{className:p("my-6 rounded-lg border border-border-subtle overflow-hidden",r),children:[(0,P.jsx)("div",{className:"overflow-x-auto",children:(0,P.jsx)("table",{className:"w-full border-collapse text-sm",children:b})}),s&&d>1&&(0,P.jsxs)("div",{className:"flex items-center justify-between border-t border-border-subtle px-4 py-3",children:[(0,P.jsxs)("span",{className:"text-xs text-text-muted",children:["Page ",m," of ",d]}),(0,P.jsxs)("div",{className:"flex items-center gap-1",children:[(0,P.jsx)(dt.Button,{onPress:()=>a(1),isDisabled:m===1,className:"grid place-items-center h-7 w-7 rounded-md text-text-muted outline-none transition-colors hover:bg-bg-surface disabled:opacity-30 disabled:pointer-events-none cursor-pointer",children:(0,P.jsx)(Z.ChevronsLeft,{size:16})}),(0,P.jsx)(dt.Button,{onPress:()=>a(x=>Math.max(x-1,1)),isDisabled:m===1,className:"grid place-items-center h-7 w-7 rounded-md text-text-muted outline-none transition-colors hover:bg-bg-surface disabled:opacity-30 disabled:pointer-events-none cursor-pointer",children:(0,P.jsx)(Z.ChevronLeft,{size:16})}),(0,P.jsx)(dt.Button,{onPress:()=>a(x=>Math.min(x+1,d)),isDisabled:m===d,className:"grid place-items-center h-7 w-7 rounded-md text-text-muted outline-none transition-colors hover:bg-bg-surface disabled:opacity-30 disabled:pointer-events-none cursor-pointer",children:(0,P.jsx)(Z.ChevronRight,{size:16})}),(0,P.jsx)(dt.Button,{onPress:()=>a(d),isDisabled:m===d,className:"grid place-items-center h-7 w-7 rounded-md text-text-muted outline-none transition-colors hover:bg-bg-surface disabled:opacity-30 disabled:pointer-events-none cursor-pointer",children:(0,P.jsx)(Z.ChevronsRight,{size:16})})]})]})]})}i();C();var Q=require("react/jsx-runtime");function oo({name:e,type:t,defaultValue:o,required:r=!1,children:n,id:s,className:l=""}){return(0,Q.jsxs)("article",{className:p("group relative my-6 rounded-xl border border-border-subtle bg-bg-surface p-5 transition-all duration-300","hover:border-primary-500/30 hover:shadow-lg hover:shadow-primary-500/5",l),id:s,children:[(0,Q.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-4",children:[(0,Q.jsxs)("div",{className:"flex flex-wrap items-center gap-2.5",children:[(0,Q.jsx)("code",{className:"inline-flex items-center rounded-md bg-primary-500/10 px-2.5 py-1 font-mono text-sm font-bold text-primary-400 border border-primary-500/20 shadow-sm transition-colors group-hover:bg-primary-500/15",children:e}),t&&(0,Q.jsx)("span",{className:"rounded-md bg-bg-muted/80 border border-border-subtle px-2 py-0.5 text-[11px] font-semibold text-text-muted uppercase tracking-wider shadow-sm",children:t}),r&&(0,Q.jsxs)("div",{className:"flex items-center gap-1.5 rounded-full bg-red-500/10 px-2.5 py-0.5 text-[10px] font-bold uppercase tracking-wider text-red-400 border border-red-500/20 shadow-sm",children:[(0,Q.jsx)("span",{className:"h-1 w-1 rounded-full bg-red-400 animate-pulse"}),"Required"]})]}),o&&(0,Q.jsxs)("div",{className:"flex items-center gap-2 text-[11px] text-text-muted bg-bg-muted/30 px-2.5 py-1 rounded-md border border-border-subtle/50",children:[(0,Q.jsx)("span",{className:"font-semibold opacity-60 uppercase tracking-tighter",children:"Default"}),(0,Q.jsx)("code",{className:"font-mono text-text-main font-medium",children:o})]})]}),(0,Q.jsx)("div",{className:"text-sm text-text-muted leading-relaxed [&>p]:m-0 selection:bg-primary-500/30",children:n})]})}i();Ve();C();var un=require("react/jsx-runtime");function ro({to:e,children:t,className:o="",...r}){let n=e&&(e.startsWith("http://")||e.startsWith("https://")||e.startsWith("//")),s=p("text-blue-600 hover:text-blue-800 hover:underline cursor-pointer",o);return(0,un.jsx)(G,{href:e,className:s,target:n?"_blank":void 0,rel:n?"noopener noreferrer":void 0,...r,children:t})}i();var fn=require("react/jsx-runtime");function no({src:e,alt:t,theme:o,...r}){let{theme:n}=Te();return o&&o!==n?null:(0,fn.jsx)("img",{src:e,alt:t||"",...r})}i();C();var L=require("react/jsx-runtime");function so({title:e,props:t,className:o=""}){return(0,L.jsxs)("div",{className:p("my-6",o),children:[e&&(0,L.jsx)("h3",{className:"text-base font-bold text-text-main mb-3",children:e}),(0,L.jsx)("div",{className:"overflow-x-auto rounded-lg border border-border-subtle",children:(0,L.jsxs)("table",{className:"w-full border-collapse text-sm",children:[(0,L.jsx)("thead",{children:(0,L.jsxs)("tr",{children:[(0,L.jsx)("th",{className:"text-left px-4 py-3 border-b-2 border-border-subtle text-xs font-bold uppercase tracking-wider text-text-muted",children:"Property"}),(0,L.jsx)("th",{className:"text-left px-4 py-3 border-b-2 border-border-subtle text-xs font-bold uppercase tracking-wider text-text-muted",children:"Type"}),(0,L.jsx)("th",{className:"text-left px-4 py-3 border-b-2 border-border-subtle text-xs font-bold uppercase tracking-wider text-text-muted",children:"Default"}),(0,L.jsx)("th",{className:"text-left px-4 py-3 border-b-2 border-border-subtle text-xs font-bold uppercase tracking-wider text-text-muted",children:"Description"})]})}),(0,L.jsx)("tbody",{children:t.map((r,n)=>(0,L.jsxs)("tr",{className:"transition-colors hover:bg-bg-surface",children:[(0,L.jsxs)("td",{className:"px-4 py-2.5 border-b border-border-subtle",children:[(0,L.jsx)("code",{className:"rounded bg-bg-surface px-1.5 py-0.5 font-mono text-xs font-bold text-primary-400",children:r.name}),r.required&&(0,L.jsx)("span",{className:"ml-1 text-red-400 font-bold",children:"*"})]}),(0,L.jsx)("td",{className:"px-4 py-2.5 border-b border-border-subtle",children:(0,L.jsx)("code",{className:"rounded bg-bg-muted px-1.5 py-0.5 font-mono text-xs text-text-muted",children:r.type})}),(0,L.jsx)("td",{className:"px-4 py-2.5 border-b border-border-subtle",children:r.defaultValue?(0,L.jsx)("code",{className:"rounded bg-bg-muted px-1.5 py-0.5 font-mono text-xs text-primary-400",children:r.defaultValue}):(0,L.jsx)("span",{className:"text-text-dim",children:"\u2014"})}),(0,L.jsx)("td",{className:"px-4 py-2.5 border-b border-border-subtle text-text-muted",children:r.description})]},`${r.name}-${n}`))})]})})]})}i();i();var Go=require("react");function gn(e){let{code:t,children:o,preview:r}=e,n=(0,Go.useMemo)(()=>(t??(typeof o=="string"?o:"")).trim(),[t,o]),s=(0,Go.useMemo)(()=>r??(typeof o!="string"?o:null),[r,o]);return{initialCode:n,previewElement:s}}var Ge=require("react/jsx-runtime");function io(e){let{highlightedHtml:t,hideCode:o=!1,hideSandbox:r=!1,hideCopy:n=!1,sandboxOptions:s={}}=e,{initialCode:l,previewElement:c}=gn(e);return(0,Ge.jsxs)("div",{className:"my-6 overflow-hidden rounded-xl border border-border-subtle",children:[(0,Ge.jsx)("div",{className:"flex items-center justify-center p-8 bg-bg-surface",children:c}),!o&&(0,Ge.jsx)("div",{className:"border-t border-border-subtle",children:(0,Ge.jsx)(de,{hideSandbox:r,hideCopy:n,title:s.title,lang:"tsx",highlightedHtml:t,children:l})})]})}i();var Dn=require("react"),Re=require("lucide-react");po();var V=require("react/jsx-runtime"),Mi=e=>{let[t,o]=(0,Dn.useState)(!1);return{copied:t,handleCopy:()=>{navigator.clipboard.writeText(e),o(!0),setTimeout(()=>o(!1),2e3)},handleOpenRaw:()=>{let s=new Blob([e],{type:"text/plain;charset=utf-8"}),l=URL.createObjectURL(s);window.open(l,"_blank")}}};function Ye({content:e,mdxRaw:t,config:o}){let r=t||e||"",{copied:n,handleCopy:s,handleOpenRaw:l}=Mi(r),c=o!==!1,m=typeof o=="object"&&o.text||"Copy Markdown";return!c||!r?null:(0,V.jsx)("div",{className:"relative inline-flex z-100 flex-shrink-0 w-max translate-y-0 active:translate-y-px transition-transform duration-200",children:(0,V.jsxs)(Mn,{className:"rounded-xl border border-border-subtle bg-bg-surface/40 backdrop-blur-md transition-all duration-300 hover:border-primary-500/50 hover:shadow-lg hover:shadow-primary-500/5 group overflow-hidden",children:[(0,V.jsx)(ie,{variant:"ghost",onPress:s,icon:n?(0,V.jsx)(Re.Check,{size:16}):(0,V.jsx)(Re.Copy,{size:16}),iconPosition:"left",className:p("px-5 py-2 bg-transparent text-[0.8125rem] font-semibold h-9 border-none shrink-0","text-text-main transition-all duration-300 hover:bg-primary-500/5",n&&"text-emerald-500 hover:bg-emerald-500/5"),children:n?"Copied!":m}),(0,V.jsxs)(co,{placement:"bottom end",children:[(0,V.jsx)(ie,{variant:"ghost",isIconOnly:!0,icon:(0,V.jsx)(Re.ChevronDown,{size:14}),className:p("px-3.5 h-9 border-l border-border-subtle/50 text-text-muted rounded-none bg-transparent shrink-0","transition-all duration-300 hover:bg-primary-500/5 hover:text-primary-500")}),(0,V.jsxs)(mo,{className:"w-52",children:[(0,V.jsxs)(Ue,{onAction:s,className:"flex flex-row items-start gap-2.5 group",children:[(0,V.jsx)(Re.Copy,{size:16,className:"w-4 h-4 shrink-0 mt-0.5 transition-transform duration-200 group-hover:-translate-y-0.5 text-text-muted group-hover:text-primary-500"}),(0,V.jsx)("span",{className:"font-medium text-[0.8125rem]",children:"Copy Markdown"})]}),(0,V.jsxs)(Ue,{onAction:l,className:"flex flex-row items-start gap-2.5 group",children:[(0,V.jsx)(Re.ExternalLink,{size:16,className:"w-4 h-4 shrink-0 mt-0.5 transition-transform duration-200 group-hover:-translate-y-0.5 text-text-muted group-hover:text-primary-500"}),(0,V.jsx)("span",{className:"font-medium text-[0.8125rem]",children:"View as Markdown"})]})]})]})]})})}var re=require("react/jsx-runtime"),et=({level:e,id:t,children:o})=>{let r=`h${e}`;return(0,re.jsxs)(r,{id:t,className:"boltdocs-heading",children:[o,t&&(0,re.jsx)("a",{href:`#${t}`,className:"header-anchor","aria-label":"Anchor",children:(0,re.jsx)(Vn.Link,{size:16})})]})},Hn={...br,h1:e=>(0,re.jsx)(et,{level:1,...e}),h2:e=>(0,re.jsx)(et,{level:2,...e}),h3:e=>(0,re.jsx)(et,{level:3,...e}),h4:e=>(0,re.jsx)(et,{level:4,...e}),h5:e=>(0,re.jsx)(et,{level:5,...e}),h6:e=>(0,re.jsx)(et,{level:6,...e}),pre:e=>(0,re.jsx)(de,{...e,children:e.children})};var R=require("react/jsx-runtime");function Ei({initialRoutes:e,initialConfig:t,docsDirName:o,modules:r,hot:n,homePage:s,externalPages:l,components:c={}}){let[m,a]=(0,ne.useState)(e),[d]=(0,ne.useState)(t),u=l||{},g=(0,ne.useMemo)(()=>m.filter(b=>!(s&&(b.path==="/"||b.path===""))&&!u[b.path===""?"/":b.path]).map(b=>{let x=Object.keys(r).find(J=>J===`/${o}/${b.filePath}`||J.endsWith(`/${o}/${b.filePath}`)||J.endsWith(`/${o}\\${b.filePath.replace(/\\/g,"/")}`)),I=x?r[x]:null;return{...b,Component:ne.default.lazy(async()=>I?await I():{default:it})}}),[m,r,o,s,u]);(0,ne.useEffect)(()=>{n&&n.on("boltdocs:routes-update",b=>{a(b)})},[n]);let h=(0,ne.useMemo)(()=>({...Hn,...c}),[c]);return(0,R.jsx)(Br,{children:(0,R.jsx)(Gr,{components:h,children:(0,R.jsx)(Io.Provider,{value:d,children:(0,R.jsx)(Or,{children:(0,R.jsxs)(Rr,{routes:m,modules:r,children:[(0,R.jsx)(zr,{}),(0,R.jsxs)(be.Routes,{children:[s&&(0,R.jsx)(be.Route,{path:"/",element:(0,R.jsx)(go.default,{children:(0,R.jsx)(s,{})})}),Object.entries(u).map(([b,x])=>(0,R.jsx)(be.Route,{path:b,element:(0,R.jsx)(go.default,{children:(0,R.jsx)(x,{})})},b)),(0,R.jsx)(be.Route,{element:(0,R.jsx)(_r,{}),children:g.map(b=>(0,R.jsx)(be.Route,{path:b.path===""?"/":b.path,element:(0,R.jsx)(ne.default.Suspense,{fallback:(0,R.jsx)(Nt,{}),children:(0,R.jsx)(jr,{Component:b.Component})})},b.path))},"docs-layout"),(0,R.jsx)(be.Route,{path:"*",element:(0,R.jsx)(go.default,{children:(0,R.jsx)(it,{})})})]})]})})})})})}function $n(e){let{target:t,routes:o,docsDirName:r,config:n,modules:s,hot:l,homePage:c,externalPages:m,components:a}=e,d=document.querySelector(t);if(!d)throw new Error(`[boltdocs] Mount target "${t}" not found in document.`);let u=(0,R.jsx)(ne.default.StrictMode,{children:(0,R.jsx)(be.BrowserRouter,{children:(0,R.jsx)(Ei,{initialRoutes:o,initialConfig:n,docsDirName:r,modules:s,hot:l,homePage:c,externalPages:m,components:a})})});d.innerHTML="",zn.default.createRoot(d).render(u)}Y();i();var Fn=require("react-router-dom");Y();Pt();function q(){let{routes:e}=Ct(),t=M(),o=(0,Fn.useLocation)(),r=e.find(u=>u.path===o.pathname),n=t.i18n?r?.locale||t.i18n.defaultLocale:void 0,s=t.versions?r?.version||t.versions.defaultVersion:void 0,l=e.filter(u=>{let g=t.i18n?(u.locale||t.i18n.defaultLocale)===n:!0,h=t.versions?(u.version||t.versions.defaultVersion)===s:!0;return g&&h}),c=t.i18n?.locales[n]||n,m=t.versions?.versions[s]||s,a=t.i18n?Object.entries(t.i18n.locales).map(([u,g])=>({key:u,label:g,isCurrent:u===n})):[],d=t.versions?Object.entries(t.versions.versions).map(([u,g])=>({key:u,label:g,isCurrent:u===s})):[];return{routes:l,allRoutes:e,currentRoute:r,currentLocale:n,currentLocaleLabel:c,availableLocales:a,currentVersion:s,currentVersionLabel:m,availableVersions:d,config:t}}i();C();var Ee=require("react/jsx-runtime");function Oi({children:e,className:t,style:o}){return(0,Ee.jsx)("div",{className:p("h-screen flex flex-col overflow-hidden bg-bg-main text-text-main",t),style:o,children:e})}function Di({children:e,className:t,style:o}){return(0,Ee.jsx)("div",{className:p("mx-auto flex flex-1 w-full max-w-(--breakpoint-3xl) bg-bg-main overflow-hidden",t),style:o,children:e})}function Vi({children:e,className:t,style:o}){return(0,Ee.jsx)("main",{className:p("boltdocs-content flex-1 min-w-0 overflow-y-auto",t),style:o,children:(0,Ee.jsx)("div",{className:"boltdocs-page mx-auto max-w-content-max pt-4 pb-20 px-4 sm:px-8",children:e})})}function Hi({children:e,className:t,style:o}){return(0,Ee.jsx)("div",{className:p("flex items-center justify-between mb-10",t),style:o,children:e})}function zi({children:e,className:t,style:o}){return(0,Ee.jsx)("div",{className:p("mt-20",t),style:o,children:e})}var Ie=Object.assign(Oi,{Body:Di,Content:Vi,ContentHeader:Hi,ContentFooter:zi});i();i();var yo=require("react");i();var _n=require("react-router-dom");Y();function Wn(){let e=M(),{theme:t}=Te(),o=(0,_n.useLocation)(),r=e.themeConfig||{},n=r.title||"Boltdocs",s=r.navbar||[],l=r.socialLinks||[],c=r.githubRepo,m=s.map(h=>{let b=h.href||h.to||h.link||"";return{label:h.label||h.text||"",href:b,active:o.pathname===b,to:b.startsWith("http")||b.startsWith("//")?"external":void 0}}),a=r.logo,d=a?typeof a=="string"?a:t==="dark"?a.dark:a.light:null,u={alt:(a&&typeof a=="object"?a.alt:void 0)||n,width:a&&typeof a=="object"?a.width:void 0,height:a&&typeof a=="object"?a.height:void 0},g=c?`https://github.com/${c}`:null;return{links:m,title:n,logo:d,logoProps:u,github:g,social:l,config:e,theme:t}}i();var Gn=require("react-router-dom");i();function Be(e,t,o){let r=e;return t&&(r===t||r.startsWith(t+"/"))&&(r=r===t?"index.md":r.slice(t.length+1)),o&&(r===o||r.startsWith(o+"/"))&&(r=r===o?"index.md":r.slice(o.length+1)),r}function Un(){let e=(0,Gn.useNavigate)(),t=q(),{allRoutes:o,currentRoute:r,currentVersion:n,currentLocale:s,config:l}=t,c=l.versions,m=d=>{if(!c||d===n)return;let u=`/docs/${d}`;if(r){let g=Be(r.filePath,r.version,r.locale),h=o.find(b=>Be(b.filePath,b.version,b.locale)===g&&(b.version||c.defaultVersion)===d&&(s?b.locale===s:!b.locale));if(h)u=h.path;else{let b=o.find(x=>Be(x.filePath,x.version,x.locale)==="index.md"&&(x.version||c.defaultVersion)===d&&(s?x.locale===s:!x.locale));u=b?b.path:`/docs/${d}${s?`/${s}`:""}`}}e(u)},a=t.availableVersions.map(d=>({...d,label:d.label,value:d.key}));return{currentVersion:n,currentVersionLabel:t.currentVersionLabel,availableVersions:a,handleVersionChange:m}}i();var qn=require("react-router-dom");function jn(){let e=(0,qn.useNavigate)(),t=q(),{allRoutes:o,currentRoute:r,currentLocale:n,config:s}=t,l=s.i18n,c=a=>{if(!l||a===n)return;let d="/";if(r){let u=Be(r.filePath,r.version,r.locale),g=o.find(h=>Be(h.filePath,h.version,h.locale)===u&&(h.locale||l.defaultLocale)===a&&h.version===r.version);if(g)d=g.path;else{let h=o.find(b=>Be(b.filePath,b.version,b.locale)==="index.md"&&(b.locale||l.defaultLocale)===a&&b.version===r.version);d=h?h.path:a===l.defaultLocale?r.version?`/${r.version}`:"/":r.version?`/${r.version}/${a}`:`/${a}`}}else d=a===l.defaultLocale?"/":`/${a}`;e(d)},m=t.availableLocales.map(a=>({...a,label:a.label,value:a.key}));return{currentLocale:n,currentLocaleLabel:t.currentLocaleLabel,availableLocales:m,handleLocaleChange:c}}lo();i();var bo=require("react"),ho=require("lucide-react");var Xn=require("react-aria-components"),gt=require("react/jsx-runtime");function Kn(){let{theme:e,toggleTheme:t}=Te(),[o,r]=(0,bo.useState)(!1);return(0,bo.useEffect)(()=>{r(!0)},[]),o?(0,gt.jsx)(Xn.ToggleButton,{onChange:t,className:"flex h-9 w-9 items-center justify-center rounded-md text-text-muted transition-colors hover:bg-bg-surface hover:text-text-main","aria-label":"Toggle theme",isSelected:e==="dark",children:e==="dark"?(0,gt.jsx)(ho.Sun,{size:20,className:"animate-in fade-in zoom-in duration-300"}):(0,gt.jsx)(ho.Moon,{size:20,className:"animate-in fade-in zoom-in duration-300"})}):(0,gt.jsx)("div",{className:"h-9 w-9"})}i();var xo=require("react");i();var $i="https://api.github.com";async function Zn(e,t,o=$i){let r=new Headers;t&&r.append("authorization",t);let s=await(await fetch(`${o}/repos/${e}`,{headers:r})).json();return s.stargazers_count!==void 0?Fi(s.stargazers_count):"0"}var Fi=e=>Intl.NumberFormat("en",{notation:"compact",compactDisplay:"short"}).format(e);Et();var bt=require("react/jsx-runtime");function Qn({repo:e}){let[t,o]=(0,xo.useState)(null);return(0,xo.useEffect)(()=>{e&&Zn(e).then(r=>o(r)).catch(()=>o("0"))},[e]),(0,bt.jsxs)("a",{href:`https://github.com/${e}`,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 rounded-md border border-border-subtle bg-bg-surface px-2.5 py-1.5 text-xs font-medium text-text-muted transition-all hover:bg-bg-main hover:border-border-strong hover:text-text-main",children:[(0,bt.jsx)(Mt,{className:"h-4 w-4"}),t&&(0,bt.jsx)("span",{className:"tabular-nums",children:t})]})}i();i();var Jn=require("react-router-dom"),tt=require("react");function Yn(e=[],t=[]){let o=(0,Jn.useLocation)(),r=(0,tt.useRef)([]),[n,s]=(0,tt.useState)({opacity:0,transform:"translateX(0) scaleX(0)",width:0}),c=t.find(d=>d.path===o.pathname)?.tab?.toLowerCase(),m=e.findIndex(d=>d.id.toLowerCase()===c),a=m===-1?0:m;return(0,tt.useEffect)(()=>{let d=r.current[a];d&&s({opacity:1,width:d.offsetWidth,transform:`translateX(${d.offsetLeft}px)`})},[a,e.length,o.pathname]),{tabs:e,activeIndex:a,indicatorStyle:n,tabRefs:r,activeTabId:c}}ar();Ve();var _i=k(require("lucide-react")),he=require("react/jsx-runtime");function es({tabs:e,routes:t}){let{indicatorStyle:o,tabRefs:r,activeIndex:n}=Yn(e,t),s=l=>{if(!l)return null;if(l.trim().startsWith("<svg"))return(0,he.jsx)("span",{className:"h-4 w-4",dangerouslySetInnerHTML:{__html:l}});let c=_i[l];return c?(0,he.jsx)(c,{size:16}):(0,he.jsx)("img",{src:l,alt:"",className:"h-4 w-4 object-contain"})};return(0,he.jsx)("div",{className:"mx-auto max-w-(--breakpoint-3xl) px-4 md:px-6",children:(0,he.jsxs)(ir.TabsList,{className:"border-none py-0",children:[e.map((l,c)=>{let m=c===n,a=t.find(u=>u.tab&&u.tab.toLowerCase()===l.id.toLowerCase()),d=a?a.path:"#";return(0,he.jsxs)(G,{href:d,ref:u=>{r.current[c]=u},className:`relative flex items-center gap-2 px-4 py-3 text-sm font-medium transition-colors outline-none ${m?"text-primary-500":"text-text-muted hover:text-text-main"}`,children:[s(l.icon),(0,he.jsx)("span",{children:l.text})]},l.id)}),(0,he.jsx)(ir.TabsIndicator,{style:o})]})})}var is=require("react-router-dom");gr();St();var hr=require("lucide-react");Y();var v=require("react/jsx-runtime"),Gi=(0,yo.lazy)(()=>Promise.resolve().then(()=>(ss(),ns)).then(e=>({default:e.SearchDialog})));function Co(){let{links:e,title:t,logo:o,logoProps:r,github:n,social:s,config:l}=Wn(),{routes:c,allRoutes:m,currentVersion:a,currentLocale:d}=q(),{pathname:u}=(0,is.useLocation)(),{themeConfig:g}=M(),h=g?.tabs&&g.tabs.length>0;return(0,v.jsxs)(_.NavbarRoot,{className:h?"border-b-0":"",children:[(0,v.jsxs)(_.Content,{children:[(0,v.jsxs)(_.NavbarLeft,{children:[(0,v.jsx)(_.NavbarLogo,{src:o??"",alt:r?.alt||t,width:r?.width??24,height:r?.height??24}),(0,v.jsx)(_.Title,{children:t}),l.versions&&a&&(0,v.jsx)(Ui,{}),(0,v.jsx)(_.Links,{children:e.map(b=>(0,v.jsx)(_.Link,{...b},b.href))})]}),(0,v.jsx)(_.NavbarCenter,{children:(0,v.jsx)(yo.Suspense,{fallback:(0,v.jsx)("div",{className:"h-9 w-32 animate-pulse rounded-md bg-bg-surface"}),children:(0,v.jsx)(Gi,{routes:c||[]})})}),(0,v.jsxs)(_.NavbarRight,{children:[l.i18n&&d&&(0,v.jsx)(qi,{}),(0,v.jsx)(_.Split,{}),(0,v.jsx)(Kn,{}),n&&(0,v.jsx)(Qn,{repo:g?.githubRepo??""}),s.length>0&&(0,v.jsx)(_.Split,{}),(0,v.jsx)("div",{className:"flex items-center gap-1",children:s.map(({icon:b,link:x})=>(0,v.jsx)(_.Socials,{icon:b,link:x,className:"p-1.5"},x))})]})]}),u!=="/"&&h&&l.themeConfig?.tabs&&(0,v.jsx)("div",{className:"w-full border-b border-border-subtle bg-bg-main",children:(0,v.jsx)(es,{tabs:l.themeConfig.tabs,routes:m||c||[]})})]})}function Ui(){let{currentVersionLabel:e,availableVersions:t,handleVersionChange:o}=Un();return t.length===0?null:(0,v.jsxs)(Me.Trigger,{children:[(0,v.jsx)(ie,{variant:"outline",iconPosition:"right",icon:(0,v.jsx)(hr.ChevronDown,{}),children:e}),(0,v.jsx)(Me.Section,{items:t,children:r=>(0,v.jsx)(Me.Item,{onPress:()=>o(r.value),children:r.label},`${r.value??""}`)})]})}function qi(){let{currentLocaleLabel:e,availableLocales:t,handleLocaleChange:o}=jn();return t.length===0?null:(0,v.jsxs)(Me.Trigger,{children:[(0,v.jsx)(ie,{variant:"outline",iconPosition:"right",icon:(0,v.jsx)(hr.ChevronDown,{}),children:e}),(0,v.jsx)(Me.Section,{items:t,children:r=>(0,v.jsx)(Me.Item,{onPress:()=>o(r.value),children:r.label},`${r.value??""}`)})]})}i();var ot=require("react");i();var as=require("react-router-dom");Y();function ls(e){let t=M(),o=(0,as.useLocation)(),r=e.find(a=>a.path===o.pathname),n=r?.tab?.toLowerCase(),s=n?e.filter(a=>!a.tab||a.tab.toLowerCase()===n):e,l=[],c=new Map;for(let a of s)a.group?(c.has(a.group)||c.set(a.group,{slug:a.group,title:a.groupTitle||a.group,routes:[],icon:a.groupIcon}),c.get(a.group).routes.push(a)):l.push(a);return{groups:Array.from(c.values()),ungrouped:l,activeRoute:r,activePath:o.pathname,config:t}}lr();i();var cs=require("lucide-react"),Oe=require("react/jsx-runtime");function ms(){return(0,Oe.jsx)("div",{className:"rounded-full px-4 py-2 bg-gray-100 text-xs text-gray-500 flex items-center gap-1 mt-6 justify-center",children:(0,Oe.jsxs)("a",{href:"https://github.com/jesusalcaladev/boltdocs",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1",children:[(0,Oe.jsx)(cs.Zap,{className:"powered-by-icon",size:12,fill:"currentColor"}),(0,Oe.jsxs)("span",{children:["Powered by ",(0,Oe.jsx)("strong",{children:"Boltdocs"})]})]})})}var ji=k(require("lucide-react")),xe=require("react/jsx-runtime");function ps(e){return e&&ji[e]||void 0}function Xi({group:e,activePath:t,getIcon:o}){let r=(0,ot.useMemo)(()=>e.routes.some(l=>l.path===t),[e.routes,t]),[n,s]=(0,ot.useState)(!0);return(0,ot.useEffect)(()=>{r&&s(!0)},[r]),(0,xe.jsx)(Xe.SidebarGroup,{title:e.title,isOpen:n,onToggle:()=>s(!n),children:e.routes.map(l=>(0,xe.jsx)(Xe.SidebarLink,{label:l.title,href:l.path,active:t===l.path,icon:o(l.icon),badge:l.badge},l.path))})}function Po({routes:e,config:t}){let{groups:o,ungrouped:r,activePath:n}=ls(e);return(0,xe.jsxs)(Xe.SidebarRoot,{children:[r.length>0&&(0,xe.jsx)(Xe.SidebarGroup,{className:"mb-6",children:r.map(s=>(0,xe.jsx)(Xe.SidebarLink,{label:s.title,href:s.path,active:n===s.path,icon:ps(s.icon),badge:s.badge},s.path))}),o.map(s=>(0,xe.jsx)(Xi,{group:s,activePath:n,getIcon:ps},s.slug)),t.themeConfig?.poweredBy&&(0,xe.jsx)("div",{className:"mt-auto pt-8",children:(0,xe.jsx)(ms,{})})]})}i();nr();var me=k(require("react"));i();var ds=require("react");function us(e=[]){let[t,o]=(0,ds.useState)(null);return{headings:e,activeId:t,setActiveId:o}}var rt=require("lucide-react"),S=require("react/jsx-runtime");function Ro({headings:e=[],editLink:t,communityHelp:o,filePath:r}){let{headings:n}=us(e),s=me.default.useMemo(()=>n.map(l=>({title:l.text,url:`#${l.id}`,depth:l.level})),[n]);return n.length===0?null:(0,S.jsx)(wn,{toc:s,children:(0,S.jsx)(Ki,{headings:n,editLink:t,communityHelp:o,filePath:r})})}function Ki({headings:e,editLink:t,communityHelp:o,filePath:r}){let n=Rn(),[s,l]=(0,me.useState)({opacity:0}),c=(0,me.useRef)(null),m=(0,me.useRef)(null);(0,me.useEffect)(()=>{if(!n||!c.current)return;let d=c.current.querySelector(`a[href="#${n}"]`);d&&l({transform:`translateY(${d.offsetTop}px)`,height:`${d.offsetHeight}px`,opacity:1})},[n]);let a=(0,me.useCallback)((d,u)=>{d.preventDefault();let g=document.getElementById(u);g&&(g.scrollIntoView({behavior:"smooth"}),window.history.pushState(null,"",`#${u}`))},[]);return(0,S.jsxs)(Ae.OnThisPageRoot,{children:[(0,S.jsxs)(Ae.OnThisPageHeader,{className:"flex flex-row gap-x-2",children:[(0,S.jsx)(rt.TextAlignStart,{size:16}),"On this page"]}),(0,S.jsx)(Nn,{containerRef:m,children:(0,S.jsxs)(Ae.OnThisPageContent,{className:"max-h-[450px] boltdocs-otp-scroll-area",ref:m,children:[(0,S.jsx)(Ae.OnThisPageIndicator,{style:s}),(0,S.jsx)("ul",{className:"relative space-y-2 border-l border-border-subtle",ref:c,children:e.map(d=>(0,S.jsx)(Ae.OnThisPageItem,{level:d.level,children:(0,S.jsx)(Ae.OnThisPageLink,{href:`#${d.id}`,active:n===d.id,onClick:u=>a(u,d.id),className:"pl-4",children:d.text})},d.id))})]})}),(t||o)&&(0,S.jsxs)("div",{className:"mt-8 pt-8 border-t border-border-subtle space-y-4",children:[(0,S.jsx)("p",{className:"text-xs font-bold uppercase tracking-wider text-text-main",children:"Need help?"}),(0,S.jsxs)("ul",{className:"space-y-3",children:[t&&r&&(0,S.jsx)("li",{children:(0,S.jsxs)("a",{href:t.replace(":path",r),target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 text-sm text-text-muted hover:text-text-main transition-colors",children:[(0,S.jsx)(rt.Pencil,{size:16}),"Edit this page"]})}),o&&(0,S.jsx)("li",{children:(0,S.jsxs)("a",{href:o,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 text-sm text-text-muted hover:text-text-main transition-colors",children:[(0,S.jsx)(rt.CircleHelp,{size:16}),"Community help"]})})]})]})]})}i();var fs=require("react"),gs=require("react-router-dom");function No({siteTitle:e,siteDescription:t,routes:o}){let r=(0,gs.useLocation)();return(0,fs.useEffect)(()=>{let n=o.find(a=>a.path===r.pathname),s=n?.title,l=n?.description||t||"";document.title=s?`${s} | ${e}`:e;let c=document.querySelector('meta[name="description"]');c||(c=document.createElement("meta"),c.name="description",document.head.appendChild(c)),c.content=l,De("property","og:title",document.title),De("property","og:description",l),De("property","og:type","article"),De("property","og:url",window.location.href),De("name","twitter:card","summary"),De("name","twitter:title",document.title),De("name","twitter:description",l);let m=document.querySelector('link[rel="canonical"]');m||(m=document.createElement("link"),m.rel="canonical",document.head.appendChild(m)),m.href=window.location.origin+r.pathname},[r.pathname,e,t,o]),null}function De(e,t,o){let r=document.querySelector(`meta[${e}="${t}"]`);r||(r=document.createElement("meta"),r.setAttribute(e,t),document.head.appendChild(r)),r.content=o}i();i();function bs(){let{currentRoute:e}=q(),t=[];return e&&(e.groupTitle&&t.push({label:e.groupTitle}),t.push({label:e.title,href:e.path})),{crumbs:t,activeRoute:e}}var hs=require("lucide-react");pr();C();Y();var Ne=require("react/jsx-runtime");function wo(){let{crumbs:e,activeRoute:t}=bs(),o=M();return e.length===0||!o.themeConfig?.breadcrumbs?null:(0,Ne.jsxs)(Bn,{children:[(0,Ne.jsx)(cr,{children:(0,Ne.jsx)(mr,{href:"/",children:(0,Ne.jsx)(hs.Home,{size:14})})}),e.map((r,n)=>(0,Ne.jsxs)(cr,{children:[(0,Ne.jsx)(An,{}),(0,Ne.jsx)(mr,{href:r.href,className:p({"font-medium text-text-main":r.href===t?.path}),children:r.label})]},`crumb-${r.href}-${r.label}-${n}`))]})}i();i();function xs(){let{routes:e}=q(),t=window.location.pathname,o=e.findIndex(l=>l.path===t),r=e[o],n=o>0?e[o-1]:null,s=o<e.length-1?e[o+1]:null;return{prevPage:n,nextPage:s,currentRoute:r}}sr();var ve=require("react/jsx-runtime");function To(){let{prevPage:e,nextPage:t}=xs();return!e&&!t?null:(0,ve.jsxs)(Se.PageNavRoot,{children:[e?(0,ve.jsxs)(Se.PageNavLink,{to:e.path,direction:"prev",children:[(0,ve.jsx)(Se.PageNavLink.Title,{children:"Previous"}),(0,ve.jsx)(Se.PageNavLink.Description,{children:e.title})]}):(0,ve.jsx)("div",{}),t&&(0,ve.jsxs)(Se.PageNavLink,{to:t.path,direction:"next",children:[(0,ve.jsx)(Se.PageNavLink.Title,{children:"Next"}),(0,ve.jsx)(Se.PageNavLink.Description,{children:t.title})]})]})}i();var ko=require("react"),vs=require("react-aria-components"),xr=require("react/jsx-runtime");function Lo(){let[e,t]=(0,ko.useState)(0);return(0,ko.useEffect)(()=>{let o=null,r,n=()=>{if(!o)return;let{scrollTop:l,scrollHeight:c,clientHeight:m}=o;if(c<=m){t(0);return}let a=l/(c-m)*100;t(Math.min(100,Math.max(0,a)))},s=()=>(o=document.querySelector(".boltdocs-content"),o?(o.addEventListener("scroll",n),n(),r&&clearInterval(r),!0):!1);return s()||(r=setInterval(s,100)),()=>{o&&o.removeEventListener("scroll",n),r&&clearInterval(r)}},[]),(0,xr.jsx)(vs.ProgressBar,{value:e,"aria-label":"Reading progress",className:"fixed top-0 left-0 right-0 z-999 h-0.5 bg-transparent w-full pointer-events-none",children:({percentage:o})=>(0,xr.jsx)("div",{className:"h-full bg-primary-500 transition-[width] duration-300 ease-out shadow-[0_0_8px_rgba(var(--primary-rgb),0.4)]",style:{width:`${o}%`}})})}i();var ys=require("react");po();var nt=require("react/jsx-runtime"),st=class extends ys.Component{state={hasError:!1};static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,o){console.error("Uncaught error in Boltdocs Layout:",t,o)}render(){return this.state.hasError?this.props.fallback||(0,nt.jsxs)("div",{className:"flex flex-col items-center justify-center min-h-[40vh] text-center gap-4 px-4",children:[(0,nt.jsx)("div",{className:"text-lg font-bold text-red-400",children:"Something went wrong"}),(0,nt.jsx)("p",{className:"text-sm text-text-muted max-w-md",children:this.state.error?.message||"An unexpected error occurred while rendering this page."}),(0,nt.jsx)(ie,{className:"rounded-lg border border-border-subtle bg-bg-surface px-5 py-2 text-sm font-medium text-text-main transition-colors hover:bg-bg-muted cursor-pointer",onPress:()=>this.setState({hasError:!1}),children:"Try again"})]}):this.props.children}};Y();var Cs=require("react-router-dom"),$=require("react/jsx-runtime");function Ps({children:e}){let{routes:t,allRoutes:o,currentRoute:r}=q(),{pathname:n}=(0,Cs.useLocation)(),s=M(),c=He().CopyMarkdown||Ye,m=n==="/"||n==="";return(0,$.jsxs)(Ie,{children:[(0,$.jsx)(Lo,{}),(0,$.jsx)(No,{siteTitle:s.themeConfig?.title||"Boltdocs",siteDescription:s.themeConfig?.description||"",routes:o}),(0,$.jsx)(Co,{}),(0,$.jsxs)(Ie.Body,{children:[!m&&(0,$.jsx)(Po,{routes:t,config:s}),(0,$.jsxs)(Ie.Content,{children:[!m&&(0,$.jsxs)(Ie.ContentHeader,{children:[(0,$.jsx)(wo,{}),(0,$.jsx)(c,{mdxRaw:r?._rawContent,route:r,config:s.themeConfig?.copyMarkdown})]}),(0,$.jsx)(st,{children:e}),!m&&(0,$.jsx)(Ie.ContentFooter,{children:(0,$.jsx)(To,{})})]}),!m&&(0,$.jsx)(Ro,{headings:r?.headings,editLink:s.themeConfig?.editLink,communityHelp:s.themeConfig?.communityHelp,filePath:r?.filePath})]})]})}0&&(module.exports={Admonition,Badge,Breadcrumbs,Button,Card,Cards,Caution,CodeBlock,ComponentPreview,ComponentProps,CopyMarkdown,Danger,DefaultLayout,DocsLayout,ErrorBoundary,Field,FileTree,Head,Image,Important,InfoBox,Link,List,Loading,Navbar,NotFound,Note,OnThisPage,PageNav,ProgressBar,Sidebar,Tab,Table,Tabs,Tip,Video,Warning,createBoltdocsApp,defineSandbox,embedSandbox,openSandbox,useConfig,useMdxComponents,useRoutes,useTheme});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as Ee,b as Oe,c as _,e as st}from"../chunk-QYPNX5UN.mjs";import{a as O,b as pe,c as ue,d as de,e as fe,f as ge,g as he,h as be,i as ve}from"../chunk-IWHRQHS7.mjs";import{A as it,B as U,a as Me,b as De,c as He,d as $e,e as Ae,f as ze,g as Ge,h as _e,i as Fe,j as Ve,k as qe,l as Ue,m as We,n as Je,o as Ye,p as Ze,q as Ke,r as Qe,s as Xe,t as je,u as et,v as tt,w as ot,x as rt,y as nt,z as at}from"../chunk-A4HQPEPU.mjs";import{b as G}from"../chunk-BA5NH5HU.mjs";import{A as ce,F as N,a as v,b as ne,d as E,e as ae,h as d,q as ie,r as se,s as me,t as y,u as x,v as F,w as k,x as le,y as V,z as q}from"../chunk-BQCD3DWG.mjs";import{b as P}from"../chunk-XEAPSFMB.mjs";import"../chunk-JZXLCA2E.mjs";import{jsx as R}from"react/jsx-runtime";function mt({children:e,className:t,style:r}){return R("div",{className:v("h-screen flex flex-col overflow-hidden bg-bg-main text-text-main",t),style:r,children:e})}function lt({children:e,className:t,style:r}){return R("div",{className:v("mx-auto flex flex-1 w-full max-w-(--breakpoint-3xl) bg-bg-main overflow-hidden",t),style:r,children:e})}function ct({children:e,className:t,style:r}){return R("main",{className:v("boltdocs-content flex-1 min-w-0 overflow-y-auto",t),style:r,children:R("div",{className:"boltdocs-page mx-auto max-w-content-max pt-4 pb-20 px-4 sm:px-8",children:e})})}function pt({children:e,className:t,style:r}){return R("div",{className:v("flex items-center justify-between mb-10",t),style:r,children:e})}function ut({children:e,className:t,style:r}){return R("div",{className:v("mt-20",t),style:r,children:e})}var C=Object.assign(mt,{Body:lt,Content:ct,ContentHeader:pt,ContentFooter:ut});import{Suspense as Lt,lazy as Tt}from"react";import{useEffect as dt,useState as ft}from"react";import{Sun as gt,Moon as ht}from"lucide-react";import{ToggleButton as bt}from"react-aria-components";import{jsx as A}from"react/jsx-runtime";function xe(){let{theme:e,toggleTheme:t}=G(),[r,o]=ft(!1);return dt(()=>{o(!0)},[]),r?A(bt,{onChange:t,className:"flex h-9 w-9 items-center justify-center rounded-md text-text-muted transition-colors hover:bg-bg-surface hover:text-text-main","aria-label":"Toggle theme",isSelected:e==="dark",children:e==="dark"?A(gt,{size:20,className:"animate-in fade-in zoom-in duration-300"}):A(ht,{size:20,className:"animate-in fade-in zoom-in duration-300"})}):A("div",{className:"h-9 w-9"})}import{useEffect as Pt,useState as yt}from"react";var vt="https://api.github.com";async function Pe(e,t,r=vt){let o=new Headers;t&&o.append("authorization",t);let n=await(await fetch(`${r}/repos/${e}`,{headers:o})).json();return n.stargazers_count!==void 0?xt(n.stargazers_count):"0"}var xt=e=>Intl.NumberFormat("en",{notation:"compact",compactDisplay:"short"}).format(e);import{jsx as ye,jsxs as Nt}from"react/jsx-runtime";function Ne({repo:e}){let[t,r]=yt(null);return Pt(()=>{e&&Pe(e).then(o=>r(o)).catch(()=>r("0"))},[e]),Nt("a",{href:`https://github.com/${e}`,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 rounded-md border border-border-subtle bg-bg-surface px-2.5 py-1.5 text-xs font-medium text-text-muted transition-all hover:bg-bg-main hover:border-border-strong hover:text-text-main",children:[ye(ae,{className:"h-4 w-4"}),t&&ye("span",{className:"tabular-nums",children:t})]})}import*as Ct from"lucide-react";import{jsx as B,jsxs as Ce}from"react/jsx-runtime";function Le({tabs:e,routes:t}){let{indicatorStyle:r,tabRefs:o,activeIndex:i}=fe(e,t),n=a=>{if(!a)return null;if(a.trim().startsWith("<svg"))return B("span",{className:"h-4 w-4",dangerouslySetInnerHTML:{__html:a}});let m=Ct[a];return m?B(m,{size:16}):B("img",{src:a,alt:"",className:"h-4 w-4 object-contain"})};return B("div",{className:"mx-auto max-w-(--breakpoint-3xl) px-4 md:px-6",children:Ce(F.TabsList,{className:"border-none py-0",children:[e.map((a,m)=>{let l=m===i,h=t.find(g=>g.tab&&g.tab.toLowerCase()===a.id.toLowerCase()),c=h?h.path:"#";return Ce(ne,{href:c,ref:g=>{o.current[m]=g},className:`relative flex items-center gap-2 px-4 py-3 text-sm font-medium transition-colors outline-none ${l?"text-primary-500":"text-text-muted hover:text-text-main"}`,children:[n(a.icon),B("span",{children:a.text})]},a.id)}),B(F.TabsIndicator,{style:r})]})})}import{useLocation as St}from"react-router-dom";import{ChevronDown as Te}from"lucide-react";import{jsx as s,jsxs as I}from"react/jsx-runtime";var wt=Tt(()=>import("../search-dialog-EB3N4TYM.mjs").then(e=>({default:e.SearchDialog})));function W(){let{links:e,title:t,logo:r,logoProps:o,github:i,social:n,config:a}=pe(),{routes:m,allRoutes:l,currentVersion:h,currentLocale:c}=O(),{pathname:g}=St(),{themeConfig:w}=P(),oe=w?.tabs&&w.tabs.length>0;return I(d.NavbarRoot,{className:oe?"border-b-0":"",children:[I(d.Content,{children:[I(d.NavbarLeft,{children:[s(d.NavbarLogo,{src:r??"",alt:o?.alt||t,width:o?.width??24,height:o?.height??24}),s(d.Title,{children:t}),a.versions&&h&&s(kt,{}),s(d.Links,{children:e.map($=>s(d.Link,{...$},$.href))})]}),s(d.NavbarCenter,{children:s(Lt,{fallback:s("div",{className:"h-9 w-32 animate-pulse rounded-md bg-bg-surface"}),children:s(wt,{routes:m||[]})})}),I(d.NavbarRight,{children:[a.i18n&&c&&s(Rt,{}),s(d.Split,{}),s(xe,{}),i&&s(Ne,{repo:w?.githubRepo??""}),n.length>0&&s(d.Split,{}),s("div",{className:"flex items-center gap-1",children:n.map(({icon:$,link:re})=>s(d.Socials,{icon:$,link:re,className:"p-1.5"},re))})]})]}),g!=="/"&&oe&&a.themeConfig?.tabs&&s("div",{className:"w-full border-b border-border-subtle bg-bg-main",children:s(Le,{tabs:a.themeConfig.tabs,routes:l||m||[]})})]})}function kt(){let{currentVersionLabel:e,availableVersions:t,handleVersionChange:r}=ue();return t.length===0?null:I(N.Trigger,{children:[s(E,{variant:"outline",iconPosition:"right",icon:s(Te,{}),children:e}),s(N.Section,{items:t,children:o=>s(N.Item,{onPress:()=>r(o.value),children:o.label},`${o.value??""}`)})]})}function Rt(){let{currentLocaleLabel:e,availableLocales:t,handleLocaleChange:r}=de();return t.length===0?null:I(N.Trigger,{children:[s(E,{variant:"outline",iconPosition:"right",icon:s(Te,{}),children:e}),s(N.Section,{items:t,children:o=>s(N.Item,{onPress:()=>r(o.value),children:o.label},`${o.value??""}`)})]})}import{useState as It,useEffect as Et,useMemo as Ot}from"react";import{Zap as Bt}from"lucide-react";import{jsx as J,jsxs as Se}from"react/jsx-runtime";function we(){return J("div",{className:"rounded-full px-4 py-2 bg-gray-100 text-xs text-gray-500 flex items-center gap-1 mt-6 justify-center",children:Se("a",{href:"https://github.com/jesusalcaladev/boltdocs",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1",children:[J(Bt,{className:"powered-by-icon",size:12,fill:"currentColor"}),Se("span",{children:["Powered by ",J("strong",{children:"Boltdocs"})]})]})})}import*as Mt from"lucide-react";import{jsx as L,jsxs as Ht}from"react/jsx-runtime";function ke(e){return e&&Mt[e]||void 0}function Dt({group:e,activePath:t,getIcon:r}){let o=Ot(()=>e.routes.some(a=>a.path===t),[e.routes,t]),[i,n]=It(!0);return Et(()=>{o&&n(!0)},[o]),L(k.SidebarGroup,{title:e.title,isOpen:i,onToggle:()=>n(!i),children:e.routes.map(a=>L(k.SidebarLink,{label:a.title,href:a.path,active:t===a.path,icon:r(a.icon),badge:a.badge},a.path))})}function Y({routes:e,config:t}){let{groups:r,ungrouped:o,activePath:i}=ge(e);return Ht(k.SidebarRoot,{children:[o.length>0&&L(k.SidebarGroup,{className:"mb-6",children:o.map(n=>L(k.SidebarLink,{label:n.title,href:n.path,active:i===n.path,icon:ke(n.icon),badge:n.badge},n.path))}),r.map(n=>L(Dt,{group:n,activePath:i,getIcon:ke},n.slug)),t.themeConfig?.poweredBy&&L("div",{className:"mt-auto pt-8",children:L(we,{})})]})}import $t,{useRef as Re,useEffect as At,useState as zt,useCallback as Gt}from"react";import{Pencil as _t,CircleHelp as Ft,TextAlignStart as Vt}from"lucide-react";import{jsx as f,jsxs as T}from"react/jsx-runtime";function Z({headings:e=[],editLink:t,communityHelp:r,filePath:o}){let{headings:i}=he(e),n=$t.useMemo(()=>i.map(a=>({title:a.text,url:`#${a.id}`,depth:a.level})),[i]);return i.length===0?null:f(me,{toc:n,children:f(qt,{headings:i,editLink:t,communityHelp:r,filePath:o})})}function qt({headings:e,editLink:t,communityHelp:r,filePath:o}){let i=ie(),[n,a]=zt({opacity:0}),m=Re(null),l=Re(null);At(()=>{if(!i||!m.current)return;let c=m.current.querySelector(`a[href="#${i}"]`);c&&a({transform:`translateY(${c.offsetTop}px)`,height:`${c.offsetHeight}px`,opacity:1})},[i]);let h=Gt((c,g)=>{c.preventDefault();let w=document.getElementById(g);w&&(w.scrollIntoView({behavior:"smooth"}),window.history.pushState(null,"",`#${g}`))},[]);return T(y.OnThisPageRoot,{children:[T(y.OnThisPageHeader,{className:"flex flex-row gap-x-2",children:[f(Vt,{size:16}),"On this page"]}),f(se,{containerRef:l,children:T(y.OnThisPageContent,{className:"max-h-[450px] boltdocs-otp-scroll-area",ref:l,children:[f(y.OnThisPageIndicator,{style:n}),f("ul",{className:"relative space-y-2 border-l border-border-subtle",ref:m,children:e.map(c=>f(y.OnThisPageItem,{level:c.level,children:f(y.OnThisPageLink,{href:`#${c.id}`,active:i===c.id,onClick:g=>h(g,c.id),className:"pl-4",children:c.text})},c.id))})]})}),(t||r)&&T("div",{className:"mt-8 pt-8 border-t border-border-subtle space-y-4",children:[f("p",{className:"text-xs font-bold uppercase tracking-wider text-text-main",children:"Need help?"}),T("ul",{className:"space-y-3",children:[t&&o&&f("li",{children:T("a",{href:t.replace(":path",o),target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 text-sm text-text-muted hover:text-text-main transition-colors",children:[f(_t,{size:16}),"Edit this page"]})}),r&&f("li",{children:T("a",{href:r,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 text-sm text-text-muted hover:text-text-main transition-colors",children:[f(Ft,{size:16}),"Community help"]})})]})]})]})}import{useEffect as Ut}from"react";import{useLocation as Wt}from"react-router-dom";function K({siteTitle:e,siteDescription:t,routes:r}){let o=Wt();return Ut(()=>{let i=r.find(h=>h.path===o.pathname),n=i?.title,a=i?.description||t||"";document.title=n?`${n} | ${e}`:e;let m=document.querySelector('meta[name="description"]');m||(m=document.createElement("meta"),m.name="description",document.head.appendChild(m)),m.content=a,S("property","og:title",document.title),S("property","og:description",a),S("property","og:type","article"),S("property","og:url",window.location.href),S("name","twitter:card","summary"),S("name","twitter:title",document.title),S("name","twitter:description",a);let l=document.querySelector('link[rel="canonical"]');l||(l=document.createElement("link"),l.rel="canonical",document.head.appendChild(l)),l.href=window.location.origin+o.pathname},[o.pathname,e,t,r]),null}function S(e,t,r){let o=document.querySelector(`meta[${e}="${t}"]`);o||(o=document.createElement("meta"),o.setAttribute(e,t),document.head.appendChild(o)),o.content=r}import{Home as Jt}from"lucide-react";import{jsx as M,jsxs as Be}from"react/jsx-runtime";function Q(){let{crumbs:e,activeRoute:t}=be(),r=P();return e.length===0||!r.themeConfig?.breadcrumbs?null:Be(le,{children:[M(V,{children:M(q,{href:"/",children:M(Jt,{size:14})})}),e.map((o,i)=>Be(V,{children:[M(ce,{}),M(q,{href:o.href,className:v({"font-medium text-text-main":o.href===t?.path}),children:o.label})]},`crumb-${o.href}-${o.label}-${i}`))]})}import{jsx as D,jsxs as X}from"react/jsx-runtime";function j(){let{prevPage:e,nextPage:t}=ve();return!e&&!t?null:X(x.PageNavRoot,{children:[e?X(x.PageNavLink,{to:e.path,direction:"prev",children:[D(x.PageNavLink.Title,{children:"Previous"}),D(x.PageNavLink.Description,{children:e.title})]}):D("div",{}),t&&X(x.PageNavLink,{to:t.path,direction:"next",children:[D(x.PageNavLink.Title,{children:"Next"}),D(x.PageNavLink.Description,{children:t.title})]})]})}import{useEffect as Yt,useState as Zt}from"react";import{ProgressBar as Kt}from"react-aria-components";import{jsx as Ie}from"react/jsx-runtime";function ee(){let[e,t]=Zt(0);return Yt(()=>{let r=null,o,i=()=>{if(!r)return;let{scrollTop:a,scrollHeight:m,clientHeight:l}=r;if(m<=l){t(0);return}let h=a/(m-l)*100;t(Math.min(100,Math.max(0,h)))},n=()=>(r=document.querySelector(".boltdocs-content"),r?(r.addEventListener("scroll",i),i(),o&&clearInterval(o),!0):!1);return n()||(o=setInterval(n,100)),()=>{r&&r.removeEventListener("scroll",i),o&&clearInterval(o)}},[]),Ie(Kt,{value:e,"aria-label":"Reading progress",className:"fixed top-0 left-0 right-0 z-999 h-0.5 bg-transparent w-full pointer-events-none",children:({percentage:r})=>Ie("div",{className:"h-full bg-primary-500 transition-[width] duration-300 ease-out shadow-[0_0_8px_rgba(var(--primary-rgb),0.4)]",style:{width:`${r}%`}})})}import{Component as Qt}from"react";import{jsx as te,jsxs as Xt}from"react/jsx-runtime";var H=class extends Qt{state={hasError:!1};static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,r){console.error("Uncaught error in Boltdocs Layout:",t,r)}render(){return this.state.hasError?this.props.fallback||Xt("div",{className:"flex flex-col items-center justify-center min-h-[40vh] text-center gap-4 px-4",children:[te("div",{className:"text-lg font-bold text-red-400",children:"Something went wrong"}),te("p",{className:"text-sm text-text-muted max-w-md",children:this.state.error?.message||"An unexpected error occurred while rendering this page."}),te(E,{className:"rounded-lg border border-border-subtle bg-bg-surface px-5 py-2 text-sm font-medium text-text-main transition-colors hover:bg-bg-muted cursor-pointer",onPress:()=>this.setState({hasError:!1}),children:"Try again"})]}):this.props.children}};import{useLocation as jt}from"react-router-dom";import{jsx as b,jsxs as z}from"react/jsx-runtime";function eo({children:e}){let{routes:t,allRoutes:r,currentRoute:o}=O(),{pathname:i}=jt(),n=P(),m=_().CopyMarkdown||U,l=i==="/"||i==="";return z(C,{children:[b(ee,{}),b(K,{siteTitle:n.themeConfig?.title||"Boltdocs",siteDescription:n.themeConfig?.description||"",routes:r}),b(W,{}),z(C.Body,{children:[!l&&b(Y,{routes:t,config:n}),z(C.Content,{children:[!l&&z(C.ContentHeader,{children:[b(Q,{}),b(m,{mdxRaw:o?._rawContent,route:o,config:n.themeConfig?.copyMarkdown})]}),b(H,{children:e}),!l&&b(C.ContentFooter,{children:b(j,{})})]}),!l&&b(Z,{headings:o?.headings,editLink:n.themeConfig?.editLink,communityHelp:n.themeConfig?.communityHelp,filePath:o?.filePath})]})]})}export{Ue as Admonition,Fe as Badge,Q as Breadcrumbs,Me as Button,qe as Card,Ve as Cards,Xe as Caution,Ae as CodeBlock,it as ComponentPreview,at as ComponentProps,U as CopyMarkdown,Ze as Danger,eo as DefaultLayout,C as DocsLayout,H as ErrorBoundary,ot as Field,et as FileTree,K as Head,nt as Image,Qe as Important,Ke as InfoBox,rt as Link,je as List,Oe as Loading,W as Navbar,Ee as NotFound,We as Note,Z as OnThisPage,j as PageNav,ee as ProgressBar,Y as Sidebar,ze as Tab,tt as Table,Ge as Tabs,Je as Tip,_e as Video,Ye as Warning,st as createBoltdocsApp,De as defineSandbox,$e as embedSandbox,He as openSandbox,P as useConfig,_ as useMdxComponents,O as useRoutes,G as useTheme};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import { C as ComponentRoute } from '../types-CvT-SGbK.mjs';
|
|
3
|
+
import '../config-CX4l-ZNp.mjs';
|
|
4
|
+
import 'vite';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Options for rendering the Boltdocs application on the server (SSG).
|
|
8
|
+
*/
|
|
9
|
+
interface RenderOptions {
|
|
10
|
+
/** The URL path currently being rendered */
|
|
11
|
+
path: string;
|
|
12
|
+
/** Initial routes generated by the Vite plugin (`virtual:boltdocs-routes`) */
|
|
13
|
+
routes: ComponentRoute[];
|
|
14
|
+
/** Site configuration (`virtual:boltdocs-config`) */
|
|
15
|
+
config: any;
|
|
16
|
+
/** The name of the documentation directory (e.g. 'docs') */
|
|
17
|
+
docsDirName: string;
|
|
18
|
+
/** Optional custom React component to render when visiting the root path ('/') */
|
|
19
|
+
homePage?: React__default.ComponentType;
|
|
20
|
+
/** Custom external pages mapped by their route path */
|
|
21
|
+
externalPages?: Record<string, React__default.ComponentType<any>>;
|
|
22
|
+
/** Preloaded modules (since SSR cannot use dynamic imports easily) */
|
|
23
|
+
modules: Record<string, any>;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Renders the full React application into an HTML string for a specific route.
|
|
27
|
+
* This is called by the Node SSG script during the Vite build process.
|
|
28
|
+
*/
|
|
29
|
+
declare function render(options: RenderOptions): Promise<string>;
|
|
30
|
+
|
|
31
|
+
export { type RenderOptions, render };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import { C as ComponentRoute } from '../types-BuZWFT7r.js';
|
|
3
|
+
import '../config-CX4l-ZNp.js';
|
|
4
|
+
import 'vite';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Options for rendering the Boltdocs application on the server (SSG).
|
|
8
|
+
*/
|
|
9
|
+
interface RenderOptions {
|
|
10
|
+
/** The URL path currently being rendered */
|
|
11
|
+
path: string;
|
|
12
|
+
/** Initial routes generated by the Vite plugin (`virtual:boltdocs-routes`) */
|
|
13
|
+
routes: ComponentRoute[];
|
|
14
|
+
/** Site configuration (`virtual:boltdocs-config`) */
|
|
15
|
+
config: any;
|
|
16
|
+
/** The name of the documentation directory (e.g. 'docs') */
|
|
17
|
+
docsDirName: string;
|
|
18
|
+
/** Optional custom React component to render when visiting the root path ('/') */
|
|
19
|
+
homePage?: React__default.ComponentType;
|
|
20
|
+
/** Custom external pages mapped by their route path */
|
|
21
|
+
externalPages?: Record<string, React__default.ComponentType<any>>;
|
|
22
|
+
/** Preloaded modules (since SSR cannot use dynamic imports easily) */
|
|
23
|
+
modules: Record<string, any>;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Renders the full React application into an HTML string for a specific route.
|
|
27
|
+
* This is called by the Node SSG script during the Vite build process.
|
|
28
|
+
*/
|
|
29
|
+
declare function render(options: RenderOptions): Promise<string>;
|
|
30
|
+
|
|
31
|
+
export { type RenderOptions, render };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var qo=Object.create;var ke=Object.defineProperty;var Ko=Object.getOwnPropertyDescriptor;var Zo=Object.getOwnPropertyNames;var Jo=Object.getPrototypeOf,Qo=Object.prototype.hasOwnProperty;var ct=(e,t)=>{for(var o in t)ke(e,o,{get:t[o],enumerable:!0})},dt=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Zo(t))!Qo.call(e,n)&&n!==o&&ke(e,n,{get:()=>t[n],enumerable:!(r=Ko(t,n))||r.enumerable});return e};var R=(e,t,o)=>(o=e!=null?qo(Jo(e)):{},dt(t||!e||!e.__esModule?ke(o,"default",{value:e,enumerable:!0}):o,e)),Yo=e=>dt(ke({},"__esModule",{value:!0}),e);var Gr={};ct(Gr,{render:()=>_r});module.exports=Yo(Gr);var Uo=R(require("react")),jo=R(require("react-dom/server")),Xo=require("react-router-dom/server");var j=R(require("react")),Wr=R(require("react-dom/client")),ee=require("react-router-dom");var yt=require("lucide-react");var je=R(require("react")),ht=require("react-aria-components"),vt=require("react-router-dom");var mt=require("react-router-dom");var Ae=require("react"),Ge=(0,Ae.createContext)(null);function ie(){let e=(0,Ae.use)(Ge);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e}function Ue(e){let t=(0,mt.useLocation)(),o=ie();if(!o||typeof e!="string"||!o.i18n&&!o.versions)return e;let r="/docs";if(!e.startsWith(r))return e;let s=t.pathname.substring(r.length).split("/").filter(Boolean),c=o.versions?.defaultVersion,i=o.i18n?.defaultLocale,l=0;o.versions&&s.length>l&&o.versions.versions[s[l]]&&(c=s[l],l++),o.i18n&&s.length>l&&o.i18n.locales[s[l]]&&(i=s[l]);let m=e.substring(r.length).split("/").filter(Boolean),p=0,f=!1,g=!1;o.versions&&m.length>p&&o.versions.versions[m[p]]&&(f=!0,p++),o.i18n&&m.length>p&&o.i18n.locales[m[p]]&&(g=!0,p++);let b=m.slice(p),x=[];o.versions&&(f?x.push(m[0]):c&&x.push(c)),o.i18n&&(g?x.push(m[f?1:0]):i&&x.push(i)),x.push(...b);let N=`${r}/${x.join("/")}`;return N.endsWith("/")&&(N=N.slice(0,-1)),N===r?r:N}var te=require("react"),bt=require("react/jsx-runtime"),pt=(0,te.createContext)({preload:()=>{},routes:[]});function ut(){return(0,te.use)(pt)}function ft({routes:e,modules:t,children:o}){let r=(0,te.useRef)(null),n=(0,te.useCallback)(s=>{r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{let c=s.split("#")[0].split("?")[0],i=e.find(l=>l.path===c||c==="/"&&l.path==="");if(i?.filePath){let l=Object.keys(t).find(d=>d.endsWith("/"+i.filePath));l&&t[l]().catch(d=>{console.error(`[boltdocs] Failed to preload route ${s}:`,d)})}},100)},[e,t]);return(0,bt.jsx)(pt.Provider,{value:{preload:n,routes:e},children:o})}var gt=require("clsx"),xt=require("tailwind-merge");function a(...e){return(0,xt.twMerge)((0,gt.clsx)(e))}var Xe=require("react/jsx-runtime"),oe=je.default.forwardRef((e,t)=>{let{href:o,prefetch:r="hover",onMouseEnter:n,onFocus:s,...c}=e,i=Ue(o??""),{preload:l}=ut();return(0,Xe.jsx)(ht.Link,{...c,ref:t,href:i,onMouseEnter:p=>{n?.(p),r==="hover"&&typeof i=="string"&&i.startsWith("/")&&l(i)},onFocus:p=>{s?.(p),r==="hover"&&typeof i=="string"&&i.startsWith("/")&&l(i)}})});oe.displayName="Link";var er=je.default.forwardRef((e,t)=>{let{href:o,end:r=!1,className:n,children:s,...c}=e,i=(0,vt.useLocation)(),l=Ue(o??""),d=r?i.pathname===l:i.pathname.startsWith(l),m=typeof n=="function"?n({isActive:d}):a(n,d&&"active"),p=typeof s=="function"?s({isActive:d}):s;return(0,Xe.jsx)(oe,{...c,ref:t,href:o,className:m,children:p})});er.displayName="NavLink";var Z=require("react/jsx-runtime");function qe(){return(0,Z.jsx)("div",{className:"flex items-center justify-center min-h-[60vh] text-center",children:(0,Z.jsxs)("div",{className:"space-y-4",children:[(0,Z.jsx)("span",{className:"text-8xl font-black tracking-tighter text-primary-500/20",children:"404"}),(0,Z.jsx)("h1",{className:"text-2xl font-bold text-text-main",children:"Page Not Found"}),(0,Z.jsx)("p",{className:"text-sm text-text-muted max-w-sm mx-auto",children:"The page you're looking for doesn't exist or has been moved."}),(0,Z.jsxs)(oe,{href:"/",className:"inline-flex items-center gap-2 rounded-lg bg-primary-500 px-5 py-2.5 text-sm font-semibold text-white outline-none transition-all hover:brightness-110 hover:shadow-lg focus-visible:ring-2 focus-visible:ring-primary-500/30",children:[(0,Z.jsx)(yt.ArrowLeft,{size:16})," Go to Home"]})]})})}var Le=require("react"),M=require("react/jsx-runtime");function Ct(){let[e,t]=(0,Le.useState)(0);(0,Le.useEffect)(()=>{let r=0,n=!0,s=setInterval(()=>{n?(r+=1,r>=100&&(r=100,n=!1)):(r-=1,r<=0&&(r=0,n=!0)),t(r)},20);return()=>clearInterval(s)},[]);let o=`inset(${100-e}% 0 0 0)`;return(0,M.jsx)("div",{className:"flex flex-col items-center justify-center min-h-[60vh] p-4 text-center",children:(0,M.jsx)("div",{className:"relative group",children:(0,M.jsxs)("div",{className:"relative inline-block",children:[(0,M.jsxs)("svg",{className:"w-24 h-auto opacity-10 filter grayscale brightness-50",viewBox:"0 0 60 51",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-hidden":"true",children:[(0,M.jsx)("title",{children:"Loading indicator background"}),(0,M.jsx)("path",{d:"M29.4449 0H19.4449V16.5L29.4449 6.5V0Z",fill:"currentColor"}),(0,M.jsx)("path",{d:"M26.9449 22.7265C26.9449 22.5077 21.2201 27.0658 16.9449 28.5C13.7491 29.5721 12.3156 29.5038 8.94486 29.5C5.59532 29.4963 0 28.5 0 28.5C0 28.5 5.57953 28.5146 8.94486 27.5C12.5409 26.4158 14.8203 25.5843 17.9449 23.5C23.3445 19.898 29.4449 11.5 29.4449 11.5L29.9449 18C29.9449 18 33.5825 15.8308 36.4449 15C39.4452 14.1291 44.4449 14 44.4449 14C44.4449 14 36.9449 19 34.4449 21.5C31.5322 24.4126 29.8582 26.9017 29.4449 31C29.1217 34.2041 29.4771 36.4508 31.4449 39C33.5792 41.765 35.952 43.0183 39.4449 43C42.677 42.9831 45.3003 42.4182 47.4449 40C49.7406 37.4113 50.2495 34.4466 49.9449 31C49.6603 27.7804 48.4876 25.4953 45.9449 23.5C43.2931 21.4191 36.4449 24 36.4449 24L47.9449 15C47.9449 15 51.5761 16.771 53.4449 18.5C55.711 20.5967 56.7467 22.1546 57.9449 25C59.1784 27.9295 59.4832 29.8216 59.4449 33C59.4089 35.9867 59.179 37.78 57.9449 40.5C56.8475 42.9185 55.8511 44.6507 53.9449 46.5C51.9236 48.4609 50.5803 49.0076 47.9449 50C45.5414 50.9051 44.0131 51 41.4449 51C38.8766 51 37.3235 50.9685 34.9449 50C32.4851 48.9985 29.4449 46 29.4449 46V51H19.4449V37.9904L22.9449 31.4226L26.9449 22.7265Z",fill:"currentColor"})]}),(0,M.jsxs)("svg",{className:"absolute top-0 left-0 w-24 h-auto text-primary-500 drop-shadow-[0_0_20px_rgba(var(--primary-rgb),0.5)] transition-[clip-path] duration-100 ease-linear",style:{clipPath:o},viewBox:"0 0 60 51",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-hidden":"true",children:[(0,M.jsx)("title",{children:"Loading indicator animated fill"}),(0,M.jsx)("path",{d:"M29.4449 0H19.4449V16.5L29.4449 6.5V0Z",fill:"currentColor"}),(0,M.jsx)("path",{d:"M26.9449 22.7265C26.9449 22.5077 21.2201 27.0658 16.9449 28.5C13.7491 29.5721 12.3156 29.5038 8.94486 29.5C5.59532 29.4963 0 28.5 0 28.5C0 28.5 5.57953 28.5146 8.94486 27.5C12.5409 26.4158 14.8203 25.5843 17.9449 23.5C23.3445 19.898 29.4449 11.5 29.4449 11.5L29.9449 18C29.9449 18 33.5825 15.8308 36.4449 15C39.4452 14.1291 44.4449 14 44.4449 14C44.4449 14 36.9449 19 34.4449 21.5C31.5322 24.4126 29.8582 26.9017 29.4449 31C29.1217 34.2041 29.4771 36.4508 31.4449 39C33.5792 41.765 35.952 43.0183 39.4449 43C42.677 42.9831 45.3003 42.4182 47.4449 40C49.7406 37.4113 50.2495 34.4466 49.9449 31C49.6603 27.7804 48.4876 25.4953 45.9449 23.5C43.2931 21.4191 36.4449 24 36.4449 24L47.9449 15C47.9449 15 51.5761 16.771 53.4449 18.5C55.711 20.5967 56.7467 22.1546 57.9449 25C59.1784 27.9295 59.4832 29.8216 59.4449 33C59.4089 35.9867 59.179 37.78 57.9449 40.5C56.8475 42.9185 55.8511 44.6507 53.9449 46.5C51.9236 48.4609 50.5803 49.0076 47.9449 50C45.5414 50.9051 44.0131 51 41.4449 51C38.8766 51 37.3235 50.9685 34.9449 50C32.4851 48.9985 29.4449 46 29.4449 46V51H19.4449V37.9904L22.9449 31.4226L26.9449 22.7265Z",fill:"currentColor"})]})]})})})}var X=require("react"),wt=require("react/jsx-runtime"),Rt=(0,X.createContext)(void 0);function Nt({children:e}){let[t,o]=(0,X.useState)("dark"),[r,n]=(0,X.useState)(!1);(0,X.useEffect)(()=>{n(!0);let i=localStorage.getItem("boltdocs-theme");if(i==="light"||i==="dark")o(i);else{let m=window.matchMedia("(prefers-color-scheme: dark)").matches;o(m?"dark":"light")}let l=window.matchMedia("(prefers-color-scheme: dark)"),d=m=>{localStorage.getItem("boltdocs-theme")||o(m.matches?"dark":"light")};return l.addEventListener("change",d),()=>l.removeEventListener("change",d)},[]),(0,X.useEffect)(()=>{if(!r)return;let i=document.documentElement;t==="light"?(i.classList.add("theme-light"),i.dataset.theme="light"):(i.classList.remove("theme-light"),i.dataset.theme="dark")},[t,r]);let s=()=>{let i=t==="dark"?"light":"dark";o(i),localStorage.setItem("boltdocs-theme",i)},c=i=>{o(i),localStorage.setItem("boltdocs-theme",i)};return(0,wt.jsx)(Rt.Provider,{value:{theme:t,toggleTheme:s,setTheme:c},children:e})}function Pt(){let e=(0,X.use)(Rt);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e}var We=R(require("virtual:boltdocs-layout"));var Tt=require("react"),kt=require("react-aria-components"),Be=require("react-router-dom"),Lt=require("react/jsx-runtime");function At({children:e}){let t=(0,Be.useNavigate)();return(0,Lt.jsx)(kt.RouterProvider,{navigate:(o,r)=>{(0,Tt.startTransition)(()=>{t(o,r)})},useHref:Be.useHref,children:e})}var Bt=require("react"),It=require("react-router-dom");function Mt(){let{pathname:e,hash:t}=(0,It.useLocation)();return(0,Bt.useLayoutEffect)(()=>{let o=document.querySelector(".boltdocs-content");if(o){if(t){let r=t.replace("#",""),n=document.getElementById(r);if(n){let c=o.getBoundingClientRect().top,d=n.getBoundingClientRect().top-c-80+o.scrollTop;o.scrollTo({top:d,behavior:"smooth"});return}}o.scrollTo(0,0)}},[e,t]),null}var St=require("react-router-dom"),Et=R(require("virtual:boltdocs-layout")),Ke=require("react/jsx-runtime");function Ot(){return(0,Ke.jsx)(Et.default,{children:(0,Ke.jsx)(St.Outlet,{})})}var Ft=require("@mdx-js/react");var Ie=require("react"),zt=require("react/jsx-runtime"),Dt=(0,Ie.createContext)({});function Vt(){return(0,Ie.useContext)(Dt)}function Ht({components:e,children:t}){return(0,zt.jsx)(Dt.Provider,{value:e,children:t})}var Ze=require("react/jsx-runtime");function $t({Component:e}){let t=Vt();return(0,Ze.jsx)(Ft.MDXProvider,{components:t,children:(0,Ze.jsx)(e,{})})}var Wo=require("lucide-react");var lt={};ct(lt,{Admonition:()=>Q,Badge:()=>to,Button:()=>_t,Card:()=>io,Cards:()=>so,Caution:()=>go,CodeBlock:()=>re,ComponentPreview:()=>Lo,ComponentProps:()=>ko,CopyMarkdown:()=>$o,Danger:()=>uo,Field:()=>Ro,FileTree:()=>vo,Image:()=>wo,Important:()=>bo,InfoBox:()=>fo,Link:()=>No,List:()=>xo,Note:()=>co,Tab:()=>Jt,Table:()=>Co,Tabs:()=>Qt,Tip:()=>mo,Video:()=>Yt,Warning:()=>po});var Se=R(require("react-aria-components"));var Wt=require("class-variance-authority"),_=require("react/jsx-runtime"),Me=(0,Wt.cva)("flex flex-row items-center justify-center w-auto font-semibold tracking-tight no-underline whitespace-nowrap select-none outline-none transition-all duration-200 cursor-pointer pressed:scale-[0.97] hover:-translate-y-px leading-none",{variants:{variant:{primary:"bg-primary-500 text-white shadow-md hover:brightness-110 hover:shadow-lg",secondary:"bg-bg-surface text-text-main border border-border-subtle hover:bg-bg-muted hover:border-border-strong",outline:"bg-transparent text-text-main border border-border-strong hover:bg-bg-surface hover:border-primary-500",ghost:"bg-transparent text-text-muted hover:bg-bg-surface hover:text-text-main",danger:"bg-[var(--color-danger-500)]/10 text-[var(--color-danger-500)] border border-[var(--color-danger-500)]/20 hover:bg-[var(--color-danger-500)]/15",success:"bg-[var(--color-success-500)]/10 text-[var(--color-success-500)] border border-[var(--color-success-500)]/20 hover:bg-[var(--color-success-500)]/15",warning:"bg-[var(--color-warning-500)]/10 text-[var(--color-warning-500)] border border-[var(--color-warning-500)]/20 hover:bg-[var(--color-warning-500)]/15",info:"bg-[var(--color-info-500)]/10 text-[var(--color-info-500)] border border-[var(--color-info-500)]/20 hover:bg-[var(--color-info-500)]/15",subtle:"bg-primary-500/10 text-primary-500 hover:bg-primary-500/20",link:"bg-transparent text-primary-500 !p-0 !min-h-0 hover:underline"},size:{sm:"min-h-8 px-3.5 text-[0.8125rem] gap-1.5",md:"min-h-10 px-5 text-[0.9375rem] gap-2",lg:"min-h-12 px-7 text-[1.05rem] gap-2.5"},rounded:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"},iconSize:{sm:"w-8 h-8 p-0",md:"w-10 h-10 p-0",lg:"w-12 h-12 p-0"},disabled:{true:"opacity-50 cursor-not-allowed pointer-events-none",false:null}},defaultVariants:{variant:"primary",size:"md",rounded:"md"}}),ae=({href:e,icon:t,iconPosition:o="left",isIconOnly:r,children:n,className:s,variant:c,size:i,rounded:l,iconSize:d,disabled:m,...p})=>{let f=r||!n&&!!t,g=f?(0,_.jsx)("span",{className:"inline-flex items-center justify-center [&>svg]:w-[1.2rem] [&>svg]:h-[1.2rem]",children:t}):(0,_.jsxs)(_.Fragment,{children:[t&&o==="left"&&(0,_.jsx)("span",{className:"inline-flex items-center shrink-0 [&>svg]:w-[1.1rem] [&>svg]:h-[1.1rem]",children:t}),(0,_.jsx)("span",{className:"flex items-center",children:n}),t&&o==="right"&&(0,_.jsx)("span",{className:"inline-flex items-center shrink-0 [&>svg]:w-[1.1rem] [&>svg]:h-[1.1rem]",children:t})]});return e?(0,_.jsx)(Se.Link,{href:e,className:a(Me({variant:c,size:i,rounded:l,iconSize:f?d:void 0,disabled:m}),s),...p,children:g}):(0,_.jsx)(Se.Button,{className:a(Me({variant:c,size:i,rounded:l,iconSize:f?d:void 0,disabled:m}),s),...p,children:g})};var Gt=require("react/jsx-runtime"),_t=({className:e,variant:t,size:o,rounded:r,iconSize:n,disabled:s,...c})=>(0,Gt.jsx)(ae,{className:a("group",Me({variant:t,size:o,rounded:r,iconSize:n,disabled:s,className:e})),...c});var Ee=R(require("react-aria-components")),Oe=require("lucide-react");var Je=require("codesandbox/lib/api/define.js");function Ut(e){let t=e.files||{},o=e.dependencies||{},r=e.devDependencies||{},n=e.title||"codesandbox-project",s=e.description||"Generic Sandbox",c={};for(let[i,l]of Object.entries(t)){let d=typeof l.content=="object"?JSON.stringify(l.content,null,2):l.content;c[i]={content:d,isBinary:l.isBinary??!1}}if(!c["package.json"]){let l=e.template==="vite"||!!r.vite||!!r["@vitejs/plugin-react"]?{dev:"vite",build:"vite build",preview:"vite preview"}:{start:"node index.js"};c["package.json"]={content:JSON.stringify({private:!0,name:n,description:s,type:"module",version:"1.0.0",scripts:e.scripts||l,dependencies:o,devDependencies:r},null,2),isBinary:!1}}return c}function tr(e){let t=Ut(e),o=(0,Je.getParameters)({files:t}),r=new URLSearchParams({parameters:o,installDependencies:"true"});return e.entry&&r.set("file",`/${e.entry}`),{parameters:o,url:`https://codesandbox.io/api/v1/sandboxes/define?${r.toString()}`,options:e}}function jt(e){if(typeof window>"u")return tr(e);let t=Ut(e),o=(0,Je.getParameters)({files:t}),r=e.entry||"src/App.tsx",n=document.createElement("form");n.method="POST",n.target="_blank",n.action="https://codesandbox.io/api/v1/sandboxes/define",n.style.display="none";let s=(i,l)=>{let d=document.createElement("input");d.type="hidden",d.name=i,d.value=l,n.appendChild(d)},c=new URLSearchParams({file:`/${r}`,eslint:"0",codemirror:"1",installDependencies:"true"});return s("query",c.toString()),s("parameters",o),document.body.appendChild(n),n.submit(),document.body.removeChild(n),{parameters:o,url:`https://codesandbox.io/api/v1/sandboxes/define?parameters=${o}`,options:e}}var Xt=async e=>{try{return await navigator.clipboard.writeText(e),!0}catch{let t=document.createElement("textarea");return t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t),!0}};var G=require("react");function qt(e){let{title:t,sandbox:o}=e,[r,n]=(0,G.useState)(!1),[s,c]=(0,G.useState)(!1),[i,l]=(0,G.useState)(!1),d=(0,G.useRef)(null),m=ie(),p=(0,G.useCallback)(async()=>{let g=d.current?.textContent??"";Xt(g),n(!0),setTimeout(()=>n(!1),2e3)},[]),f=(0,G.useCallback)(()=>{let g=d.current?.textContent??"",b=m?.integrations?.sandbox?.config||{},x=typeof o=="object"?o:b,N=x.entry||"src/App.tsx";jt({title:t??"Code Snippet",...x,files:{...x.files,[N]:{content:g}}})},[t,m,o]);return(0,G.useEffect)(()=>{let g=d.current?.textContent?.length??0;l(g>120)},[e.children,e.highlightedHtml]),{copied:r,isExpanded:s,setIsExpanded:c,isExpandable:i,preRef:d,handleCopy:p,handleSandbox:f,shouldTruncate:i&&!s}}var he=require("react/jsx-runtime");function or(e){let{size:t=20,...o}=e;return{...o,width:t,height:t}}var Kt=e=>(0,he.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...or(e),children:[(0,he.jsx)("title",{children:"CodeSandbox"}),(0,he.jsx)("path",{d:"M0 24h24V0H0v2.455h21.546v19.09H2.454V0H0Z"})]});var le=R(require("react-aria-components"));var z=require("react/jsx-runtime"),nr=({className:e,children:t,...o})=>(0,z.jsx)(le.Tooltip,{...o,offset:8,className:r=>a("group z-50 overflow-visible rounded-md bg-bg-surface/90 px-2.5 py-1.5 text-xs font-medium text-text-main shadow-lg backdrop-blur-md ring-1 ring-border-subtle outline-hidden select-none","data-entering:animate-in data-entering:fade-in data-entering:zoom-in-95 data-entering:duration-100","data-exiting:animate-out data-exiting:fade-out data-exiting:zoom-out-95 data-exiting:duration-75","data-[placement=top]:slide-in-from-bottom-1","data-[placement=bottom]:slide-in-from-top-1","data-[placement=left]:slide-in-from-right-1","data-[placement=right]:slide-in-from-left-1",typeof e=="function"?e(r):e),children:r=>(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(le.OverlayArrow,{children:(0,z.jsxs)("svg",{width:8,height:8,viewBox:"0 0 8 8",className:"fill-bg-surface/90 stroke-border-subtle group-data-[placement=bottom]:rotate-180 group-data-[placement=left]:-rotate-90 group-data-[placement=right]:rotate-90",children:[(0,z.jsx)("title",{children:"Arrow"}),(0,z.jsx)("path",{d:"M0 0 L4 4 L8 0"})]})}),typeof t=="function"?t(r):t]})}),Qe=({content:e,children:t,delay:o=500,closeDelay:r=0,...n})=>(0,z.jsxs)(le.TooltipTrigger,{delay:o,closeDelay:r,children:[t,(0,z.jsx)(nr,{...n,children:e})]});var A=require("react/jsx-runtime");function re(e){let{children:t,sandbox:o,hideSandbox:r=!0,hideCopy:n=!1,highlightedHtml:s,...c}=e,d=!!ie()?.integrations?.sandbox?.enable&&!r,{copied:m,isExpanded:p,setIsExpanded:f,isExpandable:g,preRef:b,handleCopy:x,handleSandbox:N,shouldTruncate:H}=qt(e);return(0,A.jsxs)("div",{className:a("group relative my-6 overflow-hidden rounded-lg border border-border-subtle bg-(--color-code-bg)",H&&"[&>pre]:max-h-[250px] [&>pre]:overflow-hidden"),children:[(0,A.jsxs)("div",{className:"absolute top-3 right-4 z-50 flex items-center gap-2 transition-all duration-300 opacity-0 group-hover:opacity-100",children:[d&&(0,A.jsx)(Qe,{content:"Open in CodeSandbox",children:(0,A.jsx)(Ee.Button,{onPress:N,className:"grid place-items-center w-8 h-8 bg-transparent text-text-muted outline-none cursor-pointer transition-all duration-200 hover:scale-115 hover:text-sky-400 active:scale-95 [&>svg]:w-5 [&>svg]:h-5 [&>svg]:stroke-2","aria-label":"Open in CodeSandbox",children:(0,A.jsx)(Kt,{size:20})})}),!n&&(0,A.jsx)(Qe,{content:m?"Copied!":"Copy code",children:(0,A.jsx)(Ee.Button,{onPress:x,className:a("grid place-items-center w-8 h-8 bg-transparent outline-none cursor-pointer transition-all duration-200 hover:scale-115 active:scale-95 [&>svg]:w-5 [&>svg]:h-5 [&>svg]:stroke-2",m?"text-emerald-400":"text-text-muted hover:text-text-main"),"aria-label":"Copy code",children:m?(0,A.jsx)(Oe.Check,{size:20}):(0,A.jsx)(Oe.Copy,{size:20})})})]}),s?(0,A.jsx)("div",{ref:b,className:"shiki-wrapper [&>pre]:m-0! [&>pre]:rounded-none! [&>pre]:border-none! [&>pre]:bg-inherit! [&>pre>code]:grid! [&>pre>code]:p-5! [&>.shiki.shiki-themes]:bg-transparent!",dangerouslySetInnerHTML:{__html:s}}):(0,A.jsx)("pre",{ref:b,className:"m-0! rounded-none! border-none! bg-inherit! font-mono text-[0.8125rem] leading-[1.7]",...c,children:t}),g&&(0,A.jsx)("div",{className:a(H?"absolute bottom-0 inset-x-0 h-24 bg-linear-to-t from-(--color-code-bg) to-transparent flex items-end justify-center pb-4 z-10":"relative flex justify-center py-4"),children:(0,A.jsx)(Ee.Button,{onPress:()=>f(!p),className:"rounded-full bg-bg-surface border border-border-subtle px-5 py-2 text-[0.8125rem] font-medium text-text-main outline-none cursor-pointer transition-all hover:bg-border-subtle hover:-translate-y-px backdrop-blur-md",children:p?"Show less":"Expand code"})})]})}var ce=require("react"),ne=R(require("react-aria-components"));var J=require("react");function Zt({initialIndex:e=0,tabs:t}){let o=t[e]?.props.disabled?t.findIndex(d=>!d.props.disabled):e,[r,n]=(0,J.useState)(o===-1?0:o),s=(0,J.useRef)([]),[c,i]=(0,J.useState)({opacity:0,transform:"translateX(0)",width:0});(0,J.useEffect)(()=>{let d=s.current[r];d&&i({opacity:1,width:d.offsetWidth,transform:`translateX(${d.offsetLeft}px)`})},[r,t]);let l=(0,J.useCallback)(d=>{let m=0;if(d.key==="ArrowRight"?m=1:d.key==="ArrowLeft"&&(m=-1),m!==0){let p=(r+m+t.length)%t.length;for(;t[p].props.disabled&&p!==r;)p=(p+m+t.length)%t.length;p!==r&&!t[p].props.disabled&&(n(p),s.current[p]?.focus())}},[r,t]);return{active:r,setActive:n,tabRefs:s,indicatorStyle:c,handleKeyDown:l}}var Ye=require("class-variance-authority"),S=require("react/jsx-runtime"),sr=(0,Ye.cva)("relative flex items-center border-b border-border-subtle gap-1 overflow-x-auto no-scrollbar",{variants:{size:{default:"px-0",compact:"px-2"}},defaultVariants:{size:"default"}}),ir=(0,Ye.cva)("flex items-center gap-2 px-4 py-2.5 text-sm font-medium outline-none transition-all duration-200 cursor-pointer bg-transparent border-none select-none whitespace-nowrap",{variants:{isActive:{true:"text-primary-500",false:"text-text-muted hover:text-text-main"},isDisabled:{true:"opacity-40 pointer-events-none",false:""}},defaultVariants:{isActive:!1,isDisabled:!1}});function Jt({children:e}){let t=typeof e=="string"?(0,S.jsx)(re,{className:"language-bash",children:(0,S.jsx)("code",{children:e.trim()})}):e;return(0,S.jsx)("div",{className:"py-4",children:t})}function Qt({defaultIndex:e=0,children:t}){let o=(0,ce.useMemo)(()=>ce.Children.toArray(t).filter(i=>(0,ce.isValidElement)(i)&&i.props?.label),[t]),{active:r,setActive:n,tabRefs:s,indicatorStyle:c}=Zt({initialIndex:e,tabs:o});return(0,S.jsx)("div",{className:"my-8 w-full group/tabs",children:(0,S.jsxs)(ne.Tabs,{selectedKey:r.toString(),onSelectionChange:i=>n(Number(i)),className:"w-full",children:[(0,S.jsxs)(ne.TabList,{"aria-label":"Content Tabs",className:a(sr()),children:[o.map((i,l)=>{let{label:d,icon:m,disabled:p}=i.props,f=l.toString();return(0,S.jsxs)(ne.Tab,{id:f,isDisabled:p,ref:g=>{s.current[l]=g},className:({isSelected:g,isDisabled:b})=>a(ir({isActive:g,isDisabled:b})),children:[!!m&&(0,S.jsx)("span",{className:"shrink-0 [&>svg]:w-4 [&>svg]:h-4",children:m}),(0,S.jsx)("span",{children:d})]},f)}),(0,S.jsx)("div",{className:"absolute bottom-0 h-0.5 bg-primary-500 transition-all duration-300 ease-in-out pointer-events-none",style:c,"aria-hidden":"true"})]}),o.map((i,l)=>(0,S.jsx)(ne.TabPanel,{id:l.toString(),children:o[l]},l))]})})}var de=require("react"),ve=require("react/jsx-runtime");function Yt({src:e,poster:t,alt:o,children:r,controls:n,preload:s="metadata",...c}){let i=(0,de.useRef)(null),[l,d]=(0,de.useState)(!1);return(0,de.useEffect)(()=>{let m=i.current;if(!m)return;let p=new IntersectionObserver(([f])=>{f.isIntersecting&&(d(!0),p.disconnect())},{rootMargin:"200px"});return p.observe(m),()=>p.disconnect()},[]),(0,ve.jsx)("div",{ref:i,className:"my-6 overflow-hidden rounded-lg border border-border-subtle",children:l?(0,ve.jsxs)("video",{className:"block w-full h-auto",src:e,poster:t,controls:!0,preload:s,playsInline:!0,...c,children:[r,"Your browser does not support the video tag."]}):(0,ve.jsx)("div",{className:"aspect-video bg-bg-surface animate-pulse",role:"img","aria-label":o||"Video"})})}var eo=require("class-variance-authority"),oo=require("react/jsx-runtime"),ar=(0,eo.cva)("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold tracking-tight",{variants:{variant:{default:"bg-bg-surface text-text-muted border-border-subtle",primary:"bg-primary-500/15 text-primary-400 border-primary-500/20",success:"bg-emerald-500/15 text-emerald-400 border-emerald-500/20",warning:"bg-amber-500/15 text-amber-400 border-amber-500/20",danger:"bg-red-500/15 text-red-400 border-red-500/20",info:"bg-sky-500/15 text-sky-400 border-sky-500/20"}},defaultVariants:{variant:"default"}});function to({variant:e="default",children:t,className:o="",...r}){return(0,oo.jsx)("span",{className:a(ar({variant:e}),o),...r,children:t})}var ye=require("react"),ro=R(require("react-aria-components"));var no=require("class-variance-authority"),E=require("react/jsx-runtime"),lr=(0,no.cva)("grid gap-4 my-6",{variants:{cols:{1:"grid-cols-1",2:"grid-cols-1 sm:grid-cols-2",3:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-3",4:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-4"}},defaultVariants:{cols:3}});function so({cols:e=3,children:t,className:o="",...r}){return(0,E.jsx)("div",{className:a(lr({cols:e}),o),...r,children:t})}function io({title:e,icon:t,href:o,children:r,className:n="",...s}){let c=(0,ye.useRef)(null),i=(0,ye.useRef)(null),l=(0,ye.useCallback)(p=>{let f=c.current||i.current;if(!f)return;let{left:g,top:b}=f.getBoundingClientRect();f.style.setProperty("--x",`${p.clientX-g}px`),f.style.setProperty("--y",`${p.clientY-b}px`)},[]),d=(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)("div",{className:"pointer-events-none absolute -inset-px rounded-xl opacity-0 transition-opacity duration-300 group-hover:opacity-100",style:{background:"radial-gradient(400px circle at var(--x) var(--y), color-mix(in oklch, var(--color-primary-500), transparent 90%), transparent 80%)"}}),t&&(0,E.jsx)("div",{className:"mb-3 flex h-10 w-10 items-center justify-center rounded-lg bg-primary-500/10 text-primary-400 text-lg transition-transform duration-300 group-hover:scale-105 group-hover:-rotate-3",children:t}),(0,E.jsxs)("div",{className:"space-y-1.5",children:[e&&(0,E.jsx)("h3",{className:"text-sm font-bold text-text-main",children:e}),r&&(0,E.jsx)("div",{className:"text-sm text-text-muted leading-relaxed",children:r})]})]}),m=a("group relative block rounded-xl border border-border-subtle bg-bg-surface p-5 outline-none overflow-hidden","transition-all duration-200 hover:border-primary-500/40 hover:shadow-lg hover:shadow-primary-500/5","focus-visible:ring-2 focus-visible:ring-primary-500/30",n);return o?(0,E.jsx)(ro.Link,{ref:i,href:o,className:a(m,"no-underline cursor-pointer"),onMouseMove:l,...s,children:d}):(0,E.jsx)("div",{ref:c,role:"presentation",className:m,onMouseMove:l,...s,children:d})}var B=require("lucide-react");var lo=require("class-variance-authority"),P=require("react/jsx-runtime"),cr={note:(0,P.jsx)(B.Bookmark,{size:18}),tip:(0,P.jsx)(B.Lightbulb,{size:18}),info:(0,P.jsx)(B.Info,{size:18}),warning:(0,P.jsx)(B.AlertTriangle,{size:18}),danger:(0,P.jsx)(B.ShieldAlert,{size:18}),important:(0,P.jsx)(B.Flame,{size:18}),caution:(0,P.jsx)(B.Zap,{size:18})},dr={note:"Note",tip:"Tip",info:"Info",warning:"Warning",danger:"Danger",important:"Important",caution:"Caution"},ao=(0,lo.cva)("py-4 px-4 rounded-lg",{variants:{type:{note:"border-primary-400 bg-primary-500/5 text-primary-400",tip:"border-emerald-500 bg-emerald-500/5 text-emerald-500",info:"border-sky-500 bg-sky-500/5 text-sky-500",warning:"border-amber-500 bg-amber-500/5 text-amber-500",danger:"border-red-500 bg-red-500/5 text-red-500",important:"border-orange-500 bg-orange-500/5 text-orange-500",caution:"border-yellow-500 bg-yellow-500/5 text-yellow-500"}},defaultVariants:{type:"note"}});function Q({type:e="note",title:t,children:o,className:r="",...n}){return(0,P.jsxs)("div",{className:a(ao({type:e}),r),role:e==="warning"||e==="danger"?"alert":"note",...n,children:[(0,P.jsxs)("div",{className:"flex items-center flex-row gap-2 mb-2",children:[(0,P.jsx)("span",{className:a("shrink-0",ao({type:e})),children:cr[e]}),(0,P.jsx)("span",{className:"text-sm font-bold tracking-tight text-text-main",children:t||dr[e]})]}),(0,P.jsx)("div",{className:"text-sm text-text-muted leading-relaxed [&>p]:m-0 [&>p]:mb-2 [&>p:last-child]:mb-0",children:o})]})}var co=e=>(0,P.jsx)(Q,{type:"note",...e}),mo=e=>(0,P.jsx)(Q,{type:"tip",...e}),po=e=>(0,P.jsx)(Q,{type:"warning",...e}),uo=e=>(0,P.jsx)(Q,{type:"danger",...e}),fo=e=>(0,P.jsx)(Q,{type:"info",...e}),bo=e=>(0,P.jsx)(Q,{type:"important",...e}),go=e=>(0,P.jsx)(Q,{type:"caution",...e});var De=require("react"),me=require("lucide-react");var Ve=require("class-variance-authority"),U=require("react/jsx-runtime"),mr=(0,Ve.cva)("my-6 transition-all duration-200",{variants:{variant:{default:"list-disc pl-5 text-text-muted marker:text-primary-500/50",number:"list-decimal pl-5 text-text-muted marker:text-primary-500/50 marker:font-bold",checked:"list-none p-0",arrow:"list-none p-0",bubble:"list-none p-0"},cols:{1:"grid-cols-1",2:"grid-cols-1 sm:grid-cols-2",3:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-3",4:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-4"},isGrid:{true:"grid gap-x-8 gap-y-3",false:"space-y-2"},dense:{true:"space-y-1",false:"space-y-2"}},compoundVariants:[{variant:"default",dense:!0,className:"space-y-0.5"}],defaultVariants:{variant:"default",cols:1,isGrid:!1,dense:!1}}),pr=(0,Ve.cva)("group flex items-start gap-3 text-sm leading-relaxed transition-all duration-200",{variants:{variant:{default:"",number:"",checked:"hover:translate-x-0.5",arrow:"hover:translate-x-0.5",bubble:"hover:translate-x-0.5"},dense:{true:"py-0",false:"py-0.5"}},defaultVariants:{variant:"default",dense:!1}}),ur=(0,Ve.cva)("mt-1 shrink-0 flex items-center justify-center transition-transform group-hover:scale-110",{variants:{variant:{bubble:"h-5 w-5 rounded-full bg-primary-500/10 text-primary-500 text-[10px] font-bold",default:""}},defaultVariants:{variant:"default"}});function fr({icon:e,children:t,variant:o,dense:r}){return(0,U.jsxs)("li",{className:a(pr({variant:o,dense:r})),children:[e&&(0,U.jsx)("span",{className:a(ur({variant:o==="bubble"?"bubble":"default"})),children:e}),(0,U.jsx)("div",{className:"flex-1 text-text-muted group-hover:text-text-main transition-colors",children:t})]})}var br={checked:e=>(0,U.jsx)(me.Check,{size:14,className:a("text-emerald-500 shrink-0",e)}),arrow:e=>(0,U.jsx)(me.ChevronRight,{size:14,className:a("text-primary-400 shrink-0",e)}),bubble:e=>(0,U.jsx)(me.Circle,{size:6,fill:"currentColor",className:a("text-primary-500 shrink-0",e)}),default:()=>null,number:()=>null};function xo({variant:e="default",cols:t=1,dense:o=!1,children:r,className:n,...s}){let c=t!==void 0&&Number(t)>1,i=br[e],l=mr({variant:e,cols:t,dense:o,isGrid:c,className:n}),d=e==="number"?"ol":"ul";return e==="default"||e==="number"?(0,U.jsx)(d,{className:l,...s,children:r}):(0,U.jsx)("ul",{className:l,...s,children:De.Children.map(r,m=>{if(!(0,De.isValidElement)(m))return m;let p=m,f=p.type==="li"?p.props.children:p.props.children||m;return(0,U.jsx)(fr,{icon:i(),variant:e,dense:o,children:f})})})}var q=require("react"),K=R(require("react-aria-components")),F=require("lucide-react");var w=require("react/jsx-runtime"),Ce=16,Re=2,et={CODE:/\.(ts|tsx|js|jsx|json|mjs|cjs|astro|vue|svelte)$/i,TEXT:/\.(md|mdx|txt)$/i,IMAGE:/\.(png|jpg|jpeg|svg|gif)$/i};function ot(e){return typeof e=="string"?e:typeof e=="number"?e.toString():Array.isArray(e)?e.map(ot).join(""):(0,q.isValidElement)(e)&&e.props&&typeof e.props=="object"&&"children"in e.props?ot(e.props.children):""}function gr(e,t){let o=e.toLowerCase(),r="shrink-0 transition-colors duration-200";if(t)return(0,w.jsx)(F.Folder,{size:Ce,strokeWidth:Re,className:a(r,"text-primary-400"),fill:"currentColor",fillOpacity:.15});let n=a(r,"text-text-dim group-hover:text-text-main");return et.CODE.test(o)?(0,w.jsx)(F.FileCode,{size:Ce,strokeWidth:Re,className:n}):et.TEXT.test(o)?(0,w.jsx)(F.FileText,{size:Ce,strokeWidth:Re,className:n}):et.IMAGE.test(o)?(0,w.jsx)(F.FileImage,{size:Ce,strokeWidth:Re,className:n}):(0,w.jsx)(F.File,{size:Ce,strokeWidth:Re,className:n})}function tt(e,t){if(!(0,q.isValidElement)(e))return!1;let o=e.type;if(typeof o=="string")return o===t;if(typeof o=="function")return o.name===t||o.name?.toLowerCase()===t;let r=e.props;return r?.originalType===t||r?.mdxType===t}function xr(e){let t=e.match(/\s+(\/\/|#)\s+(.*)$/);return t?{name:e.slice(0,t.index).trim(),comment:t[2]}:{name:e.trim()}}function He(e,t="root"){if(!(0,q.isValidElement)(e))return[];let o=[];if(tt(e,"ul"))return q.Children.forEach(e.props.children,(r,n)=>{o.push(...He(r,`${t}-${n}`))}),o;if(tt(e,"li")){let r=q.Children.toArray(e.props.children),n=r.findIndex(b=>tt(b,"ul")),s=n!==-1,c=s?r.slice(0,n):r,i=s?r.slice(n):[],l=ot(c),{name:d,comment:m}=xr(l),p=d.endsWith("/"),f=p?d.slice(0,-1):d,g=s||p;return o.push({id:`${t}-${f}`,name:f,comment:m,isFolder:g,children:s?He(i[0],`${t}-${f}`):void 0}),o}return e.props&&typeof e.props=="object"&&"children"in e.props&&q.Children.forEach(e.props.children,(r,n)=>{o.push(...He(r,`${t}-${n}`))}),o}function ho({item:e}){return(0,w.jsxs)(K.TreeItem,{id:e.id,textValue:e.name,className:"outline-none group focus-visible:ring-2 focus-visible:ring-primary-500/30 rounded-md",children:[(0,w.jsx)(K.TreeItemContent,{children:({isExpanded:t,hasChildItems:o})=>(0,w.jsxs)("div",{className:"flex items-center gap-2 py-1 px-1.5 rounded-md transition-colors hover:bg-primary-500/5 cursor-pointer",children:[(0,w.jsx)("div",{style:{width:"calc((var(--tree-item-level) - 1) * 1rem)"},className:"shrink-0"}),o?(0,w.jsx)(K.Button,{slot:"chevron",className:"outline-none text-text-dim hover:text-primary-400 p-0.5 rounded transition-colors",children:(0,w.jsx)(F.ChevronRight,{size:14,strokeWidth:3,className:a("transition-transform duration-200",t&&"rotate-90")})}):(0,w.jsx)("div",{className:"w-[18px]"}),gr(e.name,e.isFolder),(0,w.jsx)("span",{className:a("text-sm transition-colors truncate select-none",e.isFolder?"font-semibold text-text-main":"text-text-muted group-hover:text-text-main"),children:e.name}),e.comment&&(0,w.jsxs)("span",{className:"ml-2 text-xs italic text-text-dim opacity-70 group-hover:opacity-100 transition-opacity whitespace-nowrap overflow-hidden text-ellipsis font-sans",children:["//"," ",e.comment]})]})}),e.children&&(0,w.jsx)(K.Collection,{items:e.children,children:t=>(0,w.jsx)(ho,{item:t})})]})}function vo({children:e}){let t=(0,q.useMemo)(()=>He(e),[e]);return(0,w.jsx)("div",{className:"my-8",children:(0,w.jsx)(K.Tree,{items:t,"aria-label":"File Tree",className:a("rounded-xl border border-border-subtle bg-bg-surface/50 p-4 font-mono text-sm shadow-sm backdrop-blur-sm outline-none","max-h-[500px] overflow-y-auto scrollbar-thin scrollbar-thumb-border-subtle","focus-visible:ring-2 focus-visible:ring-primary-500/20"),children:o=>(0,w.jsx)(ho,{item:o})})})}var Ne=R(require("react-aria-components"));var pe=require("react");function yo({data:e,sortable:t=!1,paginated:o=!1,pageSize:r=10}){let[n,s]=(0,pe.useState)(null),[c,i]=(0,pe.useState)(1),l=(0,pe.useMemo)(()=>{if(!e)return[];let f=[...e];return t&&n!==null&&f.sort((g,b)=>{let x=g[n.key],N=b[n.key],H=typeof x=="string"?x:"",Te=typeof N=="string"?N:"";return H<Te?n.direction==="asc"?-1:1:H>Te?n.direction==="asc"?1:-1:0}),f},[e,n,t]),d=Math.ceil(l.length/r),m=(0,pe.useMemo)(()=>{if(!o)return l;let f=(c-1)*r;return l.slice(f,f+r)},[l,o,c,r]);return{sortConfig:n,currentPage:c,setCurrentPage:i,totalPages:d,paginatedData:m,requestSort:f=>{if(!t)return;let g="asc";n&&n.key===f&&n.direction==="asc"&&(g="desc"),s({key:f,direction:g})}}}var O=require("lucide-react");var h=require("react/jsx-runtime");function Co({headers:e,data:t,children:o,className:r="",sortable:n=!1,paginated:s=!1,pageSize:c=10}){let{sortConfig:i,currentPage:l,setCurrentPage:d,totalPages:m,paginatedData:p,requestSort:f}=yo({data:t,sortable:n,paginated:s,pageSize:c}),g=x=>n?i?.key!==x?(0,h.jsx)(O.ChevronDown,{size:14,className:"ml-1 opacity-30"}):i.direction==="asc"?(0,h.jsx)(O.ChevronUp,{size:14,className:"ml-1 text-primary-400"}):(0,h.jsx)(O.ChevronDown,{size:14,className:"ml-1 text-primary-400"}):null,b=o||(0,h.jsxs)(h.Fragment,{children:[e&&(0,h.jsx)("thead",{children:(0,h.jsx)("tr",{children:e.map((x,N)=>(0,h.jsx)("th",{onClick:()=>f(N),className:a("text-left px-3 py-2.5 border-b-2 border-border-subtle text-text-main font-semibold text-sm",n&&"cursor-pointer select-none hover:text-primary-400 transition-colors"),children:(0,h.jsxs)("div",{className:"flex items-center",children:[x,g(N)]})},N))})}),p&&(0,h.jsx)("tbody",{children:p.map((x,N)=>(0,h.jsx)("tr",{className:"transition-colors hover:bg-bg-surface",children:x.map((H,Te)=>(0,h.jsx)("td",{className:"px-3 py-2 border-b border-border-subtle text-sm text-text-muted",children:H},Te))},N))})]});return(0,h.jsxs)("div",{className:a("my-6 rounded-lg border border-border-subtle overflow-hidden",r),children:[(0,h.jsx)("div",{className:"overflow-x-auto",children:(0,h.jsx)("table",{className:"w-full border-collapse text-sm",children:b})}),s&&m>1&&(0,h.jsxs)("div",{className:"flex items-center justify-between border-t border-border-subtle px-4 py-3",children:[(0,h.jsxs)("span",{className:"text-xs text-text-muted",children:["Page ",l," of ",m]}),(0,h.jsxs)("div",{className:"flex items-center gap-1",children:[(0,h.jsx)(Ne.Button,{onPress:()=>d(1),isDisabled:l===1,className:"grid place-items-center h-7 w-7 rounded-md text-text-muted outline-none transition-colors hover:bg-bg-surface disabled:opacity-30 disabled:pointer-events-none cursor-pointer",children:(0,h.jsx)(O.ChevronsLeft,{size:16})}),(0,h.jsx)(Ne.Button,{onPress:()=>d(x=>Math.max(x-1,1)),isDisabled:l===1,className:"grid place-items-center h-7 w-7 rounded-md text-text-muted outline-none transition-colors hover:bg-bg-surface disabled:opacity-30 disabled:pointer-events-none cursor-pointer",children:(0,h.jsx)(O.ChevronLeft,{size:16})}),(0,h.jsx)(Ne.Button,{onPress:()=>d(x=>Math.min(x+1,m)),isDisabled:l===m,className:"grid place-items-center h-7 w-7 rounded-md text-text-muted outline-none transition-colors hover:bg-bg-surface disabled:opacity-30 disabled:pointer-events-none cursor-pointer",children:(0,h.jsx)(O.ChevronRight,{size:16})}),(0,h.jsx)(Ne.Button,{onPress:()=>d(m),isDisabled:l===m,className:"grid place-items-center h-7 w-7 rounded-md text-text-muted outline-none transition-colors hover:bg-bg-surface disabled:opacity-30 disabled:pointer-events-none cursor-pointer",children:(0,h.jsx)(O.ChevronsRight,{size:16})})]})]})]})}var D=require("react/jsx-runtime");function Ro({name:e,type:t,defaultValue:o,required:r=!1,children:n,id:s,className:c=""}){return(0,D.jsxs)("article",{className:a("group relative my-6 rounded-xl border border-border-subtle bg-bg-surface p-5 transition-all duration-300","hover:border-primary-500/30 hover:shadow-lg hover:shadow-primary-500/5",c),id:s,children:[(0,D.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-4",children:[(0,D.jsxs)("div",{className:"flex flex-wrap items-center gap-2.5",children:[(0,D.jsx)("code",{className:"inline-flex items-center rounded-md bg-primary-500/10 px-2.5 py-1 font-mono text-sm font-bold text-primary-400 border border-primary-500/20 shadow-sm transition-colors group-hover:bg-primary-500/15",children:e}),t&&(0,D.jsx)("span",{className:"rounded-md bg-bg-muted/80 border border-border-subtle px-2 py-0.5 text-[11px] font-semibold text-text-muted uppercase tracking-wider shadow-sm",children:t}),r&&(0,D.jsxs)("div",{className:"flex items-center gap-1.5 rounded-full bg-red-500/10 px-2.5 py-0.5 text-[10px] font-bold uppercase tracking-wider text-red-400 border border-red-500/20 shadow-sm",children:[(0,D.jsx)("span",{className:"h-1 w-1 rounded-full bg-red-400 animate-pulse"}),"Required"]})]}),o&&(0,D.jsxs)("div",{className:"flex items-center gap-2 text-[11px] text-text-muted bg-bg-muted/30 px-2.5 py-1 rounded-md border border-border-subtle/50",children:[(0,D.jsx)("span",{className:"font-semibold opacity-60 uppercase tracking-tighter",children:"Default"}),(0,D.jsx)("code",{className:"font-mono text-text-main font-medium",children:o})]})]}),(0,D.jsx)("div",{className:"text-sm text-text-muted leading-relaxed [&>p]:m-0 selection:bg-primary-500/30",children:n})]})}var Po=require("react/jsx-runtime");function No({to:e,children:t,className:o="",...r}){let n=e&&(e.startsWith("http://")||e.startsWith("https://")||e.startsWith("//")),s=a("text-blue-600 hover:text-blue-800 hover:underline cursor-pointer",o);return(0,Po.jsx)(oe,{href:e,className:s,target:n?"_blank":void 0,rel:n?"noopener noreferrer":void 0,...r,children:t})}var To=require("react/jsx-runtime");function wo({src:e,alt:t,theme:o,...r}){let{theme:n}=Pt();return o&&o!==n?null:(0,To.jsx)("img",{src:e,alt:t||"",...r})}var C=require("react/jsx-runtime");function ko({title:e,props:t,className:o=""}){return(0,C.jsxs)("div",{className:a("my-6",o),children:[e&&(0,C.jsx)("h3",{className:"text-base font-bold text-text-main mb-3",children:e}),(0,C.jsx)("div",{className:"overflow-x-auto rounded-lg border border-border-subtle",children:(0,C.jsxs)("table",{className:"w-full border-collapse text-sm",children:[(0,C.jsx)("thead",{children:(0,C.jsxs)("tr",{children:[(0,C.jsx)("th",{className:"text-left px-4 py-3 border-b-2 border-border-subtle text-xs font-bold uppercase tracking-wider text-text-muted",children:"Property"}),(0,C.jsx)("th",{className:"text-left px-4 py-3 border-b-2 border-border-subtle text-xs font-bold uppercase tracking-wider text-text-muted",children:"Type"}),(0,C.jsx)("th",{className:"text-left px-4 py-3 border-b-2 border-border-subtle text-xs font-bold uppercase tracking-wider text-text-muted",children:"Default"}),(0,C.jsx)("th",{className:"text-left px-4 py-3 border-b-2 border-border-subtle text-xs font-bold uppercase tracking-wider text-text-muted",children:"Description"})]})}),(0,C.jsx)("tbody",{children:t.map((r,n)=>(0,C.jsxs)("tr",{className:"transition-colors hover:bg-bg-surface",children:[(0,C.jsxs)("td",{className:"px-4 py-2.5 border-b border-border-subtle",children:[(0,C.jsx)("code",{className:"rounded bg-bg-surface px-1.5 py-0.5 font-mono text-xs font-bold text-primary-400",children:r.name}),r.required&&(0,C.jsx)("span",{className:"ml-1 text-red-400 font-bold",children:"*"})]}),(0,C.jsx)("td",{className:"px-4 py-2.5 border-b border-border-subtle",children:(0,C.jsx)("code",{className:"rounded bg-bg-muted px-1.5 py-0.5 font-mono text-xs text-text-muted",children:r.type})}),(0,C.jsx)("td",{className:"px-4 py-2.5 border-b border-border-subtle",children:r.defaultValue?(0,C.jsx)("code",{className:"rounded bg-bg-muted px-1.5 py-0.5 font-mono text-xs text-primary-400",children:r.defaultValue}):(0,C.jsx)("span",{className:"text-text-dim",children:"\u2014"})}),(0,C.jsx)("td",{className:"px-4 py-2.5 border-b border-border-subtle text-text-muted",children:r.description})]},`${r.name}-${n}`))})]})})]})}var rt=require("react");function Ao(e){let{code:t,children:o,preview:r}=e,n=(0,rt.useMemo)(()=>(t??(typeof o=="string"?o:"")).trim(),[t,o]),s=(0,rt.useMemo)(()=>r??(typeof o!="string"?o:null),[r,o]);return{initialCode:n,previewElement:s}}var ue=require("react/jsx-runtime");function Lo(e){let{highlightedHtml:t,hideCode:o=!1,hideSandbox:r=!1,hideCopy:n=!1,sandboxOptions:s={}}=e,{initialCode:c,previewElement:i}=Ao(e);return(0,ue.jsxs)("div",{className:"my-6 overflow-hidden rounded-xl border border-border-subtle",children:[(0,ue.jsx)("div",{className:"flex items-center justify-center p-8 bg-bg-surface",children:i}),!o&&(0,ue.jsx)("div",{className:"border-t border-border-subtle",children:(0,ue.jsx)(re,{hideSandbox:r,hideCopy:n,title:s.title,lang:"tsx",highlightedHtml:t,children:c})})]})}var Fo=require("react"),Y=require("lucide-react");var Bo=require("react");var hr=require("react-aria-components"),Pe=require("lucide-react");var Io=require("react/jsx-runtime");var we=R(require("react-aria-components")),vr=require("lucide-react");var it=require("react/jsx-runtime");var k=R(require("react-aria-components")),se=require("lucide-react");var v=require("react/jsx-runtime"),yr=({children:e,isOpen:t,onOpenChange:o,className:r})=>(0,v.jsx)(k.ModalOverlay,{isOpen:t,onOpenChange:o,isDismissable:!0,className:a("fixed inset-0 z-100 bg-black/40 backdrop-blur-sm px-4 py-4 sm:py-20","entering:animate-in entering:fade-in exiting:animate-out exiting:fade-out"),children:(0,v.jsx)(k.Modal,{className:a("mx-auto w-full max-w-2xl overflow-hidden rounded-xl border border-border-subtle bg-bg-surface shadow-2xl ring-1 ring-black/5 outline-none","entering:animate-in entering:fade-in entering:zoom-in-95 exiting:animate-out exiting:fade-out exiting:zoom-out-95",r),children:(0,v.jsx)(k.Dialog,{className:"flex flex-col max-h-[70vh] focus:outline-none",children:e})})}),Cr=({children:e,className:t,...o})=>(0,v.jsx)("div",{className:t,children:(0,v.jsx)(k.Autocomplete,{...o,className:"flex flex-col min-h-0",children:e})}),Rr=({className:e,...t})=>(0,v.jsxs)(k.SearchField,{className:"flex items-center gap-3 border-b border-border-subtle px-4 py-4",autoFocus:!0,children:[(0,v.jsx)(se.Search,{className:"h-5 w-5 text-text-muted"}),(0,v.jsx)(k.Input,{...t,className:a("w-full bg-transparent text-lg text-text-main placeholder-text-muted outline-none",e),placeholder:"Search documentation..."}),(0,v.jsx)("div",{className:"flex items-center gap-1.5 rounded-md border border-border-subtle bg-bg-main px-1.5 py-1 text-[10px] font-medium text-text-muted",children:(0,v.jsx)("kbd",{className:"font-sans",children:"ESC"})})]}),Nr=({children:e,className:t,...o})=>(0,v.jsx)(k.ListBox,{...o,className:a("flex-1 overflow-y-auto p-2 outline-none",t),children:e}),Pr=({children:e,className:t,...o})=>(0,v.jsx)(k.ListBoxItem,{...o,className:a("group flex items-center gap-3 rounded-lg p-3 text-left outline-none cursor-pointer transition-colors","text-text-muted hover:bg-bg-main hover:text-text-main focus:bg-primary-500 focus:text-white selected:bg-primary-500 selected:text-white",t),children:r=>(0,v.jsxs)(v.Fragment,{children:[e,(r.isFocused||r.isSelected)&&(0,v.jsxs)("div",{className:"ml-auto opacity-50 flex items-center gap-1",children:[(0,v.jsx)("span",{className:"text-[10px]",children:"Select"}),(0,v.jsx)(se.CornerDownLeft,{size:10})]})]})}),wr=({isHeading:e,className:t})=>(0,v.jsx)("div",{className:a("shrink-0",t),children:e?(0,v.jsx)(se.Hash,{size:18}):(0,v.jsx)(se.FileText,{size:18})}),Tr=({children:e,className:t})=>(0,v.jsx)("span",{className:a("block font-medium truncate flex-1 text-sm",t),children:e}),kr=({children:e,className:t})=>(0,v.jsx)("span",{className:a("ml-2 text-xs opacity-70 truncate hidden sm:inline group-focus:opacity-100",t),children:e}),si={Root:yr,Autocomplete:Cr,Input:Rr,List:Nr,Item:Object.assign(Pr,{Icon:wr,Title:Tr,Bio:kr})};var V=require("react"),Ar=R(require("scroll-into-view-if-needed"));var Mo=require("react");var So=require("react/jsx-runtime"),hi=(0,V.createContext)(null),vi=(0,V.createContext)(null);function Lr(e){let[t,o]=(0,V.useState)({isOverflowing:!1,isAtBottom:!1});return(0,V.useEffect)(()=>{let r=e.current;if(!r)return;let n=()=>{let c=r.scrollHeight>r.clientHeight,i=r.scrollHeight-r.scrollTop<=r.clientHeight+2;o({isOverflowing:c,isAtBottom:i})};n(),r.addEventListener("scroll",n,{passive:!0}),window.addEventListener("resize",n);let s=new MutationObserver(n);return s.observe(r,{childList:!0,subtree:!0}),()=>{r.removeEventListener("scroll",n),window.removeEventListener("resize",n),s.disconnect()}},[e]),t}var Br=({children:e,className:t,ref:o,...r})=>{let n=(0,V.useRef)(null);(0,V.useImperativeHandle)(o,()=>n.current);let{isOverflowing:s,isAtBottom:c}=Lr(n);return(0,So.jsx)("div",{ref:n,className:a("relative overflow-y-auto boltdocs-otp-content",s&&!c&&"mask-[linear-gradient(to_bottom,black_85%,transparent_100%)]",t),...r,children:e})};Br.displayName="OnThisPageContent";var Eo=R(require("react-aria-components")),$e=require("lucide-react");var $=require("react/jsx-runtime"),Ir=({children:e,className:t})=>(0,$.jsx)("nav",{className:a("grid grid-cols-1 sm:grid-cols-2 gap-4 mt-12 pt-8 border-t border-border-subtle",t),children:e}),Mr=({children:e,to:t,direction:o,className:r})=>{let n=o==="next";return(0,$.jsxs)(Eo.Link,{href:t,className:a("flex group items-center p-4 rounded-xl border border-border-subtle bg-bg-surface outline-none","transition-all hover:bg-bg-main hover:border-primary-500 hover:shadow-lg","focus-visible:ring-2 focus-visible:ring-primary-500/30",n?"text-right justify-end":"text-left justify-start",r),children:[!n&&(0,$.jsx)($e.ChevronLeft,{className:"mr-3 h-5 w-5 text-text-muted group-hover:text-primary-500 transition-transform group-hover:-translate-x-1"}),(0,$.jsx)("div",{className:"flex flex-col gap-1 flex-1",children:e}),n&&(0,$.jsx)($e.ChevronRight,{className:"ml-3 h-5 w-5 text-text-muted group-hover:text-primary-500 transition-transform group-hover:translate-x-1"})]})},Sr=({children:e,className:t})=>(0,$.jsx)("span",{className:a("text-xs font-medium uppercase tracking-wider text-text-muted",t),children:e}),Er=({children:e,className:t})=>(0,$.jsx)("span",{className:a("text-base font-bold text-text-main truncate",t),children:e}),Or=({children:e})=>(0,$.jsx)($.Fragment,{children:e}),Ni={PageNavRoot:Ir,PageNavLink:Object.assign(Mr,{Title:Sr,Description:Er,Icon:Or})};var Dr=require("react/jsx-runtime");var Vr=R(require("react-aria-components")),Hr=require("lucide-react");var Oo=require("react/jsx-runtime");var at=require("react-aria-components"),zr=require("lucide-react");var Fr=require("react/jsx-runtime");var Vo=require("react/jsx-runtime"),Do=({children:e,className:t,vertical:o=!1})=>(0,Vo.jsx)("div",{className:a("inline-flex",o?"flex-col":"flex-row",!o&&["[&>*:not(:first-child)]:-ml-px","[&>*:first-child]:rounded-r-none","[&>*:last-child]:rounded-l-none","[&>*:not(:first-child):not(:last-child)]:rounded-none",t?.includes("rounded-full")&&["[&>*:first-child]:rounded-l-full","[&>*:last-child]:rounded-r-full"],t?.includes("rounded-xl")&&["[&>*:first-child]:rounded-l-xl","[&>*:last-child]:rounded-r-xl"],t?.includes("rounded-lg")&&["[&>*:first-child]:rounded-l-lg","[&>*:last-child]:rounded-r-lg"]],o&&["[&>*:not(:first-child)]:-mt-px","[&>*:first-child]:rounded-b-none","[&>*:last-child]:rounded-t-none","[&>*:not(:first-child):not(:last-child)]:rounded-none",t?.includes("rounded-full")&&["[&>*:first-child]:rounded-t-full","[&>*:last-child]:rounded-b-full"]],t),children:e});var ge=require("lucide-react"),zo=R(require("react")),L=R(require("react-aria-components"));var be=R(require("react-aria-components"));var fe=require("react/jsx-runtime"),Ho=({children:e,className:t,showArrow:o,...r})=>(0,fe.jsxs)(be.Popover,{offset:8,...r,className:be.composeRenderProps(t,n=>a("z-50 overflow-auto rounded-xl border border-border-subtle bg-bg-surface/80 shadow-xl backdrop-blur-md outline-none","entering:animate-in entering:fade-in entering:zoom-in-95 exiting:animate-out exiting:fade-out exiting:zoom-out-95 fill-mode-forwards",n)),children:[o&&(0,fe.jsx)(be.OverlayArrow,{className:"group",children:(0,fe.jsx)("svg",{viewBox:"0 0 12 12",className:"block h-3 w-3 fill-bg-surface/80 stroke-border-subtle group-placement-bottom:rotate-180 group-placement-left:-rotate-90 group-placement-right:rotate-90","aria-hidden":"true",children:(0,fe.jsx)("path",{d:"M0 0 L6 6 L12 0"})})}),e]});var I=require("react/jsx-runtime");function nt(e){let[t,o]=zo.default.Children.toArray(e.children).slice(0,2);return(0,I.jsxs)(L.MenuTrigger,{...e,children:[t,(0,I.jsx)(Ho,{placement:e.placement,className:"min-w-[200px]",children:o})]})}function st(e){return(0,I.jsx)(L.Menu,{...e,className:L.composeRenderProps(e.className,t=>a("p-1.5 outline-none max-h-[inherit] overflow-auto",t))})}function ze(e){let t=e.textValue||(typeof e.children=="string"?e.children:void 0);return(0,I.jsx)(L.MenuItem,{...e,textValue:t,className:L.composeRenderProps(e.className,(o,{isFocused:r,isPressed:n,isDisabled:s})=>a("group relative flex flex-row items-center gap-2.5 px-3 py-1.5 rounded-lg outline-none cursor-default transition-all duration-200","text-text-main text-[0.8125rem]",r&&"bg-primary-500/10 text-primary-600 shadow-sm",n&&"scale-[0.98] bg-primary-500/15",s&&"opacity-40 grayscale pointer-events-none",o)),children:L.composeRenderProps(e.children,(o,{selectionMode:r,isSelected:n,hasSubmenu:s})=>(0,I.jsxs)(I.Fragment,{children:[r!=="none"&&(0,I.jsxs)("span",{className:"flex items-center w-4 h-4 shrink-0 justify-center",children:[n&&r==="multiple"&&(0,I.jsx)(ge.Check,{className:"w-3.5 h-3.5 stroke-[2.5px] text-primary-500 animate-in zoom-in-50 duration-200"}),n&&r==="single"&&(0,I.jsx)(ge.Dot,{className:"w-6 h-6 text-primary-500 animate-in zoom-in-50 duration-200"})]}),(0,I.jsx)("div",{className:"flex-1 flex flex-row items-center gap-2.5 truncate font-medium",children:o}),s&&(0,I.jsx)(ge.ChevronRight,{className:"w-4 h-4 ml-auto text-text-muted group-focused:text-primary-500/70 transition-colors"})]}))})}var Fe=require("react-aria-components");var T=require("react/jsx-runtime"),$r=e=>{let[t,o]=(0,Fo.useState)(!1);return{copied:t,handleCopy:()=>{navigator.clipboard.writeText(e),o(!0),setTimeout(()=>o(!1),2e3)},handleOpenRaw:()=>{let s=new Blob([e],{type:"text/plain;charset=utf-8"}),c=URL.createObjectURL(s);window.open(c,"_blank")}}};function $o({content:e,mdxRaw:t,config:o}){let r=t||e||"",{copied:n,handleCopy:s,handleOpenRaw:c}=$r(r),i=o!==!1,l=typeof o=="object"&&o.text||"Copy Markdown";return!i||!r?null:(0,T.jsx)("div",{className:"relative inline-flex z-100 flex-shrink-0 w-max translate-y-0 active:translate-y-px transition-transform duration-200",children:(0,T.jsxs)(Do,{className:"rounded-xl border border-border-subtle bg-bg-surface/40 backdrop-blur-md transition-all duration-300 hover:border-primary-500/50 hover:shadow-lg hover:shadow-primary-500/5 group overflow-hidden",children:[(0,T.jsx)(ae,{variant:"ghost",onPress:s,icon:n?(0,T.jsx)(Y.Check,{size:16}):(0,T.jsx)(Y.Copy,{size:16}),iconPosition:"left",className:a("px-5 py-2 bg-transparent text-[0.8125rem] font-semibold h-9 border-none shrink-0","text-text-main transition-all duration-300 hover:bg-primary-500/5",n&&"text-emerald-500 hover:bg-emerald-500/5"),children:n?"Copied!":l}),(0,T.jsxs)(nt,{placement:"bottom end",children:[(0,T.jsx)(ae,{variant:"ghost",isIconOnly:!0,icon:(0,T.jsx)(Y.ChevronDown,{size:14}),className:a("px-3.5 h-9 border-l border-border-subtle/50 text-text-muted rounded-none bg-transparent shrink-0","transition-all duration-300 hover:bg-primary-500/5 hover:text-primary-500")}),(0,T.jsxs)(st,{className:"w-52",children:[(0,T.jsxs)(ze,{onAction:s,className:"flex flex-row items-start gap-2.5 group",children:[(0,T.jsx)(Y.Copy,{size:16,className:"w-4 h-4 shrink-0 mt-0.5 transition-transform duration-200 group-hover:-translate-y-0.5 text-text-muted group-hover:text-primary-500"}),(0,T.jsx)("span",{className:"font-medium text-[0.8125rem]",children:"Copy Markdown"})]}),(0,T.jsxs)(ze,{onAction:c,className:"flex flex-row items-start gap-2.5 group",children:[(0,T.jsx)(Y.ExternalLink,{size:16,className:"w-4 h-4 shrink-0 mt-0.5 transition-transform duration-200 group-hover:-translate-y-0.5 text-text-muted group-hover:text-primary-500"}),(0,T.jsx)("span",{className:"font-medium text-[0.8125rem]",children:"View as Markdown"})]})]})]})]})})}var W=require("react/jsx-runtime"),xe=({level:e,id:t,children:o})=>{let r=`h${e}`;return(0,W.jsxs)(r,{id:t,className:"boltdocs-heading",children:[o,t&&(0,W.jsx)("a",{href:`#${t}`,className:"header-anchor","aria-label":"Anchor",children:(0,W.jsx)(Wo.Link,{size:16})})]})},_o={...lt,h1:e=>(0,W.jsx)(xe,{level:1,...e}),h2:e=>(0,W.jsx)(xe,{level:2,...e}),h3:e=>(0,W.jsx)(xe,{level:3,...e}),h4:e=>(0,W.jsx)(xe,{level:4,...e}),h5:e=>(0,W.jsx)(xe,{level:5,...e}),h6:e=>(0,W.jsx)(xe,{level:6,...e}),pre:e=>(0,W.jsx)(re,{...e,children:e.children})};var y=require("react/jsx-runtime");function Go({initialRoutes:e,initialConfig:t,docsDirName:o,modules:r,hot:n,homePage:s,externalPages:c,components:i={}}){let[l,d]=(0,j.useState)(e),[m]=(0,j.useState)(t),p=c||{},f=(0,j.useMemo)(()=>l.filter(b=>!(s&&(b.path==="/"||b.path===""))&&!p[b.path===""?"/":b.path]).map(b=>{let x=Object.keys(r).find(H=>H===`/${o}/${b.filePath}`||H.endsWith(`/${o}/${b.filePath}`)||H.endsWith(`/${o}\\${b.filePath.replace(/\\/g,"/")}`)),N=x?r[x]:null;return{...b,Component:j.default.lazy(async()=>N?await N():{default:qe})}}),[l,r,o,s,p]);(0,j.useEffect)(()=>{n&&n.on("boltdocs:routes-update",b=>{d(b)})},[n]);let g=(0,j.useMemo)(()=>({..._o,...i}),[i]);return(0,y.jsx)(Nt,{children:(0,y.jsx)(Ht,{components:g,children:(0,y.jsx)(Ge.Provider,{value:m,children:(0,y.jsx)(At,{children:(0,y.jsxs)(ft,{routes:l,modules:r,children:[(0,y.jsx)(Mt,{}),(0,y.jsxs)(ee.Routes,{children:[s&&(0,y.jsx)(ee.Route,{path:"/",element:(0,y.jsx)(We.default,{children:(0,y.jsx)(s,{})})}),Object.entries(p).map(([b,x])=>(0,y.jsx)(ee.Route,{path:b,element:(0,y.jsx)(We.default,{children:(0,y.jsx)(x,{})})},b)),(0,y.jsx)(ee.Route,{element:(0,y.jsx)(Ot,{}),children:f.map(b=>(0,y.jsx)(ee.Route,{path:b.path===""?"/":b.path,element:(0,y.jsx)(j.default.Suspense,{fallback:(0,y.jsx)(Ct,{}),children:(0,y.jsx)($t,{Component:b.Component})})},b.path))},"docs-layout"),(0,y.jsx)(ee.Route,{path:"*",element:(0,y.jsx)(We.default,{children:(0,y.jsx)(qe,{})})})]})]})})})})})}var _e=require("react/jsx-runtime");async function _r(e){let{path:t,routes:o,config:r,modules:n,homePage:s,externalPages:c,docsDirName:i}=e,l={};for(let[m,p]of Object.entries(n))l[m]=()=>Promise.resolve(p);return jo.default.renderToString((0,_e.jsx)(Uo.default.StrictMode,{children:(0,_e.jsx)(Xo.StaticRouter,{location:t,children:(0,_e.jsx)(Go,{initialRoutes:o,initialConfig:r,docsDirName:i,modules:l,homePage:s,externalPages:c})})}))}0&&(module.exports={render});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as t}from"../chunk-QYPNX5UN.mjs";import"../chunk-A4HQPEPU.mjs";import"../chunk-BA5NH5HU.mjs";import"../chunk-BQCD3DWG.mjs";import"../chunk-XEAPSFMB.mjs";import"../chunk-JZXLCA2E.mjs";import l from"react";import R from"react-dom/server";import{StaticRouter as f}from"react-router-dom/server";import{jsx as e}from"react/jsx-runtime";async function D(r){let{path:n,routes:i,config:s,modules:a,homePage:m,externalPages:c,docsDirName:p}=r,o={};for(let[d,g]of Object.entries(a))o[d]=()=>Promise.resolve(g);return R.renderToString(e(l.StrictMode,{children:e(f,{location:n,children:e(t,{initialRoutes:i,initialConfig:s,docsDirName:p,modules:o,homePage:m,externalPages:c})})}))}export{D as render};
|